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
|
|
@@ -84,6 +84,8 @@ module CityPayApiClient
|
|
84
84
|
if (value = attributes[:'domain']).is_a?(Array)
|
85
85
|
self.domain = value
|
86
86
|
end
|
87
|
+
else
|
88
|
+
self.domain = nil
|
87
89
|
end
|
88
90
|
|
89
91
|
if attributes.key?(:'domain_key')
|
@@ -96,12 +98,15 @@ module CityPayApiClient
|
|
96
98
|
|
97
99
|
if attributes.key?(:'merchantid')
|
98
100
|
self.merchantid = attributes[:'merchantid']
|
101
|
+
else
|
102
|
+
self.merchantid = nil
|
99
103
|
end
|
100
104
|
end
|
101
105
|
|
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 @domain.nil?
|
107
112
|
invalid_properties.push('invalid value for "domain", domain cannot be nil.')
|
@@ -125,6 +130,7 @@ module CityPayApiClient
|
|
125
130
|
# Check to see if the all the properties in the model are valid
|
126
131
|
# @return true if the model is valid
|
127
132
|
def valid?
|
133
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
128
134
|
return false if @domain.nil?
|
129
135
|
return false if !@domain_key.nil? && @domain_key.to_s.length > 512
|
130
136
|
return false if !@domain_key.nil? && @domain_key.to_s.length < 64
|
@@ -135,11 +141,15 @@ module CityPayApiClient
|
|
135
141
|
# Custom attribute writer method with validation
|
136
142
|
# @param [Object] domain_key Value to be assigned
|
137
143
|
def domain_key=(domain_key)
|
138
|
-
if
|
144
|
+
if domain_key.nil?
|
145
|
+
fail ArgumentError, 'domain_key cannot be nil'
|
146
|
+
end
|
147
|
+
|
148
|
+
if domain_key.to_s.length > 512
|
139
149
|
fail ArgumentError, 'invalid value for "domain_key", the character length must be smaller than or equal to 512.'
|
140
150
|
end
|
141
151
|
|
142
|
-
if
|
152
|
+
if domain_key.to_s.length < 64
|
143
153
|
fail ArgumentError, 'invalid value for "domain_key", the character length must be great than or equal to 64.'
|
144
154
|
end
|
145
155
|
|
@@ -174,37 +184,30 @@ module CityPayApiClient
|
|
174
184
|
# @param [Hash] attributes Model attributes in the form of hash
|
175
185
|
# @return [Object] Returns the model itself
|
176
186
|
def self.build_from_hash(attributes)
|
177
|
-
new.build_from_hash(attributes)
|
178
|
-
end
|
179
|
-
|
180
|
-
# Builds the object from hash
|
181
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
182
|
-
# @return [Object] Returns the model itself
|
183
|
-
def build_from_hash(attributes)
|
184
187
|
return nil unless attributes.is_a?(Hash)
|
185
188
|
attributes = attributes.transform_keys(&:to_sym)
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
+
transformed_hash = {}
|
190
|
+
openapi_types.each_pair do |key, type|
|
191
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
192
|
+
transformed_hash["#{key}"] = nil
|
189
193
|
elsif type =~ /\AArray<(.*)>/i
|
190
194
|
# check to ensure the input is an array given that the attribute
|
191
195
|
# is documented as an array but the input is not
|
192
|
-
if attributes[
|
193
|
-
|
196
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
197
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
194
198
|
end
|
195
|
-
elsif !attributes[
|
196
|
-
|
199
|
+
elsif !attributes[attribute_map[key]].nil?
|
200
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
197
201
|
end
|
198
202
|
end
|
199
|
-
|
200
|
-
self
|
203
|
+
new(transformed_hash)
|
201
204
|
end
|
202
205
|
|
203
206
|
# Deserializes the data based on type
|
204
207
|
# @param string type Data type
|
205
208
|
# @param string value Value to be deserialized
|
206
209
|
# @return [Object] Deserialized data
|
207
|
-
def _deserialize(type, value)
|
210
|
+
def self._deserialize(type, value)
|
208
211
|
case type.to_sym
|
209
212
|
when :Time
|
210
213
|
Time.parse(value)
|
@@ -239,7 +242,7 @@ module CityPayApiClient
|
|
239
242
|
else # model
|
240
243
|
# models (e.g. Pet) or oneOf
|
241
244
|
klass = CityPayApiClient.const_get(type)
|
242
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
245
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
243
246
|
end
|
244
247
|
end
|
245
248
|
|
@@ -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
|
|
@@ -101,6 +101,7 @@ module CityPayApiClient
|
|
101
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
102
102
|
# @return Array for valid properties with the reasons
|
103
103
|
def list_invalid_properties
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
104
105
|
invalid_properties = Array.new
|
105
106
|
if !@code.nil? && @code.to_s.length > 4
|
106
107
|
invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 4.')
|
@@ -124,6 +125,7 @@ module CityPayApiClient
|
|
124
125
|
# Check to see if the all the properties in the model are valid
|
125
126
|
# @return true if the model is valid
|
126
127
|
def valid?
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
127
129
|
return false if !@code.nil? && @code.to_s.length > 4
|
128
130
|
return false if !@code.nil? && @code.to_s.length < 3
|
129
131
|
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
@@ -134,11 +136,15 @@ module CityPayApiClient
|
|
134
136
|
# Custom attribute writer method with validation
|
135
137
|
# @param [Object] code Value to be assigned
|
136
138
|
def code=(code)
|
137
|
-
if
|
139
|
+
if code.nil?
|
140
|
+
fail ArgumentError, 'code cannot be nil'
|
141
|
+
end
|
142
|
+
|
143
|
+
if code.to_s.length > 4
|
138
144
|
fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 4.'
|
139
145
|
end
|
140
146
|
|
141
|
-
if
|
147
|
+
if code.to_s.length < 3
|
142
148
|
fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 3.'
|
143
149
|
end
|
144
150
|
|
@@ -148,11 +154,15 @@ module CityPayApiClient
|
|
148
154
|
# Custom attribute writer method with validation
|
149
155
|
# @param [Object] identifier Value to be assigned
|
150
156
|
def identifier=(identifier)
|
151
|
-
if
|
157
|
+
if identifier.nil?
|
158
|
+
fail ArgumentError, 'identifier cannot be nil'
|
159
|
+
end
|
160
|
+
|
161
|
+
if identifier.to_s.length > 50
|
152
162
|
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
153
163
|
end
|
154
164
|
|
155
|
-
if
|
165
|
+
if identifier.to_s.length < 4
|
156
166
|
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
157
167
|
end
|
158
168
|
|
@@ -187,37 +197,30 @@ module CityPayApiClient
|
|
187
197
|
# @param [Hash] attributes Model attributes in the form of hash
|
188
198
|
# @return [Object] Returns the model itself
|
189
199
|
def self.build_from_hash(attributes)
|
190
|
-
new.build_from_hash(attributes)
|
191
|
-
end
|
192
|
-
|
193
|
-
# Builds the object from hash
|
194
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
195
|
-
# @return [Object] Returns the model itself
|
196
|
-
def build_from_hash(attributes)
|
197
200
|
return nil unless attributes.is_a?(Hash)
|
198
201
|
attributes = attributes.transform_keys(&:to_sym)
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
+
transformed_hash = {}
|
203
|
+
openapi_types.each_pair do |key, type|
|
204
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
205
|
+
transformed_hash["#{key}"] = nil
|
202
206
|
elsif type =~ /\AArray<(.*)>/i
|
203
207
|
# check to ensure the input is an array given that the attribute
|
204
208
|
# is documented as an array but the input is not
|
205
|
-
if attributes[
|
206
|
-
|
209
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
210
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
207
211
|
end
|
208
|
-
elsif !attributes[
|
209
|
-
|
212
|
+
elsif !attributes[attribute_map[key]].nil?
|
213
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
210
214
|
end
|
211
215
|
end
|
212
|
-
|
213
|
-
self
|
216
|
+
new(transformed_hash)
|
214
217
|
end
|
215
218
|
|
216
219
|
# Deserializes the data based on type
|
217
220
|
# @param string type Data type
|
218
221
|
# @param string value Value to be deserialized
|
219
222
|
# @return [Object] Deserialized data
|
220
|
-
def _deserialize(type, value)
|
223
|
+
def self._deserialize(type, value)
|
221
224
|
case type.to_sym
|
222
225
|
when :Time
|
223
226
|
Time.parse(value)
|
@@ -252,7 +255,7 @@ module CityPayApiClient
|
|
252
255
|
else # model
|
253
256
|
# models (e.g. Pet) or oneOf
|
254
257
|
klass = CityPayApiClient.const_get(type)
|
255
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
258
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
256
259
|
end
|
257
260
|
end
|
258
261
|
|
@@ -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
|
|
@@ -101,6 +101,7 @@ module CityPayApiClient
|
|
101
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
102
102
|
# @return Array for valid properties with the reasons
|
103
103
|
def list_invalid_properties
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
104
105
|
invalid_properties = Array.new
|
105
106
|
invalid_properties
|
106
107
|
end
|
@@ -108,6 +109,7 @@ module CityPayApiClient
|
|
108
109
|
# Check to see if the all the properties in the model are valid
|
109
110
|
# @return true if the model is valid
|
110
111
|
def valid?
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
111
113
|
true
|
112
114
|
end
|
113
115
|
|
@@ -139,37 +141,30 @@ module CityPayApiClient
|
|
139
141
|
# @param [Hash] attributes Model attributes in the form of hash
|
140
142
|
# @return [Object] Returns the model itself
|
141
143
|
def self.build_from_hash(attributes)
|
142
|
-
new.build_from_hash(attributes)
|
143
|
-
end
|
144
|
-
|
145
|
-
# Builds the object from hash
|
146
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
-
# @return [Object] Returns the model itself
|
148
|
-
def build_from_hash(attributes)
|
149
144
|
return nil unless attributes.is_a?(Hash)
|
150
145
|
attributes = attributes.transform_keys(&:to_sym)
|
151
|
-
|
152
|
-
|
153
|
-
|
146
|
+
transformed_hash = {}
|
147
|
+
openapi_types.each_pair do |key, type|
|
148
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
149
|
+
transformed_hash["#{key}"] = nil
|
154
150
|
elsif type =~ /\AArray<(.*)>/i
|
155
151
|
# check to ensure the input is an array given that the attribute
|
156
152
|
# is documented as an array but the input is not
|
157
|
-
if attributes[
|
158
|
-
|
153
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
154
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
159
155
|
end
|
160
|
-
elsif !attributes[
|
161
|
-
|
156
|
+
elsif !attributes[attribute_map[key]].nil?
|
157
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
162
158
|
end
|
163
159
|
end
|
164
|
-
|
165
|
-
self
|
160
|
+
new(transformed_hash)
|
166
161
|
end
|
167
162
|
|
168
163
|
# Deserializes the data based on type
|
169
164
|
# @param string type Data type
|
170
165
|
# @param string value Value to be deserialized
|
171
166
|
# @return [Object] Deserialized data
|
172
|
-
def _deserialize(type, value)
|
167
|
+
def self._deserialize(type, value)
|
173
168
|
case type.to_sym
|
174
169
|
when :Time
|
175
170
|
Time.parse(value)
|
@@ -204,7 +199,7 @@ module CityPayApiClient
|
|
204
199
|
else # model
|
205
200
|
# models (e.g. Pet) or oneOf
|
206
201
|
klass = CityPayApiClient.const_get(type)
|
207
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
203
|
end
|
209
204
|
end
|
210
205
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is
|
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
|
|
@@ -73,6 +73,8 @@ module CityPayApiClient
|
|
73
73
|
|
74
74
|
if attributes.key?(:'exists')
|
75
75
|
self.exists = attributes[:'exists']
|
76
|
+
else
|
77
|
+
self.exists = nil
|
76
78
|
end
|
77
79
|
|
78
80
|
if attributes.key?(:'last_modified')
|
@@ -83,6 +85,7 @@ module CityPayApiClient
|
|
83
85
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
86
|
# @return Array for valid properties with the reasons
|
85
87
|
def list_invalid_properties
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
86
89
|
invalid_properties = Array.new
|
87
90
|
if @exists.nil?
|
88
91
|
invalid_properties.push('invalid value for "exists", exists cannot be nil.')
|
@@ -94,6 +97,7 @@ module CityPayApiClient
|
|
94
97
|
# Check to see if the all the properties in the model are valid
|
95
98
|
# @return true if the model is valid
|
96
99
|
def valid?
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
97
101
|
return false if @exists.nil?
|
98
102
|
true
|
99
103
|
end
|
@@ -124,37 +128,30 @@ module CityPayApiClient
|
|
124
128
|
# @param [Hash] attributes Model attributes in the form of hash
|
125
129
|
# @return [Object] Returns the model itself
|
126
130
|
def self.build_from_hash(attributes)
|
127
|
-
new.build_from_hash(attributes)
|
128
|
-
end
|
129
|
-
|
130
|
-
# Builds the object from hash
|
131
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
-
# @return [Object] Returns the model itself
|
133
|
-
def build_from_hash(attributes)
|
134
131
|
return nil unless attributes.is_a?(Hash)
|
135
132
|
attributes = attributes.transform_keys(&:to_sym)
|
136
|
-
|
137
|
-
|
138
|
-
|
133
|
+
transformed_hash = {}
|
134
|
+
openapi_types.each_pair do |key, type|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = nil
|
139
137
|
elsif type =~ /\AArray<(.*)>/i
|
140
138
|
# check to ensure the input is an array given that the attribute
|
141
139
|
# is documented as an array but the input is not
|
142
|
-
if attributes[
|
143
|
-
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
144
142
|
end
|
145
|
-
elsif !attributes[
|
146
|
-
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
147
145
|
end
|
148
146
|
end
|
149
|
-
|
150
|
-
self
|
147
|
+
new(transformed_hash)
|
151
148
|
end
|
152
149
|
|
153
150
|
# Deserializes the data based on type
|
154
151
|
# @param string type Data type
|
155
152
|
# @param string value Value to be deserialized
|
156
153
|
# @return [Object] Deserialized data
|
157
|
-
def _deserialize(type, value)
|
154
|
+
def self._deserialize(type, value)
|
158
155
|
case type.to_sym
|
159
156
|
when :Time
|
160
157
|
Time.parse(value)
|
@@ -189,7 +186,7 @@ module CityPayApiClient
|
|
189
186
|
else # model
|
190
187
|
# models (e.g. Pet) or oneOf
|
191
188
|
klass = CityPayApiClient.const_get(type)
|
192
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
190
|
end
|
194
191
|
end
|
195
192
|
|
@@ -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
|
|
@@ -101,6 +101,7 @@ module CityPayApiClient
|
|
101
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
102
102
|
# @return Array for valid properties with the reasons
|
103
103
|
def list_invalid_properties
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
104
105
|
invalid_properties = Array.new
|
105
106
|
if !@authen_result.nil? && @authen_result.to_s.length > 1
|
106
107
|
invalid_properties.push('invalid value for "authen_result", the character length must be smaller than or equal to 1.')
|
@@ -124,6 +125,7 @@ module CityPayApiClient
|
|
124
125
|
# Check to see if the all the properties in the model are valid
|
125
126
|
# @return true if the model is valid
|
126
127
|
def valid?
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
127
129
|
return false if !@authen_result.nil? && @authen_result.to_s.length > 1
|
128
130
|
return false if !@cavv.nil? && @cavv.to_s.length > 20
|
129
131
|
return false if !@enrolled.nil? && @enrolled.to_s.length > 1
|
@@ -134,7 +136,11 @@ module CityPayApiClient
|
|
134
136
|
# Custom attribute writer method with validation
|
135
137
|
# @param [Object] authen_result Value to be assigned
|
136
138
|
def authen_result=(authen_result)
|
137
|
-
if
|
139
|
+
if authen_result.nil?
|
140
|
+
fail ArgumentError, 'authen_result cannot be nil'
|
141
|
+
end
|
142
|
+
|
143
|
+
if authen_result.to_s.length > 1
|
138
144
|
fail ArgumentError, 'invalid value for "authen_result", the character length must be smaller than or equal to 1.'
|
139
145
|
end
|
140
146
|
|
@@ -144,7 +150,11 @@ module CityPayApiClient
|
|
144
150
|
# Custom attribute writer method with validation
|
145
151
|
# @param [Object] cavv Value to be assigned
|
146
152
|
def cavv=(cavv)
|
147
|
-
if
|
153
|
+
if cavv.nil?
|
154
|
+
fail ArgumentError, 'cavv cannot be nil'
|
155
|
+
end
|
156
|
+
|
157
|
+
if cavv.to_s.length > 20
|
148
158
|
fail ArgumentError, 'invalid value for "cavv", the character length must be smaller than or equal to 20.'
|
149
159
|
end
|
150
160
|
|
@@ -154,13 +164,21 @@ module CityPayApiClient
|
|
154
164
|
# Custom attribute writer method with validation
|
155
165
|
# @param [Object] eci Value to be assigned
|
156
166
|
def eci=(eci)
|
167
|
+
if eci.nil?
|
168
|
+
fail ArgumentError, 'eci cannot be nil'
|
169
|
+
end
|
170
|
+
|
157
171
|
@eci = eci
|
158
172
|
end
|
159
173
|
|
160
174
|
# Custom attribute writer method with validation
|
161
175
|
# @param [Object] enrolled Value to be assigned
|
162
176
|
def enrolled=(enrolled)
|
163
|
-
if
|
177
|
+
if enrolled.nil?
|
178
|
+
fail ArgumentError, 'enrolled cannot be nil'
|
179
|
+
end
|
180
|
+
|
181
|
+
if enrolled.to_s.length > 1
|
164
182
|
fail ArgumentError, 'invalid value for "enrolled", the character length must be smaller than or equal to 1.'
|
165
183
|
end
|
166
184
|
|
@@ -170,7 +188,11 @@ module CityPayApiClient
|
|
170
188
|
# Custom attribute writer method with validation
|
171
189
|
# @param [Object] xid Value to be assigned
|
172
190
|
def xid=(xid)
|
173
|
-
if
|
191
|
+
if xid.nil?
|
192
|
+
fail ArgumentError, 'xid cannot be nil'
|
193
|
+
end
|
194
|
+
|
195
|
+
if xid.to_s.length > 20
|
174
196
|
fail ArgumentError, 'invalid value for "xid", the character length must be smaller than or equal to 20.'
|
175
197
|
end
|
176
198
|
|
@@ -205,37 +227,30 @@ module CityPayApiClient
|
|
205
227
|
# @param [Hash] attributes Model attributes in the form of hash
|
206
228
|
# @return [Object] Returns the model itself
|
207
229
|
def self.build_from_hash(attributes)
|
208
|
-
new.build_from_hash(attributes)
|
209
|
-
end
|
210
|
-
|
211
|
-
# Builds the object from hash
|
212
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
213
|
-
# @return [Object] Returns the model itself
|
214
|
-
def build_from_hash(attributes)
|
215
230
|
return nil unless attributes.is_a?(Hash)
|
216
231
|
attributes = attributes.transform_keys(&:to_sym)
|
217
|
-
|
218
|
-
|
219
|
-
|
232
|
+
transformed_hash = {}
|
233
|
+
openapi_types.each_pair do |key, type|
|
234
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
235
|
+
transformed_hash["#{key}"] = nil
|
220
236
|
elsif type =~ /\AArray<(.*)>/i
|
221
237
|
# check to ensure the input is an array given that the attribute
|
222
238
|
# is documented as an array but the input is not
|
223
|
-
if attributes[
|
224
|
-
|
239
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
240
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
225
241
|
end
|
226
|
-
elsif !attributes[
|
227
|
-
|
242
|
+
elsif !attributes[attribute_map[key]].nil?
|
243
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
228
244
|
end
|
229
245
|
end
|
230
|
-
|
231
|
-
self
|
246
|
+
new(transformed_hash)
|
232
247
|
end
|
233
248
|
|
234
249
|
# Deserializes the data based on type
|
235
250
|
# @param string type Data type
|
236
251
|
# @param string value Value to be deserialized
|
237
252
|
# @return [Object] Deserialized data
|
238
|
-
def _deserialize(type, value)
|
253
|
+
def self._deserialize(type, value)
|
239
254
|
case type.to_sym
|
240
255
|
when :Time
|
241
256
|
Time.parse(value)
|
@@ -270,7 +285,7 @@ module CityPayApiClient
|
|
270
285
|
else # model
|
271
286
|
# models (e.g. Pet) or oneOf
|
272
287
|
klass = CityPayApiClient.const_get(type)
|
273
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
288
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
274
289
|
end
|
275
290
|
end
|
276
291
|
|