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,612 @@
|
|
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 RemittedClientData
|
17
|
+
attr_accessor :batches
|
18
|
+
|
19
|
+
# The client id that the remittance data is for.
|
20
|
+
attr_accessor :clientid
|
21
|
+
|
22
|
+
# The date of the remittance.
|
23
|
+
attr_accessor :date
|
24
|
+
|
25
|
+
# The date time that the remittance was created.
|
26
|
+
attr_accessor :date_created
|
27
|
+
|
28
|
+
# Represents the net amount after accounting for refunds. This is calculated as SalesAmount - RefundAmount and expressed in the smallest currency unit.
|
29
|
+
attr_accessor :net_amount
|
30
|
+
|
31
|
+
# The total monetary amount processed consisting of sale and refund transactions.
|
32
|
+
attr_accessor :processed_amount
|
33
|
+
|
34
|
+
# Indicates the total number of sales and refund transactions that occurred. This count provides insight into the volume of processing.
|
35
|
+
attr_accessor :processed_count
|
36
|
+
|
37
|
+
# The total amount refunded to customers.
|
38
|
+
attr_accessor :refund_amount
|
39
|
+
|
40
|
+
# The total number of refund transactions processed. This figure helps in understanding the frequency of refunds relative to sales.
|
41
|
+
attr_accessor :refund_count
|
42
|
+
|
43
|
+
attr_accessor :remittances
|
44
|
+
|
45
|
+
# The total monetary amount of sales transactions.
|
46
|
+
attr_accessor :sales_amount
|
47
|
+
|
48
|
+
# Indicates the total number of sales transactions that occurred. This count provides insight into the volume of sales.
|
49
|
+
attr_accessor :sales_count
|
50
|
+
|
51
|
+
# The name of the implementation.
|
52
|
+
attr_accessor :settlement_implementation
|
53
|
+
|
54
|
+
# The uuid of the settlement file processed on.
|
55
|
+
attr_accessor :uuid
|
56
|
+
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
58
|
+
def self.attribute_map
|
59
|
+
{
|
60
|
+
:'batches' => :'batches',
|
61
|
+
:'clientid' => :'clientid',
|
62
|
+
:'date' => :'date',
|
63
|
+
:'date_created' => :'date_created',
|
64
|
+
:'net_amount' => :'net_amount',
|
65
|
+
:'processed_amount' => :'processed_amount',
|
66
|
+
:'processed_count' => :'processed_count',
|
67
|
+
:'refund_amount' => :'refund_amount',
|
68
|
+
:'refund_count' => :'refund_count',
|
69
|
+
:'remittances' => :'remittances',
|
70
|
+
:'sales_amount' => :'sales_amount',
|
71
|
+
:'sales_count' => :'sales_count',
|
72
|
+
:'settlement_implementation' => :'settlement_implementation',
|
73
|
+
:'uuid' => :'uuid'
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
# Returns all the JSON keys this model knows about
|
78
|
+
def self.acceptable_attributes
|
79
|
+
attribute_map.values
|
80
|
+
end
|
81
|
+
|
82
|
+
# Attribute type mapping.
|
83
|
+
def self.openapi_types
|
84
|
+
{
|
85
|
+
:'batches' => :'Array<MerchantBatchResponse>',
|
86
|
+
:'clientid' => :'String',
|
87
|
+
:'date' => :'Date',
|
88
|
+
:'date_created' => :'Time',
|
89
|
+
:'net_amount' => :'Integer',
|
90
|
+
:'processed_amount' => :'Integer',
|
91
|
+
:'processed_count' => :'Integer',
|
92
|
+
:'refund_amount' => :'Integer',
|
93
|
+
:'refund_count' => :'Integer',
|
94
|
+
:'remittances' => :'Array<RemittanceData>',
|
95
|
+
:'sales_amount' => :'Integer',
|
96
|
+
:'sales_count' => :'Integer',
|
97
|
+
:'settlement_implementation' => :'String',
|
98
|
+
:'uuid' => :'String'
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# List of attributes with nullable: true
|
103
|
+
def self.openapi_nullable
|
104
|
+
Set.new([
|
105
|
+
])
|
106
|
+
end
|
107
|
+
|
108
|
+
# Initializes the object
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
def initialize(attributes = {})
|
111
|
+
if (!attributes.is_a?(Hash))
|
112
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `CityPayApiClient::RemittedClientData` initialize method"
|
113
|
+
end
|
114
|
+
|
115
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
116
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
117
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `CityPayApiClient::RemittedClientData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
119
|
+
end
|
120
|
+
h[k.to_sym] = v
|
121
|
+
}
|
122
|
+
|
123
|
+
if attributes.key?(:'batches')
|
124
|
+
if (value = attributes[:'batches']).is_a?(Array)
|
125
|
+
self.batches = value
|
126
|
+
end
|
127
|
+
else
|
128
|
+
self.batches = nil
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'clientid')
|
132
|
+
self.clientid = attributes[:'clientid']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'date')
|
136
|
+
self.date = attributes[:'date']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'date_created')
|
140
|
+
self.date_created = attributes[:'date_created']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'net_amount')
|
144
|
+
self.net_amount = attributes[:'net_amount']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.key?(:'processed_amount')
|
148
|
+
self.processed_amount = attributes[:'processed_amount']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.key?(:'processed_count')
|
152
|
+
self.processed_count = attributes[:'processed_count']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.key?(:'refund_amount')
|
156
|
+
self.refund_amount = attributes[:'refund_amount']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'refund_count')
|
160
|
+
self.refund_count = attributes[:'refund_count']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.key?(:'remittances')
|
164
|
+
if (value = attributes[:'remittances']).is_a?(Array)
|
165
|
+
self.remittances = value
|
166
|
+
end
|
167
|
+
else
|
168
|
+
self.remittances = nil
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.key?(:'sales_amount')
|
172
|
+
self.sales_amount = attributes[:'sales_amount']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.key?(:'sales_count')
|
176
|
+
self.sales_count = attributes[:'sales_count']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.key?(:'settlement_implementation')
|
180
|
+
self.settlement_implementation = attributes[:'settlement_implementation']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.key?(:'uuid')
|
184
|
+
self.uuid = attributes[:'uuid']
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
189
|
+
# @return Array for valid properties with the reasons
|
190
|
+
def list_invalid_properties
|
191
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
192
|
+
invalid_properties = Array.new
|
193
|
+
if @batches.nil?
|
194
|
+
invalid_properties.push('invalid value for "batches", batches cannot be nil.')
|
195
|
+
end
|
196
|
+
|
197
|
+
if !@clientid.nil? && @clientid.to_s.length > 10
|
198
|
+
invalid_properties.push('invalid value for "clientid", the character length must be smaller than or equal to 10.')
|
199
|
+
end
|
200
|
+
|
201
|
+
if !@clientid.nil? && @clientid.to_s.length < 3
|
202
|
+
invalid_properties.push('invalid value for "clientid", the character length must be great than or equal to 3.')
|
203
|
+
end
|
204
|
+
|
205
|
+
if !@net_amount.nil? && @net_amount > 999999999
|
206
|
+
invalid_properties.push('invalid value for "net_amount", must be smaller than or equal to 999999999.')
|
207
|
+
end
|
208
|
+
|
209
|
+
if !@net_amount.nil? && @net_amount < 0
|
210
|
+
invalid_properties.push('invalid value for "net_amount", must be greater than or equal to 0.')
|
211
|
+
end
|
212
|
+
|
213
|
+
if !@processed_amount.nil? && @processed_amount > 999999999
|
214
|
+
invalid_properties.push('invalid value for "processed_amount", must be smaller than or equal to 999999999.')
|
215
|
+
end
|
216
|
+
|
217
|
+
if !@processed_amount.nil? && @processed_amount < 0
|
218
|
+
invalid_properties.push('invalid value for "processed_amount", must be greater than or equal to 0.')
|
219
|
+
end
|
220
|
+
|
221
|
+
if !@processed_count.nil? && @processed_count > 999999999
|
222
|
+
invalid_properties.push('invalid value for "processed_count", must be smaller than or equal to 999999999.')
|
223
|
+
end
|
224
|
+
|
225
|
+
if !@processed_count.nil? && @processed_count < 0
|
226
|
+
invalid_properties.push('invalid value for "processed_count", must be greater than or equal to 0.')
|
227
|
+
end
|
228
|
+
|
229
|
+
if !@refund_amount.nil? && @refund_amount > 999999999
|
230
|
+
invalid_properties.push('invalid value for "refund_amount", must be smaller than or equal to 999999999.')
|
231
|
+
end
|
232
|
+
|
233
|
+
if !@refund_amount.nil? && @refund_amount < 0
|
234
|
+
invalid_properties.push('invalid value for "refund_amount", must be greater than or equal to 0.')
|
235
|
+
end
|
236
|
+
|
237
|
+
if !@refund_count.nil? && @refund_count > 999999999
|
238
|
+
invalid_properties.push('invalid value for "refund_count", must be smaller than or equal to 999999999.')
|
239
|
+
end
|
240
|
+
|
241
|
+
if !@refund_count.nil? && @refund_count < 0
|
242
|
+
invalid_properties.push('invalid value for "refund_count", must be greater than or equal to 0.')
|
243
|
+
end
|
244
|
+
|
245
|
+
if @remittances.nil?
|
246
|
+
invalid_properties.push('invalid value for "remittances", remittances cannot be nil.')
|
247
|
+
end
|
248
|
+
|
249
|
+
if !@sales_amount.nil? && @sales_amount > 999999999
|
250
|
+
invalid_properties.push('invalid value for "sales_amount", must be smaller than or equal to 999999999.')
|
251
|
+
end
|
252
|
+
|
253
|
+
if !@sales_amount.nil? && @sales_amount < 0
|
254
|
+
invalid_properties.push('invalid value for "sales_amount", must be greater than or equal to 0.')
|
255
|
+
end
|
256
|
+
|
257
|
+
if !@sales_count.nil? && @sales_count > 999999999
|
258
|
+
invalid_properties.push('invalid value for "sales_count", must be smaller than or equal to 999999999.')
|
259
|
+
end
|
260
|
+
|
261
|
+
if !@sales_count.nil? && @sales_count < 0
|
262
|
+
invalid_properties.push('invalid value for "sales_count", must be greater than or equal to 0.')
|
263
|
+
end
|
264
|
+
|
265
|
+
if !@uuid.nil? && @uuid.to_s.length > 36
|
266
|
+
invalid_properties.push('invalid value for "uuid", the character length must be smaller than or equal to 36.')
|
267
|
+
end
|
268
|
+
|
269
|
+
if !@uuid.nil? && @uuid.to_s.length < 36
|
270
|
+
invalid_properties.push('invalid value for "uuid", the character length must be great than or equal to 36.')
|
271
|
+
end
|
272
|
+
|
273
|
+
invalid_properties
|
274
|
+
end
|
275
|
+
|
276
|
+
# Check to see if the all the properties in the model are valid
|
277
|
+
# @return true if the model is valid
|
278
|
+
def valid?
|
279
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
280
|
+
return false if @batches.nil?
|
281
|
+
return false if !@clientid.nil? && @clientid.to_s.length > 10
|
282
|
+
return false if !@clientid.nil? && @clientid.to_s.length < 3
|
283
|
+
return false if !@net_amount.nil? && @net_amount > 999999999
|
284
|
+
return false if !@net_amount.nil? && @net_amount < 0
|
285
|
+
return false if !@processed_amount.nil? && @processed_amount > 999999999
|
286
|
+
return false if !@processed_amount.nil? && @processed_amount < 0
|
287
|
+
return false if !@processed_count.nil? && @processed_count > 999999999
|
288
|
+
return false if !@processed_count.nil? && @processed_count < 0
|
289
|
+
return false if !@refund_amount.nil? && @refund_amount > 999999999
|
290
|
+
return false if !@refund_amount.nil? && @refund_amount < 0
|
291
|
+
return false if !@refund_count.nil? && @refund_count > 999999999
|
292
|
+
return false if !@refund_count.nil? && @refund_count < 0
|
293
|
+
return false if @remittances.nil?
|
294
|
+
return false if !@sales_amount.nil? && @sales_amount > 999999999
|
295
|
+
return false if !@sales_amount.nil? && @sales_amount < 0
|
296
|
+
return false if !@sales_count.nil? && @sales_count > 999999999
|
297
|
+
return false if !@sales_count.nil? && @sales_count < 0
|
298
|
+
return false if !@uuid.nil? && @uuid.to_s.length > 36
|
299
|
+
return false if !@uuid.nil? && @uuid.to_s.length < 36
|
300
|
+
true
|
301
|
+
end
|
302
|
+
|
303
|
+
# Custom attribute writer method with validation
|
304
|
+
# @param [Object] clientid Value to be assigned
|
305
|
+
def clientid=(clientid)
|
306
|
+
if clientid.nil?
|
307
|
+
fail ArgumentError, 'clientid cannot be nil'
|
308
|
+
end
|
309
|
+
|
310
|
+
if clientid.to_s.length > 10
|
311
|
+
fail ArgumentError, 'invalid value for "clientid", the character length must be smaller than or equal to 10.'
|
312
|
+
end
|
313
|
+
|
314
|
+
if clientid.to_s.length < 3
|
315
|
+
fail ArgumentError, 'invalid value for "clientid", the character length must be great than or equal to 3.'
|
316
|
+
end
|
317
|
+
|
318
|
+
@clientid = clientid
|
319
|
+
end
|
320
|
+
|
321
|
+
# Custom attribute writer method with validation
|
322
|
+
# @param [Object] net_amount Value to be assigned
|
323
|
+
def net_amount=(net_amount)
|
324
|
+
if net_amount.nil?
|
325
|
+
fail ArgumentError, 'net_amount cannot be nil'
|
326
|
+
end
|
327
|
+
|
328
|
+
if net_amount > 999999999
|
329
|
+
fail ArgumentError, 'invalid value for "net_amount", must be smaller than or equal to 999999999.'
|
330
|
+
end
|
331
|
+
|
332
|
+
if net_amount < 0
|
333
|
+
fail ArgumentError, 'invalid value for "net_amount", must be greater than or equal to 0.'
|
334
|
+
end
|
335
|
+
|
336
|
+
@net_amount = net_amount
|
337
|
+
end
|
338
|
+
|
339
|
+
# Custom attribute writer method with validation
|
340
|
+
# @param [Object] processed_amount Value to be assigned
|
341
|
+
def processed_amount=(processed_amount)
|
342
|
+
if processed_amount.nil?
|
343
|
+
fail ArgumentError, 'processed_amount cannot be nil'
|
344
|
+
end
|
345
|
+
|
346
|
+
if processed_amount > 999999999
|
347
|
+
fail ArgumentError, 'invalid value for "processed_amount", must be smaller than or equal to 999999999.'
|
348
|
+
end
|
349
|
+
|
350
|
+
if processed_amount < 0
|
351
|
+
fail ArgumentError, 'invalid value for "processed_amount", must be greater than or equal to 0.'
|
352
|
+
end
|
353
|
+
|
354
|
+
@processed_amount = processed_amount
|
355
|
+
end
|
356
|
+
|
357
|
+
# Custom attribute writer method with validation
|
358
|
+
# @param [Object] processed_count Value to be assigned
|
359
|
+
def processed_count=(processed_count)
|
360
|
+
if processed_count.nil?
|
361
|
+
fail ArgumentError, 'processed_count cannot be nil'
|
362
|
+
end
|
363
|
+
|
364
|
+
if processed_count > 999999999
|
365
|
+
fail ArgumentError, 'invalid value for "processed_count", must be smaller than or equal to 999999999.'
|
366
|
+
end
|
367
|
+
|
368
|
+
if processed_count < 0
|
369
|
+
fail ArgumentError, 'invalid value for "processed_count", must be greater than or equal to 0.'
|
370
|
+
end
|
371
|
+
|
372
|
+
@processed_count = processed_count
|
373
|
+
end
|
374
|
+
|
375
|
+
# Custom attribute writer method with validation
|
376
|
+
# @param [Object] refund_amount Value to be assigned
|
377
|
+
def refund_amount=(refund_amount)
|
378
|
+
if refund_amount.nil?
|
379
|
+
fail ArgumentError, 'refund_amount cannot be nil'
|
380
|
+
end
|
381
|
+
|
382
|
+
if refund_amount > 999999999
|
383
|
+
fail ArgumentError, 'invalid value for "refund_amount", must be smaller than or equal to 999999999.'
|
384
|
+
end
|
385
|
+
|
386
|
+
if refund_amount < 0
|
387
|
+
fail ArgumentError, 'invalid value for "refund_amount", must be greater than or equal to 0.'
|
388
|
+
end
|
389
|
+
|
390
|
+
@refund_amount = refund_amount
|
391
|
+
end
|
392
|
+
|
393
|
+
# Custom attribute writer method with validation
|
394
|
+
# @param [Object] refund_count Value to be assigned
|
395
|
+
def refund_count=(refund_count)
|
396
|
+
if refund_count.nil?
|
397
|
+
fail ArgumentError, 'refund_count cannot be nil'
|
398
|
+
end
|
399
|
+
|
400
|
+
if refund_count > 999999999
|
401
|
+
fail ArgumentError, 'invalid value for "refund_count", must be smaller than or equal to 999999999.'
|
402
|
+
end
|
403
|
+
|
404
|
+
if refund_count < 0
|
405
|
+
fail ArgumentError, 'invalid value for "refund_count", must be greater than or equal to 0.'
|
406
|
+
end
|
407
|
+
|
408
|
+
@refund_count = refund_count
|
409
|
+
end
|
410
|
+
|
411
|
+
# Custom attribute writer method with validation
|
412
|
+
# @param [Object] sales_amount Value to be assigned
|
413
|
+
def sales_amount=(sales_amount)
|
414
|
+
if sales_amount.nil?
|
415
|
+
fail ArgumentError, 'sales_amount cannot be nil'
|
416
|
+
end
|
417
|
+
|
418
|
+
if sales_amount > 999999999
|
419
|
+
fail ArgumentError, 'invalid value for "sales_amount", must be smaller than or equal to 999999999.'
|
420
|
+
end
|
421
|
+
|
422
|
+
if sales_amount < 0
|
423
|
+
fail ArgumentError, 'invalid value for "sales_amount", must be greater than or equal to 0.'
|
424
|
+
end
|
425
|
+
|
426
|
+
@sales_amount = sales_amount
|
427
|
+
end
|
428
|
+
|
429
|
+
# Custom attribute writer method with validation
|
430
|
+
# @param [Object] sales_count Value to be assigned
|
431
|
+
def sales_count=(sales_count)
|
432
|
+
if sales_count.nil?
|
433
|
+
fail ArgumentError, 'sales_count cannot be nil'
|
434
|
+
end
|
435
|
+
|
436
|
+
if sales_count > 999999999
|
437
|
+
fail ArgumentError, 'invalid value for "sales_count", must be smaller than or equal to 999999999.'
|
438
|
+
end
|
439
|
+
|
440
|
+
if sales_count < 0
|
441
|
+
fail ArgumentError, 'invalid value for "sales_count", must be greater than or equal to 0.'
|
442
|
+
end
|
443
|
+
|
444
|
+
@sales_count = sales_count
|
445
|
+
end
|
446
|
+
|
447
|
+
# Custom attribute writer method with validation
|
448
|
+
# @param [Object] uuid Value to be assigned
|
449
|
+
def uuid=(uuid)
|
450
|
+
if uuid.nil?
|
451
|
+
fail ArgumentError, 'uuid cannot be nil'
|
452
|
+
end
|
453
|
+
|
454
|
+
if uuid.to_s.length > 36
|
455
|
+
fail ArgumentError, 'invalid value for "uuid", the character length must be smaller than or equal to 36.'
|
456
|
+
end
|
457
|
+
|
458
|
+
if uuid.to_s.length < 36
|
459
|
+
fail ArgumentError, 'invalid value for "uuid", the character length must be great than or equal to 36.'
|
460
|
+
end
|
461
|
+
|
462
|
+
@uuid = uuid
|
463
|
+
end
|
464
|
+
|
465
|
+
# Checks equality by comparing each attribute.
|
466
|
+
# @param [Object] Object to be compared
|
467
|
+
def ==(o)
|
468
|
+
return true if self.equal?(o)
|
469
|
+
self.class == o.class &&
|
470
|
+
batches == o.batches &&
|
471
|
+
clientid == o.clientid &&
|
472
|
+
date == o.date &&
|
473
|
+
date_created == o.date_created &&
|
474
|
+
net_amount == o.net_amount &&
|
475
|
+
processed_amount == o.processed_amount &&
|
476
|
+
processed_count == o.processed_count &&
|
477
|
+
refund_amount == o.refund_amount &&
|
478
|
+
refund_count == o.refund_count &&
|
479
|
+
remittances == o.remittances &&
|
480
|
+
sales_amount == o.sales_amount &&
|
481
|
+
sales_count == o.sales_count &&
|
482
|
+
settlement_implementation == o.settlement_implementation &&
|
483
|
+
uuid == o.uuid
|
484
|
+
end
|
485
|
+
|
486
|
+
# @see the `==` method
|
487
|
+
# @param [Object] Object to be compared
|
488
|
+
def eql?(o)
|
489
|
+
self == o
|
490
|
+
end
|
491
|
+
|
492
|
+
# Calculates hash code according to all attributes.
|
493
|
+
# @return [Integer] Hash code
|
494
|
+
def hash
|
495
|
+
[batches, clientid, date, date_created, net_amount, processed_amount, processed_count, refund_amount, refund_count, remittances, sales_amount, sales_count, settlement_implementation, uuid].hash
|
496
|
+
end
|
497
|
+
|
498
|
+
# Builds the object from hash
|
499
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
500
|
+
# @return [Object] Returns the model itself
|
501
|
+
def self.build_from_hash(attributes)
|
502
|
+
return nil unless attributes.is_a?(Hash)
|
503
|
+
attributes = attributes.transform_keys(&:to_sym)
|
504
|
+
transformed_hash = {}
|
505
|
+
openapi_types.each_pair do |key, type|
|
506
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
507
|
+
transformed_hash["#{key}"] = nil
|
508
|
+
elsif type =~ /\AArray<(.*)>/i
|
509
|
+
# check to ensure the input is an array given that the attribute
|
510
|
+
# is documented as an array but the input is not
|
511
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
512
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
513
|
+
end
|
514
|
+
elsif !attributes[attribute_map[key]].nil?
|
515
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
516
|
+
end
|
517
|
+
end
|
518
|
+
new(transformed_hash)
|
519
|
+
end
|
520
|
+
|
521
|
+
# Deserializes the data based on type
|
522
|
+
# @param string type Data type
|
523
|
+
# @param string value Value to be deserialized
|
524
|
+
# @return [Object] Deserialized data
|
525
|
+
def self._deserialize(type, value)
|
526
|
+
case type.to_sym
|
527
|
+
when :Time
|
528
|
+
Time.parse(value)
|
529
|
+
when :Date
|
530
|
+
Date.parse(value)
|
531
|
+
when :String
|
532
|
+
value.to_s
|
533
|
+
when :Integer
|
534
|
+
value.to_i
|
535
|
+
when :Float
|
536
|
+
value.to_f
|
537
|
+
when :Boolean
|
538
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
539
|
+
true
|
540
|
+
else
|
541
|
+
false
|
542
|
+
end
|
543
|
+
when :Object
|
544
|
+
# generic object (usually a Hash), return directly
|
545
|
+
value
|
546
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
547
|
+
inner_type = Regexp.last_match[:inner_type]
|
548
|
+
value.map { |v| _deserialize(inner_type, v) }
|
549
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
550
|
+
k_type = Regexp.last_match[:k_type]
|
551
|
+
v_type = Regexp.last_match[:v_type]
|
552
|
+
{}.tap do |hash|
|
553
|
+
value.each do |k, v|
|
554
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
555
|
+
end
|
556
|
+
end
|
557
|
+
else # model
|
558
|
+
# models (e.g. Pet) or oneOf
|
559
|
+
klass = CityPayApiClient.const_get(type)
|
560
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
564
|
+
# Returns the string representation of the object
|
565
|
+
# @return [String] String presentation of the object
|
566
|
+
def to_s
|
567
|
+
to_hash.to_s
|
568
|
+
end
|
569
|
+
|
570
|
+
# to_body is an alias to to_hash (backward compatibility)
|
571
|
+
# @return [Hash] Returns the object in the form of hash
|
572
|
+
def to_body
|
573
|
+
to_hash
|
574
|
+
end
|
575
|
+
|
576
|
+
# Returns the object in the form of hash
|
577
|
+
# @return [Hash] Returns the object in the form of hash
|
578
|
+
def to_hash
|
579
|
+
hash = {}
|
580
|
+
self.class.attribute_map.each_pair do |attr, param|
|
581
|
+
value = self.send(attr)
|
582
|
+
if value.nil?
|
583
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
584
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
585
|
+
end
|
586
|
+
|
587
|
+
hash[param] = _to_hash(value)
|
588
|
+
end
|
589
|
+
hash
|
590
|
+
end
|
591
|
+
|
592
|
+
# Outputs non-array value in the form of hash
|
593
|
+
# For object, use to_hash. Otherwise, just return the value
|
594
|
+
# @param [Object] value Any valid value
|
595
|
+
# @return [Hash] Returns the value in the form of hash
|
596
|
+
def _to_hash(value)
|
597
|
+
if value.is_a?(Array)
|
598
|
+
value.compact.map { |v| _to_hash(v) }
|
599
|
+
elsif value.is_a?(Hash)
|
600
|
+
{}.tap do |hash|
|
601
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
602
|
+
end
|
603
|
+
elsif value.respond_to? :to_hash
|
604
|
+
value.to_hash
|
605
|
+
else
|
606
|
+
value
|
607
|
+
end
|
608
|
+
end
|
609
|
+
|
610
|
+
end
|
611
|
+
|
612
|
+
end
|