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
|
|
@@ -65,6 +65,8 @@ module CityPayApiClient
|
|
65
65
|
if (value = attributes[:'batch_id']).is_a?(Array)
|
66
66
|
self.batch_id = value
|
67
67
|
end
|
68
|
+
else
|
69
|
+
self.batch_id = nil
|
68
70
|
end
|
69
71
|
|
70
72
|
if attributes.key?(:'client_account_id')
|
@@ -75,6 +77,7 @@ module CityPayApiClient
|
|
75
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
78
|
# @return Array for valid properties with the reasons
|
77
79
|
def list_invalid_properties
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
81
|
invalid_properties = Array.new
|
79
82
|
if @batch_id.nil?
|
80
83
|
invalid_properties.push('invalid value for "batch_id", batch_id cannot be nil.')
|
@@ -94,6 +97,7 @@ module CityPayApiClient
|
|
94
97
|
# Check to see if the all the properties in the model are valid
|
95
98
|
# @return true if the model is valid
|
96
99
|
def valid?
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
97
101
|
return false if @batch_id.nil?
|
98
102
|
return false if !@client_account_id.nil? && @client_account_id.to_s.length > 20
|
99
103
|
return false if !@client_account_id.nil? && @client_account_id.to_s.length < 3
|
@@ -103,11 +107,15 @@ module CityPayApiClient
|
|
103
107
|
# Custom attribute writer method with validation
|
104
108
|
# @param [Object] client_account_id Value to be assigned
|
105
109
|
def client_account_id=(client_account_id)
|
106
|
-
if
|
110
|
+
if client_account_id.nil?
|
111
|
+
fail ArgumentError, 'client_account_id cannot be nil'
|
112
|
+
end
|
113
|
+
|
114
|
+
if client_account_id.to_s.length > 20
|
107
115
|
fail ArgumentError, 'invalid value for "client_account_id", the character length must be smaller than or equal to 20.'
|
108
116
|
end
|
109
117
|
|
110
|
-
if
|
118
|
+
if client_account_id.to_s.length < 3
|
111
119
|
fail ArgumentError, 'invalid value for "client_account_id", the character length must be great than or equal to 3.'
|
112
120
|
end
|
113
121
|
|
@@ -139,37 +147,30 @@ module CityPayApiClient
|
|
139
147
|
# @param [Hash] attributes Model attributes in the form of hash
|
140
148
|
# @return [Object] Returns the model itself
|
141
149
|
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
150
|
return nil unless attributes.is_a?(Hash)
|
150
151
|
attributes = attributes.transform_keys(&:to_sym)
|
151
|
-
|
152
|
-
|
153
|
-
|
152
|
+
transformed_hash = {}
|
153
|
+
openapi_types.each_pair do |key, type|
|
154
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
155
|
+
transformed_hash["#{key}"] = nil
|
154
156
|
elsif type =~ /\AArray<(.*)>/i
|
155
157
|
# check to ensure the input is an array given that the attribute
|
156
158
|
# is documented as an array but the input is not
|
157
|
-
if attributes[
|
158
|
-
|
159
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
160
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
159
161
|
end
|
160
|
-
elsif !attributes[
|
161
|
-
|
162
|
+
elsif !attributes[attribute_map[key]].nil?
|
163
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
162
164
|
end
|
163
165
|
end
|
164
|
-
|
165
|
-
self
|
166
|
+
new(transformed_hash)
|
166
167
|
end
|
167
168
|
|
168
169
|
# Deserializes the data based on type
|
169
170
|
# @param string type Data type
|
170
171
|
# @param string value Value to be deserialized
|
171
172
|
# @return [Object] Deserialized data
|
172
|
-
def _deserialize(type, value)
|
173
|
+
def self._deserialize(type, value)
|
173
174
|
case type.to_sym
|
174
175
|
when :Time
|
175
176
|
Time.parse(value)
|
@@ -204,7 +205,7 @@ module CityPayApiClient
|
|
204
205
|
else # model
|
205
206
|
# models (e.g. Pet) or oneOf
|
206
207
|
klass = CityPayApiClient.const_get(type)
|
207
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
209
|
end
|
209
210
|
end
|
210
211
|
|
@@ -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
|
|
@@ -66,6 +66,7 @@ module CityPayApiClient
|
|
66
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
67
67
|
# @return Array for valid properties with the reasons
|
68
68
|
def list_invalid_properties
|
69
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
70
|
invalid_properties = Array.new
|
70
71
|
invalid_properties
|
71
72
|
end
|
@@ -73,6 +74,7 @@ module CityPayApiClient
|
|
73
74
|
# Check to see if the all the properties in the model are valid
|
74
75
|
# @return true if the model is valid
|
75
76
|
def valid?
|
77
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
76
78
|
true
|
77
79
|
end
|
78
80
|
|
@@ -100,37 +102,30 @@ module CityPayApiClient
|
|
100
102
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
103
|
# @return [Object] Returns the model itself
|
102
104
|
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
105
|
return nil unless attributes.is_a?(Hash)
|
111
106
|
attributes = attributes.transform_keys(&:to_sym)
|
112
|
-
|
113
|
-
|
114
|
-
|
107
|
+
transformed_hash = {}
|
108
|
+
openapi_types.each_pair do |key, type|
|
109
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
110
|
+
transformed_hash["#{key}"] = nil
|
115
111
|
elsif type =~ /\AArray<(.*)>/i
|
116
112
|
# check to ensure the input is an array given that the attribute
|
117
113
|
# is documented as an array but the input is not
|
118
|
-
if attributes[
|
119
|
-
|
114
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
115
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
120
116
|
end
|
121
|
-
elsif !attributes[
|
122
|
-
|
117
|
+
elsif !attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
123
119
|
end
|
124
120
|
end
|
125
|
-
|
126
|
-
self
|
121
|
+
new(transformed_hash)
|
127
122
|
end
|
128
123
|
|
129
124
|
# Deserializes the data based on type
|
130
125
|
# @param string type Data type
|
131
126
|
# @param string value Value to be deserialized
|
132
127
|
# @return [Object] Deserialized data
|
133
|
-
def _deserialize(type, value)
|
128
|
+
def self._deserialize(type, value)
|
134
129
|
case type.to_sym
|
135
130
|
when :Time
|
136
131
|
Time.parse(value)
|
@@ -165,7 +160,7 @@ module CityPayApiClient
|
|
165
160
|
else # model
|
166
161
|
# models (e.g. Pet) or oneOf
|
167
162
|
klass = CityPayApiClient.const_get(type)
|
168
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
163
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
164
|
end
|
170
165
|
end
|
171
166
|
|
@@ -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
|
|
@@ -14,43 +14,43 @@ require 'time'
|
|
14
14
|
|
15
15
|
module CityPayApiClient
|
16
16
|
class ContactDetails
|
17
|
-
# The first line of the address for the
|
17
|
+
# The first line of the address for the card holder.
|
18
18
|
attr_accessor :address1
|
19
19
|
|
20
|
-
# The second line of the address for the
|
20
|
+
# The second line of the address for the card holder.
|
21
21
|
attr_accessor :address2
|
22
22
|
|
23
|
-
# The third line of the address for the
|
23
|
+
# The third line of the address for the card holder.
|
24
24
|
attr_accessor :address3
|
25
25
|
|
26
|
-
# The area such as city, department, parish for the
|
26
|
+
# The area such as city, department, parish for the card holder.
|
27
27
|
attr_accessor :area
|
28
28
|
|
29
|
-
# The company name for the
|
29
|
+
# The company name for the card holder if the contact is a corporate contact.
|
30
30
|
attr_accessor :company
|
31
31
|
|
32
32
|
# The country code in ISO 3166 format. The country value may be used for fraud analysis and for acceptance of the transaction.
|
33
33
|
attr_accessor :country
|
34
34
|
|
35
|
-
# An email address for the
|
35
|
+
# An email address for the card holder which may be used for correspondence.
|
36
36
|
attr_accessor :email
|
37
37
|
|
38
|
-
# The first name of the
|
38
|
+
# The first name of the card holder.
|
39
39
|
attr_accessor :firstname
|
40
40
|
|
41
|
-
# The last name or surname of the
|
41
|
+
# The last name or surname of the card holder.
|
42
42
|
attr_accessor :lastname
|
43
43
|
|
44
|
-
# A mobile number for the
|
44
|
+
# A mobile number for the card holder the mobile number is often required by delivery companies to ensure they are able to be in contact when required.
|
45
45
|
attr_accessor :mobile_no
|
46
46
|
|
47
47
|
# The postcode or zip code of the address which may be used for fraud analysis.
|
48
48
|
attr_accessor :postcode
|
49
49
|
|
50
|
-
# A telephone number for the
|
50
|
+
# A telephone number for the card holder.
|
51
51
|
attr_accessor :telephone_no
|
52
52
|
|
53
|
-
# A title for the
|
53
|
+
# A title for the card holder such as Mr, Mrs, Ms, M. Mme. etc.
|
54
54
|
attr_accessor :title
|
55
55
|
|
56
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -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
|
if !@address1.nil? && @address1.to_s.length > 50
|
178
179
|
invalid_properties.push('invalid value for "address1", the character length must be smaller than or equal to 50.')
|
@@ -224,6 +225,7 @@ module CityPayApiClient
|
|
224
225
|
# Check to see if the all the properties in the model are valid
|
225
226
|
# @return true if the model is valid
|
226
227
|
def valid?
|
228
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
227
229
|
return false if !@address1.nil? && @address1.to_s.length > 50
|
228
230
|
return false if !@address2.nil? && @address2.to_s.length > 50
|
229
231
|
return false if !@address3.nil? && @address3.to_s.length > 50
|
@@ -241,7 +243,11 @@ module CityPayApiClient
|
|
241
243
|
# Custom attribute writer method with validation
|
242
244
|
# @param [Object] address1 Value to be assigned
|
243
245
|
def address1=(address1)
|
244
|
-
if
|
246
|
+
if address1.nil?
|
247
|
+
fail ArgumentError, 'address1 cannot be nil'
|
248
|
+
end
|
249
|
+
|
250
|
+
if address1.to_s.length > 50
|
245
251
|
fail ArgumentError, 'invalid value for "address1", the character length must be smaller than or equal to 50.'
|
246
252
|
end
|
247
253
|
|
@@ -251,7 +257,11 @@ module CityPayApiClient
|
|
251
257
|
# Custom attribute writer method with validation
|
252
258
|
# @param [Object] address2 Value to be assigned
|
253
259
|
def address2=(address2)
|
254
|
-
if
|
260
|
+
if address2.nil?
|
261
|
+
fail ArgumentError, 'address2 cannot be nil'
|
262
|
+
end
|
263
|
+
|
264
|
+
if address2.to_s.length > 50
|
255
265
|
fail ArgumentError, 'invalid value for "address2", the character length must be smaller than or equal to 50.'
|
256
266
|
end
|
257
267
|
|
@@ -261,7 +271,11 @@ module CityPayApiClient
|
|
261
271
|
# Custom attribute writer method with validation
|
262
272
|
# @param [Object] address3 Value to be assigned
|
263
273
|
def address3=(address3)
|
264
|
-
if
|
274
|
+
if address3.nil?
|
275
|
+
fail ArgumentError, 'address3 cannot be nil'
|
276
|
+
end
|
277
|
+
|
278
|
+
if address3.to_s.length > 50
|
265
279
|
fail ArgumentError, 'invalid value for "address3", the character length must be smaller than or equal to 50.'
|
266
280
|
end
|
267
281
|
|
@@ -271,7 +285,11 @@ module CityPayApiClient
|
|
271
285
|
# Custom attribute writer method with validation
|
272
286
|
# @param [Object] area Value to be assigned
|
273
287
|
def area=(area)
|
274
|
-
if
|
288
|
+
if area.nil?
|
289
|
+
fail ArgumentError, 'area cannot be nil'
|
290
|
+
end
|
291
|
+
|
292
|
+
if area.to_s.length > 50
|
275
293
|
fail ArgumentError, 'invalid value for "area", the character length must be smaller than or equal to 50.'
|
276
294
|
end
|
277
295
|
|
@@ -281,7 +299,11 @@ module CityPayApiClient
|
|
281
299
|
# Custom attribute writer method with validation
|
282
300
|
# @param [Object] company Value to be assigned
|
283
301
|
def company=(company)
|
284
|
-
if
|
302
|
+
if company.nil?
|
303
|
+
fail ArgumentError, 'company cannot be nil'
|
304
|
+
end
|
305
|
+
|
306
|
+
if company.to_s.length > 50
|
285
307
|
fail ArgumentError, 'invalid value for "company", the character length must be smaller than or equal to 50.'
|
286
308
|
end
|
287
309
|
|
@@ -291,11 +313,15 @@ module CityPayApiClient
|
|
291
313
|
# Custom attribute writer method with validation
|
292
314
|
# @param [Object] country Value to be assigned
|
293
315
|
def country=(country)
|
294
|
-
if
|
316
|
+
if country.nil?
|
317
|
+
fail ArgumentError, 'country cannot be nil'
|
318
|
+
end
|
319
|
+
|
320
|
+
if country.to_s.length > 2
|
295
321
|
fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 2.'
|
296
322
|
end
|
297
323
|
|
298
|
-
if
|
324
|
+
if country.to_s.length < 2
|
299
325
|
fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 2.'
|
300
326
|
end
|
301
327
|
|
@@ -305,7 +331,11 @@ module CityPayApiClient
|
|
305
331
|
# Custom attribute writer method with validation
|
306
332
|
# @param [Object] email Value to be assigned
|
307
333
|
def email=(email)
|
308
|
-
if
|
334
|
+
if email.nil?
|
335
|
+
fail ArgumentError, 'email cannot be nil'
|
336
|
+
end
|
337
|
+
|
338
|
+
if email.to_s.length > 254
|
309
339
|
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
|
310
340
|
end
|
311
341
|
|
@@ -315,7 +345,11 @@ module CityPayApiClient
|
|
315
345
|
# Custom attribute writer method with validation
|
316
346
|
# @param [Object] mobile_no Value to be assigned
|
317
347
|
def mobile_no=(mobile_no)
|
318
|
-
if
|
348
|
+
if mobile_no.nil?
|
349
|
+
fail ArgumentError, 'mobile_no cannot be nil'
|
350
|
+
end
|
351
|
+
|
352
|
+
if mobile_no.to_s.length > 20
|
319
353
|
fail ArgumentError, 'invalid value for "mobile_no", the character length must be smaller than or equal to 20.'
|
320
354
|
end
|
321
355
|
|
@@ -325,7 +359,11 @@ module CityPayApiClient
|
|
325
359
|
# Custom attribute writer method with validation
|
326
360
|
# @param [Object] postcode Value to be assigned
|
327
361
|
def postcode=(postcode)
|
328
|
-
if
|
362
|
+
if postcode.nil?
|
363
|
+
fail ArgumentError, 'postcode cannot be nil'
|
364
|
+
end
|
365
|
+
|
366
|
+
if postcode.to_s.length > 16
|
329
367
|
fail ArgumentError, 'invalid value for "postcode", the character length must be smaller than or equal to 16.'
|
330
368
|
end
|
331
369
|
|
@@ -335,7 +373,11 @@ module CityPayApiClient
|
|
335
373
|
# Custom attribute writer method with validation
|
336
374
|
# @param [Object] telephone_no Value to be assigned
|
337
375
|
def telephone_no=(telephone_no)
|
338
|
-
if
|
376
|
+
if telephone_no.nil?
|
377
|
+
fail ArgumentError, 'telephone_no cannot be nil'
|
378
|
+
end
|
379
|
+
|
380
|
+
if telephone_no.to_s.length > 20
|
339
381
|
fail ArgumentError, 'invalid value for "telephone_no", the character length must be smaller than or equal to 20.'
|
340
382
|
end
|
341
383
|
|
@@ -378,37 +420,30 @@ module CityPayApiClient
|
|
378
420
|
# @param [Hash] attributes Model attributes in the form of hash
|
379
421
|
# @return [Object] Returns the model itself
|
380
422
|
def self.build_from_hash(attributes)
|
381
|
-
new.build_from_hash(attributes)
|
382
|
-
end
|
383
|
-
|
384
|
-
# Builds the object from hash
|
385
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
386
|
-
# @return [Object] Returns the model itself
|
387
|
-
def build_from_hash(attributes)
|
388
423
|
return nil unless attributes.is_a?(Hash)
|
389
424
|
attributes = attributes.transform_keys(&:to_sym)
|
390
|
-
|
391
|
-
|
392
|
-
|
425
|
+
transformed_hash = {}
|
426
|
+
openapi_types.each_pair do |key, type|
|
427
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
428
|
+
transformed_hash["#{key}"] = nil
|
393
429
|
elsif type =~ /\AArray<(.*)>/i
|
394
430
|
# check to ensure the input is an array given that the attribute
|
395
431
|
# is documented as an array but the input is not
|
396
|
-
if attributes[
|
397
|
-
|
432
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
433
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
398
434
|
end
|
399
|
-
elsif !attributes[
|
400
|
-
|
435
|
+
elsif !attributes[attribute_map[key]].nil?
|
436
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
401
437
|
end
|
402
438
|
end
|
403
|
-
|
404
|
-
self
|
439
|
+
new(transformed_hash)
|
405
440
|
end
|
406
441
|
|
407
442
|
# Deserializes the data based on type
|
408
443
|
# @param string type Data type
|
409
444
|
# @param string value Value to be deserialized
|
410
445
|
# @return [Object] Deserialized data
|
411
|
-
def _deserialize(type, value)
|
446
|
+
def self._deserialize(type, value)
|
412
447
|
case type.to_sym
|
413
448
|
when :Time
|
414
449
|
Time.parse(value)
|
@@ -443,7 +478,7 @@ module CityPayApiClient
|
|
443
478
|
else # model
|
444
479
|
# models (e.g. Pet) or oneOf
|
445
480
|
klass = CityPayApiClient.const_get(type)
|
446
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
481
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
447
482
|
end
|
448
483
|
end
|
449
484
|
|