dna-apimatic-sdk 0.0.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 +7 -0
- data/LICENSE +28 -0
- data/README.md +172 -0
- data/bin/console +15 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/api_helper.rb +10 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/apis/authentication_api.rb +53 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/apis/base_api.rb +67 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/apis/ecommerce_transactions_api.rb +113 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/apis/merchants_api.rb +79 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/apis/oauth_authorization_api.rb +44 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/apis/pos_transactions_api.rb +128 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/apis/settlements_api.rb +82 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/client.rb +110 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/configuration.rb +177 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/exceptions/api_exception.rb +21 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/exceptions/error_exception.rb +51 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/exceptions/oauth_provider_exception.rb +64 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/http/api_response.rb +19 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/http/auth/oauth_2.rb +156 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/http/http_call_back.rb +10 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/http/http_method_enum.rb +10 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/http/http_request.rb +10 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/http/http_response.rb +10 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/http/proxy_settings.rb +22 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/logging/sdk_logger.rb +17 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/auth_token_request.rb +97 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/auth_token_response.rb +115 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/base_model.rb +110 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/capture_method.rb +72 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/card_type.rb +36 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transaction.rb +528 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/ecommerce_transactions_response.rb +94 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/grant_type.rb +26 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/merchant_v1.rb +85 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/merchant_v2.rb +138 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/merchants_v2_response.rb +94 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/oauth_provider_error.rb +62 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/oauth_scope.rb +26 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/oauth_token.rb +96 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/operation.rb +48 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/pos_transaction.rb +298 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/pos_transactions_response.rb +105 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/processor.rb +36 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/scope.rb +26 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/search_by.rb +36 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/settlement.rb +314 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/settlements_response.rb +94 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/status.rb +46 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/status1.rb +36 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/status2.rb +36 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/terminal.rb +141 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/token_type.rb +26 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/transaction_type.rb +201 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/models/type.rb +36 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is/utilities/file_wrapper.rb +28 -0
- data/lib/dna_payments_partner_reporting_settlement_ap_is.rb +125 -0
- metadata +142 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# dna_payments_partner_reporting_settlement_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was
|
|
4
|
+
# automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module DnaPaymentsPartnerReportingSettlementApIs
|
|
8
|
+
# Settlement Model.
|
|
9
|
+
class Settlement < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Date that the settlement process was started.
|
|
14
|
+
# @return [Date]
|
|
15
|
+
attr_accessor :processed_date
|
|
16
|
+
|
|
17
|
+
# Date that the transaction was settled.
|
|
18
|
+
# @return [Date]
|
|
19
|
+
attr_accessor :settlement_date
|
|
20
|
+
|
|
21
|
+
# Unique ID for the merchant, allocated by DNA Payments.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :merchant_id
|
|
24
|
+
|
|
25
|
+
# Name of the merchant who processed the transaction.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :merchant_name
|
|
28
|
+
|
|
29
|
+
# Original requested transaction amount.
|
|
30
|
+
# @return [Float]
|
|
31
|
+
attr_accessor :amount
|
|
32
|
+
|
|
33
|
+
# Acquiring fee charged for processing the transaction.
|
|
34
|
+
# @return [Float]
|
|
35
|
+
attr_accessor :acquirer_fee
|
|
36
|
+
|
|
37
|
+
# Amount settled to the merchant.
|
|
38
|
+
# @return [Float]
|
|
39
|
+
attr_accessor :amount_to_merchant
|
|
40
|
+
|
|
41
|
+
# Currency of the transaction, e.g. GBP.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :currency
|
|
44
|
+
|
|
45
|
+
# Confirmation of the operation performed.
|
|
46
|
+
# @return [Operation]
|
|
47
|
+
attr_accessor :operation
|
|
48
|
+
|
|
49
|
+
# Unique transaction ID. Null for non-transactional fees.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :transaction_id
|
|
52
|
+
|
|
53
|
+
# Date/time the transaction was processed.
|
|
54
|
+
# @return [DateTime]
|
|
55
|
+
attr_accessor :transaction_date
|
|
56
|
+
|
|
57
|
+
# Type of transaction/fee recorded in the Settlement (and, by reference, POS
|
|
58
|
+
# Reporting) API.
|
|
59
|
+
# @return [TransactionType]
|
|
60
|
+
attr_accessor :transaction_type
|
|
61
|
+
|
|
62
|
+
# Unique order number allocated by the merchant.
|
|
63
|
+
# @return [String]
|
|
64
|
+
attr_accessor :merchant_reference
|
|
65
|
+
|
|
66
|
+
# Card scheme used in the transaction.
|
|
67
|
+
# @return [String]
|
|
68
|
+
attr_accessor :card_scheme
|
|
69
|
+
|
|
70
|
+
# Type of card used in the transaction.
|
|
71
|
+
# @return [CardType]
|
|
72
|
+
attr_accessor :card_type
|
|
73
|
+
|
|
74
|
+
# Whether the card used is issued in Europe (including the UK).
|
|
75
|
+
# @return [TrueClass | FalseClass]
|
|
76
|
+
attr_accessor :is_european_card
|
|
77
|
+
|
|
78
|
+
# Whether the card used is a corporate card.
|
|
79
|
+
# @return [TrueClass | FalseClass]
|
|
80
|
+
attr_accessor :is_corporate_card
|
|
81
|
+
|
|
82
|
+
# Masked PAN for the payment card used; contains the first six and last four
|
|
83
|
+
# digits.
|
|
84
|
+
# @return [String]
|
|
85
|
+
attr_accessor :card_mask
|
|
86
|
+
|
|
87
|
+
# Capture method for the transaction.
|
|
88
|
+
# @return [CaptureMethod]
|
|
89
|
+
attr_accessor :capture_method
|
|
90
|
+
|
|
91
|
+
# Country in which the payment card was issued. ISO 3166-1 alpha-3. Null if
|
|
92
|
+
# it cannot be determined.
|
|
93
|
+
# @return [String]
|
|
94
|
+
attr_accessor :issuer_country
|
|
95
|
+
|
|
96
|
+
# Custom data provided by the integrated solution for the transaction.
|
|
97
|
+
# @return [String]
|
|
98
|
+
attr_accessor :merchant_custom_data
|
|
99
|
+
|
|
100
|
+
# A mapping from model property names to API property names.
|
|
101
|
+
def self.names
|
|
102
|
+
@_hash = {} if @_hash.nil?
|
|
103
|
+
@_hash['processed_date'] = 'processedDate'
|
|
104
|
+
@_hash['settlement_date'] = 'settlementDate'
|
|
105
|
+
@_hash['merchant_id'] = 'merchantId'
|
|
106
|
+
@_hash['merchant_name'] = 'merchantName'
|
|
107
|
+
@_hash['amount'] = 'amount'
|
|
108
|
+
@_hash['acquirer_fee'] = 'acquirerFee'
|
|
109
|
+
@_hash['amount_to_merchant'] = 'amountToMerchant'
|
|
110
|
+
@_hash['currency'] = 'currency'
|
|
111
|
+
@_hash['operation'] = 'operation'
|
|
112
|
+
@_hash['transaction_id'] = 'transactionId'
|
|
113
|
+
@_hash['transaction_date'] = 'transactionDate'
|
|
114
|
+
@_hash['transaction_type'] = 'transactionType'
|
|
115
|
+
@_hash['merchant_reference'] = 'merchantReference'
|
|
116
|
+
@_hash['card_scheme'] = 'cardScheme'
|
|
117
|
+
@_hash['card_type'] = 'cardType'
|
|
118
|
+
@_hash['is_european_card'] = 'isEuropeanCard'
|
|
119
|
+
@_hash['is_corporate_card'] = 'isCorporateCard'
|
|
120
|
+
@_hash['card_mask'] = 'cardMask'
|
|
121
|
+
@_hash['capture_method'] = 'captureMethod'
|
|
122
|
+
@_hash['issuer_country'] = 'issuerCountry'
|
|
123
|
+
@_hash['merchant_custom_data'] = 'merchantCustomData'
|
|
124
|
+
@_hash
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# An array for optional fields
|
|
128
|
+
def self.optionals
|
|
129
|
+
%w[
|
|
130
|
+
processed_date
|
|
131
|
+
settlement_date
|
|
132
|
+
merchant_id
|
|
133
|
+
merchant_name
|
|
134
|
+
amount
|
|
135
|
+
acquirer_fee
|
|
136
|
+
amount_to_merchant
|
|
137
|
+
currency
|
|
138
|
+
operation
|
|
139
|
+
transaction_id
|
|
140
|
+
transaction_date
|
|
141
|
+
transaction_type
|
|
142
|
+
merchant_reference
|
|
143
|
+
card_scheme
|
|
144
|
+
card_type
|
|
145
|
+
is_european_card
|
|
146
|
+
is_corporate_card
|
|
147
|
+
card_mask
|
|
148
|
+
capture_method
|
|
149
|
+
issuer_country
|
|
150
|
+
merchant_custom_data
|
|
151
|
+
]
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# An array for nullable fields
|
|
155
|
+
def self.nullables
|
|
156
|
+
%w[
|
|
157
|
+
settlement_date
|
|
158
|
+
transaction_id
|
|
159
|
+
merchant_reference
|
|
160
|
+
card_scheme
|
|
161
|
+
card_type
|
|
162
|
+
is_european_card
|
|
163
|
+
is_corporate_card
|
|
164
|
+
card_mask
|
|
165
|
+
capture_method
|
|
166
|
+
issuer_country
|
|
167
|
+
merchant_custom_data
|
|
168
|
+
]
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
def initialize(processed_date: SKIP, settlement_date: SKIP,
|
|
172
|
+
merchant_id: SKIP, merchant_name: SKIP, amount: SKIP,
|
|
173
|
+
acquirer_fee: SKIP, amount_to_merchant: SKIP, currency: SKIP,
|
|
174
|
+
operation: SKIP, transaction_id: SKIP,
|
|
175
|
+
transaction_date: SKIP, transaction_type: SKIP,
|
|
176
|
+
merchant_reference: SKIP, card_scheme: SKIP, card_type: SKIP,
|
|
177
|
+
is_european_card: SKIP, is_corporate_card: SKIP,
|
|
178
|
+
card_mask: SKIP, capture_method: SKIP, issuer_country: SKIP,
|
|
179
|
+
merchant_custom_data: SKIP, additional_properties: nil)
|
|
180
|
+
# Add additional model properties to the instance
|
|
181
|
+
additional_properties = {} if additional_properties.nil?
|
|
182
|
+
|
|
183
|
+
@processed_date = processed_date unless processed_date == SKIP
|
|
184
|
+
@settlement_date = settlement_date unless settlement_date == SKIP
|
|
185
|
+
@merchant_id = merchant_id unless merchant_id == SKIP
|
|
186
|
+
@merchant_name = merchant_name unless merchant_name == SKIP
|
|
187
|
+
@amount = amount unless amount == SKIP
|
|
188
|
+
@acquirer_fee = acquirer_fee unless acquirer_fee == SKIP
|
|
189
|
+
@amount_to_merchant = amount_to_merchant unless amount_to_merchant == SKIP
|
|
190
|
+
@currency = currency unless currency == SKIP
|
|
191
|
+
@operation = operation unless operation == SKIP
|
|
192
|
+
@transaction_id = transaction_id unless transaction_id == SKIP
|
|
193
|
+
@transaction_date = transaction_date unless transaction_date == SKIP
|
|
194
|
+
@transaction_type = transaction_type unless transaction_type == SKIP
|
|
195
|
+
@merchant_reference = merchant_reference unless merchant_reference == SKIP
|
|
196
|
+
@card_scheme = card_scheme unless card_scheme == SKIP
|
|
197
|
+
@card_type = card_type unless card_type == SKIP
|
|
198
|
+
@is_european_card = is_european_card unless is_european_card == SKIP
|
|
199
|
+
@is_corporate_card = is_corporate_card unless is_corporate_card == SKIP
|
|
200
|
+
@card_mask = card_mask unless card_mask == SKIP
|
|
201
|
+
@capture_method = capture_method unless capture_method == SKIP
|
|
202
|
+
@issuer_country = issuer_country unless issuer_country == SKIP
|
|
203
|
+
@merchant_custom_data = merchant_custom_data unless merchant_custom_data == SKIP
|
|
204
|
+
@additional_properties = additional_properties
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Creates an instance of the object from a hash.
|
|
208
|
+
def self.from_hash(hash)
|
|
209
|
+
return nil unless hash
|
|
210
|
+
|
|
211
|
+
# Extract variables from the hash.
|
|
212
|
+
processed_date = hash.key?('processedDate') ? hash['processedDate'] : SKIP
|
|
213
|
+
settlement_date =
|
|
214
|
+
hash.key?('settlementDate') ? hash['settlementDate'] : SKIP
|
|
215
|
+
merchant_id = hash.key?('merchantId') ? hash['merchantId'] : SKIP
|
|
216
|
+
merchant_name = hash.key?('merchantName') ? hash['merchantName'] : SKIP
|
|
217
|
+
amount = hash.key?('amount') ? hash['amount'] : SKIP
|
|
218
|
+
acquirer_fee = hash.key?('acquirerFee') ? hash['acquirerFee'] : SKIP
|
|
219
|
+
amount_to_merchant =
|
|
220
|
+
hash.key?('amountToMerchant') ? hash['amountToMerchant'] : SKIP
|
|
221
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
222
|
+
operation = hash.key?('operation') ? hash['operation'] : SKIP
|
|
223
|
+
transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP
|
|
224
|
+
transaction_date = if hash.key?('transactionDate')
|
|
225
|
+
(DateTimeHelper.from_rfc3339(hash['transactionDate']) if hash['transactionDate'])
|
|
226
|
+
else
|
|
227
|
+
SKIP
|
|
228
|
+
end
|
|
229
|
+
transaction_type =
|
|
230
|
+
hash.key?('transactionType') ? hash['transactionType'] : SKIP
|
|
231
|
+
merchant_reference =
|
|
232
|
+
hash.key?('merchantReference') ? hash['merchantReference'] : SKIP
|
|
233
|
+
card_scheme = hash.key?('cardScheme') ? hash['cardScheme'] : SKIP
|
|
234
|
+
card_type = hash.key?('cardType') ? hash['cardType'] : SKIP
|
|
235
|
+
is_european_card =
|
|
236
|
+
hash.key?('isEuropeanCard') ? hash['isEuropeanCard'] : SKIP
|
|
237
|
+
is_corporate_card =
|
|
238
|
+
hash.key?('isCorporateCard') ? hash['isCorporateCard'] : SKIP
|
|
239
|
+
card_mask = hash.key?('cardMask') ? hash['cardMask'] : SKIP
|
|
240
|
+
capture_method = hash.key?('captureMethod') ? hash['captureMethod'] : SKIP
|
|
241
|
+
issuer_country = hash.key?('issuerCountry') ? hash['issuerCountry'] : SKIP
|
|
242
|
+
merchant_custom_data =
|
|
243
|
+
hash.key?('merchantCustomData') ? hash['merchantCustomData'] : SKIP
|
|
244
|
+
|
|
245
|
+
# Create a new hash for additional properties, removing known properties.
|
|
246
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
247
|
+
|
|
248
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
249
|
+
new_hash, proc { |value| value }
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
# Create object from extracted values.
|
|
253
|
+
Settlement.new(processed_date: processed_date,
|
|
254
|
+
settlement_date: settlement_date,
|
|
255
|
+
merchant_id: merchant_id,
|
|
256
|
+
merchant_name: merchant_name,
|
|
257
|
+
amount: amount,
|
|
258
|
+
acquirer_fee: acquirer_fee,
|
|
259
|
+
amount_to_merchant: amount_to_merchant,
|
|
260
|
+
currency: currency,
|
|
261
|
+
operation: operation,
|
|
262
|
+
transaction_id: transaction_id,
|
|
263
|
+
transaction_date: transaction_date,
|
|
264
|
+
transaction_type: transaction_type,
|
|
265
|
+
merchant_reference: merchant_reference,
|
|
266
|
+
card_scheme: card_scheme,
|
|
267
|
+
card_type: card_type,
|
|
268
|
+
is_european_card: is_european_card,
|
|
269
|
+
is_corporate_card: is_corporate_card,
|
|
270
|
+
card_mask: card_mask,
|
|
271
|
+
capture_method: capture_method,
|
|
272
|
+
issuer_country: issuer_country,
|
|
273
|
+
merchant_custom_data: merchant_custom_data,
|
|
274
|
+
additional_properties: additional_properties)
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
def to_custom_transaction_date
|
|
278
|
+
DateTimeHelper.to_rfc3339(transaction_date)
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Provides a human-readable string representation of the object.
|
|
282
|
+
def to_s
|
|
283
|
+
class_name = self.class.name.split('::').last
|
|
284
|
+
"<#{class_name} processed_date: #{@processed_date}, settlement_date: #{@settlement_date},"\
|
|
285
|
+
" merchant_id: #{@merchant_id}, merchant_name: #{@merchant_name}, amount: #{@amount},"\
|
|
286
|
+
" acquirer_fee: #{@acquirer_fee}, amount_to_merchant: #{@amount_to_merchant}, currency:"\
|
|
287
|
+
" #{@currency}, operation: #{@operation}, transaction_id: #{@transaction_id},"\
|
|
288
|
+
" transaction_date: #{@transaction_date}, transaction_type: #{@transaction_type},"\
|
|
289
|
+
" merchant_reference: #{@merchant_reference}, card_scheme: #{@card_scheme}, card_type:"\
|
|
290
|
+
" #{@card_type}, is_european_card: #{@is_european_card}, is_corporate_card:"\
|
|
291
|
+
" #{@is_corporate_card}, card_mask: #{@card_mask}, capture_method: #{@capture_method},"\
|
|
292
|
+
" issuer_country: #{@issuer_country}, merchant_custom_data: #{@merchant_custom_data},"\
|
|
293
|
+
" additional_properties: #{@additional_properties}>"
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
297
|
+
def inspect
|
|
298
|
+
class_name = self.class.name.split('::').last
|
|
299
|
+
"<#{class_name} processed_date: #{@processed_date.inspect}, settlement_date:"\
|
|
300
|
+
" #{@settlement_date.inspect}, merchant_id: #{@merchant_id.inspect}, merchant_name:"\
|
|
301
|
+
" #{@merchant_name.inspect}, amount: #{@amount.inspect}, acquirer_fee:"\
|
|
302
|
+
" #{@acquirer_fee.inspect}, amount_to_merchant: #{@amount_to_merchant.inspect}, currency:"\
|
|
303
|
+
" #{@currency.inspect}, operation: #{@operation.inspect}, transaction_id:"\
|
|
304
|
+
" #{@transaction_id.inspect}, transaction_date: #{@transaction_date.inspect},"\
|
|
305
|
+
" transaction_type: #{@transaction_type.inspect}, merchant_reference:"\
|
|
306
|
+
" #{@merchant_reference.inspect}, card_scheme: #{@card_scheme.inspect}, card_type:"\
|
|
307
|
+
" #{@card_type.inspect}, is_european_card: #{@is_european_card.inspect}, is_corporate_card:"\
|
|
308
|
+
" #{@is_corporate_card.inspect}, card_mask: #{@card_mask.inspect}, capture_method:"\
|
|
309
|
+
" #{@capture_method.inspect}, issuer_country: #{@issuer_country.inspect},"\
|
|
310
|
+
" merchant_custom_data: #{@merchant_custom_data.inspect}, additional_properties:"\
|
|
311
|
+
" #{@additional_properties}>"
|
|
312
|
+
end
|
|
313
|
+
end
|
|
314
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# dna_payments_partner_reporting_settlement_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was
|
|
4
|
+
# automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module DnaPaymentsPartnerReportingSettlementApIs
|
|
7
|
+
# SettlementsResponse Model.
|
|
8
|
+
class SettlementsResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Total count of records for the requested time period.
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :total_count
|
|
15
|
+
|
|
16
|
+
# Total count of records for the requested time period.
|
|
17
|
+
# @return [Array[Settlement]]
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['total_count'] = 'totalCount'
|
|
24
|
+
@_hash['data'] = 'data'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
total_count
|
|
32
|
+
data
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(total_count: SKIP, data: SKIP, additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
45
|
+
@total_count = total_count unless total_count == SKIP
|
|
46
|
+
@data = data unless data == SKIP
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP
|
|
56
|
+
# Parameter is an array, so we need to iterate through it
|
|
57
|
+
data = nil
|
|
58
|
+
unless hash['data'].nil?
|
|
59
|
+
data = []
|
|
60
|
+
hash['data'].each do |structure|
|
|
61
|
+
data << (Settlement.from_hash(structure) if structure)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
data = SKIP unless hash.key?('data')
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
SettlementsResponse.new(total_count: total_count,
|
|
76
|
+
data: data,
|
|
77
|
+
additional_properties: additional_properties)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a human-readable string representation of the object.
|
|
81
|
+
def to_s
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} total_count: #{@total_count}, data: #{@data}, additional_properties:"\
|
|
84
|
+
" #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
88
|
+
def inspect
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} total_count: #{@total_count.inspect}, data: #{@data.inspect},"\
|
|
91
|
+
" additional_properties: #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# dna_payments_partner_reporting_settlement_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was
|
|
4
|
+
# automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module DnaPaymentsPartnerReportingSettlementApIs
|
|
7
|
+
# open: all operations allowed. suspended/pending-closure: merchant-initiated
|
|
8
|
+
# operations prohibited, settlements/disputes still allowed. closed: no
|
|
9
|
+
# activity allowed.
|
|
10
|
+
class Status
|
|
11
|
+
STATUS = [
|
|
12
|
+
# TODO: Write general description for OPEN
|
|
13
|
+
OPEN = 'open'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for SUSPENDED
|
|
16
|
+
SUSPENDED = 'suspended'.freeze,
|
|
17
|
+
|
|
18
|
+
# TODO: Write general description for PENDINGCLOSURE
|
|
19
|
+
PENDINGCLOSURE = 'pending-closure'.freeze,
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for CLOSED
|
|
22
|
+
CLOSED = 'closed'.freeze
|
|
23
|
+
].freeze
|
|
24
|
+
|
|
25
|
+
def self.validate(value)
|
|
26
|
+
return false if value.nil?
|
|
27
|
+
|
|
28
|
+
STATUS.include?(value)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def self.from_value(value, default_value = OPEN)
|
|
32
|
+
return default_value if value.nil?
|
|
33
|
+
|
|
34
|
+
str = value.to_s.strip
|
|
35
|
+
|
|
36
|
+
case str.downcase
|
|
37
|
+
when 'open' then OPEN
|
|
38
|
+
when 'suspended' then SUSPENDED
|
|
39
|
+
when 'pendingclosure' then PENDINGCLOSURE
|
|
40
|
+
when 'closed' then CLOSED
|
|
41
|
+
else
|
|
42
|
+
default_value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# dna_payments_partner_reporting_settlement_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was
|
|
4
|
+
# automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module DnaPaymentsPartnerReportingSettlementApIs
|
|
7
|
+
# success: successful transaction. failed: failed transaction.
|
|
8
|
+
class Status1
|
|
9
|
+
STATUS1 = [
|
|
10
|
+
# TODO: Write general description for SUCCESS
|
|
11
|
+
SUCCESS = 'success'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for FAILED
|
|
14
|
+
FAILED = 'failed'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
STATUS1.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = SUCCESS)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'success' then SUCCESS
|
|
30
|
+
when 'failed' then FAILED
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# dna_payments_partner_reporting_settlement_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was
|
|
4
|
+
# automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module DnaPaymentsPartnerReportingSettlementApIs
|
|
7
|
+
# status2.
|
|
8
|
+
class Status2
|
|
9
|
+
STATUS2 = [
|
|
10
|
+
# TODO: Write general description for SUCCESS
|
|
11
|
+
SUCCESS = 'success'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for FAILED
|
|
14
|
+
FAILED = 'failed'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
STATUS2.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = SUCCESS)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'success' then SUCCESS
|
|
30
|
+
when 'failed' then FAILED
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# dna_payments_partner_reporting_settlement_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was
|
|
4
|
+
# automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module DnaPaymentsPartnerReportingSettlementApIs
|
|
7
|
+
# Terminal Model.
|
|
8
|
+
class Terminal < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Unique Terminal ID for the merchant, allocated by DNA Payments.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# MID allocated by DNA Payments. Available only for the pos terminal type.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :mid
|
|
19
|
+
|
|
20
|
+
# If true, a separate payment is received each day. If false, a single
|
|
21
|
+
# payment is received on Monday for the entire weekend (Fri/Sat/Sun
|
|
22
|
+
# combined).
|
|
23
|
+
# @return [TrueClass | FalseClass]
|
|
24
|
+
attr_accessor :daily_settlement
|
|
25
|
+
|
|
26
|
+
# Number of days after which settlement is processed for this merchant.
|
|
27
|
+
# @return [Integer]
|
|
28
|
+
attr_accessor :settlement_period
|
|
29
|
+
|
|
30
|
+
# Name of the merchant store provided during onboarding.
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :store_name
|
|
33
|
+
|
|
34
|
+
# Type of terminal: ecom (Ecommerce TID) or pos (physical terminal).
|
|
35
|
+
# @return [Type]
|
|
36
|
+
attr_accessor :type
|
|
37
|
+
|
|
38
|
+
# open: all operations allowed. suspended/pending-closure:
|
|
39
|
+
# merchant-initiated operations prohibited, settlements/disputes still
|
|
40
|
+
# allowed. closed: no activity allowed.
|
|
41
|
+
# @return [Status]
|
|
42
|
+
attr_accessor :status
|
|
43
|
+
|
|
44
|
+
# A mapping from model property names to API property names.
|
|
45
|
+
def self.names
|
|
46
|
+
@_hash = {} if @_hash.nil?
|
|
47
|
+
@_hash['id'] = 'id'
|
|
48
|
+
@_hash['mid'] = 'mid'
|
|
49
|
+
@_hash['daily_settlement'] = 'dailySettlement'
|
|
50
|
+
@_hash['settlement_period'] = 'settlementPeriod'
|
|
51
|
+
@_hash['store_name'] = 'storeName'
|
|
52
|
+
@_hash['type'] = 'type'
|
|
53
|
+
@_hash['status'] = 'status'
|
|
54
|
+
@_hash
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# An array for optional fields
|
|
58
|
+
def self.optionals
|
|
59
|
+
%w[
|
|
60
|
+
id
|
|
61
|
+
mid
|
|
62
|
+
daily_settlement
|
|
63
|
+
settlement_period
|
|
64
|
+
store_name
|
|
65
|
+
type
|
|
66
|
+
status
|
|
67
|
+
]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# An array for nullable fields
|
|
71
|
+
def self.nullables
|
|
72
|
+
[]
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def initialize(id: SKIP, mid: SKIP, daily_settlement: SKIP,
|
|
76
|
+
settlement_period: SKIP, store_name: SKIP, type: SKIP,
|
|
77
|
+
status: SKIP, additional_properties: nil)
|
|
78
|
+
# Add additional model properties to the instance
|
|
79
|
+
additional_properties = {} if additional_properties.nil?
|
|
80
|
+
|
|
81
|
+
@id = id unless id == SKIP
|
|
82
|
+
@mid = mid unless mid == SKIP
|
|
83
|
+
@daily_settlement = daily_settlement unless daily_settlement == SKIP
|
|
84
|
+
@settlement_period = settlement_period unless settlement_period == SKIP
|
|
85
|
+
@store_name = store_name unless store_name == SKIP
|
|
86
|
+
@type = type unless type == SKIP
|
|
87
|
+
@status = status unless status == SKIP
|
|
88
|
+
@additional_properties = additional_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Creates an instance of the object from a hash.
|
|
92
|
+
def self.from_hash(hash)
|
|
93
|
+
return nil unless hash
|
|
94
|
+
|
|
95
|
+
# Extract variables from the hash.
|
|
96
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
97
|
+
mid = hash.key?('mid') ? hash['mid'] : SKIP
|
|
98
|
+
daily_settlement =
|
|
99
|
+
hash.key?('dailySettlement') ? hash['dailySettlement'] : SKIP
|
|
100
|
+
settlement_period =
|
|
101
|
+
hash.key?('settlementPeriod') ? hash['settlementPeriod'] : SKIP
|
|
102
|
+
store_name = hash.key?('storeName') ? hash['storeName'] : SKIP
|
|
103
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
104
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
105
|
+
|
|
106
|
+
# Create a new hash for additional properties, removing known properties.
|
|
107
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
108
|
+
|
|
109
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
110
|
+
new_hash, proc { |value| value }
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
# Create object from extracted values.
|
|
114
|
+
Terminal.new(id: id,
|
|
115
|
+
mid: mid,
|
|
116
|
+
daily_settlement: daily_settlement,
|
|
117
|
+
settlement_period: settlement_period,
|
|
118
|
+
store_name: store_name,
|
|
119
|
+
type: type,
|
|
120
|
+
status: status,
|
|
121
|
+
additional_properties: additional_properties)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Provides a human-readable string representation of the object.
|
|
125
|
+
def to_s
|
|
126
|
+
class_name = self.class.name.split('::').last
|
|
127
|
+
"<#{class_name} id: #{@id}, mid: #{@mid}, daily_settlement: #{@daily_settlement},"\
|
|
128
|
+
" settlement_period: #{@settlement_period}, store_name: #{@store_name}, type: #{@type},"\
|
|
129
|
+
" status: #{@status}, additional_properties: #{@additional_properties}>"
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
133
|
+
def inspect
|
|
134
|
+
class_name = self.class.name.split('::').last
|
|
135
|
+
"<#{class_name} id: #{@id.inspect}, mid: #{@mid.inspect}, daily_settlement:"\
|
|
136
|
+
" #{@daily_settlement.inspect}, settlement_period: #{@settlement_period.inspect},"\
|
|
137
|
+
" store_name: #{@store_name.inspect}, type: #{@type.inspect}, status: #{@status.inspect},"\
|
|
138
|
+
" additional_properties: #{@additional_properties}>"
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# dna_payments_partner_reporting_settlement_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was
|
|
4
|
+
# automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module DnaPaymentsPartnerReportingSettlementApIs
|
|
7
|
+
# TokenType.
|
|
8
|
+
class TokenType
|
|
9
|
+
TOKEN_TYPE = [
|
|
10
|
+
# TODO: Write general description for BEARER
|
|
11
|
+
BEARER = 'Bearer'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
def self.validate(value)
|
|
15
|
+
return false if value.nil?
|
|
16
|
+
|
|
17
|
+
TOKEN_TYPE.include?(value)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.from_value(value, default_value = BEARER)
|
|
21
|
+
return default_value if value.nil?
|
|
22
|
+
|
|
23
|
+
default_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|