citypay_api_client 1.0.3 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +105 -34
- data/citypay_api_client.gemspec +4 -5
- data/docs/AccountCreate.md +10 -9
- data/docs/AccountStatus.md +8 -7
- data/docs/Acknowledgement.md +14 -13
- data/docs/AclCheckRequest.md +18 -0
- data/docs/AclCheckResponseModel.md +24 -0
- data/docs/AirlineAdvice.md +38 -37
- data/docs/AirlineSegment.md +22 -21
- data/docs/AuthReference.md +34 -33
- data/docs/AuthReferences.md +8 -7
- data/docs/AuthRequest.md +50 -49
- data/docs/AuthResponse.md +60 -59
- data/docs/AuthenRequired.md +12 -11
- data/docs/AuthorisationAndPaymentApi.md +559 -0
- data/docs/Batch.md +22 -0
- data/docs/BatchProcessingApi.md +214 -0
- data/docs/BatchReportRequest.md +20 -0
- data/docs/BatchReportResponseModel.md +28 -0
- data/docs/BatchTransaction.md +24 -0
- data/docs/BatchTransactionResultModel.md +40 -0
- data/docs/Bin.md +34 -0
- data/docs/BinLookup.md +18 -0
- data/docs/CResAuthRequest.md +8 -7
- data/docs/CaptureRequest.md +18 -17
- data/docs/Card.md +46 -41
- data/docs/CardHolderAccount.md +24 -21
- data/docs/CardHolderAccountApi.md +326 -105
- data/docs/CardStatus.md +10 -9
- data/docs/ChargeRequest.md +36 -31
- data/docs/CheckBatchStatus.md +20 -0
- data/docs/CheckBatchStatusResponse.md +18 -0
- data/docs/ContactDetails.md +32 -31
- data/docs/Decision.md +12 -11
- data/docs/DirectPostApi.md +365 -0
- data/docs/DirectPostRequest.md +58 -0
- data/docs/DirectTokenAuthRequest.md +24 -0
- data/docs/DomainKeyCheckRequest.md +18 -0
- data/docs/DomainKeyRequest.md +22 -0
- data/docs/DomainKeyResponse.md +26 -0
- data/docs/Error.md +16 -13
- data/docs/EventDataModel.md +26 -0
- data/docs/Exists.md +22 -0
- data/docs/ExternalMPI.md +16 -15
- data/docs/ListMerchantsResponse.md +12 -11
- data/docs/MCC6012.md +14 -13
- data/docs/Merchant.md +16 -15
- data/docs/OperationalApi.md +124 -22
- data/docs/OperationalFunctionsApi.md +355 -0
- data/docs/PaResAuthRequest.md +10 -9
- data/docs/PaylinkAddress.md +30 -0
- data/docs/PaylinkAdjustmentRequest.md +22 -0
- data/docs/PaylinkApi.md +630 -0
- data/docs/PaylinkAttachmentRequest.md +26 -0
- data/docs/PaylinkAttachmentResult.md +22 -0
- data/docs/PaylinkBillPaymentTokenRequest.md +32 -0
- data/docs/PaylinkCardHolder.md +36 -0
- data/docs/PaylinkCart.md +30 -0
- data/docs/PaylinkCartItemModel.md +32 -0
- data/docs/PaylinkConfig.md +60 -0
- data/docs/PaylinkCustomParam.md +36 -0
- data/docs/PaylinkEmailNotificationPath.md +26 -0
- data/docs/PaylinkErrorCode.md +20 -0
- data/docs/PaylinkFieldGuardModel.md +30 -0
- data/docs/PaylinkPartPayments.md +28 -0
- data/docs/PaylinkSMSNotificationPath.md +20 -0
- data/docs/PaylinkStateEvent.md +22 -0
- data/docs/PaylinkTokenCreated.md +44 -0
- data/docs/PaylinkTokenRequestModel.md +38 -0
- data/docs/PaylinkTokenStatus.md +72 -0
- data/docs/PaylinkTokenStatusChangeRequest.md +26 -0
- data/docs/PaylinkTokenStatusChangeResponse.md +20 -0
- data/docs/PaylinkUI.md +24 -0
- data/docs/PaymentProcessingApi.md +307 -68
- data/docs/Ping.md +8 -7
- data/docs/ProcessBatchRequest.md +24 -0
- data/docs/ProcessBatchResponse.md +20 -0
- data/docs/RefundRequest.md +26 -0
- data/docs/RegisterCard.md +16 -13
- data/docs/RequestChallenged.md +16 -15
- data/docs/RetrieveRequest.md +12 -11
- data/docs/ThreeDSecure.md +32 -15
- data/docs/TokenisationResponseModel.md +36 -0
- data/docs/VoidRequest.md +12 -13
- data/lib/.DS_Store +0 -0
- data/lib/citypay_api_client/api/authorisation_and_payment_api__.rb +565 -0
- data/lib/citypay_api_client/api/batch_processing_api__.rb +225 -0
- data/lib/citypay_api_client/api/{card_holder_account_api.rb → card_holder_account_api__.rb} +136 -46
- data/lib/citypay_api_client/api/direct_post_api__.rb +373 -0
- data/lib/citypay_api_client/api/operational_functions_api__.rb +356 -0
- data/lib/citypay_api_client/api/paylink_api__.rb +614 -0
- data/lib/citypay_api_client/api_client.rb +59 -59
- data/lib/citypay_api_client/api_error.rb +2 -2
- data/lib/citypay_api_client/configuration.rb +53 -15
- data/lib/citypay_api_client/models/account_create.rb +21 -8
- data/lib/citypay_api_client/models/account_status.rb +21 -8
- data/lib/citypay_api_client/models/acknowledgement.rb +21 -8
- data/lib/citypay_api_client/models/acl_check_request.rb +224 -0
- data/lib/citypay_api_client/models/acl_check_response_model.rb +249 -0
- data/lib/citypay_api_client/models/airline_advice.rb +23 -10
- data/lib/citypay_api_client/models/airline_segment.rb +21 -8
- data/lib/citypay_api_client/models/auth_reference.rb +45 -11
- data/lib/citypay_api_client/models/auth_references.rb +21 -8
- data/lib/citypay_api_client/models/auth_request.rb +79 -35
- data/lib/citypay_api_client/models/auth_response.rb +43 -106
- data/lib/citypay_api_client/models/authen_required.rb +21 -8
- data/lib/citypay_api_client/models/batch.rb +264 -0
- data/lib/citypay_api_client/models/batch_report_request.rb +277 -0
- data/lib/citypay_api_client/models/batch_report_response_model.rb +357 -0
- data/lib/citypay_api_client/models/batch_transaction.rb +321 -0
- data/lib/citypay_api_client/models/batch_transaction_result_model.rb +421 -0
- data/lib/citypay_api_client/models/bin.rb +299 -0
- data/lib/citypay_api_client/models/bin_lookup.rb +234 -0
- data/lib/citypay_api_client/models/c_res_auth_request.rb +21 -8
- data/lib/citypay_api_client/models/capture_request.rb +38 -22
- data/lib/citypay_api_client/models/card.rb +67 -10
- data/lib/citypay_api_client/models/card_holder_account.rb +35 -12
- data/lib/citypay_api_client/models/card_status.rb +21 -8
- data/lib/citypay_api_client/models/charge_request.rb +96 -26
- data/lib/citypay_api_client/models/check_batch_status.rb +259 -0
- data/lib/citypay_api_client/models/check_batch_status_response.rb +220 -0
- data/lib/citypay_api_client/models/contact_details.rb +87 -44
- data/lib/citypay_api_client/models/decision.rb +21 -8
- data/lib/citypay_api_client/models/direct_post_request.rb +670 -0
- data/lib/citypay_api_client/models/direct_token_auth_request.rb +249 -0
- data/lib/citypay_api_client/models/domain_key_check_request.rb +252 -0
- data/lib/citypay_api_client/models/domain_key_request.rb +250 -0
- data/lib/citypay_api_client/models/domain_key_response.rb +294 -0
- data/lib/citypay_api_client/models/error.rb +35 -12
- data/lib/citypay_api_client/models/event_data_model.rb +259 -0
- data/lib/citypay_api_client/models/exists.rb +244 -0
- data/lib/citypay_api_client/models/external_mpi.rb +27 -8
- data/lib/citypay_api_client/models/list_merchants_response.rb +21 -8
- data/lib/citypay_api_client/models/mcc6012.rb +21 -8
- data/lib/citypay_api_client/models/merchant.rb +21 -8
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +22 -9
- data/lib/citypay_api_client/models/paylink_address.rb +402 -0
- data/lib/citypay_api_client/models/paylink_adjustment_request.rb +269 -0
- data/lib/citypay_api_client/models/paylink_attachment_request.rb +269 -0
- data/lib/citypay_api_client/models/paylink_attachment_result.rb +249 -0
- data/lib/citypay_api_client/models/paylink_bill_payment_token_request.rb +292 -0
- data/lib/citypay_api_client/models/paylink_card_holder.rb +353 -0
- data/lib/citypay_api_client/models/paylink_cart.rb +280 -0
- data/lib/citypay_api_client/models/paylink_cart_item_model.rb +289 -0
- data/lib/citypay_api_client/models/paylink_config.rb +433 -0
- data/lib/citypay_api_client/models/paylink_custom_param.rb +314 -0
- data/lib/citypay_api_client/models/paylink_email_notification_path.rb +268 -0
- data/lib/citypay_api_client/models/paylink_error_code.rb +239 -0
- data/lib/citypay_api_client/models/paylink_field_guard_model.rb +279 -0
- data/lib/citypay_api_client/models/paylink_part_payments.rb +269 -0
- data/lib/citypay_api_client/models/paylink_sms_notification_path.rb +234 -0
- data/lib/citypay_api_client/models/paylink_state_event.rb +239 -0
- data/lib/citypay_api_client/models/paylink_token_created.rb +364 -0
- data/lib/citypay_api_client/models/paylink_token_request_model.rb +374 -0
- data/lib/citypay_api_client/models/paylink_token_status.rb +490 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_request.rb +270 -0
- data/lib/citypay_api_client/models/paylink_token_status_change_response.rb +235 -0
- data/lib/citypay_api_client/models/paylink_ui.rb +249 -0
- data/lib/citypay_api_client/models/ping.rb +21 -8
- data/lib/citypay_api_client/models/process_batch_request.rb +308 -0
- data/lib/citypay_api_client/models/process_batch_response.rb +234 -0
- data/lib/citypay_api_client/models/refund_request.rb +332 -0
- data/lib/citypay_api_client/models/register_card.rb +59 -12
- data/lib/citypay_api_client/models/request_challenged.rb +29 -16
- data/lib/citypay_api_client/models/retrieve_request.rb +21 -8
- data/lib/citypay_api_client/models/three_d_secure.rb +106 -13
- data/lib/citypay_api_client/models/tokenisation_response_model.rb +333 -0
- data/lib/citypay_api_client/models/void_request.rb +22 -21
- data/lib/citypay_api_client/utils/digest_utils.rb +18 -0
- data/lib/citypay_api_client/utils/direct_post_mac.rb +22 -0
- data/lib/citypay_api_client/version.rb +3 -4
- data/lib/citypay_api_client.rb +53 -6
- data/spec/.DS_Store +0 -0
- data/spec/api/authorisation_and_payment_api___spec.rb +130 -0
- data/spec/api/batch_processing_api___spec.rb +70 -0
- data/spec/api/{card_holder_account_api_spec.rb → card_holder_account_api___spec.rb} +15 -3
- data/spec/api/direct_post_api___spec.rb +98 -0
- data/spec/api/operational_functions_api___spec.rb +94 -0
- data/spec/api/paylink_api___spec.rb +131 -0
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +5 -5
- data/spec/it_api_sandbox_spec.rb +126 -58
- data/spec/models/acknowledgement_spec.rb +7 -22
- data/spec/models/acl_check_request_spec.rb +33 -0
- data/spec/models/acl_check_response_model_spec.rb +51 -0
- data/spec/models/auth_references_spec.rb +7 -8
- data/spec/models/auth_response_spec.rb +29 -30
- data/spec/models/batch_report_request_spec.rb +39 -0
- data/spec/models/batch_report_response_model_spec.rb +63 -0
- data/spec/models/batch_spec.rb +45 -0
- data/spec/models/batch_transaction_result_model_spec.rb +87 -0
- data/spec/models/batch_transaction_spec.rb +51 -0
- data/spec/models/bin_lookup_spec.rb +33 -0
- data/spec/models/bin_spec.rb +81 -0
- data/spec/models/card_holder_account_spec.rb +8 -5
- data/spec/models/check_batch_status_response_spec.rb +45 -0
- data/spec/models/check_batch_status_spec.rb +39 -0
- data/spec/models/decision_spec.rb +1 -1
- data/spec/models/direct_post_request_spec.rb +153 -0
- data/spec/models/direct_token_auth_request_spec.rb +51 -0
- data/spec/models/domain_key_check_request_spec.rb +33 -0
- data/spec/models/domain_key_request_spec.rb +45 -0
- data/spec/models/domain_key_response_spec.rb +57 -0
- data/spec/models/event_data_model_spec.rb +57 -0
- data/spec/{api/operational_api_spec.rb → models/exists_spec.rb} +14 -20
- data/spec/models/list_merchants_response_spec.rb +2 -2
- data/spec/models/paylink_address_spec.rb +69 -0
- data/spec/models/paylink_adjustment_request_spec.rb +45 -0
- data/spec/models/paylink_attachment_request_spec.rb +45 -0
- data/spec/models/paylink_attachment_result_spec.rb +45 -0
- data/spec/models/paylink_bill_payment_token_request_spec.rb +63 -0
- data/spec/models/paylink_card_holder_spec.rb +87 -0
- data/spec/models/paylink_cart_item_model_spec.rb +75 -0
- data/spec/models/paylink_cart_spec.rb +69 -0
- data/spec/models/paylink_config_spec.rb +159 -0
- data/spec/models/paylink_custom_param_spec.rb +87 -0
- data/spec/models/paylink_email_notification_path_spec.rb +57 -0
- data/spec/models/paylink_error_code_spec.rb +39 -0
- data/spec/models/paylink_field_guard_model_spec.rb +45 -0
- data/spec/models/paylink_part_payments_spec.rb +63 -0
- data/spec/models/paylink_sms_notification_path_spec.rb +39 -0
- data/spec/models/paylink_state_event_spec.rb +45 -0
- data/spec/models/paylink_token_created_spec.rb +111 -0
- data/spec/models/paylink_token_request_model_spec.rb +93 -0
- data/spec/models/paylink_token_status_change_request_spec.rb +57 -0
- data/spec/models/paylink_token_status_change_response_spec.rb +39 -0
- data/spec/models/paylink_token_status_spec.rb +195 -0
- data/spec/models/paylink_ui_spec.rb +51 -0
- data/spec/models/process_batch_request_spec.rb +51 -0
- data/spec/models/process_batch_response_spec.rb +39 -0
- data/spec/models/refund_request_spec.rb +64 -0
- data/spec/models/tokenisation_response_model_spec.rb +87 -0
- data/spec/spec_helper.rb +2 -2
- data/spec/utils/direct_post_mac_spec.rb +13 -0
- metadata +210 -37
- data/Gemfile.lock +0 -70
- data/git_push.sh +0 -58
- data/lib/citypay_api_client/api/operational_api.rb +0 -147
- data/lib/citypay_api_client/api/payment_processing_api.rb +0 -405
- data/lib/citypay_api_client/test.rb +0 -20
- data/spec/api/payment_processing_api_spec.rb +0 -106
@@ -1,32 +1,32 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security
|
4
|
+
# This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 6.2.1
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class CaptureRequest
|
16
17
|
attr_accessor :airline_data
|
17
18
|
|
18
|
-
# The completion amount provided in the lowest unit of currency for the specific currency of the merchant, with a variable length to a maximum of 12 digits. No decimal points to be included. For example with GBP 75.45 use the value 7545. Please check that you do not supply divisional characters such as 1,024 in the request which may be caused by some number formatters.
|
19
|
+
# The completion amount provided in the lowest unit of currency for the specific currency of the merchant, with a variable length to a maximum of 12 digits. No decimal points to be included. For example with GBP 75.45 use the value 7545. Please check that you do not supply divisional characters such as 1,024 in the request which may be caused by some number formatters. If no amount is supplied, the original processing amount is used.
|
19
20
|
attr_accessor :amount
|
20
21
|
|
22
|
+
attr_accessor :event_management
|
23
|
+
|
21
24
|
# The identifier of the transaction to capture. If an empty value is supplied then a `trans_no` value must be supplied.
|
22
25
|
attr_accessor :identifier
|
23
26
|
|
24
27
|
# Identifies the merchant account to perform the capture for.
|
25
28
|
attr_accessor :merchantid
|
26
29
|
|
27
|
-
# An optional reference value for the calling client such as a version number i.e.
|
28
|
-
attr_accessor :sdk
|
29
|
-
|
30
30
|
# The transaction number of the transaction to look up and capture. If an empty value is supplied then an identifier value must be supplied.
|
31
31
|
attr_accessor :transno
|
32
32
|
|
@@ -35,21 +35,26 @@ module CityPayApiClient
|
|
35
35
|
{
|
36
36
|
:'airline_data' => :'airline_data',
|
37
37
|
:'amount' => :'amount',
|
38
|
+
:'event_management' => :'event_management',
|
38
39
|
:'identifier' => :'identifier',
|
39
40
|
:'merchantid' => :'merchantid',
|
40
|
-
:'sdk' => :'sdk',
|
41
41
|
:'transno' => :'transno'
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
46
|
+
def self.acceptable_attributes
|
47
|
+
attribute_map.values
|
48
|
+
end
|
49
|
+
|
45
50
|
# Attribute type mapping.
|
46
51
|
def self.openapi_types
|
47
52
|
{
|
48
53
|
:'airline_data' => :'AirlineAdvice',
|
49
54
|
:'amount' => :'Integer',
|
55
|
+
:'event_management' => :'EventDataModel',
|
50
56
|
:'identifier' => :'String',
|
51
57
|
:'merchantid' => :'Integer',
|
52
|
-
:'sdk' => :'String',
|
53
58
|
:'transno' => :'Integer'
|
54
59
|
}
|
55
60
|
end
|
@@ -83,6 +88,10 @@ module CityPayApiClient
|
|
83
88
|
self.amount = attributes[:'amount']
|
84
89
|
end
|
85
90
|
|
91
|
+
if attributes.key?(:'event_management')
|
92
|
+
self.event_management = attributes[:'event_management']
|
93
|
+
end
|
94
|
+
|
86
95
|
if attributes.key?(:'identifier')
|
87
96
|
self.identifier = attributes[:'identifier']
|
88
97
|
end
|
@@ -91,12 +100,6 @@ module CityPayApiClient
|
|
91
100
|
self.merchantid = attributes[:'merchantid']
|
92
101
|
end
|
93
102
|
|
94
|
-
if attributes.key?(:'sdk')
|
95
|
-
self.sdk = attributes[:'sdk']
|
96
|
-
else
|
97
|
-
self.sdk = CityPayApiClient::FULL_VERSION
|
98
|
-
end
|
99
|
-
|
100
103
|
if attributes.key?(:'transno')
|
101
104
|
self.transno = attributes[:'transno']
|
102
105
|
end
|
@@ -130,6 +133,12 @@ module CityPayApiClient
|
|
130
133
|
true
|
131
134
|
end
|
132
135
|
|
136
|
+
# Custom attribute writer method with validation
|
137
|
+
# @param [Object] amount Value to be assigned
|
138
|
+
def amount=(amount)
|
139
|
+
@amount = amount
|
140
|
+
end
|
141
|
+
|
133
142
|
# Custom attribute writer method with validation
|
134
143
|
# @param [Object] identifier Value to be assigned
|
135
144
|
def identifier=(identifier)
|
@@ -151,9 +160,9 @@ module CityPayApiClient
|
|
151
160
|
self.class == o.class &&
|
152
161
|
airline_data == o.airline_data &&
|
153
162
|
amount == o.amount &&
|
163
|
+
event_management == o.event_management &&
|
154
164
|
identifier == o.identifier &&
|
155
165
|
merchantid == o.merchantid &&
|
156
|
-
sdk == o.sdk &&
|
157
166
|
transno == o.transno
|
158
167
|
end
|
159
168
|
|
@@ -166,7 +175,7 @@ module CityPayApiClient
|
|
166
175
|
# Calculates hash code according to all attributes.
|
167
176
|
# @return [Integer] Hash code
|
168
177
|
def hash
|
169
|
-
[airline_data, amount, identifier, merchantid,
|
178
|
+
[airline_data, amount, event_management, identifier, merchantid, transno].hash
|
170
179
|
end
|
171
180
|
|
172
181
|
# Builds the object from hash
|
@@ -181,8 +190,11 @@ module CityPayApiClient
|
|
181
190
|
# @return [Object] Returns the model itself
|
182
191
|
def build_from_hash(attributes)
|
183
192
|
return nil unless attributes.is_a?(Hash)
|
193
|
+
attributes = attributes.transform_keys(&:to_sym)
|
184
194
|
self.class.openapi_types.each_pair do |key, type|
|
185
|
-
if
|
195
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
196
|
+
self.send("#{key}=", nil)
|
197
|
+
elsif type =~ /\AArray<(.*)>/i
|
186
198
|
# check to ensure the input is an array given that the attribute
|
187
199
|
# is documented as an array but the input is not
|
188
200
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -190,7 +202,7 @@ module CityPayApiClient
|
|
190
202
|
end
|
191
203
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
192
204
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
193
|
-
end
|
205
|
+
end
|
194
206
|
end
|
195
207
|
|
196
208
|
self
|
@@ -202,8 +214,8 @@ module CityPayApiClient
|
|
202
214
|
# @return [Object] Deserialized data
|
203
215
|
def _deserialize(type, value)
|
204
216
|
case type.to_sym
|
205
|
-
when :
|
206
|
-
|
217
|
+
when :Time
|
218
|
+
Time.parse(value)
|
207
219
|
when :Date
|
208
220
|
Date.parse(value)
|
209
221
|
when :String
|
@@ -233,7 +245,9 @@ module CityPayApiClient
|
|
233
245
|
end
|
234
246
|
end
|
235
247
|
else # model
|
236
|
-
|
248
|
+
# models (e.g. Pet) or oneOf
|
249
|
+
klass = CityPayApiClient.const_get(type)
|
250
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
237
251
|
end
|
238
252
|
end
|
239
253
|
|
@@ -259,7 +273,7 @@ module CityPayApiClient
|
|
259
273
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
260
274
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
261
275
|
end
|
262
|
-
|
276
|
+
|
263
277
|
hash[param] = _to_hash(value)
|
264
278
|
end
|
265
279
|
hash
|
@@ -282,5 +296,7 @@ module CityPayApiClient
|
|
282
296
|
value
|
283
297
|
end
|
284
298
|
end
|
299
|
+
|
285
300
|
end
|
301
|
+
|
286
302
|
end
|
@@ -1,15 +1,16 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security
|
4
|
+
# This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 6.2.1
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class Card
|
@@ -40,9 +41,12 @@ module CityPayApiClient
|
|
40
41
|
# The id of the card that is returned. Should be used for referencing the card when perform any changes.
|
41
42
|
attr_accessor :card_id
|
42
43
|
|
43
|
-
# The status of the card such, valid values are
|
44
|
+
# The status of the card such, valid values are - ACTIVE the card is active for processing - INACTIVE the card is not active for processing - EXPIRED for cards that have passed their expiry date.
|
44
45
|
attr_accessor :card_status
|
45
46
|
|
47
|
+
# The date time of when the card was created.
|
48
|
+
attr_accessor :date_created
|
49
|
+
|
46
50
|
# Determines if the card is the default card for the account and should be regarded as the first option to be used for processing.
|
47
51
|
attr_accessor :default
|
48
52
|
|
@@ -61,6 +65,9 @@ module CityPayApiClient
|
|
61
65
|
# The last 4 digits of the card to aid in identification.
|
62
66
|
attr_accessor :last4digits
|
63
67
|
|
68
|
+
# The name on the card.
|
69
|
+
attr_accessor :name_on_card
|
70
|
+
|
64
71
|
# The scheme that issued the card.
|
65
72
|
attr_accessor :scheme
|
66
73
|
|
@@ -80,17 +87,24 @@ module CityPayApiClient
|
|
80
87
|
:'bin_eu' => :'bin_eu',
|
81
88
|
:'card_id' => :'card_id',
|
82
89
|
:'card_status' => :'card_status',
|
90
|
+
:'date_created' => :'date_created',
|
83
91
|
:'default' => :'default',
|
84
92
|
:'expmonth' => :'expmonth',
|
85
93
|
:'expyear' => :'expyear',
|
86
94
|
:'label' => :'label',
|
87
95
|
:'label2' => :'label2',
|
88
96
|
:'last4digits' => :'last4digits',
|
97
|
+
:'name_on_card' => :'name_on_card',
|
89
98
|
:'scheme' => :'scheme',
|
90
99
|
:'token' => :'token'
|
91
100
|
}
|
92
101
|
end
|
93
102
|
|
103
|
+
# Returns all the JSON keys this model knows about
|
104
|
+
def self.acceptable_attributes
|
105
|
+
attribute_map.values
|
106
|
+
end
|
107
|
+
|
94
108
|
# Attribute type mapping.
|
95
109
|
def self.openapi_types
|
96
110
|
{
|
@@ -104,12 +118,14 @@ module CityPayApiClient
|
|
104
118
|
:'bin_eu' => :'Boolean',
|
105
119
|
:'card_id' => :'String',
|
106
120
|
:'card_status' => :'String',
|
121
|
+
:'date_created' => :'Time',
|
107
122
|
:'default' => :'Boolean',
|
108
123
|
:'expmonth' => :'Integer',
|
109
124
|
:'expyear' => :'Integer',
|
110
125
|
:'label' => :'String',
|
111
126
|
:'label2' => :'String',
|
112
127
|
:'last4digits' => :'String',
|
128
|
+
:'name_on_card' => :'String',
|
113
129
|
:'scheme' => :'String',
|
114
130
|
:'token' => :'String'
|
115
131
|
}
|
@@ -176,6 +192,10 @@ module CityPayApiClient
|
|
176
192
|
self.card_status = attributes[:'card_status']
|
177
193
|
end
|
178
194
|
|
195
|
+
if attributes.key?(:'date_created')
|
196
|
+
self.date_created = attributes[:'date_created']
|
197
|
+
end
|
198
|
+
|
179
199
|
if attributes.key?(:'default')
|
180
200
|
self.default = attributes[:'default']
|
181
201
|
end
|
@@ -200,6 +220,10 @@ module CityPayApiClient
|
|
200
220
|
self.last4digits = attributes[:'last4digits']
|
201
221
|
end
|
202
222
|
|
223
|
+
if attributes.key?(:'name_on_card')
|
224
|
+
self.name_on_card = attributes[:'name_on_card']
|
225
|
+
end
|
226
|
+
|
203
227
|
if attributes.key?(:'scheme')
|
204
228
|
self.scheme = attributes[:'scheme']
|
205
229
|
end
|
@@ -229,6 +253,14 @@ module CityPayApiClient
|
|
229
253
|
invalid_properties.push('invalid value for "expyear", must be greater than or equal to 2000.')
|
230
254
|
end
|
231
255
|
|
256
|
+
if !@name_on_card.nil? && @name_on_card.to_s.length > 45
|
257
|
+
invalid_properties.push('invalid value for "name_on_card", the character length must be smaller than or equal to 45.')
|
258
|
+
end
|
259
|
+
|
260
|
+
if !@name_on_card.nil? && @name_on_card.to_s.length < 2
|
261
|
+
invalid_properties.push('invalid value for "name_on_card", the character length must be great than or equal to 2.')
|
262
|
+
end
|
263
|
+
|
232
264
|
invalid_properties
|
233
265
|
end
|
234
266
|
|
@@ -239,6 +271,8 @@ module CityPayApiClient
|
|
239
271
|
return false if !@expmonth.nil? && @expmonth < 1
|
240
272
|
return false if !@expyear.nil? && @expyear > 2100
|
241
273
|
return false if !@expyear.nil? && @expyear < 2000
|
274
|
+
return false if !@name_on_card.nil? && @name_on_card.to_s.length > 45
|
275
|
+
return false if !@name_on_card.nil? && @name_on_card.to_s.length < 2
|
242
276
|
true
|
243
277
|
end
|
244
278
|
|
@@ -270,6 +304,20 @@ module CityPayApiClient
|
|
270
304
|
@expyear = expyear
|
271
305
|
end
|
272
306
|
|
307
|
+
# Custom attribute writer method with validation
|
308
|
+
# @param [Object] name_on_card Value to be assigned
|
309
|
+
def name_on_card=(name_on_card)
|
310
|
+
if !name_on_card.nil? && name_on_card.to_s.length > 45
|
311
|
+
fail ArgumentError, 'invalid value for "name_on_card", the character length must be smaller than or equal to 45.'
|
312
|
+
end
|
313
|
+
|
314
|
+
if !name_on_card.nil? && name_on_card.to_s.length < 2
|
315
|
+
fail ArgumentError, 'invalid value for "name_on_card", the character length must be great than or equal to 2.'
|
316
|
+
end
|
317
|
+
|
318
|
+
@name_on_card = name_on_card
|
319
|
+
end
|
320
|
+
|
273
321
|
# Checks equality by comparing each attribute.
|
274
322
|
# @param [Object] Object to be compared
|
275
323
|
def ==(o)
|
@@ -285,12 +333,14 @@ module CityPayApiClient
|
|
285
333
|
bin_eu == o.bin_eu &&
|
286
334
|
card_id == o.card_id &&
|
287
335
|
card_status == o.card_status &&
|
336
|
+
date_created == o.date_created &&
|
288
337
|
default == o.default &&
|
289
338
|
expmonth == o.expmonth &&
|
290
339
|
expyear == o.expyear &&
|
291
340
|
label == o.label &&
|
292
341
|
label2 == o.label2 &&
|
293
342
|
last4digits == o.last4digits &&
|
343
|
+
name_on_card == o.name_on_card &&
|
294
344
|
scheme == o.scheme &&
|
295
345
|
token == o.token
|
296
346
|
end
|
@@ -304,7 +354,7 @@ module CityPayApiClient
|
|
304
354
|
# Calculates hash code according to all attributes.
|
305
355
|
# @return [Integer] Hash code
|
306
356
|
def hash
|
307
|
-
[bin_commercial, bin_corporate, bin_country_issued, bin_credit, bin_currency, bin_debit, bin_description, bin_eu, card_id, card_status, default, expmonth, expyear, label, label2, last4digits, scheme, token].hash
|
357
|
+
[bin_commercial, bin_corporate, bin_country_issued, bin_credit, bin_currency, bin_debit, bin_description, bin_eu, card_id, card_status, date_created, default, expmonth, expyear, label, label2, last4digits, name_on_card, scheme, token].hash
|
308
358
|
end
|
309
359
|
|
310
360
|
# Builds the object from hash
|
@@ -319,8 +369,11 @@ module CityPayApiClient
|
|
319
369
|
# @return [Object] Returns the model itself
|
320
370
|
def build_from_hash(attributes)
|
321
371
|
return nil unless attributes.is_a?(Hash)
|
372
|
+
attributes = attributes.transform_keys(&:to_sym)
|
322
373
|
self.class.openapi_types.each_pair do |key, type|
|
323
|
-
if
|
374
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
375
|
+
self.send("#{key}=", nil)
|
376
|
+
elsif type =~ /\AArray<(.*)>/i
|
324
377
|
# check to ensure the input is an array given that the attribute
|
325
378
|
# is documented as an array but the input is not
|
326
379
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -328,7 +381,7 @@ module CityPayApiClient
|
|
328
381
|
end
|
329
382
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
330
383
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
331
|
-
end
|
384
|
+
end
|
332
385
|
end
|
333
386
|
|
334
387
|
self
|
@@ -340,8 +393,8 @@ module CityPayApiClient
|
|
340
393
|
# @return [Object] Deserialized data
|
341
394
|
def _deserialize(type, value)
|
342
395
|
case type.to_sym
|
343
|
-
when :
|
344
|
-
|
396
|
+
when :Time
|
397
|
+
Time.parse(value)
|
345
398
|
when :Date
|
346
399
|
Date.parse(value)
|
347
400
|
when :String
|
@@ -371,7 +424,9 @@ module CityPayApiClient
|
|
371
424
|
end
|
372
425
|
end
|
373
426
|
else # model
|
374
|
-
|
427
|
+
# models (e.g. Pet) or oneOf
|
428
|
+
klass = CityPayApiClient.const_get(type)
|
429
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
375
430
|
end
|
376
431
|
end
|
377
432
|
|
@@ -397,7 +452,7 @@ module CityPayApiClient
|
|
397
452
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
398
453
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
399
454
|
end
|
400
|
-
|
455
|
+
|
401
456
|
hash[param] = _to_hash(value)
|
402
457
|
end
|
403
458
|
hash
|
@@ -420,5 +475,7 @@ module CityPayApiClient
|
|
420
475
|
value
|
421
476
|
end
|
422
477
|
end
|
478
|
+
|
423
479
|
end
|
480
|
+
|
424
481
|
end
|
@@ -1,15 +1,16 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security
|
4
|
+
# This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 6.2.1
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class CardHolderAccount
|
@@ -29,7 +30,10 @@ module CityPayApiClient
|
|
29
30
|
# The index in the array of the default card.
|
30
31
|
attr_accessor :default_card_index
|
31
32
|
|
32
|
-
#
|
33
|
+
# The date and time the account was last modified.
|
34
|
+
attr_accessor :last_modified
|
35
|
+
|
36
|
+
# Defines the status of the account for processing valid values are - ACTIVE for active accounts that are able to process - DISABLED for accounts that are currently disabled for processing.
|
33
37
|
attr_accessor :status
|
34
38
|
|
35
39
|
# A unique id of the card holder account which uniquely identifies the stored account. This value is not searchable.
|
@@ -44,20 +48,27 @@ module CityPayApiClient
|
|
44
48
|
:'date_created' => :'date_created',
|
45
49
|
:'default_card_id' => :'default_card_id',
|
46
50
|
:'default_card_index' => :'default_card_index',
|
51
|
+
:'last_modified' => :'last_modified',
|
47
52
|
:'status' => :'status',
|
48
53
|
:'unique_id' => :'unique_id'
|
49
54
|
}
|
50
55
|
end
|
51
56
|
|
57
|
+
# Returns all the JSON keys this model knows about
|
58
|
+
def self.acceptable_attributes
|
59
|
+
attribute_map.values
|
60
|
+
end
|
61
|
+
|
52
62
|
# Attribute type mapping.
|
53
63
|
def self.openapi_types
|
54
64
|
{
|
55
65
|
:'account_id' => :'String',
|
56
66
|
:'cards' => :'Array<Card>',
|
57
67
|
:'contact' => :'ContactDetails',
|
58
|
-
:'date_created' => :'
|
68
|
+
:'date_created' => :'Time',
|
59
69
|
:'default_card_id' => :'String',
|
60
|
-
:'default_card_index' => :'
|
70
|
+
:'default_card_index' => :'Integer',
|
71
|
+
:'last_modified' => :'Time',
|
61
72
|
:'status' => :'String',
|
62
73
|
:'unique_id' => :'String'
|
63
74
|
}
|
@@ -110,6 +121,10 @@ module CityPayApiClient
|
|
110
121
|
self.default_card_index = attributes[:'default_card_index']
|
111
122
|
end
|
112
123
|
|
124
|
+
if attributes.key?(:'last_modified')
|
125
|
+
self.last_modified = attributes[:'last_modified']
|
126
|
+
end
|
127
|
+
|
113
128
|
if attributes.key?(:'status')
|
114
129
|
self.status = attributes[:'status']
|
115
130
|
end
|
@@ -181,6 +196,7 @@ module CityPayApiClient
|
|
181
196
|
date_created == o.date_created &&
|
182
197
|
default_card_id == o.default_card_id &&
|
183
198
|
default_card_index == o.default_card_index &&
|
199
|
+
last_modified == o.last_modified &&
|
184
200
|
status == o.status &&
|
185
201
|
unique_id == o.unique_id
|
186
202
|
end
|
@@ -194,7 +210,7 @@ module CityPayApiClient
|
|
194
210
|
# Calculates hash code according to all attributes.
|
195
211
|
# @return [Integer] Hash code
|
196
212
|
def hash
|
197
|
-
[account_id, cards, contact, date_created, default_card_id, default_card_index, status, unique_id].hash
|
213
|
+
[account_id, cards, contact, date_created, default_card_id, default_card_index, last_modified, status, unique_id].hash
|
198
214
|
end
|
199
215
|
|
200
216
|
# Builds the object from hash
|
@@ -209,8 +225,11 @@ module CityPayApiClient
|
|
209
225
|
# @return [Object] Returns the model itself
|
210
226
|
def build_from_hash(attributes)
|
211
227
|
return nil unless attributes.is_a?(Hash)
|
228
|
+
attributes = attributes.transform_keys(&:to_sym)
|
212
229
|
self.class.openapi_types.each_pair do |key, type|
|
213
|
-
if
|
230
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
231
|
+
self.send("#{key}=", nil)
|
232
|
+
elsif type =~ /\AArray<(.*)>/i
|
214
233
|
# check to ensure the input is an array given that the attribute
|
215
234
|
# is documented as an array but the input is not
|
216
235
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -218,7 +237,7 @@ module CityPayApiClient
|
|
218
237
|
end
|
219
238
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
220
239
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
221
|
-
end
|
240
|
+
end
|
222
241
|
end
|
223
242
|
|
224
243
|
self
|
@@ -230,8 +249,8 @@ module CityPayApiClient
|
|
230
249
|
# @return [Object] Deserialized data
|
231
250
|
def _deserialize(type, value)
|
232
251
|
case type.to_sym
|
233
|
-
when :
|
234
|
-
|
252
|
+
when :Time
|
253
|
+
Time.parse(value)
|
235
254
|
when :Date
|
236
255
|
Date.parse(value)
|
237
256
|
when :String
|
@@ -261,7 +280,9 @@ module CityPayApiClient
|
|
261
280
|
end
|
262
281
|
end
|
263
282
|
else # model
|
264
|
-
|
283
|
+
# models (e.g. Pet) or oneOf
|
284
|
+
klass = CityPayApiClient.const_get(type)
|
285
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
265
286
|
end
|
266
287
|
end
|
267
288
|
|
@@ -287,7 +308,7 @@ module CityPayApiClient
|
|
287
308
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
288
309
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
289
310
|
end
|
290
|
-
|
311
|
+
|
291
312
|
hash[param] = _to_hash(value)
|
292
313
|
end
|
293
314
|
hash
|
@@ -310,5 +331,7 @@ module CityPayApiClient
|
|
310
331
|
value
|
311
332
|
end
|
312
333
|
end
|
334
|
+
|
313
335
|
end
|
336
|
+
|
314
337
|
end
|
@@ -1,15 +1,16 @@
|
|
1
1
|
=begin
|
2
2
|
#CityPay Payment API
|
3
3
|
|
4
|
-
# This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security
|
4
|
+
# This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security Your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council. These include * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
|
5
5
|
|
6
6
|
Contact: support@citypay.com
|
7
7
|
Generated by: https://openapi-generator.tech
|
8
|
-
OpenAPI Generator version:
|
8
|
+
OpenAPI Generator version: 6.2.1
|
9
9
|
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
13
|
+
require 'time'
|
13
14
|
|
14
15
|
module CityPayApiClient
|
15
16
|
class CardStatus
|
@@ -27,6 +28,11 @@ module CityPayApiClient
|
|
27
28
|
}
|
28
29
|
end
|
29
30
|
|
31
|
+
# Returns all the JSON keys this model knows about
|
32
|
+
def self.acceptable_attributes
|
33
|
+
attribute_map.values
|
34
|
+
end
|
35
|
+
|
30
36
|
# Attribute type mapping.
|
31
37
|
def self.openapi_types
|
32
38
|
{
|
@@ -111,8 +117,11 @@ module CityPayApiClient
|
|
111
117
|
# @return [Object] Returns the model itself
|
112
118
|
def build_from_hash(attributes)
|
113
119
|
return nil unless attributes.is_a?(Hash)
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
114
121
|
self.class.openapi_types.each_pair do |key, type|
|
115
|
-
if
|
122
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
123
|
+
self.send("#{key}=", nil)
|
124
|
+
elsif type =~ /\AArray<(.*)>/i
|
116
125
|
# check to ensure the input is an array given that the attribute
|
117
126
|
# is documented as an array but the input is not
|
118
127
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -120,7 +129,7 @@ module CityPayApiClient
|
|
120
129
|
end
|
121
130
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
131
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
123
|
-
end
|
132
|
+
end
|
124
133
|
end
|
125
134
|
|
126
135
|
self
|
@@ -132,8 +141,8 @@ module CityPayApiClient
|
|
132
141
|
# @return [Object] Deserialized data
|
133
142
|
def _deserialize(type, value)
|
134
143
|
case type.to_sym
|
135
|
-
when :
|
136
|
-
|
144
|
+
when :Time
|
145
|
+
Time.parse(value)
|
137
146
|
when :Date
|
138
147
|
Date.parse(value)
|
139
148
|
when :String
|
@@ -163,7 +172,9 @@ module CityPayApiClient
|
|
163
172
|
end
|
164
173
|
end
|
165
174
|
else # model
|
166
|
-
|
175
|
+
# models (e.g. Pet) or oneOf
|
176
|
+
klass = CityPayApiClient.const_get(type)
|
177
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
167
178
|
end
|
168
179
|
end
|
169
180
|
|
@@ -189,7 +200,7 @@ module CityPayApiClient
|
|
189
200
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
190
201
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
191
202
|
end
|
192
|
-
|
203
|
+
|
193
204
|
hash[param] = _to_hash(value)
|
194
205
|
end
|
195
206
|
hash
|
@@ -212,5 +223,7 @@ module CityPayApiClient
|
|
212
223
|
value
|
213
224
|
end
|
214
225
|
end
|
226
|
+
|
215
227
|
end
|
228
|
+
|
216
229
|
end
|