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
|
|
@@ -14,7 +14,7 @@ require 'time'
|
|
14
14
|
|
15
15
|
module CityPayApiClient
|
16
16
|
class PaylinkFieldGuardModel
|
17
|
-
# A type of HTML element that should be displayed such as text, password, url. Any HTML5 input type value may be supplied.
|
17
|
+
# A type of HTML element that should be displayed such as text, password, url. Any HTML5 input type value may be supplied. If a value of `date` is supplied the value format should be an ISO format YYYY-MM-DD format date i.e. 2024-03-01 If a value of `datetime-local` is supplied, the value format should be an ISO format YYYY-MM-DDTHH:mm i.e. 2024-06-01T19:30.
|
18
18
|
attr_accessor :field_type
|
19
19
|
|
20
20
|
# A label for the field guard to display on the authentication page.
|
@@ -119,6 +119,7 @@ module CityPayApiClient
|
|
119
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
120
120
|
# @return Array for valid properties with the reasons
|
121
121
|
def list_invalid_properties
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
122
123
|
invalid_properties = Array.new
|
123
124
|
invalid_properties
|
124
125
|
end
|
@@ -126,6 +127,7 @@ module CityPayApiClient
|
|
126
127
|
# Check to see if the all the properties in the model are valid
|
127
128
|
# @return true if the model is valid
|
128
129
|
def valid?
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
129
131
|
true
|
130
132
|
end
|
131
133
|
|
@@ -159,37 +161,30 @@ module CityPayApiClient
|
|
159
161
|
# @param [Hash] attributes Model attributes in the form of hash
|
160
162
|
# @return [Object] Returns the model itself
|
161
163
|
def self.build_from_hash(attributes)
|
162
|
-
new.build_from_hash(attributes)
|
163
|
-
end
|
164
|
-
|
165
|
-
# Builds the object from hash
|
166
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
167
|
-
# @return [Object] Returns the model itself
|
168
|
-
def build_from_hash(attributes)
|
169
164
|
return nil unless attributes.is_a?(Hash)
|
170
165
|
attributes = attributes.transform_keys(&:to_sym)
|
171
|
-
|
172
|
-
|
173
|
-
|
166
|
+
transformed_hash = {}
|
167
|
+
openapi_types.each_pair do |key, type|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
169
|
+
transformed_hash["#{key}"] = nil
|
174
170
|
elsif type =~ /\AArray<(.*)>/i
|
175
171
|
# check to ensure the input is an array given that the attribute
|
176
172
|
# is documented as an array but the input is not
|
177
|
-
if attributes[
|
178
|
-
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
179
175
|
end
|
180
|
-
elsif !attributes[
|
181
|
-
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
182
178
|
end
|
183
179
|
end
|
184
|
-
|
185
|
-
self
|
180
|
+
new(transformed_hash)
|
186
181
|
end
|
187
182
|
|
188
183
|
# Deserializes the data based on type
|
189
184
|
# @param string type Data type
|
190
185
|
# @param string value Value to be deserialized
|
191
186
|
# @return [Object] Deserialized data
|
192
|
-
def _deserialize(type, value)
|
187
|
+
def self._deserialize(type, value)
|
193
188
|
case type.to_sym
|
194
189
|
when :Time
|
195
190
|
Time.parse(value)
|
@@ -224,7 +219,7 @@ module CityPayApiClient
|
|
224
219
|
else # model
|
225
220
|
# models (e.g. Pet) or oneOf
|
226
221
|
klass = CityPayApiClient.const_get(type)
|
227
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
222
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
228
223
|
end
|
229
224
|
end
|
230
225
|
|
@@ -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
|
|
@@ -110,6 +110,7 @@ module CityPayApiClient
|
|
110
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
111
111
|
# @return Array for valid properties with the reasons
|
112
112
|
def list_invalid_properties
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
113
114
|
invalid_properties = Array.new
|
114
115
|
invalid_properties
|
115
116
|
end
|
@@ -117,6 +118,7 @@ module CityPayApiClient
|
|
117
118
|
# Check to see if the all the properties in the model are valid
|
118
119
|
# @return true if the model is valid
|
119
120
|
def valid?
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
120
122
|
true
|
121
123
|
end
|
122
124
|
|
@@ -149,37 +151,30 @@ module CityPayApiClient
|
|
149
151
|
# @param [Hash] attributes Model attributes in the form of hash
|
150
152
|
# @return [Object] Returns the model itself
|
151
153
|
def self.build_from_hash(attributes)
|
152
|
-
new.build_from_hash(attributes)
|
153
|
-
end
|
154
|
-
|
155
|
-
# Builds the object from hash
|
156
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
157
|
-
# @return [Object] Returns the model itself
|
158
|
-
def build_from_hash(attributes)
|
159
154
|
return nil unless attributes.is_a?(Hash)
|
160
155
|
attributes = attributes.transform_keys(&:to_sym)
|
161
|
-
|
162
|
-
|
163
|
-
|
156
|
+
transformed_hash = {}
|
157
|
+
openapi_types.each_pair do |key, type|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = nil
|
164
160
|
elsif type =~ /\AArray<(.*)>/i
|
165
161
|
# check to ensure the input is an array given that the attribute
|
166
162
|
# is documented as an array but the input is not
|
167
|
-
if attributes[
|
168
|
-
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
169
165
|
end
|
170
|
-
elsif !attributes[
|
171
|
-
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
172
168
|
end
|
173
169
|
end
|
174
|
-
|
175
|
-
self
|
170
|
+
new(transformed_hash)
|
176
171
|
end
|
177
172
|
|
178
173
|
# Deserializes the data based on type
|
179
174
|
# @param string type Data type
|
180
175
|
# @param string value Value to be deserialized
|
181
176
|
# @return [Object] Deserialized data
|
182
|
-
def _deserialize(type, value)
|
177
|
+
def self._deserialize(type, value)
|
183
178
|
case type.to_sym
|
184
179
|
when :Time
|
185
180
|
Time.parse(value)
|
@@ -214,7 +209,7 @@ module CityPayApiClient
|
|
214
209
|
else # model
|
215
210
|
# models (e.g. Pet) or oneOf
|
216
211
|
klass = CityPayApiClient.const_get(type)
|
217
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
212
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
218
213
|
end
|
219
214
|
end
|
220
215
|
|
@@ -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
|
|
@@ -68,12 +68,15 @@ module CityPayApiClient
|
|
68
68
|
|
69
69
|
if attributes.key?(:'to')
|
70
70
|
self.to = attributes[:'to']
|
71
|
+
else
|
72
|
+
self.to = nil
|
71
73
|
end
|
72
74
|
end
|
73
75
|
|
74
76
|
# Show invalid properties with the reasons. Usually used together with valid?
|
75
77
|
# @return Array for valid properties with the reasons
|
76
78
|
def list_invalid_properties
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
77
80
|
invalid_properties = Array.new
|
78
81
|
if @to.nil?
|
79
82
|
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
@@ -85,6 +88,7 @@ module CityPayApiClient
|
|
85
88
|
# Check to see if the all the properties in the model are valid
|
86
89
|
# @return true if the model is valid
|
87
90
|
def valid?
|
91
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
88
92
|
return false if @to.nil?
|
89
93
|
true
|
90
94
|
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
|
|
@@ -83,6 +83,7 @@ module CityPayApiClient
|
|
83
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
84
|
# @return Array for valid properties with the reasons
|
85
85
|
def list_invalid_properties
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
86
87
|
invalid_properties = Array.new
|
87
88
|
invalid_properties
|
88
89
|
end
|
@@ -90,6 +91,7 @@ module CityPayApiClient
|
|
90
91
|
# Check to see if the all the properties in the model are valid
|
91
92
|
# @return true if the model is valid
|
92
93
|
def valid?
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
93
95
|
true
|
94
96
|
end
|
95
97
|
|
@@ -119,37 +121,30 @@ module CityPayApiClient
|
|
119
121
|
# @param [Hash] attributes Model attributes in the form of hash
|
120
122
|
# @return [Object] Returns the model itself
|
121
123
|
def self.build_from_hash(attributes)
|
122
|
-
new.build_from_hash(attributes)
|
123
|
-
end
|
124
|
-
|
125
|
-
# Builds the object from hash
|
126
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
-
# @return [Object] Returns the model itself
|
128
|
-
def build_from_hash(attributes)
|
129
124
|
return nil unless attributes.is_a?(Hash)
|
130
125
|
attributes = attributes.transform_keys(&:to_sym)
|
131
|
-
|
132
|
-
|
133
|
-
|
126
|
+
transformed_hash = {}
|
127
|
+
openapi_types.each_pair do |key, type|
|
128
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
129
|
+
transformed_hash["#{key}"] = nil
|
134
130
|
elsif type =~ /\AArray<(.*)>/i
|
135
131
|
# check to ensure the input is an array given that the attribute
|
136
132
|
# is documented as an array but the input is not
|
137
|
-
if attributes[
|
138
|
-
|
133
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
134
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
139
135
|
end
|
140
|
-
elsif !attributes[
|
141
|
-
|
136
|
+
elsif !attributes[attribute_map[key]].nil?
|
137
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
142
138
|
end
|
143
139
|
end
|
144
|
-
|
145
|
-
self
|
140
|
+
new(transformed_hash)
|
146
141
|
end
|
147
142
|
|
148
143
|
# Deserializes the data based on type
|
149
144
|
# @param string type Data type
|
150
145
|
# @param string value Value to be deserialized
|
151
146
|
# @return [Object] Deserialized data
|
152
|
-
def _deserialize(type, value)
|
147
|
+
def self._deserialize(type, value)
|
153
148
|
case type.to_sym
|
154
149
|
when :Time
|
155
150
|
Time.parse(value)
|
@@ -184,7 +179,7 @@ module CityPayApiClient
|
|
184
179
|
else # model
|
185
180
|
# models (e.g. Pet) or oneOf
|
186
181
|
klass = CityPayApiClient.const_get(type)
|
187
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
182
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
183
|
end
|
189
184
|
end
|
190
185
|
|
@@ -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
|
|
@@ -140,6 +140,8 @@ module CityPayApiClient
|
|
140
140
|
|
141
141
|
if attributes.key?(:'id')
|
142
142
|
self.id = attributes[:'id']
|
143
|
+
else
|
144
|
+
self.id = nil
|
143
145
|
end
|
144
146
|
|
145
147
|
if attributes.key?(:'identifier')
|
@@ -156,6 +158,8 @@ module CityPayApiClient
|
|
156
158
|
|
157
159
|
if attributes.key?(:'result')
|
158
160
|
self.result = attributes[:'result']
|
161
|
+
else
|
162
|
+
self.result = nil
|
159
163
|
end
|
160
164
|
|
161
165
|
if attributes.key?(:'server_version')
|
@@ -168,6 +172,8 @@ module CityPayApiClient
|
|
168
172
|
|
169
173
|
if attributes.key?(:'token')
|
170
174
|
self.token = attributes[:'token']
|
175
|
+
else
|
176
|
+
self.token = nil
|
171
177
|
end
|
172
178
|
|
173
179
|
if attributes.key?(:'url')
|
@@ -182,6 +188,7 @@ module CityPayApiClient
|
|
182
188
|
# Show invalid properties with the reasons. Usually used together with valid?
|
183
189
|
# @return Array for valid properties with the reasons
|
184
190
|
def list_invalid_properties
|
191
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
185
192
|
invalid_properties = Array.new
|
186
193
|
if @id.nil?
|
187
194
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
@@ -201,6 +208,7 @@ module CityPayApiClient
|
|
201
208
|
# Check to see if the all the properties in the model are valid
|
202
209
|
# @return true if the model is valid
|
203
210
|
def valid?
|
211
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
204
212
|
return false if @id.nil?
|
205
213
|
return false if @result.nil?
|
206
214
|
return false if @token.nil?
|
@@ -244,37 +252,30 @@ module CityPayApiClient
|
|
244
252
|
# @param [Hash] attributes Model attributes in the form of hash
|
245
253
|
# @return [Object] Returns the model itself
|
246
254
|
def self.build_from_hash(attributes)
|
247
|
-
new.build_from_hash(attributes)
|
248
|
-
end
|
249
|
-
|
250
|
-
# Builds the object from hash
|
251
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
252
|
-
# @return [Object] Returns the model itself
|
253
|
-
def build_from_hash(attributes)
|
254
255
|
return nil unless attributes.is_a?(Hash)
|
255
256
|
attributes = attributes.transform_keys(&:to_sym)
|
256
|
-
|
257
|
-
|
258
|
-
|
257
|
+
transformed_hash = {}
|
258
|
+
openapi_types.each_pair do |key, type|
|
259
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
260
|
+
transformed_hash["#{key}"] = nil
|
259
261
|
elsif type =~ /\AArray<(.*)>/i
|
260
262
|
# check to ensure the input is an array given that the attribute
|
261
263
|
# is documented as an array but the input is not
|
262
|
-
if attributes[
|
263
|
-
|
264
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
265
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
264
266
|
end
|
265
|
-
elsif !attributes[
|
266
|
-
|
267
|
+
elsif !attributes[attribute_map[key]].nil?
|
268
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
267
269
|
end
|
268
270
|
end
|
269
|
-
|
270
|
-
self
|
271
|
+
new(transformed_hash)
|
271
272
|
end
|
272
273
|
|
273
274
|
# Deserializes the data based on type
|
274
275
|
# @param string type Data type
|
275
276
|
# @param string value Value to be deserialized
|
276
277
|
# @return [Object] Deserialized data
|
277
|
-
def _deserialize(type, value)
|
278
|
+
def self._deserialize(type, value)
|
278
279
|
case type.to_sym
|
279
280
|
when :Time
|
280
281
|
Time.parse(value)
|
@@ -309,7 +310,7 @@ module CityPayApiClient
|
|
309
310
|
else # model
|
310
311
|
# models (e.g. Pet) or oneOf
|
311
312
|
klass = CityPayApiClient.const_get(type)
|
312
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
313
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
313
314
|
end
|
314
315
|
end
|
315
316
|
|