citypay_api_client 1.0.3 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +111 -39
- data/citypay_api_client.gemspec +5 -5
- data/docs/AccountCreate.md +10 -9
- data/docs/AccountStatus.md +8 -7
- data/docs/Acknowledgement.md +14 -13
- data/docs/AclCheckRequest.md +18 -0
- data/docs/AclCheckResponseModel.md +24 -0
- data/docs/AirlineAdvice.md +38 -37
- data/docs/AirlineSegment.md +22 -21
- data/docs/AuthReference.md +34 -33
- data/docs/AuthReferences.md +8 -7
- data/docs/AuthRequest.md +52 -49
- data/docs/AuthResponse.md +64 -59
- data/docs/AuthenRequired.md +12 -11
- data/docs/AuthorisationAndPaymentApi.md +850 -0
- data/docs/Batch.md +22 -0
- data/docs/BatchProcessingApi.md +218 -0
- data/docs/BatchReportRequest.md +20 -0
- data/docs/BatchReportResponseModel.md +28 -0
- data/docs/BatchTransaction.md +24 -0
- data/docs/BatchTransactionResultModel.md +44 -0
- data/docs/Bin.md +34 -0
- data/docs/BinLookup.md +18 -0
- data/docs/CResAuthRequest.md +8 -7
- data/docs/CaptureRequest.md +18 -17
- data/docs/Card.md +46 -41
- data/docs/CardHolderAccount.md +24 -21
- data/docs/CardHolderAccountApi.md +387 -111
- data/docs/CardStatus.md +10 -9
- data/docs/ChargeRequest.md +38 -31
- data/docs/CheckBatchStatus.md +20 -0
- data/docs/CheckBatchStatusResponse.md +18 -0
- data/docs/ContactDetails.md +32 -31
- data/docs/Decision.md +12 -11
- data/docs/DirectPostApi.md +389 -0
- data/docs/DirectPostRequest.md +60 -0
- data/docs/DirectTokenAuthRequest.md +24 -0
- data/docs/DomainKeyCheckRequest.md +18 -0
- data/docs/DomainKeyRequest.md +22 -0
- data/docs/DomainKeyResponse.md +26 -0
- data/docs/Error.md +16 -13
- data/docs/EventDataModel.md +26 -0
- data/docs/Exists.md +22 -0
- data/docs/ExternalMPI.md +16 -15
- data/docs/ListMerchantsResponse.md +12 -11
- data/docs/MCC6012.md +14 -13
- data/docs/Merchant.md +16 -15
- data/docs/OperationalFunctionsApi.md +375 -0
- data/docs/PaResAuthRequest.md +10 -9
- data/docs/PaylinkAddress.md +30 -0
- data/docs/PaylinkAdjustmentRequest.md +22 -0
- data/docs/PaylinkApi.md +806 -0
- data/docs/PaylinkAttachmentRequest.md +26 -0
- data/docs/PaylinkAttachmentResult.md +22 -0
- data/docs/PaylinkBillPaymentTokenRequest.md +32 -0
- data/docs/PaylinkCardHolder.md +36 -0
- data/docs/PaylinkCart.md +30 -0
- data/docs/PaylinkCartItemModel.md +32 -0
- data/docs/PaylinkConfig.md +60 -0
- data/docs/PaylinkCustomParam.md +38 -0
- data/docs/PaylinkEmailNotificationPath.md +26 -0
- data/docs/PaylinkErrorCode.md +20 -0
- data/docs/PaylinkFieldGuardModel.md +30 -0
- data/docs/PaylinkPartPayments.md +28 -0
- data/docs/PaylinkSMSNotificationPath.md +20 -0
- data/docs/PaylinkStateEvent.md +22 -0
- data/docs/PaylinkTokenCreated.md +44 -0
- data/docs/PaylinkTokenRequestModel.md +42 -0
- data/docs/PaylinkTokenStatus.md +72 -0
- data/docs/PaylinkTokenStatusChangeRequest.md +26 -0
- data/docs/PaylinkTokenStatusChangeResponse.md +20 -0
- data/docs/PaylinkUI.md +24 -0
- data/docs/Ping.md +8 -7
- data/docs/ProcessBatchRequest.md +24 -0
- data/docs/ProcessBatchResponse.md +20 -0
- data/docs/RefundRequest.md +26 -0
- data/docs/RegisterCard.md +16 -13
- data/docs/RequestChallenged.md +16 -15
- data/docs/RetrieveRequest.md +12 -11
- data/docs/ThreeDSecure.md +32 -15
- data/docs/TokenisationResponseModel.md +36 -0
- data/docs/VoidRequest.md +12 -13
- data/docs/images/3dsv1-challenge.png +0 -0
- data/docs/images/3dsv2-challenge.png +0 -0
- data/docs/images/3dsv2-frictionless.png +0 -0
- data/docs/images/3dsv2-method-challenge.png +0 -0
- data/docs/images/3dsv2-method-frictionless.png +0 -0
- data/docs/images/3dsv2-no3d.png +0 -0
- data/docs/images/citypay-logo.svg +1 -0
- data/docs/images/direct-post-flow.png +0 -0
- data/docs/images/favicon.ico +0 -0
- data/docs/images/header.png +0 -0
- data/docs/images/logo.ai +1913 -4
- data/docs/images/logo.png +0 -0
- data/docs/images/logo.svg +1 -0
- data/docs/images/merchant-BPS-workflow.png +0 -0
- data/docs/images/paylink-field-guards.png +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +565 -0
- data/lib/citypay_api_client/api/batch_processing_api__.rb +225 -0
- data/lib/citypay_api_client/api/{card_holder_account_api.rb → card_holder_account_api__.rb} +136 -46
- data/lib/citypay_api_client/api/direct_post_api__.rb +373 -0
- data/lib/citypay_api_client/api/operational_functions_api__.rb +356 -0
- data/lib/citypay_api_client/api/paylink_api__.rb +614 -0
- data/lib/citypay_api_client/api_client.rb +72 -70
- data/lib/citypay_api_client/api_error.rb +3 -2
- data/lib/citypay_api_client/configuration.rb +74 -17
- data/lib/citypay_api_client/models/account_create.rb +33 -23
- data/lib/citypay_api_client/models/account_status.rb +31 -23
- data/lib/citypay_api_client/models/acknowledgement.rb +43 -27
- data/lib/citypay_api_client/models/acl_check_request.rb +221 -0
- data/lib/citypay_api_client/models/acl_check_response_model.rb +244 -0
- data/lib/citypay_api_client/models/airline_advice.rb +63 -34
- data/lib/citypay_api_client/models/airline_segment.rb +51 -25
- data/lib/citypay_api_client/models/auth_reference.rb +80 -31
- data/lib/citypay_api_client/models/auth_references.rb +31 -23
- data/lib/citypay_api_client/models/auth_request.rb +137 -56
- data/lib/citypay_api_client/models/auth_response.rb +83 -123
- data/lib/citypay_api_client/models/authen_required.rb +31 -23
- data/lib/citypay_api_client/models/batch.rb +267 -0
- data/lib/citypay_api_client/models/batch_report_request.rb +278 -0
- data/lib/citypay_api_client/models/batch_report_response_model.rb +364 -0
- data/lib/citypay_api_client/models/batch_transaction.rb +324 -0
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +452 -0
- data/lib/citypay_api_client/models/bin.rb +294 -0
- data/lib/citypay_api_client/models/bin_lookup.rb +231 -0
- data/lib/citypay_api_client/models/c_res_auth_request.rb +31 -23
- data/lib/citypay_api_client/models/capture_request.rb +59 -38
- data/lib/citypay_api_client/models/card.rb +93 -29
- data/lib/citypay_api_client/models/card_holder_account.rb +49 -27
- data/lib/citypay_api_client/models/card_status.rb +31 -23
- data/lib/citypay_api_client/models/charge_request.rb +154 -47
- data/lib/citypay_api_client/models/check_batch_status.rb +260 -0
- data/lib/citypay_api_client/models/check_batch_status_response.rb +215 -0
- data/lib/citypay_api_client/models/contact_details.rb +130 -52
- data/lib/citypay_api_client/models/decision.rb +31 -23
- data/lib/citypay_api_client/models/direct_post_request.rb +707 -0
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +244 -0
- data/lib/citypay_api_client/models/domain_key_check_request.rb +249 -0
- data/lib/citypay_api_client/models/domain_key_request.rb +249 -0
- data/lib/citypay_api_client/models/domain_key_response.rb +297 -0
- data/lib/citypay_api_client/models/error.rb +57 -31
- data/lib/citypay_api_client/models/event_data_model.rb +254 -0
- data/lib/citypay_api_client/models/exists.rb +241 -0
- data/lib/citypay_api_client/models/external_mpi.rb +61 -27
- data/lib/citypay_api_client/models/list_merchants_response.rb +37 -25
- data/lib/citypay_api_client/models/mcc6012.rb +31 -23
- data/lib/citypay_api_client/models/merchant.rb +31 -23
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +36 -24
- data/lib/citypay_api_client/models/paylink_address.rb +425 -0
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +272 -0
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +268 -0
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +248 -0
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +289 -0
- data/lib/citypay_api_client/models/paylink_card_holder.rb +360 -0
- data/lib/citypay_api_client/models/paylink_cart.rb +275 -0
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +284 -0
- data/lib/citypay_api_client/models/paylink_config.rb +428 -0
- data/lib/citypay_api_client/models/paylink_custom_param.rb +321 -0
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +265 -0
- data/lib/citypay_api_client/models/paylink_error_code.rb +238 -0
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +274 -0
- data/lib/citypay_api_client/models/paylink_part_payments.rb +264 -0
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +231 -0
- data/lib/citypay_api_client/models/paylink_state_event.rb +234 -0
- data/lib/citypay_api_client/models/paylink_token_created.rb +365 -0
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +427 -0
- data/lib/citypay_api_client/models/paylink_token_status.rb +485 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +269 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +232 -0
- data/lib/citypay_api_client/models/paylink_ui.rb +244 -0
- data/lib/citypay_api_client/models/ping.rb +37 -25
- data/lib/citypay_api_client/models/process_batch_request.rb +313 -0
- data/lib/citypay_api_client/models/process_batch_response.rb +231 -0
- data/lib/citypay_api_client/models/refund_request.rb +339 -0
- data/lib/citypay_api_client/models/register_card.rb +79 -27
- data/lib/citypay_api_client/models/request_challenged.rb +39 -31
- data/lib/citypay_api_client/models/retrieve_request.rb +39 -25
- data/lib/citypay_api_client/models/three_d_secure.rb +116 -28
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +332 -0
- data/lib/citypay_api_client/models/void_request.rb +39 -37
- data/lib/citypay_api_client/utils/digest_utils.rb +18 -0
- data/lib/citypay_api_client/utils/direct_post_mac.rb +22 -0
- data/lib/citypay_api_client/version.rb +3 -4
- data/lib/citypay_api_client.rb +53 -6
- data/spec/.DS_Store +0 -0
- data/spec/api/authorisation_and_payment_api___spec.rb +130 -0
- data/spec/api/batch_processing_api___spec.rb +70 -0
- data/spec/api/{card_holder_account_api_spec.rb → card_holder_account_api___spec.rb} +15 -3
- data/spec/api/direct_post_api___spec.rb +98 -0
- data/spec/api/operational_functions_api___spec.rb +94 -0
- data/spec/api/paylink_api___spec.rb +131 -0
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +5 -5
- data/spec/it_api_sandbox_spec.rb +117 -55
- data/spec/models/account_create_spec.rb +1 -2
- data/spec/models/account_status_spec.rb +2 -2
- data/spec/models/acknowledgement_spec.rb +7 -22
- data/spec/models/acl_check_request_spec.rb +33 -0
- data/spec/models/acl_check_response_model_spec.rb +51 -0
- data/spec/models/airline_advice_spec.rb +0 -2
- data/spec/models/airline_segment_spec.rb +0 -2
- data/spec/models/auth_references_spec.rb +7 -8
- data/spec/models/auth_request_spec.rb +0 -2
- data/spec/models/auth_response_spec.rb +77 -33
- data/spec/models/batch_report_request_spec.rb +37 -0
- data/spec/models/batch_report_response_model_spec.rb +61 -0
- data/spec/models/batch_spec.rb +43 -0
- data/spec/models/batch_transaction_result_model_spec.rb +85 -0
- data/spec/models/batch_transaction_spec.rb +49 -0
- data/spec/models/bin_lookup_spec.rb +31 -0
- data/spec/models/bin_spec.rb +81 -0
- data/spec/models/capture_request_spec.rb +0 -2
- data/spec/models/card_holder_account_spec.rb +8 -7
- data/spec/models/charge_request_spec.rb +0 -2
- data/spec/models/check_batch_status_response_spec.rb +45 -0
- data/spec/models/check_batch_status_spec.rb +39 -0
- data/spec/models/decision_spec.rb +1 -1
- data/spec/models/direct_post_request_spec.rb +151 -0
- data/spec/models/direct_token_auth_request_spec.rb +51 -0
- data/spec/models/domain_key_check_request_spec.rb +31 -0
- data/spec/models/domain_key_request_spec.rb +45 -0
- data/spec/models/domain_key_response_spec.rb +57 -0
- data/spec/models/event_data_model_spec.rb +57 -0
- data/spec/{api/operational_api_spec.rb → models/exists_spec.rb} +14 -20
- data/spec/models/list_merchants_response_spec.rb +2 -2
- data/spec/models/paylink_address_spec.rb +69 -0
- data/spec/models/paylink_adjustment_request_spec.rb +45 -0
- data/spec/models/paylink_attachment_request_spec.rb +45 -0
- data/spec/models/paylink_attachment_result_spec.rb +45 -0
- data/spec/models/paylink_bill_payment_token_request_spec.rb +63 -0
- data/spec/models/paylink_card_holder_spec.rb +87 -0
- data/spec/models/paylink_cart_item_model_spec.rb +75 -0
- data/spec/models/paylink_cart_spec.rb +69 -0
- data/spec/models/paylink_config_spec.rb +159 -0
- data/spec/models/paylink_custom_param_spec.rb +87 -0
- data/spec/models/paylink_email_notification_path_spec.rb +57 -0
- data/spec/models/paylink_error_code_spec.rb +39 -0
- data/spec/models/paylink_field_guard_model_spec.rb +45 -0
- data/spec/models/paylink_part_payments_spec.rb +63 -0
- data/spec/models/paylink_sms_notification_path_spec.rb +39 -0
- data/spec/models/paylink_state_event_spec.rb +45 -0
- data/spec/models/paylink_token_created_spec.rb +111 -0
- data/spec/models/paylink_token_request_model_spec.rb +91 -0
- data/spec/models/paylink_token_status_change_request_spec.rb +57 -0
- data/spec/models/paylink_token_status_change_response_spec.rb +39 -0
- data/spec/models/paylink_token_status_spec.rb +195 -0
- data/spec/models/paylink_ui_spec.rb +51 -0
- data/spec/models/process_batch_request_spec.rb +49 -0
- data/spec/models/process_batch_response_spec.rb +39 -0
- data/spec/models/refund_request_spec.rb +62 -0
- data/spec/models/register_card_spec.rb +0 -2
- data/spec/models/tokenisation_response_model_spec.rb +87 -0
- data/spec/spec_helper.rb +2 -2
- data/spec/utils/direct_post_mac_spec.rb +13 -0
- metadata +230 -44
- data/Gemfile.lock +0 -70
- data/docs/OperationalApi.md +0 -112
- data/docs/PaymentProcessingApi.md +0 -320
- data/git_push.sh +0 -58
- data/lib/citypay_api_client/api/operational_api.rb +0 -147
- data/lib/citypay_api_client/api/payment_processing_api.rb +0 -405
- data/lib/citypay_api_client/test.rb +0 -20
- data/spec/api/payment_processing_api_spec.rb +0 -106
@@ -1,33 +1,35 @@
|
|
1
1
|
# CityPayApiClient::CardHolderAccountApi
|
2
2
|
|
3
|
-
All URIs are relative to *https://api.citypay.com
|
4
|
-
|
5
|
-
Method | HTTP request | Description
|
6
|
-
|
7
|
-
[**account_card_delete_request**](CardHolderAccountApi.md#account_card_delete_request) | **DELETE** /account/{accountid}/card/{cardId} | Card Deletion
|
8
|
-
[**account_card_register_request**](CardHolderAccountApi.md#account_card_register_request) | **POST** /account/{accountid}/register | Card Registration
|
9
|
-
[**account_card_status_request**](CardHolderAccountApi.md#account_card_status_request) | **POST** /account/{accountid}/card/{cardId}/status | Card Status
|
10
|
-
[**account_change_contact_request**](CardHolderAccountApi.md#account_change_contact_request) | **POST** /account/{accountid}/contact | Contact Details Update
|
11
|
-
[**account_create**](CardHolderAccountApi.md#account_create) | **POST** /account/create | Account Create
|
12
|
-
[**account_delete_request**](CardHolderAccountApi.md#account_delete_request) | **DELETE** /account/{accountid} | Account Deletion
|
13
|
-
[**
|
14
|
-
[**
|
15
|
-
[**
|
16
|
-
|
3
|
+
All URIs are relative to *https://api.citypay.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**account_card_delete_request**](CardHolderAccountApi.md#account_card_delete_request) | **DELETE** /v6/account/{accountid}/card/{cardId} | Card Deletion |
|
8
|
+
| [**account_card_register_request**](CardHolderAccountApi.md#account_card_register_request) | **POST** /v6/account/{accountid}/register | Card Registration |
|
9
|
+
| [**account_card_status_request**](CardHolderAccountApi.md#account_card_status_request) | **POST** /v6/account/{accountid}/card/{cardId}/status | Card Status |
|
10
|
+
| [**account_change_contact_request**](CardHolderAccountApi.md#account_change_contact_request) | **POST** /v6/account/{accountid}/contact | Contact Details Update |
|
11
|
+
| [**account_create**](CardHolderAccountApi.md#account_create) | **POST** /v6/account/create | Account Create |
|
12
|
+
| [**account_delete_request**](CardHolderAccountApi.md#account_delete_request) | **DELETE** /v6/account/{accountid} | Account Deletion |
|
13
|
+
| [**account_exists_request**](CardHolderAccountApi.md#account_exists_request) | **GET** /v6/account-exists/{accountid} | Account Exists |
|
14
|
+
| [**account_retrieve_request**](CardHolderAccountApi.md#account_retrieve_request) | **GET** /v6/account/{accountid} | Account Retrieval |
|
15
|
+
| [**account_status_request**](CardHolderAccountApi.md#account_status_request) | **POST** /v6/account/{accountid}/status | Account Status |
|
16
|
+
| [**charge_request**](CardHolderAccountApi.md#charge_request) | **POST** /v6/charge | Charge |
|
17
17
|
|
18
18
|
|
19
19
|
## account_card_delete_request
|
20
20
|
|
21
|
-
> Acknowledgement account_card_delete_request(accountid, card_id)
|
21
|
+
> <Acknowledgement> account_card_delete_request(accountid, card_id)
|
22
22
|
|
23
23
|
Card Deletion
|
24
24
|
|
25
|
-
Deletes a card from the account. The card will be marked for deletion before a subsequent
|
25
|
+
Deletes a card from the account. The card will be marked for deletion before a subsequent
|
26
|
+
purge will clear the card permanently.
|
27
|
+
|
26
28
|
|
27
|
-
###
|
29
|
+
### Examples
|
28
30
|
|
29
31
|
```ruby
|
30
|
-
|
32
|
+
require 'time'
|
31
33
|
require 'citypay_api_client'
|
32
34
|
# setup authorization
|
33
35
|
CityPayApiClient.configure do |config|
|
@@ -39,21 +41,38 @@ accountid = 'accountid_example' # String | The account id that refers to the cus
|
|
39
41
|
card_id = 'card_id_example' # String | The id of the card that is presented by a call to retrieve a card holder account.
|
40
42
|
|
41
43
|
begin
|
42
|
-
#Card Deletion
|
44
|
+
# Card Deletion
|
43
45
|
result = api_instance.account_card_delete_request(accountid, card_id)
|
44
46
|
p result
|
45
47
|
rescue CityPayApiClient::ApiError => e
|
46
|
-
puts "
|
48
|
+
puts "Error when calling CardHolderAccountApi->account_card_delete_request: #{e}"
|
47
49
|
end
|
48
50
|
```
|
49
51
|
|
50
|
-
|
52
|
+
#### Using the account_card_delete_request_with_http_info variant
|
53
|
+
|
54
|
+
This returns an Array which contains the response data, status code and headers.
|
55
|
+
|
56
|
+
> <Array(<Acknowledgement>, Integer, Hash)> account_card_delete_request_with_http_info(accountid, card_id)
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
begin
|
60
|
+
# Card Deletion
|
61
|
+
data, status_code, headers = api_instance.account_card_delete_request_with_http_info(accountid, card_id)
|
62
|
+
p status_code # => 2xx
|
63
|
+
p headers # => { ... }
|
64
|
+
p data # => <Acknowledgement>
|
65
|
+
rescue CityPayApiClient::ApiError => e
|
66
|
+
puts "Error when calling CardHolderAccountApi->account_card_delete_request_with_http_info: #{e}"
|
67
|
+
end
|
68
|
+
```
|
51
69
|
|
70
|
+
### Parameters
|
52
71
|
|
53
|
-
Name | Type | Description
|
54
|
-
|
55
|
-
**accountid** | **String
|
56
|
-
**card_id** | **String
|
72
|
+
| Name | Type | Description | Notes |
|
73
|
+
| ---- | ---- | ----------- | ----- |
|
74
|
+
| **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. | |
|
75
|
+
| **card_id** | **String** | The id of the card that is presented by a call to retrieve a card holder account. | |
|
57
76
|
|
58
77
|
### Return type
|
59
78
|
|
@@ -71,16 +90,24 @@ Name | Type | Description | Notes
|
|
71
90
|
|
72
91
|
## account_card_register_request
|
73
92
|
|
74
|
-
> CardHolderAccount account_card_register_request(accountid, register_card)
|
93
|
+
> <CardHolderAccount> account_card_register_request(accountid, register_card)
|
75
94
|
|
76
95
|
Card Registration
|
77
96
|
|
78
|
-
Allows for a card to be registered for the account. The card will be added for future
|
97
|
+
Allows for a card to be registered for the account. The card will be added for future
|
98
|
+
processing and will be available as a tokenised value for future processing.
|
99
|
+
|
100
|
+
The card will be validated for
|
101
|
+
|
102
|
+
0. Being a valid card number (luhn check)
|
103
|
+
0. Having a valid expiry date
|
104
|
+
0. Being a valid bin value.
|
79
105
|
|
80
|
-
|
106
|
+
|
107
|
+
### Examples
|
81
108
|
|
82
109
|
```ruby
|
83
|
-
|
110
|
+
require 'time'
|
84
111
|
require 'citypay_api_client'
|
85
112
|
# setup authorization
|
86
113
|
CityPayApiClient.configure do |config|
|
@@ -89,24 +116,41 @@ end
|
|
89
116
|
|
90
117
|
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
91
118
|
accountid = 'accountid_example' # 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.
|
92
|
-
register_card = CityPayApiClient::RegisterCard.new # RegisterCard |
|
119
|
+
register_card = CityPayApiClient::RegisterCard.new({cardnumber: '4000 0000 0000 0002', expmonth: 9, expyear: 2027}) # RegisterCard |
|
93
120
|
|
94
121
|
begin
|
95
|
-
#Card Registration
|
122
|
+
# Card Registration
|
96
123
|
result = api_instance.account_card_register_request(accountid, register_card)
|
97
124
|
p result
|
98
125
|
rescue CityPayApiClient::ApiError => e
|
99
|
-
puts "
|
126
|
+
puts "Error when calling CardHolderAccountApi->account_card_register_request: #{e}"
|
100
127
|
end
|
101
128
|
```
|
102
129
|
|
103
|
-
|
130
|
+
#### Using the account_card_register_request_with_http_info variant
|
104
131
|
|
132
|
+
This returns an Array which contains the response data, status code and headers.
|
105
133
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
134
|
+
> <Array(<CardHolderAccount>, Integer, Hash)> account_card_register_request_with_http_info(accountid, register_card)
|
135
|
+
|
136
|
+
```ruby
|
137
|
+
begin
|
138
|
+
# Card Registration
|
139
|
+
data, status_code, headers = api_instance.account_card_register_request_with_http_info(accountid, register_card)
|
140
|
+
p status_code # => 2xx
|
141
|
+
p headers # => { ... }
|
142
|
+
p data # => <CardHolderAccount>
|
143
|
+
rescue CityPayApiClient::ApiError => e
|
144
|
+
puts "Error when calling CardHolderAccountApi->account_card_register_request_with_http_info: #{e}"
|
145
|
+
end
|
146
|
+
```
|
147
|
+
|
148
|
+
### Parameters
|
149
|
+
|
150
|
+
| Name | Type | Description | Notes |
|
151
|
+
| ---- | ---- | ----------- | ----- |
|
152
|
+
| **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. | |
|
153
|
+
| **register_card** | [**RegisterCard**](RegisterCard.md) | | |
|
110
154
|
|
111
155
|
### Return type
|
112
156
|
|
@@ -124,16 +168,23 @@ Name | Type | Description | Notes
|
|
124
168
|
|
125
169
|
## account_card_status_request
|
126
170
|
|
127
|
-
> Acknowledgement account_card_status_request(accountid, card_id, card_status)
|
171
|
+
> <Acknowledgement> account_card_status_request(accountid, card_id, card_status)
|
128
172
|
|
129
173
|
Card Status
|
130
174
|
|
131
|
-
Updates the status of a card for processing. The following values are available
|
175
|
+
Updates the status of a card for processing. The following values are available
|
176
|
+
|
177
|
+
| Status | Description |
|
178
|
+
|--------|-------------|
|
179
|
+
| Active | The card is active for processing and can be used for charging against with a valid token |
|
180
|
+
| Inactive | The card is inactive for processing and cannot be used for processing, it will require reactivation before being used to charge |
|
181
|
+
| Expired | The card has expired either due to the expiry date no longer being valid or due to a replacement card being issued |
|
182
|
+
|
132
183
|
|
133
|
-
###
|
184
|
+
### Examples
|
134
185
|
|
135
186
|
```ruby
|
136
|
-
|
187
|
+
require 'time'
|
137
188
|
require 'citypay_api_client'
|
138
189
|
# setup authorization
|
139
190
|
CityPayApiClient.configure do |config|
|
@@ -146,22 +197,39 @@ card_id = 'card_id_example' # String | The id of the card that is presented by a
|
|
146
197
|
card_status = CityPayApiClient::CardStatus.new # CardStatus |
|
147
198
|
|
148
199
|
begin
|
149
|
-
#Card Status
|
200
|
+
# Card Status
|
150
201
|
result = api_instance.account_card_status_request(accountid, card_id, card_status)
|
151
202
|
p result
|
152
203
|
rescue CityPayApiClient::ApiError => e
|
153
|
-
puts "
|
204
|
+
puts "Error when calling CardHolderAccountApi->account_card_status_request: #{e}"
|
154
205
|
end
|
155
206
|
```
|
156
207
|
|
157
|
-
|
208
|
+
#### Using the account_card_status_request_with_http_info variant
|
158
209
|
|
210
|
+
This returns an Array which contains the response data, status code and headers.
|
159
211
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
212
|
+
> <Array(<Acknowledgement>, Integer, Hash)> account_card_status_request_with_http_info(accountid, card_id, card_status)
|
213
|
+
|
214
|
+
```ruby
|
215
|
+
begin
|
216
|
+
# Card Status
|
217
|
+
data, status_code, headers = api_instance.account_card_status_request_with_http_info(accountid, card_id, card_status)
|
218
|
+
p status_code # => 2xx
|
219
|
+
p headers # => { ... }
|
220
|
+
p data # => <Acknowledgement>
|
221
|
+
rescue CityPayApiClient::ApiError => e
|
222
|
+
puts "Error when calling CardHolderAccountApi->account_card_status_request_with_http_info: #{e}"
|
223
|
+
end
|
224
|
+
```
|
225
|
+
|
226
|
+
### Parameters
|
227
|
+
|
228
|
+
| Name | Type | Description | Notes |
|
229
|
+
| ---- | ---- | ----------- | ----- |
|
230
|
+
| **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. | |
|
231
|
+
| **card_id** | **String** | The id of the card that is presented by a call to retrieve a card holder account. | |
|
232
|
+
| **card_status** | [**CardStatus**](CardStatus.md) | | |
|
165
233
|
|
166
234
|
### Return type
|
167
235
|
|
@@ -179,16 +247,16 @@ Name | Type | Description | Notes
|
|
179
247
|
|
180
248
|
## account_change_contact_request
|
181
249
|
|
182
|
-
> CardHolderAccount account_change_contact_request(accountid, contact_details)
|
250
|
+
> <CardHolderAccount> account_change_contact_request(accountid, contact_details)
|
183
251
|
|
184
252
|
Contact Details Update
|
185
253
|
|
186
254
|
Allows for the ability to change the contact details for an account.
|
187
255
|
|
188
|
-
###
|
256
|
+
### Examples
|
189
257
|
|
190
258
|
```ruby
|
191
|
-
|
259
|
+
require 'time'
|
192
260
|
require 'citypay_api_client'
|
193
261
|
# setup authorization
|
194
262
|
CityPayApiClient.configure do |config|
|
@@ -200,21 +268,38 @@ accountid = 'accountid_example' # String | The account id that refers to the cus
|
|
200
268
|
contact_details = CityPayApiClient::ContactDetails.new # ContactDetails |
|
201
269
|
|
202
270
|
begin
|
203
|
-
#Contact Details Update
|
271
|
+
# Contact Details Update
|
204
272
|
result = api_instance.account_change_contact_request(accountid, contact_details)
|
205
273
|
p result
|
206
274
|
rescue CityPayApiClient::ApiError => e
|
207
|
-
puts "
|
275
|
+
puts "Error when calling CardHolderAccountApi->account_change_contact_request: #{e}"
|
208
276
|
end
|
209
277
|
```
|
210
278
|
|
211
|
-
|
279
|
+
#### Using the account_change_contact_request_with_http_info variant
|
212
280
|
|
281
|
+
This returns an Array which contains the response data, status code and headers.
|
213
282
|
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
283
|
+
> <Array(<CardHolderAccount>, Integer, Hash)> account_change_contact_request_with_http_info(accountid, contact_details)
|
284
|
+
|
285
|
+
```ruby
|
286
|
+
begin
|
287
|
+
# Contact Details Update
|
288
|
+
data, status_code, headers = api_instance.account_change_contact_request_with_http_info(accountid, contact_details)
|
289
|
+
p status_code # => 2xx
|
290
|
+
p headers # => { ... }
|
291
|
+
p data # => <CardHolderAccount>
|
292
|
+
rescue CityPayApiClient::ApiError => e
|
293
|
+
puts "Error when calling CardHolderAccountApi->account_change_contact_request_with_http_info: #{e}"
|
294
|
+
end
|
295
|
+
```
|
296
|
+
|
297
|
+
### Parameters
|
298
|
+
|
299
|
+
| Name | Type | Description | Notes |
|
300
|
+
| ---- | ---- | ----------- | ----- |
|
301
|
+
| **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. | |
|
302
|
+
| **contact_details** | [**ContactDetails**](ContactDetails.md) | | |
|
218
303
|
|
219
304
|
### Return type
|
220
305
|
|
@@ -232,16 +317,16 @@ Name | Type | Description | Notes
|
|
232
317
|
|
233
318
|
## account_create
|
234
319
|
|
235
|
-
> CardHolderAccount account_create(account_create)
|
320
|
+
> <CardHolderAccount> account_create(account_create)
|
236
321
|
|
237
322
|
Account Create
|
238
323
|
|
239
324
|
Creates a new card holder account and initialises the account ready for adding cards.
|
240
325
|
|
241
|
-
###
|
326
|
+
### Examples
|
242
327
|
|
243
328
|
```ruby
|
244
|
-
|
329
|
+
require 'time'
|
245
330
|
require 'citypay_api_client'
|
246
331
|
# setup authorization
|
247
332
|
CityPayApiClient.configure do |config|
|
@@ -249,23 +334,40 @@ CityPayApiClient.configure do |config|
|
|
249
334
|
end
|
250
335
|
|
251
336
|
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
252
|
-
account_create = CityPayApiClient::AccountCreate.new # AccountCreate |
|
337
|
+
account_create = CityPayApiClient::AccountCreate.new({account_id: 'aaabbb-cccddd-eee'}) # AccountCreate |
|
253
338
|
|
254
339
|
begin
|
255
|
-
#Account Create
|
340
|
+
# Account Create
|
256
341
|
result = api_instance.account_create(account_create)
|
257
342
|
p result
|
258
343
|
rescue CityPayApiClient::ApiError => e
|
259
|
-
puts "
|
344
|
+
puts "Error when calling CardHolderAccountApi->account_create: #{e}"
|
260
345
|
end
|
261
346
|
```
|
262
347
|
|
263
|
-
|
348
|
+
#### Using the account_create_with_http_info variant
|
264
349
|
|
350
|
+
This returns an Array which contains the response data, status code and headers.
|
351
|
+
|
352
|
+
> <Array(<CardHolderAccount>, Integer, Hash)> account_create_with_http_info(account_create)
|
353
|
+
|
354
|
+
```ruby
|
355
|
+
begin
|
356
|
+
# Account Create
|
357
|
+
data, status_code, headers = api_instance.account_create_with_http_info(account_create)
|
358
|
+
p status_code # => 2xx
|
359
|
+
p headers # => { ... }
|
360
|
+
p data # => <CardHolderAccount>
|
361
|
+
rescue CityPayApiClient::ApiError => e
|
362
|
+
puts "Error when calling CardHolderAccountApi->account_create_with_http_info: #{e}"
|
363
|
+
end
|
364
|
+
```
|
365
|
+
|
366
|
+
### Parameters
|
265
367
|
|
266
|
-
Name | Type | Description
|
267
|
-
|
268
|
-
**account_create** | [**AccountCreate**](AccountCreate.md)| |
|
368
|
+
| Name | Type | Description | Notes |
|
369
|
+
| ---- | ---- | ----------- | ----- |
|
370
|
+
| **account_create** | [**AccountCreate**](AccountCreate.md) | | |
|
269
371
|
|
270
372
|
### Return type
|
271
373
|
|
@@ -283,16 +385,18 @@ Name | Type | Description | Notes
|
|
283
385
|
|
284
386
|
## account_delete_request
|
285
387
|
|
286
|
-
> Acknowledgement account_delete_request(accountid)
|
388
|
+
> <Acknowledgement> account_delete_request(accountid)
|
287
389
|
|
288
390
|
Account Deletion
|
289
391
|
|
290
|
-
Allows for the deletion of an account. The account will marked for deletion and subsequent purging. No further
|
392
|
+
Allows for the deletion of an account. The account will marked for deletion and subsequent purging. No further
|
393
|
+
transactions will be alowed to be processed or actioned against this account.
|
291
394
|
|
292
|
-
|
395
|
+
|
396
|
+
### Examples
|
293
397
|
|
294
398
|
```ruby
|
295
|
-
|
399
|
+
require 'time'
|
296
400
|
require 'citypay_api_client'
|
297
401
|
# setup authorization
|
298
402
|
CityPayApiClient.configure do |config|
|
@@ -303,20 +407,37 @@ api_instance = CityPayApiClient::CardHolderAccountApi.new
|
|
303
407
|
accountid = 'accountid_example' # 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.
|
304
408
|
|
305
409
|
begin
|
306
|
-
#Account Deletion
|
410
|
+
# Account Deletion
|
307
411
|
result = api_instance.account_delete_request(accountid)
|
308
412
|
p result
|
309
413
|
rescue CityPayApiClient::ApiError => e
|
310
|
-
puts "
|
414
|
+
puts "Error when calling CardHolderAccountApi->account_delete_request: #{e}"
|
311
415
|
end
|
312
416
|
```
|
313
417
|
|
314
|
-
|
418
|
+
#### Using the account_delete_request_with_http_info variant
|
419
|
+
|
420
|
+
This returns an Array which contains the response data, status code and headers.
|
315
421
|
|
422
|
+
> <Array(<Acknowledgement>, Integer, Hash)> account_delete_request_with_http_info(accountid)
|
423
|
+
|
424
|
+
```ruby
|
425
|
+
begin
|
426
|
+
# Account Deletion
|
427
|
+
data, status_code, headers = api_instance.account_delete_request_with_http_info(accountid)
|
428
|
+
p status_code # => 2xx
|
429
|
+
p headers # => { ... }
|
430
|
+
p data # => <Acknowledgement>
|
431
|
+
rescue CityPayApiClient::ApiError => e
|
432
|
+
puts "Error when calling CardHolderAccountApi->account_delete_request_with_http_info: #{e}"
|
433
|
+
end
|
434
|
+
```
|
316
435
|
|
317
|
-
|
318
|
-
|
319
|
-
|
436
|
+
### Parameters
|
437
|
+
|
438
|
+
| Name | Type | Description | Notes |
|
439
|
+
| ---- | ---- | ----------- | ----- |
|
440
|
+
| **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. | |
|
320
441
|
|
321
442
|
### Return type
|
322
443
|
|
@@ -332,18 +453,93 @@ Name | Type | Description | Notes
|
|
332
453
|
- **Accept**: application/json, text/xml
|
333
454
|
|
334
455
|
|
456
|
+
## account_exists_request
|
457
|
+
|
458
|
+
> <Exists> account_exists_request(accountid)
|
459
|
+
|
460
|
+
Account Exists
|
461
|
+
|
462
|
+
Checks that an account exists and is active by providing the account id as a url parameter.
|
463
|
+
|
464
|
+
|
465
|
+
### Examples
|
466
|
+
|
467
|
+
```ruby
|
468
|
+
require 'time'
|
469
|
+
require 'citypay_api_client'
|
470
|
+
# setup authorization
|
471
|
+
CityPayApiClient.configure do |config|
|
472
|
+
config.api_key['cp-api-key'] = CityPayApiClient::ApiKey.new(client_id: 'YourClientId', licence_key: 'YourLicenceKey').generate
|
473
|
+
end
|
474
|
+
|
475
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
476
|
+
accountid = 'accountid_example' # 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.
|
477
|
+
|
478
|
+
begin
|
479
|
+
# Account Exists
|
480
|
+
result = api_instance.account_exists_request(accountid)
|
481
|
+
p result
|
482
|
+
rescue CityPayApiClient::ApiError => e
|
483
|
+
puts "Error when calling CardHolderAccountApi->account_exists_request: #{e}"
|
484
|
+
end
|
485
|
+
```
|
486
|
+
|
487
|
+
#### Using the account_exists_request_with_http_info variant
|
488
|
+
|
489
|
+
This returns an Array which contains the response data, status code and headers.
|
490
|
+
|
491
|
+
> <Array(<Exists>, Integer, Hash)> account_exists_request_with_http_info(accountid)
|
492
|
+
|
493
|
+
```ruby
|
494
|
+
begin
|
495
|
+
# Account Exists
|
496
|
+
data, status_code, headers = api_instance.account_exists_request_with_http_info(accountid)
|
497
|
+
p status_code # => 2xx
|
498
|
+
p headers # => { ... }
|
499
|
+
p data # => <Exists>
|
500
|
+
rescue CityPayApiClient::ApiError => e
|
501
|
+
puts "Error when calling CardHolderAccountApi->account_exists_request_with_http_info: #{e}"
|
502
|
+
end
|
503
|
+
```
|
504
|
+
|
505
|
+
### Parameters
|
506
|
+
|
507
|
+
| Name | Type | Description | Notes |
|
508
|
+
| ---- | ---- | ----------- | ----- |
|
509
|
+
| **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. | |
|
510
|
+
|
511
|
+
### Return type
|
512
|
+
|
513
|
+
[**Exists**](Exists.md)
|
514
|
+
|
515
|
+
### Authorization
|
516
|
+
|
517
|
+
[cp-api-key](../README.md#cp-api-key)
|
518
|
+
|
519
|
+
### HTTP request headers
|
520
|
+
|
521
|
+
- **Content-Type**: Not defined
|
522
|
+
- **Accept**: application/json, text/xml
|
523
|
+
|
524
|
+
|
335
525
|
## account_retrieve_request
|
336
526
|
|
337
|
-
> CardHolderAccount account_retrieve_request(accountid)
|
527
|
+
> <CardHolderAccount> account_retrieve_request(accountid)
|
338
528
|
|
339
529
|
Account Retrieval
|
340
530
|
|
341
|
-
Allows for the retrieval of a card holder account for the given `id`. Should duplicate accounts exist
|
531
|
+
Allows for the retrieval of a card holder account for the given `id`. Should duplicate accounts exist
|
532
|
+
for the same `id`, the first account created with that `id` will be returned.
|
342
533
|
|
343
|
-
|
534
|
+
The account can be used for tokenisation processing by listing all cards assigned to the account.
|
535
|
+
The returned cards will include all `active`, `inactive` and `expired` cards. This can be used to
|
536
|
+
enable a card holder to view their wallet and make constructive choices on which card to use.
|
537
|
+
|
538
|
+
|
539
|
+
### Examples
|
344
540
|
|
345
541
|
```ruby
|
346
|
-
|
542
|
+
require 'time'
|
347
543
|
require 'citypay_api_client'
|
348
544
|
# setup authorization
|
349
545
|
CityPayApiClient.configure do |config|
|
@@ -354,20 +550,37 @@ api_instance = CityPayApiClient::CardHolderAccountApi.new
|
|
354
550
|
accountid = 'accountid_example' # 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.
|
355
551
|
|
356
552
|
begin
|
357
|
-
#Account Retrieval
|
553
|
+
# Account Retrieval
|
358
554
|
result = api_instance.account_retrieve_request(accountid)
|
359
555
|
p result
|
360
556
|
rescue CityPayApiClient::ApiError => e
|
361
|
-
puts "
|
557
|
+
puts "Error when calling CardHolderAccountApi->account_retrieve_request: #{e}"
|
362
558
|
end
|
363
559
|
```
|
364
560
|
|
365
|
-
|
561
|
+
#### Using the account_retrieve_request_with_http_info variant
|
366
562
|
|
563
|
+
This returns an Array which contains the response data, status code and headers.
|
367
564
|
|
368
|
-
|
369
|
-
|
370
|
-
|
565
|
+
> <Array(<CardHolderAccount>, Integer, Hash)> account_retrieve_request_with_http_info(accountid)
|
566
|
+
|
567
|
+
```ruby
|
568
|
+
begin
|
569
|
+
# Account Retrieval
|
570
|
+
data, status_code, headers = api_instance.account_retrieve_request_with_http_info(accountid)
|
571
|
+
p status_code # => 2xx
|
572
|
+
p headers # => { ... }
|
573
|
+
p data # => <CardHolderAccount>
|
574
|
+
rescue CityPayApiClient::ApiError => e
|
575
|
+
puts "Error when calling CardHolderAccountApi->account_retrieve_request_with_http_info: #{e}"
|
576
|
+
end
|
577
|
+
```
|
578
|
+
|
579
|
+
### Parameters
|
580
|
+
|
581
|
+
| Name | Type | Description | Notes |
|
582
|
+
| ---- | ---- | ----------- | ----- |
|
583
|
+
| **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. | |
|
371
584
|
|
372
585
|
### Return type
|
373
586
|
|
@@ -385,16 +598,22 @@ Name | Type | Description | Notes
|
|
385
598
|
|
386
599
|
## account_status_request
|
387
600
|
|
388
|
-
> Acknowledgement account_status_request(accountid, account_status)
|
601
|
+
> <Acknowledgement> account_status_request(accountid, account_status)
|
389
602
|
|
390
603
|
Account Status
|
391
604
|
|
392
|
-
Updates the status of an account. An account can have the following statuses applied
|
605
|
+
Updates the status of an account. An account can have the following statuses applied
|
606
|
+
|
607
|
+
| Status | Description |
|
608
|
+
|--------|-------------|
|
609
|
+
| Active | The account is active for processing |
|
610
|
+
| Disabled | The account has been disabled and cannot be used for processing. The account will require reactivation to continue procesing |
|
393
611
|
|
394
|
-
|
612
|
+
|
613
|
+
### Examples
|
395
614
|
|
396
615
|
```ruby
|
397
|
-
|
616
|
+
require 'time'
|
398
617
|
require 'citypay_api_client'
|
399
618
|
# setup authorization
|
400
619
|
CityPayApiClient.configure do |config|
|
@@ -406,21 +625,38 @@ accountid = 'accountid_example' # String | The account id that refers to the cus
|
|
406
625
|
account_status = CityPayApiClient::AccountStatus.new # AccountStatus |
|
407
626
|
|
408
627
|
begin
|
409
|
-
#Account Status
|
628
|
+
# Account Status
|
410
629
|
result = api_instance.account_status_request(accountid, account_status)
|
411
630
|
p result
|
412
631
|
rescue CityPayApiClient::ApiError => e
|
413
|
-
puts "
|
632
|
+
puts "Error when calling CardHolderAccountApi->account_status_request: #{e}"
|
414
633
|
end
|
415
634
|
```
|
416
635
|
|
417
|
-
|
636
|
+
#### Using the account_status_request_with_http_info variant
|
637
|
+
|
638
|
+
This returns an Array which contains the response data, status code and headers.
|
639
|
+
|
640
|
+
> <Array(<Acknowledgement>, Integer, Hash)> account_status_request_with_http_info(accountid, account_status)
|
641
|
+
|
642
|
+
```ruby
|
643
|
+
begin
|
644
|
+
# Account Status
|
645
|
+
data, status_code, headers = api_instance.account_status_request_with_http_info(accountid, account_status)
|
646
|
+
p status_code # => 2xx
|
647
|
+
p headers # => { ... }
|
648
|
+
p data # => <Acknowledgement>
|
649
|
+
rescue CityPayApiClient::ApiError => e
|
650
|
+
puts "Error when calling CardHolderAccountApi->account_status_request_with_http_info: #{e}"
|
651
|
+
end
|
652
|
+
```
|
418
653
|
|
654
|
+
### Parameters
|
419
655
|
|
420
|
-
Name | Type | Description
|
421
|
-
|
422
|
-
**accountid** | **String
|
423
|
-
**account_status** | [**AccountStatus**](AccountStatus.md)| |
|
656
|
+
| Name | Type | Description | Notes |
|
657
|
+
| ---- | ---- | ----------- | ----- |
|
658
|
+
| **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. | |
|
659
|
+
| **account_status** | [**AccountStatus**](AccountStatus.md) | | |
|
424
660
|
|
425
661
|
### Return type
|
426
662
|
|
@@ -438,16 +674,39 @@ Name | Type | Description | Notes
|
|
438
674
|
|
439
675
|
## charge_request
|
440
676
|
|
441
|
-
> Decision charge_request(charge_request)
|
677
|
+
> <Decision> charge_request(charge_request)
|
442
678
|
|
443
679
|
Charge
|
444
680
|
|
445
|
-
A charge process obtains an authorisation using a tokenised value which represents a stored card
|
681
|
+
A charge process obtains an authorisation using a tokenised value which represents a stored card
|
682
|
+
on a card holder account.
|
683
|
+
A card must previously be registered by calling `/account-register-card` with the card details
|
684
|
+
or retrieved using `/account-retrieve`
|
446
685
|
|
447
|
-
|
686
|
+
Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a
|
687
|
+
relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from
|
688
|
+
replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details
|
689
|
+
for use elsewhere.
|
690
|
+
|
691
|
+
If a token is reused after it has expired it will be rejected and a new token will be required.
|
692
|
+
|
693
|
+
Tokenisation can be used for
|
694
|
+
|
695
|
+
- repeat authorisations on a previously stored card
|
696
|
+
- easy authorisations just requiring CSC values to be entered
|
697
|
+
- can be used for credential on file style payments
|
698
|
+
- can require full 3-D Secure authentication to retain the liability shift
|
699
|
+
- wallet style usage
|
700
|
+
|
701
|
+
|
702
|
+
_Should an account be used with 3DSv2, the card holder name should also be stored alongside the card as this is a
|
703
|
+
required field with both Visa and MasterCard for risk analysis._.
|
704
|
+
|
705
|
+
|
706
|
+
### Examples
|
448
707
|
|
449
708
|
```ruby
|
450
|
-
|
709
|
+
require 'time'
|
451
710
|
require 'citypay_api_client'
|
452
711
|
# setup authorization
|
453
712
|
CityPayApiClient.configure do |config|
|
@@ -455,23 +714,40 @@ CityPayApiClient.configure do |config|
|
|
455
714
|
end
|
456
715
|
|
457
716
|
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
458
|
-
charge_request = CityPayApiClient::ChargeRequest.new # ChargeRequest |
|
717
|
+
charge_request = CityPayApiClient::ChargeRequest.new({amount: 3600, identifier: '95b857a1-5955-4b86-963c-5a6dbfc4fb95', merchantid: 11223344, token: 'ctPCAPyNyCkx3Ry8wGyv8khC3ch2hUSB3Db..Qzr'}) # ChargeRequest |
|
459
718
|
|
460
719
|
begin
|
461
|
-
#Charge
|
720
|
+
# Charge
|
462
721
|
result = api_instance.charge_request(charge_request)
|
463
722
|
p result
|
464
723
|
rescue CityPayApiClient::ApiError => e
|
465
|
-
puts "
|
724
|
+
puts "Error when calling CardHolderAccountApi->charge_request: #{e}"
|
466
725
|
end
|
467
726
|
```
|
468
727
|
|
469
|
-
|
728
|
+
#### Using the charge_request_with_http_info variant
|
470
729
|
|
730
|
+
This returns an Array which contains the response data, status code and headers.
|
731
|
+
|
732
|
+
> <Array(<Decision>, Integer, Hash)> charge_request_with_http_info(charge_request)
|
733
|
+
|
734
|
+
```ruby
|
735
|
+
begin
|
736
|
+
# Charge
|
737
|
+
data, status_code, headers = api_instance.charge_request_with_http_info(charge_request)
|
738
|
+
p status_code # => 2xx
|
739
|
+
p headers # => { ... }
|
740
|
+
p data # => <Decision>
|
741
|
+
rescue CityPayApiClient::ApiError => e
|
742
|
+
puts "Error when calling CardHolderAccountApi->charge_request_with_http_info: #{e}"
|
743
|
+
end
|
744
|
+
```
|
745
|
+
|
746
|
+
### Parameters
|
471
747
|
|
472
|
-
Name | Type | Description
|
473
|
-
|
474
|
-
**charge_request** | [**ChargeRequest**](ChargeRequest.md)| |
|
748
|
+
| Name | Type | Description | Notes |
|
749
|
+
| ---- | ---- | ----------- | ----- |
|
750
|
+
| **charge_request** | [**ChargeRequest**](ChargeRequest.md) | | |
|
475
751
|
|
476
752
|
### Return type
|
477
753
|
|