citypay_api_client 1.1.1 → 1.1.3
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/Gemfile.lock +73 -0
- data/README.md +65 -37
- data/citypay_api_client.gemspec +4 -3
- data/docs/Acknowledgement.md +2 -2
- data/docs/AclCheckResponseModel.md +3 -3
- data/docs/AirlineAdvice.md +1 -1
- data/docs/AuthRequest.md +9 -7
- data/docs/AuthResponse.md +9 -5
- data/docs/AuthorisationAndPaymentApi.md +145 -10
- data/docs/Batch.md +1 -1
- data/docs/BatchProcessingApi.md +24 -20
- data/docs/BatchReportResponseModel.md +2 -2
- data/docs/BatchTransaction.md +1 -1
- data/docs/BatchTransactionReportRequest.md +22 -0
- data/docs/BatchTransactionReportResponse.md +24 -0
- data/docs/BatchTransactionResultModel.md +6 -2
- data/docs/Bin.md +2 -2
- data/docs/CaptureRequest.md +1 -1
- data/docs/Card.md +3 -3
- data/docs/CardHolderAccountApi.md +73 -14
- data/docs/ChargeRequest.md +8 -6
- data/docs/ContactDetails.md +11 -11
- data/docs/Decision.md +0 -2
- data/docs/DirectPostApi.md +26 -16
- data/docs/DirectPostRequest.md +9 -7
- data/docs/EventDataModel.md +2 -2
- data/docs/MerchantBatchReportRequest.md +28 -0
- data/docs/MerchantBatchReportResponse.md +24 -0
- data/docs/MerchantBatchResponse.md +30 -0
- data/docs/NetSummaryResponse.md +32 -0
- data/docs/OperationalFunctionsApi.md +28 -8
- data/docs/PaylinkAdjustmentRequest.md +1 -1
- data/docs/PaylinkApi.md +337 -21
- data/docs/PaylinkBillPaymentTokenRequest.md +1 -1
- data/docs/PaylinkCustomParam.md +3 -1
- data/docs/PaylinkErrorCode.md +2 -2
- data/docs/PaylinkFieldGuardModel.md +1 -1
- data/docs/PaylinkResendNotificationRequest.md +20 -0
- data/docs/PaylinkStateEvent.md +4 -4
- data/docs/PaylinkTokenCreated.md +11 -11
- data/docs/PaylinkTokenRequestModel.md +4 -0
- data/docs/PaylinkTokenStatus.md +7 -7
- data/docs/PaylinkTokenStatusChangeRequest.md +7 -7
- data/docs/PaylinkTokenStatusChangeResponse.md +6 -2
- data/docs/PaymentIntent.md +42 -0
- data/docs/PaymentIntentReference.md +18 -0
- data/docs/RefundRequest.md +1 -1
- data/docs/RegisterCard.md +1 -1
- data/docs/RemittanceData.md +28 -0
- data/docs/RemittanceReportRequest.md +28 -0
- data/docs/RemittanceReportResponse.md +24 -0
- data/docs/RemittedClientData.md +44 -0
- data/docs/ReportingApi.md +378 -0
- data/docs/ThreeDSecure.md +1 -1
- data/docs/TokenisationResponseModel.md +3 -3
- 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/citypay_api_client/api/authorisation_and_payment_api__.rb +72 -4
- data/lib/citypay_api_client/api/batch_processing_api__.rb +15 -15
- data/lib/citypay_api_client/api/card_holder_account_api__.rb +5 -2
- data/lib/citypay_api_client/api/direct_post_api__.rb +9 -9
- data/lib/citypay_api_client/api/operational_functions_api__.rb +3 -3
- data/lib/citypay_api_client/api/paylink_api__.rb +163 -26
- data/lib/citypay_api_client/api/reporting_api__.rb +381 -0
- data/lib/citypay_api_client/api_client.rb +24 -22
- data/lib/citypay_api_client/api_error.rb +3 -2
- data/lib/citypay_api_client/configuration.rb +28 -9
- data/lib/citypay_api_client/models/account_create.rb +17 -20
- data/lib/citypay_api_client/models/account_status.rb +15 -20
- data/lib/citypay_api_client/models/acknowledgement.rb +21 -46
- data/lib/citypay_api_client/models/acl_check_request.rb +17 -20
- data/lib/citypay_api_client/models/acl_check_response_model.rb +16 -21
- data/lib/citypay_api_client/models/airline_advice.rb +45 -29
- data/lib/citypay_api_client/models/airline_segment.rb +35 -22
- data/lib/citypay_api_client/models/auth_reference.rb +41 -26
- data/lib/citypay_api_client/models/auth_references.rb +15 -20
- data/lib/citypay_api_client/models/auth_request.rb +72 -34
- data/lib/citypay_api_client/models/auth_response.rb +46 -23
- data/lib/citypay_api_client/models/authen_required.rb +15 -20
- data/lib/citypay_api_client/models/batch.rb +25 -22
- data/lib/citypay_api_client/models/batch_report_request.rb +23 -22
- data/lib/citypay_api_client/models/batch_report_response_model.rb +28 -21
- data/lib/citypay_api_client/models/batch_transaction.rb +25 -22
- data/lib/citypay_api_client/models/batch_transaction_report_request.rb +234 -0
- data/lib/citypay_api_client/models/batch_transaction_report_response.rb +252 -0
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +53 -22
- data/lib/citypay_api_client/models/bin.rb +15 -20
- data/lib/citypay_api_client/models/bin_lookup.rb +17 -20
- data/lib/citypay_api_client/models/c_res_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/capture_request.rb +27 -22
- data/lib/citypay_api_client/models/card.rb +33 -26
- data/lib/citypay_api_client/models/card_holder_account.rb +19 -20
- data/lib/citypay_api_client/models/card_status.rb +15 -20
- data/lib/citypay_api_client/models/charge_request.rb +72 -34
- data/lib/citypay_api_client/models/check_batch_status.rb +23 -22
- data/lib/citypay_api_client/models/check_batch_status_response.rb +15 -20
- data/lib/citypay_api_client/models/contact_details.rb +77 -42
- data/lib/citypay_api_client/models/decision.rb +16 -30
- data/lib/citypay_api_client/models/direct_post_request.rb +72 -34
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +15 -20
- data/lib/citypay_api_client/models/domain_key_check_request.rb +17 -20
- data/lib/citypay_api_client/models/domain_key_request.rb +19 -20
- data/lib/citypay_api_client/models/domain_key_response.rb +25 -22
- data/lib/citypay_api_client/models/error.rb +27 -24
- data/lib/citypay_api_client/models/event_data_model.rb +15 -20
- data/lib/citypay_api_client/models/exists.rb +17 -20
- data/lib/citypay_api_client/models/external_mpi.rb +39 -24
- data/lib/citypay_api_client/models/list_merchants_response.rb +21 -22
- data/lib/citypay_api_client/models/mcc6012.rb +15 -20
- data/lib/citypay_api_client/models/merchant.rb +15 -20
- data/lib/citypay_api_client/models/merchant_batch_report_request.rb +265 -0
- data/lib/citypay_api_client/models/merchant_batch_report_response.rb +252 -0
- data/lib/citypay_api_client/models/merchant_batch_response.rb +301 -0
- data/lib/citypay_api_client/models/net_summary_response.rb +472 -0
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_address.rb +52 -29
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +25 -22
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +19 -20
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +19 -20
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +17 -20
- data/lib/citypay_api_client/models/paylink_card_holder.rb +30 -23
- data/lib/citypay_api_client/models/paylink_cart.rb +15 -20
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +15 -20
- data/lib/citypay_api_client/models/paylink_config.rb +15 -20
- data/lib/citypay_api_client/models/paylink_custom_param.rb +29 -22
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_error_code.rb +19 -20
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +16 -21
- data/lib/citypay_api_client/models/paylink_part_payments.rb +15 -20
- data/lib/citypay_api_client/models/paylink_resend_notification_request.rb +224 -0
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +17 -20
- data/lib/citypay_api_client/models/paylink_state_event.rb +16 -21
- data/lib/citypay_api_client/models/paylink_token_created.rb +56 -27
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +75 -22
- data/lib/citypay_api_client/models/paylink_token_status.rb +44 -21
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +24 -26
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +39 -22
- data/lib/citypay_api_client/models/paylink_ui.rb +15 -20
- data/lib/citypay_api_client/models/payment_intent.rb +479 -0
- data/lib/citypay_api_client/models/payment_intent_reference.rb +221 -0
- data/lib/citypay_api_client/models/ping.rb +21 -22
- data/lib/citypay_api_client/models/process_batch_request.rb +27 -22
- data/lib/citypay_api_client/models/process_batch_response.rb +17 -20
- data/lib/citypay_api_client/models/refund_request.rb +28 -21
- data/lib/citypay_api_client/models/register_card.rb +27 -22
- data/lib/citypay_api_client/models/remittance_data.rb +404 -0
- data/lib/citypay_api_client/models/remittance_report_request.rb +265 -0
- data/lib/citypay_api_client/models/remittance_report_response.rb +252 -0
- data/lib/citypay_api_client/models/remitted_client_data.rb +612 -0
- data/lib/citypay_api_client/models/request_challenged.rb +15 -20
- data/lib/citypay_api_client/models/retrieve_request.rb +23 -22
- data/lib/citypay_api_client/models/three_d_secure.rb +16 -21
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +23 -24
- data/lib/citypay_api_client/models/void_request.rb +23 -22
- data/lib/citypay_api_client/version.rb +3 -3
- data/lib/citypay_api_client.rb +16 -3
- data/spec/api/reporting_api___spec.rb +99 -0
- data/spec/it_api_sandbox_spec.rb +5 -14
- data/spec/models/account_create_spec.rb +1 -2
- data/spec/models/account_status_spec.rb +2 -2
- data/spec/models/airline_advice_spec.rb +0 -2
- data/spec/models/airline_segment_spec.rb +0 -2
- data/spec/models/auth_request_spec.rb +0 -2
- data/spec/models/auth_response_spec.rb +75 -30
- data/spec/models/batch_report_request_spec.rb +0 -2
- data/spec/models/batch_report_response_model_spec.rb +0 -2
- data/spec/models/batch_spec.rb +0 -2
- data/spec/models/batch_transaction_report_request_spec.rb +47 -0
- data/spec/models/batch_transaction_report_response_spec.rb +53 -0
- data/spec/models/batch_transaction_result_model_spec.rb +0 -2
- data/spec/models/batch_transaction_spec.rb +0 -2
- data/spec/models/bin_lookup_spec.rb +0 -2
- data/spec/models/capture_request_spec.rb +0 -2
- data/spec/models/card_holder_account_spec.rb +0 -2
- data/spec/models/charge_request_spec.rb +0 -2
- data/spec/models/decision_spec.rb +0 -26
- data/spec/models/direct_post_request_spec.rb +0 -2
- data/spec/models/domain_key_check_request_spec.rb +0 -2
- data/spec/models/merchant_batch_report_request_spec.rb +65 -0
- data/spec/models/merchant_batch_report_response_spec.rb +53 -0
- data/spec/models/merchant_batch_response_spec.rb +71 -0
- data/spec/models/net_summary_response_spec.rb +77 -0
- data/spec/models/paylink_resend_notification_request_spec.rb +41 -0
- data/spec/models/paylink_token_request_model_spec.rb +0 -2
- data/spec/models/payment_intent_reference_spec.rb +35 -0
- data/spec/models/payment_intent_spec.rb +107 -0
- data/spec/models/process_batch_request_spec.rb +0 -2
- data/spec/models/refund_request_spec.rb +0 -2
- data/spec/models/register_card_spec.rb +0 -2
- data/spec/models/remittance_data_spec.rb +65 -0
- data/spec/models/remittance_report_request_spec.rb +65 -0
- data/spec/models/remittance_report_response_spec.rb +53 -0
- data/spec/models/remitted_client_data_spec.rb +113 -0
- data/spec/spec_helper.rb +2 -2
- metadata +146 -78
- data/docs/OperationalApi.md +0 -214
- data/docs/PaymentProcessingApi.md +0 -559
- data/spec/models/authen_required_spec.rb +0 -52
@@ -0,0 +1,472 @@
|
|
1
|
+
=begin
|
2
|
+
#CityPay Payment API
|
3
|
+
|
4
|
+
# Welcome to the CityPay API, a robust HTTP API payment solution designed for seamless server-to-server transactional processing. Our API facilitates a wide array of payment operations, catering to diverse business needs. Whether you're integrating Internet payments, handling Mail Order/Telephone Order (MOTO) transactions, managing Subscriptions with Recurring and Continuous Authority payments, or navigating the complexities of 3-D Secure authentication, our API is equipped to support your requirements. Additionally, we offer functionalities for Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids, and Completion processing, alongside the capability for tokenised payments. ## Compliance and Security Overview <aside class=\"notice\"> Ensuring the security of payment transactions and compliance with industry standards is paramount. Our API is designed with stringent security measures and compliance protocols to safeguard sensitive information and meet the rigorous requirements of Visa, MasterCard, and the PCI Security Standards Council. </aside> ### Key Compliance and Security Measures * **TLS Encryption**: All data transmissions must utilise TLS version 1.2 or higher, employing [strong cryptography](#enabled-tls-ciphers). Our infrastructure strictly enforces this requirement to maintain the integrity and confidentiality of data in transit. We conduct regular scans and assessments of our TLS endpoints to identify and mitigate vulnerabilities. * **Data Storage Prohibitions**: Storing sensitive cardholder data (CHD), such as the card security code (CSC) or primary account number (PAN), is strictly prohibited. Our API is designed to minimize your exposure to sensitive data, thereby reducing your compliance burden. * **Data Masking**: For consumer protection and compliance, full card numbers must not be displayed on receipts or any customer-facing materials. Our API automatically masks PANs, displaying only the last four digits to facilitate safe receipt generation. * **Network Scans**: If your application is web-based, regular scans of your hosting environment are mandatory to identify and rectify potential vulnerabilities. This proactive measure is crucial for maintaining a secure and compliant online presence. * **PCI Compliance**: Adherence to PCI DSS standards is not optional; it's a requirement for operating securely and legally in the payments ecosystem. For detailed information on compliance requirements and resources, please visit the PCI Security Standards Council website [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/). * **Request Validation**: Our API includes mechanisms to verify the legitimacy of each request, ensuring it pertains to a valid account and originates from a trusted source. We leverage remote IP address verification alongside sophisticated application firewall technologies to thwart a wide array of common security threats. ## Getting Started Before integrating with the CityPay API, ensure your application and development practices align with the outlined compliance and security measures. This preparatory step is crucial for a smooth integration process and the long-term success of your payment processing operations. For further details on API endpoints, request/response formats, and code examples, proceed to the subsequent sections of our documentation. Our aim is to provide you with all the necessary tools and information to integrate our payment processing capabilities seamlessly into your application. Thank you for choosing CityPay API. We look forward to supporting your payment processing needs with our secure, compliant, and versatile API solution.
|
5
|
+
|
6
|
+
Contact: support@citypay.com
|
7
|
+
Generated by: https://openapi-generator.tech
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
require 'time'
|
14
|
+
|
15
|
+
module CityPayApiClient
|
16
|
+
class NetSummaryResponse
|
17
|
+
# The total value of refund (credit) transaction items. Represents the sum of funds returned to customers.
|
18
|
+
attr_accessor :credit_items_amount
|
19
|
+
|
20
|
+
# The count of refund (credit) transaction items. Reflects the number of refund transactions processed.
|
21
|
+
attr_accessor :credit_items_count
|
22
|
+
|
23
|
+
# The total value of refund (credit) transaction items. Represents the sum of funds returned to customers.
|
24
|
+
attr_accessor :credit_items_value
|
25
|
+
|
26
|
+
# The total value of charge (debit) transaction items. Represents the sum of funds received from charges.
|
27
|
+
attr_accessor :debit_items_amount
|
28
|
+
|
29
|
+
# The count of charge (debit) transaction items. Indicates the number of charge transactions processed.
|
30
|
+
attr_accessor :debit_items_count
|
31
|
+
|
32
|
+
# The total value of charge (debit) transaction items. Represents the sum of funds received from charges.
|
33
|
+
attr_accessor :debit_items_value
|
34
|
+
|
35
|
+
# The absolute net value, reflecting the net gain or loss from transactions.
|
36
|
+
attr_accessor :net_amount
|
37
|
+
|
38
|
+
# The total count of all transaction items.
|
39
|
+
attr_accessor :total_count
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
:'credit_items_amount' => :'credit_items_amount',
|
45
|
+
:'credit_items_count' => :'credit_items_count',
|
46
|
+
:'credit_items_value' => :'credit_items_value',
|
47
|
+
:'debit_items_amount' => :'debit_items_amount',
|
48
|
+
:'debit_items_count' => :'debit_items_count',
|
49
|
+
:'debit_items_value' => :'debit_items_value',
|
50
|
+
:'net_amount' => :'net_amount',
|
51
|
+
:'total_count' => :'total_count'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Returns all the JSON keys this model knows about
|
56
|
+
def self.acceptable_attributes
|
57
|
+
attribute_map.values
|
58
|
+
end
|
59
|
+
|
60
|
+
# Attribute type mapping.
|
61
|
+
def self.openapi_types
|
62
|
+
{
|
63
|
+
:'credit_items_amount' => :'String',
|
64
|
+
:'credit_items_count' => :'Integer',
|
65
|
+
:'credit_items_value' => :'Integer',
|
66
|
+
:'debit_items_amount' => :'String',
|
67
|
+
:'debit_items_count' => :'Integer',
|
68
|
+
:'debit_items_value' => :'Integer',
|
69
|
+
:'net_amount' => :'Integer',
|
70
|
+
:'total_count' => :'Integer'
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# List of attributes with nullable: true
|
75
|
+
def self.openapi_nullable
|
76
|
+
Set.new([
|
77
|
+
])
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
if (!attributes.is_a?(Hash))
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `CityPayApiClient::NetSummaryResponse` initialize method"
|
85
|
+
end
|
86
|
+
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
89
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `CityPayApiClient::NetSummaryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
91
|
+
end
|
92
|
+
h[k.to_sym] = v
|
93
|
+
}
|
94
|
+
|
95
|
+
if attributes.key?(:'credit_items_amount')
|
96
|
+
self.credit_items_amount = attributes[:'credit_items_amount']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'credit_items_count')
|
100
|
+
self.credit_items_count = attributes[:'credit_items_count']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'credit_items_value')
|
104
|
+
self.credit_items_value = attributes[:'credit_items_value']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'debit_items_amount')
|
108
|
+
self.debit_items_amount = attributes[:'debit_items_amount']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'debit_items_count')
|
112
|
+
self.debit_items_count = attributes[:'debit_items_count']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'debit_items_value')
|
116
|
+
self.debit_items_value = attributes[:'debit_items_value']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'net_amount')
|
120
|
+
self.net_amount = attributes[:'net_amount']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'total_count')
|
124
|
+
self.total_count = attributes[:'total_count']
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
129
|
+
# @return Array for valid properties with the reasons
|
130
|
+
def list_invalid_properties
|
131
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
132
|
+
invalid_properties = Array.new
|
133
|
+
if !@credit_items_count.nil? && @credit_items_count > 999999
|
134
|
+
invalid_properties.push('invalid value for "credit_items_count", must be smaller than or equal to 999999.')
|
135
|
+
end
|
136
|
+
|
137
|
+
if !@credit_items_count.nil? && @credit_items_count < 0
|
138
|
+
invalid_properties.push('invalid value for "credit_items_count", must be greater than or equal to 0.')
|
139
|
+
end
|
140
|
+
|
141
|
+
if !@credit_items_value.nil? && @credit_items_value > 999999999
|
142
|
+
invalid_properties.push('invalid value for "credit_items_value", must be smaller than or equal to 999999999.')
|
143
|
+
end
|
144
|
+
|
145
|
+
if !@credit_items_value.nil? && @credit_items_value < 0
|
146
|
+
invalid_properties.push('invalid value for "credit_items_value", must be greater than or equal to 0.')
|
147
|
+
end
|
148
|
+
|
149
|
+
if !@debit_items_count.nil? && @debit_items_count > 999999
|
150
|
+
invalid_properties.push('invalid value for "debit_items_count", must be smaller than or equal to 999999.')
|
151
|
+
end
|
152
|
+
|
153
|
+
if !@debit_items_count.nil? && @debit_items_count < 0
|
154
|
+
invalid_properties.push('invalid value for "debit_items_count", must be greater than or equal to 0.')
|
155
|
+
end
|
156
|
+
|
157
|
+
if !@debit_items_value.nil? && @debit_items_value > 999999999
|
158
|
+
invalid_properties.push('invalid value for "debit_items_value", must be smaller than or equal to 999999999.')
|
159
|
+
end
|
160
|
+
|
161
|
+
if !@debit_items_value.nil? && @debit_items_value < 0
|
162
|
+
invalid_properties.push('invalid value for "debit_items_value", must be greater than or equal to 0.')
|
163
|
+
end
|
164
|
+
|
165
|
+
if !@net_amount.nil? && @net_amount > 999999999
|
166
|
+
invalid_properties.push('invalid value for "net_amount", must be smaller than or equal to 999999999.')
|
167
|
+
end
|
168
|
+
|
169
|
+
if !@net_amount.nil? && @net_amount < 0
|
170
|
+
invalid_properties.push('invalid value for "net_amount", must be greater than or equal to 0.')
|
171
|
+
end
|
172
|
+
|
173
|
+
if !@total_count.nil? && @total_count > 999999
|
174
|
+
invalid_properties.push('invalid value for "total_count", must be smaller than or equal to 999999.')
|
175
|
+
end
|
176
|
+
|
177
|
+
if !@total_count.nil? && @total_count < 0
|
178
|
+
invalid_properties.push('invalid value for "total_count", must be greater than or equal to 0.')
|
179
|
+
end
|
180
|
+
|
181
|
+
invalid_properties
|
182
|
+
end
|
183
|
+
|
184
|
+
# Check to see if the all the properties in the model are valid
|
185
|
+
# @return true if the model is valid
|
186
|
+
def valid?
|
187
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
188
|
+
return false if !@credit_items_count.nil? && @credit_items_count > 999999
|
189
|
+
return false if !@credit_items_count.nil? && @credit_items_count < 0
|
190
|
+
return false if !@credit_items_value.nil? && @credit_items_value > 999999999
|
191
|
+
return false if !@credit_items_value.nil? && @credit_items_value < 0
|
192
|
+
return false if !@debit_items_count.nil? && @debit_items_count > 999999
|
193
|
+
return false if !@debit_items_count.nil? && @debit_items_count < 0
|
194
|
+
return false if !@debit_items_value.nil? && @debit_items_value > 999999999
|
195
|
+
return false if !@debit_items_value.nil? && @debit_items_value < 0
|
196
|
+
return false if !@net_amount.nil? && @net_amount > 999999999
|
197
|
+
return false if !@net_amount.nil? && @net_amount < 0
|
198
|
+
return false if !@total_count.nil? && @total_count > 999999
|
199
|
+
return false if !@total_count.nil? && @total_count < 0
|
200
|
+
true
|
201
|
+
end
|
202
|
+
|
203
|
+
# Custom attribute writer method with validation
|
204
|
+
# @param [Object] credit_items_amount Value to be assigned
|
205
|
+
def credit_items_amount=(credit_items_amount)
|
206
|
+
if credit_items_amount.nil?
|
207
|
+
fail ArgumentError, 'credit_items_amount cannot be nil'
|
208
|
+
end
|
209
|
+
|
210
|
+
@credit_items_amount = credit_items_amount
|
211
|
+
end
|
212
|
+
|
213
|
+
# Custom attribute writer method with validation
|
214
|
+
# @param [Object] credit_items_count Value to be assigned
|
215
|
+
def credit_items_count=(credit_items_count)
|
216
|
+
if credit_items_count.nil?
|
217
|
+
fail ArgumentError, 'credit_items_count cannot be nil'
|
218
|
+
end
|
219
|
+
|
220
|
+
if credit_items_count > 999999
|
221
|
+
fail ArgumentError, 'invalid value for "credit_items_count", must be smaller than or equal to 999999.'
|
222
|
+
end
|
223
|
+
|
224
|
+
if credit_items_count < 0
|
225
|
+
fail ArgumentError, 'invalid value for "credit_items_count", must be greater than or equal to 0.'
|
226
|
+
end
|
227
|
+
|
228
|
+
@credit_items_count = credit_items_count
|
229
|
+
end
|
230
|
+
|
231
|
+
# Custom attribute writer method with validation
|
232
|
+
# @param [Object] credit_items_value Value to be assigned
|
233
|
+
def credit_items_value=(credit_items_value)
|
234
|
+
if credit_items_value.nil?
|
235
|
+
fail ArgumentError, 'credit_items_value cannot be nil'
|
236
|
+
end
|
237
|
+
|
238
|
+
if credit_items_value > 999999999
|
239
|
+
fail ArgumentError, 'invalid value for "credit_items_value", must be smaller than or equal to 999999999.'
|
240
|
+
end
|
241
|
+
|
242
|
+
if credit_items_value < 0
|
243
|
+
fail ArgumentError, 'invalid value for "credit_items_value", must be greater than or equal to 0.'
|
244
|
+
end
|
245
|
+
|
246
|
+
@credit_items_value = credit_items_value
|
247
|
+
end
|
248
|
+
|
249
|
+
# Custom attribute writer method with validation
|
250
|
+
# @param [Object] debit_items_amount Value to be assigned
|
251
|
+
def debit_items_amount=(debit_items_amount)
|
252
|
+
if debit_items_amount.nil?
|
253
|
+
fail ArgumentError, 'debit_items_amount cannot be nil'
|
254
|
+
end
|
255
|
+
|
256
|
+
@debit_items_amount = debit_items_amount
|
257
|
+
end
|
258
|
+
|
259
|
+
# Custom attribute writer method with validation
|
260
|
+
# @param [Object] debit_items_count Value to be assigned
|
261
|
+
def debit_items_count=(debit_items_count)
|
262
|
+
if debit_items_count.nil?
|
263
|
+
fail ArgumentError, 'debit_items_count cannot be nil'
|
264
|
+
end
|
265
|
+
|
266
|
+
if debit_items_count > 999999
|
267
|
+
fail ArgumentError, 'invalid value for "debit_items_count", must be smaller than or equal to 999999.'
|
268
|
+
end
|
269
|
+
|
270
|
+
if debit_items_count < 0
|
271
|
+
fail ArgumentError, 'invalid value for "debit_items_count", must be greater than or equal to 0.'
|
272
|
+
end
|
273
|
+
|
274
|
+
@debit_items_count = debit_items_count
|
275
|
+
end
|
276
|
+
|
277
|
+
# Custom attribute writer method with validation
|
278
|
+
# @param [Object] debit_items_value Value to be assigned
|
279
|
+
def debit_items_value=(debit_items_value)
|
280
|
+
if debit_items_value.nil?
|
281
|
+
fail ArgumentError, 'debit_items_value cannot be nil'
|
282
|
+
end
|
283
|
+
|
284
|
+
if debit_items_value > 999999999
|
285
|
+
fail ArgumentError, 'invalid value for "debit_items_value", must be smaller than or equal to 999999999.'
|
286
|
+
end
|
287
|
+
|
288
|
+
if debit_items_value < 0
|
289
|
+
fail ArgumentError, 'invalid value for "debit_items_value", must be greater than or equal to 0.'
|
290
|
+
end
|
291
|
+
|
292
|
+
@debit_items_value = debit_items_value
|
293
|
+
end
|
294
|
+
|
295
|
+
# Custom attribute writer method with validation
|
296
|
+
# @param [Object] net_amount Value to be assigned
|
297
|
+
def net_amount=(net_amount)
|
298
|
+
if net_amount.nil?
|
299
|
+
fail ArgumentError, 'net_amount cannot be nil'
|
300
|
+
end
|
301
|
+
|
302
|
+
if net_amount > 999999999
|
303
|
+
fail ArgumentError, 'invalid value for "net_amount", must be smaller than or equal to 999999999.'
|
304
|
+
end
|
305
|
+
|
306
|
+
if net_amount < 0
|
307
|
+
fail ArgumentError, 'invalid value for "net_amount", must be greater than or equal to 0.'
|
308
|
+
end
|
309
|
+
|
310
|
+
@net_amount = net_amount
|
311
|
+
end
|
312
|
+
|
313
|
+
# Custom attribute writer method with validation
|
314
|
+
# @param [Object] total_count Value to be assigned
|
315
|
+
def total_count=(total_count)
|
316
|
+
if total_count.nil?
|
317
|
+
fail ArgumentError, 'total_count cannot be nil'
|
318
|
+
end
|
319
|
+
|
320
|
+
if total_count > 999999
|
321
|
+
fail ArgumentError, 'invalid value for "total_count", must be smaller than or equal to 999999.'
|
322
|
+
end
|
323
|
+
|
324
|
+
if total_count < 0
|
325
|
+
fail ArgumentError, 'invalid value for "total_count", must be greater than or equal to 0.'
|
326
|
+
end
|
327
|
+
|
328
|
+
@total_count = total_count
|
329
|
+
end
|
330
|
+
|
331
|
+
# Checks equality by comparing each attribute.
|
332
|
+
# @param [Object] Object to be compared
|
333
|
+
def ==(o)
|
334
|
+
return true if self.equal?(o)
|
335
|
+
self.class == o.class &&
|
336
|
+
credit_items_amount == o.credit_items_amount &&
|
337
|
+
credit_items_count == o.credit_items_count &&
|
338
|
+
credit_items_value == o.credit_items_value &&
|
339
|
+
debit_items_amount == o.debit_items_amount &&
|
340
|
+
debit_items_count == o.debit_items_count &&
|
341
|
+
debit_items_value == o.debit_items_value &&
|
342
|
+
net_amount == o.net_amount &&
|
343
|
+
total_count == o.total_count
|
344
|
+
end
|
345
|
+
|
346
|
+
# @see the `==` method
|
347
|
+
# @param [Object] Object to be compared
|
348
|
+
def eql?(o)
|
349
|
+
self == o
|
350
|
+
end
|
351
|
+
|
352
|
+
# Calculates hash code according to all attributes.
|
353
|
+
# @return [Integer] Hash code
|
354
|
+
def hash
|
355
|
+
[credit_items_amount, credit_items_count, credit_items_value, debit_items_amount, debit_items_count, debit_items_value, net_amount, total_count].hash
|
356
|
+
end
|
357
|
+
|
358
|
+
# Builds the object from hash
|
359
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
360
|
+
# @return [Object] Returns the model itself
|
361
|
+
def self.build_from_hash(attributes)
|
362
|
+
return nil unless attributes.is_a?(Hash)
|
363
|
+
attributes = attributes.transform_keys(&:to_sym)
|
364
|
+
transformed_hash = {}
|
365
|
+
openapi_types.each_pair do |key, type|
|
366
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
367
|
+
transformed_hash["#{key}"] = nil
|
368
|
+
elsif type =~ /\AArray<(.*)>/i
|
369
|
+
# check to ensure the input is an array given that the attribute
|
370
|
+
# is documented as an array but the input is not
|
371
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
372
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
373
|
+
end
|
374
|
+
elsif !attributes[attribute_map[key]].nil?
|
375
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
376
|
+
end
|
377
|
+
end
|
378
|
+
new(transformed_hash)
|
379
|
+
end
|
380
|
+
|
381
|
+
# Deserializes the data based on type
|
382
|
+
# @param string type Data type
|
383
|
+
# @param string value Value to be deserialized
|
384
|
+
# @return [Object] Deserialized data
|
385
|
+
def self._deserialize(type, value)
|
386
|
+
case type.to_sym
|
387
|
+
when :Time
|
388
|
+
Time.parse(value)
|
389
|
+
when :Date
|
390
|
+
Date.parse(value)
|
391
|
+
when :String
|
392
|
+
value.to_s
|
393
|
+
when :Integer
|
394
|
+
value.to_i
|
395
|
+
when :Float
|
396
|
+
value.to_f
|
397
|
+
when :Boolean
|
398
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
399
|
+
true
|
400
|
+
else
|
401
|
+
false
|
402
|
+
end
|
403
|
+
when :Object
|
404
|
+
# generic object (usually a Hash), return directly
|
405
|
+
value
|
406
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
407
|
+
inner_type = Regexp.last_match[:inner_type]
|
408
|
+
value.map { |v| _deserialize(inner_type, v) }
|
409
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
410
|
+
k_type = Regexp.last_match[:k_type]
|
411
|
+
v_type = Regexp.last_match[:v_type]
|
412
|
+
{}.tap do |hash|
|
413
|
+
value.each do |k, v|
|
414
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
415
|
+
end
|
416
|
+
end
|
417
|
+
else # model
|
418
|
+
# models (e.g. Pet) or oneOf
|
419
|
+
klass = CityPayApiClient.const_get(type)
|
420
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
421
|
+
end
|
422
|
+
end
|
423
|
+
|
424
|
+
# Returns the string representation of the object
|
425
|
+
# @return [String] String presentation of the object
|
426
|
+
def to_s
|
427
|
+
to_hash.to_s
|
428
|
+
end
|
429
|
+
|
430
|
+
# to_body is an alias to to_hash (backward compatibility)
|
431
|
+
# @return [Hash] Returns the object in the form of hash
|
432
|
+
def to_body
|
433
|
+
to_hash
|
434
|
+
end
|
435
|
+
|
436
|
+
# Returns the object in the form of hash
|
437
|
+
# @return [Hash] Returns the object in the form of hash
|
438
|
+
def to_hash
|
439
|
+
hash = {}
|
440
|
+
self.class.attribute_map.each_pair do |attr, param|
|
441
|
+
value = self.send(attr)
|
442
|
+
if value.nil?
|
443
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
444
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
445
|
+
end
|
446
|
+
|
447
|
+
hash[param] = _to_hash(value)
|
448
|
+
end
|
449
|
+
hash
|
450
|
+
end
|
451
|
+
|
452
|
+
# Outputs non-array value in the form of hash
|
453
|
+
# For object, use to_hash. Otherwise, just return the value
|
454
|
+
# @param [Object] value Any valid value
|
455
|
+
# @return [Hash] Returns the value in the form of hash
|
456
|
+
def _to_hash(value)
|
457
|
+
if value.is_a?(Array)
|
458
|
+
value.compact.map { |v| _to_hash(v) }
|
459
|
+
elsif value.is_a?(Hash)
|
460
|
+
{}.tap do |hash|
|
461
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
462
|
+
end
|
463
|
+
elsif value.respond_to? :to_hash
|
464
|
+
value.to_hash
|
465
|
+
else
|
466
|
+
value
|
467
|
+
end
|
468
|
+
end
|
469
|
+
|
470
|
+
end
|
471
|
+
|
472
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
#
|
4
|
+
# Welcome to the CityPay API, a robust HTTP API payment solution designed for seamless server-to-server transactional processing. Our API facilitates a wide array of payment operations, catering to diverse business needs. Whether you're integrating Internet payments, handling Mail Order/Telephone Order (MOTO) transactions, managing Subscriptions with Recurring and Continuous Authority payments, or navigating the complexities of 3-D Secure authentication, our API is equipped to support your requirements. Additionally, we offer functionalities for Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids, and Completion processing, alongside the capability for tokenised payments. ## Compliance and Security Overview <aside class=\"notice\"> Ensuring the security of payment transactions and compliance with industry standards is paramount. Our API is designed with stringent security measures and compliance protocols to safeguard sensitive information and meet the rigorous requirements of Visa, MasterCard, and the PCI Security Standards Council. </aside> ### Key Compliance and Security Measures * **TLS Encryption**: All data transmissions must utilise TLS version 1.2 or higher, employing [strong cryptography](#enabled-tls-ciphers). Our infrastructure strictly enforces this requirement to maintain the integrity and confidentiality of data in transit. We conduct regular scans and assessments of our TLS endpoints to identify and mitigate vulnerabilities. * **Data Storage Prohibitions**: Storing sensitive cardholder data (CHD), such as the card security code (CSC) or primary account number (PAN), is strictly prohibited. Our API is designed to minimize your exposure to sensitive data, thereby reducing your compliance burden. * **Data Masking**: For consumer protection and compliance, full card numbers must not be displayed on receipts or any customer-facing materials. Our API automatically masks PANs, displaying only the last four digits to facilitate safe receipt generation. * **Network Scans**: If your application is web-based, regular scans of your hosting environment are mandatory to identify and rectify potential vulnerabilities. This proactive measure is crucial for maintaining a secure and compliant online presence. * **PCI Compliance**: Adherence to PCI DSS standards is not optional; it's a requirement for operating securely and legally in the payments ecosystem. For detailed information on compliance requirements and resources, please visit the PCI Security Standards Council website [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/). * **Request Validation**: Our API includes mechanisms to verify the legitimacy of each request, ensuring it pertains to a valid account and originates from a trusted source. We leverage remote IP address verification alongside sophisticated application firewall technologies to thwart a wide array of common security threats. ## Getting Started Before integrating with the CityPay API, ensure your application and development practices align with the outlined compliance and security measures. This preparatory step is crucial for a smooth integration process and the long-term success of your payment processing operations. For further details on API endpoints, request/response formats, and code examples, proceed to the subsequent sections of our documentation. Our aim is to provide you with all the necessary tools and information to integrate our payment processing capabilities seamlessly into your application. Thank you for choosing CityPay API. We look forward to supporting your payment processing needs with our secure, compliant, and versatile API solution.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 7.2.0
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
@@ -64,16 +64,21 @@ module CityPayApiClient
|
|
64
64
|
|
65
65
|
if attributes.key?(:'md')
|
66
66
|
self.md = attributes[:'md']
|
67
|
+
else
|
68
|
+
self.md = nil
|
67
69
|
end
|
68
70
|
|
69
71
|
if attributes.key?(:'pares')
|
70
72
|
self.pares = attributes[:'pares']
|
73
|
+
else
|
74
|
+
self.pares = nil
|
71
75
|
end
|
72
76
|
end
|
73
77
|
|
74
78
|
# Show invalid properties with the reasons. Usually used together with valid?
|
75
79
|
# @return Array for valid properties with the reasons
|
76
80
|
def list_invalid_properties
|
81
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
77
82
|
invalid_properties = Array.new
|
78
83
|
if @md.nil?
|
79
84
|
invalid_properties.push('invalid value for "md", md cannot be nil.')
|
@@ -89,6 +94,7 @@ module CityPayApiClient
|
|
89
94
|
# Check to see if the all the properties in the model are valid
|
90
95
|
# @return true if the model is valid
|
91
96
|
def valid?
|
97
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
92
98
|
return false if @md.nil?
|
93
99
|
return false if @pares.nil?
|
94
100
|
true
|
@@ -119,37 +125,30 @@ module CityPayApiClient
|
|
119
125
|
# @param [Hash] attributes Model attributes in the form of hash
|
120
126
|
# @return [Object] Returns the model itself
|
121
127
|
def self.build_from_hash(attributes)
|
122
|
-
new.build_from_hash(attributes)
|
123
|
-
end
|
124
|
-
|
125
|
-
# Builds the object from hash
|
126
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
-
# @return [Object] Returns the model itself
|
128
|
-
def build_from_hash(attributes)
|
129
128
|
return nil unless attributes.is_a?(Hash)
|
130
129
|
attributes = attributes.transform_keys(&:to_sym)
|
131
|
-
|
132
|
-
|
133
|
-
|
130
|
+
transformed_hash = {}
|
131
|
+
openapi_types.each_pair do |key, type|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = nil
|
134
134
|
elsif type =~ /\AArray<(.*)>/i
|
135
135
|
# check to ensure the input is an array given that the attribute
|
136
136
|
# is documented as an array but the input is not
|
137
|
-
if attributes[
|
138
|
-
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
139
139
|
end
|
140
|
-
elsif !attributes[
|
141
|
-
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
142
142
|
end
|
143
143
|
end
|
144
|
-
|
145
|
-
self
|
144
|
+
new(transformed_hash)
|
146
145
|
end
|
147
146
|
|
148
147
|
# Deserializes the data based on type
|
149
148
|
# @param string type Data type
|
150
149
|
# @param string value Value to be deserialized
|
151
150
|
# @return [Object] Deserialized data
|
152
|
-
def _deserialize(type, value)
|
151
|
+
def self._deserialize(type, value)
|
153
152
|
case type.to_sym
|
154
153
|
when :Time
|
155
154
|
Time.parse(value)
|
@@ -184,7 +183,7 @@ module CityPayApiClient
|
|
184
183
|
else # model
|
185
184
|
# models (e.g. Pet) or oneOf
|
186
185
|
klass = CityPayApiClient.const_get(type)
|
187
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
187
|
end
|
189
188
|
end
|
190
189
|
|