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
 
@@ -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 !email.nil? && email.to_s.length > 254
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
- self.class.openapi_types.each_pair do |key, type|
267
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
268
- self.send("#{key}=", nil)
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[self.class.attribute_map[key]].is_a?(Array)
273
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
276
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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
- # 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
 
@@ -309,6 +309,7 @@ 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
313
314
  invalid_properties
314
315
  end
@@ -316,6 +317,7 @@ module CityPayApiClient
316
317
  # Check to see if the all the properties in the model are valid
317
318
  # @return true if the model is valid
318
319
  def valid?
320
+ warn '[DEPRECATED] the `valid?` method is obsolete'
319
321
  true
320
322
  end
321
323
 
@@ -370,37 +372,30 @@ module CityPayApiClient
370
372
  # @param [Hash] attributes Model attributes in the form of hash
371
373
  # @return [Object] Returns the model itself
372
374
  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
375
  return nil unless attributes.is_a?(Hash)
381
376
  attributes = attributes.transform_keys(&:to_sym)
382
- self.class.openapi_types.each_pair do |key, type|
383
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
384
- self.send("#{key}=", nil)
377
+ transformed_hash = {}
378
+ openapi_types.each_pair do |key, type|
379
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
380
+ transformed_hash["#{key}"] = nil
385
381
  elsif type =~ /\AArray<(.*)>/i
386
382
  # check to ensure the input is an array given that the attribute
387
383
  # is documented as an array but the input is not
388
- if attributes[self.class.attribute_map[key]].is_a?(Array)
389
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
384
+ if attributes[attribute_map[key]].is_a?(Array)
385
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
390
386
  end
391
- elsif !attributes[self.class.attribute_map[key]].nil?
392
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
387
+ elsif !attributes[attribute_map[key]].nil?
388
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
393
389
  end
394
390
  end
395
-
396
- self
391
+ new(transformed_hash)
397
392
  end
398
393
 
399
394
  # Deserializes the data based on type
400
395
  # @param string type Data type
401
396
  # @param string value Value to be deserialized
402
397
  # @return [Object] Deserialized data
403
- def _deserialize(type, value)
398
+ def self._deserialize(type, value)
404
399
  case type.to_sym
405
400
  when :Time
406
401
  Time.parse(value)
@@ -435,7 +430,7 @@ module CityPayApiClient
435
430
  else # model
436
431
  # models (e.g. Pet) or oneOf
437
432
  klass = CityPayApiClient.const_get(type)
438
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
433
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
439
434
  end
440
435
  end
441
436
 
@@ -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
 
@@ -78,6 +78,8 @@ module CityPayApiClient
78
78
 
79
79
  if attributes.key?(:'after')
80
80
  self.after = attributes[:'after']
81
+ else
82
+ self.after = nil
81
83
  end
82
84
 
83
85
  if attributes.key?(:'max_results')
@@ -86,6 +88,8 @@ module CityPayApiClient
86
88
 
87
89
  if attributes.key?(:'merchantid')
88
90
  self.merchantid = attributes[:'merchantid']
91
+ else
92
+ self.merchantid = nil
89
93
  end
90
94
 
91
95
  if attributes.key?(:'next_token')
@@ -102,6 +106,7 @@ module CityPayApiClient
102
106
  # Show invalid properties with the reasons. Usually used together with valid?
103
107
  # @return Array for valid properties with the reasons
104
108
  def list_invalid_properties
109
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
110
  invalid_properties = Array.new
106
111
  if @after.nil?
107
112
  invalid_properties.push('invalid value for "after", after cannot be nil.')
@@ -117,6 +122,7 @@ module CityPayApiClient
117
122
  # Check to see if the all the properties in the model are valid
118
123
  # @return true if the model is valid
119
124
  def valid?
125
+ warn '[DEPRECATED] the `valid?` method is obsolete'
120
126
  return false if @after.nil?
121
127
  return false if @merchantid.nil?
122
128
  true
@@ -150,37 +156,30 @@ module CityPayApiClient
150
156
  # @param [Hash] attributes Model attributes in the form of hash
151
157
  # @return [Object] Returns the model itself
152
158
  def self.build_from_hash(attributes)
153
- new.build_from_hash(attributes)
154
- end
155
-
156
- # Builds the object from hash
157
- # @param [Hash] attributes Model attributes in the form of hash
158
- # @return [Object] Returns the model itself
159
- def build_from_hash(attributes)
160
159
  return nil unless attributes.is_a?(Hash)
161
160
  attributes = attributes.transform_keys(&:to_sym)
162
- self.class.openapi_types.each_pair do |key, type|
163
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
- self.send("#{key}=", nil)
161
+ transformed_hash = {}
162
+ openapi_types.each_pair do |key, type|
163
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
164
+ transformed_hash["#{key}"] = nil
165
165
  elsif type =~ /\AArray<(.*)>/i
166
166
  # check to ensure the input is an array given that the attribute
167
167
  # is documented as an array but the input is not
168
- if attributes[self.class.attribute_map[key]].is_a?(Array)
169
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
168
+ if attributes[attribute_map[key]].is_a?(Array)
169
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
170
170
  end
171
- elsif !attributes[self.class.attribute_map[key]].nil?
172
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
171
+ elsif !attributes[attribute_map[key]].nil?
172
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
173
173
  end
174
174
  end
175
-
176
- self
175
+ new(transformed_hash)
177
176
  end
178
177
 
179
178
  # Deserializes the data based on type
180
179
  # @param string type Data type
181
180
  # @param string value Value to be deserialized
182
181
  # @return [Object] Deserialized data
183
- def _deserialize(type, value)
182
+ def self._deserialize(type, value)
184
183
  case type.to_sym
185
184
  when :Time
186
185
  Time.parse(value)
@@ -215,7 +214,7 @@ module CityPayApiClient
215
214
  else # model
216
215
  # models (e.g. Pet) or oneOf
217
216
  klass = CityPayApiClient.const_get(type)
218
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
217
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
219
218
  end
220
219
  end
221
220
 
@@ -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
 
@@ -69,12 +69,15 @@ module CityPayApiClient
69
69
  if (value = attributes[:'tokens']).is_a?(Array)
70
70
  self.tokens = value
71
71
  end
72
+ else
73
+ self.tokens = nil
72
74
  end
73
75
  end
74
76
 
75
77
  # Show invalid properties with the reasons. Usually used together with valid?
76
78
  # @return Array for valid properties with the reasons
77
79
  def list_invalid_properties
80
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
81
  invalid_properties = Array.new
79
82
  if @tokens.nil?
80
83
  invalid_properties.push('invalid value for "tokens", tokens cannot be nil.')
@@ -86,6 +89,7 @@ module CityPayApiClient
86
89
  # Check to see if the all the properties in the model are valid
87
90
  # @return true if the model is valid
88
91
  def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
93
  return false if @tokens.nil?
90
94
  true
91
95
  end
@@ -115,37 +119,30 @@ module CityPayApiClient
115
119
  # @param [Hash] attributes Model attributes in the form of hash
116
120
  # @return [Object] Returns the model itself
117
121
  def self.build_from_hash(attributes)
118
- new.build_from_hash(attributes)
119
- end
120
-
121
- # Builds the object from hash
122
- # @param [Hash] attributes Model attributes in the form of hash
123
- # @return [Object] Returns the model itself
124
- def build_from_hash(attributes)
125
122
  return nil unless attributes.is_a?(Hash)
126
123
  attributes = attributes.transform_keys(&:to_sym)
127
- self.class.openapi_types.each_pair do |key, type|
128
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
129
- self.send("#{key}=", nil)
124
+ transformed_hash = {}
125
+ openapi_types.each_pair do |key, type|
126
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = nil
130
128
  elsif type =~ /\AArray<(.*)>/i
131
129
  # check to ensure the input is an array given that the attribute
132
130
  # is documented as an array but the input is not
133
- if attributes[self.class.attribute_map[key]].is_a?(Array)
134
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
135
133
  end
136
- elsif !attributes[self.class.attribute_map[key]].nil?
137
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
134
+ elsif !attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
138
136
  end
139
137
  end
140
-
141
- self
138
+ new(transformed_hash)
142
139
  end
143
140
 
144
141
  # Deserializes the data based on type
145
142
  # @param string type Data type
146
143
  # @param string value Value to be deserialized
147
144
  # @return [Object] Deserialized data
148
- def _deserialize(type, value)
145
+ def self._deserialize(type, value)
149
146
  case type.to_sym
150
147
  when :Time
151
148
  Time.parse(value)
@@ -180,7 +177,7 @@ module CityPayApiClient
180
177
  else # model
181
178
  # models (e.g. Pet) or oneOf
182
179
  klass = CityPayApiClient.const_get(type)
183
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
180
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
184
181
  end
185
182
  end
186
183
 
@@ -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
 
@@ -92,6 +92,7 @@ module CityPayApiClient
92
92
  # Show invalid properties with the reasons. Usually used together with valid?
93
93
  # @return Array for valid properties with the reasons
94
94
  def list_invalid_properties
95
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
96
  invalid_properties = Array.new
96
97
  invalid_properties
97
98
  end
@@ -99,6 +100,7 @@ module CityPayApiClient
99
100
  # Check to see if the all the properties in the model are valid
100
101
  # @return true if the model is valid
101
102
  def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
102
104
  true
103
105
  end
104
106
 
@@ -129,37 +131,30 @@ module CityPayApiClient
129
131
  # @param [Hash] attributes Model attributes in the form of hash
130
132
  # @return [Object] Returns the model itself
131
133
  def self.build_from_hash(attributes)
132
- new.build_from_hash(attributes)
133
- end
134
-
135
- # Builds the object from hash
136
- # @param [Hash] attributes Model attributes in the form of hash
137
- # @return [Object] Returns the model itself
138
- def build_from_hash(attributes)
139
134
  return nil unless attributes.is_a?(Hash)
140
135
  attributes = attributes.transform_keys(&:to_sym)
141
- self.class.openapi_types.each_pair do |key, type|
142
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
143
- self.send("#{key}=", nil)
136
+ transformed_hash = {}
137
+ openapi_types.each_pair do |key, type|
138
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = nil
144
140
  elsif type =~ /\AArray<(.*)>/i
145
141
  # check to ensure the input is an array given that the attribute
146
142
  # is documented as an array but the input is not
147
- if attributes[self.class.attribute_map[key]].is_a?(Array)
148
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
143
+ if attributes[attribute_map[key]].is_a?(Array)
144
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
145
  end
150
- elsif !attributes[self.class.attribute_map[key]].nil?
151
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
+ elsif !attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
148
  end
153
149
  end
154
-
155
- self
150
+ new(transformed_hash)
156
151
  end
157
152
 
158
153
  # Deserializes the data based on type
159
154
  # @param string type Data type
160
155
  # @param string value Value to be deserialized
161
156
  # @return [Object] Deserialized data
162
- def _deserialize(type, value)
157
+ def self._deserialize(type, value)
163
158
  case type.to_sym
164
159
  when :Time
165
160
  Time.parse(value)
@@ -194,7 +189,7 @@ module CityPayApiClient
194
189
  else # model
195
190
  # models (e.g. Pet) or oneOf
196
191
  klass = CityPayApiClient.const_get(type)
197
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
192
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
193
  end
199
194
  end
200
195