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
@@ -0,0 +1,259 @@
|
|
1
|
+
=begin
|
2
|
+
#CityPay Payment API
|
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 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
|
+
|
6
|
+
Contact: support@citypay.com
|
7
|
+
Generated by: https://openapi-generator.tech
|
8
|
+
OpenAPI Generator version: 6.2.1
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
require 'time'
|
14
|
+
|
15
|
+
module CityPayApiClient
|
16
|
+
class EventDataModel
|
17
|
+
# The date when the event ends in ISO format (yyyy-MM-dd).
|
18
|
+
attr_accessor :event_end_date
|
19
|
+
|
20
|
+
# An id of the event.
|
21
|
+
attr_accessor :event_id
|
22
|
+
|
23
|
+
# An id of the event organiser.
|
24
|
+
attr_accessor :event_organiser_id
|
25
|
+
|
26
|
+
# The date when the event starts in ISO format (yyyy-MM-dd).
|
27
|
+
attr_accessor :event_start_date
|
28
|
+
|
29
|
+
# The type of payment such as `deposit` or `balance`.
|
30
|
+
attr_accessor :payment_type
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'event_end_date' => :'event_end_date',
|
36
|
+
:'event_id' => :'event_id',
|
37
|
+
:'event_organiser_id' => :'event_organiser_id',
|
38
|
+
:'event_start_date' => :'event_start_date',
|
39
|
+
:'payment_type' => :'payment_type'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Returns all the JSON keys this model knows about
|
44
|
+
def self.acceptable_attributes
|
45
|
+
attribute_map.values
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.openapi_types
|
50
|
+
{
|
51
|
+
:'event_end_date' => :'Date',
|
52
|
+
:'event_id' => :'String',
|
53
|
+
:'event_organiser_id' => :'String',
|
54
|
+
:'event_start_date' => :'Date',
|
55
|
+
:'payment_type' => :'String'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# List of attributes with nullable: true
|
60
|
+
def self.openapi_nullable
|
61
|
+
Set.new([
|
62
|
+
])
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
if (!attributes.is_a?(Hash))
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `CityPayApiClient::EventDataModel` initialize method"
|
70
|
+
end
|
71
|
+
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
74
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `CityPayApiClient::EventDataModel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
76
|
+
end
|
77
|
+
h[k.to_sym] = v
|
78
|
+
}
|
79
|
+
|
80
|
+
if attributes.key?(:'event_end_date')
|
81
|
+
self.event_end_date = attributes[:'event_end_date']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'event_id')
|
85
|
+
self.event_id = attributes[:'event_id']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'event_organiser_id')
|
89
|
+
self.event_organiser_id = attributes[:'event_organiser_id']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'event_start_date')
|
93
|
+
self.event_start_date = attributes[:'event_start_date']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'payment_type')
|
97
|
+
self.payment_type = attributes[:'payment_type']
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
102
|
+
# @return Array for valid properties with the reasons
|
103
|
+
def list_invalid_properties
|
104
|
+
invalid_properties = Array.new
|
105
|
+
invalid_properties
|
106
|
+
end
|
107
|
+
|
108
|
+
# Check to see if the all the properties in the model are valid
|
109
|
+
# @return true if the model is valid
|
110
|
+
def valid?
|
111
|
+
true
|
112
|
+
end
|
113
|
+
|
114
|
+
# Checks equality by comparing each attribute.
|
115
|
+
# @param [Object] Object to be compared
|
116
|
+
def ==(o)
|
117
|
+
return true if self.equal?(o)
|
118
|
+
self.class == o.class &&
|
119
|
+
event_end_date == o.event_end_date &&
|
120
|
+
event_id == o.event_id &&
|
121
|
+
event_organiser_id == o.event_organiser_id &&
|
122
|
+
event_start_date == o.event_start_date &&
|
123
|
+
payment_type == o.payment_type
|
124
|
+
end
|
125
|
+
|
126
|
+
# @see the `==` method
|
127
|
+
# @param [Object] Object to be compared
|
128
|
+
def eql?(o)
|
129
|
+
self == o
|
130
|
+
end
|
131
|
+
|
132
|
+
# Calculates hash code according to all attributes.
|
133
|
+
# @return [Integer] Hash code
|
134
|
+
def hash
|
135
|
+
[event_end_date, event_id, event_organiser_id, event_start_date, payment_type].hash
|
136
|
+
end
|
137
|
+
|
138
|
+
# Builds the object from hash
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
# @return [Object] Returns the model itself
|
141
|
+
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
|
+
return nil unless attributes.is_a?(Hash)
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
self.class.openapi_types.each_pair do |key, type|
|
152
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
153
|
+
self.send("#{key}=", nil)
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
155
|
+
# check to ensure the input is an array given that the attribute
|
156
|
+
# is documented as an array but the input is not
|
157
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
159
|
+
end
|
160
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
161
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
self
|
166
|
+
end
|
167
|
+
|
168
|
+
# Deserializes the data based on type
|
169
|
+
# @param string type Data type
|
170
|
+
# @param string value Value to be deserialized
|
171
|
+
# @return [Object] Deserialized data
|
172
|
+
def _deserialize(type, value)
|
173
|
+
case type.to_sym
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
176
|
+
when :Date
|
177
|
+
Date.parse(value)
|
178
|
+
when :String
|
179
|
+
value.to_s
|
180
|
+
when :Integer
|
181
|
+
value.to_i
|
182
|
+
when :Float
|
183
|
+
value.to_f
|
184
|
+
when :Boolean
|
185
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
186
|
+
true
|
187
|
+
else
|
188
|
+
false
|
189
|
+
end
|
190
|
+
when :Object
|
191
|
+
# generic object (usually a Hash), return directly
|
192
|
+
value
|
193
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
194
|
+
inner_type = Regexp.last_match[:inner_type]
|
195
|
+
value.map { |v| _deserialize(inner_type, v) }
|
196
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
197
|
+
k_type = Regexp.last_match[:k_type]
|
198
|
+
v_type = Regexp.last_match[:v_type]
|
199
|
+
{}.tap do |hash|
|
200
|
+
value.each do |k, v|
|
201
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
else # model
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = CityPayApiClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
if value.nil?
|
230
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
232
|
+
end
|
233
|
+
|
234
|
+
hash[param] = _to_hash(value)
|
235
|
+
end
|
236
|
+
hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Outputs non-array value in the form of hash
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
241
|
+
# @param [Object] value Any valid value
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
243
|
+
def _to_hash(value)
|
244
|
+
if value.is_a?(Array)
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
246
|
+
elsif value.is_a?(Hash)
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
249
|
+
end
|
250
|
+
elsif value.respond_to? :to_hash
|
251
|
+
value.to_hash
|
252
|
+
else
|
253
|
+
value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|
@@ -0,0 +1,244 @@
|
|
1
|
+
=begin
|
2
|
+
#CityPay Payment API
|
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 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
|
+
|
6
|
+
Contact: support@citypay.com
|
7
|
+
Generated by: https://openapi-generator.tech
|
8
|
+
OpenAPI Generator version: 6.2.1
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
require 'time'
|
14
|
+
|
15
|
+
module CityPayApiClient
|
16
|
+
class Exists
|
17
|
+
# Boolean value whether the entity is active.
|
18
|
+
attr_accessor :active
|
19
|
+
|
20
|
+
# Boolean value whether the entity exists.
|
21
|
+
attr_accessor :exists
|
22
|
+
|
23
|
+
# The last modified date of the entity.
|
24
|
+
attr_accessor :last_modified
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'active' => :'active',
|
30
|
+
:'exists' => :'exists',
|
31
|
+
:'last_modified' => :'last_modified'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Returns all the JSON keys this model knows about
|
36
|
+
def self.acceptable_attributes
|
37
|
+
attribute_map.values
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.openapi_types
|
42
|
+
{
|
43
|
+
:'active' => :'Boolean',
|
44
|
+
:'exists' => :'Boolean',
|
45
|
+
:'last_modified' => :'Time'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# List of attributes with nullable: true
|
50
|
+
def self.openapi_nullable
|
51
|
+
Set.new([
|
52
|
+
])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
if (!attributes.is_a?(Hash))
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `CityPayApiClient::Exists` initialize method"
|
60
|
+
end
|
61
|
+
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `CityPayApiClient::Exists`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
|
+
end
|
67
|
+
h[k.to_sym] = v
|
68
|
+
}
|
69
|
+
|
70
|
+
if attributes.key?(:'active')
|
71
|
+
self.active = attributes[:'active']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'exists')
|
75
|
+
self.exists = attributes[:'exists']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'last_modified')
|
79
|
+
self.last_modified = attributes[:'last_modified']
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
84
|
+
# @return Array for valid properties with the reasons
|
85
|
+
def list_invalid_properties
|
86
|
+
invalid_properties = Array.new
|
87
|
+
if @exists.nil?
|
88
|
+
invalid_properties.push('invalid value for "exists", exists cannot be nil.')
|
89
|
+
end
|
90
|
+
|
91
|
+
invalid_properties
|
92
|
+
end
|
93
|
+
|
94
|
+
# Check to see if the all the properties in the model are valid
|
95
|
+
# @return true if the model is valid
|
96
|
+
def valid?
|
97
|
+
return false if @exists.nil?
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
# Checks equality by comparing each attribute.
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def ==(o)
|
104
|
+
return true if self.equal?(o)
|
105
|
+
self.class == o.class &&
|
106
|
+
active == o.active &&
|
107
|
+
exists == o.exists &&
|
108
|
+
last_modified == o.last_modified
|
109
|
+
end
|
110
|
+
|
111
|
+
# @see the `==` method
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def eql?(o)
|
114
|
+
self == o
|
115
|
+
end
|
116
|
+
|
117
|
+
# Calculates hash code according to all attributes.
|
118
|
+
# @return [Integer] Hash code
|
119
|
+
def hash
|
120
|
+
[active, exists, last_modified].hash
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def self.build_from_hash(attributes)
|
127
|
+
new.build_from_hash(attributes)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
attributes = attributes.transform_keys(&:to_sym)
|
136
|
+
self.class.openapi_types.each_pair do |key, type|
|
137
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
138
|
+
self.send("#{key}=", nil)
|
139
|
+
elsif type =~ /\AArray<(.*)>/i
|
140
|
+
# check to ensure the input is an array given that the attribute
|
141
|
+
# is documented as an array but the input is not
|
142
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
143
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
144
|
+
end
|
145
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
146
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
self
|
151
|
+
end
|
152
|
+
|
153
|
+
# Deserializes the data based on type
|
154
|
+
# @param string type Data type
|
155
|
+
# @param string value Value to be deserialized
|
156
|
+
# @return [Object] Deserialized data
|
157
|
+
def _deserialize(type, value)
|
158
|
+
case type.to_sym
|
159
|
+
when :Time
|
160
|
+
Time.parse(value)
|
161
|
+
when :Date
|
162
|
+
Date.parse(value)
|
163
|
+
when :String
|
164
|
+
value.to_s
|
165
|
+
when :Integer
|
166
|
+
value.to_i
|
167
|
+
when :Float
|
168
|
+
value.to_f
|
169
|
+
when :Boolean
|
170
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
171
|
+
true
|
172
|
+
else
|
173
|
+
false
|
174
|
+
end
|
175
|
+
when :Object
|
176
|
+
# generic object (usually a Hash), return directly
|
177
|
+
value
|
178
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
179
|
+
inner_type = Regexp.last_match[:inner_type]
|
180
|
+
value.map { |v| _deserialize(inner_type, v) }
|
181
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
182
|
+
k_type = Regexp.last_match[:k_type]
|
183
|
+
v_type = Regexp.last_match[:v_type]
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each do |k, v|
|
186
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
else # model
|
190
|
+
# models (e.g. Pet) or oneOf
|
191
|
+
klass = CityPayApiClient.const_get(type)
|
192
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the string representation of the object
|
197
|
+
# @return [String] String presentation of the object
|
198
|
+
def to_s
|
199
|
+
to_hash.to_s
|
200
|
+
end
|
201
|
+
|
202
|
+
# to_body is an alias to to_hash (backward compatibility)
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_body
|
205
|
+
to_hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the object in the form of hash
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_hash
|
211
|
+
hash = {}
|
212
|
+
self.class.attribute_map.each_pair do |attr, param|
|
213
|
+
value = self.send(attr)
|
214
|
+
if value.nil?
|
215
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
216
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
217
|
+
end
|
218
|
+
|
219
|
+
hash[param] = _to_hash(value)
|
220
|
+
end
|
221
|
+
hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Outputs non-array value in the form of hash
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
226
|
+
# @param [Object] value Any valid value
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
228
|
+
def _to_hash(value)
|
229
|
+
if value.is_a?(Array)
|
230
|
+
value.compact.map { |v| _to_hash(v) }
|
231
|
+
elsif value.is_a?(Hash)
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
+
end
|
235
|
+
elsif value.respond_to? :to_hash
|
236
|
+
value.to_hash
|
237
|
+
else
|
238
|
+
value
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
|
244
|
+
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 ExternalMPI
|
@@ -39,6 +40,11 @@ module CityPayApiClient
|
|
39
40
|
}
|
40
41
|
end
|
41
42
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
44
|
+
def self.acceptable_attributes
|
45
|
+
attribute_map.values
|
46
|
+
end
|
47
|
+
|
42
48
|
# Attribute type mapping.
|
43
49
|
def self.openapi_types
|
44
50
|
{
|
@@ -145,6 +151,12 @@ module CityPayApiClient
|
|
145
151
|
@cavv = cavv
|
146
152
|
end
|
147
153
|
|
154
|
+
# Custom attribute writer method with validation
|
155
|
+
# @param [Object] eci Value to be assigned
|
156
|
+
def eci=(eci)
|
157
|
+
@eci = eci
|
158
|
+
end
|
159
|
+
|
148
160
|
# Custom attribute writer method with validation
|
149
161
|
# @param [Object] enrolled Value to be assigned
|
150
162
|
def enrolled=(enrolled)
|
@@ -201,8 +213,11 @@ module CityPayApiClient
|
|
201
213
|
# @return [Object] Returns the model itself
|
202
214
|
def build_from_hash(attributes)
|
203
215
|
return nil unless attributes.is_a?(Hash)
|
216
|
+
attributes = attributes.transform_keys(&:to_sym)
|
204
217
|
self.class.openapi_types.each_pair do |key, type|
|
205
|
-
if
|
218
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
219
|
+
self.send("#{key}=", nil)
|
220
|
+
elsif type =~ /\AArray<(.*)>/i
|
206
221
|
# check to ensure the input is an array given that the attribute
|
207
222
|
# is documented as an array but the input is not
|
208
223
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -210,7 +225,7 @@ module CityPayApiClient
|
|
210
225
|
end
|
211
226
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
212
227
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
213
|
-
end
|
228
|
+
end
|
214
229
|
end
|
215
230
|
|
216
231
|
self
|
@@ -222,8 +237,8 @@ module CityPayApiClient
|
|
222
237
|
# @return [Object] Deserialized data
|
223
238
|
def _deserialize(type, value)
|
224
239
|
case type.to_sym
|
225
|
-
when :
|
226
|
-
|
240
|
+
when :Time
|
241
|
+
Time.parse(value)
|
227
242
|
when :Date
|
228
243
|
Date.parse(value)
|
229
244
|
when :String
|
@@ -253,7 +268,9 @@ module CityPayApiClient
|
|
253
268
|
end
|
254
269
|
end
|
255
270
|
else # model
|
256
|
-
|
271
|
+
# models (e.g. Pet) or oneOf
|
272
|
+
klass = CityPayApiClient.const_get(type)
|
273
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
257
274
|
end
|
258
275
|
end
|
259
276
|
|
@@ -279,7 +296,7 @@ module CityPayApiClient
|
|
279
296
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
280
297
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
281
298
|
end
|
282
|
-
|
299
|
+
|
283
300
|
hash[param] = _to_hash(value)
|
284
301
|
end
|
285
302
|
hash
|
@@ -302,5 +319,7 @@ module CityPayApiClient
|
|
302
319
|
value
|
303
320
|
end
|
304
321
|
end
|
322
|
+
|
305
323
|
end
|
324
|
+
|
306
325
|
end
|