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