class CityPayApiClient::CardHolderAccountApi
Attributes
Public Class Methods
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Card
Deletion Deletes a card from the account. The card will be marked for deletion before a subsequent purge will clear the card permanently. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param card_id [String] The id of the card that is presented by a call to retrieve a card holder account. @param [Hash] opts the optional parameters @return [Acknowledgement]
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 27 def account_card_delete_request(accountid, card_id, opts = {}) data, _status_code, _headers = account_card_delete_request_with_http_info(accountid, card_id, opts) data end
Card
Deletion Deletes a card from the account. The card will be marked for deletion before a subsequent purge will clear the card permanently. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param card_id [String] The id of the card that is presented by a call to retrieve a card holder account. @param [Hash] opts the optional parameters @return [Array<(Acknowledgement
, Integer, Hash)>] Acknowledgement
data, response status code and response headers
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 38 def account_card_delete_request_with_http_info(accountid, card_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_card_delete_request ...' end # verify the required parameter 'accountid' is set if @api_client.config.client_side_validation && accountid.nil? fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_card_delete_request" end # verify the required parameter 'card_id' is set if @api_client.config.client_side_validation && card_id.nil? fail ArgumentError, "Missing the required parameter 'card_id' when calling CardHolderAccountApi.account_card_delete_request" end # resource path local_var_path = '/account/{accountid}/card/{cardId}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Acknowledgement' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#account_card_delete_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Card
Registration Allows for a card to be registered for the account. The card will be added for future processing and will be available as a tokenised value for future processing. The card will be validated for 0. Being a valid card number (luhn check) 0. Having a valid expiry date 0. Being a valid bin value. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param register_card [RegisterCard] @param [Hash] opts the optional parameters @return [CardHolderAccount]
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 95 def account_card_register_request(accountid, register_card, opts = {}) data, _status_code, _headers = account_card_register_request_with_http_info(accountid, register_card, opts) data end
Card
Registration Allows for a card to be registered for the account. The card will be added for future processing and will be available as a tokenised value for future processing. The card will be validated for 0. Being a valid card number (luhn check) 0. Having a valid expiry date 0. Being a valid bin value. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param register_card [RegisterCard] @param [Hash] opts the optional parameters @return [Array<(CardHolderAccount
, Integer, Hash)>] CardHolderAccount
data, response status code and response headers
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 106 def account_card_register_request_with_http_info(accountid, register_card, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_card_register_request ...' end # verify the required parameter 'accountid' is set if @api_client.config.client_side_validation && accountid.nil? fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_card_register_request" end # verify the required parameter 'register_card' is set if @api_client.config.client_side_validation && register_card.nil? fail ArgumentError, "Missing the required parameter 'register_card' when calling CardHolderAccountApi.account_card_register_request" end # resource path local_var_path = '/account/{accountid}/register'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(register_card) # return_type return_type = opts[:return_type] || 'CardHolderAccount' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#account_card_register_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Card
Status Updates the status of a card for processing. The following values are available | Status | Description | |——–|————-| | Active | The card is active for processing and can be used for charging against with a valid token | | Inactive | The card is inactive for processing and cannot be used for processing, it will require reactivation before being used to charge | | Expired | The card has expired either due to the expiry date no longer being valid or due to a replacement card being issued | @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param card_id [String] The id of the card that is presented by a call to retrieve a card holder account. @param card_status [CardStatus] @param [Hash] opts the optional parameters @return [Acknowledgement]
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 166 def account_card_status_request(accountid, card_id, card_status, opts = {}) data, _status_code, _headers = account_card_status_request_with_http_info(accountid, card_id, card_status, opts) data end
Card
Status Updates the status of a card for processing. The following values are available | Status | Description | |——–|————-| | Active | The card is active for processing and can be used for charging against with a valid token | | Inactive | The card is inactive for processing and cannot be used for processing, it will require reactivation before being used to charge | | Expired | The card has expired either due to the expiry date no longer being valid or due to a replacement card being issued | @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param card_id [String] The id of the card that is presented by a call to retrieve a card holder account. @param card_status [CardStatus] @param [Hash] opts the optional parameters @return [Array<(Acknowledgement
, Integer, Hash)>] Acknowledgement
data, response status code and response headers
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 178 def account_card_status_request_with_http_info(accountid, card_id, card_status, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_card_status_request ...' end # verify the required parameter 'accountid' is set if @api_client.config.client_side_validation && accountid.nil? fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_card_status_request" end # verify the required parameter 'card_id' is set if @api_client.config.client_side_validation && card_id.nil? fail ArgumentError, "Missing the required parameter 'card_id' when calling CardHolderAccountApi.account_card_status_request" end # verify the required parameter 'card_status' is set if @api_client.config.client_side_validation && card_status.nil? fail ArgumentError, "Missing the required parameter 'card_status' when calling CardHolderAccountApi.account_card_status_request" end # resource path local_var_path = '/account/{accountid}/card/{cardId}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(card_status) # return_type return_type = opts[:return_type] || 'Acknowledgement' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#account_card_status_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Contact Details Update Allows for the ability to change the contact details for an account. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param contact_details [ContactDetails] @param [Hash] opts the optional parameters @return [CardHolderAccount]
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 241 def account_change_contact_request(accountid, contact_details, opts = {}) data, _status_code, _headers = account_change_contact_request_with_http_info(accountid, contact_details, opts) data end
Contact Details Update Allows for the ability to change the contact details for an account. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param contact_details [ContactDetails] @param [Hash] opts the optional parameters @return [Array<(CardHolderAccount
, Integer, Hash)>] CardHolderAccount
data, response status code and response headers
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 252 def account_change_contact_request_with_http_info(accountid, contact_details, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_change_contact_request ...' end # verify the required parameter 'accountid' is set if @api_client.config.client_side_validation && accountid.nil? fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_change_contact_request" end # verify the required parameter 'contact_details' is set if @api_client.config.client_side_validation && contact_details.nil? fail ArgumentError, "Missing the required parameter 'contact_details' when calling CardHolderAccountApi.account_change_contact_request" end # resource path local_var_path = '/account/{accountid}/contact'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(contact_details) # return_type return_type = opts[:return_type] || 'CardHolderAccount' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#account_change_contact_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Account Create Creates a new card holder account and initialises the account ready for adding cards. @param account_create
[AccountCreate] @param [Hash] opts the optional parameters @return [CardHolderAccount]
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 310 def account_create(account_create, opts = {}) data, _status_code, _headers = account_create_with_http_info(account_create, opts) data end
Account Create Creates a new card holder account and initialises the account ready for adding cards. @param account_create
[AccountCreate] @param [Hash] opts the optional parameters @return [Array<(CardHolderAccount
, Integer, Hash)>] CardHolderAccount
data, response status code and response headers
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 320 def account_create_with_http_info(account_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_create ...' end # verify the required parameter 'account_create' is set if @api_client.config.client_side_validation && account_create.nil? fail ArgumentError, "Missing the required parameter 'account_create' when calling CardHolderAccountApi.account_create" end # resource path local_var_path = '/account/create' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(account_create) # return_type return_type = opts[:return_type] || 'CardHolderAccount' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#account_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Account Deletion Allows for the deletion of an account. The account will marked for deletion and subsequent purging. No further transactions will be alowed to be processed or actioned against this account. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param [Hash] opts the optional parameters @return [Acknowledgement]
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 374 def account_delete_request(accountid, opts = {}) data, _status_code, _headers = account_delete_request_with_http_info(accountid, opts) data end
Account Deletion Allows for the deletion of an account. The account will marked for deletion and subsequent purging. No further transactions will be alowed to be processed or actioned against this account. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param [Hash] opts the optional parameters @return [Array<(Acknowledgement
, Integer, Hash)>] Acknowledgement
data, response status code and response headers
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 384 def account_delete_request_with_http_info(accountid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_delete_request ...' end # verify the required parameter 'accountid' is set if @api_client.config.client_side_validation && accountid.nil? fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_delete_request" end # resource path local_var_path = '/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Acknowledgement' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#account_delete_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Account Retrieval Allows for the retrieval of a card holder account for the given `id`. Should duplicate accounts exist for the same `id`, the first account created with that `id` will be returned. The account can be used for tokenisation processing by listing all cards assigned to the account. The returned cards will include all `active`, `inactive` and `expired` cards. This can be used to enable a card holder to view their wallet and make constructive choices on which card to use. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param [Hash] opts the optional parameters @return [CardHolderAccount]
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 436 def account_retrieve_request(accountid, opts = {}) data, _status_code, _headers = account_retrieve_request_with_http_info(accountid, opts) data end
Account Retrieval Allows for the retrieval of a card holder account for the given `id`. Should duplicate accounts exist for the same `id`, the first account created with that `id` will be returned. The account can be used for tokenisation processing by listing all cards assigned to the account. The returned cards will include all `active`, `inactive` and `expired` cards. This can be used to enable a card holder to view their wallet and make constructive choices on which card to use. @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param [Hash] opts the optional parameters @return [Array<(CardHolderAccount
, Integer, Hash)>] CardHolderAccount
data, response status code and response headers
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 446 def account_retrieve_request_with_http_info(accountid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_retrieve_request ...' end # verify the required parameter 'accountid' is set if @api_client.config.client_side_validation && accountid.nil? fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_retrieve_request" end # resource path local_var_path = '/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CardHolderAccount' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#account_retrieve_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Account Status Updates the status of an account. An account can have the following statuses applied | Status | Description | |——–|————-| | Active | The account is active for processing | | Disabled | The account has been disabled and cannot be used for processing. The account will require reactivation to continue procesing | @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param account_status [AccountStatus] @param [Hash] opts the optional parameters @return [Acknowledgement]
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 499 def account_status_request(accountid, account_status, opts = {}) data, _status_code, _headers = account_status_request_with_http_info(accountid, account_status, opts) data end
Account Status Updates the status of an account. An account can have the following statuses applied | Status | Description | |——–|————-| | Active | The account is active for processing | | Disabled | The account has been disabled and cannot be used for processing. The account will require reactivation to continue procesing | @param accountid [String] The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. @param account_status [AccountStatus] @param [Hash] opts the optional parameters @return [Array<(Acknowledgement
, Integer, Hash)>] Acknowledgement
data, response status code and response headers
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 510 def account_status_request_with_http_info(accountid, account_status, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_status_request ...' end # verify the required parameter 'accountid' is set if @api_client.config.client_side_validation && accountid.nil? fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_status_request" end # verify the required parameter 'account_status' is set if @api_client.config.client_side_validation && account_status.nil? fail ArgumentError, "Missing the required parameter 'account_status' when calling CardHolderAccountApi.account_status_request" end # resource path local_var_path = '/account/{accountid}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(account_status) # return_type return_type = opts[:return_type] || 'Acknowledgement' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#account_status_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Charge A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account. A card must previously be registered by calling `/account-register-card` with the card details or retrieved using `/account-retrieve` Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage. @param charge_request
[ChargeRequest] @param [Hash] opts the optional parameters @return [Decision]
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 568 def charge_request(charge_request, opts = {}) data, _status_code, _headers = charge_request_with_http_info(charge_request, opts) data end
Charge A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account. A card must previously be registered by calling `/account-register-card` with the card details or retrieved using `/account-retrieve` Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage. @param charge_request
[ChargeRequest] @param [Hash] opts the optional parameters @return [Array<(Decision
, Integer, Hash)>] Decision
data, response status code and response headers
# File lib/citypay_api_client/api/card_holder_account_api.rb, line 578 def charge_request_with_http_info(charge_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.charge_request ...' end # verify the required parameter 'charge_request' is set if @api_client.config.client_side_validation && charge_request.nil? fail ArgumentError, "Missing the required parameter 'charge_request' when calling CardHolderAccountApi.charge_request" end # resource path local_var_path = '/charge' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(charge_request) # return_type return_type = opts[:return_type] || 'Decision' # auth_names auth_names = opts[:auth_names] || ['cp-api-key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#charge_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end