citypay_api_client 1.0.3 → 1.1.1

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 (242) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +105 -34
  3. data/citypay_api_client.gemspec +4 -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 +50 -49
  14. data/docs/AuthResponse.md +60 -59
  15. data/docs/AuthenRequired.md +12 -11
  16. data/docs/AuthorisationAndPaymentApi.md +559 -0
  17. data/docs/Batch.md +22 -0
  18. data/docs/BatchProcessingApi.md +214 -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 +40 -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 +326 -105
  30. data/docs/CardStatus.md +10 -9
  31. data/docs/ChargeRequest.md +36 -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 +365 -0
  37. data/docs/DirectPostRequest.md +58 -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/OperationalApi.md +124 -22
  50. data/docs/OperationalFunctionsApi.md +355 -0
  51. data/docs/PaResAuthRequest.md +10 -9
  52. data/docs/PaylinkAddress.md +30 -0
  53. data/docs/PaylinkAdjustmentRequest.md +22 -0
  54. data/docs/PaylinkApi.md +630 -0
  55. data/docs/PaylinkAttachmentRequest.md +26 -0
  56. data/docs/PaylinkAttachmentResult.md +22 -0
  57. data/docs/PaylinkBillPaymentTokenRequest.md +32 -0
  58. data/docs/PaylinkCardHolder.md +36 -0
  59. data/docs/PaylinkCart.md +30 -0
  60. data/docs/PaylinkCartItemModel.md +32 -0
  61. data/docs/PaylinkConfig.md +60 -0
  62. data/docs/PaylinkCustomParam.md +36 -0
  63. data/docs/PaylinkEmailNotificationPath.md +26 -0
  64. data/docs/PaylinkErrorCode.md +20 -0
  65. data/docs/PaylinkFieldGuardModel.md +30 -0
  66. data/docs/PaylinkPartPayments.md +28 -0
  67. data/docs/PaylinkSMSNotificationPath.md +20 -0
  68. data/docs/PaylinkStateEvent.md +22 -0
  69. data/docs/PaylinkTokenCreated.md +44 -0
  70. data/docs/PaylinkTokenRequestModel.md +38 -0
  71. data/docs/PaylinkTokenStatus.md +72 -0
  72. data/docs/PaylinkTokenStatusChangeRequest.md +26 -0
  73. data/docs/PaylinkTokenStatusChangeResponse.md +20 -0
  74. data/docs/PaylinkUI.md +24 -0
  75. data/docs/PaymentProcessingApi.md +307 -68
  76. data/docs/Ping.md +8 -7
  77. data/docs/ProcessBatchRequest.md +24 -0
  78. data/docs/ProcessBatchResponse.md +20 -0
  79. data/docs/RefundRequest.md +26 -0
  80. data/docs/RegisterCard.md +16 -13
  81. data/docs/RequestChallenged.md +16 -15
  82. data/docs/RetrieveRequest.md +12 -11
  83. data/docs/ThreeDSecure.md +32 -15
  84. data/docs/TokenisationResponseModel.md +36 -0
  85. data/docs/VoidRequest.md +12 -13
  86. data/lib/.DS_Store +0 -0
  87. data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +565 -0
  88. data/lib/citypay_api_client/api/batch_processing_api__.rb +225 -0
  89. data/lib/citypay_api_client/api/{card_holder_account_api.rb → card_holder_account_api__.rb} +136 -46
  90. data/lib/citypay_api_client/api/direct_post_api__.rb +373 -0
  91. data/lib/citypay_api_client/api/operational_functions_api__.rb +356 -0
  92. data/lib/citypay_api_client/api/paylink_api__.rb +614 -0
  93. data/lib/citypay_api_client/api_client.rb +59 -59
  94. data/lib/citypay_api_client/api_error.rb +2 -2
  95. data/lib/citypay_api_client/configuration.rb +53 -15
  96. data/lib/citypay_api_client/models/account_create.rb +21 -8
  97. data/lib/citypay_api_client/models/account_status.rb +21 -8
  98. data/lib/citypay_api_client/models/acknowledgement.rb +21 -8
  99. data/lib/citypay_api_client/models/acl_check_request.rb +224 -0
  100. data/lib/citypay_api_client/models/acl_check_response_model.rb +249 -0
  101. data/lib/citypay_api_client/models/airline_advice.rb +23 -10
  102. data/lib/citypay_api_client/models/airline_segment.rb +21 -8
  103. data/lib/citypay_api_client/models/auth_reference.rb +45 -11
  104. data/lib/citypay_api_client/models/auth_references.rb +21 -8
  105. data/lib/citypay_api_client/models/auth_request.rb +79 -35
  106. data/lib/citypay_api_client/models/auth_response.rb +43 -106
  107. data/lib/citypay_api_client/models/authen_required.rb +21 -8
  108. data/lib/citypay_api_client/models/batch.rb +264 -0
  109. data/lib/citypay_api_client/models/batch_report_request.rb +277 -0
  110. data/lib/citypay_api_client/models/batch_report_response_model.rb +357 -0
  111. data/lib/citypay_api_client/models/batch_transaction.rb +321 -0
  112. data/lib/citypay_api_client/models/batch_transaction_result_model.rb +421 -0
  113. data/lib/citypay_api_client/models/bin.rb +299 -0
  114. data/lib/citypay_api_client/models/bin_lookup.rb +234 -0
  115. data/lib/citypay_api_client/models/c_res_auth_request.rb +21 -8
  116. data/lib/citypay_api_client/models/capture_request.rb +38 -22
  117. data/lib/citypay_api_client/models/card.rb +67 -10
  118. data/lib/citypay_api_client/models/card_holder_account.rb +35 -12
  119. data/lib/citypay_api_client/models/card_status.rb +21 -8
  120. data/lib/citypay_api_client/models/charge_request.rb +96 -26
  121. data/lib/citypay_api_client/models/check_batch_status.rb +259 -0
  122. data/lib/citypay_api_client/models/check_batch_status_response.rb +220 -0
  123. data/lib/citypay_api_client/models/contact_details.rb +87 -44
  124. data/lib/citypay_api_client/models/decision.rb +21 -8
  125. data/lib/citypay_api_client/models/direct_post_request.rb +670 -0
  126. data/lib/citypay_api_client/models/direct_token_auth_request.rb +249 -0
  127. data/lib/citypay_api_client/models/domain_key_check_request.rb +252 -0
  128. data/lib/citypay_api_client/models/domain_key_request.rb +250 -0
  129. data/lib/citypay_api_client/models/domain_key_response.rb +294 -0
  130. data/lib/citypay_api_client/models/error.rb +35 -12
  131. data/lib/citypay_api_client/models/event_data_model.rb +259 -0
  132. data/lib/citypay_api_client/models/exists.rb +244 -0
  133. data/lib/citypay_api_client/models/external_mpi.rb +27 -8
  134. data/lib/citypay_api_client/models/list_merchants_response.rb +21 -8
  135. data/lib/citypay_api_client/models/mcc6012.rb +21 -8
  136. data/lib/citypay_api_client/models/merchant.rb +21 -8
  137. data/lib/citypay_api_client/models/pa_res_auth_request.rb +22 -9
  138. data/lib/citypay_api_client/models/paylink_address.rb +402 -0
  139. data/lib/citypay_api_client/models/paylink_adjustment_request.rb +269 -0
  140. data/lib/citypay_api_client/models/paylink_attachment_request.rb +269 -0
  141. data/lib/citypay_api_client/models/paylink_attachment_result.rb +249 -0
  142. data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +292 -0
  143. data/lib/citypay_api_client/models/paylink_card_holder.rb +353 -0
  144. data/lib/citypay_api_client/models/paylink_cart.rb +280 -0
  145. data/lib/citypay_api_client/models/paylink_cart_item_model.rb +289 -0
  146. data/lib/citypay_api_client/models/paylink_config.rb +433 -0
  147. data/lib/citypay_api_client/models/paylink_custom_param.rb +314 -0
  148. data/lib/citypay_api_client/models/paylink_email_notification_path.rb +268 -0
  149. data/lib/citypay_api_client/models/paylink_error_code.rb +239 -0
  150. data/lib/citypay_api_client/models/paylink_field_guard_model.rb +279 -0
  151. data/lib/citypay_api_client/models/paylink_part_payments.rb +269 -0
  152. data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +234 -0
  153. data/lib/citypay_api_client/models/paylink_state_event.rb +239 -0
  154. data/lib/citypay_api_client/models/paylink_token_created.rb +364 -0
  155. data/lib/citypay_api_client/models/paylink_token_request_model.rb +374 -0
  156. data/lib/citypay_api_client/models/paylink_token_status.rb +490 -0
  157. data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +270 -0
  158. data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +235 -0
  159. data/lib/citypay_api_client/models/paylink_ui.rb +249 -0
  160. data/lib/citypay_api_client/models/ping.rb +21 -8
  161. data/lib/citypay_api_client/models/process_batch_request.rb +308 -0
  162. data/lib/citypay_api_client/models/process_batch_response.rb +234 -0
  163. data/lib/citypay_api_client/models/refund_request.rb +332 -0
  164. data/lib/citypay_api_client/models/register_card.rb +59 -12
  165. data/lib/citypay_api_client/models/request_challenged.rb +29 -16
  166. data/lib/citypay_api_client/models/retrieve_request.rb +21 -8
  167. data/lib/citypay_api_client/models/three_d_secure.rb +106 -13
  168. data/lib/citypay_api_client/models/tokenisation_response_model.rb +333 -0
  169. data/lib/citypay_api_client/models/void_request.rb +22 -21
  170. data/lib/citypay_api_client/utils/digest_utils.rb +18 -0
  171. data/lib/citypay_api_client/utils/direct_post_mac.rb +22 -0
  172. data/lib/citypay_api_client/version.rb +3 -4
  173. data/lib/citypay_api_client.rb +53 -6
  174. data/spec/.DS_Store +0 -0
  175. data/spec/api/authorisation_and_payment_api___spec.rb +130 -0
  176. data/spec/api/batch_processing_api___spec.rb +70 -0
  177. data/spec/api/{card_holder_account_api_spec.rb → card_holder_account_api___spec.rb} +15 -3
  178. data/spec/api/direct_post_api___spec.rb +98 -0
  179. data/spec/api/operational_functions_api___spec.rb +94 -0
  180. data/spec/api/paylink_api___spec.rb +131 -0
  181. data/spec/api_client_spec.rb +4 -4
  182. data/spec/configuration_spec.rb +5 -5
  183. data/spec/it_api_sandbox_spec.rb +126 -58
  184. data/spec/models/acknowledgement_spec.rb +7 -22
  185. data/spec/models/acl_check_request_spec.rb +33 -0
  186. data/spec/models/acl_check_response_model_spec.rb +51 -0
  187. data/spec/models/auth_references_spec.rb +7 -8
  188. data/spec/models/auth_response_spec.rb +29 -30
  189. data/spec/models/batch_report_request_spec.rb +39 -0
  190. data/spec/models/batch_report_response_model_spec.rb +63 -0
  191. data/spec/models/batch_spec.rb +45 -0
  192. data/spec/models/batch_transaction_result_model_spec.rb +87 -0
  193. data/spec/models/batch_transaction_spec.rb +51 -0
  194. data/spec/models/bin_lookup_spec.rb +33 -0
  195. data/spec/models/bin_spec.rb +81 -0
  196. data/spec/models/card_holder_account_spec.rb +8 -5
  197. data/spec/models/check_batch_status_response_spec.rb +45 -0
  198. data/spec/models/check_batch_status_spec.rb +39 -0
  199. data/spec/models/decision_spec.rb +1 -1
  200. data/spec/models/direct_post_request_spec.rb +153 -0
  201. data/spec/models/direct_token_auth_request_spec.rb +51 -0
  202. data/spec/models/domain_key_check_request_spec.rb +33 -0
  203. data/spec/models/domain_key_request_spec.rb +45 -0
  204. data/spec/models/domain_key_response_spec.rb +57 -0
  205. data/spec/models/event_data_model_spec.rb +57 -0
  206. data/spec/{api/operational_api_spec.rb → models/exists_spec.rb} +14 -20
  207. data/spec/models/list_merchants_response_spec.rb +2 -2
  208. data/spec/models/paylink_address_spec.rb +69 -0
  209. data/spec/models/paylink_adjustment_request_spec.rb +45 -0
  210. data/spec/models/paylink_attachment_request_spec.rb +45 -0
  211. data/spec/models/paylink_attachment_result_spec.rb +45 -0
  212. data/spec/models/paylink_bill_payment_token_request_spec.rb +63 -0
  213. data/spec/models/paylink_card_holder_spec.rb +87 -0
  214. data/spec/models/paylink_cart_item_model_spec.rb +75 -0
  215. data/spec/models/paylink_cart_spec.rb +69 -0
  216. data/spec/models/paylink_config_spec.rb +159 -0
  217. data/spec/models/paylink_custom_param_spec.rb +87 -0
  218. data/spec/models/paylink_email_notification_path_spec.rb +57 -0
  219. data/spec/models/paylink_error_code_spec.rb +39 -0
  220. data/spec/models/paylink_field_guard_model_spec.rb +45 -0
  221. data/spec/models/paylink_part_payments_spec.rb +63 -0
  222. data/spec/models/paylink_sms_notification_path_spec.rb +39 -0
  223. data/spec/models/paylink_state_event_spec.rb +45 -0
  224. data/spec/models/paylink_token_created_spec.rb +111 -0
  225. data/spec/models/paylink_token_request_model_spec.rb +93 -0
  226. data/spec/models/paylink_token_status_change_request_spec.rb +57 -0
  227. data/spec/models/paylink_token_status_change_response_spec.rb +39 -0
  228. data/spec/models/paylink_token_status_spec.rb +195 -0
  229. data/spec/models/paylink_ui_spec.rb +51 -0
  230. data/spec/models/process_batch_request_spec.rb +51 -0
  231. data/spec/models/process_batch_response_spec.rb +39 -0
  232. data/spec/models/refund_request_spec.rb +64 -0
  233. data/spec/models/tokenisation_response_model_spec.rb +87 -0
  234. data/spec/spec_helper.rb +2 -2
  235. data/spec/utils/direct_post_mac_spec.rb +13 -0
  236. metadata +210 -37
  237. data/Gemfile.lock +0 -70
  238. data/git_push.sh +0 -58
  239. data/lib/citypay_api_client/api/operational_api.rb +0 -147
  240. data/lib/citypay_api_client/api/payment_processing_api.rb +0 -405
  241. data/lib/citypay_api_client/test.rb +0 -20
  242. data/spec/api/payment_processing_api_spec.rb +0 -106
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #CityPay Payment API
3
+
4
+ # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
+
6
+ Contact: support@citypay.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 6.2.1
9
+
10
+ =end
11
+
12
+ require 'cgi'
13
+
14
+ module CityPayApiClient
15
+ class BatchProcessingApi
16
+ attr_accessor :api_client
17
+
18
+ def initialize(api_client = ApiClient.default)
19
+ @api_client = api_client
20
+ end
21
+ # Batch Process Request
22
+ # A batch process request is used to start the batch process workflow by uploading batch data and initialising a new batch for processing. Once validated the batch will be queued for processing and further updates can be received by a subsequent call to retrieve the batch status.
23
+ # @param process_batch_request [ProcessBatchRequest]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [ProcessBatchResponse]
26
+ def batch_process_request(process_batch_request, opts = {})
27
+ data, _status_code, _headers = batch_process_request_with_http_info(process_batch_request, opts)
28
+ data
29
+ end
30
+
31
+ # Batch Process Request
32
+ # A batch process request is used to start the batch process workflow by uploading batch data and initialising a new batch for processing. Once validated the batch will be queued for processing and further updates can be received by a subsequent call to retrieve the batch status.
33
+ # @param process_batch_request [ProcessBatchRequest]
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(ProcessBatchResponse, Integer, Hash)>] ProcessBatchResponse data, response status code and response headers
36
+ def batch_process_request_with_http_info(process_batch_request, opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug 'Calling API: BatchProcessingApi.batch_process_request ...'
39
+ end
40
+ # verify the required parameter 'process_batch_request' is set
41
+ if @api_client.config.client_side_validation && process_batch_request.nil?
42
+ fail ArgumentError, "Missing the required parameter 'process_batch_request' when calling BatchProcessingApi.batch_process_request"
43
+ end
44
+ # resource path
45
+ local_var_path = '/v6/batch/process'
46
+
47
+ # query parameters
48
+ query_params = opts[:query_params] || {}
49
+
50
+ # header parameters
51
+ header_params = opts[:header_params] || {}
52
+ # HTTP header 'Accept' (if needed)
53
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
54
+ # HTTP header 'Content-Type'
55
+ content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
56
+ if !content_type.nil?
57
+ header_params['Content-Type'] = content_type
58
+ end
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(process_batch_request)
65
+
66
+ # return_type
67
+ return_type = opts[:debug_return_type] || 'ProcessBatchResponse'
68
+
69
+ # auth_names
70
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
71
+
72
+ new_options = opts.merge(
73
+ :operation => :"BatchProcessingApi.batch_process_request",
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: BatchProcessingApi#batch_process_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # BatchReportRequest
90
+ # The operation is used to retrieve a report of the result of a batch process.
91
+ # @param batch_report_request [BatchReportRequest]
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [BatchReportResponseModel]
94
+ def batch_report_request(batch_report_request, opts = {})
95
+ data, _status_code, _headers = batch_report_request_with_http_info(batch_report_request, opts)
96
+ data
97
+ end
98
+
99
+ # BatchReportRequest
100
+ # The operation is used to retrieve a report of the result of a batch process.
101
+ # @param batch_report_request [BatchReportRequest]
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(BatchReportResponseModel, Integer, Hash)>] BatchReportResponseModel data, response status code and response headers
104
+ def batch_report_request_with_http_info(batch_report_request, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: BatchProcessingApi.batch_report_request ...'
107
+ end
108
+ # verify the required parameter 'batch_report_request' is set
109
+ if @api_client.config.client_side_validation && batch_report_request.nil?
110
+ fail ArgumentError, "Missing the required parameter 'batch_report_request' when calling BatchProcessingApi.batch_report_request"
111
+ end
112
+ # resource path
113
+ local_var_path = '/v6/batch/retrieve'
114
+
115
+ # query parameters
116
+ query_params = opts[:query_params] || {}
117
+
118
+ # header parameters
119
+ header_params = opts[:header_params] || {}
120
+ # HTTP header 'Accept' (if needed)
121
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
122
+ # HTTP header 'Content-Type'
123
+ content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
124
+ if !content_type.nil?
125
+ header_params['Content-Type'] = content_type
126
+ end
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_report_request)
133
+
134
+ # return_type
135
+ return_type = opts[:debug_return_type] || 'BatchReportResponseModel'
136
+
137
+ # auth_names
138
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
139
+
140
+ new_options = opts.merge(
141
+ :operation => :"BatchProcessingApi.batch_report_request",
142
+ :header_params => header_params,
143
+ :query_params => query_params,
144
+ :form_params => form_params,
145
+ :body => post_body,
146
+ :auth_names => auth_names,
147
+ :return_type => return_type
148
+ )
149
+
150
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
151
+ if @api_client.config.debugging
152
+ @api_client.config.logger.debug "API called: BatchProcessingApi#batch_report_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
153
+ end
154
+ return data, status_code, headers
155
+ end
156
+
157
+ # CheckBatchStatus
158
+ # The operation is used to retrieve the status of a batch process.
159
+ # @param check_batch_status [CheckBatchStatus]
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [CheckBatchStatusResponse]
162
+ def check_batch_status_request(check_batch_status, opts = {})
163
+ data, _status_code, _headers = check_batch_status_request_with_http_info(check_batch_status, opts)
164
+ data
165
+ end
166
+
167
+ # CheckBatchStatus
168
+ # The operation is used to retrieve the status of a batch process.
169
+ # @param check_batch_status [CheckBatchStatus]
170
+ # @param [Hash] opts the optional parameters
171
+ # @return [Array<(CheckBatchStatusResponse, Integer, Hash)>] CheckBatchStatusResponse data, response status code and response headers
172
+ def check_batch_status_request_with_http_info(check_batch_status, opts = {})
173
+ if @api_client.config.debugging
174
+ @api_client.config.logger.debug 'Calling API: BatchProcessingApi.check_batch_status_request ...'
175
+ end
176
+ # verify the required parameter 'check_batch_status' is set
177
+ if @api_client.config.client_side_validation && check_batch_status.nil?
178
+ fail ArgumentError, "Missing the required parameter 'check_batch_status' when calling BatchProcessingApi.check_batch_status_request"
179
+ end
180
+ # resource path
181
+ local_var_path = '/v6/batch/status'
182
+
183
+ # query parameters
184
+ query_params = opts[:query_params] || {}
185
+
186
+ # header parameters
187
+ header_params = opts[:header_params] || {}
188
+ # HTTP header 'Accept' (if needed)
189
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
190
+ # HTTP header 'Content-Type'
191
+ content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
192
+ if !content_type.nil?
193
+ header_params['Content-Type'] = content_type
194
+ end
195
+
196
+ # form parameters
197
+ form_params = opts[:form_params] || {}
198
+
199
+ # http body (model)
200
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(check_batch_status)
201
+
202
+ # return_type
203
+ return_type = opts[:debug_return_type] || 'CheckBatchStatusResponse'
204
+
205
+ # auth_names
206
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
207
+
208
+ new_options = opts.merge(
209
+ :operation => :"BatchProcessingApi.check_batch_status_request",
210
+ :header_params => header_params,
211
+ :query_params => query_params,
212
+ :form_params => form_params,
213
+ :body => post_body,
214
+ :auth_names => auth_names,
215
+ :return_type => return_type
216
+ )
217
+
218
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: BatchProcessingApi#check_batch_status_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ return data, status_code, headers
223
+ end
224
+ end
225
+ end
@@ -1,11 +1,11 @@
1
1
  =begin
2
2
  #CityPay Payment API
3
3
 
4
- # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
4
+ # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 5.0.0-SNAPSHOT
8
+ OpenAPI Generator version: 6.2.1
9
9
 
10
10
  =end
11
11
 
@@ -48,7 +48,7 @@ module CityPayApiClient
48
48
  fail ArgumentError, "Missing the required parameter 'card_id' when calling CardHolderAccountApi.account_card_delete_request"
49
49
  end
50
50
  # resource path
51
- local_var_path = '/account/{accountid}/card/{cardId}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
51
+ local_var_path = '/v6/account/{accountid}/card/{cardId}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
52
52
 
53
53
  # query parameters
54
54
  query_params = opts[:query_params] || {}
@@ -62,15 +62,16 @@ module CityPayApiClient
62
62
  form_params = opts[:form_params] || {}
63
63
 
64
64
  # http body (model)
65
- post_body = opts[:body]
65
+ post_body = opts[:debug_body]
66
66
 
67
67
  # return_type
68
- return_type = opts[:return_type] || 'Acknowledgement'
68
+ return_type = opts[:debug_return_type] || 'Acknowledgement'
69
69
 
70
70
  # auth_names
71
- auth_names = opts[:auth_names] || ['cp-api-key']
71
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
72
72
 
73
73
  new_options = opts.merge(
74
+ :operation => :"CardHolderAccountApi.account_card_delete_request",
74
75
  :header_params => header_params,
75
76
  :query_params => query_params,
76
77
  :form_params => form_params,
@@ -116,7 +117,7 @@ module CityPayApiClient
116
117
  fail ArgumentError, "Missing the required parameter 'register_card' when calling CardHolderAccountApi.account_card_register_request"
117
118
  end
118
119
  # resource path
119
- local_var_path = '/account/{accountid}/register'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
120
+ local_var_path = '/v6/account/{accountid}/register'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
120
121
 
121
122
  # query parameters
122
123
  query_params = opts[:query_params] || {}
@@ -126,21 +127,25 @@ module CityPayApiClient
126
127
  # HTTP header 'Accept' (if needed)
127
128
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
128
129
  # HTTP header 'Content-Type'
129
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml'])
130
+ content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
131
+ if !content_type.nil?
132
+ header_params['Content-Type'] = content_type
133
+ end
130
134
 
131
135
  # form parameters
132
136
  form_params = opts[:form_params] || {}
133
137
 
134
138
  # http body (model)
135
- post_body = opts[:body] || @api_client.object_to_http_body(register_card)
139
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(register_card)
136
140
 
137
141
  # return_type
138
- return_type = opts[:return_type] || 'CardHolderAccount'
142
+ return_type = opts[:debug_return_type] || 'CardHolderAccount'
139
143
 
140
144
  # auth_names
141
- auth_names = opts[:auth_names] || ['cp-api-key']
145
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
142
146
 
143
147
  new_options = opts.merge(
148
+ :operation => :"CardHolderAccountApi.account_card_register_request",
144
149
  :header_params => header_params,
145
150
  :query_params => query_params,
146
151
  :form_params => form_params,
@@ -192,7 +197,7 @@ module CityPayApiClient
192
197
  fail ArgumentError, "Missing the required parameter 'card_status' when calling CardHolderAccountApi.account_card_status_request"
193
198
  end
194
199
  # resource path
195
- local_var_path = '/account/{accountid}/card/{cardId}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
200
+ local_var_path = '/v6/account/{accountid}/card/{cardId}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s)).sub('{' + 'cardId' + '}', CGI.escape(card_id.to_s))
196
201
 
197
202
  # query parameters
198
203
  query_params = opts[:query_params] || {}
@@ -202,21 +207,25 @@ module CityPayApiClient
202
207
  # HTTP header 'Accept' (if needed)
203
208
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
204
209
  # HTTP header 'Content-Type'
205
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml'])
210
+ content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
211
+ if !content_type.nil?
212
+ header_params['Content-Type'] = content_type
213
+ end
206
214
 
207
215
  # form parameters
208
216
  form_params = opts[:form_params] || {}
209
217
 
210
218
  # http body (model)
211
- post_body = opts[:body] || @api_client.object_to_http_body(card_status)
219
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(card_status)
212
220
 
213
221
  # return_type
214
- return_type = opts[:return_type] || 'Acknowledgement'
222
+ return_type = opts[:debug_return_type] || 'Acknowledgement'
215
223
 
216
224
  # auth_names
217
- auth_names = opts[:auth_names] || ['cp-api-key']
225
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
218
226
 
219
227
  new_options = opts.merge(
228
+ :operation => :"CardHolderAccountApi.account_card_status_request",
220
229
  :header_params => header_params,
221
230
  :query_params => query_params,
222
231
  :form_params => form_params,
@@ -262,7 +271,7 @@ module CityPayApiClient
262
271
  fail ArgumentError, "Missing the required parameter 'contact_details' when calling CardHolderAccountApi.account_change_contact_request"
263
272
  end
264
273
  # resource path
265
- local_var_path = '/account/{accountid}/contact'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
274
+ local_var_path = '/v6/account/{accountid}/contact'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
266
275
 
267
276
  # query parameters
268
277
  query_params = opts[:query_params] || {}
@@ -272,21 +281,25 @@ module CityPayApiClient
272
281
  # HTTP header 'Accept' (if needed)
273
282
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
274
283
  # HTTP header 'Content-Type'
275
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml'])
284
+ content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
285
+ if !content_type.nil?
286
+ header_params['Content-Type'] = content_type
287
+ end
276
288
 
277
289
  # form parameters
278
290
  form_params = opts[:form_params] || {}
279
291
 
280
292
  # http body (model)
281
- post_body = opts[:body] || @api_client.object_to_http_body(contact_details)
293
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(contact_details)
282
294
 
283
295
  # return_type
284
- return_type = opts[:return_type] || 'CardHolderAccount'
296
+ return_type = opts[:debug_return_type] || 'CardHolderAccount'
285
297
 
286
298
  # auth_names
287
- auth_names = opts[:auth_names] || ['cp-api-key']
299
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
288
300
 
289
301
  new_options = opts.merge(
302
+ :operation => :"CardHolderAccountApi.account_change_contact_request",
290
303
  :header_params => header_params,
291
304
  :query_params => query_params,
292
305
  :form_params => form_params,
@@ -326,7 +339,7 @@ module CityPayApiClient
326
339
  fail ArgumentError, "Missing the required parameter 'account_create' when calling CardHolderAccountApi.account_create"
327
340
  end
328
341
  # resource path
329
- local_var_path = '/account/create'
342
+ local_var_path = '/v6/account/create'
330
343
 
331
344
  # query parameters
332
345
  query_params = opts[:query_params] || {}
@@ -336,21 +349,25 @@ module CityPayApiClient
336
349
  # HTTP header 'Accept' (if needed)
337
350
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
338
351
  # HTTP header 'Content-Type'
339
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml'])
352
+ content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
353
+ if !content_type.nil?
354
+ header_params['Content-Type'] = content_type
355
+ end
340
356
 
341
357
  # form parameters
342
358
  form_params = opts[:form_params] || {}
343
359
 
344
360
  # http body (model)
345
- post_body = opts[:body] || @api_client.object_to_http_body(account_create)
361
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(account_create)
346
362
 
347
363
  # return_type
348
- return_type = opts[:return_type] || 'CardHolderAccount'
364
+ return_type = opts[:debug_return_type] || 'CardHolderAccount'
349
365
 
350
366
  # auth_names
351
- auth_names = opts[:auth_names] || ['cp-api-key']
367
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
352
368
 
353
369
  new_options = opts.merge(
370
+ :operation => :"CardHolderAccountApi.account_create",
354
371
  :header_params => header_params,
355
372
  :query_params => query_params,
356
373
  :form_params => form_params,
@@ -390,7 +407,7 @@ module CityPayApiClient
390
407
  fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_delete_request"
391
408
  end
392
409
  # resource path
393
- local_var_path = '/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
410
+ local_var_path = '/v6/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
394
411
 
395
412
  # query parameters
396
413
  query_params = opts[:query_params] || {}
@@ -404,15 +421,16 @@ module CityPayApiClient
404
421
  form_params = opts[:form_params] || {}
405
422
 
406
423
  # http body (model)
407
- post_body = opts[:body]
424
+ post_body = opts[:debug_body]
408
425
 
409
426
  # return_type
410
- return_type = opts[:return_type] || 'Acknowledgement'
427
+ return_type = opts[:debug_return_type] || 'Acknowledgement'
411
428
 
412
429
  # auth_names
413
- auth_names = opts[:auth_names] || ['cp-api-key']
430
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
414
431
 
415
432
  new_options = opts.merge(
433
+ :operation => :"CardHolderAccountApi.account_delete_request",
416
434
  :header_params => header_params,
417
435
  :query_params => query_params,
418
436
  :form_params => form_params,
@@ -428,6 +446,69 @@ module CityPayApiClient
428
446
  return data, status_code, headers
429
447
  end
430
448
 
449
+ # Account Exists
450
+ # Checks that an account exists and is active by providing the account id as a url parameter.
451
+ # @param 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.
452
+ # @param [Hash] opts the optional parameters
453
+ # @return [Exists]
454
+ def account_exists_request(accountid, opts = {})
455
+ data, _status_code, _headers = account_exists_request_with_http_info(accountid, opts)
456
+ data
457
+ end
458
+
459
+ # Account Exists
460
+ # Checks that an account exists and is active by providing the account id as a url parameter.
461
+ # @param 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.
462
+ # @param [Hash] opts the optional parameters
463
+ # @return [Array<(Exists, Integer, Hash)>] Exists data, response status code and response headers
464
+ def account_exists_request_with_http_info(accountid, opts = {})
465
+ if @api_client.config.debugging
466
+ @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_exists_request ...'
467
+ end
468
+ # verify the required parameter 'accountid' is set
469
+ if @api_client.config.client_side_validation && accountid.nil?
470
+ fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_exists_request"
471
+ end
472
+ # resource path
473
+ local_var_path = '/v6/account-exists/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
474
+
475
+ # query parameters
476
+ query_params = opts[:query_params] || {}
477
+
478
+ # header parameters
479
+ header_params = opts[:header_params] || {}
480
+ # HTTP header 'Accept' (if needed)
481
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
482
+
483
+ # form parameters
484
+ form_params = opts[:form_params] || {}
485
+
486
+ # http body (model)
487
+ post_body = opts[:debug_body]
488
+
489
+ # return_type
490
+ return_type = opts[:debug_return_type] || 'Exists'
491
+
492
+ # auth_names
493
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
494
+
495
+ new_options = opts.merge(
496
+ :operation => :"CardHolderAccountApi.account_exists_request",
497
+ :header_params => header_params,
498
+ :query_params => query_params,
499
+ :form_params => form_params,
500
+ :body => post_body,
501
+ :auth_names => auth_names,
502
+ :return_type => return_type
503
+ )
504
+
505
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
506
+ if @api_client.config.debugging
507
+ @api_client.config.logger.debug "API called: CardHolderAccountApi#account_exists_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
508
+ end
509
+ return data, status_code, headers
510
+ end
511
+
431
512
  # Account Retrieval
432
513
  # 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.
433
514
  # @param 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.
@@ -452,7 +533,7 @@ module CityPayApiClient
452
533
  fail ArgumentError, "Missing the required parameter 'accountid' when calling CardHolderAccountApi.account_retrieve_request"
453
534
  end
454
535
  # resource path
455
- local_var_path = '/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
536
+ local_var_path = '/v6/account/{accountid}'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
456
537
 
457
538
  # query parameters
458
539
  query_params = opts[:query_params] || {}
@@ -466,15 +547,16 @@ module CityPayApiClient
466
547
  form_params = opts[:form_params] || {}
467
548
 
468
549
  # http body (model)
469
- post_body = opts[:body]
550
+ post_body = opts[:debug_body]
470
551
 
471
552
  # return_type
472
- return_type = opts[:return_type] || 'CardHolderAccount'
553
+ return_type = opts[:debug_return_type] || 'CardHolderAccount'
473
554
 
474
555
  # auth_names
475
- auth_names = opts[:auth_names] || ['cp-api-key']
556
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
476
557
 
477
558
  new_options = opts.merge(
559
+ :operation => :"CardHolderAccountApi.account_retrieve_request",
478
560
  :header_params => header_params,
479
561
  :query_params => query_params,
480
562
  :form_params => form_params,
@@ -520,7 +602,7 @@ module CityPayApiClient
520
602
  fail ArgumentError, "Missing the required parameter 'account_status' when calling CardHolderAccountApi.account_status_request"
521
603
  end
522
604
  # resource path
523
- local_var_path = '/account/{accountid}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
605
+ local_var_path = '/v6/account/{accountid}/status'.sub('{' + 'accountid' + '}', CGI.escape(accountid.to_s))
524
606
 
525
607
  # query parameters
526
608
  query_params = opts[:query_params] || {}
@@ -530,21 +612,25 @@ module CityPayApiClient
530
612
  # HTTP header 'Accept' (if needed)
531
613
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
532
614
  # HTTP header 'Content-Type'
533
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml'])
615
+ content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
616
+ if !content_type.nil?
617
+ header_params['Content-Type'] = content_type
618
+ end
534
619
 
535
620
  # form parameters
536
621
  form_params = opts[:form_params] || {}
537
622
 
538
623
  # http body (model)
539
- post_body = opts[:body] || @api_client.object_to_http_body(account_status)
624
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(account_status)
540
625
 
541
626
  # return_type
542
- return_type = opts[:return_type] || 'Acknowledgement'
627
+ return_type = opts[:debug_return_type] || 'Acknowledgement'
543
628
 
544
629
  # auth_names
545
- auth_names = opts[:auth_names] || ['cp-api-key']
630
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
546
631
 
547
632
  new_options = opts.merge(
633
+ :operation => :"CardHolderAccountApi.account_status_request",
548
634
  :header_params => header_params,
549
635
  :query_params => query_params,
550
636
  :form_params => form_params,
@@ -561,7 +647,7 @@ module CityPayApiClient
561
647
  end
562
648
 
563
649
  # Charge
564
- # 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.
650
+ # A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account. A card must previously be registered by calling `/account-register-card` with the card details or retrieved using `/account-retrieve` Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage _Should an account be used with 3DSv2, the card holder name should also be stored alongside the card as this is a required field with both Visa and MasterCard for risk analysis._.
565
651
  # @param charge_request [ChargeRequest]
566
652
  # @param [Hash] opts the optional parameters
567
653
  # @return [Decision]
@@ -571,7 +657,7 @@ module CityPayApiClient
571
657
  end
572
658
 
573
659
  # Charge
574
- # 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 &#x60;/account-register-card&#x60; with the card details or retrieved using &#x60;/account-retrieve&#x60; 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.
660
+ # 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 &#x60;/account-register-card&#x60; with the card details or retrieved using &#x60;/account-retrieve&#x60; Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage _Should an account be used with 3DSv2, the card holder name should also be stored alongside the card as this is a required field with both Visa and MasterCard for risk analysis._.
575
661
  # @param charge_request [ChargeRequest]
576
662
  # @param [Hash] opts the optional parameters
577
663
  # @return [Array<(Decision, Integer, Hash)>] Decision data, response status code and response headers
@@ -584,7 +670,7 @@ module CityPayApiClient
584
670
  fail ArgumentError, "Missing the required parameter 'charge_request' when calling CardHolderAccountApi.charge_request"
585
671
  end
586
672
  # resource path
587
- local_var_path = '/charge'
673
+ local_var_path = '/v6/charge'
588
674
 
589
675
  # query parameters
590
676
  query_params = opts[:query_params] || {}
@@ -594,21 +680,25 @@ module CityPayApiClient
594
680
  # HTTP header 'Accept' (if needed)
595
681
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/xml'])
596
682
  # HTTP header 'Content-Type'
597
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/xml'])
683
+ content_type = @api_client.select_header_content_type(['application/json', 'text/xml'])
684
+ if !content_type.nil?
685
+ header_params['Content-Type'] = content_type
686
+ end
598
687
 
599
688
  # form parameters
600
689
  form_params = opts[:form_params] || {}
601
690
 
602
691
  # http body (model)
603
- post_body = opts[:body] || @api_client.object_to_http_body(charge_request)
692
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(charge_request)
604
693
 
605
694
  # return_type
606
- return_type = opts[:return_type] || 'Decision'
695
+ return_type = opts[:debug_return_type] || 'Decision'
607
696
 
608
697
  # auth_names
609
- auth_names = opts[:auth_names] || ['cp-api-key']
698
+ auth_names = opts[:debug_auth_names] || ['cp-api-key']
610
699
 
611
700
  new_options = opts.merge(
701
+ :operation => :"CardHolderAccountApi.charge_request",
612
702
  :header_params => header_params,
613
703
  :query_params => query_params,
614
704
  :form_params => form_params,