class EbanqApi::Profile

This class represents an profile functional of Ebanq REST Api.

Public Class Methods

new(client) click to toggle source

Declares an client instance.

# File lib/ebanq_api/blocks/profile.rb, line 13
def initialize(client)
  @client = client
end

Public Instance Methods

list_of_allowed_documents() click to toggle source

Get list of allowed documents /api/v1/profile/

Examples

client.profile.list_of_allowed_documents

@return Array

# File lib/ebanq_api/blocks/profile.rb, line 55
def list_of_allowed_documents
  @client.make_request :get, profile_path
end
show(uid) click to toggle source

Get user profile data. /api/v1/auth/{uid}

Attributes

  • uid (required) - The id of the user (Number)

Examples

client.profile.show(1)
# File lib/ebanq_api/blocks/profile.rb, line 27
def show(uid)
  @client.make_request :get, auth_path(uid)
end
update(uid, params) click to toggle source

Update user profile data /api/v1/auth/{uid}

Attributes

  • uid (required) - The id of the user (Number)

  • params (required) - hash of params which needs to update,

e.g. {first_name: 'John', last_name: 'Doe'}

Examples

client.profile.update(1,  first_name: 'John' )
# File lib/ebanq_api/blocks/profile.rb, line 43
def update(uid, params)
  @client.make_request :post,
                       auth_path(uid), params
end