Class: OneApi::CustomerProfileClient

Inherits:
OneApiClient show all
Defined in:
lib/oneapi-ruby/client.rb

Instance Attribute Summary

Attributes inherited from OneApiClient

#raise_exceptions

Instance Method Summary collapse

Methods inherited from OneApiClient

#convert_from_json, #execute_GET, #execute_POST, #execute_request, #fill_oneapi_authentication, #get_or_create_client_correlator, #get_rest_url, #is_success, #login, #prepare_headers, #urlencode

Constructor Details

#initialize(username, password, base_url = nil) ⇒ CustomerProfileClient

Returns a new instance of CustomerProfileClient.



290
291
292
# File 'lib/oneapi-ruby/client.rb', line 290

def initialize(username, password, base_url=nil)
    super(username, password, base_url)
end

Instance Method Details

#get_account_balanceObject



294
295
296
297
298
# File 'lib/oneapi-ruby/client.rb', line 294

def ()
    is_success, result = execute_GET('/1/customerProfile/balance')
    
    return convert_from_json(AccountBalance, result, ! is_success)
end

#get_customer_profileObject



300
301
302
303
304
# File 'lib/oneapi-ruby/client.rb', line 300

def get_customer_profile()
    is_success, result = execute_GET('/1/customerProfile')

    return convert_from_json(CustomerProfile, result, ! is_success)
end