Class: CityPayApiClient::CardHolderAccountApi
- Inherits:
-
Object
- Object
- CityPayApiClient::CardHolderAccountApi
- Defined in:
- lib/citypay_api_client/api/card_holder_account_api__.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#account_card_delete_request(accountid, card_id, opts = {}) ⇒ Acknowledgement
Card Deletion Deletes a card from the account.
-
#account_card_delete_request_with_http_info(accountid, card_id, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Card Deletion Deletes a card from the account.
-
#account_card_register_request(accountid, register_card, opts = {}) ⇒ CardHolderAccount
Card Registration Allows for a card to be registered for the account.
-
#account_card_register_request_with_http_info(accountid, register_card, opts = {}) ⇒ Array<(CardHolderAccount, Integer, Hash)>
Card Registration Allows for a card to be registered for the account.
-
#account_card_status_request(accountid, card_id, card_status, opts = {}) ⇒ Acknowledgement
Card Status Updates the status of a card for processing.
-
#account_card_status_request_with_http_info(accountid, card_id, card_status, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Card Status Updates the status of a card for processing.
-
#account_change_contact_request(accountid, contact_details, opts = {}) ⇒ CardHolderAccount
Contact Details Update Allows for the ability to change the contact details for an account.
-
#account_change_contact_request_with_http_info(accountid, contact_details, opts = {}) ⇒ Array<(CardHolderAccount, Integer, Hash)>
Contact Details Update Allows for the ability to change the contact details for an account.
-
#account_create(account_create, opts = {}) ⇒ CardHolderAccount
Account Create Creates a new card holder account and initialises the account ready for adding cards.
-
#account_create_with_http_info(account_create, opts = {}) ⇒ Array<(CardHolderAccount, Integer, Hash)>
Account Create Creates a new card holder account and initialises the account ready for adding cards.
-
#account_delete_request(accountid, opts = {}) ⇒ Acknowledgement
Account Deletion Allows for the deletion of an account.
-
#account_delete_request_with_http_info(accountid, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Account Deletion Allows for the deletion of an account.
-
#account_exists_request(accountid, opts = {}) ⇒ Exists
Account Exists Checks that an account exists and is active by providing the account id as a url parameter.
-
#account_exists_request_with_http_info(accountid, opts = {}) ⇒ Array<(Exists, Integer, Hash)>
Account Exists Checks that an account exists and is active by providing the account id as a url parameter.
-
#account_retrieve_request(accountid, opts = {}) ⇒ CardHolderAccount
Account Retrieval Allows for the retrieval of a card holder account for the given ‘id`.
-
#account_retrieve_request_with_http_info(accountid, opts = {}) ⇒ Array<(CardHolderAccount, Integer, Hash)>
Account Retrieval Allows for the retrieval of a card holder account for the given `id`.
-
#account_status_request(accountid, account_status, opts = {}) ⇒ Acknowledgement
Account Status Updates the status of an account.
-
#account_status_request_with_http_info(accountid, account_status, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Account Status Updates the status of an account.
-
#charge_request(charge_request, opts = {}) ⇒ Decision
Charge A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account.
-
#charge_request_with_http_info(charge_request, opts = {}) ⇒ Array<(Decision, Integer, Hash)>
Charge A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account.
-
#initialize(api_client = ApiClient.default) ⇒ CardHolderAccountApi
constructor
A new instance of CardHolderAccountApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CardHolderAccountApi
Returns a new instance of CardHolderAccountApi.
18 19 20 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 16 def api_client @api_client end |
Instance Method Details
#account_card_delete_request(accountid, card_id, opts = {}) ⇒ Acknowledgement
Card Deletion Deletes a card from the account. The card will be marked for deletion before a subsequent purge will clear the card permanently.
28 29 30 31 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 28 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 |
#account_card_delete_request_with_http_info(accountid, card_id, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
Card Deletion Deletes a card from the account. The card will be marked for deletion before a subsequent purge will clear the card permanently.
40 41 42 43 44 45 46 47 48 49 50 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 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 40 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 = '/v6/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] || {} query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil? # 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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Acknowledgement' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.account_card_delete_request", :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, ) 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 |
#account_card_register_request(accountid, register_card, opts = {}) ⇒ CardHolderAccount
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.
99 100 101 102 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 99 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 |
#account_card_register_request_with_http_info(accountid, register_card, opts = {}) ⇒ Array<(CardHolderAccount, Integer, Hash)>
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.
110 111 112 113 114 115 116 117 118 119 120 121 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 164 165 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 110 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 = '/v6/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' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(register_card) # return_type return_type = opts[:debug_return_type] || 'CardHolderAccount' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.account_card_register_request", :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, ) 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 |
#account_card_status_request(accountid, card_id, card_status, opts = {}) ⇒ Acknowledgement
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 |
174 175 176 177 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 174 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 |
#account_card_status_request_with_http_info(accountid, card_id, card_status, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
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 |
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 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 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 186 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 = '/v6/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' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(card_status) # return_type return_type = opts[:debug_return_type] || 'Acknowledgement' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.account_card_status_request", :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, ) 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 |
#account_change_contact_request(accountid, contact_details, opts = {}) ⇒ CardHolderAccount
Contact Details Update Allows for the ability to change the contact details for an account.
253 254 255 256 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 253 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 |
#account_change_contact_request_with_http_info(accountid, contact_details, opts = {}) ⇒ Array<(CardHolderAccount, Integer, Hash)>
Contact Details Update Allows for the ability to change the contact details for an account.
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 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 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 264 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 = '/v6/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' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(contact_details) # return_type return_type = opts[:debug_return_type] || 'CardHolderAccount' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.account_change_contact_request", :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, ) 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(account_create, opts = {}) ⇒ CardHolderAccount
Account Create Creates a new card holder account and initialises the account ready for adding cards.
326 327 328 329 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 326 def account_create(account_create, opts = {}) data, _status_code, _headers = account_create_with_http_info(account_create, opts) data end |
#account_create_with_http_info(account_create, opts = {}) ⇒ Array<(CardHolderAccount, Integer, Hash)>
Account Create Creates a new card holder account and initialises the account ready for adding cards.
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 336 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 = '/v6/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' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(account_create) # return_type return_type = opts[:debug_return_type] || 'CardHolderAccount' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.account_create", :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, ) 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_delete_request(accountid, opts = {}) ⇒ Acknowledgement
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.
394 395 396 397 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 394 def account_delete_request(accountid, opts = {}) data, _status_code, _headers = account_delete_request_with_http_info(accountid, opts) data end |
#account_delete_request_with_http_info(accountid, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
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.
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 404 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 = '/v6/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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Acknowledgement' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.account_delete_request", :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, ) 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_exists_request(accountid, opts = {}) ⇒ Exists
Account Exists Checks that an account exists and is active by providing the account id as a url parameter.
457 458 459 460 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 457 def account_exists_request(accountid, opts = {}) data, _status_code, _headers = account_exists_request_with_http_info(accountid, opts) data end |
#account_exists_request_with_http_info(accountid, opts = {}) ⇒ Array<(Exists, Integer, Hash)>
Account Exists Checks that an account exists and is active by providing the account id as a url parameter.
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 467 def account_exists_request_with_http_info(accountid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_exists_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_exists_request" end # resource path local_var_path = '/v6/account-exists/{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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Exists' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.account_exists_request", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardHolderAccountApi#account_exists_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#account_retrieve_request(accountid, opts = {}) ⇒ CardHolderAccount
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.
520 521 522 523 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 520 def account_retrieve_request(accountid, opts = {}) data, _status_code, _headers = account_retrieve_request_with_http_info(accountid, opts) data end |
#account_retrieve_request_with_http_info(accountid, opts = {}) ⇒ Array<(CardHolderAccount, Integer, Hash)>
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.
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 530 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 = '/v6/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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CardHolderAccount' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.account_retrieve_request", :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, ) 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_request(accountid, account_status, opts = {}) ⇒ Acknowledgement
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 |
584 585 586 587 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 584 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_request_with_http_info(accountid, account_status, opts = {}) ⇒ Array<(Acknowledgement, Integer, Hash)>
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 |
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 595 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 = '/v6/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' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(account_status) # return_type return_type = opts[:debug_return_type] || 'Acknowledgement' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.account_status_request", :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, ) 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_request(charge_request, opts = {}) ⇒ Decision
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 _Should an account be used with 3DSv2, the card holder name should also be stored alongside the card as this is a required field with both Visa and MasterCard for risk analysis._.
657 658 659 660 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 657 def charge_request(charge_request, opts = {}) data, _status_code, _headers = charge_request_with_http_info(charge_request, opts) data end |
#charge_request_with_http_info(charge_request, opts = {}) ⇒ Array<(Decision, Integer, Hash)>
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 _Should an account be used with 3DSv2, the card holder name should also be stored alongside the card as this is a required field with both Visa and MasterCard for risk analysis._.
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 |
# File 'lib/citypay_api_client/api/card_holder_account_api__.rb', line 667 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 = '/v6/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' content_type = @api_client.select_header_content_type(['application/json', 'text/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(charge_request) # return_type return_type = opts[:debug_return_type] || 'Decision' # auth_names auth_names = opts[:debug_auth_names] || ['cp-api-key'] = opts.merge( :operation => :"CardHolderAccountApi.charge_request", :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, ) 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 |