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
|
|
@@ -29,6 +29,9 @@ module CityPayApiClient
|
|
29
29
|
|
30
30
|
attr_accessor :config
|
31
31
|
|
32
|
+
# A currency for the token. This value should be only used on multi-currency accounts and be an appropriate currency which the account is configured for.
|
33
|
+
attr_accessor :currency
|
34
|
+
|
32
35
|
# The email field is used for the Merchant to be notified on completion of the transaction . The value may be supplied to override the default stored value. Emails sent to this address by the Paylink service should not be forwarded on to the cardholder as it may contain certain information that is used by the Paylink service to validate and authenticate Paylink Token Requests: for example, the Merchant ID and the licence key.
|
33
36
|
attr_accessor :email
|
34
37
|
|
@@ -38,6 +41,9 @@ module CityPayApiClient
|
|
38
41
|
# The merchant id you wish to process this transaction with.
|
39
42
|
attr_accessor :merchantid
|
40
43
|
|
44
|
+
# True if the intent of this cardholder initiated transaction is to establish a recurring payment model, processable as merchant initiated transactions.
|
45
|
+
attr_accessor :recurring
|
46
|
+
|
41
47
|
# an id associated with a subscription to link the token request against.
|
42
48
|
attr_accessor :subscription_id
|
43
49
|
|
@@ -53,9 +59,11 @@ module CityPayApiClient
|
|
53
59
|
:'cart' => :'cart',
|
54
60
|
:'client_version' => :'client_version',
|
55
61
|
:'config' => :'config',
|
62
|
+
:'currency' => :'currency',
|
56
63
|
:'email' => :'email',
|
57
64
|
:'identifier' => :'identifier',
|
58
65
|
:'merchantid' => :'merchantid',
|
66
|
+
:'recurring' => :'recurring',
|
59
67
|
:'subscription_id' => :'subscription_id',
|
60
68
|
:'tx_type' => :'tx_type'
|
61
69
|
}
|
@@ -75,9 +83,11 @@ module CityPayApiClient
|
|
75
83
|
:'cart' => :'PaylinkCart',
|
76
84
|
:'client_version' => :'String',
|
77
85
|
:'config' => :'PaylinkConfig',
|
86
|
+
:'currency' => :'String',
|
78
87
|
:'email' => :'String',
|
79
88
|
:'identifier' => :'String',
|
80
89
|
:'merchantid' => :'Integer',
|
90
|
+
:'recurring' => :'Boolean',
|
81
91
|
:'subscription_id' => :'String',
|
82
92
|
:'tx_type' => :'String'
|
83
93
|
}
|
@@ -110,6 +120,8 @@ module CityPayApiClient
|
|
110
120
|
|
111
121
|
if attributes.key?(:'amount')
|
112
122
|
self.amount = attributes[:'amount']
|
123
|
+
else
|
124
|
+
self.amount = nil
|
113
125
|
end
|
114
126
|
|
115
127
|
if attributes.key?(:'cardholder')
|
@@ -128,16 +140,28 @@ module CityPayApiClient
|
|
128
140
|
self.config = attributes[:'config']
|
129
141
|
end
|
130
142
|
|
143
|
+
if attributes.key?(:'currency')
|
144
|
+
self.currency = attributes[:'currency']
|
145
|
+
end
|
146
|
+
|
131
147
|
if attributes.key?(:'email')
|
132
148
|
self.email = attributes[:'email']
|
133
149
|
end
|
134
150
|
|
135
151
|
if attributes.key?(:'identifier')
|
136
152
|
self.identifier = attributes[:'identifier']
|
153
|
+
else
|
154
|
+
self.identifier = nil
|
137
155
|
end
|
138
156
|
|
139
157
|
if attributes.key?(:'merchantid')
|
140
158
|
self.merchantid = attributes[:'merchantid']
|
159
|
+
else
|
160
|
+
self.merchantid = nil
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.key?(:'recurring')
|
164
|
+
self.recurring = attributes[:'recurring']
|
141
165
|
end
|
142
166
|
|
143
167
|
if attributes.key?(:'subscription_id')
|
@@ -152,11 +176,20 @@ module CityPayApiClient
|
|
152
176
|
# Show invalid properties with the reasons. Usually used together with valid?
|
153
177
|
# @return Array for valid properties with the reasons
|
154
178
|
def list_invalid_properties
|
179
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
155
180
|
invalid_properties = Array.new
|
156
181
|
if @amount.nil?
|
157
182
|
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
158
183
|
end
|
159
184
|
|
185
|
+
if !@currency.nil? && @currency.to_s.length > 3
|
186
|
+
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
187
|
+
end
|
188
|
+
|
189
|
+
if !@currency.nil? && @currency.to_s.length < 3
|
190
|
+
invalid_properties.push('invalid value for "currency", the character length must be great than or equal to 3.')
|
191
|
+
end
|
192
|
+
|
160
193
|
if !@email.nil? && @email.to_s.length > 254
|
161
194
|
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 254.')
|
162
195
|
end
|
@@ -183,7 +216,10 @@ module CityPayApiClient
|
|
183
216
|
# Check to see if the all the properties in the model are valid
|
184
217
|
# @return true if the model is valid
|
185
218
|
def valid?
|
219
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
186
220
|
return false if @amount.nil?
|
221
|
+
return false if !@currency.nil? && @currency.to_s.length > 3
|
222
|
+
return false if !@currency.nil? && @currency.to_s.length < 3
|
187
223
|
return false if !@email.nil? && @email.to_s.length > 254
|
188
224
|
return false if @identifier.nil?
|
189
225
|
return false if @identifier.to_s.length > 50
|
@@ -192,10 +228,32 @@ module CityPayApiClient
|
|
192
228
|
true
|
193
229
|
end
|
194
230
|
|
231
|
+
# Custom attribute writer method with validation
|
232
|
+
# @param [Object] currency Value to be assigned
|
233
|
+
def currency=(currency)
|
234
|
+
if currency.nil?
|
235
|
+
fail ArgumentError, 'currency cannot be nil'
|
236
|
+
end
|
237
|
+
|
238
|
+
if currency.to_s.length > 3
|
239
|
+
fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
|
240
|
+
end
|
241
|
+
|
242
|
+
if currency.to_s.length < 3
|
243
|
+
fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
|
244
|
+
end
|
245
|
+
|
246
|
+
@currency = currency
|
247
|
+
end
|
248
|
+
|
195
249
|
# Custom attribute writer method with validation
|
196
250
|
# @param [Object] email Value to be assigned
|
197
251
|
def email=(email)
|
198
|
-
if
|
252
|
+
if email.nil?
|
253
|
+
fail ArgumentError, 'email cannot be nil'
|
254
|
+
end
|
255
|
+
|
256
|
+
if email.to_s.length > 254
|
199
257
|
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
|
200
258
|
end
|
201
259
|
|
@@ -231,9 +289,11 @@ module CityPayApiClient
|
|
231
289
|
cart == o.cart &&
|
232
290
|
client_version == o.client_version &&
|
233
291
|
config == o.config &&
|
292
|
+
currency == o.currency &&
|
234
293
|
email == o.email &&
|
235
294
|
identifier == o.identifier &&
|
236
295
|
merchantid == o.merchantid &&
|
296
|
+
recurring == o.recurring &&
|
237
297
|
subscription_id == o.subscription_id &&
|
238
298
|
tx_type == o.tx_type
|
239
299
|
end
|
@@ -247,44 +307,37 @@ module CityPayApiClient
|
|
247
307
|
# Calculates hash code according to all attributes.
|
248
308
|
# @return [Integer] Hash code
|
249
309
|
def hash
|
250
|
-
[accountno, amount, cardholder, cart, client_version, config, email, identifier, merchantid, subscription_id, tx_type].hash
|
310
|
+
[accountno, amount, cardholder, cart, client_version, config, currency, email, identifier, merchantid, recurring, subscription_id, tx_type].hash
|
251
311
|
end
|
252
312
|
|
253
313
|
# Builds the object from hash
|
254
314
|
# @param [Hash] attributes Model attributes in the form of hash
|
255
315
|
# @return [Object] Returns the model itself
|
256
316
|
def self.build_from_hash(attributes)
|
257
|
-
new.build_from_hash(attributes)
|
258
|
-
end
|
259
|
-
|
260
|
-
# Builds the object from hash
|
261
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
262
|
-
# @return [Object] Returns the model itself
|
263
|
-
def build_from_hash(attributes)
|
264
317
|
return nil unless attributes.is_a?(Hash)
|
265
318
|
attributes = attributes.transform_keys(&:to_sym)
|
266
|
-
|
267
|
-
|
268
|
-
|
319
|
+
transformed_hash = {}
|
320
|
+
openapi_types.each_pair do |key, type|
|
321
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
322
|
+
transformed_hash["#{key}"] = nil
|
269
323
|
elsif type =~ /\AArray<(.*)>/i
|
270
324
|
# check to ensure the input is an array given that the attribute
|
271
325
|
# is documented as an array but the input is not
|
272
|
-
if attributes[
|
273
|
-
|
326
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
327
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
274
328
|
end
|
275
|
-
elsif !attributes[
|
276
|
-
|
329
|
+
elsif !attributes[attribute_map[key]].nil?
|
330
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
277
331
|
end
|
278
332
|
end
|
279
|
-
|
280
|
-
self
|
333
|
+
new(transformed_hash)
|
281
334
|
end
|
282
335
|
|
283
336
|
# Deserializes the data based on type
|
284
337
|
# @param string type Data type
|
285
338
|
# @param string value Value to be deserialized
|
286
339
|
# @return [Object] Deserialized data
|
287
|
-
def _deserialize(type, value)
|
340
|
+
def self._deserialize(type, value)
|
288
341
|
case type.to_sym
|
289
342
|
when :Time
|
290
343
|
Time.parse(value)
|
@@ -319,7 +372,7 @@ module CityPayApiClient
|
|
319
372
|
else # model
|
320
373
|
# models (e.g. Pet) or oneOf
|
321
374
|
klass = CityPayApiClient.const_get(type)
|
322
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
375
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
323
376
|
end
|
324
377
|
end
|
325
378
|
|
@@ -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
|
|
@@ -309,6 +309,7 @@ module CityPayApiClient
|
|
309
309
|
# Show invalid properties with the reasons. Usually used together with valid?
|
310
310
|
# @return Array for valid properties with the reasons
|
311
311
|
def list_invalid_properties
|
312
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
312
313
|
invalid_properties = Array.new
|
313
314
|
invalid_properties
|
314
315
|
end
|
@@ -316,6 +317,7 @@ module CityPayApiClient
|
|
316
317
|
# Check to see if the all the properties in the model are valid
|
317
318
|
# @return true if the model is valid
|
318
319
|
def valid?
|
320
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
319
321
|
true
|
320
322
|
end
|
321
323
|
|
@@ -370,37 +372,30 @@ module CityPayApiClient
|
|
370
372
|
# @param [Hash] attributes Model attributes in the form of hash
|
371
373
|
# @return [Object] Returns the model itself
|
372
374
|
def self.build_from_hash(attributes)
|
373
|
-
new.build_from_hash(attributes)
|
374
|
-
end
|
375
|
-
|
376
|
-
# Builds the object from hash
|
377
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
378
|
-
# @return [Object] Returns the model itself
|
379
|
-
def build_from_hash(attributes)
|
380
375
|
return nil unless attributes.is_a?(Hash)
|
381
376
|
attributes = attributes.transform_keys(&:to_sym)
|
382
|
-
|
383
|
-
|
384
|
-
|
377
|
+
transformed_hash = {}
|
378
|
+
openapi_types.each_pair do |key, type|
|
379
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
380
|
+
transformed_hash["#{key}"] = nil
|
385
381
|
elsif type =~ /\AArray<(.*)>/i
|
386
382
|
# check to ensure the input is an array given that the attribute
|
387
383
|
# is documented as an array but the input is not
|
388
|
-
if attributes[
|
389
|
-
|
384
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
385
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
390
386
|
end
|
391
|
-
elsif !attributes[
|
392
|
-
|
387
|
+
elsif !attributes[attribute_map[key]].nil?
|
388
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
393
389
|
end
|
394
390
|
end
|
395
|
-
|
396
|
-
self
|
391
|
+
new(transformed_hash)
|
397
392
|
end
|
398
393
|
|
399
394
|
# Deserializes the data based on type
|
400
395
|
# @param string type Data type
|
401
396
|
# @param string value Value to be deserialized
|
402
397
|
# @return [Object] Deserialized data
|
403
|
-
def _deserialize(type, value)
|
398
|
+
def self._deserialize(type, value)
|
404
399
|
case type.to_sym
|
405
400
|
when :Time
|
406
401
|
Time.parse(value)
|
@@ -435,7 +430,7 @@ module CityPayApiClient
|
|
435
430
|
else # model
|
436
431
|
# models (e.g. Pet) or oneOf
|
437
432
|
klass = CityPayApiClient.const_get(type)
|
438
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
433
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
439
434
|
end
|
440
435
|
end
|
441
436
|
|
@@ -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
|
|
@@ -78,6 +78,8 @@ module CityPayApiClient
|
|
78
78
|
|
79
79
|
if attributes.key?(:'after')
|
80
80
|
self.after = attributes[:'after']
|
81
|
+
else
|
82
|
+
self.after = nil
|
81
83
|
end
|
82
84
|
|
83
85
|
if attributes.key?(:'max_results')
|
@@ -86,6 +88,8 @@ module CityPayApiClient
|
|
86
88
|
|
87
89
|
if attributes.key?(:'merchantid')
|
88
90
|
self.merchantid = attributes[:'merchantid']
|
91
|
+
else
|
92
|
+
self.merchantid = nil
|
89
93
|
end
|
90
94
|
|
91
95
|
if attributes.key?(:'next_token')
|
@@ -102,6 +106,7 @@ module CityPayApiClient
|
|
102
106
|
# Show invalid properties with the reasons. Usually used together with valid?
|
103
107
|
# @return Array for valid properties with the reasons
|
104
108
|
def list_invalid_properties
|
109
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
105
110
|
invalid_properties = Array.new
|
106
111
|
if @after.nil?
|
107
112
|
invalid_properties.push('invalid value for "after", after cannot be nil.')
|
@@ -117,6 +122,7 @@ module CityPayApiClient
|
|
117
122
|
# Check to see if the all the properties in the model are valid
|
118
123
|
# @return true if the model is valid
|
119
124
|
def valid?
|
125
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
120
126
|
return false if @after.nil?
|
121
127
|
return false if @merchantid.nil?
|
122
128
|
true
|
@@ -150,37 +156,30 @@ module CityPayApiClient
|
|
150
156
|
# @param [Hash] attributes Model attributes in the form of hash
|
151
157
|
# @return [Object] Returns the model itself
|
152
158
|
def self.build_from_hash(attributes)
|
153
|
-
new.build_from_hash(attributes)
|
154
|
-
end
|
155
|
-
|
156
|
-
# Builds the object from hash
|
157
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
158
|
-
# @return [Object] Returns the model itself
|
159
|
-
def build_from_hash(attributes)
|
160
159
|
return nil unless attributes.is_a?(Hash)
|
161
160
|
attributes = attributes.transform_keys(&:to_sym)
|
162
|
-
|
163
|
-
|
164
|
-
|
161
|
+
transformed_hash = {}
|
162
|
+
openapi_types.each_pair do |key, type|
|
163
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
164
|
+
transformed_hash["#{key}"] = nil
|
165
165
|
elsif type =~ /\AArray<(.*)>/i
|
166
166
|
# check to ensure the input is an array given that the attribute
|
167
167
|
# is documented as an array but the input is not
|
168
|
-
if attributes[
|
169
|
-
|
168
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
169
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
170
170
|
end
|
171
|
-
elsif !attributes[
|
172
|
-
|
171
|
+
elsif !attributes[attribute_map[key]].nil?
|
172
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
173
173
|
end
|
174
174
|
end
|
175
|
-
|
176
|
-
self
|
175
|
+
new(transformed_hash)
|
177
176
|
end
|
178
177
|
|
179
178
|
# Deserializes the data based on type
|
180
179
|
# @param string type Data type
|
181
180
|
# @param string value Value to be deserialized
|
182
181
|
# @return [Object] Deserialized data
|
183
|
-
def _deserialize(type, value)
|
182
|
+
def self._deserialize(type, value)
|
184
183
|
case type.to_sym
|
185
184
|
when :Time
|
186
185
|
Time.parse(value)
|
@@ -215,7 +214,7 @@ module CityPayApiClient
|
|
215
214
|
else # model
|
216
215
|
# models (e.g. Pet) or oneOf
|
217
216
|
klass = CityPayApiClient.const_get(type)
|
218
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
217
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
219
218
|
end
|
220
219
|
end
|
221
220
|
|
@@ -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
|
|
@@ -69,12 +69,15 @@ module CityPayApiClient
|
|
69
69
|
if (value = attributes[:'tokens']).is_a?(Array)
|
70
70
|
self.tokens = value
|
71
71
|
end
|
72
|
+
else
|
73
|
+
self.tokens = nil
|
72
74
|
end
|
73
75
|
end
|
74
76
|
|
75
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
78
|
# @return Array for valid properties with the reasons
|
77
79
|
def list_invalid_properties
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
81
|
invalid_properties = Array.new
|
79
82
|
if @tokens.nil?
|
80
83
|
invalid_properties.push('invalid value for "tokens", tokens cannot be nil.')
|
@@ -86,6 +89,7 @@ module CityPayApiClient
|
|
86
89
|
# Check to see if the all the properties in the model are valid
|
87
90
|
# @return true if the model is valid
|
88
91
|
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
89
93
|
return false if @tokens.nil?
|
90
94
|
true
|
91
95
|
end
|
@@ -115,37 +119,30 @@ module CityPayApiClient
|
|
115
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
116
120
|
# @return [Object] Returns the model itself
|
117
121
|
def self.build_from_hash(attributes)
|
118
|
-
new.build_from_hash(attributes)
|
119
|
-
end
|
120
|
-
|
121
|
-
# Builds the object from hash
|
122
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
-
# @return [Object] Returns the model itself
|
124
|
-
def build_from_hash(attributes)
|
125
122
|
return nil unless attributes.is_a?(Hash)
|
126
123
|
attributes = attributes.transform_keys(&:to_sym)
|
127
|
-
|
128
|
-
|
129
|
-
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
130
128
|
elsif type =~ /\AArray<(.*)>/i
|
131
129
|
# check to ensure the input is an array given that the attribute
|
132
130
|
# is documented as an array but the input is not
|
133
|
-
if attributes[
|
134
|
-
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
135
133
|
end
|
136
|
-
elsif !attributes[
|
137
|
-
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
138
136
|
end
|
139
137
|
end
|
140
|
-
|
141
|
-
self
|
138
|
+
new(transformed_hash)
|
142
139
|
end
|
143
140
|
|
144
141
|
# Deserializes the data based on type
|
145
142
|
# @param string type Data type
|
146
143
|
# @param string value Value to be deserialized
|
147
144
|
# @return [Object] Deserialized data
|
148
|
-
def _deserialize(type, value)
|
145
|
+
def self._deserialize(type, value)
|
149
146
|
case type.to_sym
|
150
147
|
when :Time
|
151
148
|
Time.parse(value)
|
@@ -180,7 +177,7 @@ module CityPayApiClient
|
|
180
177
|
else # model
|
181
178
|
# models (e.g. Pet) or oneOf
|
182
179
|
klass = CityPayApiClient.const_get(type)
|
183
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
184
181
|
end
|
185
182
|
end
|
186
183
|
|
@@ -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
|
|
@@ -92,6 +92,7 @@ module CityPayApiClient
|
|
92
92
|
# Show invalid properties with the reasons. Usually used together with valid?
|
93
93
|
# @return Array for valid properties with the reasons
|
94
94
|
def list_invalid_properties
|
95
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
95
96
|
invalid_properties = Array.new
|
96
97
|
invalid_properties
|
97
98
|
end
|
@@ -99,6 +100,7 @@ module CityPayApiClient
|
|
99
100
|
# Check to see if the all the properties in the model are valid
|
100
101
|
# @return true if the model is valid
|
101
102
|
def valid?
|
103
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
102
104
|
true
|
103
105
|
end
|
104
106
|
|
@@ -129,37 +131,30 @@ module CityPayApiClient
|
|
129
131
|
# @param [Hash] attributes Model attributes in the form of hash
|
130
132
|
# @return [Object] Returns the model itself
|
131
133
|
def self.build_from_hash(attributes)
|
132
|
-
new.build_from_hash(attributes)
|
133
|
-
end
|
134
|
-
|
135
|
-
# Builds the object from hash
|
136
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
-
# @return [Object] Returns the model itself
|
138
|
-
def build_from_hash(attributes)
|
139
134
|
return nil unless attributes.is_a?(Hash)
|
140
135
|
attributes = attributes.transform_keys(&:to_sym)
|
141
|
-
|
142
|
-
|
143
|
-
|
136
|
+
transformed_hash = {}
|
137
|
+
openapi_types.each_pair do |key, type|
|
138
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
139
|
+
transformed_hash["#{key}"] = nil
|
144
140
|
elsif type =~ /\AArray<(.*)>/i
|
145
141
|
# check to ensure the input is an array given that the attribute
|
146
142
|
# is documented as an array but the input is not
|
147
|
-
if attributes[
|
148
|
-
|
143
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
144
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
149
145
|
end
|
150
|
-
elsif !attributes[
|
151
|
-
|
146
|
+
elsif !attributes[attribute_map[key]].nil?
|
147
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
152
148
|
end
|
153
149
|
end
|
154
|
-
|
155
|
-
self
|
150
|
+
new(transformed_hash)
|
156
151
|
end
|
157
152
|
|
158
153
|
# Deserializes the data based on type
|
159
154
|
# @param string type Data type
|
160
155
|
# @param string value Value to be deserialized
|
161
156
|
# @return [Object] Deserialized data
|
162
|
-
def _deserialize(type, value)
|
157
|
+
def self._deserialize(type, value)
|
163
158
|
case type.to_sym
|
164
159
|
when :Time
|
165
160
|
Time.parse(value)
|
@@ -194,7 +189,7 @@ module CityPayApiClient
|
|
194
189
|
else # model
|
195
190
|
# models (e.g. Pet) or oneOf
|
196
191
|
klass = CityPayApiClient.const_get(type)
|
197
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
192
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
193
|
end
|
199
194
|
end
|
200
195
|
|