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
|
|
@@ -44,9 +44,15 @@ module CityPayApiClient
|
|
44
44
|
# A result code of the transaction identifying the result of the transaction for success, rejection or decline.
|
45
45
|
attr_accessor :result_code
|
46
46
|
|
47
|
-
#
|
47
|
+
# The name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard.
|
48
48
|
attr_accessor :scheme
|
49
49
|
|
50
|
+
# The name of the card scheme of the transaction such as VI or MC.
|
51
|
+
attr_accessor :scheme_id
|
52
|
+
|
53
|
+
# A url containing a logo of the card scheme.
|
54
|
+
attr_accessor :scheme_logo
|
55
|
+
|
50
56
|
# The resulting transaction number, ordered incrementally from 1 for every merchant_id. The value will default to less than 1 for transactions that do not have a transaction number issued.
|
51
57
|
attr_accessor :transno
|
52
58
|
|
@@ -64,6 +70,8 @@ module CityPayApiClient
|
|
64
70
|
:'result' => :'result',
|
65
71
|
:'result_code' => :'result_code',
|
66
72
|
:'scheme' => :'scheme',
|
73
|
+
:'scheme_id' => :'scheme_id',
|
74
|
+
:'scheme_logo' => :'scheme_logo',
|
67
75
|
:'transno' => :'transno'
|
68
76
|
}
|
69
77
|
end
|
@@ -87,6 +95,8 @@ module CityPayApiClient
|
|
87
95
|
:'result' => :'Integer',
|
88
96
|
:'result_code' => :'String',
|
89
97
|
:'scheme' => :'String',
|
98
|
+
:'scheme_id' => :'String',
|
99
|
+
:'scheme_logo' => :'String',
|
90
100
|
:'transno' => :'Integer'
|
91
101
|
}
|
92
102
|
end
|
@@ -114,6 +124,8 @@ module CityPayApiClient
|
|
114
124
|
|
115
125
|
if attributes.key?(:'account_id')
|
116
126
|
self.account_id = attributes[:'account_id']
|
127
|
+
else
|
128
|
+
self.account_id = nil
|
117
129
|
end
|
118
130
|
|
119
131
|
if attributes.key?(:'amount')
|
@@ -130,6 +142,8 @@ module CityPayApiClient
|
|
130
142
|
|
131
143
|
if attributes.key?(:'identifier')
|
132
144
|
self.identifier = attributes[:'identifier']
|
145
|
+
else
|
146
|
+
self.identifier = nil
|
133
147
|
end
|
134
148
|
|
135
149
|
if attributes.key?(:'maskedpan')
|
@@ -138,24 +152,40 @@ module CityPayApiClient
|
|
138
152
|
|
139
153
|
if attributes.key?(:'merchantid')
|
140
154
|
self.merchantid = attributes[:'merchantid']
|
155
|
+
else
|
156
|
+
self.merchantid = nil
|
141
157
|
end
|
142
158
|
|
143
159
|
if attributes.key?(:'message')
|
144
160
|
self.message = attributes[:'message']
|
161
|
+
else
|
162
|
+
self.message = nil
|
145
163
|
end
|
146
164
|
|
147
165
|
if attributes.key?(:'result')
|
148
166
|
self.result = attributes[:'result']
|
167
|
+
else
|
168
|
+
self.result = nil
|
149
169
|
end
|
150
170
|
|
151
171
|
if attributes.key?(:'result_code')
|
152
172
|
self.result_code = attributes[:'result_code']
|
173
|
+
else
|
174
|
+
self.result_code = nil
|
153
175
|
end
|
154
176
|
|
155
177
|
if attributes.key?(:'scheme')
|
156
178
|
self.scheme = attributes[:'scheme']
|
157
179
|
end
|
158
180
|
|
181
|
+
if attributes.key?(:'scheme_id')
|
182
|
+
self.scheme_id = attributes[:'scheme_id']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.key?(:'scheme_logo')
|
186
|
+
self.scheme_logo = attributes[:'scheme_logo']
|
187
|
+
end
|
188
|
+
|
159
189
|
if attributes.key?(:'transno')
|
160
190
|
self.transno = attributes[:'transno']
|
161
191
|
end
|
@@ -164,6 +194,7 @@ module CityPayApiClient
|
|
164
194
|
# Show invalid properties with the reasons. Usually used together with valid?
|
165
195
|
# @return Array for valid properties with the reasons
|
166
196
|
def list_invalid_properties
|
197
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
167
198
|
invalid_properties = Array.new
|
168
199
|
if @account_id.nil?
|
169
200
|
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
@@ -211,6 +242,7 @@ module CityPayApiClient
|
|
211
242
|
# Check to see if the all the properties in the model are valid
|
212
243
|
# @return true if the model is valid
|
213
244
|
def valid?
|
245
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
214
246
|
return false if @account_id.nil?
|
215
247
|
return false if @account_id.to_s.length > 50
|
216
248
|
return false if @account_id.to_s.length < 5
|
@@ -245,6 +277,10 @@ module CityPayApiClient
|
|
245
277
|
# Custom attribute writer method with validation
|
246
278
|
# @param [Object] amount Value to be assigned
|
247
279
|
def amount=(amount)
|
280
|
+
if amount.nil?
|
281
|
+
fail ArgumentError, 'amount cannot be nil'
|
282
|
+
end
|
283
|
+
|
248
284
|
@amount = amount
|
249
285
|
end
|
250
286
|
|
@@ -282,6 +318,8 @@ module CityPayApiClient
|
|
282
318
|
result == o.result &&
|
283
319
|
result_code == o.result_code &&
|
284
320
|
scheme == o.scheme &&
|
321
|
+
scheme_id == o.scheme_id &&
|
322
|
+
scheme_logo == o.scheme_logo &&
|
285
323
|
transno == o.transno
|
286
324
|
end
|
287
325
|
|
@@ -294,44 +332,37 @@ module CityPayApiClient
|
|
294
332
|
# Calculates hash code according to all attributes.
|
295
333
|
# @return [Integer] Hash code
|
296
334
|
def hash
|
297
|
-
[account_id, amount, authcode, datetime, identifier, maskedpan, merchantid, message, result, result_code, scheme, transno].hash
|
335
|
+
[account_id, amount, authcode, datetime, identifier, maskedpan, merchantid, message, result, result_code, scheme, scheme_id, scheme_logo, transno].hash
|
298
336
|
end
|
299
337
|
|
300
338
|
# Builds the object from hash
|
301
339
|
# @param [Hash] attributes Model attributes in the form of hash
|
302
340
|
# @return [Object] Returns the model itself
|
303
341
|
def self.build_from_hash(attributes)
|
304
|
-
new.build_from_hash(attributes)
|
305
|
-
end
|
306
|
-
|
307
|
-
# Builds the object from hash
|
308
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
309
|
-
# @return [Object] Returns the model itself
|
310
|
-
def build_from_hash(attributes)
|
311
342
|
return nil unless attributes.is_a?(Hash)
|
312
343
|
attributes = attributes.transform_keys(&:to_sym)
|
313
|
-
|
314
|
-
|
315
|
-
|
344
|
+
transformed_hash = {}
|
345
|
+
openapi_types.each_pair do |key, type|
|
346
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
347
|
+
transformed_hash["#{key}"] = nil
|
316
348
|
elsif type =~ /\AArray<(.*)>/i
|
317
349
|
# check to ensure the input is an array given that the attribute
|
318
350
|
# is documented as an array but the input is not
|
319
|
-
if attributes[
|
320
|
-
|
351
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
352
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
321
353
|
end
|
322
|
-
elsif !attributes[
|
323
|
-
|
354
|
+
elsif !attributes[attribute_map[key]].nil?
|
355
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
324
356
|
end
|
325
357
|
end
|
326
|
-
|
327
|
-
self
|
358
|
+
new(transformed_hash)
|
328
359
|
end
|
329
360
|
|
330
361
|
# Deserializes the data based on type
|
331
362
|
# @param string type Data type
|
332
363
|
# @param string value Value to be deserialized
|
333
364
|
# @return [Object] Deserialized data
|
334
|
-
def _deserialize(type, value)
|
365
|
+
def self._deserialize(type, value)
|
335
366
|
case type.to_sym
|
336
367
|
when :Time
|
337
368
|
Time.parse(value)
|
@@ -366,7 +397,7 @@ module CityPayApiClient
|
|
366
397
|
else # model
|
367
398
|
# models (e.g. Pet) or oneOf
|
368
399
|
klass = CityPayApiClient.const_get(type)
|
369
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
400
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
370
401
|
end
|
371
402
|
end
|
372
403
|
|
@@ -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
|
|
@@ -137,6 +137,7 @@ module CityPayApiClient
|
|
137
137
|
# Show invalid properties with the reasons. Usually used together with valid?
|
138
138
|
# @return Array for valid properties with the reasons
|
139
139
|
def list_invalid_properties
|
140
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
140
141
|
invalid_properties = Array.new
|
141
142
|
invalid_properties
|
142
143
|
end
|
@@ -144,6 +145,7 @@ module CityPayApiClient
|
|
144
145
|
# Check to see if the all the properties in the model are valid
|
145
146
|
# @return true if the model is valid
|
146
147
|
def valid?
|
148
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
147
149
|
true
|
148
150
|
end
|
149
151
|
|
@@ -179,37 +181,30 @@ module CityPayApiClient
|
|
179
181
|
# @param [Hash] attributes Model attributes in the form of hash
|
180
182
|
# @return [Object] Returns the model itself
|
181
183
|
def self.build_from_hash(attributes)
|
182
|
-
new.build_from_hash(attributes)
|
183
|
-
end
|
184
|
-
|
185
|
-
# Builds the object from hash
|
186
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
187
|
-
# @return [Object] Returns the model itself
|
188
|
-
def build_from_hash(attributes)
|
189
184
|
return nil unless attributes.is_a?(Hash)
|
190
185
|
attributes = attributes.transform_keys(&:to_sym)
|
191
|
-
|
192
|
-
|
193
|
-
|
186
|
+
transformed_hash = {}
|
187
|
+
openapi_types.each_pair do |key, type|
|
188
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
189
|
+
transformed_hash["#{key}"] = nil
|
194
190
|
elsif type =~ /\AArray<(.*)>/i
|
195
191
|
# check to ensure the input is an array given that the attribute
|
196
192
|
# is documented as an array but the input is not
|
197
|
-
if attributes[
|
198
|
-
|
193
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
194
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
199
195
|
end
|
200
|
-
elsif !attributes[
|
201
|
-
|
196
|
+
elsif !attributes[attribute_map[key]].nil?
|
197
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
202
198
|
end
|
203
199
|
end
|
204
|
-
|
205
|
-
self
|
200
|
+
new(transformed_hash)
|
206
201
|
end
|
207
202
|
|
208
203
|
# Deserializes the data based on type
|
209
204
|
# @param string type Data type
|
210
205
|
# @param string value Value to be deserialized
|
211
206
|
# @return [Object] Deserialized data
|
212
|
-
def _deserialize(type, value)
|
207
|
+
def self._deserialize(type, value)
|
213
208
|
case type.to_sym
|
214
209
|
when :Time
|
215
210
|
Time.parse(value)
|
@@ -244,7 +239,7 @@ module CityPayApiClient
|
|
244
239
|
else # model
|
245
240
|
# models (e.g. Pet) or oneOf
|
246
241
|
klass = CityPayApiClient.const_get(type)
|
247
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
242
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
248
243
|
end
|
249
244
|
end
|
250
245
|
|
@@ -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
|
|
@@ -59,12 +59,15 @@ module CityPayApiClient
|
|
59
59
|
|
60
60
|
if attributes.key?(:'bin')
|
61
61
|
self.bin = attributes[:'bin']
|
62
|
+
else
|
63
|
+
self.bin = nil
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
65
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
68
|
# @return Array for valid properties with the reasons
|
67
69
|
def list_invalid_properties
|
70
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
68
71
|
invalid_properties = Array.new
|
69
72
|
if @bin.nil?
|
70
73
|
invalid_properties.push('invalid value for "bin", bin cannot be nil.')
|
@@ -76,6 +79,7 @@ module CityPayApiClient
|
|
76
79
|
# Check to see if the all the properties in the model are valid
|
77
80
|
# @return true if the model is valid
|
78
81
|
def valid?
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
79
83
|
return false if @bin.nil?
|
80
84
|
true
|
81
85
|
end
|
@@ -114,37 +118,30 @@ module CityPayApiClient
|
|
114
118
|
# @param [Hash] attributes Model attributes in the form of hash
|
115
119
|
# @return [Object] Returns the model itself
|
116
120
|
def self.build_from_hash(attributes)
|
117
|
-
new.build_from_hash(attributes)
|
118
|
-
end
|
119
|
-
|
120
|
-
# Builds the object from hash
|
121
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
-
# @return [Object] Returns the model itself
|
123
|
-
def build_from_hash(attributes)
|
124
121
|
return nil unless attributes.is_a?(Hash)
|
125
122
|
attributes = attributes.transform_keys(&:to_sym)
|
126
|
-
|
127
|
-
|
128
|
-
|
123
|
+
transformed_hash = {}
|
124
|
+
openapi_types.each_pair do |key, type|
|
125
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = nil
|
129
127
|
elsif type =~ /\AArray<(.*)>/i
|
130
128
|
# check to ensure the input is an array given that the attribute
|
131
129
|
# is documented as an array but the input is not
|
132
|
-
if attributes[
|
133
|
-
|
130
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
131
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
134
132
|
end
|
135
|
-
elsif !attributes[
|
136
|
-
|
133
|
+
elsif !attributes[attribute_map[key]].nil?
|
134
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
137
135
|
end
|
138
136
|
end
|
139
|
-
|
140
|
-
self
|
137
|
+
new(transformed_hash)
|
141
138
|
end
|
142
139
|
|
143
140
|
# Deserializes the data based on type
|
144
141
|
# @param string type Data type
|
145
142
|
# @param string value Value to be deserialized
|
146
143
|
# @return [Object] Deserialized data
|
147
|
-
def _deserialize(type, value)
|
144
|
+
def self._deserialize(type, value)
|
148
145
|
case type.to_sym
|
149
146
|
when :Time
|
150
147
|
Time.parse(value)
|
@@ -179,7 +176,7 @@ module CityPayApiClient
|
|
179
176
|
else # model
|
180
177
|
# models (e.g. Pet) or oneOf
|
181
178
|
klass = CityPayApiClient.const_get(type)
|
182
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
180
|
end
|
184
181
|
end
|
185
182
|
|
@@ -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
|
|
@@ -65,6 +65,7 @@ module CityPayApiClient
|
|
65
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
66
|
# @return Array for valid properties with the reasons
|
67
67
|
def list_invalid_properties
|
68
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
68
69
|
invalid_properties = Array.new
|
69
70
|
invalid_properties
|
70
71
|
end
|
@@ -72,6 +73,7 @@ module CityPayApiClient
|
|
72
73
|
# Check to see if the all the properties in the model are valid
|
73
74
|
# @return true if the model is valid
|
74
75
|
def valid?
|
76
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
75
77
|
true
|
76
78
|
end
|
77
79
|
|
@@ -99,37 +101,30 @@ module CityPayApiClient
|
|
99
101
|
# @param [Hash] attributes Model attributes in the form of hash
|
100
102
|
# @return [Object] Returns the model itself
|
101
103
|
def self.build_from_hash(attributes)
|
102
|
-
new.build_from_hash(attributes)
|
103
|
-
end
|
104
|
-
|
105
|
-
# Builds the object from hash
|
106
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
-
# @return [Object] Returns the model itself
|
108
|
-
def build_from_hash(attributes)
|
109
104
|
return nil unless attributes.is_a?(Hash)
|
110
105
|
attributes = attributes.transform_keys(&:to_sym)
|
111
|
-
|
112
|
-
|
113
|
-
|
106
|
+
transformed_hash = {}
|
107
|
+
openapi_types.each_pair do |key, type|
|
108
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
109
|
+
transformed_hash["#{key}"] = nil
|
114
110
|
elsif type =~ /\AArray<(.*)>/i
|
115
111
|
# check to ensure the input is an array given that the attribute
|
116
112
|
# is documented as an array but the input is not
|
117
|
-
if attributes[
|
118
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
119
115
|
end
|
120
|
-
elsif !attributes[
|
121
|
-
|
116
|
+
elsif !attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
122
118
|
end
|
123
119
|
end
|
124
|
-
|
125
|
-
self
|
120
|
+
new(transformed_hash)
|
126
121
|
end
|
127
122
|
|
128
123
|
# Deserializes the data based on type
|
129
124
|
# @param string type Data type
|
130
125
|
# @param string value Value to be deserialized
|
131
126
|
# @return [Object] Deserialized data
|
132
|
-
def _deserialize(type, value)
|
127
|
+
def self._deserialize(type, value)
|
133
128
|
case type.to_sym
|
134
129
|
when :Time
|
135
130
|
Time.parse(value)
|
@@ -164,7 +159,7 @@ module CityPayApiClient
|
|
164
159
|
else # model
|
165
160
|
# models (e.g. Pet) or oneOf
|
166
161
|
klass = CityPayApiClient.const_get(type)
|
167
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
162
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
163
|
end
|
169
164
|
end
|
170
165
|
|
@@ -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
|
|
@@ -98,6 +98,8 @@ module CityPayApiClient
|
|
98
98
|
|
99
99
|
if attributes.key?(:'merchantid')
|
100
100
|
self.merchantid = attributes[:'merchantid']
|
101
|
+
else
|
102
|
+
self.merchantid = nil
|
101
103
|
end
|
102
104
|
|
103
105
|
if attributes.key?(:'transno')
|
@@ -108,6 +110,7 @@ module CityPayApiClient
|
|
108
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
109
111
|
# @return Array for valid properties with the reasons
|
110
112
|
def list_invalid_properties
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
111
114
|
invalid_properties = Array.new
|
112
115
|
if !@identifier.nil? && @identifier.to_s.length > 50
|
113
116
|
invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
|
@@ -127,6 +130,7 @@ module CityPayApiClient
|
|
127
130
|
# Check to see if the all the properties in the model are valid
|
128
131
|
# @return true if the model is valid
|
129
132
|
def valid?
|
133
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
130
134
|
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
131
135
|
return false if !@identifier.nil? && @identifier.to_s.length < 4
|
132
136
|
return false if @merchantid.nil?
|
@@ -136,17 +140,25 @@ module CityPayApiClient
|
|
136
140
|
# Custom attribute writer method with validation
|
137
141
|
# @param [Object] amount Value to be assigned
|
138
142
|
def amount=(amount)
|
143
|
+
if amount.nil?
|
144
|
+
fail ArgumentError, 'amount cannot be nil'
|
145
|
+
end
|
146
|
+
|
139
147
|
@amount = amount
|
140
148
|
end
|
141
149
|
|
142
150
|
# Custom attribute writer method with validation
|
143
151
|
# @param [Object] identifier Value to be assigned
|
144
152
|
def identifier=(identifier)
|
145
|
-
if
|
153
|
+
if identifier.nil?
|
154
|
+
fail ArgumentError, 'identifier cannot be nil'
|
155
|
+
end
|
156
|
+
|
157
|
+
if identifier.to_s.length > 50
|
146
158
|
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
147
159
|
end
|
148
160
|
|
149
|
-
if
|
161
|
+
if identifier.to_s.length < 4
|
150
162
|
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
151
163
|
end
|
152
164
|
|
@@ -182,37 +194,30 @@ module CityPayApiClient
|
|
182
194
|
# @param [Hash] attributes Model attributes in the form of hash
|
183
195
|
# @return [Object] Returns the model itself
|
184
196
|
def self.build_from_hash(attributes)
|
185
|
-
new.build_from_hash(attributes)
|
186
|
-
end
|
187
|
-
|
188
|
-
# Builds the object from hash
|
189
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
190
|
-
# @return [Object] Returns the model itself
|
191
|
-
def build_from_hash(attributes)
|
192
197
|
return nil unless attributes.is_a?(Hash)
|
193
198
|
attributes = attributes.transform_keys(&:to_sym)
|
194
|
-
|
195
|
-
|
196
|
-
|
199
|
+
transformed_hash = {}
|
200
|
+
openapi_types.each_pair do |key, type|
|
201
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
202
|
+
transformed_hash["#{key}"] = nil
|
197
203
|
elsif type =~ /\AArray<(.*)>/i
|
198
204
|
# check to ensure the input is an array given that the attribute
|
199
205
|
# is documented as an array but the input is not
|
200
|
-
if attributes[
|
201
|
-
|
206
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
207
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
202
208
|
end
|
203
|
-
elsif !attributes[
|
204
|
-
|
209
|
+
elsif !attributes[attribute_map[key]].nil?
|
210
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
205
211
|
end
|
206
212
|
end
|
207
|
-
|
208
|
-
self
|
213
|
+
new(transformed_hash)
|
209
214
|
end
|
210
215
|
|
211
216
|
# Deserializes the data based on type
|
212
217
|
# @param string type Data type
|
213
218
|
# @param string value Value to be deserialized
|
214
219
|
# @return [Object] Deserialized data
|
215
|
-
def _deserialize(type, value)
|
220
|
+
def self._deserialize(type, value)
|
216
221
|
case type.to_sym
|
217
222
|
when :Time
|
218
223
|
Time.parse(value)
|
@@ -247,7 +252,7 @@ module CityPayApiClient
|
|
247
252
|
else # model
|
248
253
|
# models (e.g. Pet) or oneOf
|
249
254
|
klass = CityPayApiClient.const_get(type)
|
250
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
255
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
251
256
|
end
|
252
257
|
end
|
253
258
|
|