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
@@ -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
|
|
@@ -101,6 +101,7 @@ module CityPayApiClient
|
|
101
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
102
102
|
# @return Array for valid properties with the reasons
|
103
103
|
def list_invalid_properties
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
104
105
|
invalid_properties = Array.new
|
105
106
|
invalid_properties
|
106
107
|
end
|
@@ -108,6 +109,7 @@ module CityPayApiClient
|
|
108
109
|
# Check to see if the all the properties in the model are valid
|
109
110
|
# @return true if the model is valid
|
110
111
|
def valid?
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
111
113
|
true
|
112
114
|
end
|
113
115
|
|
@@ -139,37 +141,30 @@ module CityPayApiClient
|
|
139
141
|
# @param [Hash] attributes Model attributes in the form of hash
|
140
142
|
# @return [Object] Returns the model itself
|
141
143
|
def self.build_from_hash(attributes)
|
142
|
-
new.build_from_hash(attributes)
|
143
|
-
end
|
144
|
-
|
145
|
-
# Builds the object from hash
|
146
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
-
# @return [Object] Returns the model itself
|
148
|
-
def build_from_hash(attributes)
|
149
144
|
return nil unless attributes.is_a?(Hash)
|
150
145
|
attributes = attributes.transform_keys(&:to_sym)
|
151
|
-
|
152
|
-
|
153
|
-
|
146
|
+
transformed_hash = {}
|
147
|
+
openapi_types.each_pair do |key, type|
|
148
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
149
|
+
transformed_hash["#{key}"] = nil
|
154
150
|
elsif type =~ /\AArray<(.*)>/i
|
155
151
|
# check to ensure the input is an array given that the attribute
|
156
152
|
# is documented as an array but the input is not
|
157
|
-
if attributes[
|
158
|
-
|
153
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
154
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
159
155
|
end
|
160
|
-
elsif !attributes[
|
161
|
-
|
156
|
+
elsif !attributes[attribute_map[key]].nil?
|
157
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
162
158
|
end
|
163
159
|
end
|
164
|
-
|
165
|
-
self
|
160
|
+
new(transformed_hash)
|
166
161
|
end
|
167
162
|
|
168
163
|
# Deserializes the data based on type
|
169
164
|
# @param string type Data type
|
170
165
|
# @param string value Value to be deserialized
|
171
166
|
# @return [Object] Deserialized data
|
172
|
-
def _deserialize(type, value)
|
167
|
+
def self._deserialize(type, value)
|
173
168
|
case type.to_sym
|
174
169
|
when :Time
|
175
170
|
Time.parse(value)
|
@@ -204,7 +199,7 @@ module CityPayApiClient
|
|
204
199
|
else # model
|
205
200
|
# models (e.g. Pet) or oneOf
|
206
201
|
klass = CityPayApiClient.const_get(type)
|
207
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
203
|
end
|
209
204
|
end
|
210
205
|
|
@@ -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
|
|
@@ -73,6 +73,8 @@ module CityPayApiClient
|
|
73
73
|
|
74
74
|
if attributes.key?(:'merchantid')
|
75
75
|
self.merchantid = attributes[:'merchantid']
|
76
|
+
else
|
77
|
+
self.merchantid = nil
|
76
78
|
end
|
77
79
|
|
78
80
|
if attributes.key?(:'transno')
|
@@ -83,6 +85,7 @@ module CityPayApiClient
|
|
83
85
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
86
|
# @return Array for valid properties with the reasons
|
85
87
|
def list_invalid_properties
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
86
89
|
invalid_properties = Array.new
|
87
90
|
if !@identifier.nil? && @identifier.to_s.length > 50
|
88
91
|
invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
|
@@ -102,6 +105,7 @@ module CityPayApiClient
|
|
102
105
|
# Check to see if the all the properties in the model are valid
|
103
106
|
# @return true if the model is valid
|
104
107
|
def valid?
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
109
|
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
106
110
|
return false if !@identifier.nil? && @identifier.to_s.length < 4
|
107
111
|
return false if @merchantid.nil?
|
@@ -111,11 +115,15 @@ module CityPayApiClient
|
|
111
115
|
# Custom attribute writer method with validation
|
112
116
|
# @param [Object] identifier Value to be assigned
|
113
117
|
def identifier=(identifier)
|
114
|
-
if
|
118
|
+
if identifier.nil?
|
119
|
+
fail ArgumentError, 'identifier cannot be nil'
|
120
|
+
end
|
121
|
+
|
122
|
+
if identifier.to_s.length > 50
|
115
123
|
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
116
124
|
end
|
117
125
|
|
118
|
-
if
|
126
|
+
if identifier.to_s.length < 4
|
119
127
|
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
120
128
|
end
|
121
129
|
|
@@ -148,37 +156,30 @@ module CityPayApiClient
|
|
148
156
|
# @param [Hash] attributes Model attributes in the form of hash
|
149
157
|
# @return [Object] Returns the model itself
|
150
158
|
def self.build_from_hash(attributes)
|
151
|
-
new.build_from_hash(attributes)
|
152
|
-
end
|
153
|
-
|
154
|
-
# Builds the object from hash
|
155
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
156
|
-
# @return [Object] Returns the model itself
|
157
|
-
def build_from_hash(attributes)
|
158
159
|
return nil unless attributes.is_a?(Hash)
|
159
160
|
attributes = attributes.transform_keys(&:to_sym)
|
160
|
-
|
161
|
-
|
162
|
-
|
161
|
+
transformed_hash = {}
|
162
|
+
openapi_types.each_pair do |key, type|
|
163
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
164
|
+
transformed_hash["#{key}"] = nil
|
163
165
|
elsif type =~ /\AArray<(.*)>/i
|
164
166
|
# check to ensure the input is an array given that the attribute
|
165
167
|
# is documented as an array but the input is not
|
166
|
-
if attributes[
|
167
|
-
|
168
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
169
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
168
170
|
end
|
169
|
-
elsif !attributes[
|
170
|
-
|
171
|
+
elsif !attributes[attribute_map[key]].nil?
|
172
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
171
173
|
end
|
172
174
|
end
|
173
|
-
|
174
|
-
self
|
175
|
+
new(transformed_hash)
|
175
176
|
end
|
176
177
|
|
177
178
|
# Deserializes the data based on type
|
178
179
|
# @param string type Data type
|
179
180
|
# @param string value Value to be deserialized
|
180
181
|
# @return [Object] Deserialized data
|
181
|
-
def _deserialize(type, value)
|
182
|
+
def self._deserialize(type, value)
|
182
183
|
case type.to_sym
|
183
184
|
when :Time
|
184
185
|
Time.parse(value)
|
@@ -213,7 +214,7 @@ module CityPayApiClient
|
|
213
214
|
else # model
|
214
215
|
# models (e.g. Pet) or oneOf
|
215
216
|
klass = CityPayApiClient.const_get(type)
|
216
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
217
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
217
218
|
end
|
218
219
|
end
|
219
220
|
|
@@ -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
|
|
@@ -35,7 +35,7 @@ module CityPayApiClient
|
|
35
35
|
# BrowserScreenWidth field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the `bx` function to gather this value.
|
36
36
|
attr_accessor :browser_screen_width
|
37
37
|
|
38
|
-
# BrowserTZ field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the `bx` function to gather this value.
|
38
|
+
# BrowserTZ offset field used for 3DSv2 browser enablement. Recommendation is to use citypay.js and the `bx` function to gather this value.
|
39
39
|
attr_accessor :browser_tz
|
40
40
|
|
41
41
|
# Required for 3DSv2. Browser extension value produced by the citypay.js `bx` function. See [https://sandbox.citypay.com/3dsv2/bx](https://sandbox.citypay.com/3dsv2/bx) for details.
|
@@ -173,6 +173,7 @@ module CityPayApiClient
|
|
173
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
174
174
|
# @return Array for valid properties with the reasons
|
175
175
|
def list_invalid_properties
|
176
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
176
177
|
invalid_properties = Array.new
|
177
178
|
invalid_properties
|
178
179
|
end
|
@@ -180,6 +181,7 @@ module CityPayApiClient
|
|
180
181
|
# Check to see if the all the properties in the model are valid
|
181
182
|
# @return true if the model is valid
|
182
183
|
def valid?
|
184
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
183
185
|
true
|
184
186
|
end
|
185
187
|
|
@@ -219,37 +221,30 @@ module CityPayApiClient
|
|
219
221
|
# @param [Hash] attributes Model attributes in the form of hash
|
220
222
|
# @return [Object] Returns the model itself
|
221
223
|
def self.build_from_hash(attributes)
|
222
|
-
new.build_from_hash(attributes)
|
223
|
-
end
|
224
|
-
|
225
|
-
# Builds the object from hash
|
226
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
227
|
-
# @return [Object] Returns the model itself
|
228
|
-
def build_from_hash(attributes)
|
229
224
|
return nil unless attributes.is_a?(Hash)
|
230
225
|
attributes = attributes.transform_keys(&:to_sym)
|
231
|
-
|
232
|
-
|
233
|
-
|
226
|
+
transformed_hash = {}
|
227
|
+
openapi_types.each_pair do |key, type|
|
228
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
229
|
+
transformed_hash["#{key}"] = nil
|
234
230
|
elsif type =~ /\AArray<(.*)>/i
|
235
231
|
# check to ensure the input is an array given that the attribute
|
236
232
|
# is documented as an array but the input is not
|
237
|
-
if attributes[
|
238
|
-
|
233
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
234
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
239
235
|
end
|
240
|
-
elsif !attributes[
|
241
|
-
|
236
|
+
elsif !attributes[attribute_map[key]].nil?
|
237
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
242
238
|
end
|
243
239
|
end
|
244
|
-
|
245
|
-
self
|
240
|
+
new(transformed_hash)
|
246
241
|
end
|
247
242
|
|
248
243
|
# Deserializes the data based on type
|
249
244
|
# @param string type Data type
|
250
245
|
# @param string value Value to be deserialized
|
251
246
|
# @return [Object] Deserialized data
|
252
|
-
def _deserialize(type, value)
|
247
|
+
def self._deserialize(type, value)
|
253
248
|
case type.to_sym
|
254
249
|
when :Time
|
255
250
|
Time.parse(value)
|
@@ -284,7 +279,7 @@ module CityPayApiClient
|
|
284
279
|
else # model
|
285
280
|
# models (e.g. Pet) or oneOf
|
286
281
|
klass = CityPayApiClient.const_get(type)
|
287
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
282
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
288
283
|
end
|
289
284
|
end
|
290
285
|
|
@@ -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
|
|
@@ -35,13 +35,13 @@ module CityPayApiClient
|
|
35
35
|
# A masked value of the card number used for processing displaying limited values that can be used on a receipt.
|
36
36
|
attr_accessor :maskedpan
|
37
37
|
|
38
|
-
#
|
38
|
+
# The name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard.
|
39
39
|
attr_accessor :scheme
|
40
40
|
|
41
41
|
# A Base58 encoded SHA-256 digest generated from the token value Base58 decoded and appended with the nonce value UTF-8 decoded.
|
42
42
|
attr_accessor :sig_id
|
43
43
|
|
44
|
-
# The token used for presentment to authorisation later in the
|
44
|
+
# The token used for presentment to authorisation later in the processing flow.
|
45
45
|
attr_accessor :token
|
46
46
|
|
47
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -146,6 +146,7 @@ module CityPayApiClient
|
|
146
146
|
# Show invalid properties with the reasons. Usually used together with valid?
|
147
147
|
# @return Array for valid properties with the reasons
|
148
148
|
def list_invalid_properties
|
149
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
149
150
|
invalid_properties = Array.new
|
150
151
|
if !@identifier.nil? && @identifier.to_s.length > 50
|
151
152
|
invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
|
@@ -161,6 +162,7 @@ module CityPayApiClient
|
|
161
162
|
# Check to see if the all the properties in the model are valid
|
162
163
|
# @return true if the model is valid
|
163
164
|
def valid?
|
165
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
164
166
|
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
165
167
|
return false if !@identifier.nil? && @identifier.to_s.length < 4
|
166
168
|
true
|
@@ -169,11 +171,15 @@ module CityPayApiClient
|
|
169
171
|
# Custom attribute writer method with validation
|
170
172
|
# @param [Object] identifier Value to be assigned
|
171
173
|
def identifier=(identifier)
|
172
|
-
if
|
174
|
+
if identifier.nil?
|
175
|
+
fail ArgumentError, 'identifier cannot be nil'
|
176
|
+
end
|
177
|
+
|
178
|
+
if identifier.to_s.length > 50
|
173
179
|
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
174
180
|
end
|
175
181
|
|
176
|
-
if
|
182
|
+
if identifier.to_s.length < 4
|
177
183
|
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
178
184
|
end
|
179
185
|
|
@@ -213,37 +219,30 @@ module CityPayApiClient
|
|
213
219
|
# @param [Hash] attributes Model attributes in the form of hash
|
214
220
|
# @return [Object] Returns the model itself
|
215
221
|
def self.build_from_hash(attributes)
|
216
|
-
new.build_from_hash(attributes)
|
217
|
-
end
|
218
|
-
|
219
|
-
# Builds the object from hash
|
220
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
221
|
-
# @return [Object] Returns the model itself
|
222
|
-
def build_from_hash(attributes)
|
223
222
|
return nil unless attributes.is_a?(Hash)
|
224
223
|
attributes = attributes.transform_keys(&:to_sym)
|
225
|
-
|
226
|
-
|
227
|
-
|
224
|
+
transformed_hash = {}
|
225
|
+
openapi_types.each_pair do |key, type|
|
226
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
227
|
+
transformed_hash["#{key}"] = nil
|
228
228
|
elsif type =~ /\AArray<(.*)>/i
|
229
229
|
# check to ensure the input is an array given that the attribute
|
230
230
|
# is documented as an array but the input is not
|
231
|
-
if attributes[
|
232
|
-
|
231
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
232
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
233
233
|
end
|
234
|
-
elsif !attributes[
|
235
|
-
|
234
|
+
elsif !attributes[attribute_map[key]].nil?
|
235
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
236
236
|
end
|
237
237
|
end
|
238
|
-
|
239
|
-
self
|
238
|
+
new(transformed_hash)
|
240
239
|
end
|
241
240
|
|
242
241
|
# Deserializes the data based on type
|
243
242
|
# @param string type Data type
|
244
243
|
# @param string value Value to be deserialized
|
245
244
|
# @return [Object] Deserialized data
|
246
|
-
def _deserialize(type, value)
|
245
|
+
def self._deserialize(type, value)
|
247
246
|
case type.to_sym
|
248
247
|
when :Time
|
249
248
|
Time.parse(value)
|
@@ -278,7 +277,7 @@ module CityPayApiClient
|
|
278
277
|
else # model
|
279
278
|
# models (e.g. Pet) or oneOf
|
280
279
|
klass = CityPayApiClient.const_get(type)
|
281
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
280
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
282
281
|
end
|
283
282
|
end
|
284
283
|
|
@@ -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
|
|
@@ -73,6 +73,8 @@ module CityPayApiClient
|
|
73
73
|
|
74
74
|
if attributes.key?(:'merchantid')
|
75
75
|
self.merchantid = attributes[:'merchantid']
|
76
|
+
else
|
77
|
+
self.merchantid = nil
|
76
78
|
end
|
77
79
|
|
78
80
|
if attributes.key?(:'transno')
|
@@ -83,6 +85,7 @@ module CityPayApiClient
|
|
83
85
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
86
|
# @return Array for valid properties with the reasons
|
85
87
|
def list_invalid_properties
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
86
89
|
invalid_properties = Array.new
|
87
90
|
if !@identifier.nil? && @identifier.to_s.length > 50
|
88
91
|
invalid_properties.push('invalid value for "identifier", the character length must be smaller than or equal to 50.')
|
@@ -102,6 +105,7 @@ module CityPayApiClient
|
|
102
105
|
# Check to see if the all the properties in the model are valid
|
103
106
|
# @return true if the model is valid
|
104
107
|
def valid?
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
109
|
return false if !@identifier.nil? && @identifier.to_s.length > 50
|
106
110
|
return false if !@identifier.nil? && @identifier.to_s.length < 4
|
107
111
|
return false if @merchantid.nil?
|
@@ -111,11 +115,15 @@ module CityPayApiClient
|
|
111
115
|
# Custom attribute writer method with validation
|
112
116
|
# @param [Object] identifier Value to be assigned
|
113
117
|
def identifier=(identifier)
|
114
|
-
if
|
118
|
+
if identifier.nil?
|
119
|
+
fail ArgumentError, 'identifier cannot be nil'
|
120
|
+
end
|
121
|
+
|
122
|
+
if identifier.to_s.length > 50
|
115
123
|
fail ArgumentError, 'invalid value for "identifier", the character length must be smaller than or equal to 50.'
|
116
124
|
end
|
117
125
|
|
118
|
-
if
|
126
|
+
if identifier.to_s.length < 4
|
119
127
|
fail ArgumentError, 'invalid value for "identifier", the character length must be great than or equal to 4.'
|
120
128
|
end
|
121
129
|
|
@@ -148,37 +156,30 @@ module CityPayApiClient
|
|
148
156
|
# @param [Hash] attributes Model attributes in the form of hash
|
149
157
|
# @return [Object] Returns the model itself
|
150
158
|
def self.build_from_hash(attributes)
|
151
|
-
new.build_from_hash(attributes)
|
152
|
-
end
|
153
|
-
|
154
|
-
# Builds the object from hash
|
155
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
156
|
-
# @return [Object] Returns the model itself
|
157
|
-
def build_from_hash(attributes)
|
158
159
|
return nil unless attributes.is_a?(Hash)
|
159
160
|
attributes = attributes.transform_keys(&:to_sym)
|
160
|
-
|
161
|
-
|
162
|
-
|
161
|
+
transformed_hash = {}
|
162
|
+
openapi_types.each_pair do |key, type|
|
163
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
164
|
+
transformed_hash["#{key}"] = nil
|
163
165
|
elsif type =~ /\AArray<(.*)>/i
|
164
166
|
# check to ensure the input is an array given that the attribute
|
165
167
|
# is documented as an array but the input is not
|
166
|
-
if attributes[
|
167
|
-
|
168
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
169
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
168
170
|
end
|
169
|
-
elsif !attributes[
|
170
|
-
|
171
|
+
elsif !attributes[attribute_map[key]].nil?
|
172
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
171
173
|
end
|
172
174
|
end
|
173
|
-
|
174
|
-
self
|
175
|
+
new(transformed_hash)
|
175
176
|
end
|
176
177
|
|
177
178
|
# Deserializes the data based on type
|
178
179
|
# @param string type Data type
|
179
180
|
# @param string value Value to be deserialized
|
180
181
|
# @return [Object] Deserialized data
|
181
|
-
def _deserialize(type, value)
|
182
|
+
def self._deserialize(type, value)
|
182
183
|
case type.to_sym
|
183
184
|
when :Time
|
184
185
|
Time.parse(value)
|
@@ -213,7 +214,7 @@ module CityPayApiClient
|
|
213
214
|
else # model
|
214
215
|
# models (e.g. Pet) or oneOf
|
215
216
|
klass = CityPayApiClient.const_get(type)
|
216
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
217
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
217
218
|
end
|
218
219
|
end
|
219
220
|
|