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,15 +1,16 @@
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 an 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 tokenized payments using cardholder 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](https://citypay.github.io/api-docs/payment-api/#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 cardholder 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: 7.2.0
9
9
 
10
10
  =end
11
11
 
12
12
  require 'date'
13
+ require 'time'
13
14
 
14
15
  module CityPayApiClient
15
16
  class AuthResponse
@@ -25,13 +26,13 @@ module CityPayApiClient
25
26
  # The authorisation code as returned by the card issuer or acquiring bank when a transaction has successfully been authorised. Authorisation codes contain alphanumeric values. Whilst the code confirms authorisation it should not be used to determine whether a transaction was successfully processed. For instance an auth code may be returned when a transaction has been subsequently declined due to a CSC mismatch.
26
27
  attr_accessor :authcode
27
28
 
28
- # The result of any authentication using 3d_secure authorisation against ecommerce transactions. Values are | Value | Description | |-------|-------------| | Y | Authentication Successful. The Cardholder's password was successfully validated. | | N | Authentication Failed. Customer failed or cancelled authentication, transaction denied. | | A | Attempts Processing Performed Authentication could not be completed but a proof of authentication attempt (CAVV) was generated | | U | Authentication Could Not Be Performed Authentication could not be completed, due to technical or other problem |
29
+ # The result of any authentication using 3d_secure authorisation against ecommerce transactions. Values are: <table> <tr> <th>Value</th> <th>Description</th> </tr> <tr> <td>Y</td> <td>Authentication Successful. The Cardholder's password was successfully validated.</td> </tr> <tr> <td>N</td> <td>Authentication Failed. Customer failed or cancelled authentication, transaction denied.</td> </tr> <tr> <td>A</td> <td>Attempts Processing Performed Authentication could not be completed but a proof of authentication attempt (CAVV) was generated.</td> </tr> <tr> <td>U</td> <td>Authentication Could Not Be Performed Authentication could not be completed, due to technical or other problem.</td> </tr> </table>
29
30
  attr_accessor :authen_result
30
31
 
31
- # A boolean definition that indicates that the transaction was authorised. It will return false if the transaction was declined, rejected or cancelled due to CSC matching failures. Attention should be referenced to the AuthResult and Response code for accurate determination of the result.
32
+ # A boolean definition that indicates that the transaction was authorised. It will return false if the transaction was declined, rejected or cancelled due to CSC matching failures. Attention should be referenced to the AuthResult and Response code for accurate determination of the result.
32
33
  attr_accessor :authorised
33
34
 
34
- # The AVS result codes determine the result of checking the AVS values within the Address Verification fraud system. If a transaction is declined due to the AVS code not matching, this value can help determine the reason for the decline. | Code | Description | |------|------------| | Y | Address and 5 digit post code match | | M | Street address and Postal codes match for international transaction | | U | No AVS data available from issuer auth system | | A | Addres matches, post code does not | | I | Address information verified for international transaction | | Z | 5 digit post code matches, Address does not | | W | 9 digit post code matches, Address does not | | X | Postcode and address match | | B | Postal code not verified due to incompatible formats | | P | Postal codes match. Street address not verified due to to incompatible formats | | E | AVS Error | | C | Street address and Postal code not verified due to incompatible formats | | D | Street address and postal codes match | | | No information | | N | Neither postcode nor address match | | R | Retry, System unavailble or Timed Out | | S | AVS Service not supported by issuer or processor | | G | Issuer does not participate in AVS |
35
+ # The AVS result codes determine the result of checking the AVS values within the Address Verification fraud system. If a transaction is declined due to the AVS code not matching, this value can help determine the reason for the decline. <table> <tr> <th>Code</th> <th>Description</th> </tr> <tr><td>Y</td><td>Address and 5 digit post code match</td></tr> <tr><td>M</td><td>Street address and Postal codes match for international transaction</td></tr> <tr><td>U</td><td>No AVS data available from issuer auth system</td></tr> <tr><td>A</td><td>Addres matches, post code does not</td></tr> <tr><td>I</td><td>Address information verified for international transaction</td></tr> <tr><td>Z</td><td>5 digit post code matches, Address does not</td></tr> <tr><td>W</td><td>9 digit post code matches, Address does not</td></tr> <tr><td>X</td><td>Postcode and address match</td></tr> <tr><td>B</td><td>Postal code not verified due to incompatible formats</td></tr> <tr><td>P</td><td>Postal codes match. Street address not verified due to to incompatible formats</td></tr> <tr><td>E</td><td>AVS Error</td></tr> <tr><td>C</td><td>Street address and Postal code not verified due to incompatible formats</td></tr> <tr><td>D</td><td>Street address and postal codes match</td></tr> <tr><td> </td><td>No information</td></tr> <tr><td>N</td><td>Neither postcode nor address match</td></tr> <tr><td>R</td><td>Retry, System unavailble or Timed Out</td></tr> <tr><td>S</td><td>AVS Service not supported by issuer or processor</td></tr> <tr><td>G</td><td>Issuer does not participate in AVS</td></tr> </table>
35
36
  attr_accessor :avs_result
36
37
 
37
38
  # Determines whether the bin range was found to be a commercial or business card.
@@ -49,7 +50,7 @@ module CityPayApiClient
49
50
  # The context which processed the transaction, can be used for support purposes to trace transactions.
50
51
  attr_accessor :context
51
52
 
52
- # The CSC rseult codes determine the result of checking the provided CSC value within the Card Security Code fraud system. If a transaction is declined due to the CSC code not matching, this value can help determine the reason for the decline. | Code | Description | |------|------------| | | No information | | M | Card verification data matches | | N | Card verification data was checked but did not match | | P | Card verification was not processed | | S | The card verification data should be on the card but the merchant indicates that it is not | | U | The card issuer is not certified |
53
+ # The CSC rseult codes determine the result of checking the provided CSC value within the Card Security Code fraud system. If a transaction is declined due to the CSC code not matching, this value can help determine the reason for the decline. <table> <tr> <th>Code</th> <th>Description</th> </tr> <tr><td> </td><td>No information</td></tr> <tr><td>M</td><td>Card verification data matches</td></tr> <tr><td>N</td><td>Card verification data was checked but did not match</td></tr> <tr><td>P</td><td>Card verification was not processed</td></tr> <tr><td>S</td><td>The card verification data should be on the card but the merchant indicates that it is not</td></tr> <tr><td>U</td><td>The card issuer is not certified</td></tr> </table>
53
54
  attr_accessor :csc_result
54
55
 
55
56
  # The currency the transaction was processed in. This is an `ISO4217` alpha currency value.
@@ -64,7 +65,7 @@ module CityPayApiClient
64
65
  # The identifier provided within the request.
65
66
  attr_accessor :identifier
66
67
 
67
- # Used to identify that a tranasction was processed on a live authorisation platform.
68
+ # Used to identify that a transaction was processed on a live authorisation platform.
68
69
  attr_accessor :live
69
70
 
70
71
  # A masked value of the card number used for processing displaying limited values that can be used on a receipt.
@@ -73,22 +74,28 @@ module CityPayApiClient
73
74
  # The merchant id that processed this transaction.
74
75
  attr_accessor :merchantid
75
76
 
76
- # An integer result that indicates the outcome of the transaction. The Code value below maps to the result value | Code | Abbrev | Description | |------|-------|-------------| | 0 | Declined | Declined | | 1 | Accepted | Accepted | | 2 | Rejected | Rejected | | 3 | Not Attempted | Not Attempted | | 4 | Referred | Referred | | 5 | PinRetry | Perform PIN Retry | | 6 | ForSigVer | Force Signature Verification | | 7 | Hold | Hold | | 8 | SecErr | Security Error | | 9 | CallAcq | Call Acquirer | | 10 | DNH | Do Not Honour | | 11 | RtnCrd | Retain Card | | 12 | ExprdCrd | Expired Card | | 13 | InvldCrd | Invalid Card No | | 14 | PinExcd | Pin Tries Exceeded | | 15 | PinInvld | Pin Invalid | | 16 | AuthReq | Authentication Required | | 17 | AuthenFail | Authentication Failed | | 18 | Verified | Card Verified | | 19 | Cancelled | Cancelled | | 20 | Un | Unknown |
77
+ # An integer result that indicates the outcome of the transaction. The Code value below maps to the result value <table> <tr> <th>Code</th> <th>Abbrev</th> <th>Description</th> </tr> <tr><td>0</td><td>Declined</td><td>Declined</td></tr> <tr><td>1</td><td>Accepted</td><td>Accepted</td></tr> <tr><td>2</td><td>Rejected</td><td>Rejected</td></tr> <tr><td>3</td><td>Not Attempted</td><td>Not Attempted</td></tr> <tr><td>4</td><td>Referred</td><td>Referred</td></tr> <tr><td>5</td><td>PinRetry</td><td>Perform PIN Retry</td></tr> <tr><td>6</td><td>ForSigVer</td><td>Force Signature Verification</td></tr> <tr><td>7</td><td>Hold</td><td>Hold</td></tr> <tr><td>8</td><td>SecErr</td><td>Security Error</td></tr> <tr><td>9</td><td>CallAcq</td><td>Call Acquirer</td></tr> <tr><td>10</td><td>DNH</td><td>Do Not Honour</td></tr> <tr><td>11</td><td>RtnCrd</td><td>Retain Card</td></tr> <tr><td>12</td><td>ExprdCrd</td><td>Expired Card</td></tr> <tr><td>13</td><td>InvldCrd</td><td>Invalid Card No</td></tr> <tr><td>14</td><td>PinExcd</td><td>Pin Tries Exceeded</td></tr> <tr><td>15</td><td>PinInvld</td><td>Pin Invalid</td></tr> <tr><td>16</td><td>AuthReq</td><td>Authentication Required</td></tr> <tr><td>17</td><td>AuthenFail</td><td>Authentication Failed</td></tr> <tr><td>18</td><td>Verified</td><td>Card Verified</td></tr> <tr><td>19</td><td>Cancelled</td><td>Cancelled</td></tr> <tr><td>20</td><td>Un</td><td>Unknown</td></tr> <tr><td>21</td><td>Challenged</td><td>Challenged</td></tr> <tr><td>22</td><td>Decoupled</td><td>Decoupled</td></tr> <tr><td>23</td><td>Denied</td><td>Permission Denied</td></tr> </table>
77
78
  attr_accessor :result
78
79
 
79
- # The result code as defined in the Response Codes Reference for example 000 is an accepted live transaction whilst 001 is an accepted test transaction. Result codes identify the source of success and failure. Codes may start with an alpha character i.e. C001 indicating a type of error such as a card validation error.
80
+ # The result code as defined in the Response Codes Reference for example 000 is an accepted live transaction whilst 001 is an accepted test transaction. Result codes identify the source of success and failure. Codes may start with an alpha character i.e. C001 indicating a type of error such as a card validation error.
80
81
  attr_accessor :result_code
81
82
 
82
83
  # The message regarding the result which provides further narrative to the result code.
83
84
  attr_accessor :result_message
84
85
 
85
- # A name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard.
86
+ # The name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard.
86
87
  attr_accessor :scheme
87
88
 
88
- # A SHA256 digest value of the transaction used to validate the response data The digest is calculated by concatenating * authcode * amount * response_code * merchant_id * trans_no * identifier * licence_key - which is not provided in the response.
89
+ # The name of the card scheme of the transaction such as VI or MC.
90
+ attr_accessor :scheme_id
91
+
92
+ # A url containing a logo of the card scheme.
93
+ attr_accessor :scheme_logo
94
+
95
+ # A SHA256 digest value of the transaction used to validate the response data The digest is calculated by concatenating * authcode * amount * response_code * merchant_id * trans_no * identifier * licence_key - which is not provided in the response.
89
96
  attr_accessor :sha256
90
97
 
91
- # Used to identify the status of a transaction. The status is used to track a transaction through its life cycle. | Id | Description | |----|-------------| | O | Transaction is open for settlement | | A | Transaction is assigned for settlement and can no longer be voided | | S | Transaction has been settled | | D | Transaction has been declined | | R | Transaction has been rejected | | P | Transaction has been authorised only and awaiting a capture. Used in pre-auth situations | | C | Transaction has been cancelled | | E | Transaction has expired | | I | Transaction has been initialised but no action was able to be carried out | | H | Transaction is awaiting authorisation | | . | Transaction is on hold | | V | Transaction has been verified |
98
+ # Used to identify the status of a transaction. The status is used to track a transaction through its life cycle. <table> <tr> <th>Id</th> <th>Description</th> </tr> <tr> <td>O</td> <td>Transaction is open for settlement</td> </tr> <tr> <td>A</td> <td>Transaction is assigned for settlement and can no longer be voided</td> </tr> <tr> <td>S</td> <td>Transaction has been settled</td> </tr> <tr> <td>D</td> <td>Transaction has been declined</td> </tr> <tr> <td>R</td> <td>Transaction has been rejected</td> </tr> <tr> <td>P</td> <td>Transaction has been authorised only and awaiting a capture. Used in pre-auth situations</td> </tr> <tr> <td>C</td> <td>Transaction has been cancelled</td> </tr> <tr> <td>E</td> <td>Transaction has expired</td> </tr> <tr> <td>I</td> <td>Transaction has been initialised but no action was able to be carried out</td> </tr> <tr> <td>H</td> <td>Transaction is awaiting authorisation</td> </tr> <tr> <td>.</td> <td>Transaction is on hold</td> </tr> <tr> <td>V</td> <td>Transaction has been verified</td> </tr> </table>
92
99
  attr_accessor :trans_status
93
100
 
94
101
  # The resulting transaction number, ordered incrementally from 1 for every merchant_id. The value will default to less than 1 for transactions that do not have a transaction number issued.
@@ -121,12 +128,19 @@ module CityPayApiClient
121
128
  :'result_code' => :'result_code',
122
129
  :'result_message' => :'result_message',
123
130
  :'scheme' => :'scheme',
131
+ :'scheme_id' => :'scheme_id',
132
+ :'scheme_logo' => :'scheme_logo',
124
133
  :'sha256' => :'sha256',
125
134
  :'trans_status' => :'trans_status',
126
135
  :'transno' => :'transno'
127
136
  }
128
137
  end
129
138
 
139
+ # Returns all the JSON keys this model knows about
140
+ def self.acceptable_attributes
141
+ attribute_map.values
142
+ end
143
+
130
144
  # Attribute type mapping.
131
145
  def self.openapi_types
132
146
  {
@@ -144,7 +158,7 @@ module CityPayApiClient
144
158
  :'context' => :'String',
145
159
  :'csc_result' => :'String',
146
160
  :'currency' => :'String',
147
- :'datetime' => :'DateTime',
161
+ :'datetime' => :'Time',
148
162
  :'eci' => :'String',
149
163
  :'identifier' => :'String',
150
164
  :'live' => :'Boolean',
@@ -154,6 +168,8 @@ module CityPayApiClient
154
168
  :'result_code' => :'String',
155
169
  :'result_message' => :'String',
156
170
  :'scheme' => :'String',
171
+ :'scheme_id' => :'String',
172
+ :'scheme_logo' => :'String',
157
173
  :'sha256' => :'String',
158
174
  :'trans_status' => :'String',
159
175
  :'transno' => :'Integer'
@@ -259,24 +275,40 @@ module CityPayApiClient
259
275
 
260
276
  if attributes.key?(:'merchantid')
261
277
  self.merchantid = attributes[:'merchantid']
278
+ else
279
+ self.merchantid = nil
262
280
  end
263
281
 
264
282
  if attributes.key?(:'result')
265
283
  self.result = attributes[:'result']
284
+ else
285
+ self.result = nil
266
286
  end
267
287
 
268
288
  if attributes.key?(:'result_code')
269
289
  self.result_code = attributes[:'result_code']
290
+ else
291
+ self.result_code = nil
270
292
  end
271
293
 
272
294
  if attributes.key?(:'result_message')
273
295
  self.result_message = attributes[:'result_message']
296
+ else
297
+ self.result_message = nil
274
298
  end
275
299
 
276
300
  if attributes.key?(:'scheme')
277
301
  self.scheme = attributes[:'scheme']
278
302
  end
279
303
 
304
+ if attributes.key?(:'scheme_id')
305
+ self.scheme_id = attributes[:'scheme_id']
306
+ end
307
+
308
+ if attributes.key?(:'scheme_logo')
309
+ self.scheme_logo = attributes[:'scheme_logo']
310
+ end
311
+
280
312
  if attributes.key?(:'sha256')
281
313
  self.sha256 = attributes[:'sha256']
282
314
  end
@@ -293,37 +325,22 @@ module CityPayApiClient
293
325
  # Show invalid properties with the reasons. Usually used together with valid?
294
326
  # @return Array for valid properties with the reasons
295
327
  def list_invalid_properties
328
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
296
329
  invalid_properties = Array.new
297
- if !@avs_result.nil? && @avs_result.to_s.length > 1
298
- invalid_properties.push('invalid value for "avs_result", the character length must be smaller than or equal to 1.')
299
- end
300
-
301
- if !@avs_result.nil? && @avs_result.to_s.length < 1
302
- invalid_properties.push('invalid value for "avs_result", the character length must be great than or equal to 1.')
330
+ if @merchantid.nil?
331
+ invalid_properties.push('invalid value for "merchantid", merchantid cannot be nil.')
303
332
  end
304
333
 
305
- if !@csc_result.nil? && @csc_result.to_s.length > 1
306
- invalid_properties.push('invalid value for "csc_result", the character length must be smaller than or equal to 1.')
334
+ if @result.nil?
335
+ invalid_properties.push('invalid value for "result", result cannot be nil.')
307
336
  end
308
337
 
309
- if !@csc_result.nil? && @csc_result.to_s.length < 1
310
- invalid_properties.push('invalid value for "csc_result", the character length must be great than or equal to 1.')
338
+ if @result_code.nil?
339
+ invalid_properties.push('invalid value for "result_code", result_code cannot be nil.')
311
340
  end
312
341
 
313
- if !@currency.nil? && @currency.to_s.length > 3
314
- invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
315
- end
316
-
317
- if !@currency.nil? && @currency.to_s.length < 3
318
- invalid_properties.push('invalid value for "currency", the character length must be great than or equal to 3.')
319
- end
320
-
321
- if !@identifier.nil? && @identifier.to_s.length > 50
322
- invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
323
- end
324
-
325
- if !@identifier.nil? && @identifier.to_s.length < 4
326
- invalid_properties.push('invalid value for "identifier", the character length must be great than or equal to 4.')
342
+ if @result_message.nil?
343
+ invalid_properties.push('invalid value for "result_message", result_message cannot be nil.')
327
344
  end
328
345
 
329
346
  invalid_properties
@@ -332,73 +349,14 @@ module CityPayApiClient
332
349
  # Check to see if the all the properties in the model are valid
333
350
  # @return true if the model is valid
334
351
  def valid?
335
- return false if !@avs_result.nil? && @avs_result.to_s.length > 1
336
- return false if !@avs_result.nil? && @avs_result.to_s.length < 1
337
- return false if !@csc_result.nil? && @csc_result.to_s.length > 1
338
- return false if !@csc_result.nil? && @csc_result.to_s.length < 1
339
- return false if !@currency.nil? && @currency.to_s.length > 3
340
- return false if !@currency.nil? && @currency.to_s.length < 3
341
- return false if !@identifier.nil? && @identifier.to_s.length > 50
342
- return false if !@identifier.nil? && @identifier.to_s.length < 4
352
+ warn '[DEPRECATED] the `valid?` method is obsolete'
353
+ return false if @merchantid.nil?
354
+ return false if @result.nil?
355
+ return false if @result_code.nil?
356
+ return false if @result_message.nil?
343
357
  true
344
358
  end
345
359
 
346
- # Custom attribute writer method with validation
347
- # @param [Object] avs_result Value to be assigned
348
- def avs_result=(avs_result)
349
- if !avs_result.nil? && avs_result.to_s.length > 1
350
- fail ArgumentError, 'invalid value for "avs_result", the character length must be smaller than or equal to 1.'
351
- end
352
-
353
- if !avs_result.nil? && avs_result.to_s.length < 1
354
- fail ArgumentError, 'invalid value for "avs_result", the character length must be great than or equal to 1.'
355
- end
356
-
357
- @avs_result = avs_result
358
- end
359
-
360
- # Custom attribute writer method with validation
361
- # @param [Object] csc_result Value to be assigned
362
- def csc_result=(csc_result)
363
- if !csc_result.nil? && csc_result.to_s.length > 1
364
- fail ArgumentError, 'invalid value for "csc_result", the character length must be smaller than or equal to 1.'
365
- end
366
-
367
- if !csc_result.nil? && csc_result.to_s.length < 1
368
- fail ArgumentError, 'invalid value for "csc_result", the character length must be great than or equal to 1.'
369
- end
370
-
371
- @csc_result = csc_result
372
- end
373
-
374
- # Custom attribute writer method with validation
375
- # @param [Object] currency Value to be assigned
376
- def currency=(currency)
377
- if !currency.nil? && currency.to_s.length > 3
378
- fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
379
- end
380
-
381
- if !currency.nil? && currency.to_s.length < 3
382
- fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
383
- end
384
-
385
- @currency = currency
386
- end
387
-
388
- # Custom attribute writer method with validation
389
- # @param [Object] identifier Value to be assigned
390
- def identifier=(identifier)
391
- if !identifier.nil? && identifier.to_s.length > 50
392
- fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
393
- end
394
-
395
- if !identifier.nil? && identifier.to_s.length < 4
396
- fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
397
- end
398
-
399
- @identifier = identifier
400
- end
401
-
402
360
  # Checks equality by comparing each attribute.
403
361
  # @param [Object] Object to be compared
404
362
  def ==(o)
@@ -428,6 +386,8 @@ module CityPayApiClient
428
386
  result_code == o.result_code &&
429
387
  result_message == o.result_message &&
430
388
  scheme == o.scheme &&
389
+ scheme_id == o.scheme_id &&
390
+ scheme_logo == o.scheme_logo &&
431
391
  sha256 == o.sha256 &&
432
392
  trans_status == o.trans_status &&
433
393
  transno == o.transno
@@ -442,44 +402,40 @@ module CityPayApiClient
442
402
  # Calculates hash code according to all attributes.
443
403
  # @return [Integer] Hash code
444
404
  def hash
445
- [amount, atrn, atsd, authcode, authen_result, authorised, avs_result, bin_commercial, bin_debit, bin_description, cavv, context, csc_result, currency, datetime, eci, identifier, live, maskedpan, merchantid, result, result_code, result_message, scheme, sha256, trans_status, transno].hash
405
+ [amount, atrn, atsd, authcode, authen_result, authorised, avs_result, bin_commercial, bin_debit, bin_description, cavv, context, csc_result, currency, datetime, eci, identifier, live, maskedpan, merchantid, result, result_code, result_message, scheme, scheme_id, scheme_logo, sha256, trans_status, transno].hash
446
406
  end
447
407
 
448
408
  # Builds the object from hash
449
409
  # @param [Hash] attributes Model attributes in the form of hash
450
410
  # @return [Object] Returns the model itself
451
411
  def self.build_from_hash(attributes)
452
- new.build_from_hash(attributes)
453
- end
454
-
455
- # Builds the object from hash
456
- # @param [Hash] attributes Model attributes in the form of hash
457
- # @return [Object] Returns the model itself
458
- def build_from_hash(attributes)
459
412
  return nil unless attributes.is_a?(Hash)
460
- self.class.openapi_types.each_pair do |key, type|
461
- if type =~ /\AArray<(.*)>/i
413
+ attributes = attributes.transform_keys(&:to_sym)
414
+ transformed_hash = {}
415
+ openapi_types.each_pair do |key, type|
416
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
417
+ transformed_hash["#{key}"] = nil
418
+ elsif type =~ /\AArray<(.*)>/i
462
419
  # check to ensure the input is an array given that the attribute
463
420
  # is documented as an array but the input is not
464
- if attributes[self.class.attribute_map[key]].is_a?(Array)
465
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
421
+ if attributes[attribute_map[key]].is_a?(Array)
422
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
466
423
  end
467
- elsif !attributes[self.class.attribute_map[key]].nil?
468
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
469
- end # or else data not found in attributes(hash), not an issue as the data can be optional
424
+ elsif !attributes[attribute_map[key]].nil?
425
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
426
+ end
470
427
  end
471
-
472
- self
428
+ new(transformed_hash)
473
429
  end
474
430
 
475
431
  # Deserializes the data based on type
476
432
  # @param string type Data type
477
433
  # @param string value Value to be deserialized
478
434
  # @return [Object] Deserialized data
479
- def _deserialize(type, value)
435
+ def self._deserialize(type, value)
480
436
  case type.to_sym
481
- when :DateTime
482
- DateTime.parse(value)
437
+ when :Time
438
+ Time.parse(value)
483
439
  when :Date
484
440
  Date.parse(value)
485
441
  when :String
@@ -509,7 +465,9 @@ module CityPayApiClient
509
465
  end
510
466
  end
511
467
  else # model
512
- CityPayApiClient.const_get(type).build_from_hash(value)
468
+ # models (e.g. Pet) or oneOf
469
+ klass = CityPayApiClient.const_get(type)
470
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
513
471
  end
514
472
  end
515
473
 
@@ -535,7 +493,7 @@ module CityPayApiClient
535
493
  is_nullable = self.class.openapi_nullable.include?(attr)
536
494
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
537
495
  end
538
-
496
+
539
497
  hash[param] = _to_hash(value)
540
498
  end
541
499
  hash
@@ -558,5 +516,7 @@ module CityPayApiClient
558
516
  value
559
517
  end
560
518
  end
519
+
561
520
  end
521
+
562
522
  end
@@ -1,15 +1,16 @@
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 an 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 tokenized payments using cardholder 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](https://citypay.github.io/api-docs/payment-api/#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 cardholder 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: 7.2.0
9
9
 
10
10
  =end
11
11
 
12
12
  require 'date'
13
+ require 'time'
13
14
 
14
15
  module CityPayApiClient
15
16
  class AuthenRequired
@@ -31,6 +32,11 @@ module CityPayApiClient
31
32
  }
32
33
  end
33
34
 
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ attribute_map.values
38
+ end
39
+
34
40
  # Attribute type mapping.
35
41
  def self.openapi_types
36
42
  {
@@ -77,6 +83,7 @@ module CityPayApiClient
77
83
  # Show invalid properties with the reasons. Usually used together with valid?
78
84
  # @return Array for valid properties with the reasons
79
85
  def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
80
87
  invalid_properties = Array.new
81
88
  invalid_properties
82
89
  end
@@ -84,6 +91,7 @@ module CityPayApiClient
84
91
  # Check to see if the all the properties in the model are valid
85
92
  # @return true if the model is valid
86
93
  def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
87
95
  true
88
96
  end
89
97
 
@@ -113,37 +121,33 @@ module CityPayApiClient
113
121
  # @param [Hash] attributes Model attributes in the form of hash
114
122
  # @return [Object] Returns the model itself
115
123
  def self.build_from_hash(attributes)
116
- new.build_from_hash(attributes)
117
- end
118
-
119
- # Builds the object from hash
120
- # @param [Hash] attributes Model attributes in the form of hash
121
- # @return [Object] Returns the model itself
122
- def build_from_hash(attributes)
123
124
  return nil unless attributes.is_a?(Hash)
124
- self.class.openapi_types.each_pair do |key, type|
125
- if type =~ /\AArray<(.*)>/i
125
+ attributes = attributes.transform_keys(&:to_sym)
126
+ transformed_hash = {}
127
+ openapi_types.each_pair do |key, type|
128
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
129
+ transformed_hash["#{key}"] = nil
130
+ elsif type =~ /\AArray<(.*)>/i
126
131
  # check to ensure the input is an array given that the attribute
127
132
  # is documented as an array but the input is not
128
- if attributes[self.class.attribute_map[key]].is_a?(Array)
129
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
133
+ if attributes[attribute_map[key]].is_a?(Array)
134
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
135
  end
131
- elsif !attributes[self.class.attribute_map[key]].nil?
132
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
- end # or else data not found in attributes(hash), not an issue as the data can be optional
136
+ elsif !attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
138
+ end
134
139
  end
135
-
136
- self
140
+ new(transformed_hash)
137
141
  end
138
142
 
139
143
  # Deserializes the data based on type
140
144
  # @param string type Data type
141
145
  # @param string value Value to be deserialized
142
146
  # @return [Object] Deserialized data
143
- def _deserialize(type, value)
147
+ def self._deserialize(type, value)
144
148
  case type.to_sym
145
- when :DateTime
146
- DateTime.parse(value)
149
+ when :Time
150
+ Time.parse(value)
147
151
  when :Date
148
152
  Date.parse(value)
149
153
  when :String
@@ -173,7 +177,9 @@ module CityPayApiClient
173
177
  end
174
178
  end
175
179
  else # model
176
- CityPayApiClient.const_get(type).build_from_hash(value)
180
+ # models (e.g. Pet) or oneOf
181
+ klass = CityPayApiClient.const_get(type)
182
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
183
  end
178
184
  end
179
185
 
@@ -199,7 +205,7 @@ module CityPayApiClient
199
205
  is_nullable = self.class.openapi_nullable.include?(attr)
200
206
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
207
  end
202
-
208
+
203
209
  hash[param] = _to_hash(value)
204
210
  end
205
211
  hash
@@ -222,5 +228,7 @@ module CityPayApiClient
222
228
  value
223
229
  end
224
230
  end
231
+
225
232
  end
233
+
226
234
  end