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
|
|
@@ -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
|
if !@identifier.nil? && @identifier.to_s.length > 50
|
88
89
|
invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
|
@@ -98,6 +99,7 @@ module CityPayApiClient
|
|
98
99
|
# Check to see if the all the properties in the model are valid
|
99
100
|
# @return true if the model is valid
|
100
101
|
def valid?
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
101
103
|
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
102
104
|
return false if !@identifier.nil? && @identifier.to_s.length < 4
|
103
105
|
true
|
@@ -106,17 +108,25 @@ module CityPayApiClient
|
|
106
108
|
# Custom attribute writer method with validation
|
107
109
|
# @param [Object] amount Value to be assigned
|
108
110
|
def amount=(amount)
|
111
|
+
if amount.nil?
|
112
|
+
fail ArgumentError, 'amount cannot be nil'
|
113
|
+
end
|
114
|
+
|
109
115
|
@amount = amount
|
110
116
|
end
|
111
117
|
|
112
118
|
# Custom attribute writer method with validation
|
113
119
|
# @param [Object] identifier Value to be assigned
|
114
120
|
def identifier=(identifier)
|
115
|
-
if
|
121
|
+
if identifier.nil?
|
122
|
+
fail ArgumentError, 'identifier cannot be nil'
|
123
|
+
end
|
124
|
+
|
125
|
+
if identifier.to_s.length > 50
|
116
126
|
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
117
127
|
end
|
118
128
|
|
119
|
-
if
|
129
|
+
if identifier.to_s.length < 4
|
120
130
|
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
121
131
|
end
|
122
132
|
|
@@ -149,37 +159,30 @@ module CityPayApiClient
|
|
149
159
|
# @param [Hash] attributes Model attributes in the form of hash
|
150
160
|
# @return [Object] Returns the model itself
|
151
161
|
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
162
|
return nil unless attributes.is_a?(Hash)
|
160
163
|
attributes = attributes.transform_keys(&:to_sym)
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
+
transformed_hash = {}
|
165
|
+
openapi_types.each_pair do |key, type|
|
166
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
167
|
+
transformed_hash["#{key}"] = nil
|
164
168
|
elsif type =~ /\AArray<(.*)>/i
|
165
169
|
# check to ensure the input is an array given that the attribute
|
166
170
|
# is documented as an array but the input is not
|
167
|
-
if attributes[
|
168
|
-
|
171
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
172
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
169
173
|
end
|
170
|
-
elsif !attributes[
|
171
|
-
|
174
|
+
elsif !attributes[attribute_map[key]].nil?
|
175
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
172
176
|
end
|
173
177
|
end
|
174
|
-
|
175
|
-
self
|
178
|
+
new(transformed_hash)
|
176
179
|
end
|
177
180
|
|
178
181
|
# Deserializes the data based on type
|
179
182
|
# @param string type Data type
|
180
183
|
# @param string value Value to be deserialized
|
181
184
|
# @return [Object] Deserialized data
|
182
|
-
def _deserialize(type, value)
|
185
|
+
def self._deserialize(type, value)
|
183
186
|
case type.to_sym
|
184
187
|
when :Time
|
185
188
|
Time.parse(value)
|
@@ -214,7 +217,7 @@ module CityPayApiClient
|
|
214
217
|
else # model
|
215
218
|
# models (e.g. Pet) or oneOf
|
216
219
|
klass = CityPayApiClient.const_get(type)
|
217
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
220
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
218
221
|
end
|
219
222
|
end
|
220
223
|
|
@@ -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,10 +83,14 @@ module CityPayApiClient
|
|
83
83
|
|
84
84
|
if attributes.key?(:'filename')
|
85
85
|
self.filename = attributes[:'filename']
|
86
|
+
else
|
87
|
+
self.filename = nil
|
86
88
|
end
|
87
89
|
|
88
90
|
if attributes.key?(:'mime_type')
|
89
91
|
self.mime_type = attributes[:'mime_type']
|
92
|
+
else
|
93
|
+
self.mime_type = nil
|
90
94
|
end
|
91
95
|
|
92
96
|
if attributes.key?(:'name')
|
@@ -101,6 +105,7 @@ module CityPayApiClient
|
|
101
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
102
106
|
# @return Array for valid properties with the reasons
|
103
107
|
def list_invalid_properties
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
104
109
|
invalid_properties = Array.new
|
105
110
|
if @filename.nil?
|
106
111
|
invalid_properties.push('invalid value for "filename", filename cannot be nil.')
|
@@ -116,6 +121,7 @@ module CityPayApiClient
|
|
116
121
|
# Check to see if the all the properties in the model are valid
|
117
122
|
# @return true if the model is valid
|
118
123
|
def valid?
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
119
125
|
return false if @filename.nil?
|
120
126
|
return false if @mime_type.nil?
|
121
127
|
true
|
@@ -149,37 +155,30 @@ module CityPayApiClient
|
|
149
155
|
# @param [Hash] attributes Model attributes in the form of hash
|
150
156
|
# @return [Object] Returns the model itself
|
151
157
|
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
158
|
return nil unless attributes.is_a?(Hash)
|
160
159
|
attributes = attributes.transform_keys(&:to_sym)
|
161
|
-
|
162
|
-
|
163
|
-
|
160
|
+
transformed_hash = {}
|
161
|
+
openapi_types.each_pair do |key, type|
|
162
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
163
|
+
transformed_hash["#{key}"] = nil
|
164
164
|
elsif type =~ /\AArray<(.*)>/i
|
165
165
|
# check to ensure the input is an array given that the attribute
|
166
166
|
# is documented as an array but the input is not
|
167
|
-
if attributes[
|
168
|
-
|
167
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
168
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
169
169
|
end
|
170
|
-
elsif !attributes[
|
171
|
-
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
172
172
|
end
|
173
173
|
end
|
174
|
-
|
175
|
-
self
|
174
|
+
new(transformed_hash)
|
176
175
|
end
|
177
176
|
|
178
177
|
# Deserializes the data based on type
|
179
178
|
# @param string type Data type
|
180
179
|
# @param string value Value to be deserialized
|
181
180
|
# @return [Object] Deserialized data
|
182
|
-
def _deserialize(type, value)
|
181
|
+
def self._deserialize(type, value)
|
183
182
|
case type.to_sym
|
184
183
|
when :Time
|
185
184
|
Time.parse(value)
|
@@ -214,7 +213,7 @@ module CityPayApiClient
|
|
214
213
|
else # model
|
215
214
|
# models (e.g. Pet) or oneOf
|
216
215
|
klass = CityPayApiClient.const_get(type)
|
217
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
216
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
218
217
|
end
|
219
218
|
end
|
220
219
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is
|
4
|
+
# This CityPay API is an HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokenized payments using cardholder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](https://citypay.github.io/api-docs/payment-api/#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive cardholder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
@@ -69,10 +69,14 @@ module CityPayApiClient
|
|
69
69
|
|
70
70
|
if attributes.key?(:'name')
|
71
71
|
self.name = attributes[:'name']
|
72
|
+
else
|
73
|
+
self.name = nil
|
72
74
|
end
|
73
75
|
|
74
76
|
if attributes.key?(:'result')
|
75
77
|
self.result = attributes[:'result']
|
78
|
+
else
|
79
|
+
self.result = nil
|
76
80
|
end
|
77
81
|
|
78
82
|
if attributes.key?(:'url')
|
@@ -83,6 +87,7 @@ module CityPayApiClient
|
|
83
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
88
|
# @return Array for valid properties with the reasons
|
85
89
|
def list_invalid_properties
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
86
91
|
invalid_properties = Array.new
|
87
92
|
if @name.nil?
|
88
93
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -98,6 +103,7 @@ module CityPayApiClient
|
|
98
103
|
# Check to see if the all the properties in the model are valid
|
99
104
|
# @return true if the model is valid
|
100
105
|
def valid?
|
106
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
101
107
|
return false if @name.nil?
|
102
108
|
return false if @result.nil?
|
103
109
|
true
|
@@ -129,37 +135,30 @@ module CityPayApiClient
|
|
129
135
|
# @param [Hash] attributes Model attributes in the form of hash
|
130
136
|
# @return [Object] Returns the model itself
|
131
137
|
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
138
|
return nil unless attributes.is_a?(Hash)
|
140
139
|
attributes = attributes.transform_keys(&:to_sym)
|
141
|
-
|
142
|
-
|
143
|
-
|
140
|
+
transformed_hash = {}
|
141
|
+
openapi_types.each_pair do |key, type|
|
142
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
143
|
+
transformed_hash["#{key}"] = nil
|
144
144
|
elsif type =~ /\AArray<(.*)>/i
|
145
145
|
# check to ensure the input is an array given that the attribute
|
146
146
|
# is documented as an array but the input is not
|
147
|
-
if attributes[
|
148
|
-
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
149
149
|
end
|
150
|
-
elsif !attributes[
|
151
|
-
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
152
152
|
end
|
153
153
|
end
|
154
|
-
|
155
|
-
self
|
154
|
+
new(transformed_hash)
|
156
155
|
end
|
157
156
|
|
158
157
|
# Deserializes the data based on type
|
159
158
|
# @param string type Data type
|
160
159
|
# @param string value Value to be deserialized
|
161
160
|
# @return [Object] Deserialized data
|
162
|
-
def _deserialize(type, value)
|
161
|
+
def self._deserialize(type, value)
|
163
162
|
case type.to_sym
|
164
163
|
when :Time
|
165
164
|
Time.parse(value)
|
@@ -194,7 +193,7 @@ module CityPayApiClient
|
|
194
193
|
else # model
|
195
194
|
# models (e.g. Pet) or oneOf
|
196
195
|
klass = CityPayApiClient.const_get(type)
|
197
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
196
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
197
|
end
|
199
198
|
end
|
200
199
|
|
@@ -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
|
|
@@ -116,6 +116,8 @@ module CityPayApiClient
|
|
116
116
|
|
117
117
|
if attributes.key?(:'request')
|
118
118
|
self.request = attributes[:'request']
|
119
|
+
else
|
120
|
+
self.request = nil
|
119
121
|
end
|
120
122
|
|
121
123
|
if attributes.key?(:'sms_notification_path')
|
@@ -126,6 +128,7 @@ module CityPayApiClient
|
|
126
128
|
# Show invalid properties with the reasons. Usually used together with valid?
|
127
129
|
# @return Array for valid properties with the reasons
|
128
130
|
def list_invalid_properties
|
131
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
129
132
|
invalid_properties = Array.new
|
130
133
|
if @request.nil?
|
131
134
|
invalid_properties.push('invalid value for "request", request cannot be nil.')
|
@@ -137,6 +140,7 @@ module CityPayApiClient
|
|
137
140
|
# Check to see if the all the properties in the model are valid
|
138
141
|
# @return true if the model is valid
|
139
142
|
def valid?
|
143
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
140
144
|
return false if @request.nil?
|
141
145
|
true
|
142
146
|
end
|
@@ -172,37 +176,30 @@ module CityPayApiClient
|
|
172
176
|
# @param [Hash] attributes Model attributes in the form of hash
|
173
177
|
# @return [Object] Returns the model itself
|
174
178
|
def self.build_from_hash(attributes)
|
175
|
-
new.build_from_hash(attributes)
|
176
|
-
end
|
177
|
-
|
178
|
-
# Builds the object from hash
|
179
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
180
|
-
# @return [Object] Returns the model itself
|
181
|
-
def build_from_hash(attributes)
|
182
179
|
return nil unless attributes.is_a?(Hash)
|
183
180
|
attributes = attributes.transform_keys(&:to_sym)
|
184
|
-
|
185
|
-
|
186
|
-
|
181
|
+
transformed_hash = {}
|
182
|
+
openapi_types.each_pair do |key, type|
|
183
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
184
|
+
transformed_hash["#{key}"] = nil
|
187
185
|
elsif type =~ /\AArray<(.*)>/i
|
188
186
|
# check to ensure the input is an array given that the attribute
|
189
187
|
# is documented as an array but the input is not
|
190
|
-
if attributes[
|
191
|
-
|
188
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
189
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
192
190
|
end
|
193
|
-
elsif !attributes[
|
194
|
-
|
191
|
+
elsif !attributes[attribute_map[key]].nil?
|
192
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
195
193
|
end
|
196
194
|
end
|
197
|
-
|
198
|
-
self
|
195
|
+
new(transformed_hash)
|
199
196
|
end
|
200
197
|
|
201
198
|
# Deserializes the data based on type
|
202
199
|
# @param string type Data type
|
203
200
|
# @param string value Value to be deserialized
|
204
201
|
# @return [Object] Deserialized data
|
205
|
-
def _deserialize(type, value)
|
202
|
+
def self._deserialize(type, value)
|
206
203
|
case type.to_sym
|
207
204
|
when :Time
|
208
205
|
Time.parse(value)
|
@@ -237,7 +234,7 @@ module CityPayApiClient
|
|
237
234
|
else # model
|
238
235
|
# models (e.g. Pet) or oneOf
|
239
236
|
klass = CityPayApiClient.const_get(type)
|
240
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
237
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
241
238
|
end
|
242
239
|
end
|
243
240
|
|
@@ -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
|
|
@@ -145,6 +145,7 @@ module CityPayApiClient
|
|
145
145
|
# Show invalid properties with the reasons. Usually used together with valid?
|
146
146
|
# @return Array for valid properties with the reasons
|
147
147
|
def list_invalid_properties
|
148
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
148
149
|
invalid_properties = Array.new
|
149
150
|
if !@company.nil? && @company.to_s.length > 50
|
150
151
|
invalid_properties.push('invalid value for "company", the character length must be smaller than or equal to 50.')
|
@@ -164,6 +165,7 @@ module CityPayApiClient
|
|
164
165
|
# Check to see if the all the properties in the model are valid
|
165
166
|
# @return true if the model is valid
|
166
167
|
def valid?
|
168
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
167
169
|
return false if !@company.nil? && @company.to_s.length > 50
|
168
170
|
return false if !@email.nil? && @email.to_s.length > 254
|
169
171
|
return false if !@mobile_no.nil? && @mobile_no.to_s.length > 20
|
@@ -173,7 +175,11 @@ module CityPayApiClient
|
|
173
175
|
# Custom attribute writer method with validation
|
174
176
|
# @param [Object] company Value to be assigned
|
175
177
|
def company=(company)
|
176
|
-
if
|
178
|
+
if company.nil?
|
179
|
+
fail ArgumentError, 'company cannot be nil'
|
180
|
+
end
|
181
|
+
|
182
|
+
if company.to_s.length > 50
|
177
183
|
fail ArgumentError, 'invalid value for "company", the character length must be smaller than or equal to 50.'
|
178
184
|
end
|
179
185
|
|
@@ -183,7 +189,11 @@ module CityPayApiClient
|
|
183
189
|
# Custom attribute writer method with validation
|
184
190
|
# @param [Object] email Value to be assigned
|
185
191
|
def email=(email)
|
186
|
-
if
|
192
|
+
if email.nil?
|
193
|
+
fail ArgumentError, 'email cannot be nil'
|
194
|
+
end
|
195
|
+
|
196
|
+
if email.to_s.length > 254
|
187
197
|
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
|
188
198
|
end
|
189
199
|
|
@@ -193,7 +203,11 @@ module CityPayApiClient
|
|
193
203
|
# Custom attribute writer method with validation
|
194
204
|
# @param [Object] mobile_no Value to be assigned
|
195
205
|
def mobile_no=(mobile_no)
|
196
|
-
if
|
206
|
+
if mobile_no.nil?
|
207
|
+
fail ArgumentError, 'mobile_no cannot be nil'
|
208
|
+
end
|
209
|
+
|
210
|
+
if mobile_no.to_s.length > 20
|
197
211
|
fail ArgumentError, 'invalid value for "mobile_no", the character length must be smaller than or equal to 20.'
|
198
212
|
end
|
199
213
|
|
@@ -233,37 +247,30 @@ module CityPayApiClient
|
|
233
247
|
# @param [Hash] attributes Model attributes in the form of hash
|
234
248
|
# @return [Object] Returns the model itself
|
235
249
|
def self.build_from_hash(attributes)
|
236
|
-
new.build_from_hash(attributes)
|
237
|
-
end
|
238
|
-
|
239
|
-
# Builds the object from hash
|
240
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
241
|
-
# @return [Object] Returns the model itself
|
242
|
-
def build_from_hash(attributes)
|
243
250
|
return nil unless attributes.is_a?(Hash)
|
244
251
|
attributes = attributes.transform_keys(&:to_sym)
|
245
|
-
|
246
|
-
|
247
|
-
|
252
|
+
transformed_hash = {}
|
253
|
+
openapi_types.each_pair do |key, type|
|
254
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
255
|
+
transformed_hash["#{key}"] = nil
|
248
256
|
elsif type =~ /\AArray<(.*)>/i
|
249
257
|
# check to ensure the input is an array given that the attribute
|
250
258
|
# is documented as an array but the input is not
|
251
|
-
if attributes[
|
252
|
-
|
259
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
260
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
253
261
|
end
|
254
|
-
elsif !attributes[
|
255
|
-
|
262
|
+
elsif !attributes[attribute_map[key]].nil?
|
263
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
256
264
|
end
|
257
265
|
end
|
258
|
-
|
259
|
-
self
|
266
|
+
new(transformed_hash)
|
260
267
|
end
|
261
268
|
|
262
269
|
# Deserializes the data based on type
|
263
270
|
# @param string type Data type
|
264
271
|
# @param string value Value to be deserialized
|
265
272
|
# @return [Object] Deserialized data
|
266
|
-
def _deserialize(type, value)
|
273
|
+
def self._deserialize(type, value)
|
267
274
|
case type.to_sym
|
268
275
|
when :Time
|
269
276
|
Time.parse(value)
|
@@ -298,7 +305,7 @@ module CityPayApiClient
|
|
298
305
|
else # model
|
299
306
|
# models (e.g. Pet) or oneOf
|
300
307
|
klass = CityPayApiClient.const_get(type)
|
301
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
308
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
302
309
|
end
|
303
310
|
end
|
304
311
|
|