citypay_api_client 1.1.1 → 1.1.3

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 (212) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +73 -0
  3. data/README.md +65 -37
  4. data/citypay_api_client.gemspec +4 -3
  5. data/docs/Acknowledgement.md +2 -2
  6. data/docs/AclCheckResponseModel.md +3 -3
  7. data/docs/AirlineAdvice.md +1 -1
  8. data/docs/AuthRequest.md +9 -7
  9. data/docs/AuthResponse.md +9 -5
  10. data/docs/AuthorisationAndPaymentApi.md +145 -10
  11. data/docs/Batch.md +1 -1
  12. data/docs/BatchProcessingApi.md +24 -20
  13. data/docs/BatchReportResponseModel.md +2 -2
  14. data/docs/BatchTransaction.md +1 -1
  15. data/docs/BatchTransactionReportRequest.md +22 -0
  16. data/docs/BatchTransactionReportResponse.md +24 -0
  17. data/docs/BatchTransactionResultModel.md +6 -2
  18. data/docs/Bin.md +2 -2
  19. data/docs/CaptureRequest.md +1 -1
  20. data/docs/Card.md +3 -3
  21. data/docs/CardHolderAccountApi.md +73 -14
  22. data/docs/ChargeRequest.md +8 -6
  23. data/docs/ContactDetails.md +11 -11
  24. data/docs/Decision.md +0 -2
  25. data/docs/DirectPostApi.md +26 -16
  26. data/docs/DirectPostRequest.md +9 -7
  27. data/docs/EventDataModel.md +2 -2
  28. data/docs/MerchantBatchReportRequest.md +28 -0
  29. data/docs/MerchantBatchReportResponse.md +24 -0
  30. data/docs/MerchantBatchResponse.md +30 -0
  31. data/docs/NetSummaryResponse.md +32 -0
  32. data/docs/OperationalFunctionsApi.md +28 -8
  33. data/docs/PaylinkAdjustmentRequest.md +1 -1
  34. data/docs/PaylinkApi.md +337 -21
  35. data/docs/PaylinkBillPaymentTokenRequest.md +1 -1
  36. data/docs/PaylinkCustomParam.md +3 -1
  37. data/docs/PaylinkErrorCode.md +2 -2
  38. data/docs/PaylinkFieldGuardModel.md +1 -1
  39. data/docs/PaylinkResendNotificationRequest.md +20 -0
  40. data/docs/PaylinkStateEvent.md +4 -4
  41. data/docs/PaylinkTokenCreated.md +11 -11
  42. data/docs/PaylinkTokenRequestModel.md +4 -0
  43. data/docs/PaylinkTokenStatus.md +7 -7
  44. data/docs/PaylinkTokenStatusChangeRequest.md +7 -7
  45. data/docs/PaylinkTokenStatusChangeResponse.md +6 -2
  46. data/docs/PaymentIntent.md +42 -0
  47. data/docs/PaymentIntentReference.md +18 -0
  48. data/docs/RefundRequest.md +1 -1
  49. data/docs/RegisterCard.md +1 -1
  50. data/docs/RemittanceData.md +28 -0
  51. data/docs/RemittanceReportRequest.md +28 -0
  52. data/docs/RemittanceReportResponse.md +24 -0
  53. data/docs/RemittedClientData.md +44 -0
  54. data/docs/ReportingApi.md +378 -0
  55. data/docs/ThreeDSecure.md +1 -1
  56. data/docs/TokenisationResponseModel.md +3 -3
  57. data/docs/images/3dsv1-challenge.png +0 -0
  58. data/docs/images/3dsv2-challenge.png +0 -0
  59. data/docs/images/3dsv2-frictionless.png +0 -0
  60. data/docs/images/3dsv2-method-challenge.png +0 -0
  61. data/docs/images/3dsv2-method-frictionless.png +0 -0
  62. data/docs/images/3dsv2-no3d.png +0 -0
  63. data/docs/images/citypay-logo.svg +1 -0
  64. data/docs/images/direct-post-flow.png +0 -0
  65. data/docs/images/favicon.ico +0 -0
  66. data/docs/images/header.png +0 -0
  67. data/docs/images/logo.ai +1913 -4
  68. data/docs/images/logo.png +0 -0
  69. data/docs/images/logo.svg +1 -0
  70. data/docs/images/merchant-BPS-workflow.png +0 -0
  71. data/docs/images/paylink-field-guards.png +0 -0
  72. data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +72 -4
  73. data/lib/citypay_api_client/api/batch_processing_api__.rb +15 -15
  74. data/lib/citypay_api_client/api/card_holder_account_api__.rb +5 -2
  75. data/lib/citypay_api_client/api/direct_post_api__.rb +9 -9
  76. data/lib/citypay_api_client/api/operational_functions_api__.rb +3 -3
  77. data/lib/citypay_api_client/api/paylink_api__.rb +163 -26
  78. data/lib/citypay_api_client/api/reporting_api__.rb +381 -0
  79. data/lib/citypay_api_client/api_client.rb +24 -22
  80. data/lib/citypay_api_client/api_error.rb +3 -2
  81. data/lib/citypay_api_client/configuration.rb +28 -9
  82. data/lib/citypay_api_client/models/account_create.rb +17 -20
  83. data/lib/citypay_api_client/models/account_status.rb +15 -20
  84. data/lib/citypay_api_client/models/acknowledgement.rb +21 -46
  85. data/lib/citypay_api_client/models/acl_check_request.rb +17 -20
  86. data/lib/citypay_api_client/models/acl_check_response_model.rb +16 -21
  87. data/lib/citypay_api_client/models/airline_advice.rb +45 -29
  88. data/lib/citypay_api_client/models/airline_segment.rb +35 -22
  89. data/lib/citypay_api_client/models/auth_reference.rb +41 -26
  90. data/lib/citypay_api_client/models/auth_references.rb +15 -20
  91. data/lib/citypay_api_client/models/auth_request.rb +72 -34
  92. data/lib/citypay_api_client/models/auth_response.rb +46 -23
  93. data/lib/citypay_api_client/models/authen_required.rb +15 -20
  94. data/lib/citypay_api_client/models/batch.rb +25 -22
  95. data/lib/citypay_api_client/models/batch_report_request.rb +23 -22
  96. data/lib/citypay_api_client/models/batch_report_response_model.rb +28 -21
  97. data/lib/citypay_api_client/models/batch_transaction.rb +25 -22
  98. data/lib/citypay_api_client/models/batch_transaction_report_request.rb +234 -0
  99. data/lib/citypay_api_client/models/batch_transaction_report_response.rb +252 -0
  100. data/lib/citypay_api_client/models/batch_transaction_result_model.rb +53 -22
  101. data/lib/citypay_api_client/models/bin.rb +15 -20
  102. data/lib/citypay_api_client/models/bin_lookup.rb +17 -20
  103. data/lib/citypay_api_client/models/c_res_auth_request.rb +15 -20
  104. data/lib/citypay_api_client/models/capture_request.rb +27 -22
  105. data/lib/citypay_api_client/models/card.rb +33 -26
  106. data/lib/citypay_api_client/models/card_holder_account.rb +19 -20
  107. data/lib/citypay_api_client/models/card_status.rb +15 -20
  108. data/lib/citypay_api_client/models/charge_request.rb +72 -34
  109. data/lib/citypay_api_client/models/check_batch_status.rb +23 -22
  110. data/lib/citypay_api_client/models/check_batch_status_response.rb +15 -20
  111. data/lib/citypay_api_client/models/contact_details.rb +77 -42
  112. data/lib/citypay_api_client/models/decision.rb +16 -30
  113. data/lib/citypay_api_client/models/direct_post_request.rb +72 -34
  114. data/lib/citypay_api_client/models/direct_token_auth_request.rb +15 -20
  115. data/lib/citypay_api_client/models/domain_key_check_request.rb +17 -20
  116. data/lib/citypay_api_client/models/domain_key_request.rb +19 -20
  117. data/lib/citypay_api_client/models/domain_key_response.rb +25 -22
  118. data/lib/citypay_api_client/models/error.rb +27 -24
  119. data/lib/citypay_api_client/models/event_data_model.rb +15 -20
  120. data/lib/citypay_api_client/models/exists.rb +17 -20
  121. data/lib/citypay_api_client/models/external_mpi.rb +39 -24
  122. data/lib/citypay_api_client/models/list_merchants_response.rb +21 -22
  123. data/lib/citypay_api_client/models/mcc6012.rb +15 -20
  124. data/lib/citypay_api_client/models/merchant.rb +15 -20
  125. data/lib/citypay_api_client/models/merchant_batch_report_request.rb +265 -0
  126. data/lib/citypay_api_client/models/merchant_batch_report_response.rb +252 -0
  127. data/lib/citypay_api_client/models/merchant_batch_response.rb +301 -0
  128. data/lib/citypay_api_client/models/net_summary_response.rb +472 -0
  129. data/lib/citypay_api_client/models/pa_res_auth_request.rb +19 -20
  130. data/lib/citypay_api_client/models/paylink_address.rb +52 -29
  131. data/lib/citypay_api_client/models/paylink_adjustment_request.rb +25 -22
  132. data/lib/citypay_api_client/models/paylink_attachment_request.rb +19 -20
  133. data/lib/citypay_api_client/models/paylink_attachment_result.rb +19 -20
  134. data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +17 -20
  135. data/lib/citypay_api_client/models/paylink_card_holder.rb +30 -23
  136. data/lib/citypay_api_client/models/paylink_cart.rb +15 -20
  137. data/lib/citypay_api_client/models/paylink_cart_item_model.rb +15 -20
  138. data/lib/citypay_api_client/models/paylink_config.rb +15 -20
  139. data/lib/citypay_api_client/models/paylink_custom_param.rb +29 -22
  140. data/lib/citypay_api_client/models/paylink_email_notification_path.rb +17 -20
  141. data/lib/citypay_api_client/models/paylink_error_code.rb +19 -20
  142. data/lib/citypay_api_client/models/paylink_field_guard_model.rb +16 -21
  143. data/lib/citypay_api_client/models/paylink_part_payments.rb +15 -20
  144. data/lib/citypay_api_client/models/paylink_resend_notification_request.rb +224 -0
  145. data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +17 -20
  146. data/lib/citypay_api_client/models/paylink_state_event.rb +16 -21
  147. data/lib/citypay_api_client/models/paylink_token_created.rb +56 -27
  148. data/lib/citypay_api_client/models/paylink_token_request_model.rb +75 -22
  149. data/lib/citypay_api_client/models/paylink_token_status.rb +44 -21
  150. data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +24 -26
  151. data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +39 -22
  152. data/lib/citypay_api_client/models/paylink_ui.rb +15 -20
  153. data/lib/citypay_api_client/models/payment_intent.rb +479 -0
  154. data/lib/citypay_api_client/models/payment_intent_reference.rb +221 -0
  155. data/lib/citypay_api_client/models/ping.rb +21 -22
  156. data/lib/citypay_api_client/models/process_batch_request.rb +27 -22
  157. data/lib/citypay_api_client/models/process_batch_response.rb +17 -20
  158. data/lib/citypay_api_client/models/refund_request.rb +28 -21
  159. data/lib/citypay_api_client/models/register_card.rb +27 -22
  160. data/lib/citypay_api_client/models/remittance_data.rb +404 -0
  161. data/lib/citypay_api_client/models/remittance_report_request.rb +265 -0
  162. data/lib/citypay_api_client/models/remittance_report_response.rb +252 -0
  163. data/lib/citypay_api_client/models/remitted_client_data.rb +612 -0
  164. data/lib/citypay_api_client/models/request_challenged.rb +15 -20
  165. data/lib/citypay_api_client/models/retrieve_request.rb +23 -22
  166. data/lib/citypay_api_client/models/three_d_secure.rb +16 -21
  167. data/lib/citypay_api_client/models/tokenisation_response_model.rb +23 -24
  168. data/lib/citypay_api_client/models/void_request.rb +23 -22
  169. data/lib/citypay_api_client/version.rb +3 -3
  170. data/lib/citypay_api_client.rb +16 -3
  171. data/spec/api/reporting_api___spec.rb +99 -0
  172. data/spec/it_api_sandbox_spec.rb +5 -14
  173. data/spec/models/account_create_spec.rb +1 -2
  174. data/spec/models/account_status_spec.rb +2 -2
  175. data/spec/models/airline_advice_spec.rb +0 -2
  176. data/spec/models/airline_segment_spec.rb +0 -2
  177. data/spec/models/auth_request_spec.rb +0 -2
  178. data/spec/models/auth_response_spec.rb +75 -30
  179. data/spec/models/batch_report_request_spec.rb +0 -2
  180. data/spec/models/batch_report_response_model_spec.rb +0 -2
  181. data/spec/models/batch_spec.rb +0 -2
  182. data/spec/models/batch_transaction_report_request_spec.rb +47 -0
  183. data/spec/models/batch_transaction_report_response_spec.rb +53 -0
  184. data/spec/models/batch_transaction_result_model_spec.rb +0 -2
  185. data/spec/models/batch_transaction_spec.rb +0 -2
  186. data/spec/models/bin_lookup_spec.rb +0 -2
  187. data/spec/models/capture_request_spec.rb +0 -2
  188. data/spec/models/card_holder_account_spec.rb +0 -2
  189. data/spec/models/charge_request_spec.rb +0 -2
  190. data/spec/models/decision_spec.rb +0 -26
  191. data/spec/models/direct_post_request_spec.rb +0 -2
  192. data/spec/models/domain_key_check_request_spec.rb +0 -2
  193. data/spec/models/merchant_batch_report_request_spec.rb +65 -0
  194. data/spec/models/merchant_batch_report_response_spec.rb +53 -0
  195. data/spec/models/merchant_batch_response_spec.rb +71 -0
  196. data/spec/models/net_summary_response_spec.rb +77 -0
  197. data/spec/models/paylink_resend_notification_request_spec.rb +41 -0
  198. data/spec/models/paylink_token_request_model_spec.rb +0 -2
  199. data/spec/models/payment_intent_reference_spec.rb +35 -0
  200. data/spec/models/payment_intent_spec.rb +107 -0
  201. data/spec/models/process_batch_request_spec.rb +0 -2
  202. data/spec/models/refund_request_spec.rb +0 -2
  203. data/spec/models/register_card_spec.rb +0 -2
  204. data/spec/models/remittance_data_spec.rb +65 -0
  205. data/spec/models/remittance_report_request_spec.rb +65 -0
  206. data/spec/models/remittance_report_response_spec.rb +53 -0
  207. data/spec/models/remitted_client_data_spec.rb +113 -0
  208. data/spec/spec_helper.rb +2 -2
  209. metadata +146 -78
  210. data/docs/OperationalApi.md +0 -214
  211. data/docs/PaymentProcessingApi.md +0 -559
  212. data/spec/models/authen_required_spec.rb +0 -52
@@ -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 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.
4
+ # Welcome to the CityPay API, a robust HTTP API payment solution designed for seamless server-to-server transactional processing. Our API facilitates a wide array of payment operations, catering to diverse business needs. Whether you're integrating Internet payments, handling Mail Order/Telephone Order (MOTO) transactions, managing Subscriptions with Recurring and Continuous Authority payments, or navigating the complexities of 3-D Secure authentication, our API is equipped to support your requirements. Additionally, we offer functionalities for Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids, and Completion processing, alongside the capability for tokenised payments. ## Compliance and Security Overview <aside class=\"notice\"> Ensuring the security of payment transactions and compliance with industry standards is paramount. Our API is designed with stringent security measures and compliance protocols to safeguard sensitive information and meet the rigorous requirements of Visa, MasterCard, and the PCI Security Standards Council. </aside> ### Key Compliance and Security Measures * **TLS Encryption**: All data transmissions must utilise TLS version 1.2 or higher, employing [strong cryptography](#enabled-tls-ciphers). Our infrastructure strictly enforces this requirement to maintain the integrity and confidentiality of data in transit. We conduct regular scans and assessments of our TLS endpoints to identify and mitigate vulnerabilities. * **Data Storage Prohibitions**: Storing sensitive cardholder data (CHD), such as the card security code (CSC) or primary account number (PAN), is strictly prohibited. Our API is designed to minimize your exposure to sensitive data, thereby reducing your compliance burden. * **Data Masking**: For consumer protection and compliance, full card numbers must not be displayed on receipts or any customer-facing materials. Our API automatically masks PANs, displaying only the last four digits to facilitate safe receipt generation. * **Network Scans**: If your application is web-based, regular scans of your hosting environment are mandatory to identify and rectify potential vulnerabilities. This proactive measure is crucial for maintaining a secure and compliant online presence. * **PCI Compliance**: Adherence to PCI DSS standards is not optional; it's a requirement for operating securely and legally in the payments ecosystem. For detailed information on compliance requirements and resources, please visit the PCI Security Standards Council website [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/). * **Request Validation**: Our API includes mechanisms to verify the legitimacy of each request, ensuring it pertains to a valid account and originates from a trusted source. We leverage remote IP address verification alongside sophisticated application firewall technologies to thwart a wide array of common security threats. ## Getting Started Before integrating with the CityPay API, ensure your application and development practices align with the outlined compliance and security measures. This preparatory step is crucial for a smooth integration process and the long-term success of your payment processing operations. For further details on API endpoints, request/response formats, and code examples, proceed to the subsequent sections of our documentation. Our aim is to provide you with all the necessary tools and information to integrate our payment processing capabilities seamlessly into your application. Thank you for choosing CityPay API. We look forward to supporting your payment processing needs with our secure, compliant, and versatile API solution.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -61,6 +61,16 @@ module CityPayApiClient
61
61
  # Defines the access token (Bearer) used with OAuth2.
62
62
  attr_accessor :access_token
63
63
 
64
+ # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
65
+ # Overrides the access_token if set
66
+ # @return [Proc]
67
+ attr_accessor :access_token_getter
68
+
69
+ # Set this to return data as binary instead of downloading a temp file. When enabled (set to true)
70
+ # HTTP responses with return type `File` will be returned as a stream of binary data.
71
+ # Default to false.
72
+ attr_accessor :return_binary_data
73
+
64
74
  # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
65
75
  # details will be logged with `logger.debug` (see the `logger` attribute).
66
76
  # Default to false.
@@ -141,7 +151,7 @@ module CityPayApiClient
141
151
  @scheme = 'https'
142
152
  @host = 'api.citypay.com'
143
153
  @base_path = ''
144
- @server_index = 0
154
+ @server_index = nil
145
155
  @server_operation_index = {}
146
156
  @server_variables = {}
147
157
  @server_operation_variables = {}
@@ -189,10 +199,12 @@ module CityPayApiClient
189
199
 
190
200
  # Returns base URL for specified operation based on server settings
191
201
  def base_url(operation = nil)
192
- index = server_operation_index.fetch(operation, server_index)
193
- return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
194
-
195
- server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
202
+ if operation_server_settings.key?(operation) then
203
+ index = server_operation_index.fetch(operation, server_index)
204
+ server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
205
+ else
206
+ server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
207
+ end
196
208
  end
197
209
 
198
210
  # Gets API key (with prefix if set).
@@ -207,6 +219,12 @@ module CityPayApiClient
207
219
  end
208
220
  end
209
221
 
222
+ # Gets access_token using access_token_getter or uses the static access_token
223
+ def access_token_with_refresh
224
+ return access_token if access_token_getter.nil?
225
+ access_token_getter.call
226
+ end
227
+
210
228
  # Gets Basic Auth token string
211
229
  def basic_auth_token
212
230
  'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
@@ -259,8 +277,8 @@ module CityPayApiClient
259
277
  servers = server_settings if servers == nil
260
278
 
261
279
  # check array index out of bound
262
- if (index < 0 || index >= servers.size)
263
- fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
280
+ if (index.nil? || index < 0 || index >= servers.size)
281
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
264
282
  end
265
283
 
266
284
  server = servers[index]
@@ -285,5 +303,6 @@ module CityPayApiClient
285
303
  url
286
304
  end
287
305
 
306
+
288
307
  end
289
308
  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 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.
4
+ # Welcome to the CityPay API, a robust HTTP API payment solution designed for seamless server-to-server transactional processing. Our API facilitates a wide array of payment operations, catering to diverse business needs. Whether you're integrating Internet payments, handling Mail Order/Telephone Order (MOTO) transactions, managing Subscriptions with Recurring and Continuous Authority payments, or navigating the complexities of 3-D Secure authentication, our API is equipped to support your requirements. Additionally, we offer functionalities for Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids, and Completion processing, alongside the capability for tokenised payments. ## Compliance and Security Overview <aside class=\"notice\"> Ensuring the security of payment transactions and compliance with industry standards is paramount. Our API is designed with stringent security measures and compliance protocols to safeguard sensitive information and meet the rigorous requirements of Visa, MasterCard, and the PCI Security Standards Council. </aside> ### Key Compliance and Security Measures * **TLS Encryption**: All data transmissions must utilise TLS version 1.2 or higher, employing [strong cryptography](#enabled-tls-ciphers). Our infrastructure strictly enforces this requirement to maintain the integrity and confidentiality of data in transit. We conduct regular scans and assessments of our TLS endpoints to identify and mitigate vulnerabilities. * **Data Storage Prohibitions**: Storing sensitive cardholder data (CHD), such as the card security code (CSC) or primary account number (PAN), is strictly prohibited. Our API is designed to minimize your exposure to sensitive data, thereby reducing your compliance burden. * **Data Masking**: For consumer protection and compliance, full card numbers must not be displayed on receipts or any customer-facing materials. Our API automatically masks PANs, displaying only the last four digits to facilitate safe receipt generation. * **Network Scans**: If your application is web-based, regular scans of your hosting environment are mandatory to identify and rectify potential vulnerabilities. This proactive measure is crucial for maintaining a secure and compliant online presence. * **PCI Compliance**: Adherence to PCI DSS standards is not optional; it's a requirement for operating securely and legally in the payments ecosystem. For detailed information on compliance requirements and resources, please visit the PCI Security Standards Council website [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/). * **Request Validation**: Our API includes mechanisms to verify the legitimacy of each request, ensuring it pertains to a valid account and originates from a trusted source. We leverage remote IP address verification alongside sophisticated application firewall technologies to thwart a wide array of common security threats. ## Getting Started Before integrating with the CityPay API, ensure your application and development practices align with the outlined compliance and security measures. This preparatory step is crucial for a smooth integration process and the long-term success of your payment processing operations. For further details on API endpoints, request/response formats, and code examples, proceed to the subsequent sections of our documentation. Our aim is to provide you with all the necessary tools and information to integrate our payment processing capabilities seamlessly into your application. Thank you for choosing CityPay API. We look forward to supporting your payment processing needs with our secure, compliant, and versatile API solution.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -63,6 +63,8 @@ module CityPayApiClient
63
63
 
64
64
  if attributes.key?(:'account_id')
65
65
  self.account_id = attributes[:'account_id']
66
+ else
67
+ self.account_id = nil
66
68
  end
67
69
 
68
70
  if attributes.key?(:'contact')
@@ -73,6 +75,7 @@ module CityPayApiClient
73
75
  # Show invalid properties with the reasons. Usually used together with valid?
74
76
  # @return Array for valid properties with the reasons
75
77
  def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
79
  invalid_properties = Array.new
77
80
  if @account_id.nil?
78
81
  invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
@@ -92,6 +95,7 @@ module CityPayApiClient
92
95
  # Check to see if the all the properties in the model are valid
93
96
  # @return true if the model is valid
94
97
  def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
99
  return false if @account_id.nil?
96
100
  return false if @account_id.to_s.length > 50
97
101
  return false if @account_id.to_s.length < 5
@@ -141,37 +145,30 @@ module CityPayApiClient
141
145
  # @param [Hash] attributes Model attributes in the form of hash
142
146
  # @return [Object] Returns the model itself
143
147
  def self.build_from_hash(attributes)
144
- new.build_from_hash(attributes)
145
- end
146
-
147
- # Builds the object from hash
148
- # @param [Hash] attributes Model attributes in the form of hash
149
- # @return [Object] Returns the model itself
150
- def build_from_hash(attributes)
151
148
  return nil unless attributes.is_a?(Hash)
152
149
  attributes = attributes.transform_keys(&:to_sym)
153
- self.class.openapi_types.each_pair do |key, type|
154
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
155
- self.send("#{key}=", nil)
150
+ transformed_hash = {}
151
+ openapi_types.each_pair do |key, type|
152
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = nil
156
154
  elsif type =~ /\AArray<(.*)>/i
157
155
  # check to ensure the input is an array given that the attribute
158
156
  # is documented as an array but the input is not
159
- if attributes[self.class.attribute_map[key]].is_a?(Array)
160
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
157
+ if attributes[attribute_map[key]].is_a?(Array)
158
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
161
159
  end
162
- elsif !attributes[self.class.attribute_map[key]].nil?
163
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
+ elsif !attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
164
162
  end
165
163
  end
166
-
167
- self
164
+ new(transformed_hash)
168
165
  end
169
166
 
170
167
  # Deserializes the data based on type
171
168
  # @param string type Data type
172
169
  # @param string value Value to be deserialized
173
170
  # @return [Object] Deserialized data
174
- def _deserialize(type, value)
171
+ def self._deserialize(type, value)
175
172
  case type.to_sym
176
173
  when :Time
177
174
  Time.parse(value)
@@ -206,7 +203,7 @@ module CityPayApiClient
206
203
  else # model
207
204
  # models (e.g. Pet) or oneOf
208
205
  klass = CityPayApiClient.const_get(type)
209
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
210
207
  end
211
208
  end
212
209
 
@@ -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 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.
4
+ # Welcome to the CityPay API, a robust HTTP API payment solution designed for seamless server-to-server transactional processing. Our API facilitates a wide array of payment operations, catering to diverse business needs. Whether you're integrating Internet payments, handling Mail Order/Telephone Order (MOTO) transactions, managing Subscriptions with Recurring and Continuous Authority payments, or navigating the complexities of 3-D Secure authentication, our API is equipped to support your requirements. Additionally, we offer functionalities for Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids, and Completion processing, alongside the capability for tokenised payments. ## Compliance and Security Overview <aside class=\"notice\"> Ensuring the security of payment transactions and compliance with industry standards is paramount. Our API is designed with stringent security measures and compliance protocols to safeguard sensitive information and meet the rigorous requirements of Visa, MasterCard, and the PCI Security Standards Council. </aside> ### Key Compliance and Security Measures * **TLS Encryption**: All data transmissions must utilise TLS version 1.2 or higher, employing [strong cryptography](#enabled-tls-ciphers). Our infrastructure strictly enforces this requirement to maintain the integrity and confidentiality of data in transit. We conduct regular scans and assessments of our TLS endpoints to identify and mitigate vulnerabilities. * **Data Storage Prohibitions**: Storing sensitive cardholder data (CHD), such as the card security code (CSC) or primary account number (PAN), is strictly prohibited. Our API is designed to minimize your exposure to sensitive data, thereby reducing your compliance burden. * **Data Masking**: For consumer protection and compliance, full card numbers must not be displayed on receipts or any customer-facing materials. Our API automatically masks PANs, displaying only the last four digits to facilitate safe receipt generation. * **Network Scans**: If your application is web-based, regular scans of your hosting environment are mandatory to identify and rectify potential vulnerabilities. This proactive measure is crucial for maintaining a secure and compliant online presence. * **PCI Compliance**: Adherence to PCI DSS standards is not optional; it's a requirement for operating securely and legally in the payments ecosystem. For detailed information on compliance requirements and resources, please visit the PCI Security Standards Council website [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/). * **Request Validation**: Our API includes mechanisms to verify the legitimacy of each request, ensuring it pertains to a valid account and originates from a trusted source. We leverage remote IP address verification alongside sophisticated application firewall technologies to thwart a wide array of common security threats. ## Getting Started Before integrating with the CityPay API, ensure your application and development practices align with the outlined compliance and security measures. This preparatory step is crucial for a smooth integration process and the long-term success of your payment processing operations. For further details on API endpoints, request/response formats, and code examples, proceed to the subsequent sections of our documentation. Our aim is to provide you with all the necessary tools and information to integrate our payment processing capabilities seamlessly into your application. Thank you for choosing CityPay API. We look forward to supporting your payment processing needs with our secure, compliant, and versatile API solution.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -65,6 +65,7 @@ module CityPayApiClient
65
65
  # Show invalid properties with the reasons. Usually used together with valid?
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
68
69
  invalid_properties = Array.new
69
70
  invalid_properties
70
71
  end
@@ -72,6 +73,7 @@ module CityPayApiClient
72
73
  # Check to see if the all the properties in the model are valid
73
74
  # @return true if the model is valid
74
75
  def valid?
76
+ warn '[DEPRECATED] the `valid?` method is obsolete'
75
77
  true
76
78
  end
77
79
 
@@ -99,37 +101,30 @@ module CityPayApiClient
99
101
  # @param [Hash] attributes Model attributes in the form of hash
100
102
  # @return [Object] Returns the model itself
101
103
  def self.build_from_hash(attributes)
102
- new.build_from_hash(attributes)
103
- end
104
-
105
- # Builds the object from hash
106
- # @param [Hash] attributes Model attributes in the form of hash
107
- # @return [Object] Returns the model itself
108
- def build_from_hash(attributes)
109
104
  return nil unless attributes.is_a?(Hash)
110
105
  attributes = attributes.transform_keys(&:to_sym)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
- self.send("#{key}=", nil)
106
+ transformed_hash = {}
107
+ openapi_types.each_pair do |key, type|
108
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
109
+ transformed_hash["#{key}"] = nil
114
110
  elsif type =~ /\AArray<(.*)>/i
115
111
  # check to ensure the input is an array given that the attribute
116
112
  # is documented as an array but the input is not
117
- if attributes[self.class.attribute_map[key]].is_a?(Array)
118
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
119
115
  end
120
- elsif !attributes[self.class.attribute_map[key]].nil?
121
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ elsif !attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
122
118
  end
123
119
  end
124
-
125
- self
120
+ new(transformed_hash)
126
121
  end
127
122
 
128
123
  # Deserializes the data based on type
129
124
  # @param string type Data type
130
125
  # @param string value Value to be deserialized
131
126
  # @return [Object] Deserialized data
132
- def _deserialize(type, value)
127
+ def self._deserialize(type, value)
133
128
  case type.to_sym
134
129
  when :Time
135
130
  Time.parse(value)
@@ -164,7 +159,7 @@ module CityPayApiClient
164
159
  else # model
165
160
  # models (e.g. Pet) or oneOf
166
161
  klass = CityPayApiClient.const_get(type)
167
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
162
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
163
  end
169
164
  end
170
165
 
@@ -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 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.
4
+ # Welcome to the CityPay API, a robust HTTP API payment solution designed for seamless server-to-server transactional processing. Our API facilitates a wide array of payment operations, catering to diverse business needs. Whether you're integrating Internet payments, handling Mail Order/Telephone Order (MOTO) transactions, managing Subscriptions with Recurring and Continuous Authority payments, or navigating the complexities of 3-D Secure authentication, our API is equipped to support your requirements. Additionally, we offer functionalities for Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids, and Completion processing, alongside the capability for tokenised payments. ## Compliance and Security Overview <aside class=\"notice\"> Ensuring the security of payment transactions and compliance with industry standards is paramount. Our API is designed with stringent security measures and compliance protocols to safeguard sensitive information and meet the rigorous requirements of Visa, MasterCard, and the PCI Security Standards Council. </aside> ### Key Compliance and Security Measures * **TLS Encryption**: All data transmissions must utilise TLS version 1.2 or higher, employing [strong cryptography](#enabled-tls-ciphers). Our infrastructure strictly enforces this requirement to maintain the integrity and confidentiality of data in transit. We conduct regular scans and assessments of our TLS endpoints to identify and mitigate vulnerabilities. * **Data Storage Prohibitions**: Storing sensitive cardholder data (CHD), such as the card security code (CSC) or primary account number (PAN), is strictly prohibited. Our API is designed to minimize your exposure to sensitive data, thereby reducing your compliance burden. * **Data Masking**: For consumer protection and compliance, full card numbers must not be displayed on receipts or any customer-facing materials. Our API automatically masks PANs, displaying only the last four digits to facilitate safe receipt generation. * **Network Scans**: If your application is web-based, regular scans of your hosting environment are mandatory to identify and rectify potential vulnerabilities. This proactive measure is crucial for maintaining a secure and compliant online presence. * **PCI Compliance**: Adherence to PCI DSS standards is not optional; it's a requirement for operating securely and legally in the payments ecosystem. For detailed information on compliance requirements and resources, please visit the PCI Security Standards Council website [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/). * **Request Validation**: Our API includes mechanisms to verify the legitimacy of each request, ensuring it pertains to a valid account and originates from a trusted source. We leverage remote IP address verification alongside sophisticated application firewall technologies to thwart a wide array of common security threats. ## Getting Started Before integrating with the CityPay API, ensure your application and development practices align with the outlined compliance and security measures. This preparatory step is crucial for a smooth integration process and the long-term success of your payment processing operations. For further details on API endpoints, request/response formats, and code examples, proceed to the subsequent sections of our documentation. Our aim is to provide you with all the necessary tools and information to integrate our payment processing capabilities seamlessly into your application. Thank you for choosing CityPay API. We look forward to supporting your payment processing needs with our secure, compliant, and versatile API solution.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -92,15 +92,8 @@ module CityPayApiClient
92
92
  # Show invalid properties with the reasons. Usually used together with valid?
93
93
  # @return Array for valid properties with the reasons
94
94
  def list_invalid_properties
95
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
96
  invalid_properties = Array.new
96
- if !@code.nil? && @code.to_s.length > 4
97
- invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 4.')
98
- end
99
-
100
- if !@code.nil? && @code.to_s.length < 3
101
- invalid_properties.push('invalid value for "code", the character length must be great than or equal to 3.')
102
- end
103
-
104
97
  if !@identifier.nil? && @identifier.to_s.length > 50
105
98
  invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
106
99
  end
@@ -115,35 +108,24 @@ module CityPayApiClient
115
108
  # Check to see if the all the properties in the model are valid
116
109
  # @return true if the model is valid
117
110
  def valid?
118
- return false if !@code.nil? && @code.to_s.length > 4
119
- return false if !@code.nil? && @code.to_s.length < 3
111
+ warn '[DEPRECATED] the `valid?` method is obsolete'
120
112
  return false if !@identifier.nil? && @identifier.to_s.length > 50
121
113
  return false if !@identifier.nil? && @identifier.to_s.length < 4
122
114
  true
123
115
  end
124
116
 
125
- # Custom attribute writer method with validation
126
- # @param [Object] code Value to be assigned
127
- def code=(code)
128
- if !code.nil? && code.to_s.length > 4
129
- fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 4.'
130
- end
131
-
132
- if !code.nil? && code.to_s.length < 3
133
- fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 3.'
134
- end
135
-
136
- @code = code
137
- end
138
-
139
117
  # Custom attribute writer method with validation
140
118
  # @param [Object] identifier Value to be assigned
141
119
  def identifier=(identifier)
142
- if !identifier.nil? && identifier.to_s.length > 50
120
+ if identifier.nil?
121
+ fail ArgumentError, 'identifier cannot be nil'
122
+ end
123
+
124
+ if identifier.to_s.length > 50
143
125
  fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
144
126
  end
145
127
 
146
- if !identifier.nil? && identifier.to_s.length < 4
128
+ if identifier.to_s.length < 4
147
129
  fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
148
130
  end
149
131
 
@@ -177,37 +159,30 @@ module CityPayApiClient
177
159
  # @param [Hash] attributes Model attributes in the form of hash
178
160
  # @return [Object] Returns the model itself
179
161
  def self.build_from_hash(attributes)
180
- new.build_from_hash(attributes)
181
- end
182
-
183
- # Builds the object from hash
184
- # @param [Hash] attributes Model attributes in the form of hash
185
- # @return [Object] Returns the model itself
186
- def build_from_hash(attributes)
187
162
  return nil unless attributes.is_a?(Hash)
188
163
  attributes = attributes.transform_keys(&:to_sym)
189
- self.class.openapi_types.each_pair do |key, type|
190
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
191
- self.send("#{key}=", nil)
164
+ transformed_hash = {}
165
+ openapi_types.each_pair do |key, type|
166
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = nil
192
168
  elsif type =~ /\AArray<(.*)>/i
193
169
  # check to ensure the input is an array given that the attribute
194
170
  # is documented as an array but the input is not
195
- if attributes[self.class.attribute_map[key]].is_a?(Array)
196
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ if attributes[attribute_map[key]].is_a?(Array)
172
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
197
173
  end
198
- elsif !attributes[self.class.attribute_map[key]].nil?
199
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
+ elsif !attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
200
176
  end
201
177
  end
202
-
203
- self
178
+ new(transformed_hash)
204
179
  end
205
180
 
206
181
  # Deserializes the data based on type
207
182
  # @param string type Data type
208
183
  # @param string value Value to be deserialized
209
184
  # @return [Object] Deserialized data
210
- def _deserialize(type, value)
185
+ def self._deserialize(type, value)
211
186
  case type.to_sym
212
187
  when :Time
213
188
  Time.parse(value)
@@ -242,7 +217,7 @@ module CityPayApiClient
242
217
  else # model
243
218
  # models (e.g. Pet) or oneOf
244
219
  klass = CityPayApiClient.const_get(type)
245
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
220
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
246
221
  end
247
222
  end
248
223
 
@@ -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 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.
4
+ # Welcome to the CityPay API, a robust HTTP API payment solution designed for seamless server-to-server transactional processing. Our API facilitates a wide array of payment operations, catering to diverse business needs. Whether you're integrating Internet payments, handling Mail Order/Telephone Order (MOTO) transactions, managing Subscriptions with Recurring and Continuous Authority payments, or navigating the complexities of 3-D Secure authentication, our API is equipped to support your requirements. Additionally, we offer functionalities for Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids, and Completion processing, alongside the capability for tokenised payments. ## Compliance and Security Overview <aside class=\"notice\"> Ensuring the security of payment transactions and compliance with industry standards is paramount. Our API is designed with stringent security measures and compliance protocols to safeguard sensitive information and meet the rigorous requirements of Visa, MasterCard, and the PCI Security Standards Council. </aside> ### Key Compliance and Security Measures * **TLS Encryption**: All data transmissions must utilise TLS version 1.2 or higher, employing [strong cryptography](#enabled-tls-ciphers). Our infrastructure strictly enforces this requirement to maintain the integrity and confidentiality of data in transit. We conduct regular scans and assessments of our TLS endpoints to identify and mitigate vulnerabilities. * **Data Storage Prohibitions**: Storing sensitive cardholder data (CHD), such as the card security code (CSC) or primary account number (PAN), is strictly prohibited. Our API is designed to minimize your exposure to sensitive data, thereby reducing your compliance burden. * **Data Masking**: For consumer protection and compliance, full card numbers must not be displayed on receipts or any customer-facing materials. Our API automatically masks PANs, displaying only the last four digits to facilitate safe receipt generation. * **Network Scans**: If your application is web-based, regular scans of your hosting environment are mandatory to identify and rectify potential vulnerabilities. This proactive measure is crucial for maintaining a secure and compliant online presence. * **PCI Compliance**: Adherence to PCI DSS standards is not optional; it's a requirement for operating securely and legally in the payments ecosystem. For detailed information on compliance requirements and resources, please visit the PCI Security Standards Council website [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/). * **Request Validation**: Our API includes mechanisms to verify the legitimacy of each request, ensuring it pertains to a valid account and originates from a trusted source. We leverage remote IP address verification alongside sophisticated application firewall technologies to thwart a wide array of common security threats. ## Getting Started Before integrating with the CityPay API, ensure your application and development practices align with the outlined compliance and security measures. This preparatory step is crucial for a smooth integration process and the long-term success of your payment processing operations. For further details on API endpoints, request/response formats, and code examples, proceed to the subsequent sections of our documentation. Our aim is to provide you with all the necessary tools and information to integrate our payment processing capabilities seamlessly into your application. Thank you for choosing CityPay API. We look forward to supporting your payment processing needs with our secure, compliant, and versatile API solution.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -59,12 +59,15 @@ module CityPayApiClient
59
59
 
60
60
  if attributes.key?(:'ip')
61
61
  self.ip = attributes[:'ip']
62
+ else
63
+ self.ip = nil
62
64
  end
63
65
  end
64
66
 
65
67
  # Show invalid properties with the reasons. Usually used together with valid?
66
68
  # @return Array for valid properties with the reasons
67
69
  def list_invalid_properties
70
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
68
71
  invalid_properties = Array.new
69
72
  if @ip.nil?
70
73
  invalid_properties.push('invalid value for "ip", ip cannot be nil.')
@@ -76,6 +79,7 @@ module CityPayApiClient
76
79
  # Check to see if the all the properties in the model are valid
77
80
  # @return true if the model is valid
78
81
  def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
79
83
  return false if @ip.nil?
80
84
  true
81
85
  end
@@ -104,37 +108,30 @@ module CityPayApiClient
104
108
  # @param [Hash] attributes Model attributes in the form of hash
105
109
  # @return [Object] Returns the model itself
106
110
  def self.build_from_hash(attributes)
107
- new.build_from_hash(attributes)
108
- end
109
-
110
- # Builds the object from hash
111
- # @param [Hash] attributes Model attributes in the form of hash
112
- # @return [Object] Returns the model itself
113
- def build_from_hash(attributes)
114
111
  return nil unless attributes.is_a?(Hash)
115
112
  attributes = attributes.transform_keys(&:to_sym)
116
- self.class.openapi_types.each_pair do |key, type|
117
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
118
- self.send("#{key}=", nil)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
119
117
  elsif type =~ /\AArray<(.*)>/i
120
118
  # check to ensure the input is an array given that the attribute
121
119
  # is documented as an array but the input is not
122
- if attributes[self.class.attribute_map[key]].is_a?(Array)
123
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
124
122
  end
125
- elsif !attributes[self.class.attribute_map[key]].nil?
126
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
127
125
  end
128
126
  end
129
-
130
- self
127
+ new(transformed_hash)
131
128
  end
132
129
 
133
130
  # Deserializes the data based on type
134
131
  # @param string type Data type
135
132
  # @param string value Value to be deserialized
136
133
  # @return [Object] Deserialized data
137
- def _deserialize(type, value)
134
+ def self._deserialize(type, value)
138
135
  case type.to_sym
139
136
  when :Time
140
137
  Time.parse(value)
@@ -169,7 +166,7 @@ module CityPayApiClient
169
166
  else # model
170
167
  # models (e.g. Pet) or oneOf
171
168
  klass = CityPayApiClient.const_get(type)
172
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
170
  end
174
171
  end
175
172