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
 
@@ -101,6 +101,7 @@ module CityPayApiClient
101
101
  # Show invalid properties with the reasons. Usually used together with valid?
102
102
  # @return Array for valid properties with the reasons
103
103
  def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
105
  invalid_properties = Array.new
105
106
  invalid_properties
106
107
  end
@@ -108,6 +109,7 @@ module CityPayApiClient
108
109
  # Check to see if the all the properties in the model are valid
109
110
  # @return true if the model is valid
110
111
  def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
113
  true
112
114
  end
113
115
 
@@ -139,37 +141,30 @@ module CityPayApiClient
139
141
  # @param [Hash] attributes Model attributes in the form of hash
140
142
  # @return [Object] Returns the model itself
141
143
  def self.build_from_hash(attributes)
142
- new.build_from_hash(attributes)
143
- end
144
-
145
- # Builds the object from hash
146
- # @param [Hash] attributes Model attributes in the form of hash
147
- # @return [Object] Returns the model itself
148
- def build_from_hash(attributes)
149
144
  return nil unless attributes.is_a?(Hash)
150
145
  attributes = attributes.transform_keys(&:to_sym)
151
- self.class.openapi_types.each_pair do |key, type|
152
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
- self.send("#{key}=", nil)
146
+ transformed_hash = {}
147
+ openapi_types.each_pair do |key, type|
148
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = nil
154
150
  elsif type =~ /\AArray<(.*)>/i
155
151
  # check to ensure the input is an array given that the attribute
156
152
  # is documented as an array but the input is not
157
- if attributes[self.class.attribute_map[key]].is_a?(Array)
158
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
153
+ if attributes[attribute_map[key]].is_a?(Array)
154
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
155
  end
160
- elsif !attributes[self.class.attribute_map[key]].nil?
161
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
156
+ elsif !attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
158
  end
163
159
  end
164
-
165
- self
160
+ new(transformed_hash)
166
161
  end
167
162
 
168
163
  # Deserializes the data based on type
169
164
  # @param string type Data type
170
165
  # @param string value Value to be deserialized
171
166
  # @return [Object] Deserialized data
172
- def _deserialize(type, value)
167
+ def self._deserialize(type, value)
173
168
  case type.to_sym
174
169
  when :Time
175
170
  Time.parse(value)
@@ -204,7 +199,7 @@ module CityPayApiClient
204
199
  else # model
205
200
  # models (e.g. Pet) or oneOf
206
201
  klass = CityPayApiClient.const_get(type)
207
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
202
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
203
  end
209
204
  end
210
205
 
@@ -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
 
@@ -73,6 +73,8 @@ module CityPayApiClient
73
73
 
74
74
  if attributes.key?(:'merchantid')
75
75
  self.merchantid = attributes[:'merchantid']
76
+ else
77
+ self.merchantid = nil
76
78
  end
77
79
 
78
80
  if attributes.key?(:'transno')
@@ -83,6 +85,7 @@ module CityPayApiClient
83
85
  # Show invalid properties with the reasons. Usually used together with valid?
84
86
  # @return Array for valid properties with the reasons
85
87
  def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
89
  invalid_properties = Array.new
87
90
  if !@identifier.nil? && @identifier.to_s.length > 50
88
91
  invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
@@ -102,6 +105,7 @@ module CityPayApiClient
102
105
  # Check to see if the all the properties in the model are valid
103
106
  # @return true if the model is valid
104
107
  def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
109
  return false if !@identifier.nil? && @identifier.to_s.length > 50
106
110
  return false if !@identifier.nil? && @identifier.to_s.length < 4
107
111
  return false if @merchantid.nil?
@@ -111,11 +115,15 @@ module CityPayApiClient
111
115
  # Custom attribute writer method with validation
112
116
  # @param [Object] identifier Value to be assigned
113
117
  def identifier=(identifier)
114
- if !identifier.nil? && identifier.to_s.length > 50
118
+ if identifier.nil?
119
+ fail ArgumentError, 'identifier cannot be nil'
120
+ end
121
+
122
+ if identifier.to_s.length > 50
115
123
  fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
116
124
  end
117
125
 
118
- if !identifier.nil? && identifier.to_s.length < 4
126
+ if identifier.to_s.length < 4
119
127
  fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
120
128
  end
121
129
 
@@ -148,37 +156,30 @@ module CityPayApiClient
148
156
  # @param [Hash] attributes Model attributes in the form of hash
149
157
  # @return [Object] Returns the model itself
150
158
  def self.build_from_hash(attributes)
151
- new.build_from_hash(attributes)
152
- end
153
-
154
- # Builds the object from hash
155
- # @param [Hash] attributes Model attributes in the form of hash
156
- # @return [Object] Returns the model itself
157
- def build_from_hash(attributes)
158
159
  return nil unless attributes.is_a?(Hash)
159
160
  attributes = attributes.transform_keys(&:to_sym)
160
- self.class.openapi_types.each_pair do |key, type|
161
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
162
- 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
163
165
  elsif type =~ /\AArray<(.*)>/i
164
166
  # check to ensure the input is an array given that the attribute
165
167
  # is documented as an array but the input is not
166
- if attributes[self.class.attribute_map[key]].is_a?(Array)
167
- 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) }
168
170
  end
169
- elsif !attributes[self.class.attribute_map[key]].nil?
170
- 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]])
171
173
  end
172
174
  end
173
-
174
- self
175
+ new(transformed_hash)
175
176
  end
176
177
 
177
178
  # Deserializes the data based on type
178
179
  # @param string type Data type
179
180
  # @param string value Value to be deserialized
180
181
  # @return [Object] Deserialized data
181
- def _deserialize(type, value)
182
+ def self._deserialize(type, value)
182
183
  case type.to_sym
183
184
  when :Time
184
185
  Time.parse(value)
@@ -213,7 +214,7 @@ module CityPayApiClient
213
214
  else # model
214
215
  # models (e.g. Pet) or oneOf
215
216
  klass = CityPayApiClient.const_get(type)
216
- 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)
217
218
  end
218
219
  end
219
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
 
@@ -35,7 +35,7 @@ module CityPayApiClient
35
35
  # BrowserScreenWidth field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the `bx` function to gather this value.
36
36
  attr_accessor :browser_screen_width
37
37
 
38
- # BrowserTZ field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the `bx` function to gather this value.
38
+ # BrowserTZ offset field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the `bx` function to gather this value.
39
39
  attr_accessor :browser_tz
40
40
 
41
41
  # Required for 3DSv2. Browser extension value produced by the citypay.js `bx` function. See [https://sandbox.citypay.com/3dsv2/bx](https://sandbox.citypay.com/3dsv2/bx) for details.
@@ -173,6 +173,7 @@ module CityPayApiClient
173
173
  # Show invalid properties with the reasons. Usually used together with valid?
174
174
  # @return Array for valid properties with the reasons
175
175
  def list_invalid_properties
176
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
176
177
  invalid_properties = Array.new
177
178
  invalid_properties
178
179
  end
@@ -180,6 +181,7 @@ module CityPayApiClient
180
181
  # Check to see if the all the properties in the model are valid
181
182
  # @return true if the model is valid
182
183
  def valid?
184
+ warn '[DEPRECATED] the `valid?` method is obsolete'
183
185
  true
184
186
  end
185
187
 
@@ -219,37 +221,30 @@ module CityPayApiClient
219
221
  # @param [Hash] attributes Model attributes in the form of hash
220
222
  # @return [Object] Returns the model itself
221
223
  def self.build_from_hash(attributes)
222
- new.build_from_hash(attributes)
223
- end
224
-
225
- # Builds the object from hash
226
- # @param [Hash] attributes Model attributes in the form of hash
227
- # @return [Object] Returns the model itself
228
- def build_from_hash(attributes)
229
224
  return nil unless attributes.is_a?(Hash)
230
225
  attributes = attributes.transform_keys(&:to_sym)
231
- self.class.openapi_types.each_pair do |key, type|
232
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
233
- self.send("#{key}=", nil)
226
+ transformed_hash = {}
227
+ openapi_types.each_pair do |key, type|
228
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
229
+ transformed_hash["#{key}"] = nil
234
230
  elsif type =~ /\AArray<(.*)>/i
235
231
  # check to ensure the input is an array given that the attribute
236
232
  # is documented as an array but the input is not
237
- if attributes[self.class.attribute_map[key]].is_a?(Array)
238
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
233
+ if attributes[attribute_map[key]].is_a?(Array)
234
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
239
235
  end
240
- elsif !attributes[self.class.attribute_map[key]].nil?
241
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
236
+ elsif !attributes[attribute_map[key]].nil?
237
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
242
238
  end
243
239
  end
244
-
245
- self
240
+ new(transformed_hash)
246
241
  end
247
242
 
248
243
  # Deserializes the data based on type
249
244
  # @param string type Data type
250
245
  # @param string value Value to be deserialized
251
246
  # @return [Object] Deserialized data
252
- def _deserialize(type, value)
247
+ def self._deserialize(type, value)
253
248
  case type.to_sym
254
249
  when :Time
255
250
  Time.parse(value)
@@ -284,7 +279,7 @@ module CityPayApiClient
284
279
  else # model
285
280
  # models (e.g. Pet) or oneOf
286
281
  klass = CityPayApiClient.const_get(type)
287
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
282
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
288
283
  end
289
284
  end
290
285
 
@@ -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
 
@@ -35,13 +35,13 @@ module CityPayApiClient
35
35
  # A masked value of the card number used for processing displaying limited values that can be used on a receipt.
36
36
  attr_accessor :maskedpan
37
37
 
38
- # A name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard.
38
+ # The name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard.
39
39
  attr_accessor :scheme
40
40
 
41
41
  # A Base58 encoded SHA-256 digest generated from the token value Base58 decoded and appended with the nonce value UTF-8 decoded.
42
42
  attr_accessor :sig_id
43
43
 
44
- # The token used for presentment to authorisation later in the procsesing flow.
44
+ # The token used for presentment to authorisation later in the processing flow.
45
45
  attr_accessor :token
46
46
 
47
47
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -146,6 +146,7 @@ module CityPayApiClient
146
146
  # Show invalid properties with the reasons. Usually used together with valid?
147
147
  # @return Array for valid properties with the reasons
148
148
  def list_invalid_properties
149
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
149
150
  invalid_properties = Array.new
150
151
  if !@identifier.nil? && @identifier.to_s.length > 50
151
152
  invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
@@ -161,6 +162,7 @@ module CityPayApiClient
161
162
  # Check to see if the all the properties in the model are valid
162
163
  # @return true if the model is valid
163
164
  def valid?
165
+ warn '[DEPRECATED] the `valid?` method is obsolete'
164
166
  return false if !@identifier.nil? && @identifier.to_s.length > 50
165
167
  return false if !@identifier.nil? && @identifier.to_s.length < 4
166
168
  true
@@ -169,11 +171,15 @@ module CityPayApiClient
169
171
  # Custom attribute writer method with validation
170
172
  # @param [Object] identifier Value to be assigned
171
173
  def identifier=(identifier)
172
- if !identifier.nil? && identifier.to_s.length > 50
174
+ if identifier.nil?
175
+ fail ArgumentError, 'identifier cannot be nil'
176
+ end
177
+
178
+ if identifier.to_s.length > 50
173
179
  fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
174
180
  end
175
181
 
176
- if !identifier.nil? && identifier.to_s.length < 4
182
+ if identifier.to_s.length < 4
177
183
  fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
178
184
  end
179
185
 
@@ -213,37 +219,30 @@ module CityPayApiClient
213
219
  # @param [Hash] attributes Model attributes in the form of hash
214
220
  # @return [Object] Returns the model itself
215
221
  def self.build_from_hash(attributes)
216
- new.build_from_hash(attributes)
217
- end
218
-
219
- # Builds the object from hash
220
- # @param [Hash] attributes Model attributes in the form of hash
221
- # @return [Object] Returns the model itself
222
- def build_from_hash(attributes)
223
222
  return nil unless attributes.is_a?(Hash)
224
223
  attributes = attributes.transform_keys(&:to_sym)
225
- self.class.openapi_types.each_pair do |key, type|
226
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
227
- self.send("#{key}=", nil)
224
+ transformed_hash = {}
225
+ openapi_types.each_pair do |key, type|
226
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
227
+ transformed_hash["#{key}"] = nil
228
228
  elsif type =~ /\AArray<(.*)>/i
229
229
  # check to ensure the input is an array given that the attribute
230
230
  # is documented as an array but the input is not
231
- if attributes[self.class.attribute_map[key]].is_a?(Array)
232
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
231
+ if attributes[attribute_map[key]].is_a?(Array)
232
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
233
233
  end
234
- elsif !attributes[self.class.attribute_map[key]].nil?
235
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
234
+ elsif !attributes[attribute_map[key]].nil?
235
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
236
236
  end
237
237
  end
238
-
239
- self
238
+ new(transformed_hash)
240
239
  end
241
240
 
242
241
  # Deserializes the data based on type
243
242
  # @param string type Data type
244
243
  # @param string value Value to be deserialized
245
244
  # @return [Object] Deserialized data
246
- def _deserialize(type, value)
245
+ def self._deserialize(type, value)
247
246
  case type.to_sym
248
247
  when :Time
249
248
  Time.parse(value)
@@ -278,7 +277,7 @@ module CityPayApiClient
278
277
  else # model
279
278
  # models (e.g. Pet) or oneOf
280
279
  klass = CityPayApiClient.const_get(type)
281
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
280
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
282
281
  end
283
282
  end
284
283
 
@@ -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
 
@@ -73,6 +73,8 @@ module CityPayApiClient
73
73
 
74
74
  if attributes.key?(:'merchantid')
75
75
  self.merchantid = attributes[:'merchantid']
76
+ else
77
+ self.merchantid = nil
76
78
  end
77
79
 
78
80
  if attributes.key?(:'transno')
@@ -83,6 +85,7 @@ module CityPayApiClient
83
85
  # Show invalid properties with the reasons. Usually used together with valid?
84
86
  # @return Array for valid properties with the reasons
85
87
  def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
89
  invalid_properties = Array.new
87
90
  if !@identifier.nil? && @identifier.to_s.length > 50
88
91
  invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
@@ -102,6 +105,7 @@ module CityPayApiClient
102
105
  # Check to see if the all the properties in the model are valid
103
106
  # @return true if the model is valid
104
107
  def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
109
  return false if !@identifier.nil? && @identifier.to_s.length > 50
106
110
  return false if !@identifier.nil? && @identifier.to_s.length < 4
107
111
  return false if @merchantid.nil?
@@ -111,11 +115,15 @@ module CityPayApiClient
111
115
  # Custom attribute writer method with validation
112
116
  # @param [Object] identifier Value to be assigned
113
117
  def identifier=(identifier)
114
- if !identifier.nil? && identifier.to_s.length > 50
118
+ if identifier.nil?
119
+ fail ArgumentError, 'identifier cannot be nil'
120
+ end
121
+
122
+ if identifier.to_s.length > 50
115
123
  fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
116
124
  end
117
125
 
118
- if !identifier.nil? && identifier.to_s.length < 4
126
+ if identifier.to_s.length < 4
119
127
  fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
120
128
  end
121
129
 
@@ -148,37 +156,30 @@ module CityPayApiClient
148
156
  # @param [Hash] attributes Model attributes in the form of hash
149
157
  # @return [Object] Returns the model itself
150
158
  def self.build_from_hash(attributes)
151
- new.build_from_hash(attributes)
152
- end
153
-
154
- # Builds the object from hash
155
- # @param [Hash] attributes Model attributes in the form of hash
156
- # @return [Object] Returns the model itself
157
- def build_from_hash(attributes)
158
159
  return nil unless attributes.is_a?(Hash)
159
160
  attributes = attributes.transform_keys(&:to_sym)
160
- self.class.openapi_types.each_pair do |key, type|
161
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
162
- 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
163
165
  elsif type =~ /\AArray<(.*)>/i
164
166
  # check to ensure the input is an array given that the attribute
165
167
  # is documented as an array but the input is not
166
- if attributes[self.class.attribute_map[key]].is_a?(Array)
167
- 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) }
168
170
  end
169
- elsif !attributes[self.class.attribute_map[key]].nil?
170
- 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]])
171
173
  end
172
174
  end
173
-
174
- self
175
+ new(transformed_hash)
175
176
  end
176
177
 
177
178
  # Deserializes the data based on type
178
179
  # @param string type Data type
179
180
  # @param string value Value to be deserialized
180
181
  # @return [Object] Deserialized data
181
- def _deserialize(type, value)
182
+ def self._deserialize(type, value)
182
183
  case type.to_sym
183
184
  when :Time
184
185
  Time.parse(value)
@@ -213,7 +214,7 @@ module CityPayApiClient
213
214
  else # model
214
215
  # models (e.g. Pet) or oneOf
215
216
  klass = CityPayApiClient.const_get(type)
216
- 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)
217
218
  end
218
219
  end
219
220
 
@@ -1,14 +1,14 @@
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
 
12
12
  module CityPayApiClient
13
- VERSION = '1.1.1'
13
+ VERSION = '1.1.2'
14
14
  end
@@ -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
 
data/spec/.DS_Store CHANGED
Binary file
@@ -8,9 +8,9 @@ require_relative '../lib/citypay_api_client/utils/digest_utils'
8
8
 
9
9
  describe 'IntegrationTests' do
10
10
 
11
- client_id = "PC222210"
12
- licence_key = "SK5K1GQLI7USNET1"
13
- merchant_id = "62421955"
11
+ client_id = ENV['CP_CLIENT_ID']
12
+ licence_key = ENV['CP_LICENCE_KEY']
13
+ merchant_id = ENV['CP_MERCHANT_ID']
14
14
 
15
15
  before do
16
16
 
@@ -120,14 +120,8 @@ describe 'IntegrationTests' do
120
120
  body: content.to_json)
121
121
  res = request.run
122
122
  c_res = res.response_body
123
-
124
- expect(c_res['acsTransID']).to_not be_nil
125
- expect(c_res['messageType']).to_not be_nil
126
- expect(c_res['messageVersion']).to_not be_nil
127
- expect(c_res['threeDSServerTransID']).to_not be_nil
128
- expect(c_res['transStatus']).to_not be_nil
129
-
130
- c_res_auth_request = CityPayApiClient::CResAuthRequest.new({:cres => Base64.encode64(c_res)})
123
+ object = JSON.parse(c_res)
124
+ c_res_auth_request = CityPayApiClient::CResAuthRequest.new({:cres => object['cres']})
131
125
 
132
126
  c_res_request_response = api_instance.c_res_request(c_res_auth_request)
133
127