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
 
@@ -79,18 +79,26 @@ module CityPayApiClient
79
79
 
80
80
  if attributes.key?(:'amount')
81
81
  self.amount = attributes[:'amount']
82
+ else
83
+ self.amount = nil
82
84
  end
83
85
 
84
86
  if attributes.key?(:'identifier')
85
87
  self.identifier = attributes[:'identifier']
88
+ else
89
+ self.identifier = nil
86
90
  end
87
91
 
88
92
  if attributes.key?(:'merchantid')
89
93
  self.merchantid = attributes[:'merchantid']
94
+ else
95
+ self.merchantid = nil
90
96
  end
91
97
 
92
98
  if attributes.key?(:'refund_ref')
93
99
  self.refund_ref = attributes[:'refund_ref']
100
+ else
101
+ self.refund_ref = nil
94
102
  end
95
103
 
96
104
  if attributes.key?(:'trans_info')
@@ -101,6 +109,7 @@ module CityPayApiClient
101
109
  # Show invalid properties with the reasons. Usually used together with valid?
102
110
  # @return Array for valid properties with the reasons
103
111
  def list_invalid_properties
112
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
113
  invalid_properties = Array.new
105
114
  if @amount.nil?
106
115
  invalid_properties.push('invalid value for "amount", amount cannot be nil.')
@@ -136,6 +145,7 @@ module CityPayApiClient
136
145
  # Check to see if the all the properties in the model are valid
137
146
  # @return true if the model is valid
138
147
  def valid?
148
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
149
  return false if @amount.nil?
140
150
  return false if @identifier.nil?
141
151
  return false if @identifier.to_s.length > 50
@@ -177,7 +187,11 @@ module CityPayApiClient
177
187
  # Custom attribute writer method with validation
178
188
  # @param [Object] trans_info Value to be assigned
179
189
  def trans_info=(trans_info)
180
- if !trans_info.nil? && trans_info.to_s.length > 50
190
+ if trans_info.nil?
191
+ fail ArgumentError, 'trans_info cannot be nil'
192
+ end
193
+
194
+ if trans_info.to_s.length > 50
181
195
  fail ArgumentError, 'invalid value for "trans_info", the character length must be smaller than or equal to 50.'
182
196
  end
183
197
 
@@ -212,37 +226,30 @@ module CityPayApiClient
212
226
  # @param [Hash] attributes Model attributes in the form of hash
213
227
  # @return [Object] Returns the model itself
214
228
  def self.build_from_hash(attributes)
215
- new.build_from_hash(attributes)
216
- end
217
-
218
- # Builds the object from hash
219
- # @param [Hash] attributes Model attributes in the form of hash
220
- # @return [Object] Returns the model itself
221
- def build_from_hash(attributes)
222
229
  return nil unless attributes.is_a?(Hash)
223
230
  attributes = attributes.transform_keys(&:to_sym)
224
- self.class.openapi_types.each_pair do |key, type|
225
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
226
- self.send("#{key}=", nil)
231
+ transformed_hash = {}
232
+ openapi_types.each_pair do |key, type|
233
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
234
+ transformed_hash["#{key}"] = nil
227
235
  elsif type =~ /\AArray<(.*)>/i
228
236
  # check to ensure the input is an array given that the attribute
229
237
  # is documented as an array but the input is not
230
- if attributes[self.class.attribute_map[key]].is_a?(Array)
231
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
238
+ if attributes[attribute_map[key]].is_a?(Array)
239
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
232
240
  end
233
- elsif !attributes[self.class.attribute_map[key]].nil?
234
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
241
+ elsif !attributes[attribute_map[key]].nil?
242
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
235
243
  end
236
244
  end
237
-
238
- self
245
+ new(transformed_hash)
239
246
  end
240
247
 
241
248
  # Deserializes the data based on type
242
249
  # @param string type Data type
243
250
  # @param string value Value to be deserialized
244
251
  # @return [Object] Deserialized data
245
- def _deserialize(type, value)
252
+ def self._deserialize(type, value)
246
253
  case type.to_sym
247
254
  when :Time
248
255
  Time.parse(value)
@@ -277,7 +284,7 @@ module CityPayApiClient
277
284
  else # model
278
285
  # models (e.g. Pet) or oneOf
279
286
  klass = CityPayApiClient.const_get(type)
280
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
287
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
281
288
  end
282
289
  end
283
290
 
@@ -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
 
@@ -79,6 +79,8 @@ module CityPayApiClient
79
79
 
80
80
  if attributes.key?(:'cardnumber')
81
81
  self.cardnumber = attributes[:'cardnumber']
82
+ else
83
+ self.cardnumber = nil
82
84
  end
83
85
 
84
86
  if attributes.key?(:'default')
@@ -87,10 +89,14 @@ module CityPayApiClient
87
89
 
88
90
  if attributes.key?(:'expmonth')
89
91
  self.expmonth = attributes[:'expmonth']
92
+ else
93
+ self.expmonth = nil
90
94
  end
91
95
 
92
96
  if attributes.key?(:'expyear')
93
97
  self.expyear = attributes[:'expyear']
98
+ else
99
+ self.expyear = nil
94
100
  end
95
101
 
96
102
  if attributes.key?(:'name_on_card')
@@ -101,6 +107,7 @@ module CityPayApiClient
101
107
  # Show invalid properties with the reasons. Usually used together with valid?
102
108
  # @return Array for valid properties with the reasons
103
109
  def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
111
  invalid_properties = Array.new
105
112
  if @cardnumber.nil?
106
113
  invalid_properties.push('invalid value for "cardnumber", cardnumber cannot be nil.')
@@ -152,6 +159,7 @@ module CityPayApiClient
152
159
  # Check to see if the all the properties in the model are valid
153
160
  # @return true if the model is valid
154
161
  def valid?
162
+ warn '[DEPRECATED] the `valid?` method is obsolete'
155
163
  return false if @cardnumber.nil?
156
164
  return false if @cardnumber.to_s.length > 22
157
165
  return false if @cardnumber.to_s.length < 12
@@ -223,11 +231,15 @@ module CityPayApiClient
223
231
  # Custom attribute writer method with validation
224
232
  # @param [Object] name_on_card Value to be assigned
225
233
  def name_on_card=(name_on_card)
226
- if !name_on_card.nil? && name_on_card.to_s.length > 45
234
+ if name_on_card.nil?
235
+ fail ArgumentError, 'name_on_card cannot be nil'
236
+ end
237
+
238
+ if name_on_card.to_s.length > 45
227
239
  fail ArgumentError, 'invalid value for "name_on_card", the character length must be smaller than or equal to 45.'
228
240
  end
229
241
 
230
- if !name_on_card.nil? && name_on_card.to_s.length < 2
242
+ if name_on_card.to_s.length < 2
231
243
  fail ArgumentError, 'invalid value for "name_on_card", the character length must be great than or equal to 2.'
232
244
  end
233
245
 
@@ -262,37 +274,30 @@ module CityPayApiClient
262
274
  # @param [Hash] attributes Model attributes in the form of hash
263
275
  # @return [Object] Returns the model itself
264
276
  def self.build_from_hash(attributes)
265
- new.build_from_hash(attributes)
266
- end
267
-
268
- # Builds the object from hash
269
- # @param [Hash] attributes Model attributes in the form of hash
270
- # @return [Object] Returns the model itself
271
- def build_from_hash(attributes)
272
277
  return nil unless attributes.is_a?(Hash)
273
278
  attributes = attributes.transform_keys(&:to_sym)
274
- self.class.openapi_types.each_pair do |key, type|
275
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
276
- self.send("#{key}=", nil)
279
+ transformed_hash = {}
280
+ openapi_types.each_pair do |key, type|
281
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
282
+ transformed_hash["#{key}"] = nil
277
283
  elsif type =~ /\AArray<(.*)>/i
278
284
  # check to ensure the input is an array given that the attribute
279
285
  # is documented as an array but the input is not
280
- if attributes[self.class.attribute_map[key]].is_a?(Array)
281
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
286
+ if attributes[attribute_map[key]].is_a?(Array)
287
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
282
288
  end
283
- elsif !attributes[self.class.attribute_map[key]].nil?
284
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
289
+ elsif !attributes[attribute_map[key]].nil?
290
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
285
291
  end
286
292
  end
287
-
288
- self
293
+ new(transformed_hash)
289
294
  end
290
295
 
291
296
  # Deserializes the data based on type
292
297
  # @param string type Data type
293
298
  # @param string value Value to be deserialized
294
299
  # @return [Object] Deserialized data
295
- def _deserialize(type, value)
300
+ def self._deserialize(type, value)
296
301
  case type.to_sym
297
302
  when :Time
298
303
  Time.parse(value)
@@ -327,7 +332,7 @@ module CityPayApiClient
327
332
  else # model
328
333
  # models (e.g. Pet) or oneOf
329
334
  klass = CityPayApiClient.const_get(type)
330
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
335
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
331
336
  end
332
337
  end
333
338