Class: OrbipayPaymentsapiClient::OrbipayPaymentsapiClientApis::CustomerApi
- Inherits:
-
Object
- Object
- OrbipayPaymentsapiClient::OrbipayPaymentsapiClientApis::CustomerApi
- Defined in:
- lib/orbipay_paymentsapi_client/api/customer_api.rb
Overview
.
############################################################################################
## This class subject to change without prior notice, Please dont use this class directly.##
############################################################################################
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_customer(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, create_customer_request, opts = {}) ⇒ [CustomerResponse, headers]
Create Customer The Create Customer API is used to register a customer with a biller in EBPP.
-
#create_customer_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, create_customer_request, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Create Customer The Create Customer API is used to register a customer with a biller in EBPP.
-
#get_customer(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, opts = {}) ⇒ [CustomerResponse, headers]
Get Customer The Get Customer API is used to retrieve the details of the customer based on the id.
-
#get_customer_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Get Customer The Get Customer API is used to retrieve the details of the customer based on the id.
-
#initialize(api_client = ApiClient.default) ⇒ CustomerApi
constructor
A new instance of CustomerApi.
-
#retrieve_customers(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ [CustomersResponse, headers]
Retrieve Customers This API is used to retrieve/lookup customers from EBPP.
-
#retrieve_customers_page(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, query_id, opts = {}) ⇒ [CustomersResponse, headers]
Retrieve Customers Pagination This API is used to paginate through the list of customers returned in the Retrieve Customers API.
-
#retrieve_customers_page_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, query_id, opts = {}) ⇒ Array<(CustomersResponse, Fixnum, Hash)>
Retrieve Customers Pagination This API is used to paginate through the list of customers returned in the Retrieve Customers API.
-
#retrieve_customers_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ Array<(CustomersResponse, Fixnum, Hash)>
Retrieve Customers This API is used to retrieve/lookup customers from EBPP.
-
#update_customer(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, update_customer_request, opts = {}) ⇒ [CustomerResponse, headers]
Update Customer The Update Customer API is used to edit the customer''s personal details, accounts or the customer''s status.
-
#update_customer_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, update_customer_request, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Update Customer The Update Customer API is used to edit the customer''s personal details, accounts or the customer''s status.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CustomerApi
Returns a new instance of CustomerApi.
15 16 17 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 15 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
13 14 15 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 13 def api_client @api_client end |
Instance Method Details
#create_customer(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, create_customer_request, opts = {}) ⇒ [CustomerResponse, headers]
Create Customer The Create Customer API is used to register a customer with a biller in EBPP. It is also mandatory to create a customer account for the customer. So, at least one customer account should be provided in order to register a customer. There is no limit on the number of accounts that can be associated with the customer. Either first_name or last_name is required to create a customer.
32 33 34 35 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 32 def create_customer(channel, client_key, product, , idempotent_request_key, requestor_type, create_customer_request, opts = {}) data, _status_code, _headers = create_customer_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, create_customer_request, opts) [data, _status_code, _headers] end |
#create_customer_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, create_customer_request, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Create Customer The Create Customer API is used to register a customer with a biller in EBPP. It is also mandatory to create a customer account for the customer. So, at least one customer account should be provided in order to register a customer. There is no limit on the number of accounts that can be associated with the customer. Either first_name or last_name is required to create a customer.
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 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 51 def create_customer_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, create_customer_request, opts = {}) # resource path local_var_path = '/customers' # 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'] = 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? header_params['trace_id'] = opts[:'trace_id'] if !opts[:'trace_id'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(create_customer_request) 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 => 'CustomerResponse') return data, status_code, headers end |
#get_customer(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, opts = {}) ⇒ [CustomerResponse, headers]
Get Customer The Get Customer API is used to retrieve the details of the customer based on the id.
103 104 105 106 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 103 def get_customer(channel, client_key, product, , idempotent_request_key, requestor_type, id_customer, opts = {}) data, _status_code, _headers = get_customer_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, id_customer, opts) [data, _status_code, _headers] end |
#get_customer_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Get Customer The Get Customer API is used to retrieve the details of the customer based on the id.
122 123 124 125 126 127 128 129 130 131 132 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 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 122 def get_customer_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, id_customer, opts = {}) # resource path local_var_path = '/customers/{ID_CUSTOMER}' 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 CustomerApi.get_customer" 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'] = 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? header_params['trace_id'] = opts[:'trace_id'] if !opts[:'trace_id'].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 => 'CustomerResponse') return data, status_code, headers end |
#retrieve_customers(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ [CustomersResponse, headers]
Retrieve Customers This API is used to retrieve/lookup customers from EBPP. Customers can be retrieved matching criteria that includes the customer_reference, the ssn, the email or the customer account number. A unique customer can be retrieved by using search criteria as per the customer uniqueness parameters opted by the client/biller. If the requestor_type is customer, the Retrieve Customers API will return an error if it cannot retrieve a unique customer.
182 183 184 185 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 182 def retrieve_customers(channel, client_key, product, , idempotent_request_key, requestor_type, opts = {}) data, _status_code, _headers = retrieve_customers_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, opts) [data, _status_code, _headers] end |
#retrieve_customers_page(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, query_id, opts = {}) ⇒ [CustomersResponse, headers]
Retrieve Customers Pagination This API is used to paginate through the list of customers returned in the Retrieve Customers API.
267 268 269 270 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 267 def retrieve_customers_page(channel, client_key, product, , idempotent_request_key, requestor_type, query_id, opts = {}) data, _status_code, _headers = retrieve_customers_page_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, query_id, opts) [data, _status_code, _headers] end |
#retrieve_customers_page_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, query_id, opts = {}) ⇒ Array<(CustomersResponse, Fixnum, Hash)>
Retrieve Customers Pagination This API is used to paginate through the list of customers returned in the Retrieve Customers API.
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 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 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 289 def retrieve_customers_page_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, query_id, opts = {}) # resource path local_var_path = '/customers/lists' # 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'] = 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? header_params['trace_id'] = opts[:'trace_id'] if !opts[:'trace_id'].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 => 'CustomersResponse') return data, status_code, headers end |
#retrieve_customers_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, opts = {}) ⇒ Array<(CustomersResponse, Fixnum, Hash)>
Retrieve Customers This API is used to retrieve/lookup customers from EBPP. Customers can be retrieved matching criteria that includes the customer_reference, the ssn, the email or the customer account number. A unique customer can be retrieved by using search criteria as per the customer uniqueness parameters opted by the client/biller. If the requestor_type is customer, the Retrieve Customers API will return an error if it cannot retrieve a unique customer.
205 206 207 208 209 210 211 212 213 214 215 216 217 218 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 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 205 def retrieve_customers_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, opts = {}) # resource path local_var_path = '/customers/lists' # 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'] = 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? header_params['trace_id'] = opts[:'trace_id'] if !opts[:'trace_id'].nil? # form parameters form_params = {} form_params['customer_reference'] = opts[:'customer_reference'] if !opts[:'customer_reference'].nil? form_params['ssn'] = opts[:'ssn'] if !opts[:'ssn'].nil? form_params['email'] = opts[:'email'] if !opts[:'email'].nil? form_params['account_number'] = opts[:'account_number'] if !opts[:'account_number'].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 => 'CustomersResponse') return data, status_code, headers end |
#update_customer(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, update_customer_request, opts = {}) ⇒ [CustomerResponse, headers]
Update Customer The Update Customer API is used to edit the customer''s personal details, accounts or the customer''s status. Only the information being updated needs to be sent in the request, along with the id of the customer being updated. A customer can also be associated with new customer accounts using the API.
Along with Customer details , Customer and Customer Account statuses also can be updated using the Update Customer API. Below are the possible customer state transformations. | from_status | to_status | allowed requestor_type | | ———— | ———— | ———— | | active | suspended| <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> | | active | revoked | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | suspended | active | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | suspended | revoked | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | revoked | active | <ul> <li>external_user</li> <li> client_agent</li></ul> </ul> | Below are the possible customer account state transformation. | from_status | to_status | allowed requestor_type | | ———— | ———— | ———— | | active | inactive| <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> | | inactive | active | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | active | incollections | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | incollections | active | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | inactive | incollections | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | incollections | inactive | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> |
352 353 354 355 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 352 def update_customer(channel, client_key, product, , idempotent_request_key, requestor_type, id_customer, update_customer_request, opts = {}) data, _status_code, _headers = update_customer_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, id_customer, update_customer_request, opts) [data, _status_code, _headers] end |
#update_customer_with_http_info(channel, client_key, product, timestamp, idempotent_request_key, requestor_type, id_customer, update_customer_request, opts = {}) ⇒ Array<(CustomerResponse, Fixnum, Hash)>
Update Customer The Update Customer API is used to edit the customer''s personal details, accounts or the customer''s status. Only the information being updated needs to be sent in the request, along with the id of the customer being updated. A customer can also be associated with new customer accounts using the API. <br><br> Along with Customer details , Customer and Customer Account statuses also can be updated using the Update Customer API. Below are the possible customer state transformations. | from_status | to_status | allowed requestor_type | | ———— | ———— | ———— | | active | suspended| <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> | | active | revoked | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | suspended | active | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | suspended | revoked | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | revoked | active | <ul> <li>external_user</li> <li> client_agent</li></ul> </ul> | Below are the possible customer account state transformation. | from_status | to_status | allowed requestor_type | | ———— | ———— | ———— | | active | inactive| <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> | | inactive | active | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | active | incollections | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | incollections | active | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | inactive | incollections | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> | | incollections | inactive | <ul> <li>external_user</li> <li> client_agent</li> <li> system</li></ul> </ul> |
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/orbipay_paymentsapi_client/api/customer_api.rb', line 372 def update_customer_with_http_info(channel, client_key, product, , idempotent_request_key, requestor_type, id_customer, update_customer_request, opts = {}) # resource path local_var_path = '/customers/{ID_CUSTOMER}' 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 CustomerApi.update_customer" 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'] = 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? header_params['trace_id'] = opts[:'trace_id'] if !opts[:'trace_id'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(update_customer_request) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CustomerResponse') return data, status_code, headers end |