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.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +111 -39
  3. data/citypay_api_client.gemspec +5 -5
  4. data/docs/AccountCreate.md +10 -9
  5. data/docs/AccountStatus.md +8 -7
  6. data/docs/Acknowledgement.md +14 -13
  7. data/docs/AclCheckRequest.md +18 -0
  8. data/docs/AclCheckResponseModel.md +24 -0
  9. data/docs/AirlineAdvice.md +38 -37
  10. data/docs/AirlineSegment.md +22 -21
  11. data/docs/AuthReference.md +34 -33
  12. data/docs/AuthReferences.md +8 -7
  13. data/docs/AuthRequest.md +52 -49
  14. data/docs/AuthResponse.md +64 -59
  15. data/docs/AuthenRequired.md +12 -11
  16. data/docs/AuthorisationAndPaymentApi.md +850 -0
  17. data/docs/Batch.md +22 -0
  18. data/docs/BatchProcessingApi.md +218 -0
  19. data/docs/BatchReportRequest.md +20 -0
  20. data/docs/BatchReportResponseModel.md +28 -0
  21. data/docs/BatchTransaction.md +24 -0
  22. data/docs/BatchTransactionResultModel.md +44 -0
  23. data/docs/Bin.md +34 -0
  24. data/docs/BinLookup.md +18 -0
  25. data/docs/CResAuthRequest.md +8 -7
  26. data/docs/CaptureRequest.md +18 -17
  27. data/docs/Card.md +46 -41
  28. data/docs/CardHolderAccount.md +24 -21
  29. data/docs/CardHolderAccountApi.md +387 -111
  30. data/docs/CardStatus.md +10 -9
  31. data/docs/ChargeRequest.md +38 -31
  32. data/docs/CheckBatchStatus.md +20 -0
  33. data/docs/CheckBatchStatusResponse.md +18 -0
  34. data/docs/ContactDetails.md +32 -31
  35. data/docs/Decision.md +12 -11
  36. data/docs/DirectPostApi.md +389 -0
  37. data/docs/DirectPostRequest.md +60 -0
  38. data/docs/DirectTokenAuthRequest.md +24 -0
  39. data/docs/DomainKeyCheckRequest.md +18 -0
  40. data/docs/DomainKeyRequest.md +22 -0
  41. data/docs/DomainKeyResponse.md +26 -0
  42. data/docs/Error.md +16 -13
  43. data/docs/EventDataModel.md +26 -0
  44. data/docs/Exists.md +22 -0
  45. data/docs/ExternalMPI.md +16 -15
  46. data/docs/ListMerchantsResponse.md +12 -11
  47. data/docs/MCC6012.md +14 -13
  48. data/docs/Merchant.md +16 -15
  49. data/docs/OperationalFunctionsApi.md +375 -0
  50. data/docs/PaResAuthRequest.md +10 -9
  51. data/docs/PaylinkAddress.md +30 -0
  52. data/docs/PaylinkAdjustmentRequest.md +22 -0
  53. data/docs/PaylinkApi.md +806 -0
  54. data/docs/PaylinkAttachmentRequest.md +26 -0
  55. data/docs/PaylinkAttachmentResult.md +22 -0
  56. data/docs/PaylinkBillPaymentTokenRequest.md +32 -0
  57. data/docs/PaylinkCardHolder.md +36 -0
  58. data/docs/PaylinkCart.md +30 -0
  59. data/docs/PaylinkCartItemModel.md +32 -0
  60. data/docs/PaylinkConfig.md +60 -0
  61. data/docs/PaylinkCustomParam.md +38 -0
  62. data/docs/PaylinkEmailNotificationPath.md +26 -0
  63. data/docs/PaylinkErrorCode.md +20 -0
  64. data/docs/PaylinkFieldGuardModel.md +30 -0
  65. data/docs/PaylinkPartPayments.md +28 -0
  66. data/docs/PaylinkSMSNotificationPath.md +20 -0
  67. data/docs/PaylinkStateEvent.md +22 -0
  68. data/docs/PaylinkTokenCreated.md +44 -0
  69. data/docs/PaylinkTokenRequestModel.md +42 -0
  70. data/docs/PaylinkTokenStatus.md +72 -0
  71. data/docs/PaylinkTokenStatusChangeRequest.md +26 -0
  72. data/docs/PaylinkTokenStatusChangeResponse.md +20 -0
  73. data/docs/PaylinkUI.md +24 -0
  74. data/docs/Ping.md +8 -7
  75. data/docs/ProcessBatchRequest.md +24 -0
  76. data/docs/ProcessBatchResponse.md +20 -0
  77. data/docs/RefundRequest.md +26 -0
  78. data/docs/RegisterCard.md +16 -13
  79. data/docs/RequestChallenged.md +16 -15
  80. data/docs/RetrieveRequest.md +12 -11
  81. data/docs/ThreeDSecure.md +32 -15
  82. data/docs/TokenisationResponseModel.md +36 -0
  83. data/docs/VoidRequest.md +12 -13
  84. data/docs/images/3dsv1-challenge.png +0 -0
  85. data/docs/images/3dsv2-challenge.png +0 -0
  86. data/docs/images/3dsv2-frictionless.png +0 -0
  87. data/docs/images/3dsv2-method-challenge.png +0 -0
  88. data/docs/images/3dsv2-method-frictionless.png +0 -0
  89. data/docs/images/3dsv2-no3d.png +0 -0
  90. data/docs/images/citypay-logo.svg +1 -0
  91. data/docs/images/direct-post-flow.png +0 -0
  92. data/docs/images/favicon.ico +0 -0
  93. data/docs/images/header.png +0 -0
  94. data/docs/images/logo.ai +1913 -4
  95. data/docs/images/logo.png +0 -0
  96. data/docs/images/logo.svg +1 -0
  97. data/docs/images/merchant-BPS-workflow.png +0 -0
  98. data/docs/images/paylink-field-guards.png +0 -0
  99. data/lib/.DS_Store +0 -0
  100. data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +565 -0
  101. data/lib/citypay_api_client/api/batch_processing_api__.rb +225 -0
  102. data/lib/citypay_api_client/api/{card_holder_account_api.rb → card_holder_account_api__.rb} +136 -46
  103. data/lib/citypay_api_client/api/direct_post_api__.rb +373 -0
  104. data/lib/citypay_api_client/api/operational_functions_api__.rb +356 -0
  105. data/lib/citypay_api_client/api/paylink_api__.rb +614 -0
  106. data/lib/citypay_api_client/api_client.rb +72 -70
  107. data/lib/citypay_api_client/api_error.rb +3 -2
  108. data/lib/citypay_api_client/configuration.rb +74 -17
  109. data/lib/citypay_api_client/models/account_create.rb +33 -23
  110. data/lib/citypay_api_client/models/account_status.rb +31 -23
  111. data/lib/citypay_api_client/models/acknowledgement.rb +43 -27
  112. data/lib/citypay_api_client/models/acl_check_request.rb +221 -0
  113. data/lib/citypay_api_client/models/acl_check_response_model.rb +244 -0
  114. data/lib/citypay_api_client/models/airline_advice.rb +63 -34
  115. data/lib/citypay_api_client/models/airline_segment.rb +51 -25
  116. data/lib/citypay_api_client/models/auth_reference.rb +80 -31
  117. data/lib/citypay_api_client/models/auth_references.rb +31 -23
  118. data/lib/citypay_api_client/models/auth_request.rb +137 -56
  119. data/lib/citypay_api_client/models/auth_response.rb +83 -123
  120. data/lib/citypay_api_client/models/authen_required.rb +31 -23
  121. data/lib/citypay_api_client/models/batch.rb +267 -0
  122. data/lib/citypay_api_client/models/batch_report_request.rb +278 -0
  123. data/lib/citypay_api_client/models/batch_report_response_model.rb +364 -0
  124. data/lib/citypay_api_client/models/batch_transaction.rb +324 -0
  125. data/lib/citypay_api_client/models/batch_transaction_result_model.rb +452 -0
  126. data/lib/citypay_api_client/models/bin.rb +294 -0
  127. data/lib/citypay_api_client/models/bin_lookup.rb +231 -0
  128. data/lib/citypay_api_client/models/c_res_auth_request.rb +31 -23
  129. data/lib/citypay_api_client/models/capture_request.rb +59 -38
  130. data/lib/citypay_api_client/models/card.rb +93 -29
  131. data/lib/citypay_api_client/models/card_holder_account.rb +49 -27
  132. data/lib/citypay_api_client/models/card_status.rb +31 -23
  133. data/lib/citypay_api_client/models/charge_request.rb +154 -47
  134. data/lib/citypay_api_client/models/check_batch_status.rb +260 -0
  135. data/lib/citypay_api_client/models/check_batch_status_response.rb +215 -0
  136. data/lib/citypay_api_client/models/contact_details.rb +130 -52
  137. data/lib/citypay_api_client/models/decision.rb +31 -23
  138. data/lib/citypay_api_client/models/direct_post_request.rb +707 -0
  139. data/lib/citypay_api_client/models/direct_token_auth_request.rb +244 -0
  140. data/lib/citypay_api_client/models/domain_key_check_request.rb +249 -0
  141. data/lib/citypay_api_client/models/domain_key_request.rb +249 -0
  142. data/lib/citypay_api_client/models/domain_key_response.rb +297 -0
  143. data/lib/citypay_api_client/models/error.rb +57 -31
  144. data/lib/citypay_api_client/models/event_data_model.rb +254 -0
  145. data/lib/citypay_api_client/models/exists.rb +241 -0
  146. data/lib/citypay_api_client/models/external_mpi.rb +61 -27
  147. data/lib/citypay_api_client/models/list_merchants_response.rb +37 -25
  148. data/lib/citypay_api_client/models/mcc6012.rb +31 -23
  149. data/lib/citypay_api_client/models/merchant.rb +31 -23
  150. data/lib/citypay_api_client/models/pa_res_auth_request.rb +36 -24
  151. data/lib/citypay_api_client/models/paylink_address.rb +425 -0
  152. data/lib/citypay_api_client/models/paylink_adjustment_request.rb +272 -0
  153. data/lib/citypay_api_client/models/paylink_attachment_request.rb +268 -0
  154. data/lib/citypay_api_client/models/paylink_attachment_result.rb +248 -0
  155. data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +289 -0
  156. data/lib/citypay_api_client/models/paylink_card_holder.rb +360 -0
  157. data/lib/citypay_api_client/models/paylink_cart.rb +275 -0
  158. data/lib/citypay_api_client/models/paylink_cart_item_model.rb +284 -0
  159. data/lib/citypay_api_client/models/paylink_config.rb +428 -0
  160. data/lib/citypay_api_client/models/paylink_custom_param.rb +321 -0
  161. data/lib/citypay_api_client/models/paylink_email_notification_path.rb +265 -0
  162. data/lib/citypay_api_client/models/paylink_error_code.rb +238 -0
  163. data/lib/citypay_api_client/models/paylink_field_guard_model.rb +274 -0
  164. data/lib/citypay_api_client/models/paylink_part_payments.rb +264 -0
  165. data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +231 -0
  166. data/lib/citypay_api_client/models/paylink_state_event.rb +234 -0
  167. data/lib/citypay_api_client/models/paylink_token_created.rb +365 -0
  168. data/lib/citypay_api_client/models/paylink_token_request_model.rb +427 -0
  169. data/lib/citypay_api_client/models/paylink_token_status.rb +485 -0
  170. data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +269 -0
  171. data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +232 -0
  172. data/lib/citypay_api_client/models/paylink_ui.rb +244 -0
  173. data/lib/citypay_api_client/models/ping.rb +37 -25
  174. data/lib/citypay_api_client/models/process_batch_request.rb +313 -0
  175. data/lib/citypay_api_client/models/process_batch_response.rb +231 -0
  176. data/lib/citypay_api_client/models/refund_request.rb +339 -0
  177. data/lib/citypay_api_client/models/register_card.rb +79 -27
  178. data/lib/citypay_api_client/models/request_challenged.rb +39 -31
  179. data/lib/citypay_api_client/models/retrieve_request.rb +39 -25
  180. data/lib/citypay_api_client/models/three_d_secure.rb +116 -28
  181. data/lib/citypay_api_client/models/tokenisation_response_model.rb +332 -0
  182. data/lib/citypay_api_client/models/void_request.rb +39 -37
  183. data/lib/citypay_api_client/utils/digest_utils.rb +18 -0
  184. data/lib/citypay_api_client/utils/direct_post_mac.rb +22 -0
  185. data/lib/citypay_api_client/version.rb +3 -4
  186. data/lib/citypay_api_client.rb +53 -6
  187. data/spec/.DS_Store +0 -0
  188. data/spec/api/authorisation_and_payment_api___spec.rb +130 -0
  189. data/spec/api/batch_processing_api___spec.rb +70 -0
  190. data/spec/api/{card_holder_account_api_spec.rb → card_holder_account_api___spec.rb} +15 -3
  191. data/spec/api/direct_post_api___spec.rb +98 -0
  192. data/spec/api/operational_functions_api___spec.rb +94 -0
  193. data/spec/api/paylink_api___spec.rb +131 -0
  194. data/spec/api_client_spec.rb +4 -4
  195. data/spec/configuration_spec.rb +5 -5
  196. data/spec/it_api_sandbox_spec.rb +117 -55
  197. data/spec/models/account_create_spec.rb +1 -2
  198. data/spec/models/account_status_spec.rb +2 -2
  199. data/spec/models/acknowledgement_spec.rb +7 -22
  200. data/spec/models/acl_check_request_spec.rb +33 -0
  201. data/spec/models/acl_check_response_model_spec.rb +51 -0
  202. data/spec/models/airline_advice_spec.rb +0 -2
  203. data/spec/models/airline_segment_spec.rb +0 -2
  204. data/spec/models/auth_references_spec.rb +7 -8
  205. data/spec/models/auth_request_spec.rb +0 -2
  206. data/spec/models/auth_response_spec.rb +77 -33
  207. data/spec/models/batch_report_request_spec.rb +37 -0
  208. data/spec/models/batch_report_response_model_spec.rb +61 -0
  209. data/spec/models/batch_spec.rb +43 -0
  210. data/spec/models/batch_transaction_result_model_spec.rb +85 -0
  211. data/spec/models/batch_transaction_spec.rb +49 -0
  212. data/spec/models/bin_lookup_spec.rb +31 -0
  213. data/spec/models/bin_spec.rb +81 -0
  214. data/spec/models/capture_request_spec.rb +0 -2
  215. data/spec/models/card_holder_account_spec.rb +8 -7
  216. data/spec/models/charge_request_spec.rb +0 -2
  217. data/spec/models/check_batch_status_response_spec.rb +45 -0
  218. data/spec/models/check_batch_status_spec.rb +39 -0
  219. data/spec/models/decision_spec.rb +1 -1
  220. data/spec/models/direct_post_request_spec.rb +151 -0
  221. data/spec/models/direct_token_auth_request_spec.rb +51 -0
  222. data/spec/models/domain_key_check_request_spec.rb +31 -0
  223. data/spec/models/domain_key_request_spec.rb +45 -0
  224. data/spec/models/domain_key_response_spec.rb +57 -0
  225. data/spec/models/event_data_model_spec.rb +57 -0
  226. data/spec/{api/operational_api_spec.rb → models/exists_spec.rb} +14 -20
  227. data/spec/models/list_merchants_response_spec.rb +2 -2
  228. data/spec/models/paylink_address_spec.rb +69 -0
  229. data/spec/models/paylink_adjustment_request_spec.rb +45 -0
  230. data/spec/models/paylink_attachment_request_spec.rb +45 -0
  231. data/spec/models/paylink_attachment_result_spec.rb +45 -0
  232. data/spec/models/paylink_bill_payment_token_request_spec.rb +63 -0
  233. data/spec/models/paylink_card_holder_spec.rb +87 -0
  234. data/spec/models/paylink_cart_item_model_spec.rb +75 -0
  235. data/spec/models/paylink_cart_spec.rb +69 -0
  236. data/spec/models/paylink_config_spec.rb +159 -0
  237. data/spec/models/paylink_custom_param_spec.rb +87 -0
  238. data/spec/models/paylink_email_notification_path_spec.rb +57 -0
  239. data/spec/models/paylink_error_code_spec.rb +39 -0
  240. data/spec/models/paylink_field_guard_model_spec.rb +45 -0
  241. data/spec/models/paylink_part_payments_spec.rb +63 -0
  242. data/spec/models/paylink_sms_notification_path_spec.rb +39 -0
  243. data/spec/models/paylink_state_event_spec.rb +45 -0
  244. data/spec/models/paylink_token_created_spec.rb +111 -0
  245. data/spec/models/paylink_token_request_model_spec.rb +91 -0
  246. data/spec/models/paylink_token_status_change_request_spec.rb +57 -0
  247. data/spec/models/paylink_token_status_change_response_spec.rb +39 -0
  248. data/spec/models/paylink_token_status_spec.rb +195 -0
  249. data/spec/models/paylink_ui_spec.rb +51 -0
  250. data/spec/models/process_batch_request_spec.rb +49 -0
  251. data/spec/models/process_batch_response_spec.rb +39 -0
  252. data/spec/models/refund_request_spec.rb +62 -0
  253. data/spec/models/register_card_spec.rb +0 -2
  254. data/spec/models/tokenisation_response_model_spec.rb +87 -0
  255. data/spec/spec_helper.rb +2 -2
  256. data/spec/utils/direct_post_mac_spec.rb +13 -0
  257. metadata +230 -44
  258. data/Gemfile.lock +0 -70
  259. data/docs/OperationalApi.md +0 -112
  260. data/docs/PaymentProcessingApi.md +0 -320
  261. data/git_push.sh +0 -58
  262. data/lib/citypay_api_client/api/operational_api.rb +0 -147
  263. data/lib/citypay_api_client/api/payment_processing_api.rb +0 -405
  264. data/lib/citypay_api_client/test.rb +0 -20
  265. 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/v6*
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
- [**account_retrieve_request**](CardHolderAccountApi.md#account_retrieve_request) | **GET** /account/{accountid} | Account Retrieval
14
- [**account_status_request**](CardHolderAccountApi.md#account_status_request) | **POST** /account/{accountid}/status | Account Status
15
- [**charge_request**](CardHolderAccountApi.md#charge_request) | **POST** /charge | Charge
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 purge will clear the card permanently.
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
- ### Example
29
+ ### Examples
28
30
 
29
31
  ```ruby
30
- # load the gem
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 "Exception when calling CardHolderAccountApi->account_card_delete_request: #{e}"
48
+ puts "Error when calling CardHolderAccountApi->account_card_delete_request: #{e}"
47
49
  end
48
50
  ```
49
51
 
50
- ### Parameters
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 | Notes
54
- ------------- | ------------- | ------------- | -------------
55
- **accountid** | **String**| The account id that refers to the customer&#39;s account no. This value will have been provided when setting up the card holder account. |
56
- **card_id** | **String**| The id of the card that is presented by a call to retrieve a card holder account. |
72
+ | Name | Type | Description | Notes |
73
+ | ---- | ---- | ----------- | ----- |
74
+ | **accountid** | **String** | The account id that refers to the customer&#39;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 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.
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
- ### Example
106
+
107
+ ### Examples
81
108
 
82
109
  ```ruby
83
- # load the gem
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 "Exception when calling CardHolderAccountApi->account_card_register_request: #{e}"
126
+ puts "Error when calling CardHolderAccountApi->account_card_register_request: #{e}"
100
127
  end
101
128
  ```
102
129
 
103
- ### Parameters
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
- Name | Type | Description | Notes
107
- ------------- | ------------- | ------------- | -------------
108
- **accountid** | **String**| The account id that refers to the customer&#39;s account no. This value will have been provided when setting up the card holder account. |
109
- **register_card** | [**RegisterCard**](RegisterCard.md)| |
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&#39;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 | 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 |
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
- ### Example
184
+ ### Examples
134
185
 
135
186
  ```ruby
136
- # load the gem
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 "Exception when calling CardHolderAccountApi->account_card_status_request: #{e}"
204
+ puts "Error when calling CardHolderAccountApi->account_card_status_request: #{e}"
154
205
  end
155
206
  ```
156
207
 
157
- ### Parameters
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
- Name | Type | Description | Notes
161
- ------------- | ------------- | ------------- | -------------
162
- **accountid** | **String**| The account id that refers to the customer&#39;s account no. This value will have been provided when setting up the card holder account. |
163
- **card_id** | **String**| The id of the card that is presented by a call to retrieve a card holder account. |
164
- **card_status** | [**CardStatus**](CardStatus.md)| |
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&#39;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
- ### Example
256
+ ### Examples
189
257
 
190
258
  ```ruby
191
- # load the gem
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 "Exception when calling CardHolderAccountApi->account_change_contact_request: #{e}"
275
+ puts "Error when calling CardHolderAccountApi->account_change_contact_request: #{e}"
208
276
  end
209
277
  ```
210
278
 
211
- ### Parameters
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
- Name | Type | Description | Notes
215
- ------------- | ------------- | ------------- | -------------
216
- **accountid** | **String**| The account id that refers to the customer&#39;s account no. This value will have been provided when setting up the card holder account. |
217
- **contact_details** | [**ContactDetails**](ContactDetails.md)| |
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&#39;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
- ### Example
326
+ ### Examples
242
327
 
243
328
  ```ruby
244
- # load the gem
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 "Exception when calling CardHolderAccountApi->account_create: #{e}"
344
+ puts "Error when calling CardHolderAccountApi->account_create: #{e}"
260
345
  end
261
346
  ```
262
347
 
263
- ### Parameters
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 | Notes
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 transactions will be alowed to be processed or actioned against this account.
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
- ### Example
395
+
396
+ ### Examples
293
397
 
294
398
  ```ruby
295
- # load the gem
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 "Exception when calling CardHolderAccountApi->account_delete_request: #{e}"
414
+ puts "Error when calling CardHolderAccountApi->account_delete_request: #{e}"
311
415
  end
312
416
  ```
313
417
 
314
- ### Parameters
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
- Name | Type | Description | Notes
318
- ------------- | ------------- | ------------- | -------------
319
- **accountid** | **String**| The account id that refers to the customer&#39;s account no. This value will have been provided when setting up the card holder account. |
436
+ ### Parameters
437
+
438
+ | Name | Type | Description | Notes |
439
+ | ---- | ---- | ----------- | ----- |
440
+ | **accountid** | **String** | The account id that refers to the customer&#39;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&#39;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 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.
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
- ### Example
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
- # load the gem
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 "Exception when calling CardHolderAccountApi->account_retrieve_request: #{e}"
557
+ puts "Error when calling CardHolderAccountApi->account_retrieve_request: #{e}"
362
558
  end
363
559
  ```
364
560
 
365
- ### Parameters
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
- Name | Type | Description | Notes
369
- ------------- | ------------- | ------------- | -------------
370
- **accountid** | **String**| The account id that refers to the customer&#39;s account no. This value will have been provided when setting up the card holder account. |
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&#39;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 | 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 |
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
- ### Example
612
+
613
+ ### Examples
395
614
 
396
615
  ```ruby
397
- # load the gem
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 "Exception when calling CardHolderAccountApi->account_status_request: #{e}"
632
+ puts "Error when calling CardHolderAccountApi->account_status_request: #{e}"
414
633
  end
415
634
  ```
416
635
 
417
- ### Parameters
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 | Notes
421
- ------------- | ------------- | ------------- | -------------
422
- **accountid** | **String**| The account id that refers to the customer&#39;s account no. This value will have been provided when setting up the card holder account. |
423
- **account_status** | [**AccountStatus**](AccountStatus.md)| |
656
+ | Name | Type | Description | Notes |
657
+ | ---- | ---- | ----------- | ----- |
658
+ | **accountid** | **String** | The account id that refers to the customer&#39;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 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.
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
- ### Example
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
- # load the gem
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 "Exception when calling CardHolderAccountApi->charge_request: #{e}"
724
+ puts "Error when calling CardHolderAccountApi->charge_request: #{e}"
466
725
  end
467
726
  ```
468
727
 
469
- ### Parameters
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 | Notes
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