Class: OrbipayPaymentsapiClient::OrbipayPaymentsapiClientApis::CustomerAccountApi

Inherits:
Object
  • Object
show all
Defined in:
lib/orbipay_paymentsapi_client/api/customer_account_api.rb

Overview

.

############################################################################################
## This class subject to change without prior notice, Please dont use this class directly.##
############################################################################################

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CustomerAccountApi

Returns a new instance of CustomerAccountApi.



15
16
17
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 15

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



13
14
15
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#get_customer_account(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer_account, id_customer, opts = {}) ⇒ [CustomerAccountResponse, headers]

Get Customer Account The Get Customer Account API is used to retrieve the details of a customer account based on the id.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer_account

    The unique identifier assigned by EBPP to the Customer Account.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is <b>system</b>, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

  • ([CustomerAccountResponse, headers])


32
33
34
35
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 32

def (channel, client_key, product, timestamp, idempotent_request_key, requestor_type, , id_customer, opts = {})
  data, _status_code, _headers = (channel, client_key, product, timestamp, idempotent_request_key, requestor_type, , id_customer, opts)
  [data, _status_code, _headers]
end

#get_customer_account_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer_account, id_customer, opts = {}) ⇒ Array<(CustomerAccountResponse, Fixnum, Hash)>

Get Customer Account The Get Customer Account API is used to retrieve the details of a customer account based on the id.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer_account

    The unique identifier assigned by EBPP to the Customer Account.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

  • (Array<(CustomerAccountResponse, Fixnum, Hash)>)

    CustomerAccountResponse data, response status code and response headers



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 51

def (channel, client_key, product, timestamp, idempotent_request_key, requestor_type, , id_customer, opts = {})

  # resource path
  local_var_path = '/customers/{ID_CUSTOMER}/customeraccounts/{ID_CUSTOMER_ACCOUNT}'
  if  !.nil? && .to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER_ACCOUNT' + '}', .to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer_account' when calling CustomerAccountApi.get_customer_account"
  end
  
  if  !id_customer.nil? && id_customer.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER' + '}', id_customer.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer' when calling CustomerAccountApi.get_customer_account"
  end
  
  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomerAccountResponse')
  return data, status_code, headers
end

#renew_customer_account(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer_account, id_customer, renew_customer_account_request, opts = {}) ⇒ [CustomerAccountResponse, headers]

Renew Customer Account This API is used to renew a customer account. The API migrates all the pending payments and active payment setups from the original customer account to the new one.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer_account

    The unique identifier assigned by EBPP to the Customer Account.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • renew_customer_account_request

    JSON containing all the attributes of the Customer account to be renewed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

  • ([CustomerAccountResponse, headers])


113
114
115
116
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 113

def (channel, client_key, product, timestamp, idempotent_request_key, requestor_type, , id_customer, , opts = {})
  data, _status_code, _headers = (channel, client_key, product, timestamp, idempotent_request_key, requestor_type, , id_customer, , opts)
  [data, _status_code, _headers]
end

#renew_customer_account_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer_account, id_customer, renew_customer_account_request, opts = {}) ⇒ Array<(CustomerAccountResponse, Fixnum, Hash)>

Renew Customer Account This API is used to renew a customer account. The API migrates all the pending payments and active payment setups from the original customer account to the new one.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer_account

    The unique identifier assigned by EBPP to the Customer Account.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • renew_customer_account_request

    JSON containing all the attributes of the Customer account to be renewed.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

Returns:

  • (Array<(CustomerAccountResponse, Fixnum, Hash)>)

    CustomerAccountResponse data, response status code and response headers



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 133

def (channel, client_key, product, timestamp, idempotent_request_key, requestor_type, , id_customer, , opts = {})

  # resource path
  local_var_path = '/customers/{ID_CUSTOMER}/customeraccounts/{ID_CUSTOMER_ACCOUNT}/renew'
  if  !.nil? && .to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER_ACCOUNT' + '}', .to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer_account' when calling CustomerAccountApi.renew_customer_account"
  end
  
  if  !id_customer.nil? && id_customer.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER' + '}', id_customer.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer' when calling CustomerAccountApi.renew_customer_account"
  end
  
  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body()
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomerAccountResponse')
  return data, status_code, headers
end

#retrieve_customer_accounts(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, opts = {}) ⇒ [CustomerAccountsResponse, headers]

Retrieve Customer Accounts The API is used to retrieve all the customer accounts associated with a customer. The accounts can be filtered using the account number, status. The API responds with the first page of the list of customerAccounts matching the criteria.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

  • :page_size (String)

    The maximum number of objects returned in the query.

  • :account_number (String)

    The Account Number to get details of.

  • :status (Array<String>)

    The status of the customer&#39;s account in EBPP. This can take multiple values in the format key&#x3D;value1&amp;key&#x3D;value2.…

Returns:

  • ([CustomerAccountsResponse, headers])


198
199
200
201
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 198

def retrieve_customer_accounts(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, opts = {})
  data, _status_code, _headers = retrieve_customer_accounts_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, opts)
  [data, _status_code, _headers]
end

#retrieve_customer_accounts_page(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, query_id, opts = {}) ⇒ [CustomerAccountsResponse, headers]

Retrieve Customer Accounts Pagination This API is used to paginate through the list of customer Accounts returned in the Retrieve Customer Accounts API.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • query_id

    query id of the Retrieve/Search Accounts lookup.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

  • :page_size (String)

    The maximum number of objects returned in the query.

  • :from_index (String)

    To fetch the next set of objects that start after this object

  • :to_index (String)

    To fetch the previous set of objects that end at this object

Returns:

  • ([CustomerAccountsResponse, headers])


284
285
286
287
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 284

def retrieve_customer_accounts_page(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, query_id, opts = {})
  data, _status_code, _headers = retrieve_customer_accounts_page_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, query_id, opts)
  [data, _status_code, _headers]
end

#retrieve_customer_accounts_page_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, query_id, opts = {}) ⇒ Array<(CustomerAccountsResponse, Fixnum, Hash)>

Retrieve Customer Accounts Pagination This API is used to paginate through the list of customer Accounts returned in the Retrieve Customer Accounts API.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • query_id

    query id of the Retrieve/Search Accounts lookup.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

  • :page_size (String)

    The maximum number of objects returned in the query.

  • :from_index (String)

    To fetch the next set of objects that start after this object

  • :to_index (String)

    To fetch the previous set of objects that end at this object

Returns:

  • (Array<(CustomerAccountsResponse, Fixnum, Hash)>)

    CustomerAccountsResponse data, response status code and response headers



306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 306

def retrieve_customer_accounts_page_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, query_id, opts = {})

  # resource path
  local_var_path = '/customers/{ID_CUSTOMER}/customeraccounts/lists'
  if  !id_customer.nil? && id_customer.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER' + '}', id_customer.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer' when calling CustomerAccountApi.retrieve_customer_accounts_page"
  end
  
  # query parameters
  query_params = {}
  if  !query_id.nil? && query_id.to_s.strip != "" 
      query_params[:'query_id'] = query_id
  end
  if !opts[:'page_size'].nil? && opts[:'page_size'].to_s.strip != "" 
      query_params[:'page_size'] = opts[:'page_size']
  end
  if !opts[:'from_index'].nil? && opts[:'from_index'].to_s.strip != "" 
      query_params[:'from_index'] = opts[:'from_index']
  end
  if !opts[:'to_index'].nil? && opts[:'to_index'].to_s.strip != "" 
      query_params[:'to_index'] = opts[:'to_index']
  end

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomerAccountsResponse')
  return data, status_code, headers
end

#retrieve_customer_accounts_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, opts = {}) ⇒ Array<(CustomerAccountsResponse, Fixnum, Hash)>

Retrieve Customer Accounts The API is used to retrieve all the customer accounts associated with a customer. The accounts can be filtered using the account number, status. The API responds with the first page of the list of customerAccounts matching the criteria.

Parameters:

  • channel

    The channel through which the API is invoked.

  • client_key

    The unique identifier assigned by EBPP to the client.

  • product

    The product identifier corresponding to the API.

  • timestamp

    The timestamp for the moment when the API request is created.

  • idempotent_request_key

    The unique token that clients can generate and maintain in order to identify an API request.

  • requestor_type

    Type of the requestor of the API.

  • id_customer

    The unique identifier assigned by EBPP to the customer.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :requestor (String)

    The identifier for the requestor of the API. If the requestor_type is &lt;b&gt;system&lt;/b&gt;, requestor is optional.

  • :x_opay_headers (String)

    Intended for the future use.

  • :page_size (String)

    The maximum number of objects returned in the query.

  • :account_number (String)

    The Account Number to get details of.

  • :status (Array<String>)

    The status of the customer&#39;s account in EBPP. This can take multiple values in the format key&#x3D;value1&amp;key&#x3D;value2.…

Returns:

  • (Array<(CustomerAccountsResponse, Fixnum, Hash)>)

    CustomerAccountsResponse data, response status code and response headers



219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/orbipay_paymentsapi_client/api/customer_account_api.rb', line 219

def retrieve_customer_accounts_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, opts = {})

  # resource path
  local_var_path = '/customers/{ID_CUSTOMER}/customeraccounts/lists'
  if  !id_customer.nil? && id_customer.to_s.strip != ""
  		local_var_path = local_var_path.sub('{' + 'ID_CUSTOMER' + '}', id_customer.to_s)
	  else
	fail ArgumentError, "Missing the required parameter 'id_customer' when calling CustomerAccountApi.retrieve_customer_accounts"
  end
  
  # query parameters
  query_params = {}
  if !opts[:'page_size'].nil? && opts[:'page_size'].to_s.strip != "" 
      query_params[:'page_size'] = opts[:'page_size']
  end

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
  header_params['channel'] = channel
  header_params['client_key'] = client_key
  header_params['product'] = product
  header_params['timestamp'] = timestamp
  header_params['idempotent_request_key'] = idempotent_request_key
  header_params['requestor_type'] = requestor_type
  header_params['requestor'] = opts[:'requestor'] if !opts[:'requestor'].nil?
  header_params['X-OPAY-Headers'] = opts[:'x_opay_headers'] if !opts[:'x_opay_headers'].nil?

  # form parameters
  form_params = {}
  form_params['account_number'] = opts[:'account_number'] if !opts[:'account_number'].nil?
  form_params['status'] = @api_client.build_collection_param(opts[:'status'], :multi) if !opts[:'status'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomerAccountsResponse')
  return data, status_code, headers
end