citypay_api_client 1.0.3 → 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 +111 -39
- data/citypay_api_client.gemspec +5 -5
- data/docs/AccountCreate.md +10 -9
- data/docs/AccountStatus.md +8 -7
- data/docs/Acknowledgement.md +14 -13
- data/docs/AclCheckRequest.md +18 -0
- data/docs/AclCheckResponseModel.md +24 -0
- data/docs/AirlineAdvice.md +38 -37
- data/docs/AirlineSegment.md +22 -21
- data/docs/AuthReference.md +34 -33
- data/docs/AuthReferences.md +8 -7
- data/docs/AuthRequest.md +52 -49
- data/docs/AuthResponse.md +64 -59
- data/docs/AuthenRequired.md +12 -11
- data/docs/AuthorisationAndPaymentApi.md +850 -0
- data/docs/Batch.md +22 -0
- data/docs/BatchProcessingApi.md +218 -0
- data/docs/BatchReportRequest.md +20 -0
- data/docs/BatchReportResponseModel.md +28 -0
- data/docs/BatchTransaction.md +24 -0
- data/docs/BatchTransactionResultModel.md +44 -0
- data/docs/Bin.md +34 -0
- data/docs/BinLookup.md +18 -0
- data/docs/CResAuthRequest.md +8 -7
- data/docs/CaptureRequest.md +18 -17
- data/docs/Card.md +46 -41
- data/docs/CardHolderAccount.md +24 -21
- data/docs/CardHolderAccountApi.md +387 -111
- data/docs/CardStatus.md +10 -9
- data/docs/ChargeRequest.md +38 -31
- data/docs/CheckBatchStatus.md +20 -0
- data/docs/CheckBatchStatusResponse.md +18 -0
- data/docs/ContactDetails.md +32 -31
- data/docs/Decision.md +12 -11
- data/docs/DirectPostApi.md +389 -0
- data/docs/DirectPostRequest.md +60 -0
- data/docs/DirectTokenAuthRequest.md +24 -0
- data/docs/DomainKeyCheckRequest.md +18 -0
- data/docs/DomainKeyRequest.md +22 -0
- data/docs/DomainKeyResponse.md +26 -0
- data/docs/Error.md +16 -13
- data/docs/EventDataModel.md +26 -0
- data/docs/Exists.md +22 -0
- data/docs/ExternalMPI.md +16 -15
- data/docs/ListMerchantsResponse.md +12 -11
- data/docs/MCC6012.md +14 -13
- data/docs/Merchant.md +16 -15
- data/docs/OperationalFunctionsApi.md +375 -0
- data/docs/PaResAuthRequest.md +10 -9
- data/docs/PaylinkAddress.md +30 -0
- data/docs/PaylinkAdjustmentRequest.md +22 -0
- data/docs/PaylinkApi.md +806 -0
- data/docs/PaylinkAttachmentRequest.md +26 -0
- data/docs/PaylinkAttachmentResult.md +22 -0
- data/docs/PaylinkBillPaymentTokenRequest.md +32 -0
- data/docs/PaylinkCardHolder.md +36 -0
- data/docs/PaylinkCart.md +30 -0
- data/docs/PaylinkCartItemModel.md +32 -0
- data/docs/PaylinkConfig.md +60 -0
- data/docs/PaylinkCustomParam.md +38 -0
- data/docs/PaylinkEmailNotificationPath.md +26 -0
- data/docs/PaylinkErrorCode.md +20 -0
- data/docs/PaylinkFieldGuardModel.md +30 -0
- data/docs/PaylinkPartPayments.md +28 -0
- data/docs/PaylinkSMSNotificationPath.md +20 -0
- data/docs/PaylinkStateEvent.md +22 -0
- data/docs/PaylinkTokenCreated.md +44 -0
- data/docs/PaylinkTokenRequestModel.md +42 -0
- data/docs/PaylinkTokenStatus.md +72 -0
- data/docs/PaylinkTokenStatusChangeRequest.md +26 -0
- data/docs/PaylinkTokenStatusChangeResponse.md +20 -0
- data/docs/PaylinkUI.md +24 -0
- data/docs/Ping.md +8 -7
- data/docs/ProcessBatchRequest.md +24 -0
- data/docs/ProcessBatchResponse.md +20 -0
- data/docs/RefundRequest.md +26 -0
- data/docs/RegisterCard.md +16 -13
- data/docs/RequestChallenged.md +16 -15
- data/docs/RetrieveRequest.md +12 -11
- data/docs/ThreeDSecure.md +32 -15
- data/docs/TokenisationResponseModel.md +36 -0
- data/docs/VoidRequest.md +12 -13
- 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 +565 -0
- data/lib/citypay_api_client/api/batch_processing_api__.rb +225 -0
- data/lib/citypay_api_client/api/{card_holder_account_api.rb → card_holder_account_api__.rb} +136 -46
- data/lib/citypay_api_client/api/direct_post_api__.rb +373 -0
- data/lib/citypay_api_client/api/operational_functions_api__.rb +356 -0
- data/lib/citypay_api_client/api/paylink_api__.rb +614 -0
- data/lib/citypay_api_client/api_client.rb +72 -70
- data/lib/citypay_api_client/api_error.rb +3 -2
- data/lib/citypay_api_client/configuration.rb +74 -17
- data/lib/citypay_api_client/models/account_create.rb +33 -23
- data/lib/citypay_api_client/models/account_status.rb +31 -23
- data/lib/citypay_api_client/models/acknowledgement.rb +43 -27
- data/lib/citypay_api_client/models/acl_check_request.rb +221 -0
- data/lib/citypay_api_client/models/acl_check_response_model.rb +244 -0
- data/lib/citypay_api_client/models/airline_advice.rb +63 -34
- data/lib/citypay_api_client/models/airline_segment.rb +51 -25
- data/lib/citypay_api_client/models/auth_reference.rb +80 -31
- data/lib/citypay_api_client/models/auth_references.rb +31 -23
- data/lib/citypay_api_client/models/auth_request.rb +137 -56
- data/lib/citypay_api_client/models/auth_response.rb +83 -123
- data/lib/citypay_api_client/models/authen_required.rb +31 -23
- data/lib/citypay_api_client/models/batch.rb +267 -0
- data/lib/citypay_api_client/models/batch_report_request.rb +278 -0
- data/lib/citypay_api_client/models/batch_report_response_model.rb +364 -0
- data/lib/citypay_api_client/models/batch_transaction.rb +324 -0
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +452 -0
- data/lib/citypay_api_client/models/bin.rb +294 -0
- data/lib/citypay_api_client/models/bin_lookup.rb +231 -0
- data/lib/citypay_api_client/models/c_res_auth_request.rb +31 -23
- data/lib/citypay_api_client/models/capture_request.rb +59 -38
- data/lib/citypay_api_client/models/card.rb +93 -29
- data/lib/citypay_api_client/models/card_holder_account.rb +49 -27
- data/lib/citypay_api_client/models/card_status.rb +31 -23
- data/lib/citypay_api_client/models/charge_request.rb +154 -47
- data/lib/citypay_api_client/models/check_batch_status.rb +260 -0
- data/lib/citypay_api_client/models/check_batch_status_response.rb +215 -0
- data/lib/citypay_api_client/models/contact_details.rb +130 -52
- data/lib/citypay_api_client/models/decision.rb +31 -23
- data/lib/citypay_api_client/models/direct_post_request.rb +707 -0
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +244 -0
- data/lib/citypay_api_client/models/domain_key_check_request.rb +249 -0
- data/lib/citypay_api_client/models/domain_key_request.rb +249 -0
- data/lib/citypay_api_client/models/domain_key_response.rb +297 -0
- data/lib/citypay_api_client/models/error.rb +57 -31
- data/lib/citypay_api_client/models/event_data_model.rb +254 -0
- data/lib/citypay_api_client/models/exists.rb +241 -0
- data/lib/citypay_api_client/models/external_mpi.rb +61 -27
- data/lib/citypay_api_client/models/list_merchants_response.rb +37 -25
- data/lib/citypay_api_client/models/mcc6012.rb +31 -23
- data/lib/citypay_api_client/models/merchant.rb +31 -23
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +36 -24
- data/lib/citypay_api_client/models/paylink_address.rb +425 -0
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +272 -0
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +268 -0
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +248 -0
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +289 -0
- data/lib/citypay_api_client/models/paylink_card_holder.rb +360 -0
- data/lib/citypay_api_client/models/paylink_cart.rb +275 -0
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +284 -0
- data/lib/citypay_api_client/models/paylink_config.rb +428 -0
- data/lib/citypay_api_client/models/paylink_custom_param.rb +321 -0
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +265 -0
- data/lib/citypay_api_client/models/paylink_error_code.rb +238 -0
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +274 -0
- data/lib/citypay_api_client/models/paylink_part_payments.rb +264 -0
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +231 -0
- data/lib/citypay_api_client/models/paylink_state_event.rb +234 -0
- data/lib/citypay_api_client/models/paylink_token_created.rb +365 -0
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +427 -0
- data/lib/citypay_api_client/models/paylink_token_status.rb +485 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +269 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +232 -0
- data/lib/citypay_api_client/models/paylink_ui.rb +244 -0
- data/lib/citypay_api_client/models/ping.rb +37 -25
- data/lib/citypay_api_client/models/process_batch_request.rb +313 -0
- data/lib/citypay_api_client/models/process_batch_response.rb +231 -0
- data/lib/citypay_api_client/models/refund_request.rb +339 -0
- data/lib/citypay_api_client/models/register_card.rb +79 -27
- data/lib/citypay_api_client/models/request_challenged.rb +39 -31
- data/lib/citypay_api_client/models/retrieve_request.rb +39 -25
- data/lib/citypay_api_client/models/three_d_secure.rb +116 -28
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +332 -0
- data/lib/citypay_api_client/models/void_request.rb +39 -37
- data/lib/citypay_api_client/utils/digest_utils.rb +18 -0
- data/lib/citypay_api_client/utils/direct_post_mac.rb +22 -0
- data/lib/citypay_api_client/version.rb +3 -4
- data/lib/citypay_api_client.rb +53 -6
- data/spec/.DS_Store +0 -0
- data/spec/api/authorisation_and_payment_api___spec.rb +130 -0
- data/spec/api/batch_processing_api___spec.rb +70 -0
- data/spec/api/{card_holder_account_api_spec.rb → card_holder_account_api___spec.rb} +15 -3
- data/spec/api/direct_post_api___spec.rb +98 -0
- data/spec/api/operational_functions_api___spec.rb +94 -0
- data/spec/api/paylink_api___spec.rb +131 -0
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +5 -5
- data/spec/it_api_sandbox_spec.rb +117 -55
- data/spec/models/account_create_spec.rb +1 -2
- data/spec/models/account_status_spec.rb +2 -2
- data/spec/models/acknowledgement_spec.rb +7 -22
- data/spec/models/acl_check_request_spec.rb +33 -0
- data/spec/models/acl_check_response_model_spec.rb +51 -0
- data/spec/models/airline_advice_spec.rb +0 -2
- data/spec/models/airline_segment_spec.rb +0 -2
- data/spec/models/auth_references_spec.rb +7 -8
- data/spec/models/auth_request_spec.rb +0 -2
- data/spec/models/auth_response_spec.rb +77 -33
- data/spec/models/batch_report_request_spec.rb +37 -0
- data/spec/models/batch_report_response_model_spec.rb +61 -0
- data/spec/models/batch_spec.rb +43 -0
- data/spec/models/batch_transaction_result_model_spec.rb +85 -0
- data/spec/models/batch_transaction_spec.rb +49 -0
- data/spec/models/bin_lookup_spec.rb +31 -0
- data/spec/models/bin_spec.rb +81 -0
- data/spec/models/capture_request_spec.rb +0 -2
- data/spec/models/card_holder_account_spec.rb +8 -7
- data/spec/models/charge_request_spec.rb +0 -2
- data/spec/models/check_batch_status_response_spec.rb +45 -0
- data/spec/models/check_batch_status_spec.rb +39 -0
- data/spec/models/decision_spec.rb +1 -1
- data/spec/models/direct_post_request_spec.rb +151 -0
- data/spec/models/direct_token_auth_request_spec.rb +51 -0
- data/spec/models/domain_key_check_request_spec.rb +31 -0
- data/spec/models/domain_key_request_spec.rb +45 -0
- data/spec/models/domain_key_response_spec.rb +57 -0
- data/spec/models/event_data_model_spec.rb +57 -0
- data/spec/{api/operational_api_spec.rb → models/exists_spec.rb} +14 -20
- data/spec/models/list_merchants_response_spec.rb +2 -2
- data/spec/models/paylink_address_spec.rb +69 -0
- data/spec/models/paylink_adjustment_request_spec.rb +45 -0
- data/spec/models/paylink_attachment_request_spec.rb +45 -0
- data/spec/models/paylink_attachment_result_spec.rb +45 -0
- data/spec/models/paylink_bill_payment_token_request_spec.rb +63 -0
- data/spec/models/paylink_card_holder_spec.rb +87 -0
- data/spec/models/paylink_cart_item_model_spec.rb +75 -0
- data/spec/models/paylink_cart_spec.rb +69 -0
- data/spec/models/paylink_config_spec.rb +159 -0
- data/spec/models/paylink_custom_param_spec.rb +87 -0
- data/spec/models/paylink_email_notification_path_spec.rb +57 -0
- data/spec/models/paylink_error_code_spec.rb +39 -0
- data/spec/models/paylink_field_guard_model_spec.rb +45 -0
- data/spec/models/paylink_part_payments_spec.rb +63 -0
- data/spec/models/paylink_sms_notification_path_spec.rb +39 -0
- data/spec/models/paylink_state_event_spec.rb +45 -0
- data/spec/models/paylink_token_created_spec.rb +111 -0
- data/spec/models/paylink_token_request_model_spec.rb +91 -0
- data/spec/models/paylink_token_status_change_request_spec.rb +57 -0
- data/spec/models/paylink_token_status_change_response_spec.rb +39 -0
- data/spec/models/paylink_token_status_spec.rb +195 -0
- data/spec/models/paylink_ui_spec.rb +51 -0
- data/spec/models/process_batch_request_spec.rb +49 -0
- data/spec/models/process_batch_response_spec.rb +39 -0
- data/spec/models/refund_request_spec.rb +62 -0
- data/spec/models/register_card_spec.rb +0 -2
- data/spec/models/tokenisation_response_model_spec.rb +87 -0
- data/spec/spec_helper.rb +2 -2
- data/spec/utils/direct_post_mac_spec.rb +13 -0
- metadata +230 -44
- data/Gemfile.lock +0 -70
- data/docs/OperationalApi.md +0 -112
- data/docs/PaymentProcessingApi.md +0 -320
- data/git_push.sh +0 -58
- data/lib/citypay_api_client/api/operational_api.rb +0 -147
- data/lib/citypay_api_client/api/payment_processing_api.rb +0 -405
- data/lib/citypay_api_client/test.rb +0 -20
- data/spec/api/payment_processing_api_spec.rb +0 -106
@@ -1,15 +1,16 @@
|
|
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
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class ContactDetails
|
@@ -71,6 +72,11 @@ module CityPayApiClient
|
|
71
72
|
}
|
72
73
|
end
|
73
74
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
76
|
+
def self.acceptable_attributes
|
77
|
+
attribute_map.values
|
78
|
+
end
|
79
|
+
|
74
80
|
# Attribute type mapping.
|
75
81
|
def self.openapi_types
|
76
82
|
{
|
@@ -167,21 +173,26 @@ module CityPayApiClient
|
|
167
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
168
174
|
# @return Array for valid properties with the reasons
|
169
175
|
def list_invalid_properties
|
176
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
170
177
|
invalid_properties = Array.new
|
171
|
-
if !@address1.nil? && @address1.to_s.length >
|
172
|
-
invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to
|
178
|
+
if !@address1.nil? && @address1.to_s.length > 50
|
179
|
+
invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 50.')
|
180
|
+
end
|
181
|
+
|
182
|
+
if !@address2.nil? && @address2.to_s.length > 50
|
183
|
+
invalid_properties.push('invalid value for "address2", the character length must be smaller than or equal to 50.')
|
173
184
|
end
|
174
185
|
|
175
|
-
if !@
|
176
|
-
invalid_properties.push('invalid value for "
|
186
|
+
if !@address3.nil? && @address3.to_s.length > 50
|
187
|
+
invalid_properties.push('invalid value for "address3", the character length must be smaller than or equal to 50.')
|
177
188
|
end
|
178
189
|
|
179
|
-
if !@
|
180
|
-
invalid_properties.push('invalid value for "
|
190
|
+
if !@area.nil? && @area.to_s.length > 50
|
191
|
+
invalid_properties.push('invalid value for "area", the character length must be smaller than or equal to 50.')
|
181
192
|
end
|
182
193
|
|
183
|
-
if !@
|
184
|
-
invalid_properties.push('invalid value for "
|
194
|
+
if !@company.nil? && @company.to_s.length > 50
|
195
|
+
invalid_properties.push('invalid value for "company", the character length must be smaller than or equal to 50.')
|
185
196
|
end
|
186
197
|
|
187
198
|
if !@country.nil? && @country.to_s.length > 2
|
@@ -192,12 +203,16 @@ module CityPayApiClient
|
|
192
203
|
invalid_properties.push('invalid value for "country", the character length must be great than or equal to 2.')
|
193
204
|
end
|
194
205
|
|
206
|
+
if !@email.nil? && @email.to_s.length > 254
|
207
|
+
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 254.')
|
208
|
+
end
|
209
|
+
|
195
210
|
if !@mobile_no.nil? && @mobile_no.to_s.length > 20
|
196
211
|
invalid_properties.push('invalid value for "mobile_no", the character length must be smaller than or equal to 20.')
|
197
212
|
end
|
198
213
|
|
199
|
-
if !@postcode.nil? && @postcode.to_s.length >
|
200
|
-
invalid_properties.push('invalid value for "postcode", the character length must be smaller than or equal to
|
214
|
+
if !@postcode.nil? && @postcode.to_s.length > 16
|
215
|
+
invalid_properties.push('invalid value for "postcode", the character length must be smaller than or equal to 16.')
|
201
216
|
end
|
202
217
|
|
203
218
|
if !@telephone_no.nil? && @telephone_no.to_s.length > 20
|
@@ -210,14 +225,17 @@ module CityPayApiClient
|
|
210
225
|
# Check to see if the all the properties in the model are valid
|
211
226
|
# @return true if the model is valid
|
212
227
|
def valid?
|
213
|
-
|
214
|
-
return false if !@
|
215
|
-
return false if !@
|
216
|
-
return false if !@
|
228
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
229
|
+
return false if !@address1.nil? && @address1.to_s.length > 50
|
230
|
+
return false if !@address2.nil? && @address2.to_s.length > 50
|
231
|
+
return false if !@address3.nil? && @address3.to_s.length > 50
|
232
|
+
return false if !@area.nil? && @area.to_s.length > 50
|
233
|
+
return false if !@company.nil? && @company.to_s.length > 50
|
217
234
|
return false if !@country.nil? && @country.to_s.length > 2
|
218
235
|
return false if !@country.nil? && @country.to_s.length < 2
|
236
|
+
return false if !@email.nil? && @email.to_s.length > 254
|
219
237
|
return false if !@mobile_no.nil? && @mobile_no.to_s.length > 20
|
220
|
-
return false if !@postcode.nil? && @postcode.to_s.length >
|
238
|
+
return false if !@postcode.nil? && @postcode.to_s.length > 16
|
221
239
|
return false if !@telephone_no.nil? && @telephone_no.to_s.length > 20
|
222
240
|
true
|
223
241
|
end
|
@@ -225,8 +243,12 @@ module CityPayApiClient
|
|
225
243
|
# Custom attribute writer method with validation
|
226
244
|
# @param [Object] address1 Value to be assigned
|
227
245
|
def address1=(address1)
|
228
|
-
if
|
229
|
-
fail ArgumentError, '
|
246
|
+
if address1.nil?
|
247
|
+
fail ArgumentError, 'address1 cannot be nil'
|
248
|
+
end
|
249
|
+
|
250
|
+
if address1.to_s.length > 50
|
251
|
+
fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 50.'
|
230
252
|
end
|
231
253
|
|
232
254
|
@address1 = address1
|
@@ -235,8 +257,12 @@ module CityPayApiClient
|
|
235
257
|
# Custom attribute writer method with validation
|
236
258
|
# @param [Object] address2 Value to be assigned
|
237
259
|
def address2=(address2)
|
238
|
-
if
|
239
|
-
fail ArgumentError, '
|
260
|
+
if address2.nil?
|
261
|
+
fail ArgumentError, 'address2 cannot be nil'
|
262
|
+
end
|
263
|
+
|
264
|
+
if address2.to_s.length > 50
|
265
|
+
fail ArgumentError, 'invalid value for "address2", the character length must be smaller than or equal to 50.'
|
240
266
|
end
|
241
267
|
|
242
268
|
@address2 = address2
|
@@ -245,8 +271,12 @@ module CityPayApiClient
|
|
245
271
|
# Custom attribute writer method with validation
|
246
272
|
# @param [Object] address3 Value to be assigned
|
247
273
|
def address3=(address3)
|
248
|
-
if
|
249
|
-
fail ArgumentError, '
|
274
|
+
if address3.nil?
|
275
|
+
fail ArgumentError, 'address3 cannot be nil'
|
276
|
+
end
|
277
|
+
|
278
|
+
if address3.to_s.length > 50
|
279
|
+
fail ArgumentError, 'invalid value for "address3", the character length must be smaller than or equal to 50.'
|
250
280
|
end
|
251
281
|
|
252
282
|
@address3 = address3
|
@@ -255,31 +285,71 @@ module CityPayApiClient
|
|
255
285
|
# Custom attribute writer method with validation
|
256
286
|
# @param [Object] area Value to be assigned
|
257
287
|
def area=(area)
|
258
|
-
if
|
259
|
-
fail ArgumentError, '
|
288
|
+
if area.nil?
|
289
|
+
fail ArgumentError, 'area cannot be nil'
|
290
|
+
end
|
291
|
+
|
292
|
+
if area.to_s.length > 50
|
293
|
+
fail ArgumentError, 'invalid value for "area", the character length must be smaller than or equal to 50.'
|
260
294
|
end
|
261
295
|
|
262
296
|
@area = area
|
263
297
|
end
|
264
298
|
|
299
|
+
# Custom attribute writer method with validation
|
300
|
+
# @param [Object] company Value to be assigned
|
301
|
+
def company=(company)
|
302
|
+
if company.nil?
|
303
|
+
fail ArgumentError, 'company cannot be nil'
|
304
|
+
end
|
305
|
+
|
306
|
+
if company.to_s.length > 50
|
307
|
+
fail ArgumentError, 'invalid value for "company", the character length must be smaller than or equal to 50.'
|
308
|
+
end
|
309
|
+
|
310
|
+
@company = company
|
311
|
+
end
|
312
|
+
|
265
313
|
# Custom attribute writer method with validation
|
266
314
|
# @param [Object] country Value to be assigned
|
267
315
|
def country=(country)
|
268
|
-
if
|
316
|
+
if country.nil?
|
317
|
+
fail ArgumentError, 'country cannot be nil'
|
318
|
+
end
|
319
|
+
|
320
|
+
if country.to_s.length > 2
|
269
321
|
fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.'
|
270
322
|
end
|
271
323
|
|
272
|
-
if
|
324
|
+
if country.to_s.length < 2
|
273
325
|
fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.'
|
274
326
|
end
|
275
327
|
|
276
328
|
@country = country
|
277
329
|
end
|
278
330
|
|
331
|
+
# Custom attribute writer method with validation
|
332
|
+
# @param [Object] email Value to be assigned
|
333
|
+
def email=(email)
|
334
|
+
if email.nil?
|
335
|
+
fail ArgumentError, 'email cannot be nil'
|
336
|
+
end
|
337
|
+
|
338
|
+
if email.to_s.length > 254
|
339
|
+
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
|
340
|
+
end
|
341
|
+
|
342
|
+
@email = email
|
343
|
+
end
|
344
|
+
|
279
345
|
# Custom attribute writer method with validation
|
280
346
|
# @param [Object] mobile_no Value to be assigned
|
281
347
|
def mobile_no=(mobile_no)
|
282
|
-
if
|
348
|
+
if mobile_no.nil?
|
349
|
+
fail ArgumentError, 'mobile_no cannot be nil'
|
350
|
+
end
|
351
|
+
|
352
|
+
if mobile_no.to_s.length > 20
|
283
353
|
fail ArgumentError, 'invalid value for "mobile_no", the character length must be smaller than or equal to 20.'
|
284
354
|
end
|
285
355
|
|
@@ -289,8 +359,12 @@ module CityPayApiClient
|
|
289
359
|
# Custom attribute writer method with validation
|
290
360
|
# @param [Object] postcode Value to be assigned
|
291
361
|
def postcode=(postcode)
|
292
|
-
if
|
293
|
-
fail ArgumentError, '
|
362
|
+
if postcode.nil?
|
363
|
+
fail ArgumentError, 'postcode cannot be nil'
|
364
|
+
end
|
365
|
+
|
366
|
+
if postcode.to_s.length > 16
|
367
|
+
fail ArgumentError, 'invalid value for "postcode", the character length must be smaller than or equal to 16.'
|
294
368
|
end
|
295
369
|
|
296
370
|
@postcode = postcode
|
@@ -299,7 +373,11 @@ module CityPayApiClient
|
|
299
373
|
# Custom attribute writer method with validation
|
300
374
|
# @param [Object] telephone_no Value to be assigned
|
301
375
|
def telephone_no=(telephone_no)
|
302
|
-
if
|
376
|
+
if telephone_no.nil?
|
377
|
+
fail ArgumentError, 'telephone_no cannot be nil'
|
378
|
+
end
|
379
|
+
|
380
|
+
if telephone_no.to_s.length > 20
|
303
381
|
fail ArgumentError, 'invalid value for "telephone_no", the character length must be smaller than or equal to 20.'
|
304
382
|
end
|
305
383
|
|
@@ -342,37 +420,33 @@ module CityPayApiClient
|
|
342
420
|
# @param [Hash] attributes Model attributes in the form of hash
|
343
421
|
# @return [Object] Returns the model itself
|
344
422
|
def self.build_from_hash(attributes)
|
345
|
-
new.build_from_hash(attributes)
|
346
|
-
end
|
347
|
-
|
348
|
-
# Builds the object from hash
|
349
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
350
|
-
# @return [Object] Returns the model itself
|
351
|
-
def build_from_hash(attributes)
|
352
423
|
return nil unless attributes.is_a?(Hash)
|
353
|
-
|
354
|
-
|
424
|
+
attributes = attributes.transform_keys(&:to_sym)
|
425
|
+
transformed_hash = {}
|
426
|
+
openapi_types.each_pair do |key, type|
|
427
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
428
|
+
transformed_hash["#{key}"] = nil
|
429
|
+
elsif type =~ /\AArray<(.*)>/i
|
355
430
|
# check to ensure the input is an array given that the attribute
|
356
431
|
# is documented as an array but the input is not
|
357
|
-
if attributes[
|
358
|
-
|
432
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
433
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
359
434
|
end
|
360
|
-
elsif !attributes[
|
361
|
-
|
362
|
-
end
|
435
|
+
elsif !attributes[attribute_map[key]].nil?
|
436
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
437
|
+
end
|
363
438
|
end
|
364
|
-
|
365
|
-
self
|
439
|
+
new(transformed_hash)
|
366
440
|
end
|
367
441
|
|
368
442
|
# Deserializes the data based on type
|
369
443
|
# @param string type Data type
|
370
444
|
# @param string value Value to be deserialized
|
371
445
|
# @return [Object] Deserialized data
|
372
|
-
def _deserialize(type, value)
|
446
|
+
def self._deserialize(type, value)
|
373
447
|
case type.to_sym
|
374
|
-
when :
|
375
|
-
|
448
|
+
when :Time
|
449
|
+
Time.parse(value)
|
376
450
|
when :Date
|
377
451
|
Date.parse(value)
|
378
452
|
when :String
|
@@ -402,7 +476,9 @@ module CityPayApiClient
|
|
402
476
|
end
|
403
477
|
end
|
404
478
|
else # model
|
405
|
-
|
479
|
+
# models (e.g. Pet) or oneOf
|
480
|
+
klass = CityPayApiClient.const_get(type)
|
481
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
406
482
|
end
|
407
483
|
end
|
408
484
|
|
@@ -428,7 +504,7 @@ module CityPayApiClient
|
|
428
504
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
429
505
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
430
506
|
end
|
431
|
-
|
507
|
+
|
432
508
|
hash[param] = _to_hash(value)
|
433
509
|
end
|
434
510
|
hash
|
@@ -451,5 +527,7 @@ module CityPayApiClient
|
|
451
527
|
value
|
452
528
|
end
|
453
529
|
end
|
530
|
+
|
454
531
|
end
|
532
|
+
|
455
533
|
end
|
@@ -1,15 +1,16 @@
|
|
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
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class Decision
|
@@ -28,6 +29,11 @@ module CityPayApiClient
|
|
28
29
|
}
|
29
30
|
end
|
30
31
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
31
37
|
# Attribute type mapping.
|
32
38
|
def self.openapi_types
|
33
39
|
{
|
@@ -74,6 +80,7 @@ module CityPayApiClient
|
|
74
80
|
# Show invalid properties with the reasons. Usually used together with valid?
|
75
81
|
# @return Array for valid properties with the reasons
|
76
82
|
def list_invalid_properties
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
77
84
|
invalid_properties = Array.new
|
78
85
|
invalid_properties
|
79
86
|
end
|
@@ -81,6 +88,7 @@ module CityPayApiClient
|
|
81
88
|
# Check to see if the all the properties in the model are valid
|
82
89
|
# @return true if the model is valid
|
83
90
|
def valid?
|
91
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
84
92
|
true
|
85
93
|
end
|
86
94
|
|
@@ -110,37 +118,33 @@ module CityPayApiClient
|
|
110
118
|
# @param [Hash] attributes Model attributes in the form of hash
|
111
119
|
# @return [Object] Returns the model itself
|
112
120
|
def self.build_from_hash(attributes)
|
113
|
-
new.build_from_hash(attributes)
|
114
|
-
end
|
115
|
-
|
116
|
-
# Builds the object from hash
|
117
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
-
# @return [Object] Returns the model itself
|
119
|
-
def build_from_hash(attributes)
|
120
121
|
return nil unless attributes.is_a?(Hash)
|
121
|
-
|
122
|
-
|
122
|
+
attributes = attributes.transform_keys(&:to_sym)
|
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
|
127
|
+
elsif type =~ /\AArray<(.*)>/i
|
123
128
|
# check to ensure the input is an array given that the attribute
|
124
129
|
# is documented as an array but the input is not
|
125
|
-
if attributes[
|
126
|
-
|
130
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
131
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
127
132
|
end
|
128
|
-
elsif !attributes[
|
129
|
-
|
130
|
-
end
|
133
|
+
elsif !attributes[attribute_map[key]].nil?
|
134
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
135
|
+
end
|
131
136
|
end
|
132
|
-
|
133
|
-
self
|
137
|
+
new(transformed_hash)
|
134
138
|
end
|
135
139
|
|
136
140
|
# Deserializes the data based on type
|
137
141
|
# @param string type Data type
|
138
142
|
# @param string value Value to be deserialized
|
139
143
|
# @return [Object] Deserialized data
|
140
|
-
def _deserialize(type, value)
|
144
|
+
def self._deserialize(type, value)
|
141
145
|
case type.to_sym
|
142
|
-
when :
|
143
|
-
|
146
|
+
when :Time
|
147
|
+
Time.parse(value)
|
144
148
|
when :Date
|
145
149
|
Date.parse(value)
|
146
150
|
when :String
|
@@ -170,7 +174,9 @@ module CityPayApiClient
|
|
170
174
|
end
|
171
175
|
end
|
172
176
|
else # model
|
173
|
-
|
177
|
+
# models (e.g. Pet) or oneOf
|
178
|
+
klass = CityPayApiClient.const_get(type)
|
179
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
174
180
|
end
|
175
181
|
end
|
176
182
|
|
@@ -196,7 +202,7 @@ module CityPayApiClient
|
|
196
202
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
197
203
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
198
204
|
end
|
199
|
-
|
205
|
+
|
200
206
|
hash[param] = _to_hash(value)
|
201
207
|
end
|
202
208
|
hash
|
@@ -219,5 +225,7 @@ module CityPayApiClient
|
|
219
225
|
value
|
220
226
|
end
|
221
227
|
end
|
228
|
+
|
222
229
|
end
|
230
|
+
|
223
231
|
end
|