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,298 @@
|
|
|
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
|
+
# PosTransaction Model.
|
|
9
|
+
class PosTransaction < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Unique ID for the merchant, allocated by DNA Payments.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :merchant_id
|
|
16
|
+
|
|
17
|
+
# Name of the merchant.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :merchant_name
|
|
20
|
+
|
|
21
|
+
# Date/time the transaction was created on the DNA Platform.
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :transaction_date
|
|
24
|
+
|
|
25
|
+
# Transaction amount.
|
|
26
|
+
# @return [Float]
|
|
27
|
+
attr_accessor :amount
|
|
28
|
+
|
|
29
|
+
# Transaction currency code. ISO 4217 format, e.g. GBP.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :currency
|
|
32
|
+
|
|
33
|
+
# success: successful transaction. failed: failed transaction.
|
|
34
|
+
# @return [Status1]
|
|
35
|
+
attr_accessor :status
|
|
36
|
+
|
|
37
|
+
# Response code returned by the Acquirer during the authorisation process.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :return_code
|
|
40
|
+
|
|
41
|
+
# Description of the returnCode returned by the Acquirer.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :return_code_description
|
|
44
|
+
|
|
45
|
+
# Unique ID allocated to the transaction.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :transaction_id
|
|
48
|
+
|
|
49
|
+
# Unique Terminal ID for the merchant, allocated by DNA Payments.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :terminal_id
|
|
52
|
+
|
|
53
|
+
# Confirmation of the operation performed.
|
|
54
|
+
# @return [Operation]
|
|
55
|
+
attr_accessor :operation
|
|
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
|
+
# Country where the transaction was processed.
|
|
63
|
+
# @return [String]
|
|
64
|
+
attr_accessor :transaction_country
|
|
65
|
+
|
|
66
|
+
# City where the transaction was processed.
|
|
67
|
+
# @return [String]
|
|
68
|
+
attr_accessor :transaction_city
|
|
69
|
+
|
|
70
|
+
# Card scheme used in the transaction, e.g. mastercard, visa.
|
|
71
|
+
# @return [String]
|
|
72
|
+
attr_accessor :card_scheme
|
|
73
|
+
|
|
74
|
+
# Masked PAN for the payment card used; contains the first six and last four
|
|
75
|
+
# digits.
|
|
76
|
+
# @return [String]
|
|
77
|
+
attr_accessor :card_mask
|
|
78
|
+
|
|
79
|
+
# Type of card used in the transaction.
|
|
80
|
+
# @return [String]
|
|
81
|
+
attr_accessor :card_type
|
|
82
|
+
|
|
83
|
+
# Whether the card used was issued in Europe (including the UK).
|
|
84
|
+
# @return [TrueClass | FalseClass]
|
|
85
|
+
attr_accessor :is_european_card
|
|
86
|
+
|
|
87
|
+
# Whether the card used is a corporate card.
|
|
88
|
+
# @return [TrueClass | FalseClass]
|
|
89
|
+
attr_accessor :is_corporate_card
|
|
90
|
+
|
|
91
|
+
# Capture method for the transaction.
|
|
92
|
+
# @return [CaptureMethod]
|
|
93
|
+
attr_accessor :capture_method
|
|
94
|
+
|
|
95
|
+
# A mapping from model property names to API property names.
|
|
96
|
+
def self.names
|
|
97
|
+
@_hash = {} if @_hash.nil?
|
|
98
|
+
@_hash['merchant_id'] = 'merchantId'
|
|
99
|
+
@_hash['merchant_name'] = 'merchantName'
|
|
100
|
+
@_hash['transaction_date'] = 'transactionDate'
|
|
101
|
+
@_hash['amount'] = 'amount'
|
|
102
|
+
@_hash['currency'] = 'currency'
|
|
103
|
+
@_hash['status'] = 'status'
|
|
104
|
+
@_hash['return_code'] = 'returnCode'
|
|
105
|
+
@_hash['return_code_description'] = 'returnCodeDescription'
|
|
106
|
+
@_hash['transaction_id'] = 'transactionId'
|
|
107
|
+
@_hash['terminal_id'] = 'terminalId'
|
|
108
|
+
@_hash['operation'] = 'operation'
|
|
109
|
+
@_hash['transaction_type'] = 'transactionType'
|
|
110
|
+
@_hash['transaction_country'] = 'transactionCountry'
|
|
111
|
+
@_hash['transaction_city'] = 'transactionCity'
|
|
112
|
+
@_hash['card_scheme'] = 'cardScheme'
|
|
113
|
+
@_hash['card_mask'] = 'cardMask'
|
|
114
|
+
@_hash['card_type'] = 'cardType'
|
|
115
|
+
@_hash['is_european_card'] = 'isEuropeanCard'
|
|
116
|
+
@_hash['is_corporate_card'] = 'isCorporateCard'
|
|
117
|
+
@_hash['capture_method'] = 'captureMethod'
|
|
118
|
+
@_hash
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# An array for optional fields
|
|
122
|
+
def self.optionals
|
|
123
|
+
%w[
|
|
124
|
+
merchant_id
|
|
125
|
+
merchant_name
|
|
126
|
+
transaction_date
|
|
127
|
+
amount
|
|
128
|
+
currency
|
|
129
|
+
status
|
|
130
|
+
return_code
|
|
131
|
+
return_code_description
|
|
132
|
+
transaction_id
|
|
133
|
+
terminal_id
|
|
134
|
+
operation
|
|
135
|
+
transaction_type
|
|
136
|
+
transaction_country
|
|
137
|
+
transaction_city
|
|
138
|
+
card_scheme
|
|
139
|
+
card_mask
|
|
140
|
+
card_type
|
|
141
|
+
is_european_card
|
|
142
|
+
is_corporate_card
|
|
143
|
+
capture_method
|
|
144
|
+
]
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# An array for nullable fields
|
|
148
|
+
def self.nullables
|
|
149
|
+
%w[
|
|
150
|
+
transaction_country
|
|
151
|
+
transaction_city
|
|
152
|
+
card_scheme
|
|
153
|
+
card_mask
|
|
154
|
+
card_type
|
|
155
|
+
is_european_card
|
|
156
|
+
is_corporate_card
|
|
157
|
+
capture_method
|
|
158
|
+
]
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def initialize(merchant_id: SKIP, merchant_name: SKIP,
|
|
162
|
+
transaction_date: SKIP, amount: SKIP, currency: SKIP,
|
|
163
|
+
status: SKIP, return_code: SKIP,
|
|
164
|
+
return_code_description: SKIP, transaction_id: SKIP,
|
|
165
|
+
terminal_id: SKIP, operation: SKIP, transaction_type: SKIP,
|
|
166
|
+
transaction_country: SKIP, transaction_city: SKIP,
|
|
167
|
+
card_scheme: SKIP, card_mask: SKIP, card_type: SKIP,
|
|
168
|
+
is_european_card: SKIP, is_corporate_card: SKIP,
|
|
169
|
+
capture_method: SKIP, additional_properties: nil)
|
|
170
|
+
# Add additional model properties to the instance
|
|
171
|
+
additional_properties = {} if additional_properties.nil?
|
|
172
|
+
|
|
173
|
+
@merchant_id = merchant_id unless merchant_id == SKIP
|
|
174
|
+
@merchant_name = merchant_name unless merchant_name == SKIP
|
|
175
|
+
@transaction_date = transaction_date unless transaction_date == SKIP
|
|
176
|
+
@amount = amount unless amount == SKIP
|
|
177
|
+
@currency = currency unless currency == SKIP
|
|
178
|
+
@status = status unless status == SKIP
|
|
179
|
+
@return_code = return_code unless return_code == SKIP
|
|
180
|
+
@return_code_description = return_code_description unless return_code_description == SKIP
|
|
181
|
+
@transaction_id = transaction_id unless transaction_id == SKIP
|
|
182
|
+
@terminal_id = terminal_id unless terminal_id == SKIP
|
|
183
|
+
@operation = operation unless operation == SKIP
|
|
184
|
+
@transaction_type = transaction_type unless transaction_type == SKIP
|
|
185
|
+
@transaction_country = transaction_country unless transaction_country == SKIP
|
|
186
|
+
@transaction_city = transaction_city unless transaction_city == SKIP
|
|
187
|
+
@card_scheme = card_scheme unless card_scheme == SKIP
|
|
188
|
+
@card_mask = card_mask unless card_mask == SKIP
|
|
189
|
+
@card_type = card_type unless card_type == SKIP
|
|
190
|
+
@is_european_card = is_european_card unless is_european_card == SKIP
|
|
191
|
+
@is_corporate_card = is_corporate_card unless is_corporate_card == SKIP
|
|
192
|
+
@capture_method = capture_method unless capture_method == SKIP
|
|
193
|
+
@additional_properties = additional_properties
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Creates an instance of the object from a hash.
|
|
197
|
+
def self.from_hash(hash)
|
|
198
|
+
return nil unless hash
|
|
199
|
+
|
|
200
|
+
# Extract variables from the hash.
|
|
201
|
+
merchant_id = hash.key?('merchantId') ? hash['merchantId'] : SKIP
|
|
202
|
+
merchant_name = hash.key?('merchantName') ? hash['merchantName'] : SKIP
|
|
203
|
+
transaction_date = if hash.key?('transactionDate')
|
|
204
|
+
(DateTimeHelper.from_rfc3339(hash['transactionDate']) if hash['transactionDate'])
|
|
205
|
+
else
|
|
206
|
+
SKIP
|
|
207
|
+
end
|
|
208
|
+
amount = hash.key?('amount') ? hash['amount'] : SKIP
|
|
209
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
210
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
211
|
+
return_code = hash.key?('returnCode') ? hash['returnCode'] : SKIP
|
|
212
|
+
return_code_description =
|
|
213
|
+
hash.key?('returnCodeDescription') ? hash['returnCodeDescription'] : SKIP
|
|
214
|
+
transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP
|
|
215
|
+
terminal_id = hash.key?('terminalId') ? hash['terminalId'] : SKIP
|
|
216
|
+
operation = hash.key?('operation') ? hash['operation'] : SKIP
|
|
217
|
+
transaction_type =
|
|
218
|
+
hash.key?('transactionType') ? hash['transactionType'] : SKIP
|
|
219
|
+
transaction_country =
|
|
220
|
+
hash.key?('transactionCountry') ? hash['transactionCountry'] : SKIP
|
|
221
|
+
transaction_city =
|
|
222
|
+
hash.key?('transactionCity') ? hash['transactionCity'] : SKIP
|
|
223
|
+
card_scheme = hash.key?('cardScheme') ? hash['cardScheme'] : SKIP
|
|
224
|
+
card_mask = hash.key?('cardMask') ? hash['cardMask'] : SKIP
|
|
225
|
+
card_type = hash.key?('cardType') ? hash['cardType'] : SKIP
|
|
226
|
+
is_european_card =
|
|
227
|
+
hash.key?('isEuropeanCard') ? hash['isEuropeanCard'] : SKIP
|
|
228
|
+
is_corporate_card =
|
|
229
|
+
hash.key?('isCorporateCard') ? hash['isCorporateCard'] : SKIP
|
|
230
|
+
capture_method = hash.key?('captureMethod') ? hash['captureMethod'] : SKIP
|
|
231
|
+
|
|
232
|
+
# Create a new hash for additional properties, removing known properties.
|
|
233
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
234
|
+
|
|
235
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
236
|
+
new_hash, proc { |value| value }
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
# Create object from extracted values.
|
|
240
|
+
PosTransaction.new(merchant_id: merchant_id,
|
|
241
|
+
merchant_name: merchant_name,
|
|
242
|
+
transaction_date: transaction_date,
|
|
243
|
+
amount: amount,
|
|
244
|
+
currency: currency,
|
|
245
|
+
status: status,
|
|
246
|
+
return_code: return_code,
|
|
247
|
+
return_code_description: return_code_description,
|
|
248
|
+
transaction_id: transaction_id,
|
|
249
|
+
terminal_id: terminal_id,
|
|
250
|
+
operation: operation,
|
|
251
|
+
transaction_type: transaction_type,
|
|
252
|
+
transaction_country: transaction_country,
|
|
253
|
+
transaction_city: transaction_city,
|
|
254
|
+
card_scheme: card_scheme,
|
|
255
|
+
card_mask: card_mask,
|
|
256
|
+
card_type: card_type,
|
|
257
|
+
is_european_card: is_european_card,
|
|
258
|
+
is_corporate_card: is_corporate_card,
|
|
259
|
+
capture_method: capture_method,
|
|
260
|
+
additional_properties: additional_properties)
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
def to_custom_transaction_date
|
|
264
|
+
DateTimeHelper.to_rfc3339(transaction_date)
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Provides a human-readable string representation of the object.
|
|
268
|
+
def to_s
|
|
269
|
+
class_name = self.class.name.split('::').last
|
|
270
|
+
"<#{class_name} merchant_id: #{@merchant_id}, merchant_name: #{@merchant_name},"\
|
|
271
|
+
" transaction_date: #{@transaction_date}, amount: #{@amount}, currency: #{@currency},"\
|
|
272
|
+
" status: #{@status}, return_code: #{@return_code}, return_code_description:"\
|
|
273
|
+
" #{@return_code_description}, transaction_id: #{@transaction_id}, terminal_id:"\
|
|
274
|
+
" #{@terminal_id}, operation: #{@operation}, transaction_type: #{@transaction_type},"\
|
|
275
|
+
" transaction_country: #{@transaction_country}, transaction_city: #{@transaction_city},"\
|
|
276
|
+
" card_scheme: #{@card_scheme}, card_mask: #{@card_mask}, card_type: #{@card_type},"\
|
|
277
|
+
" is_european_card: #{@is_european_card}, is_corporate_card: #{@is_corporate_card},"\
|
|
278
|
+
" capture_method: #{@capture_method}, additional_properties: #{@additional_properties}>"
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
282
|
+
def inspect
|
|
283
|
+
class_name = self.class.name.split('::').last
|
|
284
|
+
"<#{class_name} merchant_id: #{@merchant_id.inspect}, merchant_name:"\
|
|
285
|
+
" #{@merchant_name.inspect}, transaction_date: #{@transaction_date.inspect}, amount:"\
|
|
286
|
+
" #{@amount.inspect}, currency: #{@currency.inspect}, status: #{@status.inspect},"\
|
|
287
|
+
" return_code: #{@return_code.inspect}, return_code_description:"\
|
|
288
|
+
" #{@return_code_description.inspect}, transaction_id: #{@transaction_id.inspect},"\
|
|
289
|
+
" terminal_id: #{@terminal_id.inspect}, operation: #{@operation.inspect}, transaction_type:"\
|
|
290
|
+
" #{@transaction_type.inspect}, transaction_country: #{@transaction_country.inspect},"\
|
|
291
|
+
" transaction_city: #{@transaction_city.inspect}, card_scheme: #{@card_scheme.inspect},"\
|
|
292
|
+
" card_mask: #{@card_mask.inspect}, card_type: #{@card_type.inspect}, is_european_card:"\
|
|
293
|
+
" #{@is_european_card.inspect}, is_corporate_card: #{@is_corporate_card.inspect},"\
|
|
294
|
+
" capture_method: #{@capture_method.inspect}, additional_properties:"\
|
|
295
|
+
" #{@additional_properties}>"
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
# PosTransactionsResponse Model.
|
|
8
|
+
class PosTransactionsResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Total amount for the requested time period.
|
|
13
|
+
# @return [Float]
|
|
14
|
+
attr_accessor :total_amount
|
|
15
|
+
|
|
16
|
+
# Total count of records for the requested time period.
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :total_count
|
|
19
|
+
|
|
20
|
+
# Total count of records for the requested time period.
|
|
21
|
+
# @return [Array[PosTransaction]]
|
|
22
|
+
attr_accessor :data
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['total_amount'] = 'totalAmount'
|
|
28
|
+
@_hash['total_count'] = 'totalCount'
|
|
29
|
+
@_hash['data'] = 'data'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
total_amount
|
|
37
|
+
total_count
|
|
38
|
+
data
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(total_amount: SKIP, total_count: SKIP, data: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@total_amount = total_amount unless total_amount == SKIP
|
|
53
|
+
@total_count = total_count unless total_count == SKIP
|
|
54
|
+
@data = data unless data == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
total_amount = hash.key?('totalAmount') ? hash['totalAmount'] : SKIP
|
|
64
|
+
total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP
|
|
65
|
+
# Parameter is an array, so we need to iterate through it
|
|
66
|
+
data = nil
|
|
67
|
+
unless hash['data'].nil?
|
|
68
|
+
data = []
|
|
69
|
+
hash['data'].each do |structure|
|
|
70
|
+
data << (PosTransaction.from_hash(structure) if structure)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
data = SKIP unless hash.key?('data')
|
|
75
|
+
|
|
76
|
+
# Create a new hash for additional properties, removing known properties.
|
|
77
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
78
|
+
|
|
79
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
80
|
+
new_hash, proc { |value| value }
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# Create object from extracted values.
|
|
84
|
+
PosTransactionsResponse.new(total_amount: total_amount,
|
|
85
|
+
total_count: total_count,
|
|
86
|
+
data: data,
|
|
87
|
+
additional_properties: additional_properties)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Provides a human-readable string representation of the object.
|
|
91
|
+
def to_s
|
|
92
|
+
class_name = self.class.name.split('::').last
|
|
93
|
+
"<#{class_name} total_amount: #{@total_amount}, total_count: #{@total_count}, data:"\
|
|
94
|
+
" #{@data}, additional_properties: #{@additional_properties}>"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
98
|
+
def inspect
|
|
99
|
+
class_name = self.class.name.split('::').last
|
|
100
|
+
"<#{class_name} total_amount: #{@total_amount.inspect}, total_count:"\
|
|
101
|
+
" #{@total_count.inspect}, data: #{@data.inspect}, additional_properties:"\
|
|
102
|
+
" #{@additional_properties}>"
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
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
|
+
# processor.
|
|
8
|
+
class Processor
|
|
9
|
+
PROCESSOR = [
|
|
10
|
+
# TODO: Write general description for DNA
|
|
11
|
+
DNA = 'dna'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for OPTOMANY
|
|
14
|
+
OPTOMANY = 'optomany'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
PROCESSOR.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = DNA)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'dna' then DNA
|
|
30
|
+
when 'optomany' then OPTOMANY
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
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
|
+
# Scope of the action to be performed with the credentials.
|
|
8
|
+
class Scope
|
|
9
|
+
SCOPE = [
|
|
10
|
+
# TODO: Write general description for PARTNERS_REPORTING
|
|
11
|
+
PARTNERS_REPORTING = 'partners_reporting'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
def self.validate(value)
|
|
15
|
+
return false if value.nil?
|
|
16
|
+
|
|
17
|
+
SCOPE.include?(value)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.from_value(value, default_value = PARTNERS_REPORTING)
|
|
21
|
+
return default_value if value.nil?
|
|
22
|
+
|
|
23
|
+
default_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
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
|
+
# searchBy.
|
|
8
|
+
class SearchBy
|
|
9
|
+
SEARCH_BY = [
|
|
10
|
+
# TODO: Write general description for PROCESSEDDATE
|
|
11
|
+
PROCESSEDDATE = 'processed-date'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SETTLEMENTDATE
|
|
14
|
+
SETTLEMENTDATE = 'settlement-date'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
SEARCH_BY.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = PROCESSEDDATE)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'processeddate' then PROCESSEDDATE
|
|
30
|
+
when 'settlementdate' then SETTLEMENTDATE
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|