Class: OneApi::CustomerProfileClient
- Inherits:
-
OneApiClient
- Object
- OneApiClient
- OneApi::CustomerProfileClient
- Defined in:
- lib/oneapi-ruby/client.rb
Instance Attribute Summary
Attributes inherited from OneApiClient
Instance Method Summary collapse
- #get_account_balance ⇒ Object
- #get_customer_profile ⇒ Object
-
#initialize(username, password, base_url = nil) ⇒ CustomerProfileClient
constructor
A new instance of CustomerProfileClient.
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_balance ⇒ Object
294 295 296 297 298 |
# File 'lib/oneapi-ruby/client.rb', line 294 def get_account_balance() is_success, result = execute_GET('/1/customerProfile/balance') return convert_from_json(AccountBalance, result, ! is_success) end |
#get_customer_profile ⇒ Object
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 |