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.
- checksums.yaml +4 -4
- data/Gemfile.lock +73 -0
- data/README.md +65 -37
- data/citypay_api_client.gemspec +4 -3
- data/docs/Acknowledgement.md +2 -2
- data/docs/AclCheckResponseModel.md +3 -3
- data/docs/AirlineAdvice.md +1 -1
- data/docs/AuthRequest.md +9 -7
- data/docs/AuthResponse.md +9 -5
- data/docs/AuthorisationAndPaymentApi.md +145 -10
- data/docs/Batch.md +1 -1
- data/docs/BatchProcessingApi.md +24 -20
- data/docs/BatchReportResponseModel.md +2 -2
- data/docs/BatchTransaction.md +1 -1
- data/docs/BatchTransactionReportRequest.md +22 -0
- data/docs/BatchTransactionReportResponse.md +24 -0
- data/docs/BatchTransactionResultModel.md +6 -2
- data/docs/Bin.md +2 -2
- data/docs/CaptureRequest.md +1 -1
- data/docs/Card.md +3 -3
- data/docs/CardHolderAccountApi.md +73 -14
- data/docs/ChargeRequest.md +8 -6
- data/docs/ContactDetails.md +11 -11
- data/docs/Decision.md +0 -2
- data/docs/DirectPostApi.md +26 -16
- data/docs/DirectPostRequest.md +9 -7
- data/docs/EventDataModel.md +2 -2
- data/docs/MerchantBatchReportRequest.md +28 -0
- data/docs/MerchantBatchReportResponse.md +24 -0
- data/docs/MerchantBatchResponse.md +30 -0
- data/docs/NetSummaryResponse.md +32 -0
- data/docs/OperationalFunctionsApi.md +28 -8
- data/docs/PaylinkAdjustmentRequest.md +1 -1
- data/docs/PaylinkApi.md +337 -21
- data/docs/PaylinkBillPaymentTokenRequest.md +1 -1
- data/docs/PaylinkCustomParam.md +3 -1
- data/docs/PaylinkErrorCode.md +2 -2
- data/docs/PaylinkFieldGuardModel.md +1 -1
- data/docs/PaylinkResendNotificationRequest.md +20 -0
- data/docs/PaylinkStateEvent.md +4 -4
- data/docs/PaylinkTokenCreated.md +11 -11
- data/docs/PaylinkTokenRequestModel.md +4 -0
- data/docs/PaylinkTokenStatus.md +7 -7
- data/docs/PaylinkTokenStatusChangeRequest.md +7 -7
- data/docs/PaylinkTokenStatusChangeResponse.md +6 -2
- data/docs/PaymentIntent.md +42 -0
- data/docs/PaymentIntentReference.md +18 -0
- data/docs/RefundRequest.md +1 -1
- data/docs/RegisterCard.md +1 -1
- data/docs/RemittanceData.md +28 -0
- data/docs/RemittanceReportRequest.md +28 -0
- data/docs/RemittanceReportResponse.md +24 -0
- data/docs/RemittedClientData.md +44 -0
- data/docs/ReportingApi.md +378 -0
- data/docs/ThreeDSecure.md +1 -1
- data/docs/TokenisationResponseModel.md +3 -3
- data/docs/images/3dsv1-challenge.png +0 -0
- data/docs/images/3dsv2-challenge.png +0 -0
- data/docs/images/3dsv2-frictionless.png +0 -0
- data/docs/images/3dsv2-method-challenge.png +0 -0
- data/docs/images/3dsv2-method-frictionless.png +0 -0
- data/docs/images/3dsv2-no3d.png +0 -0
- data/docs/images/citypay-logo.svg +1 -0
- data/docs/images/direct-post-flow.png +0 -0
- data/docs/images/favicon.ico +0 -0
- data/docs/images/header.png +0 -0
- data/docs/images/logo.ai +1913 -4
- data/docs/images/logo.png +0 -0
- data/docs/images/logo.svg +1 -0
- data/docs/images/merchant-BPS-workflow.png +0 -0
- data/docs/images/paylink-field-guards.png +0 -0
- data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +72 -4
- data/lib/citypay_api_client/api/batch_processing_api__.rb +15 -15
- data/lib/citypay_api_client/api/card_holder_account_api__.rb +5 -2
- data/lib/citypay_api_client/api/direct_post_api__.rb +9 -9
- data/lib/citypay_api_client/api/operational_functions_api__.rb +3 -3
- data/lib/citypay_api_client/api/paylink_api__.rb +163 -26
- data/lib/citypay_api_client/api/reporting_api__.rb +381 -0
- data/lib/citypay_api_client/api_client.rb +24 -22
- data/lib/citypay_api_client/api_error.rb +3 -2
- data/lib/citypay_api_client/configuration.rb +28 -9
- data/lib/citypay_api_client/models/account_create.rb +17 -20
- data/lib/citypay_api_client/models/account_status.rb +15 -20
- data/lib/citypay_api_client/models/acknowledgement.rb +21 -46
- data/lib/citypay_api_client/models/acl_check_request.rb +17 -20
- data/lib/citypay_api_client/models/acl_check_response_model.rb +16 -21
- data/lib/citypay_api_client/models/airline_advice.rb +45 -29
- data/lib/citypay_api_client/models/airline_segment.rb +35 -22
- data/lib/citypay_api_client/models/auth_reference.rb +41 -26
- data/lib/citypay_api_client/models/auth_references.rb +15 -20
- data/lib/citypay_api_client/models/auth_request.rb +72 -34
- data/lib/citypay_api_client/models/auth_response.rb +46 -23
- data/lib/citypay_api_client/models/authen_required.rb +15 -20
- data/lib/citypay_api_client/models/batch.rb +25 -22
- data/lib/citypay_api_client/models/batch_report_request.rb +23 -22
- data/lib/citypay_api_client/models/batch_report_response_model.rb +28 -21
- data/lib/citypay_api_client/models/batch_transaction.rb +25 -22
- data/lib/citypay_api_client/models/batch_transaction_report_request.rb +234 -0
- data/lib/citypay_api_client/models/batch_transaction_report_response.rb +252 -0
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +53 -22
- data/lib/citypay_api_client/models/bin.rb +15 -20
- data/lib/citypay_api_client/models/bin_lookup.rb +17 -20
- data/lib/citypay_api_client/models/c_res_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/capture_request.rb +27 -22
- data/lib/citypay_api_client/models/card.rb +33 -26
- data/lib/citypay_api_client/models/card_holder_account.rb +19 -20
- data/lib/citypay_api_client/models/card_status.rb +15 -20
- data/lib/citypay_api_client/models/charge_request.rb +72 -34
- data/lib/citypay_api_client/models/check_batch_status.rb +23 -22
- data/lib/citypay_api_client/models/check_batch_status_response.rb +15 -20
- data/lib/citypay_api_client/models/contact_details.rb +77 -42
- data/lib/citypay_api_client/models/decision.rb +16 -30
- data/lib/citypay_api_client/models/direct_post_request.rb +72 -34
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/domain_key_check_request.rb +17 -20
- data/lib/citypay_api_client/models/domain_key_request.rb +19 -20
- data/lib/citypay_api_client/models/domain_key_response.rb +25 -22
- data/lib/citypay_api_client/models/error.rb +27 -24
- data/lib/citypay_api_client/models/event_data_model.rb +15 -20
- data/lib/citypay_api_client/models/exists.rb +17 -20
- data/lib/citypay_api_client/models/external_mpi.rb +39 -24
- data/lib/citypay_api_client/models/list_merchants_response.rb +21 -22
- data/lib/citypay_api_client/models/mcc6012.rb +15 -20
- data/lib/citypay_api_client/models/merchant.rb +15 -20
- data/lib/citypay_api_client/models/merchant_batch_report_request.rb +265 -0
- data/lib/citypay_api_client/models/merchant_batch_report_response.rb +252 -0
- data/lib/citypay_api_client/models/merchant_batch_response.rb +301 -0
- data/lib/citypay_api_client/models/net_summary_response.rb +472 -0
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_address.rb +52 -29
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +25 -22
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +19 -20
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +17 -20
- data/lib/citypay_api_client/models/paylink_card_holder.rb +30 -23
- data/lib/citypay_api_client/models/paylink_cart.rb +15 -20
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +15 -20
- data/lib/citypay_api_client/models/paylink_config.rb +15 -20
- data/lib/citypay_api_client/models/paylink_custom_param.rb +29 -22
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_error_code.rb +19 -20
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +16 -21
- data/lib/citypay_api_client/models/paylink_part_payments.rb +15 -20
- data/lib/citypay_api_client/models/paylink_resend_notification_request.rb +224 -0
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_state_event.rb +16 -21
- data/lib/citypay_api_client/models/paylink_token_created.rb +56 -27
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +75 -22
- data/lib/citypay_api_client/models/paylink_token_status.rb +44 -21
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +24 -26
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +39 -22
- data/lib/citypay_api_client/models/paylink_ui.rb +15 -20
- data/lib/citypay_api_client/models/payment_intent.rb +479 -0
- data/lib/citypay_api_client/models/payment_intent_reference.rb +221 -0
- data/lib/citypay_api_client/models/ping.rb +21 -22
- data/lib/citypay_api_client/models/process_batch_request.rb +27 -22
- data/lib/citypay_api_client/models/process_batch_response.rb +17 -20
- data/lib/citypay_api_client/models/refund_request.rb +28 -21
- data/lib/citypay_api_client/models/register_card.rb +27 -22
- data/lib/citypay_api_client/models/remittance_data.rb +404 -0
- data/lib/citypay_api_client/models/remittance_report_request.rb +265 -0
- data/lib/citypay_api_client/models/remittance_report_response.rb +252 -0
- data/lib/citypay_api_client/models/remitted_client_data.rb +612 -0
- data/lib/citypay_api_client/models/request_challenged.rb +15 -20
- data/lib/citypay_api_client/models/retrieve_request.rb +23 -22
- data/lib/citypay_api_client/models/three_d_secure.rb +16 -21
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +23 -24
- data/lib/citypay_api_client/models/void_request.rb +23 -22
- data/lib/citypay_api_client/version.rb +3 -3
- data/lib/citypay_api_client.rb +16 -3
- data/spec/api/reporting_api___spec.rb +99 -0
- data/spec/it_api_sandbox_spec.rb +5 -14
- data/spec/models/account_create_spec.rb +1 -2
- data/spec/models/account_status_spec.rb +2 -2
- data/spec/models/airline_advice_spec.rb +0 -2
- data/spec/models/airline_segment_spec.rb +0 -2
- data/spec/models/auth_request_spec.rb +0 -2
- data/spec/models/auth_response_spec.rb +75 -30
- data/spec/models/batch_report_request_spec.rb +0 -2
- data/spec/models/batch_report_response_model_spec.rb +0 -2
- data/spec/models/batch_spec.rb +0 -2
- data/spec/models/batch_transaction_report_request_spec.rb +47 -0
- data/spec/models/batch_transaction_report_response_spec.rb +53 -0
- data/spec/models/batch_transaction_result_model_spec.rb +0 -2
- data/spec/models/batch_transaction_spec.rb +0 -2
- data/spec/models/bin_lookup_spec.rb +0 -2
- data/spec/models/capture_request_spec.rb +0 -2
- data/spec/models/card_holder_account_spec.rb +0 -2
- data/spec/models/charge_request_spec.rb +0 -2
- data/spec/models/decision_spec.rb +0 -26
- data/spec/models/direct_post_request_spec.rb +0 -2
- data/spec/models/domain_key_check_request_spec.rb +0 -2
- data/spec/models/merchant_batch_report_request_spec.rb +65 -0
- data/spec/models/merchant_batch_report_response_spec.rb +53 -0
- data/spec/models/merchant_batch_response_spec.rb +71 -0
- data/spec/models/net_summary_response_spec.rb +77 -0
- data/spec/models/paylink_resend_notification_request_spec.rb +41 -0
- data/spec/models/paylink_token_request_model_spec.rb +0 -2
- data/spec/models/payment_intent_reference_spec.rb +35 -0
- data/spec/models/payment_intent_spec.rb +107 -0
- data/spec/models/process_batch_request_spec.rb +0 -2
- data/spec/models/refund_request_spec.rb +0 -2
- data/spec/models/register_card_spec.rb +0 -2
- data/spec/models/remittance_data_spec.rb +65 -0
- data/spec/models/remittance_report_request_spec.rb +65 -0
- data/spec/models/remittance_report_response_spec.rb +53 -0
- data/spec/models/remitted_client_data_spec.rb +113 -0
- data/spec/spec_helper.rb +2 -2
- metadata +146 -78
- data/docs/OperationalApi.md +0 -214
- data/docs/PaymentProcessingApi.md +0 -559
- data/spec/models/authen_required_spec.rb +0 -52
@@ -1,11 +1,11 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
#
|
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:
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
@@ -34,7 +34,7 @@ module CityPayApiClient
|
|
34
34
|
attr_accessor :mode
|
35
35
|
|
36
36
|
# A URL of a qrcode which can be used to refer to the token URL.
|
37
|
-
attr_accessor :
|
37
|
+
attr_accessor :qrcode
|
38
38
|
|
39
39
|
# The result field contains the result for the Paylink Token Request. 0 - indicates that an error was encountered while creating the token. 1 - which indicates that a Token was successfully created.
|
40
40
|
attr_accessor :result
|
@@ -64,7 +64,7 @@ module CityPayApiClient
|
|
64
64
|
:'id' => :'id',
|
65
65
|
:'identifier' => :'identifier',
|
66
66
|
:'mode' => :'mode',
|
67
|
-
:'
|
67
|
+
:'qrcode' => :'qrcode',
|
68
68
|
:'result' => :'result',
|
69
69
|
:'server_version' => :'server_version',
|
70
70
|
:'source' => :'source',
|
@@ -89,7 +89,7 @@ module CityPayApiClient
|
|
89
89
|
:'id' => :'String',
|
90
90
|
:'identifier' => :'String',
|
91
91
|
:'mode' => :'String',
|
92
|
-
:'
|
92
|
+
:'qrcode' => :'String',
|
93
93
|
:'result' => :'Integer',
|
94
94
|
:'server_version' => :'String',
|
95
95
|
:'source' => :'String',
|
@@ -140,6 +140,8 @@ module CityPayApiClient
|
|
140
140
|
|
141
141
|
if attributes.key?(:'id')
|
142
142
|
self.id = attributes[:'id']
|
143
|
+
else
|
144
|
+
self.id = nil
|
143
145
|
end
|
144
146
|
|
145
147
|
if attributes.key?(:'identifier')
|
@@ -150,12 +152,14 @@ module CityPayApiClient
|
|
150
152
|
self.mode = attributes[:'mode']
|
151
153
|
end
|
152
154
|
|
153
|
-
if attributes.key?(:'
|
154
|
-
self.
|
155
|
+
if attributes.key?(:'qrcode')
|
156
|
+
self.qrcode = attributes[:'qrcode']
|
155
157
|
end
|
156
158
|
|
157
159
|
if attributes.key?(:'result')
|
158
160
|
self.result = attributes[:'result']
|
161
|
+
else
|
162
|
+
self.result = nil
|
159
163
|
end
|
160
164
|
|
161
165
|
if attributes.key?(:'server_version')
|
@@ -168,6 +172,8 @@ module CityPayApiClient
|
|
168
172
|
|
169
173
|
if attributes.key?(:'token')
|
170
174
|
self.token = attributes[:'token']
|
175
|
+
else
|
176
|
+
self.token = nil
|
171
177
|
end
|
172
178
|
|
173
179
|
if attributes.key?(:'url')
|
@@ -182,11 +188,20 @@ module CityPayApiClient
|
|
182
188
|
# Show invalid properties with the reasons. Usually used together with valid?
|
183
189
|
# @return Array for valid properties with the reasons
|
184
190
|
def list_invalid_properties
|
191
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
185
192
|
invalid_properties = Array.new
|
186
193
|
if @id.nil?
|
187
194
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
188
195
|
end
|
189
196
|
|
197
|
+
if !@identifier.nil? && @identifier.to_s.length > 50
|
198
|
+
invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
|
199
|
+
end
|
200
|
+
|
201
|
+
if !@identifier.nil? && @identifier.to_s.length < 4
|
202
|
+
invalid_properties.push('invalid value for "identifier", the character length must be great than or equal to 4.')
|
203
|
+
end
|
204
|
+
|
190
205
|
if @result.nil?
|
191
206
|
invalid_properties.push('invalid value for "result", result cannot be nil.')
|
192
207
|
end
|
@@ -201,12 +216,33 @@ module CityPayApiClient
|
|
201
216
|
# Check to see if the all the properties in the model are valid
|
202
217
|
# @return true if the model is valid
|
203
218
|
def valid?
|
219
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
204
220
|
return false if @id.nil?
|
221
|
+
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
222
|
+
return false if !@identifier.nil? && @identifier.to_s.length < 4
|
205
223
|
return false if @result.nil?
|
206
224
|
return false if @token.nil?
|
207
225
|
true
|
208
226
|
end
|
209
227
|
|
228
|
+
# Custom attribute writer method with validation
|
229
|
+
# @param [Object] identifier Value to be assigned
|
230
|
+
def identifier=(identifier)
|
231
|
+
if identifier.nil?
|
232
|
+
fail ArgumentError, 'identifier cannot be nil'
|
233
|
+
end
|
234
|
+
|
235
|
+
if identifier.to_s.length > 50
|
236
|
+
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
237
|
+
end
|
238
|
+
|
239
|
+
if identifier.to_s.length < 4
|
240
|
+
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
241
|
+
end
|
242
|
+
|
243
|
+
@identifier = identifier
|
244
|
+
end
|
245
|
+
|
210
246
|
# Checks equality by comparing each attribute.
|
211
247
|
# @param [Object] Object to be compared
|
212
248
|
def ==(o)
|
@@ -219,7 +255,7 @@ module CityPayApiClient
|
|
219
255
|
id == o.id &&
|
220
256
|
identifier == o.identifier &&
|
221
257
|
mode == o.mode &&
|
222
|
-
|
258
|
+
qrcode == o.qrcode &&
|
223
259
|
result == o.result &&
|
224
260
|
server_version == o.server_version &&
|
225
261
|
source == o.source &&
|
@@ -237,44 +273,37 @@ module CityPayApiClient
|
|
237
273
|
# Calculates hash code according to all attributes.
|
238
274
|
# @return [Integer] Hash code
|
239
275
|
def hash
|
240
|
-
[attachments, bps, date_created, errors, id, identifier, mode,
|
276
|
+
[attachments, bps, date_created, errors, id, identifier, mode, qrcode, result, server_version, source, token, url, usc].hash
|
241
277
|
end
|
242
278
|
|
243
279
|
# Builds the object from hash
|
244
280
|
# @param [Hash] attributes Model attributes in the form of hash
|
245
281
|
# @return [Object] Returns the model itself
|
246
282
|
def self.build_from_hash(attributes)
|
247
|
-
new.build_from_hash(attributes)
|
248
|
-
end
|
249
|
-
|
250
|
-
# Builds the object from hash
|
251
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
252
|
-
# @return [Object] Returns the model itself
|
253
|
-
def build_from_hash(attributes)
|
254
283
|
return nil unless attributes.is_a?(Hash)
|
255
284
|
attributes = attributes.transform_keys(&:to_sym)
|
256
|
-
|
257
|
-
|
258
|
-
|
285
|
+
transformed_hash = {}
|
286
|
+
openapi_types.each_pair do |key, type|
|
287
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
288
|
+
transformed_hash["#{key}"] = nil
|
259
289
|
elsif type =~ /\AArray<(.*)>/i
|
260
290
|
# check to ensure the input is an array given that the attribute
|
261
291
|
# is documented as an array but the input is not
|
262
|
-
if attributes[
|
263
|
-
|
292
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
293
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
264
294
|
end
|
265
|
-
elsif !attributes[
|
266
|
-
|
295
|
+
elsif !attributes[attribute_map[key]].nil?
|
296
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
267
297
|
end
|
268
298
|
end
|
269
|
-
|
270
|
-
self
|
299
|
+
new(transformed_hash)
|
271
300
|
end
|
272
301
|
|
273
302
|
# Deserializes the data based on type
|
274
303
|
# @param string type Data type
|
275
304
|
# @param string value Value to be deserialized
|
276
305
|
# @return [Object] Deserialized data
|
277
|
-
def _deserialize(type, value)
|
306
|
+
def self._deserialize(type, value)
|
278
307
|
case type.to_sym
|
279
308
|
when :Time
|
280
309
|
Time.parse(value)
|
@@ -309,7 +338,7 @@ module CityPayApiClient
|
|
309
338
|
else # model
|
310
339
|
# models (e.g. Pet) or oneOf
|
311
340
|
klass = CityPayApiClient.const_get(type)
|
312
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
341
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
313
342
|
end
|
314
343
|
end
|
315
344
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
#
|
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:
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
@@ -29,6 +29,9 @@ module CityPayApiClient
|
|
29
29
|
|
30
30
|
attr_accessor :config
|
31
31
|
|
32
|
+
# A currency for the token. This value should be only used on multi-currency accounts and be an appropriate currency which the account is configured for.
|
33
|
+
attr_accessor :currency
|
34
|
+
|
32
35
|
# The email field is used for the Merchant to be notified on completion of the transaction . The value may be supplied to override the default stored value. Emails sent to this address by the Paylink service should not be forwarded on to the cardholder as it may contain certain information that is used by the Paylink service to validate and authenticate Paylink Token Requests: for example, the Merchant ID and the licence key.
|
33
36
|
attr_accessor :email
|
34
37
|
|
@@ -38,6 +41,9 @@ module CityPayApiClient
|
|
38
41
|
# The merchant id you wish to process this transaction with.
|
39
42
|
attr_accessor :merchantid
|
40
43
|
|
44
|
+
# True if the intent of this cardholder initiated transaction is to establish a recurring payment model, processable as merchant initiated transactions.
|
45
|
+
attr_accessor :recurring
|
46
|
+
|
41
47
|
# an id associated with a subscription to link the token request against.
|
42
48
|
attr_accessor :subscription_id
|
43
49
|
|
@@ -53,9 +59,11 @@ module CityPayApiClient
|
|
53
59
|
:'cart' => :'cart',
|
54
60
|
:'client_version' => :'client_version',
|
55
61
|
:'config' => :'config',
|
62
|
+
:'currency' => :'currency',
|
56
63
|
:'email' => :'email',
|
57
64
|
:'identifier' => :'identifier',
|
58
65
|
:'merchantid' => :'merchantid',
|
66
|
+
:'recurring' => :'recurring',
|
59
67
|
:'subscription_id' => :'subscription_id',
|
60
68
|
:'tx_type' => :'tx_type'
|
61
69
|
}
|
@@ -75,9 +83,11 @@ module CityPayApiClient
|
|
75
83
|
:'cart' => :'PaylinkCart',
|
76
84
|
:'client_version' => :'String',
|
77
85
|
:'config' => :'PaylinkConfig',
|
86
|
+
:'currency' => :'String',
|
78
87
|
:'email' => :'String',
|
79
88
|
:'identifier' => :'String',
|
80
89
|
:'merchantid' => :'Integer',
|
90
|
+
:'recurring' => :'Boolean',
|
81
91
|
:'subscription_id' => :'String',
|
82
92
|
:'tx_type' => :'String'
|
83
93
|
}
|
@@ -110,6 +120,8 @@ module CityPayApiClient
|
|
110
120
|
|
111
121
|
if attributes.key?(:'amount')
|
112
122
|
self.amount = attributes[:'amount']
|
123
|
+
else
|
124
|
+
self.amount = nil
|
113
125
|
end
|
114
126
|
|
115
127
|
if attributes.key?(:'cardholder')
|
@@ -128,16 +140,28 @@ module CityPayApiClient
|
|
128
140
|
self.config = attributes[:'config']
|
129
141
|
end
|
130
142
|
|
143
|
+
if attributes.key?(:'currency')
|
144
|
+
self.currency = attributes[:'currency']
|
145
|
+
end
|
146
|
+
|
131
147
|
if attributes.key?(:'email')
|
132
148
|
self.email = attributes[:'email']
|
133
149
|
end
|
134
150
|
|
135
151
|
if attributes.key?(:'identifier')
|
136
152
|
self.identifier = attributes[:'identifier']
|
153
|
+
else
|
154
|
+
self.identifier = nil
|
137
155
|
end
|
138
156
|
|
139
157
|
if attributes.key?(:'merchantid')
|
140
158
|
self.merchantid = attributes[:'merchantid']
|
159
|
+
else
|
160
|
+
self.merchantid = nil
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.key?(:'recurring')
|
164
|
+
self.recurring = attributes[:'recurring']
|
141
165
|
end
|
142
166
|
|
143
167
|
if attributes.key?(:'subscription_id')
|
@@ -152,11 +176,20 @@ module CityPayApiClient
|
|
152
176
|
# Show invalid properties with the reasons. Usually used together with valid?
|
153
177
|
# @return Array for valid properties with the reasons
|
154
178
|
def list_invalid_properties
|
179
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
155
180
|
invalid_properties = Array.new
|
156
181
|
if @amount.nil?
|
157
182
|
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
158
183
|
end
|
159
184
|
|
185
|
+
if !@currency.nil? && @currency.to_s.length > 3
|
186
|
+
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
187
|
+
end
|
188
|
+
|
189
|
+
if !@currency.nil? && @currency.to_s.length < 3
|
190
|
+
invalid_properties.push('invalid value for "currency", the character length must be great than or equal to 3.')
|
191
|
+
end
|
192
|
+
|
160
193
|
if !@email.nil? && @email.to_s.length > 254
|
161
194
|
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 254.')
|
162
195
|
end
|
@@ -183,7 +216,10 @@ module CityPayApiClient
|
|
183
216
|
# Check to see if the all the properties in the model are valid
|
184
217
|
# @return true if the model is valid
|
185
218
|
def valid?
|
219
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
186
220
|
return false if @amount.nil?
|
221
|
+
return false if !@currency.nil? && @currency.to_s.length > 3
|
222
|
+
return false if !@currency.nil? && @currency.to_s.length < 3
|
187
223
|
return false if !@email.nil? && @email.to_s.length > 254
|
188
224
|
return false if @identifier.nil?
|
189
225
|
return false if @identifier.to_s.length > 50
|
@@ -192,10 +228,32 @@ module CityPayApiClient
|
|
192
228
|
true
|
193
229
|
end
|
194
230
|
|
231
|
+
# Custom attribute writer method with validation
|
232
|
+
# @param [Object] currency Value to be assigned
|
233
|
+
def currency=(currency)
|
234
|
+
if currency.nil?
|
235
|
+
fail ArgumentError, 'currency cannot be nil'
|
236
|
+
end
|
237
|
+
|
238
|
+
if currency.to_s.length > 3
|
239
|
+
fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
|
240
|
+
end
|
241
|
+
|
242
|
+
if currency.to_s.length < 3
|
243
|
+
fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
|
244
|
+
end
|
245
|
+
|
246
|
+
@currency = currency
|
247
|
+
end
|
248
|
+
|
195
249
|
# Custom attribute writer method with validation
|
196
250
|
# @param [Object] email Value to be assigned
|
197
251
|
def email=(email)
|
198
|
-
if
|
252
|
+
if email.nil?
|
253
|
+
fail ArgumentError, 'email cannot be nil'
|
254
|
+
end
|
255
|
+
|
256
|
+
if email.to_s.length > 254
|
199
257
|
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
|
200
258
|
end
|
201
259
|
|
@@ -231,9 +289,11 @@ module CityPayApiClient
|
|
231
289
|
cart == o.cart &&
|
232
290
|
client_version == o.client_version &&
|
233
291
|
config == o.config &&
|
292
|
+
currency == o.currency &&
|
234
293
|
email == o.email &&
|
235
294
|
identifier == o.identifier &&
|
236
295
|
merchantid == o.merchantid &&
|
296
|
+
recurring == o.recurring &&
|
237
297
|
subscription_id == o.subscription_id &&
|
238
298
|
tx_type == o.tx_type
|
239
299
|
end
|
@@ -247,44 +307,37 @@ module CityPayApiClient
|
|
247
307
|
# Calculates hash code according to all attributes.
|
248
308
|
# @return [Integer] Hash code
|
249
309
|
def hash
|
250
|
-
[accountno, amount, cardholder, cart, client_version, config, email, identifier, merchantid, subscription_id, tx_type].hash
|
310
|
+
[accountno, amount, cardholder, cart, client_version, config, currency, email, identifier, merchantid, recurring, subscription_id, tx_type].hash
|
251
311
|
end
|
252
312
|
|
253
313
|
# Builds the object from hash
|
254
314
|
# @param [Hash] attributes Model attributes in the form of hash
|
255
315
|
# @return [Object] Returns the model itself
|
256
316
|
def self.build_from_hash(attributes)
|
257
|
-
new.build_from_hash(attributes)
|
258
|
-
end
|
259
|
-
|
260
|
-
# Builds the object from hash
|
261
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
262
|
-
# @return [Object] Returns the model itself
|
263
|
-
def build_from_hash(attributes)
|
264
317
|
return nil unless attributes.is_a?(Hash)
|
265
318
|
attributes = attributes.transform_keys(&:to_sym)
|
266
|
-
|
267
|
-
|
268
|
-
|
319
|
+
transformed_hash = {}
|
320
|
+
openapi_types.each_pair do |key, type|
|
321
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
322
|
+
transformed_hash["#{key}"] = nil
|
269
323
|
elsif type =~ /\AArray<(.*)>/i
|
270
324
|
# check to ensure the input is an array given that the attribute
|
271
325
|
# is documented as an array but the input is not
|
272
|
-
if attributes[
|
273
|
-
|
326
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
327
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
274
328
|
end
|
275
|
-
elsif !attributes[
|
276
|
-
|
329
|
+
elsif !attributes[attribute_map[key]].nil?
|
330
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
277
331
|
end
|
278
332
|
end
|
279
|
-
|
280
|
-
self
|
333
|
+
new(transformed_hash)
|
281
334
|
end
|
282
335
|
|
283
336
|
# Deserializes the data based on type
|
284
337
|
# @param string type Data type
|
285
338
|
# @param string value Value to be deserialized
|
286
339
|
# @return [Object] Deserialized data
|
287
|
-
def _deserialize(type, value)
|
340
|
+
def self._deserialize(type, value)
|
288
341
|
case type.to_sym
|
289
342
|
when :Time
|
290
343
|
Time.parse(value)
|
@@ -319,7 +372,7 @@ module CityPayApiClient
|
|
319
372
|
else # model
|
320
373
|
# models (e.g. Pet) or oneOf
|
321
374
|
klass = CityPayApiClient.const_get(type)
|
322
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
375
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
323
376
|
end
|
324
377
|
end
|
325
378
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
#
|
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:
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
@@ -162,7 +162,7 @@ module CityPayApiClient
|
|
162
162
|
:'is_validated' => :'Boolean',
|
163
163
|
:'last_event_date_time' => :'Time',
|
164
164
|
:'last_payment_result' => :'String',
|
165
|
-
:'mid' => :'
|
165
|
+
:'mid' => :'Integer',
|
166
166
|
:'payment_attempts_count' => :'Integer',
|
167
167
|
:'state_history' => :'Array<PaylinkStateEvent>',
|
168
168
|
:'token' => :'String',
|
@@ -309,16 +309,46 @@ module CityPayApiClient
|
|
309
309
|
# Show invalid properties with the reasons. Usually used together with valid?
|
310
310
|
# @return Array for valid properties with the reasons
|
311
311
|
def list_invalid_properties
|
312
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
312
313
|
invalid_properties = Array.new
|
314
|
+
if !@identifier.nil? && @identifier.to_s.length > 50
|
315
|
+
invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
|
316
|
+
end
|
317
|
+
|
318
|
+
if !@identifier.nil? && @identifier.to_s.length < 4
|
319
|
+
invalid_properties.push('invalid value for "identifier", the character length must be great than or equal to 4.')
|
320
|
+
end
|
321
|
+
|
313
322
|
invalid_properties
|
314
323
|
end
|
315
324
|
|
316
325
|
# Check to see if the all the properties in the model are valid
|
317
326
|
# @return true if the model is valid
|
318
327
|
def valid?
|
328
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
329
|
+
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
330
|
+
return false if !@identifier.nil? && @identifier.to_s.length < 4
|
319
331
|
true
|
320
332
|
end
|
321
333
|
|
334
|
+
# Custom attribute writer method with validation
|
335
|
+
# @param [Object] identifier Value to be assigned
|
336
|
+
def identifier=(identifier)
|
337
|
+
if identifier.nil?
|
338
|
+
fail ArgumentError, 'identifier cannot be nil'
|
339
|
+
end
|
340
|
+
|
341
|
+
if identifier.to_s.length > 50
|
342
|
+
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
343
|
+
end
|
344
|
+
|
345
|
+
if identifier.to_s.length < 4
|
346
|
+
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
347
|
+
end
|
348
|
+
|
349
|
+
@identifier = identifier
|
350
|
+
end
|
351
|
+
|
322
352
|
# Checks equality by comparing each attribute.
|
323
353
|
# @param [Object] Object to be compared
|
324
354
|
def ==(o)
|
@@ -370,37 +400,30 @@ module CityPayApiClient
|
|
370
400
|
# @param [Hash] attributes Model attributes in the form of hash
|
371
401
|
# @return [Object] Returns the model itself
|
372
402
|
def self.build_from_hash(attributes)
|
373
|
-
new.build_from_hash(attributes)
|
374
|
-
end
|
375
|
-
|
376
|
-
# Builds the object from hash
|
377
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
378
|
-
# @return [Object] Returns the model itself
|
379
|
-
def build_from_hash(attributes)
|
380
403
|
return nil unless attributes.is_a?(Hash)
|
381
404
|
attributes = attributes.transform_keys(&:to_sym)
|
382
|
-
|
383
|
-
|
384
|
-
|
405
|
+
transformed_hash = {}
|
406
|
+
openapi_types.each_pair do |key, type|
|
407
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
408
|
+
transformed_hash["#{key}"] = nil
|
385
409
|
elsif type =~ /\AArray<(.*)>/i
|
386
410
|
# check to ensure the input is an array given that the attribute
|
387
411
|
# is documented as an array but the input is not
|
388
|
-
if attributes[
|
389
|
-
|
412
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
413
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
390
414
|
end
|
391
|
-
elsif !attributes[
|
392
|
-
|
415
|
+
elsif !attributes[attribute_map[key]].nil?
|
416
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
393
417
|
end
|
394
418
|
end
|
395
|
-
|
396
|
-
self
|
419
|
+
new(transformed_hash)
|
397
420
|
end
|
398
421
|
|
399
422
|
# Deserializes the data based on type
|
400
423
|
# @param string type Data type
|
401
424
|
# @param string value Value to be deserialized
|
402
425
|
# @return [Object] Deserialized data
|
403
|
-
def _deserialize(type, value)
|
426
|
+
def self._deserialize(type, value)
|
404
427
|
case type.to_sym
|
405
428
|
when :Time
|
406
429
|
Time.parse(value)
|
@@ -435,7 +458,7 @@ module CityPayApiClient
|
|
435
458
|
else # model
|
436
459
|
# models (e.g. Pet) or oneOf
|
437
460
|
klass = CityPayApiClient.const_get(type)
|
438
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
461
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
439
462
|
end
|
440
463
|
end
|
441
464
|
|