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,46 +1,46 @@
|
|
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 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,11 +60,14 @@ 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
|
|
68
|
+
# A \"tag\" is a label that you can attach to a payment authorization. Tags can help you group transactions together based on certain criteria, like a work job or a ticket number. They can also assist in filtering transactions when you're generating reports. Multiple Tags You can add more than one tag to a transaction by separating them with commas. Limitations There is a maximum limit of 3 tags that can be added to a single transaction. Each tag can be no longer than 20 characters and alphanumeric with no spaces. Example: Let's say you're a software company and you have different teams working on various projects. When a team makes a purchase or incurs an expense, they can tag the transaction with the project name, the team name, and the type of expense. Project Name: Project_X Team Name: Team_A Type of Expense: Hardware So, the tag for a transaction might look like: Project_X,Team_A,Hardware This way, when you're looking at your financial reports, you can easily filter transactions based on these tags to see how much each project or team is spending on different types of expenses.
|
69
|
+
attr_accessor :tag
|
70
|
+
|
68
71
|
attr_accessor :threedsecure
|
69
72
|
|
70
73
|
# Further information that can be added to the transaction will display in reporting. Can be used for flexible values such as operator id.
|
@@ -80,12 +83,12 @@ module CityPayApiClient
|
|
80
83
|
:'amount' => :'amount',
|
81
84
|
:'avs_postcode_policy' => :'avs_postcode_policy',
|
82
85
|
:'bill_to' => :'bill_to',
|
83
|
-
:'card_holder_name' => :'card_holder_name',
|
84
86
|
:'cardnumber' => :'cardnumber',
|
85
87
|
:'csc' => :'csc',
|
86
88
|
:'csc_policy' => :'csc_policy',
|
87
89
|
:'currency' => :'currency',
|
88
90
|
:'duplicate_policy' => :'duplicate_policy',
|
91
|
+
:'event_management' => :'event_management',
|
89
92
|
:'expmonth' => :'expmonth',
|
90
93
|
:'expyear' => :'expyear',
|
91
94
|
:'external_mpi' => :'external_mpi',
|
@@ -93,14 +96,20 @@ module CityPayApiClient
|
|
93
96
|
:'match_avsa' => :'match_avsa',
|
94
97
|
:'mcc6012' => :'mcc6012',
|
95
98
|
:'merchantid' => :'merchantid',
|
96
|
-
:'
|
99
|
+
:'name_on_card' => :'name_on_card',
|
97
100
|
:'ship_to' => :'ship_to',
|
101
|
+
:'tag' => :'tag',
|
98
102
|
:'threedsecure' => :'threedsecure',
|
99
103
|
:'trans_info' => :'trans_info',
|
100
104
|
:'trans_type' => :'trans_type'
|
101
105
|
}
|
102
106
|
end
|
103
107
|
|
108
|
+
# Returns all the JSON keys this model knows about
|
109
|
+
def self.acceptable_attributes
|
110
|
+
attribute_map.values
|
111
|
+
end
|
112
|
+
|
104
113
|
# Attribute type mapping.
|
105
114
|
def self.openapi_types
|
106
115
|
{
|
@@ -108,12 +117,12 @@ module CityPayApiClient
|
|
108
117
|
:'amount' => :'Integer',
|
109
118
|
:'avs_postcode_policy' => :'String',
|
110
119
|
:'bill_to' => :'ContactDetails',
|
111
|
-
:'card_holder_name' => :'String',
|
112
120
|
:'cardnumber' => :'String',
|
113
121
|
:'csc' => :'String',
|
114
122
|
:'csc_policy' => :'String',
|
115
123
|
:'currency' => :'String',
|
116
124
|
:'duplicate_policy' => :'String',
|
125
|
+
:'event_management' => :'EventDataModel',
|
117
126
|
:'expmonth' => :'Integer',
|
118
127
|
:'expyear' => :'Integer',
|
119
128
|
:'external_mpi' => :'ExternalMPI',
|
@@ -121,8 +130,9 @@ module CityPayApiClient
|
|
121
130
|
:'match_avsa' => :'String',
|
122
131
|
:'mcc6012' => :'MCC6012',
|
123
132
|
:'merchantid' => :'Integer',
|
124
|
-
:'
|
133
|
+
:'name_on_card' => :'String',
|
125
134
|
:'ship_to' => :'ContactDetails',
|
135
|
+
:'tag' => :'String',
|
126
136
|
:'threedsecure' => :'ThreeDSecure',
|
127
137
|
:'trans_info' => :'String',
|
128
138
|
:'trans_type' => :'String'
|
@@ -156,6 +166,8 @@ module CityPayApiClient
|
|
156
166
|
|
157
167
|
if attributes.key?(:'amount')
|
158
168
|
self.amount = attributes[:'amount']
|
169
|
+
else
|
170
|
+
self.amount = nil
|
159
171
|
end
|
160
172
|
|
161
173
|
if attributes.key?(:'avs_postcode_policy')
|
@@ -166,12 +178,10 @@ module CityPayApiClient
|
|
166
178
|
self.bill_to = attributes[:'bill_to']
|
167
179
|
end
|
168
180
|
|
169
|
-
if attributes.key?(:'card_holder_name')
|
170
|
-
self.card_holder_name = attributes[:'card_holder_name']
|
171
|
-
end
|
172
|
-
|
173
181
|
if attributes.key?(:'cardnumber')
|
174
182
|
self.cardnumber = attributes[:'cardnumber']
|
183
|
+
else
|
184
|
+
self.cardnumber = nil
|
175
185
|
end
|
176
186
|
|
177
187
|
if attributes.key?(:'csc')
|
@@ -190,12 +200,20 @@ module CityPayApiClient
|
|
190
200
|
self.duplicate_policy = attributes[:'duplicate_policy']
|
191
201
|
end
|
192
202
|
|
203
|
+
if attributes.key?(:'event_management')
|
204
|
+
self.event_management = attributes[:'event_management']
|
205
|
+
end
|
206
|
+
|
193
207
|
if attributes.key?(:'expmonth')
|
194
208
|
self.expmonth = attributes[:'expmonth']
|
209
|
+
else
|
210
|
+
self.expmonth = nil
|
195
211
|
end
|
196
212
|
|
197
213
|
if attributes.key?(:'expyear')
|
198
214
|
self.expyear = attributes[:'expyear']
|
215
|
+
else
|
216
|
+
self.expyear = nil
|
199
217
|
end
|
200
218
|
|
201
219
|
if attributes.key?(:'external_mpi')
|
@@ -204,6 +222,8 @@ module CityPayApiClient
|
|
204
222
|
|
205
223
|
if attributes.key?(:'identifier')
|
206
224
|
self.identifier = attributes[:'identifier']
|
225
|
+
else
|
226
|
+
self.identifier = nil
|
207
227
|
end
|
208
228
|
|
209
229
|
if attributes.key?(:'match_avsa')
|
@@ -216,18 +236,22 @@ module CityPayApiClient
|
|
216
236
|
|
217
237
|
if attributes.key?(:'merchantid')
|
218
238
|
self.merchantid = attributes[:'merchantid']
|
239
|
+
else
|
240
|
+
self.merchantid = nil
|
219
241
|
end
|
220
242
|
|
221
|
-
if attributes.key?(:'
|
222
|
-
self.
|
223
|
-
else
|
224
|
-
self.sdk = CityPayApiClient::FULL_VERSION
|
243
|
+
if attributes.key?(:'name_on_card')
|
244
|
+
self.name_on_card = attributes[:'name_on_card']
|
225
245
|
end
|
226
246
|
|
227
247
|
if attributes.key?(:'ship_to')
|
228
248
|
self.ship_to = attributes[:'ship_to']
|
229
249
|
end
|
230
250
|
|
251
|
+
if attributes.key?(:'tag')
|
252
|
+
self.tag = attributes[:'tag']
|
253
|
+
end
|
254
|
+
|
231
255
|
if attributes.key?(:'threedsecure')
|
232
256
|
self.threedsecure = attributes[:'threedsecure']
|
233
257
|
end
|
@@ -244,6 +268,7 @@ module CityPayApiClient
|
|
244
268
|
# Show invalid properties with the reasons. Usually used together with valid?
|
245
269
|
# @return Array for valid properties with the reasons
|
246
270
|
def list_invalid_properties
|
271
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
247
272
|
invalid_properties = Array.new
|
248
273
|
if @amount.nil?
|
249
274
|
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
@@ -317,6 +342,14 @@ module CityPayApiClient
|
|
317
342
|
invalid_properties.push('invalid value for "merchantid", merchantid cannot be nil.')
|
318
343
|
end
|
319
344
|
|
345
|
+
if !@name_on_card.nil? && @name_on_card.to_s.length > 45
|
346
|
+
invalid_properties.push('invalid value for "name_on_card", the character length must be smaller than or equal to 45.')
|
347
|
+
end
|
348
|
+
|
349
|
+
if !@name_on_card.nil? && @name_on_card.to_s.length < 2
|
350
|
+
invalid_properties.push('invalid value for "name_on_card", the character length must be great than or equal to 2.')
|
351
|
+
end
|
352
|
+
|
320
353
|
if !@trans_info.nil? && @trans_info.to_s.length > 50
|
321
354
|
invalid_properties.push('invalid value for "trans_info", the character length must be smaller than or equal to 50.')
|
322
355
|
end
|
@@ -331,6 +364,7 @@ module CityPayApiClient
|
|
331
364
|
# Check to see if the all the properties in the model are valid
|
332
365
|
# @return true if the model is valid
|
333
366
|
def valid?
|
367
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
334
368
|
return false if @amount.nil?
|
335
369
|
return false if @cardnumber.nil?
|
336
370
|
return false if @cardnumber.to_s.length > 22
|
@@ -349,11 +383,23 @@ module CityPayApiClient
|
|
349
383
|
return false if @identifier.to_s.length > 50
|
350
384
|
return false if @identifier.to_s.length < 4
|
351
385
|
return false if @merchantid.nil?
|
386
|
+
return false if !@name_on_card.nil? && @name_on_card.to_s.length > 45
|
387
|
+
return false if !@name_on_card.nil? && @name_on_card.to_s.length < 2
|
352
388
|
return false if !@trans_info.nil? && @trans_info.to_s.length > 50
|
353
389
|
return false if !@trans_type.nil? && @trans_type.to_s.length > 1
|
354
390
|
true
|
355
391
|
end
|
356
392
|
|
393
|
+
# Custom attribute writer method with validation
|
394
|
+
# @param [Object] amount Value to be assigned
|
395
|
+
def amount=(amount)
|
396
|
+
if amount.nil?
|
397
|
+
fail ArgumentError, 'amount cannot be nil'
|
398
|
+
end
|
399
|
+
|
400
|
+
@amount = amount
|
401
|
+
end
|
402
|
+
|
357
403
|
# Custom attribute writer method with validation
|
358
404
|
# @param [Object] cardnumber Value to be assigned
|
359
405
|
def cardnumber=(cardnumber)
|
@@ -375,11 +421,15 @@ module CityPayApiClient
|
|
375
421
|
# Custom attribute writer method with validation
|
376
422
|
# @param [Object] csc Value to be assigned
|
377
423
|
def csc=(csc)
|
378
|
-
if
|
424
|
+
if csc.nil?
|
425
|
+
fail ArgumentError, 'csc cannot be nil'
|
426
|
+
end
|
427
|
+
|
428
|
+
if csc.to_s.length > 4
|
379
429
|
fail ArgumentError, 'invalid value for "csc", the character length must be smaller than or equal to 4.'
|
380
430
|
end
|
381
431
|
|
382
|
-
if
|
432
|
+
if csc.to_s.length < 3
|
383
433
|
fail ArgumentError, 'invalid value for "csc", the character length must be great than or equal to 3.'
|
384
434
|
end
|
385
435
|
|
@@ -389,11 +439,15 @@ module CityPayApiClient
|
|
389
439
|
# Custom attribute writer method with validation
|
390
440
|
# @param [Object] currency Value to be assigned
|
391
441
|
def currency=(currency)
|
392
|
-
if
|
442
|
+
if currency.nil?
|
443
|
+
fail ArgumentError, 'currency cannot be nil'
|
444
|
+
end
|
445
|
+
|
446
|
+
if currency.to_s.length > 3
|
393
447
|
fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
|
394
448
|
end
|
395
449
|
|
396
|
-
if
|
450
|
+
if currency.to_s.length < 3
|
397
451
|
fail ArgumentError, 'invalid value for "currency", the character length must be great than or equal to 3.'
|
398
452
|
end
|
399
453
|
|
@@ -454,10 +508,32 @@ module CityPayApiClient
|
|
454
508
|
@identifier = identifier
|
455
509
|
end
|
456
510
|
|
511
|
+
# Custom attribute writer method with validation
|
512
|
+
# @param [Object] name_on_card Value to be assigned
|
513
|
+
def name_on_card=(name_on_card)
|
514
|
+
if name_on_card.nil?
|
515
|
+
fail ArgumentError, 'name_on_card cannot be nil'
|
516
|
+
end
|
517
|
+
|
518
|
+
if name_on_card.to_s.length > 45
|
519
|
+
fail ArgumentError, 'invalid value for "name_on_card", the character length must be smaller than or equal to 45.'
|
520
|
+
end
|
521
|
+
|
522
|
+
if name_on_card.to_s.length < 2
|
523
|
+
fail ArgumentError, 'invalid value for "name_on_card", the character length must be great than or equal to 2.'
|
524
|
+
end
|
525
|
+
|
526
|
+
@name_on_card = name_on_card
|
527
|
+
end
|
528
|
+
|
457
529
|
# Custom attribute writer method with validation
|
458
530
|
# @param [Object] trans_info Value to be assigned
|
459
531
|
def trans_info=(trans_info)
|
460
|
-
if
|
532
|
+
if trans_info.nil?
|
533
|
+
fail ArgumentError, 'trans_info cannot be nil'
|
534
|
+
end
|
535
|
+
|
536
|
+
if trans_info.to_s.length > 50
|
461
537
|
fail ArgumentError, 'invalid value for "trans_info", the character length must be smaller than or equal to 50.'
|
462
538
|
end
|
463
539
|
|
@@ -467,7 +543,11 @@ module CityPayApiClient
|
|
467
543
|
# Custom attribute writer method with validation
|
468
544
|
# @param [Object] trans_type Value to be assigned
|
469
545
|
def trans_type=(trans_type)
|
470
|
-
if
|
546
|
+
if trans_type.nil?
|
547
|
+
fail ArgumentError, 'trans_type cannot be nil'
|
548
|
+
end
|
549
|
+
|
550
|
+
if trans_type.to_s.length > 1
|
471
551
|
fail ArgumentError, 'invalid value for "trans_type", the character length must be smaller than or equal to 1.'
|
472
552
|
end
|
473
553
|
|
@@ -483,12 +563,12 @@ module CityPayApiClient
|
|
483
563
|
amount == o.amount &&
|
484
564
|
avs_postcode_policy == o.avs_postcode_policy &&
|
485
565
|
bill_to == o.bill_to &&
|
486
|
-
card_holder_name == o.card_holder_name &&
|
487
566
|
cardnumber == o.cardnumber &&
|
488
567
|
csc == o.csc &&
|
489
568
|
csc_policy == o.csc_policy &&
|
490
569
|
currency == o.currency &&
|
491
570
|
duplicate_policy == o.duplicate_policy &&
|
571
|
+
event_management == o.event_management &&
|
492
572
|
expmonth == o.expmonth &&
|
493
573
|
expyear == o.expyear &&
|
494
574
|
external_mpi == o.external_mpi &&
|
@@ -496,8 +576,9 @@ module CityPayApiClient
|
|
496
576
|
match_avsa == o.match_avsa &&
|
497
577
|
mcc6012 == o.mcc6012 &&
|
498
578
|
merchantid == o.merchantid &&
|
499
|
-
|
579
|
+
name_on_card == o.name_on_card &&
|
500
580
|
ship_to == o.ship_to &&
|
581
|
+
tag == o.tag &&
|
501
582
|
threedsecure == o.threedsecure &&
|
502
583
|
trans_info == o.trans_info &&
|
503
584
|
trans_type == o.trans_type
|
@@ -512,44 +593,40 @@ module CityPayApiClient
|
|
512
593
|
# Calculates hash code according to all attributes.
|
513
594
|
# @return [Integer] Hash code
|
514
595
|
def hash
|
515
|
-
[airline_data, amount, avs_postcode_policy, bill_to,
|
596
|
+
[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, tag, threedsecure, trans_info, trans_type].hash
|
516
597
|
end
|
517
598
|
|
518
599
|
# Builds the object from hash
|
519
600
|
# @param [Hash] attributes Model attributes in the form of hash
|
520
601
|
# @return [Object] Returns the model itself
|
521
602
|
def self.build_from_hash(attributes)
|
522
|
-
new.build_from_hash(attributes)
|
523
|
-
end
|
524
|
-
|
525
|
-
# Builds the object from hash
|
526
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
527
|
-
# @return [Object] Returns the model itself
|
528
|
-
def build_from_hash(attributes)
|
529
603
|
return nil unless attributes.is_a?(Hash)
|
530
|
-
|
531
|
-
|
604
|
+
attributes = attributes.transform_keys(&:to_sym)
|
605
|
+
transformed_hash = {}
|
606
|
+
openapi_types.each_pair do |key, type|
|
607
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
608
|
+
transformed_hash["#{key}"] = nil
|
609
|
+
elsif type =~ /\AArray<(.*)>/i
|
532
610
|
# check to ensure the input is an array given that the attribute
|
533
611
|
# is documented as an array but the input is not
|
534
|
-
if attributes[
|
535
|
-
|
612
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
613
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
536
614
|
end
|
537
|
-
elsif !attributes[
|
538
|
-
|
539
|
-
end
|
615
|
+
elsif !attributes[attribute_map[key]].nil?
|
616
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
617
|
+
end
|
540
618
|
end
|
541
|
-
|
542
|
-
self
|
619
|
+
new(transformed_hash)
|
543
620
|
end
|
544
621
|
|
545
622
|
# Deserializes the data based on type
|
546
623
|
# @param string type Data type
|
547
624
|
# @param string value Value to be deserialized
|
548
625
|
# @return [Object] Deserialized data
|
549
|
-
def _deserialize(type, value)
|
626
|
+
def self._deserialize(type, value)
|
550
627
|
case type.to_sym
|
551
|
-
when :
|
552
|
-
|
628
|
+
when :Time
|
629
|
+
Time.parse(value)
|
553
630
|
when :Date
|
554
631
|
Date.parse(value)
|
555
632
|
when :String
|
@@ -579,7 +656,9 @@ module CityPayApiClient
|
|
579
656
|
end
|
580
657
|
end
|
581
658
|
else # model
|
582
|
-
|
659
|
+
# models (e.g. Pet) or oneOf
|
660
|
+
klass = CityPayApiClient.const_get(type)
|
661
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
583
662
|
end
|
584
663
|
end
|
585
664
|
|
@@ -605,7 +684,7 @@ module CityPayApiClient
|
|
605
684
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
606
685
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
607
686
|
end
|
608
|
-
|
687
|
+
|
609
688
|
hash[param] = _to_hash(value)
|
610
689
|
end
|
611
690
|
hash
|
@@ -628,5 +707,7 @@ module CityPayApiClient
|
|
628
707
|
value
|
629
708
|
end
|
630
709
|
end
|
710
|
+
|
631
711
|
end
|
712
|
+
|
632
713
|
end
|