citypay_api_client 1.0.3 → 1.1.1
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 +105 -34
- data/citypay_api_client.gemspec +4 -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 +50 -49
- data/docs/AuthResponse.md +60 -59
- data/docs/AuthenRequired.md +12 -11
- data/docs/AuthorisationAndPaymentApi.md +559 -0
- data/docs/Batch.md +22 -0
- data/docs/BatchProcessingApi.md +214 -0
- data/docs/BatchReportRequest.md +20 -0
- data/docs/BatchReportResponseModel.md +28 -0
- data/docs/BatchTransaction.md +24 -0
- data/docs/BatchTransactionResultModel.md +40 -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 +326 -105
- data/docs/CardStatus.md +10 -9
- data/docs/ChargeRequest.md +36 -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 +365 -0
- data/docs/DirectPostRequest.md +58 -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/OperationalApi.md +124 -22
- data/docs/OperationalFunctionsApi.md +355 -0
- data/docs/PaResAuthRequest.md +10 -9
- data/docs/PaylinkAddress.md +30 -0
- data/docs/PaylinkAdjustmentRequest.md +22 -0
- data/docs/PaylinkApi.md +630 -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 +36 -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 +38 -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/PaymentProcessingApi.md +307 -68
- 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/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 +59 -59
- data/lib/citypay_api_client/api_error.rb +2 -2
- data/lib/citypay_api_client/configuration.rb +53 -15
- data/lib/citypay_api_client/models/account_create.rb +21 -8
- data/lib/citypay_api_client/models/account_status.rb +21 -8
- data/lib/citypay_api_client/models/acknowledgement.rb +21 -8
- data/lib/citypay_api_client/models/acl_check_request.rb +224 -0
- data/lib/citypay_api_client/models/acl_check_response_model.rb +249 -0
- data/lib/citypay_api_client/models/airline_advice.rb +23 -10
- data/lib/citypay_api_client/models/airline_segment.rb +21 -8
- data/lib/citypay_api_client/models/auth_reference.rb +45 -11
- data/lib/citypay_api_client/models/auth_references.rb +21 -8
- data/lib/citypay_api_client/models/auth_request.rb +79 -35
- data/lib/citypay_api_client/models/auth_response.rb +43 -106
- data/lib/citypay_api_client/models/authen_required.rb +21 -8
- data/lib/citypay_api_client/models/batch.rb +264 -0
- data/lib/citypay_api_client/models/batch_report_request.rb +277 -0
- data/lib/citypay_api_client/models/batch_report_response_model.rb +357 -0
- data/lib/citypay_api_client/models/batch_transaction.rb +321 -0
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +421 -0
- data/lib/citypay_api_client/models/bin.rb +299 -0
- data/lib/citypay_api_client/models/bin_lookup.rb +234 -0
- data/lib/citypay_api_client/models/c_res_auth_request.rb +21 -8
- data/lib/citypay_api_client/models/capture_request.rb +38 -22
- data/lib/citypay_api_client/models/card.rb +67 -10
- data/lib/citypay_api_client/models/card_holder_account.rb +35 -12
- data/lib/citypay_api_client/models/card_status.rb +21 -8
- data/lib/citypay_api_client/models/charge_request.rb +96 -26
- data/lib/citypay_api_client/models/check_batch_status.rb +259 -0
- data/lib/citypay_api_client/models/check_batch_status_response.rb +220 -0
- data/lib/citypay_api_client/models/contact_details.rb +87 -44
- data/lib/citypay_api_client/models/decision.rb +21 -8
- data/lib/citypay_api_client/models/direct_post_request.rb +670 -0
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +249 -0
- data/lib/citypay_api_client/models/domain_key_check_request.rb +252 -0
- data/lib/citypay_api_client/models/domain_key_request.rb +250 -0
- data/lib/citypay_api_client/models/domain_key_response.rb +294 -0
- data/lib/citypay_api_client/models/error.rb +35 -12
- data/lib/citypay_api_client/models/event_data_model.rb +259 -0
- data/lib/citypay_api_client/models/exists.rb +244 -0
- data/lib/citypay_api_client/models/external_mpi.rb +27 -8
- data/lib/citypay_api_client/models/list_merchants_response.rb +21 -8
- data/lib/citypay_api_client/models/mcc6012.rb +21 -8
- data/lib/citypay_api_client/models/merchant.rb +21 -8
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +22 -9
- data/lib/citypay_api_client/models/paylink_address.rb +402 -0
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +269 -0
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +269 -0
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +249 -0
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +292 -0
- data/lib/citypay_api_client/models/paylink_card_holder.rb +353 -0
- data/lib/citypay_api_client/models/paylink_cart.rb +280 -0
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +289 -0
- data/lib/citypay_api_client/models/paylink_config.rb +433 -0
- data/lib/citypay_api_client/models/paylink_custom_param.rb +314 -0
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +268 -0
- data/lib/citypay_api_client/models/paylink_error_code.rb +239 -0
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +279 -0
- data/lib/citypay_api_client/models/paylink_part_payments.rb +269 -0
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +234 -0
- data/lib/citypay_api_client/models/paylink_state_event.rb +239 -0
- data/lib/citypay_api_client/models/paylink_token_created.rb +364 -0
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +374 -0
- data/lib/citypay_api_client/models/paylink_token_status.rb +490 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +270 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +235 -0
- data/lib/citypay_api_client/models/paylink_ui.rb +249 -0
- data/lib/citypay_api_client/models/ping.rb +21 -8
- data/lib/citypay_api_client/models/process_batch_request.rb +308 -0
- data/lib/citypay_api_client/models/process_batch_response.rb +234 -0
- data/lib/citypay_api_client/models/refund_request.rb +332 -0
- data/lib/citypay_api_client/models/register_card.rb +59 -12
- data/lib/citypay_api_client/models/request_challenged.rb +29 -16
- data/lib/citypay_api_client/models/retrieve_request.rb +21 -8
- data/lib/citypay_api_client/models/three_d_secure.rb +106 -13
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +333 -0
- data/lib/citypay_api_client/models/void_request.rb +22 -21
- 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 +126 -58
- 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/auth_references_spec.rb +7 -8
- data/spec/models/auth_response_spec.rb +29 -30
- data/spec/models/batch_report_request_spec.rb +39 -0
- data/spec/models/batch_report_response_model_spec.rb +63 -0
- data/spec/models/batch_spec.rb +45 -0
- data/spec/models/batch_transaction_result_model_spec.rb +87 -0
- data/spec/models/batch_transaction_spec.rb +51 -0
- data/spec/models/bin_lookup_spec.rb +33 -0
- data/spec/models/bin_spec.rb +81 -0
- data/spec/models/card_holder_account_spec.rb +8 -5
- 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 +153 -0
- data/spec/models/direct_token_auth_request_spec.rb +51 -0
- data/spec/models/domain_key_check_request_spec.rb +33 -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 +93 -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 +51 -0
- data/spec/models/process_batch_response_spec.rb +39 -0
- data/spec/models/refund_request_spec.rb +64 -0
- 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 +210 -37
- data/Gemfile.lock +0 -70
- 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,46 +1,46 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is a 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 tokinsed payments using Card Holder Accounts. ## Compliance and Security
|
4
|
+
# This CityPay API is a 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 tokinsed payments using Card Holder 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](#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 card holder 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: 6.2.1
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class AuthRequest
|
16
17
|
attr_accessor :airline_data
|
17
18
|
|
18
|
-
# The amount to authorise in the lowest unit of currency with a variable length to a maximum of 12 digits.
|
19
|
+
# The amount to authorise in the lowest unit of currency with a variable length to a maximum of 12 digits. No decimal points are to be included and no divisional characters such as 1,024. The amount should be the total amount required for the transaction. For example with GBP £1,021.95 the amount value is 102195.
|
19
20
|
attr_accessor :amount
|
20
21
|
|
21
|
-
# A policy value which determines whether an AVS postcode policy is enforced or bypassed. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account.
|
22
|
+
# A policy value which determines whether an AVS postcode policy is enforced or bypassed. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the AVS postcode numeric value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the postcode did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send postcode details for authorisation.
|
22
23
|
attr_accessor :avs_postcode_policy
|
23
24
|
|
24
25
|
attr_accessor :bill_to
|
25
26
|
|
26
|
-
# The card holder name as appears on the card such as MR N E BODY. Required for some acquirers.
|
27
|
-
attr_accessor :card_holder_name
|
28
|
-
|
29
27
|
# The card number (PAN) with a variable length to a maximum of 21 digits in numerical form. Any non numeric characters will be stripped out of the card number, this includes whitespace or separators internal of the provided value. The card number must be treated as sensitive data. We only provide an obfuscated value in logging and reporting. The plaintext value is encrypted in our database using AES 256 GMC bit encryption for settlement or refund purposes. When providing the card number to our gateway through the authorisation API you will be handling the card data on your application. This will require further PCI controls to be in place and this value must never be stored.
|
30
28
|
attr_accessor :cardnumber
|
31
29
|
|
32
|
-
# The Card Security Code (CSC) (also known as CV2/CVV2) is normally found on the back of the card (American Express has it on the front). The value helps to identify posession of the card as it is not available within the chip or magnetic swipe. When forwarding the CSC, please ensure the value is a string as some values start with 0 and this will be stripped out by any integer parsing. The CSC number aids fraud prevention in Mail Order and Internet payments.
|
30
|
+
# The Card Security Code (CSC) (also known as CV2/CVV2) is normally found on the back of the card (American Express has it on the front). The value helps to identify posession of the card as it is not available within the chip or magnetic swipe. When forwarding the CSC, please ensure the value is a string as some values start with 0 and this will be stripped out by any integer parsing. The CSC number aids fraud prevention in Mail Order and Internet payments. Business rules are available on your account to identify whether to accept or decline transactions based on mismatched results of the CSC. The Payment Card Industry (PCI) requires that at no stage of a transaction should the CSC be stored. This applies to all entities handling card data. It should also not be used in any hashing process. CityPay do not store the value and have no method of retrieving the value once the transaction has been processed. For this reason, duplicate checking is unable to determine the CSC in its duplication check algorithm.
|
33
31
|
attr_accessor :csc
|
34
32
|
|
35
|
-
# A policy value which determines whether a CSC policy is enforced or bypassed. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account.
|
33
|
+
# A policy value which determines whether a CSC policy is enforced or bypassed. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the CSC value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the CSC did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send the CSC details for authorisation.
|
36
34
|
attr_accessor :csc_policy
|
37
35
|
|
38
36
|
# The processing currency for the transaction. Will default to the merchant account currency.
|
39
37
|
attr_accessor :currency
|
40
38
|
|
41
|
-
# A policy value which determines whether a duplication policy is enforced or bypassed. A duplication check has a window of time set against your account within which it can action. If a previous transaction with matching values occurred within the window, any subsequent transaction will result in a T001 result. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account.
|
39
|
+
# A policy value which determines whether a duplication policy is enforced or bypassed. A duplication check has a window of time set against your account within which it can action. If a previous transaction with matching values occurred within the window, any subsequent transaction will result in a T001 result. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be checked for duplication within the duplication window. `2` to bypass. Transactions that are bypassed will not be checked for duplication within the duplication window. `3` to ignore. Transactions that are ignored will have the same affect as bypass.
|
42
40
|
attr_accessor :duplicate_policy
|
43
41
|
|
42
|
+
attr_accessor :event_management
|
43
|
+
|
44
44
|
# The month of expiry of the card. The month value should be a numerical value between 1 and 12.
|
45
45
|
attr_accessor :expmonth
|
46
46
|
|
@@ -49,10 +49,10 @@ module CityPayApiClient
|
|
49
49
|
|
50
50
|
attr_accessor :external_mpi
|
51
51
|
|
52
|
-
# The identifier of the transaction to process. The value should be a valid reference and may be used to perform post processing actions and to aid in reconciliation of transactions. The value should be a valid printable string with ASCII character ranges from
|
52
|
+
# The identifier of the transaction to process. The value should be a valid reference and may be used to perform post processing actions and to aid in reconciliation of transactions. The value should be a valid printable string with ASCII character ranges from 0x32 to 0x127. The identifier is recommended to be distinct for each transaction such as a [random unique identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier) this will aid in ensuring each transaction is identifiable. When transactions are processed they are also checked for duplicate requests. Changing the identifier on a subsequent request will ensure that a transaction is considered as different.
|
53
53
|
attr_accessor :identifier
|
54
54
|
|
55
|
-
# A policy value which determines whether an AVS address policy is enforced, bypassed or ignored.
|
55
|
+
# A policy value which determines whether an AVS address policy is enforced, bypassed or ignored. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the AVS address numeric value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the address did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send address numeric details for authorisation.
|
56
56
|
attr_accessor :match_avsa
|
57
57
|
|
58
58
|
attr_accessor :mcc6012
|
@@ -60,8 +60,8 @@ module CityPayApiClient
|
|
60
60
|
# Identifies the merchant account to perform processing for.
|
61
61
|
attr_accessor :merchantid
|
62
62
|
|
63
|
-
#
|
64
|
-
attr_accessor :
|
63
|
+
# The card holder name as appears on the card such as MR N E BODY. Required for some acquirers.
|
64
|
+
attr_accessor :name_on_card
|
65
65
|
|
66
66
|
attr_accessor :ship_to
|
67
67
|
|
@@ -80,12 +80,12 @@ module CityPayApiClient
|
|
80
80
|
:'amount' => :'amount',
|
81
81
|
:'avs_postcode_policy' => :'avs_postcode_policy',
|
82
82
|
:'bill_to' => :'bill_to',
|
83
|
-
:'card_holder_name' => :'card_holder_name',
|
84
83
|
:'cardnumber' => :'cardnumber',
|
85
84
|
:'csc' => :'csc',
|
86
85
|
:'csc_policy' => :'csc_policy',
|
87
86
|
:'currency' => :'currency',
|
88
87
|
:'duplicate_policy' => :'duplicate_policy',
|
88
|
+
:'event_management' => :'event_management',
|
89
89
|
:'expmonth' => :'expmonth',
|
90
90
|
:'expyear' => :'expyear',
|
91
91
|
:'external_mpi' => :'external_mpi',
|
@@ -93,7 +93,7 @@ module CityPayApiClient
|
|
93
93
|
:'match_avsa' => :'match_avsa',
|
94
94
|
:'mcc6012' => :'mcc6012',
|
95
95
|
:'merchantid' => :'merchantid',
|
96
|
-
:'
|
96
|
+
:'name_on_card' => :'name_on_card',
|
97
97
|
:'ship_to' => :'ship_to',
|
98
98
|
:'threedsecure' => :'threedsecure',
|
99
99
|
:'trans_info' => :'trans_info',
|
@@ -101,6 +101,11 @@ module CityPayApiClient
|
|
101
101
|
}
|
102
102
|
end
|
103
103
|
|
104
|
+
# Returns all the JSON keys this model knows about
|
105
|
+
def self.acceptable_attributes
|
106
|
+
attribute_map.values
|
107
|
+
end
|
108
|
+
|
104
109
|
# Attribute type mapping.
|
105
110
|
def self.openapi_types
|
106
111
|
{
|
@@ -108,12 +113,12 @@ module CityPayApiClient
|
|
108
113
|
:'amount' => :'Integer',
|
109
114
|
:'avs_postcode_policy' => :'String',
|
110
115
|
:'bill_to' => :'ContactDetails',
|
111
|
-
:'card_holder_name' => :'String',
|
112
116
|
:'cardnumber' => :'String',
|
113
117
|
:'csc' => :'String',
|
114
118
|
:'csc_policy' => :'String',
|
115
119
|
:'currency' => :'String',
|
116
120
|
:'duplicate_policy' => :'String',
|
121
|
+
:'event_management' => :'EventDataModel',
|
117
122
|
:'expmonth' => :'Integer',
|
118
123
|
:'expyear' => :'Integer',
|
119
124
|
:'external_mpi' => :'ExternalMPI',
|
@@ -121,7 +126,7 @@ module CityPayApiClient
|
|
121
126
|
:'match_avsa' => :'String',
|
122
127
|
:'mcc6012' => :'MCC6012',
|
123
128
|
:'merchantid' => :'Integer',
|
124
|
-
:'
|
129
|
+
:'name_on_card' => :'String',
|
125
130
|
:'ship_to' => :'ContactDetails',
|
126
131
|
:'threedsecure' => :'ThreeDSecure',
|
127
132
|
:'trans_info' => :'String',
|
@@ -166,10 +171,6 @@ module CityPayApiClient
|
|
166
171
|
self.bill_to = attributes[:'bill_to']
|
167
172
|
end
|
168
173
|
|
169
|
-
if attributes.key?(:'card_holder_name')
|
170
|
-
self.card_holder_name = attributes[:'card_holder_name']
|
171
|
-
end
|
172
|
-
|
173
174
|
if attributes.key?(:'cardnumber')
|
174
175
|
self.cardnumber = attributes[:'cardnumber']
|
175
176
|
end
|
@@ -190,6 +191,10 @@ module CityPayApiClient
|
|
190
191
|
self.duplicate_policy = attributes[:'duplicate_policy']
|
191
192
|
end
|
192
193
|
|
194
|
+
if attributes.key?(:'event_management')
|
195
|
+
self.event_management = attributes[:'event_management']
|
196
|
+
end
|
197
|
+
|
193
198
|
if attributes.key?(:'expmonth')
|
194
199
|
self.expmonth = attributes[:'expmonth']
|
195
200
|
end
|
@@ -218,10 +223,8 @@ module CityPayApiClient
|
|
218
223
|
self.merchantid = attributes[:'merchantid']
|
219
224
|
end
|
220
225
|
|
221
|
-
if attributes.key?(:'
|
222
|
-
self.
|
223
|
-
else
|
224
|
-
self.sdk = CityPayApiClient::FULL_VERSION
|
226
|
+
if attributes.key?(:'name_on_card')
|
227
|
+
self.name_on_card = attributes[:'name_on_card']
|
225
228
|
end
|
226
229
|
|
227
230
|
if attributes.key?(:'ship_to')
|
@@ -317,6 +320,14 @@ module CityPayApiClient
|
|
317
320
|
invalid_properties.push('invalid value for "merchantid", merchantid cannot be nil.')
|
318
321
|
end
|
319
322
|
|
323
|
+
if !@name_on_card.nil? && @name_on_card.to_s.length > 45
|
324
|
+
invalid_properties.push('invalid value for "name_on_card", the character length must be smaller than or equal to 45.')
|
325
|
+
end
|
326
|
+
|
327
|
+
if !@name_on_card.nil? && @name_on_card.to_s.length < 2
|
328
|
+
invalid_properties.push('invalid value for "name_on_card", the character length must be great than or equal to 2.')
|
329
|
+
end
|
330
|
+
|
320
331
|
if !@trans_info.nil? && @trans_info.to_s.length > 50
|
321
332
|
invalid_properties.push('invalid value for "trans_info", the character length must be smaller than or equal to 50.')
|
322
333
|
end
|
@@ -349,11 +360,23 @@ module CityPayApiClient
|
|
349
360
|
return false if @identifier.to_s.length > 50
|
350
361
|
return false if @identifier.to_s.length < 4
|
351
362
|
return false if @merchantid.nil?
|
363
|
+
return false if !@name_on_card.nil? && @name_on_card.to_s.length > 45
|
364
|
+
return false if !@name_on_card.nil? && @name_on_card.to_s.length < 2
|
352
365
|
return false if !@trans_info.nil? && @trans_info.to_s.length > 50
|
353
366
|
return false if !@trans_type.nil? && @trans_type.to_s.length > 1
|
354
367
|
true
|
355
368
|
end
|
356
369
|
|
370
|
+
# Custom attribute writer method with validation
|
371
|
+
# @param [Object] amount Value to be assigned
|
372
|
+
def amount=(amount)
|
373
|
+
if amount.nil?
|
374
|
+
fail ArgumentError, 'amount cannot be nil'
|
375
|
+
end
|
376
|
+
|
377
|
+
@amount = amount
|
378
|
+
end
|
379
|
+
|
357
380
|
# Custom attribute writer method with validation
|
358
381
|
# @param [Object] cardnumber Value to be assigned
|
359
382
|
def cardnumber=(cardnumber)
|
@@ -454,6 +477,20 @@ module CityPayApiClient
|
|
454
477
|
@identifier = identifier
|
455
478
|
end
|
456
479
|
|
480
|
+
# Custom attribute writer method with validation
|
481
|
+
# @param [Object] name_on_card Value to be assigned
|
482
|
+
def name_on_card=(name_on_card)
|
483
|
+
if !name_on_card.nil? && name_on_card.to_s.length > 45
|
484
|
+
fail ArgumentError, 'invalid value for "name_on_card", the character length must be smaller than or equal to 45.'
|
485
|
+
end
|
486
|
+
|
487
|
+
if !name_on_card.nil? && name_on_card.to_s.length < 2
|
488
|
+
fail ArgumentError, 'invalid value for "name_on_card", the character length must be great than or equal to 2.'
|
489
|
+
end
|
490
|
+
|
491
|
+
@name_on_card = name_on_card
|
492
|
+
end
|
493
|
+
|
457
494
|
# Custom attribute writer method with validation
|
458
495
|
# @param [Object] trans_info Value to be assigned
|
459
496
|
def trans_info=(trans_info)
|
@@ -483,12 +520,12 @@ module CityPayApiClient
|
|
483
520
|
amount == o.amount &&
|
484
521
|
avs_postcode_policy == o.avs_postcode_policy &&
|
485
522
|
bill_to == o.bill_to &&
|
486
|
-
card_holder_name == o.card_holder_name &&
|
487
523
|
cardnumber == o.cardnumber &&
|
488
524
|
csc == o.csc &&
|
489
525
|
csc_policy == o.csc_policy &&
|
490
526
|
currency == o.currency &&
|
491
527
|
duplicate_policy == o.duplicate_policy &&
|
528
|
+
event_management == o.event_management &&
|
492
529
|
expmonth == o.expmonth &&
|
493
530
|
expyear == o.expyear &&
|
494
531
|
external_mpi == o.external_mpi &&
|
@@ -496,7 +533,7 @@ module CityPayApiClient
|
|
496
533
|
match_avsa == o.match_avsa &&
|
497
534
|
mcc6012 == o.mcc6012 &&
|
498
535
|
merchantid == o.merchantid &&
|
499
|
-
|
536
|
+
name_on_card == o.name_on_card &&
|
500
537
|
ship_to == o.ship_to &&
|
501
538
|
threedsecure == o.threedsecure &&
|
502
539
|
trans_info == o.trans_info &&
|
@@ -512,7 +549,7 @@ module CityPayApiClient
|
|
512
549
|
# Calculates hash code according to all attributes.
|
513
550
|
# @return [Integer] Hash code
|
514
551
|
def hash
|
515
|
-
[airline_data, amount, avs_postcode_policy, bill_to,
|
552
|
+
[airline_data, amount, avs_postcode_policy, bill_to, cardnumber, csc, csc_policy, currency, duplicate_policy, event_management, expmonth, expyear, external_mpi, identifier, match_avsa, mcc6012, merchantid, name_on_card, ship_to, threedsecure, trans_info, trans_type].hash
|
516
553
|
end
|
517
554
|
|
518
555
|
# Builds the object from hash
|
@@ -527,8 +564,11 @@ module CityPayApiClient
|
|
527
564
|
# @return [Object] Returns the model itself
|
528
565
|
def build_from_hash(attributes)
|
529
566
|
return nil unless attributes.is_a?(Hash)
|
567
|
+
attributes = attributes.transform_keys(&:to_sym)
|
530
568
|
self.class.openapi_types.each_pair do |key, type|
|
531
|
-
if
|
569
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
570
|
+
self.send("#{key}=", nil)
|
571
|
+
elsif type =~ /\AArray<(.*)>/i
|
532
572
|
# check to ensure the input is an array given that the attribute
|
533
573
|
# is documented as an array but the input is not
|
534
574
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -536,7 +576,7 @@ module CityPayApiClient
|
|
536
576
|
end
|
537
577
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
538
578
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
539
|
-
end
|
579
|
+
end
|
540
580
|
end
|
541
581
|
|
542
582
|
self
|
@@ -548,8 +588,8 @@ module CityPayApiClient
|
|
548
588
|
# @return [Object] Deserialized data
|
549
589
|
def _deserialize(type, value)
|
550
590
|
case type.to_sym
|
551
|
-
when :
|
552
|
-
|
591
|
+
when :Time
|
592
|
+
Time.parse(value)
|
553
593
|
when :Date
|
554
594
|
Date.parse(value)
|
555
595
|
when :String
|
@@ -579,7 +619,9 @@ module CityPayApiClient
|
|
579
619
|
end
|
580
620
|
end
|
581
621
|
else # model
|
582
|
-
|
622
|
+
# models (e.g. Pet) or oneOf
|
623
|
+
klass = CityPayApiClient.const_get(type)
|
624
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
583
625
|
end
|
584
626
|
end
|
585
627
|
|
@@ -605,7 +647,7 @@ module CityPayApiClient
|
|
605
647
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
606
648
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
607
649
|
end
|
608
|
-
|
650
|
+
|
609
651
|
hash[param] = _to_hash(value)
|
610
652
|
end
|
611
653
|
hash
|
@@ -628,5 +670,7 @@ module CityPayApiClient
|
|
628
670
|
value
|
629
671
|
end
|
630
672
|
end
|
673
|
+
|
631
674
|
end
|
675
|
+
|
632
676
|
end
|