citypay_api_client 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -14
  3. data/citypay_api_client.gemspec +4 -3
  4. data/docs/AirlineAdvice.md +1 -1
  5. data/docs/AuthRequest.md +3 -1
  6. data/docs/AuthResponse.md +5 -1
  7. data/docs/AuthorisationAndPaymentApi.md +300 -9
  8. data/docs/BatchProcessingApi.md +15 -11
  9. data/docs/BatchTransactionResultModel.md +5 -1
  10. data/docs/Card.md +1 -1
  11. data/docs/CardHolderAccountApi.md +64 -9
  12. data/docs/ChargeRequest.md +2 -0
  13. data/docs/ContactDetails.md +11 -11
  14. data/docs/DirectPostApi.md +40 -16
  15. data/docs/DirectPostRequest.md +3 -1
  16. data/docs/OperationalFunctionsApi.md +28 -8
  17. data/docs/PaylinkApi.md +249 -73
  18. data/docs/PaylinkCustomParam.md +3 -1
  19. data/docs/PaylinkFieldGuardModel.md +1 -1
  20. data/docs/PaylinkTokenRequestModel.md +4 -0
  21. data/docs/RegisterCard.md +1 -1
  22. data/docs/ThreeDSecure.md +1 -1
  23. data/docs/TokenisationResponseModel.md +2 -2
  24. data/docs/images/3dsv1-challenge.png +0 -0
  25. data/docs/images/3dsv2-challenge.png +0 -0
  26. data/docs/images/3dsv2-frictionless.png +0 -0
  27. data/docs/images/3dsv2-method-challenge.png +0 -0
  28. data/docs/images/3dsv2-method-frictionless.png +0 -0
  29. data/docs/images/3dsv2-no3d.png +0 -0
  30. data/docs/images/citypay-logo.svg +1 -0
  31. data/docs/images/direct-post-flow.png +0 -0
  32. data/docs/images/favicon.ico +0 -0
  33. data/docs/images/header.png +0 -0
  34. data/docs/images/logo.ai +1913 -4
  35. data/docs/images/logo.png +0 -0
  36. data/docs/images/logo.svg +1 -0
  37. data/docs/images/merchant-BPS-workflow.png +0 -0
  38. data/docs/images/paylink-field-guards.png +0 -0
  39. data/lib/.DS_Store +0 -0
  40. data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +4 -4
  41. data/lib/citypay_api_client/api/batch_processing_api__.rb +11 -11
  42. data/lib/citypay_api_client/api/card_holder_account_api__.rb +2 -2
  43. data/lib/citypay_api_client/api/direct_post_api__.rb +5 -5
  44. data/lib/citypay_api_client/api/operational_functions_api__.rb +3 -3
  45. data/lib/citypay_api_client/api/paylink_api__.rb +74 -74
  46. data/lib/citypay_api_client/api_client.rb +24 -22
  47. data/lib/citypay_api_client/api_error.rb +3 -2
  48. data/lib/citypay_api_client/configuration.rb +28 -9
  49. data/lib/citypay_api_client/models/account_create.rb +17 -20
  50. data/lib/citypay_api_client/models/account_status.rb +15 -20
  51. data/lib/citypay_api_client/models/acknowledgement.rb +27 -24
  52. data/lib/citypay_api_client/models/acl_check_request.rb +17 -20
  53. data/lib/citypay_api_client/models/acl_check_response_model.rb +15 -20
  54. data/lib/citypay_api_client/models/airline_advice.rb +45 -29
  55. data/lib/citypay_api_client/models/airline_segment.rb +35 -22
  56. data/lib/citypay_api_client/models/auth_reference.rb +41 -26
  57. data/lib/citypay_api_client/models/auth_references.rb +15 -20
  58. data/lib/citypay_api_client/models/auth_request.rb +66 -29
  59. data/lib/citypay_api_client/models/auth_response.rb +45 -22
  60. data/lib/citypay_api_client/models/authen_required.rb +15 -20
  61. data/lib/citypay_api_client/models/batch.rb +24 -21
  62. data/lib/citypay_api_client/models/batch_report_request.rb +23 -22
  63. data/lib/citypay_api_client/models/batch_report_response_model.rb +27 -20
  64. data/lib/citypay_api_client/models/batch_transaction.rb +25 -22
  65. data/lib/citypay_api_client/models/batch_transaction_result_model.rb +53 -22
  66. data/lib/citypay_api_client/models/bin.rb +15 -20
  67. data/lib/citypay_api_client/models/bin_lookup.rb +17 -20
  68. data/lib/citypay_api_client/models/c_res_auth_request.rb +15 -20
  69. data/lib/citypay_api_client/models/capture_request.rb +27 -22
  70. data/lib/citypay_api_client/models/card.rb +33 -26
  71. data/lib/citypay_api_client/models/card_holder_account.rb +19 -20
  72. data/lib/citypay_api_client/models/card_status.rb +15 -20
  73. data/lib/citypay_api_client/models/charge_request.rb +66 -29
  74. data/lib/citypay_api_client/models/check_batch_status.rb +23 -22
  75. data/lib/citypay_api_client/models/check_batch_status_response.rb +15 -20
  76. data/lib/citypay_api_client/models/contact_details.rb +77 -42
  77. data/lib/citypay_api_client/models/decision.rb +15 -20
  78. data/lib/citypay_api_client/models/direct_post_request.rb +66 -29
  79. data/lib/citypay_api_client/models/direct_token_auth_request.rb +15 -20
  80. data/lib/citypay_api_client/models/domain_key_check_request.rb +17 -20
  81. data/lib/citypay_api_client/models/domain_key_request.rb +19 -20
  82. data/lib/citypay_api_client/models/domain_key_response.rb +25 -22
  83. data/lib/citypay_api_client/models/error.rb +27 -24
  84. data/lib/citypay_api_client/models/event_data_model.rb +15 -20
  85. data/lib/citypay_api_client/models/exists.rb +17 -20
  86. data/lib/citypay_api_client/models/external_mpi.rb +39 -24
  87. data/lib/citypay_api_client/models/list_merchants_response.rb +21 -22
  88. data/lib/citypay_api_client/models/mcc6012.rb +15 -20
  89. data/lib/citypay_api_client/models/merchant.rb +15 -20
  90. data/lib/citypay_api_client/models/pa_res_auth_request.rb +19 -20
  91. data/lib/citypay_api_client/models/paylink_address.rb +52 -29
  92. data/lib/citypay_api_client/models/paylink_adjustment_request.rb +25 -22
  93. data/lib/citypay_api_client/models/paylink_attachment_request.rb +19 -20
  94. data/lib/citypay_api_client/models/paylink_attachment_result.rb +19 -20
  95. data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +17 -20
  96. data/lib/citypay_api_client/models/paylink_card_holder.rb +30 -23
  97. data/lib/citypay_api_client/models/paylink_cart.rb +15 -20
  98. data/lib/citypay_api_client/models/paylink_cart_item_model.rb +15 -20
  99. data/lib/citypay_api_client/models/paylink_config.rb +15 -20
  100. data/lib/citypay_api_client/models/paylink_custom_param.rb +29 -22
  101. data/lib/citypay_api_client/models/paylink_email_notification_path.rb +17 -20
  102. data/lib/citypay_api_client/models/paylink_error_code.rb +19 -20
  103. data/lib/citypay_api_client/models/paylink_field_guard_model.rb +16 -21
  104. data/lib/citypay_api_client/models/paylink_part_payments.rb +15 -20
  105. data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +17 -20
  106. data/lib/citypay_api_client/models/paylink_state_event.rb +15 -20
  107. data/lib/citypay_api_client/models/paylink_token_created.rb +21 -20
  108. data/lib/citypay_api_client/models/paylink_token_request_model.rb +75 -22
  109. data/lib/citypay_api_client/models/paylink_token_status.rb +15 -20
  110. data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +19 -20
  111. data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +17 -20
  112. data/lib/citypay_api_client/models/paylink_ui.rb +15 -20
  113. data/lib/citypay_api_client/models/ping.rb +21 -22
  114. data/lib/citypay_api_client/models/process_batch_request.rb +27 -22
  115. data/lib/citypay_api_client/models/process_batch_response.rb +17 -20
  116. data/lib/citypay_api_client/models/refund_request.rb +28 -21
  117. data/lib/citypay_api_client/models/register_card.rb +27 -22
  118. data/lib/citypay_api_client/models/request_challenged.rb +15 -20
  119. data/lib/citypay_api_client/models/retrieve_request.rb +23 -22
  120. data/lib/citypay_api_client/models/three_d_secure.rb +16 -21
  121. data/lib/citypay_api_client/models/tokenisation_response_model.rb +23 -24
  122. data/lib/citypay_api_client/models/void_request.rb +23 -22
  123. data/lib/citypay_api_client/version.rb +3 -3
  124. data/lib/citypay_api_client.rb +2 -2
  125. data/spec/.DS_Store +0 -0
  126. data/spec/it_api_sandbox_spec.rb +5 -11
  127. data/spec/models/account_create_spec.rb +1 -2
  128. data/spec/models/account_status_spec.rb +2 -2
  129. data/spec/models/airline_advice_spec.rb +0 -2
  130. data/spec/models/airline_segment_spec.rb +0 -2
  131. data/spec/models/auth_request_spec.rb +0 -2
  132. data/spec/models/auth_response_spec.rb +75 -30
  133. data/spec/models/batch_report_request_spec.rb +0 -2
  134. data/spec/models/batch_report_response_model_spec.rb +0 -2
  135. data/spec/models/batch_spec.rb +0 -2
  136. data/spec/models/batch_transaction_result_model_spec.rb +0 -2
  137. data/spec/models/batch_transaction_spec.rb +0 -2
  138. data/spec/models/bin_lookup_spec.rb +0 -2
  139. data/spec/models/capture_request_spec.rb +0 -2
  140. data/spec/models/card_holder_account_spec.rb +0 -2
  141. data/spec/models/charge_request_spec.rb +0 -2
  142. data/spec/models/direct_post_request_spec.rb +0 -2
  143. data/spec/models/domain_key_check_request_spec.rb +0 -2
  144. data/spec/models/paylink_token_request_model_spec.rb +0 -2
  145. data/spec/models/process_batch_request_spec.rb +0 -2
  146. data/spec/models/refund_request_spec.rb +0 -2
  147. data/spec/models/register_card_spec.rb +0 -2
  148. data/spec/spec_helper.rb +2 -2
  149. metadata +25 -12
  150. data/docs/OperationalApi.md +0 -214
  151. data/docs/PaymentProcessingApi.md +0 -559
@@ -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
+ # This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -236,6 +236,7 @@ module CityPayApiClient
236
236
  # Show invalid properties with the reasons. Usually used together with valid?
237
237
  # @return Array for valid properties with the reasons
238
238
  def list_invalid_properties
239
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
239
240
  invalid_properties = Array.new
240
241
  if !@expmonth.nil? && @expmonth > 12
241
242
  invalid_properties.push('invalid value for "expmonth", must be smaller than or equal to 12.')
@@ -267,6 +268,7 @@ module CityPayApiClient
267
268
  # Check to see if the all the properties in the model are valid
268
269
  # @return true if the model is valid
269
270
  def valid?
271
+ warn '[DEPRECATED] the `valid?` method is obsolete'
270
272
  return false if !@expmonth.nil? && @expmonth > 12
271
273
  return false if !@expmonth.nil? && @expmonth < 1
272
274
  return false if !@expyear.nil? && @expyear > 2100
@@ -279,11 +281,15 @@ module CityPayApiClient
279
281
  # Custom attribute writer method with validation
280
282
  # @param [Object] expmonth Value to be assigned
281
283
  def expmonth=(expmonth)
282
- if !expmonth.nil? && expmonth > 12
284
+ if expmonth.nil?
285
+ fail ArgumentError, 'expmonth cannot be nil'
286
+ end
287
+
288
+ if expmonth > 12
283
289
  fail ArgumentError, 'invalid value for "expmonth", must be smaller than or equal to 12.'
284
290
  end
285
291
 
286
- if !expmonth.nil? && expmonth < 1
292
+ if expmonth < 1
287
293
  fail ArgumentError, 'invalid value for "expmonth", must be greater than or equal to 1.'
288
294
  end
289
295
 
@@ -293,11 +299,15 @@ module CityPayApiClient
293
299
  # Custom attribute writer method with validation
294
300
  # @param [Object] expyear Value to be assigned
295
301
  def expyear=(expyear)
296
- if !expyear.nil? && expyear > 2100
302
+ if expyear.nil?
303
+ fail ArgumentError, 'expyear cannot be nil'
304
+ end
305
+
306
+ if expyear > 2100
297
307
  fail ArgumentError, 'invalid value for "expyear", must be smaller than or equal to 2100.'
298
308
  end
299
309
 
300
- if !expyear.nil? && expyear < 2000
310
+ if expyear < 2000
301
311
  fail ArgumentError, 'invalid value for "expyear", must be greater than or equal to 2000.'
302
312
  end
303
313
 
@@ -307,11 +317,15 @@ module CityPayApiClient
307
317
  # Custom attribute writer method with validation
308
318
  # @param [Object] name_on_card Value to be assigned
309
319
  def name_on_card=(name_on_card)
310
- if !name_on_card.nil? && name_on_card.to_s.length > 45
320
+ if name_on_card.nil?
321
+ fail ArgumentError, 'name_on_card cannot be nil'
322
+ end
323
+
324
+ if name_on_card.to_s.length > 45
311
325
  fail ArgumentError, 'invalid value for "name_on_card", the character length must be smaller than or equal to 45.'
312
326
  end
313
327
 
314
- if !name_on_card.nil? && name_on_card.to_s.length < 2
328
+ if name_on_card.to_s.length < 2
315
329
  fail ArgumentError, 'invalid value for "name_on_card", the character length must be great than or equal to 2.'
316
330
  end
317
331
 
@@ -361,37 +375,30 @@ module CityPayApiClient
361
375
  # @param [Hash] attributes Model attributes in the form of hash
362
376
  # @return [Object] Returns the model itself
363
377
  def self.build_from_hash(attributes)
364
- new.build_from_hash(attributes)
365
- end
366
-
367
- # Builds the object from hash
368
- # @param [Hash] attributes Model attributes in the form of hash
369
- # @return [Object] Returns the model itself
370
- def build_from_hash(attributes)
371
378
  return nil unless attributes.is_a?(Hash)
372
379
  attributes = attributes.transform_keys(&:to_sym)
373
- self.class.openapi_types.each_pair do |key, type|
374
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
375
- self.send("#{key}=", nil)
380
+ transformed_hash = {}
381
+ openapi_types.each_pair do |key, type|
382
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
383
+ transformed_hash["#{key}"] = nil
376
384
  elsif type =~ /\AArray<(.*)>/i
377
385
  # check to ensure the input is an array given that the attribute
378
386
  # is documented as an array but the input is not
379
- if attributes[self.class.attribute_map[key]].is_a?(Array)
380
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
387
+ if attributes[attribute_map[key]].is_a?(Array)
388
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
381
389
  end
382
- elsif !attributes[self.class.attribute_map[key]].nil?
383
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
390
+ elsif !attributes[attribute_map[key]].nil?
391
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
384
392
  end
385
393
  end
386
-
387
- self
394
+ new(transformed_hash)
388
395
  end
389
396
 
390
397
  # Deserializes the data based on type
391
398
  # @param string type Data type
392
399
  # @param string value Value to be deserialized
393
400
  # @return [Object] Deserialized data
394
- def _deserialize(type, value)
401
+ def self._deserialize(type, value)
395
402
  case type.to_sym
396
403
  when :Time
397
404
  Time.parse(value)
@@ -426,7 +433,7 @@ module CityPayApiClient
426
433
  else # model
427
434
  # models (e.g. Pet) or oneOf
428
435
  klass = CityPayApiClient.const_get(type)
429
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
436
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
430
437
  end
431
438
  end
432
439
 
@@ -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
+ # This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -97,6 +97,8 @@ module CityPayApiClient
97
97
 
98
98
  if attributes.key?(:'account_id')
99
99
  self.account_id = attributes[:'account_id']
100
+ else
101
+ self.account_id = nil
100
102
  end
101
103
 
102
104
  if attributes.key?(:'cards')
@@ -107,6 +109,8 @@ module CityPayApiClient
107
109
 
108
110
  if attributes.key?(:'contact')
109
111
  self.contact = attributes[:'contact']
112
+ else
113
+ self.contact = nil
110
114
  end
111
115
 
112
116
  if attributes.key?(:'date_created')
@@ -137,6 +141,7 @@ module CityPayApiClient
137
141
  # Show invalid properties with the reasons. Usually used together with valid?
138
142
  # @return Array for valid properties with the reasons
139
143
  def list_invalid_properties
144
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
140
145
  invalid_properties = Array.new
141
146
  if @account_id.nil?
142
147
  invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
@@ -160,6 +165,7 @@ module CityPayApiClient
160
165
  # Check to see if the all the properties in the model are valid
161
166
  # @return true if the model is valid
162
167
  def valid?
168
+ warn '[DEPRECATED] the `valid?` method is obsolete'
163
169
  return false if @account_id.nil?
164
170
  return false if @account_id.to_s.length > 50
165
171
  return false if @account_id.to_s.length < 5
@@ -217,37 +223,30 @@ module CityPayApiClient
217
223
  # @param [Hash] attributes Model attributes in the form of hash
218
224
  # @return [Object] Returns the model itself
219
225
  def self.build_from_hash(attributes)
220
- new.build_from_hash(attributes)
221
- end
222
-
223
- # Builds the object from hash
224
- # @param [Hash] attributes Model attributes in the form of hash
225
- # @return [Object] Returns the model itself
226
- def build_from_hash(attributes)
227
226
  return nil unless attributes.is_a?(Hash)
228
227
  attributes = attributes.transform_keys(&:to_sym)
229
- self.class.openapi_types.each_pair do |key, type|
230
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
231
- self.send("#{key}=", nil)
228
+ transformed_hash = {}
229
+ openapi_types.each_pair do |key, type|
230
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
231
+ transformed_hash["#{key}"] = nil
232
232
  elsif type =~ /\AArray<(.*)>/i
233
233
  # check to ensure the input is an array given that the attribute
234
234
  # is documented as an array but the input is not
235
- if attributes[self.class.attribute_map[key]].is_a?(Array)
236
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
235
+ if attributes[attribute_map[key]].is_a?(Array)
236
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
237
237
  end
238
- elsif !attributes[self.class.attribute_map[key]].nil?
239
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
238
+ elsif !attributes[attribute_map[key]].nil?
239
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
240
240
  end
241
241
  end
242
-
243
- self
242
+ new(transformed_hash)
244
243
  end
245
244
 
246
245
  # Deserializes the data based on type
247
246
  # @param string type Data type
248
247
  # @param string value Value to be deserialized
249
248
  # @return [Object] Deserialized data
250
- def _deserialize(type, value)
249
+ def self._deserialize(type, value)
251
250
  case type.to_sym
252
251
  when :Time
253
252
  Time.parse(value)
@@ -282,7 +281,7 @@ module CityPayApiClient
282
281
  else # model
283
282
  # models (e.g. Pet) or oneOf
284
283
  klass = CityPayApiClient.const_get(type)
285
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
284
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
286
285
  end
287
286
  end
288
287
 
@@ -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
+ # This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -74,6 +74,7 @@ module CityPayApiClient
74
74
  # Show invalid properties with the reasons. Usually used together with valid?
75
75
  # @return Array for valid properties with the reasons
76
76
  def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
78
  invalid_properties = Array.new
78
79
  invalid_properties
79
80
  end
@@ -81,6 +82,7 @@ module CityPayApiClient
81
82
  # Check to see if the all the properties in the model are valid
82
83
  # @return true if the model is valid
83
84
  def valid?
85
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
86
  true
85
87
  end
86
88
 
@@ -109,37 +111,30 @@ module CityPayApiClient
109
111
  # @param [Hash] attributes Model attributes in the form of hash
110
112
  # @return [Object] Returns the model itself
111
113
  def self.build_from_hash(attributes)
112
- new.build_from_hash(attributes)
113
- end
114
-
115
- # Builds the object from hash
116
- # @param [Hash] attributes Model attributes in the form of hash
117
- # @return [Object] Returns the model itself
118
- def build_from_hash(attributes)
119
114
  return nil unless attributes.is_a?(Hash)
120
115
  attributes = attributes.transform_keys(&:to_sym)
121
- self.class.openapi_types.each_pair do |key, type|
122
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
123
- self.send("#{key}=", nil)
116
+ transformed_hash = {}
117
+ openapi_types.each_pair do |key, type|
118
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = nil
124
120
  elsif type =~ /\AArray<(.*)>/i
125
121
  # check to ensure the input is an array given that the attribute
126
122
  # is documented as an array but the input is not
127
- if attributes[self.class.attribute_map[key]].is_a?(Array)
128
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
123
+ if attributes[attribute_map[key]].is_a?(Array)
124
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
129
125
  end
130
- elsif !attributes[self.class.attribute_map[key]].nil?
131
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
126
+ elsif !attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
132
128
  end
133
129
  end
134
-
135
- self
130
+ new(transformed_hash)
136
131
  end
137
132
 
138
133
  # Deserializes the data based on type
139
134
  # @param string type Data type
140
135
  # @param string value Value to be deserialized
141
136
  # @return [Object] Deserialized data
142
- def _deserialize(type, value)
137
+ def self._deserialize(type, value)
143
138
  case type.to_sym
144
139
  when :Time
145
140
  Time.parse(value)
@@ -174,7 +169,7 @@ module CityPayApiClient
174
169
  else # model
175
170
  # models (e.g. Pet) or oneOf
176
171
  klass = CityPayApiClient.const_get(type)
177
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
172
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
178
173
  end
179
174
  end
180
175
 
@@ -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
+ # This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -47,6 +47,9 @@ module CityPayApiClient
47
47
  # Identifies the merchant account to perform processing for.
48
48
  attr_accessor :merchantid
49
49
 
50
+ # A \"tag\" is a label that you can attach to a payment authorization. Tags can help you group transactions together based on certain criteria, like a work job or a ticket number. They can also assist in filtering transactions when you're generating reports. Multiple Tags You can add more than one tag to a transaction by separating them with commas. Limitations There is a maximum limit of 3 tags that can be added to a single transaction. Each tag can be no longer than 20 characters and alphanumeric with no spaces. Example: Let's say you're a software company and you have different teams working on various projects. When a team makes a purchase or incurs an expense, they can tag the transaction with the project name, the team name, and the type of expense. Project Name: Project_X Team Name: Team_A Type of Expense: Hardware So, the tag for a transaction might look like: Project_X,Team_A,Hardware This way, when you're looking at your financial reports, you can easily filter transactions based on these tags to see how much each project or team is spending on different types of expenses.
51
+ attr_accessor :tag
52
+
50
53
  attr_accessor :threedsecure
51
54
 
52
55
  # A tokenised form of a card that belongs to a card holder's account and that has been previously registered. The token is time based and will only be active for a short duration. The value is therefore designed not to be stored remotely for future use. Tokens will start with ct and are resiliently tamper proof using HMacSHA-256. No sensitive card data is stored internally within the token. Each card will contain a different token and the value may be different on any retrieval call. The value can be presented for payment as a selection value to an end user in a web application.
@@ -72,6 +75,7 @@ module CityPayApiClient
72
75
  :'initiation' => :'initiation',
73
76
  :'match_avsa' => :'match_avsa',
74
77
  :'merchantid' => :'merchantid',
78
+ :'tag' => :'tag',
75
79
  :'threedsecure' => :'threedsecure',
76
80
  :'token' => :'token',
77
81
  :'trans_info' => :'trans_info',
@@ -98,6 +102,7 @@ module CityPayApiClient
98
102
  :'initiation' => :'String',
99
103
  :'match_avsa' => :'String',
100
104
  :'merchantid' => :'Integer',
105
+ :'tag' => :'String',
101
106
  :'threedsecure' => :'ThreeDSecure',
102
107
  :'token' => :'String',
103
108
  :'trans_info' => :'String',
@@ -128,6 +133,8 @@ module CityPayApiClient
128
133
 
129
134
  if attributes.key?(:'amount')
130
135
  self.amount = attributes[:'amount']
136
+ else
137
+ self.amount = nil
131
138
  end
132
139
 
133
140
  if attributes.key?(:'avs_postcode_policy')
@@ -156,6 +163,8 @@ module CityPayApiClient
156
163
 
157
164
  if attributes.key?(:'identifier')
158
165
  self.identifier = attributes[:'identifier']
166
+ else
167
+ self.identifier = nil
159
168
  end
160
169
 
161
170
  if attributes.key?(:'initiation')
@@ -168,6 +177,12 @@ module CityPayApiClient
168
177
 
169
178
  if attributes.key?(:'merchantid')
170
179
  self.merchantid = attributes[:'merchantid']
180
+ else
181
+ self.merchantid = nil
182
+ end
183
+
184
+ if attributes.key?(:'tag')
185
+ self.tag = attributes[:'tag']
171
186
  end
172
187
 
173
188
  if attributes.key?(:'threedsecure')
@@ -176,6 +191,8 @@ module CityPayApiClient
176
191
 
177
192
  if attributes.key?(:'token')
178
193
  self.token = attributes[:'token']
194
+ else
195
+ self.token = nil
179
196
  end
180
197
 
181
198
  if attributes.key?(:'trans_info')
@@ -190,6 +207,7 @@ module CityPayApiClient
190
207
  # Show invalid properties with the reasons. Usually used together with valid?
191
208
  # @return Array for valid properties with the reasons
192
209
  def list_invalid_properties
210
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
193
211
  invalid_properties = Array.new
194
212
  if @amount.nil?
195
213
  invalid_properties.push('invalid value for "amount", amount cannot be nil.')
@@ -253,6 +271,7 @@ module CityPayApiClient
253
271
  # Check to see if the all the properties in the model are valid
254
272
  # @return true if the model is valid
255
273
  def valid?
274
+ warn '[DEPRECATED] the `valid?` method is obsolete'
256
275
  return false if @amount.nil?
257
276
  return false if !@cardholder_agreement.nil? && @cardholder_agreement.to_s.length > 1
258
277
  return false if !@csc.nil? && @csc.to_s.length > 4
@@ -283,7 +302,11 @@ module CityPayApiClient
283
302
  # Custom attribute writer method with validation
284
303
  # @param [Object] cardholder_agreement Value to be assigned
285
304
  def cardholder_agreement=(cardholder_agreement)
286
- if !cardholder_agreement.nil? && cardholder_agreement.to_s.length > 1
305
+ if cardholder_agreement.nil?
306
+ fail ArgumentError, 'cardholder_agreement cannot be nil'
307
+ end
308
+
309
+ if cardholder_agreement.to_s.length > 1
287
310
  fail ArgumentError, 'invalid value for "cardholder_agreement", the character length must be smaller than or equal to 1.'
288
311
  end
289
312
 
@@ -293,11 +316,15 @@ module CityPayApiClient
293
316
  # Custom attribute writer method with validation
294
317
  # @param [Object] csc Value to be assigned
295
318
  def csc=(csc)
296
- if !csc.nil? && csc.to_s.length > 4
319
+ if csc.nil?
320
+ fail ArgumentError, 'csc cannot be nil'
321
+ end
322
+
323
+ if csc.to_s.length > 4
297
324
  fail ArgumentError, 'invalid value for "csc", the character length must be smaller than or equal to 4.'
298
325
  end
299
326
 
300
- if !csc.nil? && csc.to_s.length < 3
327
+ if csc.to_s.length < 3
301
328
  fail ArgumentError, 'invalid value for "csc", the character length must be great than or equal to 3.'
302
329
  end
303
330
 
@@ -307,11 +334,15 @@ module CityPayApiClient
307
334
  # Custom attribute writer method with validation
308
335
  # @param [Object] currency Value to be assigned
309
336
  def currency=(currency)
310
- if !currency.nil? && currency.to_s.length > 3
337
+ if currency.nil?
338
+ fail ArgumentError, 'currency cannot be nil'
339
+ end
340
+
341
+ if currency.to_s.length > 3
311
342
  fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
312
343
  end
313
344
 
314
- if !currency.nil? && currency.to_s.length < 3
345
+ if currency.to_s.length < 3
315
346
  fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
316
347
  end
317
348
 
@@ -339,7 +370,11 @@ module CityPayApiClient
339
370
  # Custom attribute writer method with validation
340
371
  # @param [Object] initiation Value to be assigned
341
372
  def initiation=(initiation)
342
- if !initiation.nil? && initiation.to_s.length > 1
373
+ if initiation.nil?
374
+ fail ArgumentError, 'initiation cannot be nil'
375
+ end
376
+
377
+ if initiation.to_s.length > 1
343
378
  fail ArgumentError, 'invalid value for "initiation", the character length must be smaller than or equal to 1.'
344
379
  end
345
380
 
@@ -349,7 +384,11 @@ module CityPayApiClient
349
384
  # Custom attribute writer method with validation
350
385
  # @param [Object] trans_info Value to be assigned
351
386
  def trans_info=(trans_info)
352
- if !trans_info.nil? && trans_info.to_s.length > 50
387
+ if trans_info.nil?
388
+ fail ArgumentError, 'trans_info cannot be nil'
389
+ end
390
+
391
+ if trans_info.to_s.length > 50
353
392
  fail ArgumentError, 'invalid value for "trans_info", the character length must be smaller than or equal to 50.'
354
393
  end
355
394
 
@@ -359,7 +398,11 @@ module CityPayApiClient
359
398
  # Custom attribute writer method with validation
360
399
  # @param [Object] trans_type Value to be assigned
361
400
  def trans_type=(trans_type)
362
- if !trans_type.nil? && trans_type.to_s.length > 1
401
+ if trans_type.nil?
402
+ fail ArgumentError, 'trans_type cannot be nil'
403
+ end
404
+
405
+ if trans_type.to_s.length > 1
363
406
  fail ArgumentError, 'invalid value for "trans_type", the character length must be smaller than or equal to 1.'
364
407
  end
365
408
 
@@ -382,6 +425,7 @@ module CityPayApiClient
382
425
  initiation == o.initiation &&
383
426
  match_avsa == o.match_avsa &&
384
427
  merchantid == o.merchantid &&
428
+ tag == o.tag &&
385
429
  threedsecure == o.threedsecure &&
386
430
  token == o.token &&
387
431
  trans_info == o.trans_info &&
@@ -397,44 +441,37 @@ module CityPayApiClient
397
441
  # Calculates hash code according to all attributes.
398
442
  # @return [Integer] Hash code
399
443
  def hash
400
- [amount, avs_postcode_policy, cardholder_agreement, csc, csc_policy, currency, duplicate_policy, identifier, initiation, match_avsa, merchantid, threedsecure, token, trans_info, trans_type].hash
444
+ [amount, avs_postcode_policy, cardholder_agreement, csc, csc_policy, currency, duplicate_policy, identifier, initiation, match_avsa, merchantid, tag, threedsecure, token, trans_info, trans_type].hash
401
445
  end
402
446
 
403
447
  # Builds the object from hash
404
448
  # @param [Hash] attributes Model attributes in the form of hash
405
449
  # @return [Object] Returns the model itself
406
450
  def self.build_from_hash(attributes)
407
- new.build_from_hash(attributes)
408
- end
409
-
410
- # Builds the object from hash
411
- # @param [Hash] attributes Model attributes in the form of hash
412
- # @return [Object] Returns the model itself
413
- def build_from_hash(attributes)
414
451
  return nil unless attributes.is_a?(Hash)
415
452
  attributes = attributes.transform_keys(&:to_sym)
416
- self.class.openapi_types.each_pair do |key, type|
417
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
418
- self.send("#{key}=", nil)
453
+ transformed_hash = {}
454
+ openapi_types.each_pair do |key, type|
455
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
456
+ transformed_hash["#{key}"] = nil
419
457
  elsif type =~ /\AArray<(.*)>/i
420
458
  # check to ensure the input is an array given that the attribute
421
459
  # is documented as an array but the input is not
422
- if attributes[self.class.attribute_map[key]].is_a?(Array)
423
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
460
+ if attributes[attribute_map[key]].is_a?(Array)
461
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
424
462
  end
425
- elsif !attributes[self.class.attribute_map[key]].nil?
426
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
463
+ elsif !attributes[attribute_map[key]].nil?
464
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
427
465
  end
428
466
  end
429
-
430
- self
467
+ new(transformed_hash)
431
468
  end
432
469
 
433
470
  # Deserializes the data based on type
434
471
  # @param string type Data type
435
472
  # @param string value Value to be deserialized
436
473
  # @return [Object] Deserialized data
437
- def _deserialize(type, value)
474
+ def self._deserialize(type, value)
438
475
  case type.to_sym
439
476
  when :Time
440
477
  Time.parse(value)
@@ -469,7 +506,7 @@ module CityPayApiClient
469
506
  else # model
470
507
  # models (e.g. Pet) or oneOf
471
508
  klass = CityPayApiClient.const_get(type)
472
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
509
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
473
510
  end
474
511
  end
475
512