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.
- checksums.yaml +4 -4
- data/README.md +15 -14
- data/citypay_api_client.gemspec +4 -3
- data/docs/AirlineAdvice.md +1 -1
- data/docs/AuthRequest.md +3 -1
- data/docs/AuthResponse.md +5 -1
- data/docs/AuthorisationAndPaymentApi.md +300 -9
- data/docs/BatchProcessingApi.md +15 -11
- data/docs/BatchTransactionResultModel.md +5 -1
- data/docs/Card.md +1 -1
- data/docs/CardHolderAccountApi.md +64 -9
- data/docs/ChargeRequest.md +2 -0
- data/docs/ContactDetails.md +11 -11
- data/docs/DirectPostApi.md +40 -16
- data/docs/DirectPostRequest.md +3 -1
- data/docs/OperationalFunctionsApi.md +28 -8
- data/docs/PaylinkApi.md +249 -73
- data/docs/PaylinkCustomParam.md +3 -1
- data/docs/PaylinkFieldGuardModel.md +1 -1
- data/docs/PaylinkTokenRequestModel.md +4 -0
- data/docs/RegisterCard.md +1 -1
- data/docs/ThreeDSecure.md +1 -1
- data/docs/TokenisationResponseModel.md +2 -2
- data/docs/images/3dsv1-challenge.png +0 -0
- data/docs/images/3dsv2-challenge.png +0 -0
- data/docs/images/3dsv2-frictionless.png +0 -0
- data/docs/images/3dsv2-method-challenge.png +0 -0
- data/docs/images/3dsv2-method-frictionless.png +0 -0
- data/docs/images/3dsv2-no3d.png +0 -0
- data/docs/images/citypay-logo.svg +1 -0
- data/docs/images/direct-post-flow.png +0 -0
- data/docs/images/favicon.ico +0 -0
- data/docs/images/header.png +0 -0
- data/docs/images/logo.ai +1913 -4
- data/docs/images/logo.png +0 -0
- data/docs/images/logo.svg +1 -0
- data/docs/images/merchant-BPS-workflow.png +0 -0
- data/docs/images/paylink-field-guards.png +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +4 -4
- data/lib/citypay_api_client/api/batch_processing_api__.rb +11 -11
- data/lib/citypay_api_client/api/card_holder_account_api__.rb +2 -2
- data/lib/citypay_api_client/api/direct_post_api__.rb +5 -5
- data/lib/citypay_api_client/api/operational_functions_api__.rb +3 -3
- data/lib/citypay_api_client/api/paylink_api__.rb +74 -74
- data/lib/citypay_api_client/api_client.rb +24 -22
- data/lib/citypay_api_client/api_error.rb +3 -2
- data/lib/citypay_api_client/configuration.rb +28 -9
- data/lib/citypay_api_client/models/account_create.rb +17 -20
- data/lib/citypay_api_client/models/account_status.rb +15 -20
- data/lib/citypay_api_client/models/acknowledgement.rb +27 -24
- data/lib/citypay_api_client/models/acl_check_request.rb +17 -20
- data/lib/citypay_api_client/models/acl_check_response_model.rb +15 -20
- data/lib/citypay_api_client/models/airline_advice.rb +45 -29
- data/lib/citypay_api_client/models/airline_segment.rb +35 -22
- data/lib/citypay_api_client/models/auth_reference.rb +41 -26
- data/lib/citypay_api_client/models/auth_references.rb +15 -20
- data/lib/citypay_api_client/models/auth_request.rb +66 -29
- data/lib/citypay_api_client/models/auth_response.rb +45 -22
- data/lib/citypay_api_client/models/authen_required.rb +15 -20
- data/lib/citypay_api_client/models/batch.rb +24 -21
- data/lib/citypay_api_client/models/batch_report_request.rb +23 -22
- data/lib/citypay_api_client/models/batch_report_response_model.rb +27 -20
- data/lib/citypay_api_client/models/batch_transaction.rb +25 -22
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +53 -22
- data/lib/citypay_api_client/models/bin.rb +15 -20
- data/lib/citypay_api_client/models/bin_lookup.rb +17 -20
- data/lib/citypay_api_client/models/c_res_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/capture_request.rb +27 -22
- data/lib/citypay_api_client/models/card.rb +33 -26
- data/lib/citypay_api_client/models/card_holder_account.rb +19 -20
- data/lib/citypay_api_client/models/card_status.rb +15 -20
- data/lib/citypay_api_client/models/charge_request.rb +66 -29
- data/lib/citypay_api_client/models/check_batch_status.rb +23 -22
- data/lib/citypay_api_client/models/check_batch_status_response.rb +15 -20
- data/lib/citypay_api_client/models/contact_details.rb +77 -42
- data/lib/citypay_api_client/models/decision.rb +15 -20
- data/lib/citypay_api_client/models/direct_post_request.rb +66 -29
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/domain_key_check_request.rb +17 -20
- data/lib/citypay_api_client/models/domain_key_request.rb +19 -20
- data/lib/citypay_api_client/models/domain_key_response.rb +25 -22
- data/lib/citypay_api_client/models/error.rb +27 -24
- data/lib/citypay_api_client/models/event_data_model.rb +15 -20
- data/lib/citypay_api_client/models/exists.rb +17 -20
- data/lib/citypay_api_client/models/external_mpi.rb +39 -24
- data/lib/citypay_api_client/models/list_merchants_response.rb +21 -22
- data/lib/citypay_api_client/models/mcc6012.rb +15 -20
- data/lib/citypay_api_client/models/merchant.rb +15 -20
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_address.rb +52 -29
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +25 -22
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +19 -20
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +17 -20
- data/lib/citypay_api_client/models/paylink_card_holder.rb +30 -23
- data/lib/citypay_api_client/models/paylink_cart.rb +15 -20
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +15 -20
- data/lib/citypay_api_client/models/paylink_config.rb +15 -20
- data/lib/citypay_api_client/models/paylink_custom_param.rb +29 -22
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_error_code.rb +19 -20
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +16 -21
- data/lib/citypay_api_client/models/paylink_part_payments.rb +15 -20
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_state_event.rb +15 -20
- data/lib/citypay_api_client/models/paylink_token_created.rb +21 -20
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +75 -22
- data/lib/citypay_api_client/models/paylink_token_status.rb +15 -20
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +17 -20
- data/lib/citypay_api_client/models/paylink_ui.rb +15 -20
- data/lib/citypay_api_client/models/ping.rb +21 -22
- data/lib/citypay_api_client/models/process_batch_request.rb +27 -22
- data/lib/citypay_api_client/models/process_batch_response.rb +17 -20
- data/lib/citypay_api_client/models/refund_request.rb +28 -21
- data/lib/citypay_api_client/models/register_card.rb +27 -22
- data/lib/citypay_api_client/models/request_challenged.rb +15 -20
- data/lib/citypay_api_client/models/retrieve_request.rb +23 -22
- data/lib/citypay_api_client/models/three_d_secure.rb +16 -21
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +23 -24
- data/lib/citypay_api_client/models/void_request.rb +23 -22
- data/lib/citypay_api_client/version.rb +3 -3
- data/lib/citypay_api_client.rb +2 -2
- data/spec/.DS_Store +0 -0
- data/spec/it_api_sandbox_spec.rb +5 -11
- data/spec/models/account_create_spec.rb +1 -2
- data/spec/models/account_status_spec.rb +2 -2
- data/spec/models/airline_advice_spec.rb +0 -2
- data/spec/models/airline_segment_spec.rb +0 -2
- data/spec/models/auth_request_spec.rb +0 -2
- data/spec/models/auth_response_spec.rb +75 -30
- data/spec/models/batch_report_request_spec.rb +0 -2
- data/spec/models/batch_report_response_model_spec.rb +0 -2
- data/spec/models/batch_spec.rb +0 -2
- data/spec/models/batch_transaction_result_model_spec.rb +0 -2
- data/spec/models/batch_transaction_spec.rb +0 -2
- data/spec/models/bin_lookup_spec.rb +0 -2
- data/spec/models/capture_request_spec.rb +0 -2
- data/spec/models/card_holder_account_spec.rb +0 -2
- data/spec/models/charge_request_spec.rb +0 -2
- data/spec/models/direct_post_request_spec.rb +0 -2
- data/spec/models/domain_key_check_request_spec.rb +0 -2
- data/spec/models/paylink_token_request_model_spec.rb +0 -2
- data/spec/models/process_batch_request_spec.rb +0 -2
- data/spec/models/refund_request_spec.rb +0 -2
- data/spec/models/register_card_spec.rb +0 -2
- data/spec/spec_helper.rb +2 -2
- metadata +25 -12
- data/docs/OperationalApi.md +0 -214
- 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
|
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:
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
@@ -94,18 +94,26 @@ module CityPayApiClient
|
|
94
94
|
|
95
95
|
if attributes.key?(:'arrival_location_code')
|
96
96
|
self.arrival_location_code = attributes[:'arrival_location_code']
|
97
|
+
else
|
98
|
+
self.arrival_location_code = nil
|
97
99
|
end
|
98
100
|
|
99
101
|
if attributes.key?(:'carrier_code')
|
100
102
|
self.carrier_code = attributes[:'carrier_code']
|
103
|
+
else
|
104
|
+
self.carrier_code = nil
|
101
105
|
end
|
102
106
|
|
103
107
|
if attributes.key?(:'class_service_code')
|
104
108
|
self.class_service_code = attributes[:'class_service_code']
|
109
|
+
else
|
110
|
+
self.class_service_code = nil
|
105
111
|
end
|
106
112
|
|
107
113
|
if attributes.key?(:'departure_date')
|
108
114
|
self.departure_date = attributes[:'departure_date']
|
115
|
+
else
|
116
|
+
self.departure_date = nil
|
109
117
|
end
|
110
118
|
|
111
119
|
if attributes.key?(:'departure_location_code')
|
@@ -114,6 +122,8 @@ module CityPayApiClient
|
|
114
122
|
|
115
123
|
if attributes.key?(:'flight_number')
|
116
124
|
self.flight_number = attributes[:'flight_number']
|
125
|
+
else
|
126
|
+
self.flight_number = nil
|
117
127
|
end
|
118
128
|
|
119
129
|
if attributes.key?(:'segment_fare')
|
@@ -128,6 +138,7 @@ module CityPayApiClient
|
|
128
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
129
139
|
# @return Array for valid properties with the reasons
|
130
140
|
def list_invalid_properties
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
131
142
|
invalid_properties = Array.new
|
132
143
|
if @arrival_location_code.nil?
|
133
144
|
invalid_properties.push('invalid value for "arrival_location_code", arrival_location_code cannot be nil.')
|
@@ -179,6 +190,7 @@ module CityPayApiClient
|
|
179
190
|
# Check to see if the all the properties in the model are valid
|
180
191
|
# @return true if the model is valid
|
181
192
|
def valid?
|
193
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
182
194
|
return false if @arrival_location_code.nil?
|
183
195
|
return false if @arrival_location_code.to_s.length > 3
|
184
196
|
return false if @carrier_code.nil?
|
@@ -238,7 +250,11 @@ module CityPayApiClient
|
|
238
250
|
# Custom attribute writer method with validation
|
239
251
|
# @param [Object] departure_location_code Value to be assigned
|
240
252
|
def departure_location_code=(departure_location_code)
|
241
|
-
if
|
253
|
+
if departure_location_code.nil?
|
254
|
+
fail ArgumentError, 'departure_location_code cannot be nil'
|
255
|
+
end
|
256
|
+
|
257
|
+
if departure_location_code.to_s.length > 3
|
242
258
|
fail ArgumentError, 'invalid value for "departure_location_code", the character length must be smaller than or equal to 3.'
|
243
259
|
end
|
244
260
|
|
@@ -262,7 +278,11 @@ module CityPayApiClient
|
|
262
278
|
# Custom attribute writer method with validation
|
263
279
|
# @param [Object] stop_over_indicator Value to be assigned
|
264
280
|
def stop_over_indicator=(stop_over_indicator)
|
265
|
-
if
|
281
|
+
if stop_over_indicator.nil?
|
282
|
+
fail ArgumentError, 'stop_over_indicator cannot be nil'
|
283
|
+
end
|
284
|
+
|
285
|
+
if stop_over_indicator.to_s.length > 1
|
266
286
|
fail ArgumentError, 'invalid value for "stop_over_indicator", the character length must be smaller than or equal to 1.'
|
267
287
|
end
|
268
288
|
|
@@ -300,37 +320,30 @@ module CityPayApiClient
|
|
300
320
|
# @param [Hash] attributes Model attributes in the form of hash
|
301
321
|
# @return [Object] Returns the model itself
|
302
322
|
def self.build_from_hash(attributes)
|
303
|
-
new.build_from_hash(attributes)
|
304
|
-
end
|
305
|
-
|
306
|
-
# Builds the object from hash
|
307
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
308
|
-
# @return [Object] Returns the model itself
|
309
|
-
def build_from_hash(attributes)
|
310
323
|
return nil unless attributes.is_a?(Hash)
|
311
324
|
attributes = attributes.transform_keys(&:to_sym)
|
312
|
-
|
313
|
-
|
314
|
-
|
325
|
+
transformed_hash = {}
|
326
|
+
openapi_types.each_pair do |key, type|
|
327
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
328
|
+
transformed_hash["#{key}"] = nil
|
315
329
|
elsif type =~ /\AArray<(.*)>/i
|
316
330
|
# check to ensure the input is an array given that the attribute
|
317
331
|
# is documented as an array but the input is not
|
318
|
-
if attributes[
|
319
|
-
|
332
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
333
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
320
334
|
end
|
321
|
-
elsif !attributes[
|
322
|
-
|
335
|
+
elsif !attributes[attribute_map[key]].nil?
|
336
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
323
337
|
end
|
324
338
|
end
|
325
|
-
|
326
|
-
self
|
339
|
+
new(transformed_hash)
|
327
340
|
end
|
328
341
|
|
329
342
|
# Deserializes the data based on type
|
330
343
|
# @param string type Data type
|
331
344
|
# @param string value Value to be deserialized
|
332
345
|
# @return [Object] Deserialized data
|
333
|
-
def _deserialize(type, value)
|
346
|
+
def self._deserialize(type, value)
|
334
347
|
case type.to_sym
|
335
348
|
when :Time
|
336
349
|
Time.parse(value)
|
@@ -365,7 +378,7 @@ module CityPayApiClient
|
|
365
378
|
else # model
|
366
379
|
# models (e.g. Pet) or oneOf
|
367
380
|
klass = CityPayApiClient.const_get(type)
|
368
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
381
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
369
382
|
end
|
370
383
|
end
|
371
384
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is
|
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:
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
@@ -182,6 +182,7 @@ module CityPayApiClient
|
|
182
182
|
# Show invalid properties with the reasons. Usually used together with valid?
|
183
183
|
# @return Array for valid properties with the reasons
|
184
184
|
def list_invalid_properties
|
185
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
185
186
|
invalid_properties = Array.new
|
186
187
|
if !@amount.nil? && @amount.to_s.length > 10
|
187
188
|
invalid_properties.push('invalid value for "amount", the character length must be smaller than or equal to 10.')
|
@@ -213,6 +214,7 @@ module CityPayApiClient
|
|
213
214
|
# Check to see if the all the properties in the model are valid
|
214
215
|
# @return true if the model is valid
|
215
216
|
def valid?
|
217
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
216
218
|
return false if !@amount.nil? && @amount.to_s.length > 10
|
217
219
|
return false if !@currency.nil? && @currency.to_s.length > 3
|
218
220
|
return false if !@currency.nil? && @currency.to_s.length < 3
|
@@ -225,7 +227,11 @@ module CityPayApiClient
|
|
225
227
|
# Custom attribute writer method with validation
|
226
228
|
# @param [Object] amount Value to be assigned
|
227
229
|
def amount=(amount)
|
228
|
-
if
|
230
|
+
if amount.nil?
|
231
|
+
fail ArgumentError, 'amount cannot be nil'
|
232
|
+
end
|
233
|
+
|
234
|
+
if amount.to_s.length > 10
|
229
235
|
fail ArgumentError, 'invalid value for "amount", the character length must be smaller than or equal to 10.'
|
230
236
|
end
|
231
237
|
|
@@ -235,17 +241,25 @@ module CityPayApiClient
|
|
235
241
|
# Custom attribute writer method with validation
|
236
242
|
# @param [Object] amount_value Value to be assigned
|
237
243
|
def amount_value=(amount_value)
|
244
|
+
if amount_value.nil?
|
245
|
+
fail ArgumentError, 'amount_value cannot be nil'
|
246
|
+
end
|
247
|
+
|
238
248
|
@amount_value = amount_value
|
239
249
|
end
|
240
250
|
|
241
251
|
# Custom attribute writer method with validation
|
242
252
|
# @param [Object] currency Value to be assigned
|
243
253
|
def currency=(currency)
|
244
|
-
if
|
254
|
+
if currency.nil?
|
255
|
+
fail ArgumentError, 'currency cannot be nil'
|
256
|
+
end
|
257
|
+
|
258
|
+
if currency.to_s.length > 3
|
245
259
|
fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
|
246
260
|
end
|
247
261
|
|
248
|
-
if
|
262
|
+
if currency.to_s.length < 3
|
249
263
|
fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
|
250
264
|
end
|
251
265
|
|
@@ -255,11 +269,15 @@ module CityPayApiClient
|
|
255
269
|
# Custom attribute writer method with validation
|
256
270
|
# @param [Object] identifier Value to be assigned
|
257
271
|
def identifier=(identifier)
|
258
|
-
if
|
272
|
+
if identifier.nil?
|
273
|
+
fail ArgumentError, 'identifier cannot be nil'
|
274
|
+
end
|
275
|
+
|
276
|
+
if identifier.to_s.length > 50
|
259
277
|
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
260
278
|
end
|
261
279
|
|
262
|
-
if
|
280
|
+
if identifier.to_s.length < 4
|
263
281
|
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
264
282
|
end
|
265
283
|
|
@@ -269,7 +287,11 @@ module CityPayApiClient
|
|
269
287
|
# Custom attribute writer method with validation
|
270
288
|
# @param [Object] trans_type Value to be assigned
|
271
289
|
def trans_type=(trans_type)
|
272
|
-
if
|
290
|
+
if trans_type.nil?
|
291
|
+
fail ArgumentError, 'trans_type cannot be nil'
|
292
|
+
end
|
293
|
+
|
294
|
+
if trans_type.to_s.length > 1
|
273
295
|
fail ArgumentError, 'invalid value for "trans_type", the character length must be smaller than or equal to 1.'
|
274
296
|
end
|
275
297
|
|
@@ -313,37 +335,30 @@ module CityPayApiClient
|
|
313
335
|
# @param [Hash] attributes Model attributes in the form of hash
|
314
336
|
# @return [Object] Returns the model itself
|
315
337
|
def self.build_from_hash(attributes)
|
316
|
-
new.build_from_hash(attributes)
|
317
|
-
end
|
318
|
-
|
319
|
-
# Builds the object from hash
|
320
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
321
|
-
# @return [Object] Returns the model itself
|
322
|
-
def build_from_hash(attributes)
|
323
338
|
return nil unless attributes.is_a?(Hash)
|
324
339
|
attributes = attributes.transform_keys(&:to_sym)
|
325
|
-
|
326
|
-
|
327
|
-
|
340
|
+
transformed_hash = {}
|
341
|
+
openapi_types.each_pair do |key, type|
|
342
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
343
|
+
transformed_hash["#{key}"] = nil
|
328
344
|
elsif type =~ /\AArray<(.*)>/i
|
329
345
|
# check to ensure the input is an array given that the attribute
|
330
346
|
# is documented as an array but the input is not
|
331
|
-
if attributes[
|
332
|
-
|
347
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
348
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
333
349
|
end
|
334
|
-
elsif !attributes[
|
335
|
-
|
350
|
+
elsif !attributes[attribute_map[key]].nil?
|
351
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
336
352
|
end
|
337
353
|
end
|
338
|
-
|
339
|
-
self
|
354
|
+
new(transformed_hash)
|
340
355
|
end
|
341
356
|
|
342
357
|
# Deserializes the data based on type
|
343
358
|
# @param string type Data type
|
344
359
|
# @param string value Value to be deserialized
|
345
360
|
# @return [Object] Deserialized data
|
346
|
-
def _deserialize(type, value)
|
361
|
+
def self._deserialize(type, value)
|
347
362
|
case type.to_sym
|
348
363
|
when :Time
|
349
364
|
Time.parse(value)
|
@@ -378,7 +393,7 @@ module CityPayApiClient
|
|
378
393
|
else # model
|
379
394
|
# models (e.g. Pet) or oneOf
|
380
395
|
klass = CityPayApiClient.const_get(type)
|
381
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
396
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
382
397
|
end
|
383
398
|
end
|
384
399
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is
|
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:
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
@@ -66,6 +66,7 @@ module CityPayApiClient
|
|
66
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
67
67
|
# @return Array for valid properties with the reasons
|
68
68
|
def list_invalid_properties
|
69
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
70
|
invalid_properties = Array.new
|
70
71
|
invalid_properties
|
71
72
|
end
|
@@ -73,6 +74,7 @@ module CityPayApiClient
|
|
73
74
|
# Check to see if the all the properties in the model are valid
|
74
75
|
# @return true if the model is valid
|
75
76
|
def valid?
|
77
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
76
78
|
true
|
77
79
|
end
|
78
80
|
|
@@ -100,37 +102,30 @@ module CityPayApiClient
|
|
100
102
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
103
|
# @return [Object] Returns the model itself
|
102
104
|
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
105
|
return nil unless attributes.is_a?(Hash)
|
111
106
|
attributes = attributes.transform_keys(&:to_sym)
|
112
|
-
|
113
|
-
|
114
|
-
|
107
|
+
transformed_hash = {}
|
108
|
+
openapi_types.each_pair do |key, type|
|
109
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
110
|
+
transformed_hash["#{key}"] = nil
|
115
111
|
elsif type =~ /\AArray<(.*)>/i
|
116
112
|
# check to ensure the input is an array given that the attribute
|
117
113
|
# is documented as an array but the input is not
|
118
|
-
if attributes[
|
119
|
-
|
114
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
115
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
120
116
|
end
|
121
|
-
elsif !attributes[
|
122
|
-
|
117
|
+
elsif !attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
123
119
|
end
|
124
120
|
end
|
125
|
-
|
126
|
-
self
|
121
|
+
new(transformed_hash)
|
127
122
|
end
|
128
123
|
|
129
124
|
# Deserializes the data based on type
|
130
125
|
# @param string type Data type
|
131
126
|
# @param string value Value to be deserialized
|
132
127
|
# @return [Object] Deserialized data
|
133
|
-
def _deserialize(type, value)
|
128
|
+
def self._deserialize(type, value)
|
134
129
|
case type.to_sym
|
135
130
|
when :Time
|
136
131
|
Time.parse(value)
|
@@ -165,7 +160,7 @@ module CityPayApiClient
|
|
165
160
|
else # model
|
166
161
|
# models (e.g. Pet) or oneOf
|
167
162
|
klass = CityPayApiClient.const_get(type)
|
168
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
163
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
164
|
end
|
170
165
|
end
|
171
166
|
|