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
 
@@ -69,6 +69,8 @@ module CityPayApiClient
69
69
 
70
70
  if attributes.key?(:'batch_date')
71
71
  self.batch_date = attributes[:'batch_date']
72
+ else
73
+ self.batch_date = nil
72
74
  end
73
75
 
74
76
  if attributes.key?(:'batch_id')
@@ -77,12 +79,15 @@ module CityPayApiClient
77
79
 
78
80
  if attributes.key?(:'batch_status')
79
81
  self.batch_status = attributes[:'batch_status']
82
+ else
83
+ self.batch_status = nil
80
84
  end
81
85
  end
82
86
 
83
87
  # Show invalid properties with the reasons. Usually used together with valid?
84
88
  # @return Array for valid properties with the reasons
85
89
  def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
91
  invalid_properties = Array.new
87
92
  if @batch_date.nil?
88
93
  invalid_properties.push('invalid value for "batch_date", batch_date cannot be nil.')
@@ -102,6 +107,7 @@ module CityPayApiClient
102
107
  # Check to see if the all the properties in the model are valid
103
108
  # @return true if the model is valid
104
109
  def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
111
  return false if @batch_date.nil?
106
112
  return false if !@batch_id.nil? && @batch_id < 1
107
113
  return false if @batch_status.nil?
@@ -111,7 +117,11 @@ module CityPayApiClient
111
117
  # Custom attribute writer method with validation
112
118
  # @param [Object] batch_id Value to be assigned
113
119
  def batch_id=(batch_id)
114
- if !batch_id.nil? && batch_id < 1
120
+ if batch_id.nil?
121
+ fail ArgumentError, 'batch_id cannot be nil'
122
+ end
123
+
124
+ if batch_id < 1
115
125
  fail ArgumentError, 'invalid value for "batch_id", must be greater than or equal to 1.'
116
126
  end
117
127
 
@@ -144,37 +154,30 @@ module CityPayApiClient
144
154
  # @param [Hash] attributes Model attributes in the form of hash
145
155
  # @return [Object] Returns the model itself
146
156
  def self.build_from_hash(attributes)
147
- new.build_from_hash(attributes)
148
- end
149
-
150
- # Builds the object from hash
151
- # @param [Hash] attributes Model attributes in the form of hash
152
- # @return [Object] Returns the model itself
153
- def build_from_hash(attributes)
154
157
  return nil unless attributes.is_a?(Hash)
155
158
  attributes = attributes.transform_keys(&:to_sym)
156
- self.class.openapi_types.each_pair do |key, type|
157
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
158
- self.send("#{key}=", nil)
159
+ transformed_hash = {}
160
+ openapi_types.each_pair do |key, type|
161
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = nil
159
163
  elsif type =~ /\AArray<(.*)>/i
160
164
  # check to ensure the input is an array given that the attribute
161
165
  # is documented as an array but the input is not
162
- if attributes[self.class.attribute_map[key]].is_a?(Array)
163
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
166
+ if attributes[attribute_map[key]].is_a?(Array)
167
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
168
  end
165
- elsif !attributes[self.class.attribute_map[key]].nil?
166
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
169
+ elsif !attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
171
  end
168
172
  end
169
-
170
- self
173
+ new(transformed_hash)
171
174
  end
172
175
 
173
176
  # Deserializes the data based on type
174
177
  # @param string type Data type
175
178
  # @param string value Value to be deserialized
176
179
  # @return [Object] Deserialized data
177
- def _deserialize(type, value)
180
+ def self._deserialize(type, value)
178
181
  case type.to_sym
179
182
  when :Time
180
183
  Time.parse(value)
@@ -209,7 +212,7 @@ module CityPayApiClient
209
212
  else # model
210
213
  # models (e.g. Pet) or oneOf
211
214
  klass = CityPayApiClient.const_get(type)
212
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
215
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
213
216
  end
214
217
  end
215
218
 
@@ -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
 
@@ -64,6 +64,8 @@ module CityPayApiClient
64
64
 
65
65
  if attributes.key?(:'batch_id')
66
66
  self.batch_id = attributes[:'batch_id']
67
+ else
68
+ self.batch_id = nil
67
69
  end
68
70
 
69
71
  if attributes.key?(:'client_account_id')
@@ -74,6 +76,7 @@ module CityPayApiClient
74
76
  # Show invalid properties with the reasons. Usually used together with valid?
75
77
  # @return Array for valid properties with the reasons
76
78
  def list_invalid_properties
79
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
80
  invalid_properties = Array.new
78
81
  if @batch_id.nil?
79
82
  invalid_properties.push('invalid value for "batch_id", batch_id cannot be nil.')
@@ -97,6 +100,7 @@ module CityPayApiClient
97
100
  # Check to see if the all the properties in the model are valid
98
101
  # @return true if the model is valid
99
102
  def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
104
  return false if @batch_id.nil?
101
105
  return false if @batch_id < 1
102
106
  return false if !@client_account_id.nil? && @client_account_id.to_s.length > 20
@@ -121,11 +125,15 @@ module CityPayApiClient
121
125
  # Custom attribute writer method with validation
122
126
  # @param [Object] client_account_id Value to be assigned
123
127
  def client_account_id=(client_account_id)
124
- if !client_account_id.nil? && client_account_id.to_s.length > 20
128
+ if client_account_id.nil?
129
+ fail ArgumentError, 'client_account_id cannot be nil'
130
+ end
131
+
132
+ if client_account_id.to_s.length > 20
125
133
  fail ArgumentError, 'invalid value for "client_account_id", the character length must be smaller than or equal to 20.'
126
134
  end
127
135
 
128
- if !client_account_id.nil? && client_account_id.to_s.length < 3
136
+ if client_account_id.to_s.length < 3
129
137
  fail ArgumentError, 'invalid value for "client_account_id", the character length must be great than or equal to 3.'
130
138
  end
131
139
 
@@ -157,37 +165,30 @@ module CityPayApiClient
157
165
  # @param [Hash] attributes Model attributes in the form of hash
158
166
  # @return [Object] Returns the model itself
159
167
  def self.build_from_hash(attributes)
160
- new.build_from_hash(attributes)
161
- end
162
-
163
- # Builds the object from hash
164
- # @param [Hash] attributes Model attributes in the form of hash
165
- # @return [Object] Returns the model itself
166
- def build_from_hash(attributes)
167
168
  return nil unless attributes.is_a?(Hash)
168
169
  attributes = attributes.transform_keys(&:to_sym)
169
- self.class.openapi_types.each_pair do |key, type|
170
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
171
- self.send("#{key}=", nil)
170
+ transformed_hash = {}
171
+ openapi_types.each_pair do |key, type|
172
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
172
174
  elsif type =~ /\AArray<(.*)>/i
173
175
  # check to ensure the input is an array given that the attribute
174
176
  # is documented as an array but the input is not
175
- if attributes[self.class.attribute_map[key]].is_a?(Array)
176
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
177
+ if attributes[attribute_map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
177
179
  end
178
- elsif !attributes[self.class.attribute_map[key]].nil?
179
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
180
+ elsif !attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
180
182
  end
181
183
  end
182
-
183
- self
184
+ new(transformed_hash)
184
185
  end
185
186
 
186
187
  # Deserializes the data based on type
187
188
  # @param string type Data type
188
189
  # @param string value Value to be deserialized
189
190
  # @return [Object] Deserialized data
190
- def _deserialize(type, value)
191
+ def self._deserialize(type, value)
191
192
  case type.to_sym
192
193
  when :Time
193
194
  Time.parse(value)
@@ -222,7 +223,7 @@ module CityPayApiClient
222
223
  else # model
223
224
  # models (e.g. Pet) or oneOf
224
225
  klass = CityPayApiClient.const_get(type)
225
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
226
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
226
227
  end
227
228
  end
228
229
 
@@ -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,34 +83,47 @@ module CityPayApiClient
83
83
 
84
84
  if attributes.key?(:'amount')
85
85
  self.amount = attributes[:'amount']
86
+ else
87
+ self.amount = nil
86
88
  end
87
89
 
88
90
  if attributes.key?(:'batch_date')
89
91
  self.batch_date = attributes[:'batch_date']
92
+ else
93
+ self.batch_date = nil
90
94
  end
91
95
 
92
96
  if attributes.key?(:'batch_id')
93
97
  self.batch_id = attributes[:'batch_id']
98
+ else
99
+ self.batch_id = nil
94
100
  end
95
101
 
96
102
  if attributes.key?(:'batch_status')
97
103
  self.batch_status = attributes[:'batch_status']
104
+ else
105
+ self.batch_status = nil
98
106
  end
99
107
 
100
108
  if attributes.key?(:'client_account_id')
101
109
  self.client_account_id = attributes[:'client_account_id']
110
+ else
111
+ self.client_account_id = nil
102
112
  end
103
113
 
104
114
  if attributes.key?(:'transactions')
105
115
  if (value = attributes[:'transactions']).is_a?(Array)
106
116
  self.transactions = value
107
117
  end
118
+ else
119
+ self.transactions = nil
108
120
  end
109
121
  end
110
122
 
111
123
  # Show invalid properties with the reasons. Usually used together with valid?
112
124
  # @return Array for valid properties with the reasons
113
125
  def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
127
  invalid_properties = Array.new
115
128
  if @amount.nil?
116
129
  invalid_properties.push('invalid value for "amount", amount cannot be nil.')
@@ -154,6 +167,7 @@ module CityPayApiClient
154
167
  # Check to see if the all the properties in the model are valid
155
168
  # @return true if the model is valid
156
169
  def valid?
170
+ warn '[DEPRECATED] the `valid?` method is obsolete'
157
171
  return false if @amount.nil?
158
172
  return false if @batch_date.nil?
159
173
  return false if @batch_id.nil?
@@ -237,37 +251,30 @@ module CityPayApiClient
237
251
  # @param [Hash] attributes Model attributes in the form of hash
238
252
  # @return [Object] Returns the model itself
239
253
  def self.build_from_hash(attributes)
240
- new.build_from_hash(attributes)
241
- end
242
-
243
- # Builds the object from hash
244
- # @param [Hash] attributes Model attributes in the form of hash
245
- # @return [Object] Returns the model itself
246
- def build_from_hash(attributes)
247
254
  return nil unless attributes.is_a?(Hash)
248
255
  attributes = attributes.transform_keys(&:to_sym)
249
- self.class.openapi_types.each_pair do |key, type|
250
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
251
- self.send("#{key}=", nil)
256
+ transformed_hash = {}
257
+ openapi_types.each_pair do |key, type|
258
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
259
+ transformed_hash["#{key}"] = nil
252
260
  elsif type =~ /\AArray<(.*)>/i
253
261
  # check to ensure the input is an array given that the attribute
254
262
  # is documented as an array but the input is not
255
- if attributes[self.class.attribute_map[key]].is_a?(Array)
256
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
263
+ if attributes[attribute_map[key]].is_a?(Array)
264
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
257
265
  end
258
- elsif !attributes[self.class.attribute_map[key]].nil?
259
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
266
+ elsif !attributes[attribute_map[key]].nil?
267
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
260
268
  end
261
269
  end
262
-
263
- self
270
+ new(transformed_hash)
264
271
  end
265
272
 
266
273
  # Deserializes the data based on type
267
274
  # @param string type Data type
268
275
  # @param string value Value to be deserialized
269
276
  # @return [Object] Deserialized data
270
- def _deserialize(type, value)
277
+ def self._deserialize(type, value)
271
278
  case type.to_sym
272
279
  when :Time
273
280
  Time.parse(value)
@@ -302,7 +309,7 @@ module CityPayApiClient
302
309
  else # model
303
310
  # models (e.g. Pet) or oneOf
304
311
  klass = CityPayApiClient.const_get(type)
305
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
312
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
306
313
  end
307
314
  end
308
315
 
@@ -1,11 +1,11 @@
1
1
  =begin
2
2
  #CityPay Payment API
3
3
 
4
- # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
4
+ # This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
6
  Contact: support@citypay.com
7
7
  Generated by: https://openapi-generator.tech
8
- OpenAPI Generator version: 6.2.1
8
+ OpenAPI Generator version: 7.2.0
9
9
 
10
10
  =end
11
11
 
@@ -74,10 +74,14 @@ module CityPayApiClient
74
74
 
75
75
  if attributes.key?(:'account_id')
76
76
  self.account_id = attributes[:'account_id']
77
+ else
78
+ self.account_id = nil
77
79
  end
78
80
 
79
81
  if attributes.key?(:'amount')
80
82
  self.amount = attributes[:'amount']
83
+ else
84
+ self.amount = nil
81
85
  end
82
86
 
83
87
  if attributes.key?(:'identifier')
@@ -92,6 +96,7 @@ module CityPayApiClient
92
96
  # Show invalid properties with the reasons. Usually used together with valid?
93
97
  # @return Array for valid properties with the reasons
94
98
  def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
100
  invalid_properties = Array.new
96
101
  if @account_id.nil?
97
102
  invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
@@ -123,6 +128,7 @@ module CityPayApiClient
123
128
  # Check to see if the all the properties in the model are valid
124
129
  # @return true if the model is valid
125
130
  def valid?
131
+ warn '[DEPRECATED] the `valid?` method is obsolete'
126
132
  return false if @account_id.nil?
127
133
  return false if @account_id.to_s.length > 50
128
134
  return false if @account_id.to_s.length < 5
@@ -163,11 +169,15 @@ module CityPayApiClient
163
169
  # Custom attribute writer method with validation
164
170
  # @param [Object] identifier Value to be assigned
165
171
  def identifier=(identifier)
166
- if !identifier.nil? && identifier.to_s.length > 50
172
+ if identifier.nil?
173
+ fail ArgumentError, 'identifier cannot be nil'
174
+ end
175
+
176
+ if identifier.to_s.length > 50
167
177
  fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
168
178
  end
169
179
 
170
- if !identifier.nil? && identifier.to_s.length < 4
180
+ if identifier.to_s.length < 4
171
181
  fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
172
182
  end
173
183
 
@@ -201,37 +211,30 @@ module CityPayApiClient
201
211
  # @param [Hash] attributes Model attributes in the form of hash
202
212
  # @return [Object] Returns the model itself
203
213
  def self.build_from_hash(attributes)
204
- new.build_from_hash(attributes)
205
- end
206
-
207
- # Builds the object from hash
208
- # @param [Hash] attributes Model attributes in the form of hash
209
- # @return [Object] Returns the model itself
210
- def build_from_hash(attributes)
211
214
  return nil unless attributes.is_a?(Hash)
212
215
  attributes = attributes.transform_keys(&:to_sym)
213
- self.class.openapi_types.each_pair do |key, type|
214
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
215
- self.send("#{key}=", nil)
216
+ transformed_hash = {}
217
+ openapi_types.each_pair do |key, type|
218
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = nil
216
220
  elsif type =~ /\AArray<(.*)>/i
217
221
  # check to ensure the input is an array given that the attribute
218
222
  # is documented as an array but the input is not
219
- if attributes[self.class.attribute_map[key]].is_a?(Array)
220
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
223
+ if attributes[attribute_map[key]].is_a?(Array)
224
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
221
225
  end
222
- elsif !attributes[self.class.attribute_map[key]].nil?
223
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
226
+ elsif !attributes[attribute_map[key]].nil?
227
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
224
228
  end
225
229
  end
226
-
227
- self
230
+ new(transformed_hash)
228
231
  end
229
232
 
230
233
  # Deserializes the data based on type
231
234
  # @param string type Data type
232
235
  # @param string value Value to be deserialized
233
236
  # @return [Object] Deserialized data
234
- def _deserialize(type, value)
237
+ def self._deserialize(type, value)
235
238
  case type.to_sym
236
239
  when :Time
237
240
  Time.parse(value)
@@ -266,7 +269,7 @@ module CityPayApiClient
266
269
  else # model
267
270
  # models (e.g. Pet) or oneOf
268
271
  klass = CityPayApiClient.const_get(type)
269
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
272
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
270
273
  end
271
274
  end
272
275