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
 
@@ -66,6 +66,9 @@ module CityPayApiClient
66
66
 
67
67
  attr_accessor :ship_to
68
68
 
69
+ # 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.
70
+ attr_accessor :tag
71
+
69
72
  attr_accessor :threedsecure
70
73
 
71
74
  # Further information that can be added to the transaction will display in reporting. Can be used for flexible values such as operator id.
@@ -95,6 +98,7 @@ module CityPayApiClient
95
98
  :'redirect_failure' => :'redirect_failure',
96
99
  :'redirect_success' => :'redirect_success',
97
100
  :'ship_to' => :'ship_to',
101
+ :'tag' => :'tag',
98
102
  :'threedsecure' => :'threedsecure',
99
103
  :'trans_info' => :'trans_info',
100
104
  :'trans_type' => :'trans_type'
@@ -127,6 +131,7 @@ module CityPayApiClient
127
131
  :'redirect_failure' => :'String',
128
132
  :'redirect_success' => :'String',
129
133
  :'ship_to' => :'ContactDetails',
134
+ :'tag' => :'String',
130
135
  :'threedsecure' => :'ThreeDSecure',
131
136
  :'trans_info' => :'String',
132
137
  :'trans_type' => :'String'
@@ -156,6 +161,8 @@ module CityPayApiClient
156
161
 
157
162
  if attributes.key?(:'amount')
158
163
  self.amount = attributes[:'amount']
164
+ else
165
+ self.amount = nil
159
166
  end
160
167
 
161
168
  if attributes.key?(:'avs_postcode_policy')
@@ -168,6 +175,8 @@ module CityPayApiClient
168
175
 
169
176
  if attributes.key?(:'cardnumber')
170
177
  self.cardnumber = attributes[:'cardnumber']
178
+ else
179
+ self.cardnumber = nil
171
180
  end
172
181
 
173
182
  if attributes.key?(:'csc')
@@ -188,18 +197,26 @@ module CityPayApiClient
188
197
 
189
198
  if attributes.key?(:'expmonth')
190
199
  self.expmonth = attributes[:'expmonth']
200
+ else
201
+ self.expmonth = nil
191
202
  end
192
203
 
193
204
  if attributes.key?(:'expyear')
194
205
  self.expyear = attributes[:'expyear']
206
+ else
207
+ self.expyear = nil
195
208
  end
196
209
 
197
210
  if attributes.key?(:'identifier')
198
211
  self.identifier = attributes[:'identifier']
212
+ else
213
+ self.identifier = nil
199
214
  end
200
215
 
201
216
  if attributes.key?(:'mac')
202
217
  self.mac = attributes[:'mac']
218
+ else
219
+ self.mac = nil
203
220
  end
204
221
 
205
222
  if attributes.key?(:'match_avsa')
@@ -226,6 +243,10 @@ module CityPayApiClient
226
243
  self.ship_to = attributes[:'ship_to']
227
244
  end
228
245
 
246
+ if attributes.key?(:'tag')
247
+ self.tag = attributes[:'tag']
248
+ end
249
+
229
250
  if attributes.key?(:'threedsecure')
230
251
  self.threedsecure = attributes[:'threedsecure']
231
252
  end
@@ -242,6 +263,7 @@ module CityPayApiClient
242
263
  # Show invalid properties with the reasons. Usually used together with valid?
243
264
  # @return Array for valid properties with the reasons
244
265
  def list_invalid_properties
266
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
245
267
  invalid_properties = Array.new
246
268
  if @amount.nil?
247
269
  invalid_properties.push('invalid value for "amount", amount cannot be nil.')
@@ -337,6 +359,7 @@ module CityPayApiClient
337
359
  # Check to see if the all the properties in the model are valid
338
360
  # @return true if the model is valid
339
361
  def valid?
362
+ warn '[DEPRECATED] the `valid?` method is obsolete'
340
363
  return false if @amount.nil?
341
364
  return false if @cardnumber.nil?
342
365
  return false if @cardnumber.to_s.length > 22
@@ -393,11 +416,15 @@ module CityPayApiClient
393
416
  # Custom attribute writer method with validation
394
417
  # @param [Object] csc Value to be assigned
395
418
  def csc=(csc)
396
- if !csc.nil? && csc.to_s.length > 4
419
+ if csc.nil?
420
+ fail ArgumentError, 'csc cannot be nil'
421
+ end
422
+
423
+ if csc.to_s.length > 4
397
424
  fail ArgumentError, 'invalid value for "csc", the character length must be smaller than or equal to 4.'
398
425
  end
399
426
 
400
- if !csc.nil? && csc.to_s.length < 3
427
+ if csc.to_s.length < 3
401
428
  fail ArgumentError, 'invalid value for "csc", the character length must be great than or equal to 3.'
402
429
  end
403
430
 
@@ -407,11 +434,15 @@ module CityPayApiClient
407
434
  # Custom attribute writer method with validation
408
435
  # @param [Object] currency Value to be assigned
409
436
  def currency=(currency)
410
- if !currency.nil? && currency.to_s.length > 3
437
+ if currency.nil?
438
+ fail ArgumentError, 'currency cannot be nil'
439
+ end
440
+
441
+ if currency.to_s.length > 3
411
442
  fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
412
443
  end
413
444
 
414
- if !currency.nil? && currency.to_s.length < 3
445
+ if currency.to_s.length < 3
415
446
  fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
416
447
  end
417
448
 
@@ -475,11 +506,15 @@ module CityPayApiClient
475
506
  # Custom attribute writer method with validation
476
507
  # @param [Object] name_on_card Value to be assigned
477
508
  def name_on_card=(name_on_card)
478
- if !name_on_card.nil? && name_on_card.to_s.length > 45
509
+ if name_on_card.nil?
510
+ fail ArgumentError, 'name_on_card cannot be nil'
511
+ end
512
+
513
+ if name_on_card.to_s.length > 45
479
514
  fail ArgumentError, 'invalid value for "name_on_card", the character length must be smaller than or equal to 45.'
480
515
  end
481
516
 
482
- if !name_on_card.nil? && name_on_card.to_s.length < 2
517
+ if name_on_card.to_s.length < 2
483
518
  fail ArgumentError, 'invalid value for "name_on_card", the character length must be great than or equal to 2.'
484
519
  end
485
520
 
@@ -489,7 +524,11 @@ module CityPayApiClient
489
524
  # Custom attribute writer method with validation
490
525
  # @param [Object] trans_info Value to be assigned
491
526
  def trans_info=(trans_info)
492
- if !trans_info.nil? && trans_info.to_s.length > 50
527
+ if trans_info.nil?
528
+ fail ArgumentError, 'trans_info cannot be nil'
529
+ end
530
+
531
+ if trans_info.to_s.length > 50
493
532
  fail ArgumentError, 'invalid value for "trans_info", the character length must be smaller than or equal to 50.'
494
533
  end
495
534
 
@@ -499,7 +538,11 @@ module CityPayApiClient
499
538
  # Custom attribute writer method with validation
500
539
  # @param [Object] trans_type Value to be assigned
501
540
  def trans_type=(trans_type)
502
- if !trans_type.nil? && trans_type.to_s.length > 1
541
+ if trans_type.nil?
542
+ fail ArgumentError, 'trans_type cannot be nil'
543
+ end
544
+
545
+ if trans_type.to_s.length > 1
503
546
  fail ArgumentError, 'invalid value for "trans_type", the character length must be smaller than or equal to 1.'
504
547
  end
505
548
 
@@ -529,6 +572,7 @@ module CityPayApiClient
529
572
  redirect_failure == o.redirect_failure &&
530
573
  redirect_success == o.redirect_success &&
531
574
  ship_to == o.ship_to &&
575
+ tag == o.tag &&
532
576
  threedsecure == o.threedsecure &&
533
577
  trans_info == o.trans_info &&
534
578
  trans_type == o.trans_type
@@ -543,44 +587,37 @@ module CityPayApiClient
543
587
  # Calculates hash code according to all attributes.
544
588
  # @return [Integer] Hash code
545
589
  def hash
546
- [amount, avs_postcode_policy, bill_to, cardnumber, csc, csc_policy, currency, duplicate_policy, expmonth, expyear, identifier, mac, match_avsa, name_on_card, nonce, redirect_failure, redirect_success, ship_to, threedsecure, trans_info, trans_type].hash
590
+ [amount, avs_postcode_policy, bill_to, cardnumber, csc, csc_policy, currency, duplicate_policy, expmonth, expyear, identifier, mac, match_avsa, name_on_card, nonce, redirect_failure, redirect_success, ship_to, tag, threedsecure, trans_info, trans_type].hash
547
591
  end
548
592
 
549
593
  # Builds the object from hash
550
594
  # @param [Hash] attributes Model attributes in the form of hash
551
595
  # @return [Object] Returns the model itself
552
596
  def self.build_from_hash(attributes)
553
- new.build_from_hash(attributes)
554
- end
555
-
556
- # Builds the object from hash
557
- # @param [Hash] attributes Model attributes in the form of hash
558
- # @return [Object] Returns the model itself
559
- def build_from_hash(attributes)
560
597
  return nil unless attributes.is_a?(Hash)
561
598
  attributes = attributes.transform_keys(&:to_sym)
562
- self.class.openapi_types.each_pair do |key, type|
563
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
564
- self.send("#{key}=", nil)
599
+ transformed_hash = {}
600
+ openapi_types.each_pair do |key, type|
601
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
602
+ transformed_hash["#{key}"] = nil
565
603
  elsif type =~ /\AArray<(.*)>/i
566
604
  # check to ensure the input is an array given that the attribute
567
605
  # is documented as an array but the input is not
568
- if attributes[self.class.attribute_map[key]].is_a?(Array)
569
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
606
+ if attributes[attribute_map[key]].is_a?(Array)
607
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
570
608
  end
571
- elsif !attributes[self.class.attribute_map[key]].nil?
572
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
609
+ elsif !attributes[attribute_map[key]].nil?
610
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
573
611
  end
574
612
  end
575
-
576
- self
613
+ new(transformed_hash)
577
614
  end
578
615
 
579
616
  # Deserializes the data based on type
580
617
  # @param string type Data type
581
618
  # @param string value Value to be deserialized
582
619
  # @return [Object] Deserialized data
583
- def _deserialize(type, value)
620
+ def self._deserialize(type, value)
584
621
  case type.to_sym
585
622
  when :Time
586
623
  Time.parse(value)
@@ -615,7 +652,7 @@ module CityPayApiClient
615
652
  else # model
616
653
  # models (e.g. Pet) or oneOf
617
654
  klass = CityPayApiClient.const_get(type)
618
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
655
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
619
656
  end
620
657
  end
621
658
 
@@ -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
 
@@ -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
 
@@ -59,12 +59,15 @@ module CityPayApiClient
59
59
 
60
60
  if attributes.key?(:'domain_key')
61
61
  self.domain_key = attributes[:'domain_key']
62
+ else
63
+ self.domain_key = nil
62
64
  end
63
65
  end
64
66
 
65
67
  # Show invalid properties with the reasons. Usually used together with valid?
66
68
  # @return Array for valid properties with the reasons
67
69
  def list_invalid_properties
70
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
68
71
  invalid_properties = Array.new
69
72
  if @domain_key.nil?
70
73
  invalid_properties.push('invalid value for "domain_key", domain_key cannot be nil.')
@@ -84,6 +87,7 @@ module CityPayApiClient
84
87
  # Check to see if the all the properties in the model are valid
85
88
  # @return true if the model is valid
86
89
  def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
87
91
  return false if @domain_key.nil?
88
92
  return false if @domain_key.to_s.length > 512
89
93
  return false if @domain_key.to_s.length < 64
@@ -132,37 +136,30 @@ module CityPayApiClient
132
136
  # @param [Hash] attributes Model attributes in the form of hash
133
137
  # @return [Object] Returns the model itself
134
138
  def self.build_from_hash(attributes)
135
- new.build_from_hash(attributes)
136
- end
137
-
138
- # Builds the object from hash
139
- # @param [Hash] attributes Model attributes in the form of hash
140
- # @return [Object] Returns the model itself
141
- def build_from_hash(attributes)
142
139
  return nil unless attributes.is_a?(Hash)
143
140
  attributes = attributes.transform_keys(&:to_sym)
144
- self.class.openapi_types.each_pair do |key, type|
145
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
146
- self.send("#{key}=", nil)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
147
145
  elsif type =~ /\AArray<(.*)>/i
148
146
  # check to ensure the input is an array given that the attribute
149
147
  # is documented as an array but the input is not
150
- if attributes[self.class.attribute_map[key]].is_a?(Array)
151
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
152
150
  end
153
- elsif !attributes[self.class.attribute_map[key]].nil?
154
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
155
153
  end
156
154
  end
157
-
158
- self
155
+ new(transformed_hash)
159
156
  end
160
157
 
161
158
  # Deserializes the data based on type
162
159
  # @param string type Data type
163
160
  # @param string value Value to be deserialized
164
161
  # @return [Object] Deserialized data
165
- def _deserialize(type, value)
162
+ def self._deserialize(type, value)
166
163
  case type.to_sym
167
164
  when :Time
168
165
  Time.parse(value)
@@ -197,7 +194,7 @@ module CityPayApiClient
197
194
  else # model
198
195
  # models (e.g. Pet) or oneOf
199
196
  klass = CityPayApiClient.const_get(type)
200
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
197
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
198
  end
202
199
  end
203
200
 
@@ -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
 
@@ -70,6 +70,8 @@ module CityPayApiClient
70
70
  if (value = attributes[:'domain']).is_a?(Array)
71
71
  self.domain = value
72
72
  end
73
+ else
74
+ self.domain = nil
73
75
  end
74
76
 
75
77
  if attributes.key?(:'live')
@@ -78,12 +80,15 @@ module CityPayApiClient
78
80
 
79
81
  if attributes.key?(:'merchantid')
80
82
  self.merchantid = attributes[:'merchantid']
83
+ else
84
+ self.merchantid = nil
81
85
  end
82
86
  end
83
87
 
84
88
  # Show invalid properties with the reasons. Usually used together with valid?
85
89
  # @return Array for valid properties with the reasons
86
90
  def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
92
  invalid_properties = Array.new
88
93
  if @domain.nil?
89
94
  invalid_properties.push('invalid value for "domain", domain cannot be nil.')
@@ -99,6 +104,7 @@ module CityPayApiClient
99
104
  # Check to see if the all the properties in the model are valid
100
105
  # @return true if the model is valid
101
106
  def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
102
108
  return false if @domain.nil?
103
109
  return false if @merchantid.nil?
104
110
  true
@@ -130,37 +136,30 @@ module CityPayApiClient
130
136
  # @param [Hash] attributes Model attributes in the form of hash
131
137
  # @return [Object] Returns the model itself
132
138
  def self.build_from_hash(attributes)
133
- new.build_from_hash(attributes)
134
- end
135
-
136
- # Builds the object from hash
137
- # @param [Hash] attributes Model attributes in the form of hash
138
- # @return [Object] Returns the model itself
139
- def build_from_hash(attributes)
140
139
  return nil unless attributes.is_a?(Hash)
141
140
  attributes = attributes.transform_keys(&:to_sym)
142
- self.class.openapi_types.each_pair do |key, type|
143
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
144
- self.send("#{key}=", nil)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
145
  elsif type =~ /\AArray<(.*)>/i
146
146
  # check to ensure the input is an array given that the attribute
147
147
  # is documented as an array but the input is not
148
- if attributes[self.class.attribute_map[key]].is_a?(Array)
149
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
150
  end
151
- elsif !attributes[self.class.attribute_map[key]].nil?
152
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
153
  end
154
154
  end
155
-
156
- self
155
+ new(transformed_hash)
157
156
  end
158
157
 
159
158
  # Deserializes the data based on type
160
159
  # @param string type Data type
161
160
  # @param string value Value to be deserialized
162
161
  # @return [Object] Deserialized data
163
- def _deserialize(type, value)
162
+ def self._deserialize(type, value)
164
163
  case type.to_sym
165
164
  when :Time
166
165
  Time.parse(value)
@@ -195,7 +194,7 @@ module CityPayApiClient
195
194
  else # model
196
195
  # models (e.g. Pet) or oneOf
197
196
  klass = CityPayApiClient.const_get(type)
198
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
197
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
198
  end
200
199
  end
201
200