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
 
@@ -65,6 +65,9 @@ module CityPayApiClient
65
65
 
66
66
  attr_accessor :ship_to
67
67
 
68
+ # 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.
69
+ attr_accessor :tag
70
+
68
71
  attr_accessor :threedsecure
69
72
 
70
73
  # 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
  :'merchantid' => :'merchantid',
96
99
  :'name_on_card' => :'name_on_card',
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'
@@ -128,6 +132,7 @@ module CityPayApiClient
128
132
  :'merchantid' => :'Integer',
129
133
  :'name_on_card' => :'String',
130
134
  :'ship_to' => :'ContactDetails',
135
+ :'tag' => :'String',
131
136
  :'threedsecure' => :'ThreeDSecure',
132
137
  :'trans_info' => :'String',
133
138
  :'trans_type' => :'String'
@@ -161,6 +166,8 @@ module CityPayApiClient
161
166
 
162
167
  if attributes.key?(:'amount')
163
168
  self.amount = attributes[:'amount']
169
+ else
170
+ self.amount = nil
164
171
  end
165
172
 
166
173
  if attributes.key?(:'avs_postcode_policy')
@@ -173,6 +180,8 @@ module CityPayApiClient
173
180
 
174
181
  if attributes.key?(:'cardnumber')
175
182
  self.cardnumber = attributes[:'cardnumber']
183
+ else
184
+ self.cardnumber = nil
176
185
  end
177
186
 
178
187
  if attributes.key?(:'csc')
@@ -197,10 +206,14 @@ module CityPayApiClient
197
206
 
198
207
  if attributes.key?(:'expmonth')
199
208
  self.expmonth = attributes[:'expmonth']
209
+ else
210
+ self.expmonth = nil
200
211
  end
201
212
 
202
213
  if attributes.key?(:'expyear')
203
214
  self.expyear = attributes[:'expyear']
215
+ else
216
+ self.expyear = nil
204
217
  end
205
218
 
206
219
  if attributes.key?(:'external_mpi')
@@ -209,6 +222,8 @@ module CityPayApiClient
209
222
 
210
223
  if attributes.key?(:'identifier')
211
224
  self.identifier = attributes[:'identifier']
225
+ else
226
+ self.identifier = nil
212
227
  end
213
228
 
214
229
  if attributes.key?(:'match_avsa')
@@ -221,6 +236,8 @@ module CityPayApiClient
221
236
 
222
237
  if attributes.key?(:'merchantid')
223
238
  self.merchantid = attributes[:'merchantid']
239
+ else
240
+ self.merchantid = nil
224
241
  end
225
242
 
226
243
  if attributes.key?(:'name_on_card')
@@ -231,6 +248,10 @@ module CityPayApiClient
231
248
  self.ship_to = attributes[:'ship_to']
232
249
  end
233
250
 
251
+ if attributes.key?(:'tag')
252
+ self.tag = attributes[:'tag']
253
+ end
254
+
234
255
  if attributes.key?(:'threedsecure')
235
256
  self.threedsecure = attributes[:'threedsecure']
236
257
  end
@@ -247,6 +268,7 @@ module CityPayApiClient
247
268
  # Show invalid properties with the reasons. Usually used together with valid?
248
269
  # @return Array for valid properties with the reasons
249
270
  def list_invalid_properties
271
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
250
272
  invalid_properties = Array.new
251
273
  if @amount.nil?
252
274
  invalid_properties.push('invalid value for "amount", amount cannot be nil.')
@@ -342,6 +364,7 @@ module CityPayApiClient
342
364
  # Check to see if the all the properties in the model are valid
343
365
  # @return true if the model is valid
344
366
  def valid?
367
+ warn '[DEPRECATED] the `valid?` method is obsolete'
345
368
  return false if @amount.nil?
346
369
  return false if @cardnumber.nil?
347
370
  return false if @cardnumber.to_s.length > 22
@@ -398,11 +421,15 @@ module CityPayApiClient
398
421
  # Custom attribute writer method with validation
399
422
  # @param [Object] csc Value to be assigned
400
423
  def csc=(csc)
401
- if !csc.nil? && csc.to_s.length > 4
424
+ if csc.nil?
425
+ fail ArgumentError, 'csc cannot be nil'
426
+ end
427
+
428
+ if csc.to_s.length > 4
402
429
  fail ArgumentError, 'invalid value for "csc", the character length must be smaller than or equal to 4.'
403
430
  end
404
431
 
405
- if !csc.nil? && csc.to_s.length < 3
432
+ if csc.to_s.length < 3
406
433
  fail ArgumentError, 'invalid value for "csc", the character length must be great than or equal to 3.'
407
434
  end
408
435
 
@@ -412,11 +439,15 @@ module CityPayApiClient
412
439
  # Custom attribute writer method with validation
413
440
  # @param [Object] currency Value to be assigned
414
441
  def currency=(currency)
415
- if !currency.nil? && currency.to_s.length > 3
442
+ if currency.nil?
443
+ fail ArgumentError, 'currency cannot be nil'
444
+ end
445
+
446
+ if currency.to_s.length > 3
416
447
  fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
417
448
  end
418
449
 
419
- if !currency.nil? && currency.to_s.length < 3
450
+ if currency.to_s.length < 3
420
451
  fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
421
452
  end
422
453
 
@@ -480,11 +511,15 @@ module CityPayApiClient
480
511
  # Custom attribute writer method with validation
481
512
  # @param [Object] name_on_card Value to be assigned
482
513
  def name_on_card=(name_on_card)
483
- if !name_on_card.nil? && name_on_card.to_s.length > 45
514
+ if name_on_card.nil?
515
+ fail ArgumentError, 'name_on_card cannot be nil'
516
+ end
517
+
518
+ if name_on_card.to_s.length > 45
484
519
  fail ArgumentError, 'invalid value for "name_on_card", the character length must be smaller than or equal to 45.'
485
520
  end
486
521
 
487
- if !name_on_card.nil? && name_on_card.to_s.length < 2
522
+ if name_on_card.to_s.length < 2
488
523
  fail ArgumentError, 'invalid value for "name_on_card", the character length must be great than or equal to 2.'
489
524
  end
490
525
 
@@ -494,7 +529,11 @@ module CityPayApiClient
494
529
  # Custom attribute writer method with validation
495
530
  # @param [Object] trans_info Value to be assigned
496
531
  def trans_info=(trans_info)
497
- if !trans_info.nil? && trans_info.to_s.length > 50
532
+ if trans_info.nil?
533
+ fail ArgumentError, 'trans_info cannot be nil'
534
+ end
535
+
536
+ if trans_info.to_s.length > 50
498
537
  fail ArgumentError, 'invalid value for "trans_info", the character length must be smaller than or equal to 50.'
499
538
  end
500
539
 
@@ -504,7 +543,11 @@ module CityPayApiClient
504
543
  # Custom attribute writer method with validation
505
544
  # @param [Object] trans_type Value to be assigned
506
545
  def trans_type=(trans_type)
507
- if !trans_type.nil? && trans_type.to_s.length > 1
546
+ if trans_type.nil?
547
+ fail ArgumentError, 'trans_type cannot be nil'
548
+ end
549
+
550
+ if trans_type.to_s.length > 1
508
551
  fail ArgumentError, 'invalid value for "trans_type", the character length must be smaller than or equal to 1.'
509
552
  end
510
553
 
@@ -535,6 +578,7 @@ module CityPayApiClient
535
578
  merchantid == o.merchantid &&
536
579
  name_on_card == o.name_on_card &&
537
580
  ship_to == o.ship_to &&
581
+ tag == o.tag &&
538
582
  threedsecure == o.threedsecure &&
539
583
  trans_info == o.trans_info &&
540
584
  trans_type == o.trans_type
@@ -549,44 +593,37 @@ module CityPayApiClient
549
593
  # Calculates hash code according to all attributes.
550
594
  # @return [Integer] Hash code
551
595
  def hash
552
- [airline_data, amount, avs_postcode_policy, bill_to, cardnumber, csc, csc_policy, currency, duplicate_policy, event_management, expmonth, expyear, external_mpi, identifier, match_avsa, mcc6012, merchantid, name_on_card, ship_to, threedsecure, trans_info, trans_type].hash
596
+ [airline_data, amount, avs_postcode_policy, bill_to, cardnumber, csc, csc_policy, currency, duplicate_policy, event_management, expmonth, expyear, external_mpi, identifier, match_avsa, mcc6012, merchantid, name_on_card, ship_to, tag, threedsecure, trans_info, trans_type].hash
553
597
  end
554
598
 
555
599
  # Builds the object from hash
556
600
  # @param [Hash] attributes Model attributes in the form of hash
557
601
  # @return [Object] Returns the model itself
558
602
  def self.build_from_hash(attributes)
559
- new.build_from_hash(attributes)
560
- end
561
-
562
- # Builds the object from hash
563
- # @param [Hash] attributes Model attributes in the form of hash
564
- # @return [Object] Returns the model itself
565
- def build_from_hash(attributes)
566
603
  return nil unless attributes.is_a?(Hash)
567
604
  attributes = attributes.transform_keys(&:to_sym)
568
- self.class.openapi_types.each_pair do |key, type|
569
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
570
- self.send("#{key}=", nil)
605
+ transformed_hash = {}
606
+ openapi_types.each_pair do |key, type|
607
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
608
+ transformed_hash["#{key}"] = nil
571
609
  elsif type =~ /\AArray<(.*)>/i
572
610
  # check to ensure the input is an array given that the attribute
573
611
  # is documented as an array but the input is not
574
- if attributes[self.class.attribute_map[key]].is_a?(Array)
575
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
612
+ if attributes[attribute_map[key]].is_a?(Array)
613
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
576
614
  end
577
- elsif !attributes[self.class.attribute_map[key]].nil?
578
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
615
+ elsif !attributes[attribute_map[key]].nil?
616
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
579
617
  end
580
618
  end
581
-
582
- self
619
+ new(transformed_hash)
583
620
  end
584
621
 
585
622
  # Deserializes the data based on type
586
623
  # @param string type Data type
587
624
  # @param string value Value to be deserialized
588
625
  # @return [Object] Deserialized data
589
- def _deserialize(type, value)
626
+ def self._deserialize(type, value)
590
627
  case type.to_sym
591
628
  when :Time
592
629
  Time.parse(value)
@@ -621,7 +658,7 @@ module CityPayApiClient
621
658
  else # model
622
659
  # models (e.g. Pet) or oneOf
623
660
  klass = CityPayApiClient.const_get(type)
624
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
661
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
625
662
  end
626
663
  end
627
664
 
@@ -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
 
@@ -83,9 +83,15 @@ module CityPayApiClient
83
83
  # The message regarding the result which provides further narrative to the result code.
84
84
  attr_accessor :result_message
85
85
 
86
- # A name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard.
86
+ # The name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard.
87
87
  attr_accessor :scheme
88
88
 
89
+ # The name of the card scheme of the transaction such as VI or MC.
90
+ attr_accessor :scheme_id
91
+
92
+ # A url containing a logo of the card scheme.
93
+ attr_accessor :scheme_logo
94
+
89
95
  # A SHA256 digest value of the transaction used to validate the response data The digest is calculated by concatenating * authcode * amount * response_code * merchant_id * trans_no * identifier * licence_key - which is not provided in the response.
90
96
  attr_accessor :sha256
91
97
 
@@ -122,6 +128,8 @@ module CityPayApiClient
122
128
  :'result_code' => :'result_code',
123
129
  :'result_message' => :'result_message',
124
130
  :'scheme' => :'scheme',
131
+ :'scheme_id' => :'scheme_id',
132
+ :'scheme_logo' => :'scheme_logo',
125
133
  :'sha256' => :'sha256',
126
134
  :'trans_status' => :'trans_status',
127
135
  :'transno' => :'transno'
@@ -160,6 +168,8 @@ module CityPayApiClient
160
168
  :'result_code' => :'String',
161
169
  :'result_message' => :'String',
162
170
  :'scheme' => :'String',
171
+ :'scheme_id' => :'String',
172
+ :'scheme_logo' => :'String',
163
173
  :'sha256' => :'String',
164
174
  :'trans_status' => :'String',
165
175
  :'transno' => :'Integer'
@@ -265,24 +275,40 @@ module CityPayApiClient
265
275
 
266
276
  if attributes.key?(:'merchantid')
267
277
  self.merchantid = attributes[:'merchantid']
278
+ else
279
+ self.merchantid = nil
268
280
  end
269
281
 
270
282
  if attributes.key?(:'result')
271
283
  self.result = attributes[:'result']
284
+ else
285
+ self.result = nil
272
286
  end
273
287
 
274
288
  if attributes.key?(:'result_code')
275
289
  self.result_code = attributes[:'result_code']
290
+ else
291
+ self.result_code = nil
276
292
  end
277
293
 
278
294
  if attributes.key?(:'result_message')
279
295
  self.result_message = attributes[:'result_message']
296
+ else
297
+ self.result_message = nil
280
298
  end
281
299
 
282
300
  if attributes.key?(:'scheme')
283
301
  self.scheme = attributes[:'scheme']
284
302
  end
285
303
 
304
+ if attributes.key?(:'scheme_id')
305
+ self.scheme_id = attributes[:'scheme_id']
306
+ end
307
+
308
+ if attributes.key?(:'scheme_logo')
309
+ self.scheme_logo = attributes[:'scheme_logo']
310
+ end
311
+
286
312
  if attributes.key?(:'sha256')
287
313
  self.sha256 = attributes[:'sha256']
288
314
  end
@@ -299,6 +325,7 @@ module CityPayApiClient
299
325
  # Show invalid properties with the reasons. Usually used together with valid?
300
326
  # @return Array for valid properties with the reasons
301
327
  def list_invalid_properties
328
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
302
329
  invalid_properties = Array.new
303
330
  if @merchantid.nil?
304
331
  invalid_properties.push('invalid value for "merchantid", merchantid cannot be nil.')
@@ -322,6 +349,7 @@ module CityPayApiClient
322
349
  # Check to see if the all the properties in the model are valid
323
350
  # @return true if the model is valid
324
351
  def valid?
352
+ warn '[DEPRECATED] the `valid?` method is obsolete'
325
353
  return false if @merchantid.nil?
326
354
  return false if @result.nil?
327
355
  return false if @result_code.nil?
@@ -358,6 +386,8 @@ module CityPayApiClient
358
386
  result_code == o.result_code &&
359
387
  result_message == o.result_message &&
360
388
  scheme == o.scheme &&
389
+ scheme_id == o.scheme_id &&
390
+ scheme_logo == o.scheme_logo &&
361
391
  sha256 == o.sha256 &&
362
392
  trans_status == o.trans_status &&
363
393
  transno == o.transno
@@ -372,44 +402,37 @@ module CityPayApiClient
372
402
  # Calculates hash code according to all attributes.
373
403
  # @return [Integer] Hash code
374
404
  def hash
375
- [amount, atrn, atsd, authcode, authen_result, authorised, avs_result, bin_commercial, bin_debit, bin_description, cavv, context, csc_result, currency, datetime, eci, identifier, live, maskedpan, merchantid, result, result_code, result_message, scheme, sha256, trans_status, transno].hash
405
+ [amount, atrn, atsd, authcode, authen_result, authorised, avs_result, bin_commercial, bin_debit, bin_description, cavv, context, csc_result, currency, datetime, eci, identifier, live, maskedpan, merchantid, result, result_code, result_message, scheme, scheme_id, scheme_logo, sha256, trans_status, transno].hash
376
406
  end
377
407
 
378
408
  # Builds the object from hash
379
409
  # @param [Hash] attributes Model attributes in the form of hash
380
410
  # @return [Object] Returns the model itself
381
411
  def self.build_from_hash(attributes)
382
- new.build_from_hash(attributes)
383
- end
384
-
385
- # Builds the object from hash
386
- # @param [Hash] attributes Model attributes in the form of hash
387
- # @return [Object] Returns the model itself
388
- def build_from_hash(attributes)
389
412
  return nil unless attributes.is_a?(Hash)
390
413
  attributes = attributes.transform_keys(&:to_sym)
391
- self.class.openapi_types.each_pair do |key, type|
392
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
393
- self.send("#{key}=", nil)
414
+ transformed_hash = {}
415
+ openapi_types.each_pair do |key, type|
416
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
417
+ transformed_hash["#{key}"] = nil
394
418
  elsif type =~ /\AArray<(.*)>/i
395
419
  # check to ensure the input is an array given that the attribute
396
420
  # is documented as an array but the input is not
397
- if attributes[self.class.attribute_map[key]].is_a?(Array)
398
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
421
+ if attributes[attribute_map[key]].is_a?(Array)
422
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
399
423
  end
400
- elsif !attributes[self.class.attribute_map[key]].nil?
401
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
424
+ elsif !attributes[attribute_map[key]].nil?
425
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
402
426
  end
403
427
  end
404
-
405
- self
428
+ new(transformed_hash)
406
429
  end
407
430
 
408
431
  # Deserializes the data based on type
409
432
  # @param string type Data type
410
433
  # @param string value Value to be deserialized
411
434
  # @return [Object] Deserialized data
412
- def _deserialize(type, value)
435
+ def self._deserialize(type, value)
413
436
  case type.to_sym
414
437
  when :Time
415
438
  Time.parse(value)
@@ -444,7 +467,7 @@ module CityPayApiClient
444
467
  else # model
445
468
  # models (e.g. Pet) or oneOf
446
469
  klass = CityPayApiClient.const_get(type)
447
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
470
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
448
471
  end
449
472
  end
450
473
 
@@ -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
 
@@ -83,6 +83,7 @@ module CityPayApiClient
83
83
  # Show invalid properties with the reasons. Usually used together with valid?
84
84
  # @return Array for valid properties with the reasons
85
85
  def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
87
  invalid_properties = Array.new
87
88
  invalid_properties
88
89
  end
@@ -90,6 +91,7 @@ module CityPayApiClient
90
91
  # Check to see if the all the properties in the model are valid
91
92
  # @return true if the model is valid
92
93
  def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
95
  true
94
96
  end
95
97
 
@@ -119,37 +121,30 @@ module CityPayApiClient
119
121
  # @param [Hash] attributes Model attributes in the form of hash
120
122
  # @return [Object] Returns the model itself
121
123
  def self.build_from_hash(attributes)
122
- new.build_from_hash(attributes)
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def build_from_hash(attributes)
129
124
  return nil unless attributes.is_a?(Hash)
130
125
  attributes = attributes.transform_keys(&:to_sym)
131
- self.class.openapi_types.each_pair do |key, type|
132
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
133
- self.send("#{key}=", nil)
126
+ transformed_hash = {}
127
+ openapi_types.each_pair do |key, type|
128
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
129
+ transformed_hash["#{key}"] = nil
134
130
  elsif type =~ /\AArray<(.*)>/i
135
131
  # check to ensure the input is an array given that the attribute
136
132
  # is documented as an array but the input is not
137
- if attributes[self.class.attribute_map[key]].is_a?(Array)
138
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
133
+ if attributes[attribute_map[key]].is_a?(Array)
134
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
135
  end
140
- elsif !attributes[self.class.attribute_map[key]].nil?
141
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ elsif !attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
138
  end
143
139
  end
144
-
145
- self
140
+ new(transformed_hash)
146
141
  end
147
142
 
148
143
  # Deserializes the data based on type
149
144
  # @param string type Data type
150
145
  # @param string value Value to be deserialized
151
146
  # @return [Object] Deserialized data
152
- def _deserialize(type, value)
147
+ def self._deserialize(type, value)
153
148
  case type.to_sym
154
149
  when :Time
155
150
  Time.parse(value)
@@ -184,7 +179,7 @@ module CityPayApiClient
184
179
  else # model
185
180
  # models (e.g. Pet) or oneOf
186
181
  klass = CityPayApiClient.const_get(type)
187
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
182
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
183
  end
189
184
  end
190
185