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,7 @@ module CityPayApiClient
|
|
84
84
|
# Show invalid properties with the reasons. Usually used together with valid?
|
85
85
|
# @return Array for valid properties with the reasons
|
86
86
|
def list_invalid_properties
|
87
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
87
88
|
invalid_properties = Array.new
|
88
89
|
if !@clientid.nil? && @clientid.to_s.length > 10
|
89
90
|
invalid_properties.push('invalid value for "clientid", the character length must be smaller than or equal to 10.')
|
@@ -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
|
return false if !@clientid.nil? && @clientid.to_s.length > 10
|
103
105
|
return false if !@clientid.nil? && @clientid.to_s.length < 3
|
104
106
|
true
|
@@ -107,11 +109,15 @@ module CityPayApiClient
|
|
107
109
|
# Custom attribute writer method with validation
|
108
110
|
# @param [Object] clientid Value to be assigned
|
109
111
|
def clientid=(clientid)
|
110
|
-
if
|
112
|
+
if clientid.nil?
|
113
|
+
fail ArgumentError, 'clientid cannot be nil'
|
114
|
+
end
|
115
|
+
|
116
|
+
if clientid.to_s.length > 10
|
111
117
|
fail ArgumentError, 'invalid value for "clientid", the character length must be smaller than or equal to 10.'
|
112
118
|
end
|
113
119
|
|
114
|
-
if
|
120
|
+
if clientid.to_s.length < 3
|
115
121
|
fail ArgumentError, 'invalid value for "clientid", the character length must be great than or equal to 3.'
|
116
122
|
end
|
117
123
|
|
@@ -144,37 +150,30 @@ module CityPayApiClient
|
|
144
150
|
# @param [Hash] attributes Model attributes in the form of hash
|
145
151
|
# @return [Object] Returns the model itself
|
146
152
|
def self.build_from_hash(attributes)
|
147
|
-
new.build_from_hash(attributes)
|
148
|
-
end
|
149
|
-
|
150
|
-
# Builds the object from hash
|
151
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
152
|
-
# @return [Object] Returns the model itself
|
153
|
-
def build_from_hash(attributes)
|
154
153
|
return nil unless attributes.is_a?(Hash)
|
155
154
|
attributes = attributes.transform_keys(&:to_sym)
|
156
|
-
|
157
|
-
|
158
|
-
|
155
|
+
transformed_hash = {}
|
156
|
+
openapi_types.each_pair do |key, type|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
158
|
+
transformed_hash["#{key}"] = nil
|
159
159
|
elsif type =~ /\AArray<(.*)>/i
|
160
160
|
# check to ensure the input is an array given that the attribute
|
161
161
|
# is documented as an array but the input is not
|
162
|
-
if attributes[
|
163
|
-
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
164
164
|
end
|
165
|
-
elsif !attributes[
|
166
|
-
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
167
167
|
end
|
168
168
|
end
|
169
|
-
|
170
|
-
self
|
169
|
+
new(transformed_hash)
|
171
170
|
end
|
172
171
|
|
173
172
|
# Deserializes the data based on type
|
174
173
|
# @param string type Data type
|
175
174
|
# @param string value Value to be deserialized
|
176
175
|
# @return [Object] Deserialized data
|
177
|
-
def _deserialize(type, value)
|
176
|
+
def self._deserialize(type, value)
|
178
177
|
case type.to_sym
|
179
178
|
when :Time
|
180
179
|
Time.parse(value)
|
@@ -209,7 +208,7 @@ module CityPayApiClient
|
|
209
208
|
else # model
|
210
209
|
# models (e.g. Pet) or oneOf
|
211
210
|
klass = CityPayApiClient.const_get(type)
|
212
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
211
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
213
212
|
end
|
214
213
|
end
|
215
214
|
|
@@ -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
|
|
@@ -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
|
|
@@ -64,16 +64,21 @@ module CityPayApiClient
|
|
64
64
|
|
65
65
|
if attributes.key?(:'md')
|
66
66
|
self.md = attributes[:'md']
|
67
|
+
else
|
68
|
+
self.md = nil
|
67
69
|
end
|
68
70
|
|
69
71
|
if attributes.key?(:'pares')
|
70
72
|
self.pares = attributes[:'pares']
|
73
|
+
else
|
74
|
+
self.pares = nil
|
71
75
|
end
|
72
76
|
end
|
73
77
|
|
74
78
|
# Show invalid properties with the reasons. Usually used together with valid?
|
75
79
|
# @return Array for valid properties with the reasons
|
76
80
|
def list_invalid_properties
|
81
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
77
82
|
invalid_properties = Array.new
|
78
83
|
if @md.nil?
|
79
84
|
invalid_properties.push('invalid value for "md", md cannot be nil.')
|
@@ -89,6 +94,7 @@ module CityPayApiClient
|
|
89
94
|
# Check to see if the all the properties in the model are valid
|
90
95
|
# @return true if the model is valid
|
91
96
|
def valid?
|
97
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
92
98
|
return false if @md.nil?
|
93
99
|
return false if @pares.nil?
|
94
100
|
true
|
@@ -119,37 +125,30 @@ module CityPayApiClient
|
|
119
125
|
# @param [Hash] attributes Model attributes in the form of hash
|
120
126
|
# @return [Object] Returns the model itself
|
121
127
|
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
128
|
return nil unless attributes.is_a?(Hash)
|
130
129
|
attributes = attributes.transform_keys(&:to_sym)
|
131
|
-
|
132
|
-
|
133
|
-
|
130
|
+
transformed_hash = {}
|
131
|
+
openapi_types.each_pair do |key, type|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = nil
|
134
134
|
elsif type =~ /\AArray<(.*)>/i
|
135
135
|
# check to ensure the input is an array given that the attribute
|
136
136
|
# is documented as an array but the input is not
|
137
|
-
if attributes[
|
138
|
-
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
139
139
|
end
|
140
|
-
elsif !attributes[
|
141
|
-
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
142
142
|
end
|
143
143
|
end
|
144
|
-
|
145
|
-
self
|
144
|
+
new(transformed_hash)
|
146
145
|
end
|
147
146
|
|
148
147
|
# Deserializes the data based on type
|
149
148
|
# @param string type Data type
|
150
149
|
# @param string value Value to be deserialized
|
151
150
|
# @return [Object] Deserialized data
|
152
|
-
def _deserialize(type, value)
|
151
|
+
def self._deserialize(type, value)
|
153
152
|
case type.to_sym
|
154
153
|
when :Time
|
155
154
|
Time.parse(value)
|
@@ -184,7 +183,7 @@ module CityPayApiClient
|
|
184
183
|
else # model
|
185
184
|
# models (e.g. Pet) or oneOf
|
186
185
|
klass = CityPayApiClient.const_get(type)
|
187
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
187
|
end
|
189
188
|
end
|
190
189
|
|
@@ -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
|
|
@@ -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
|
if !@address1.nil? && @address1.to_s.length > 50
|
124
125
|
invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 50.')
|
@@ -162,6 +163,7 @@ module CityPayApiClient
|
|
162
163
|
# Check to see if the all the properties in the model are valid
|
163
164
|
# @return true if the model is valid
|
164
165
|
def valid?
|
166
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
165
167
|
return false if !@address1.nil? && @address1.to_s.length > 50
|
166
168
|
return false if !@address2.nil? && @address2.to_s.length > 50
|
167
169
|
return false if !@address3.nil? && @address3.to_s.length > 50
|
@@ -177,7 +179,11 @@ module CityPayApiClient
|
|
177
179
|
# Custom attribute writer method with validation
|
178
180
|
# @param [Object] address1 Value to be assigned
|
179
181
|
def address1=(address1)
|
180
|
-
if
|
182
|
+
if address1.nil?
|
183
|
+
fail ArgumentError, 'address1 cannot be nil'
|
184
|
+
end
|
185
|
+
|
186
|
+
if address1.to_s.length > 50
|
181
187
|
fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 50.'
|
182
188
|
end
|
183
189
|
|
@@ -187,7 +193,11 @@ module CityPayApiClient
|
|
187
193
|
# Custom attribute writer method with validation
|
188
194
|
# @param [Object] address2 Value to be assigned
|
189
195
|
def address2=(address2)
|
190
|
-
if
|
196
|
+
if address2.nil?
|
197
|
+
fail ArgumentError, 'address2 cannot be nil'
|
198
|
+
end
|
199
|
+
|
200
|
+
if address2.to_s.length > 50
|
191
201
|
fail ArgumentError, 'invalid value for "address2", the character length must be smaller than or equal to 50.'
|
192
202
|
end
|
193
203
|
|
@@ -197,7 +207,11 @@ module CityPayApiClient
|
|
197
207
|
# Custom attribute writer method with validation
|
198
208
|
# @param [Object] address3 Value to be assigned
|
199
209
|
def address3=(address3)
|
200
|
-
if
|
210
|
+
if address3.nil?
|
211
|
+
fail ArgumentError, 'address3 cannot be nil'
|
212
|
+
end
|
213
|
+
|
214
|
+
if address3.to_s.length > 50
|
201
215
|
fail ArgumentError, 'invalid value for "address3", the character length must be smaller than or equal to 50.'
|
202
216
|
end
|
203
217
|
|
@@ -207,7 +221,11 @@ module CityPayApiClient
|
|
207
221
|
# Custom attribute writer method with validation
|
208
222
|
# @param [Object] area Value to be assigned
|
209
223
|
def area=(area)
|
210
|
-
if
|
224
|
+
if area.nil?
|
225
|
+
fail ArgumentError, 'area cannot be nil'
|
226
|
+
end
|
227
|
+
|
228
|
+
if area.to_s.length > 50
|
211
229
|
fail ArgumentError, 'invalid value for "area", the character length must be smaller than or equal to 50.'
|
212
230
|
end
|
213
231
|
|
@@ -217,11 +235,15 @@ module CityPayApiClient
|
|
217
235
|
# Custom attribute writer method with validation
|
218
236
|
# @param [Object] country Value to be assigned
|
219
237
|
def country=(country)
|
220
|
-
if
|
238
|
+
if country.nil?
|
239
|
+
fail ArgumentError, 'country cannot be nil'
|
240
|
+
end
|
241
|
+
|
242
|
+
if country.to_s.length > 2
|
221
243
|
fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.'
|
222
244
|
end
|
223
245
|
|
224
|
-
if
|
246
|
+
if country.to_s.length < 2
|
225
247
|
fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.'
|
226
248
|
end
|
227
249
|
|
@@ -231,11 +253,15 @@ module CityPayApiClient
|
|
231
253
|
# Custom attribute writer method with validation
|
232
254
|
# @param [Object] label Value to be assigned
|
233
255
|
def label=(label)
|
234
|
-
if
|
256
|
+
if label.nil?
|
257
|
+
fail ArgumentError, 'label cannot be nil'
|
258
|
+
end
|
259
|
+
|
260
|
+
if label.to_s.length > 20
|
235
261
|
fail ArgumentError, 'invalid value for "label", the character length must be smaller than or equal to 20.'
|
236
262
|
end
|
237
263
|
|
238
|
-
if
|
264
|
+
if label.to_s.length < 2
|
239
265
|
fail ArgumentError, 'invalid value for "label", the character length must be great than or equal to 2.'
|
240
266
|
end
|
241
267
|
|
@@ -245,7 +271,11 @@ module CityPayApiClient
|
|
245
271
|
# Custom attribute writer method with validation
|
246
272
|
# @param [Object] postcode Value to be assigned
|
247
273
|
def postcode=(postcode)
|
248
|
-
if
|
274
|
+
if postcode.nil?
|
275
|
+
fail ArgumentError, 'postcode cannot be nil'
|
276
|
+
end
|
277
|
+
|
278
|
+
if postcode.to_s.length > 16
|
249
279
|
fail ArgumentError, 'invalid value for "postcode", the character length must be smaller than or equal to 16.'
|
250
280
|
end
|
251
281
|
|
@@ -282,37 +312,30 @@ module CityPayApiClient
|
|
282
312
|
# @param [Hash] attributes Model attributes in the form of hash
|
283
313
|
# @return [Object] Returns the model itself
|
284
314
|
def self.build_from_hash(attributes)
|
285
|
-
new.build_from_hash(attributes)
|
286
|
-
end
|
287
|
-
|
288
|
-
# Builds the object from hash
|
289
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
290
|
-
# @return [Object] Returns the model itself
|
291
|
-
def build_from_hash(attributes)
|
292
315
|
return nil unless attributes.is_a?(Hash)
|
293
316
|
attributes = attributes.transform_keys(&:to_sym)
|
294
|
-
|
295
|
-
|
296
|
-
|
317
|
+
transformed_hash = {}
|
318
|
+
openapi_types.each_pair do |key, type|
|
319
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
320
|
+
transformed_hash["#{key}"] = nil
|
297
321
|
elsif type =~ /\AArray<(.*)>/i
|
298
322
|
# check to ensure the input is an array given that the attribute
|
299
323
|
# is documented as an array but the input is not
|
300
|
-
if attributes[
|
301
|
-
|
324
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
325
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
302
326
|
end
|
303
|
-
elsif !attributes[
|
304
|
-
|
327
|
+
elsif !attributes[attribute_map[key]].nil?
|
328
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
305
329
|
end
|
306
330
|
end
|
307
|
-
|
308
|
-
self
|
331
|
+
new(transformed_hash)
|
309
332
|
end
|
310
333
|
|
311
334
|
# Deserializes the data based on type
|
312
335
|
# @param string type Data type
|
313
336
|
# @param string value Value to be deserialized
|
314
337
|
# @return [Object] Deserialized data
|
315
|
-
def _deserialize(type, value)
|
338
|
+
def self._deserialize(type, value)
|
316
339
|
case type.to_sym
|
317
340
|
when :Time
|
318
341
|
Time.parse(value)
|
@@ -347,7 +370,7 @@ module CityPayApiClient
|
|
347
370
|
else # model
|
348
371
|
# models (e.g. Pet) or oneOf
|
349
372
|
klass = CityPayApiClient.const_get(type)
|
350
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
373
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
351
374
|
end
|
352
375
|
end
|
353
376
|
|