worldpay-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 +147 -0
- data/bin/console +15 -0
- data/lib/reporting_authorization_summary_api/api_helper.rb +10 -0
- data/lib/reporting_authorization_summary_api/apis/authorizations_api.rb +258 -0
- data/lib/reporting_authorization_summary_api/apis/base_api.rb +67 -0
- data/lib/reporting_authorization_summary_api/client.rb +75 -0
- data/lib/reporting_authorization_summary_api/configuration.rb +165 -0
- data/lib/reporting_authorization_summary_api/exceptions/api_exception.rb +21 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_cardnetwork0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_chain0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_division0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_merchant0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_store0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_superchain0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_transactiondate0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/http/api_response.rb +19 -0
- data/lib/reporting_authorization_summary_api/http/auth/custom_header_authentication.rb +52 -0
- data/lib/reporting_authorization_summary_api/http/http_call_back.rb +10 -0
- data/lib/reporting_authorization_summary_api/http/http_method_enum.rb +10 -0
- data/lib/reporting_authorization_summary_api/http/http_request.rb +10 -0
- data/lib/reporting_authorization_summary_api/http/http_response.rb +10 -0
- data/lib/reporting_authorization_summary_api/http/proxy_settings.rb +22 -0
- data/lib/reporting_authorization_summary_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/reporting_authorization_summary_api/logging/sdk_logger.rb +17 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request.rb +107 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_chain.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_division.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_store.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_super_chain.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_card_network.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_merchant.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_transaction_date.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/authorizations_summary_cardnetwork_response.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/authorizations_summary_transactiondate_response.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/base_model.rb +110 -0
- data/lib/reporting_authorization_summary_api/models/card_network_type.rb +68 -0
- data/lib/reporting_authorization_summary_api/models/code_and_description.rb +98 -0
- data/lib/reporting_authorization_summary_api/models/common_summary_detail.rb +161 -0
- data/lib/reporting_authorization_summary_api/models/common_summary_responses.rb +213 -0
- data/lib/reporting_authorization_summary_api/models/date_range.rb +82 -0
- data/lib/reporting_authorization_summary_api/models/date_range_type.rb +85 -0
- data/lib/reporting_authorization_summary_api/models/entity.rb +99 -0
- data/lib/reporting_authorization_summary_api/models/entity_division_response.rb +94 -0
- data/lib/reporting_authorization_summary_api/models/entity_store_response.rb +95 -0
- data/lib/reporting_authorization_summary_api/models/error.rb +96 -0
- data/lib/reporting_authorization_summary_api/models/error_response.rb +84 -0
- data/lib/reporting_authorization_summary_api/models/level.rb +67 -0
- data/lib/reporting_authorization_summary_api/models/pagination.rb +87 -0
- data/lib/reporting_authorization_summary_api/models/pagination_response.rb +108 -0
- data/lib/reporting_authorization_summary_api/models/pagination_type.rb +87 -0
- data/lib/reporting_authorization_summary_api/models/summary.rb +183 -0
- data/lib/reporting_authorization_summary_api/models/summary1.rb +173 -0
- data/lib/reporting_authorization_summary_api/models/summary2.rb +190 -0
- data/lib/reporting_authorization_summary_api/models/summary3.rb +189 -0
- data/lib/reporting_authorization_summary_api/models/summary4.rb +174 -0
- data/lib/reporting_authorization_summary_api/models/summary5.rb +174 -0
- data/lib/reporting_authorization_summary_api/models/summary6.rb +173 -0
- data/lib/reporting_authorization_summary_api/models/summary_card_network.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_chain.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_division.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_entity_chain.rb +79 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_entity_entity.rb +79 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_entity_super_chain.rb +78 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_merchant.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_store.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_super_chain.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_responses.rb +202 -0
- data/lib/reporting_authorization_summary_api/models/summary_transaction_date.rb +233 -0
- data/lib/reporting_authorization_summary_api/utilities/date_time_helper.rb +11 -0
- data/lib/reporting_authorization_summary_api/utilities/file_wrapper.rb +28 -0
- data/lib/reporting_authorization_summary_api.rb +132 -0
- metadata +158 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# reporting_authorization_summary_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically
|
|
4
|
+
# generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingAuthorizationSummaryApi
|
|
7
|
+
# SummaryDetailSuperChain Model.
|
|
8
|
+
class SummaryDetailSuperChain < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [PaginationResponse]
|
|
14
|
+
attr_accessor :pagination
|
|
15
|
+
|
|
16
|
+
# Count of the approved transactions.
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :total_approved_count
|
|
19
|
+
|
|
20
|
+
# Sum of the amount of approved transactions.
|
|
21
|
+
# @return [Float]
|
|
22
|
+
attr_accessor :total_approved_amount
|
|
23
|
+
|
|
24
|
+
# Count of the declined transactions.
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
attr_accessor :total_declined_count
|
|
27
|
+
|
|
28
|
+
# Sum of the amount of declined transactions.
|
|
29
|
+
# @return [Float]
|
|
30
|
+
attr_accessor :total_declined_amount
|
|
31
|
+
|
|
32
|
+
# Ratio of the count of approved transactions to the count of total
|
|
33
|
+
# transctions.
|
|
34
|
+
# @return [Float]
|
|
35
|
+
attr_accessor :total_approved_count_percent
|
|
36
|
+
|
|
37
|
+
# Ratio of the sum of the amount of the approved transactions to the sum of
|
|
38
|
+
# amount of total transctions.
|
|
39
|
+
# @return [Float]
|
|
40
|
+
attr_accessor :total_approved_amount_percent
|
|
41
|
+
|
|
42
|
+
# Ratio of the count of the declined transactions to the count of total
|
|
43
|
+
# transctions.
|
|
44
|
+
# @return [Float]
|
|
45
|
+
attr_accessor :total_declined_count_percent
|
|
46
|
+
|
|
47
|
+
# Ratio of the sum of the amount of the declined transactions to the sum of
|
|
48
|
+
# the amount of total transctions.
|
|
49
|
+
# @return [Float]
|
|
50
|
+
attr_accessor :total_declined_amount_percent
|
|
51
|
+
|
|
52
|
+
# Sum of the count of the approved transactions and the count of the
|
|
53
|
+
# declined transactions.
|
|
54
|
+
# @return [Integer]
|
|
55
|
+
attr_accessor :total_count
|
|
56
|
+
|
|
57
|
+
# Sum of the amount of approved transactions and the amount of the declined
|
|
58
|
+
# transactions.
|
|
59
|
+
# @return [Float]
|
|
60
|
+
attr_accessor :total_amount
|
|
61
|
+
|
|
62
|
+
# Capturing the fields.
|
|
63
|
+
# @return [Array[Summary6]]
|
|
64
|
+
attr_accessor :summaries
|
|
65
|
+
|
|
66
|
+
# A mapping from model property names to API property names.
|
|
67
|
+
def self.names
|
|
68
|
+
@_hash = {} if @_hash.nil?
|
|
69
|
+
@_hash['pagination'] = 'pagination'
|
|
70
|
+
@_hash['total_approved_count'] = 'totalApprovedCount'
|
|
71
|
+
@_hash['total_approved_amount'] = 'totalApprovedAmount'
|
|
72
|
+
@_hash['total_declined_count'] = 'totalDeclinedCount'
|
|
73
|
+
@_hash['total_declined_amount'] = 'totalDeclinedAmount'
|
|
74
|
+
@_hash['total_approved_count_percent'] = 'totalApprovedCountPercent'
|
|
75
|
+
@_hash['total_approved_amount_percent'] = 'totalApprovedAmountPercent'
|
|
76
|
+
@_hash['total_declined_count_percent'] = 'totalDeclinedCountPercent'
|
|
77
|
+
@_hash['total_declined_amount_percent'] = 'totalDeclinedAmountPercent'
|
|
78
|
+
@_hash['total_count'] = 'totalCount'
|
|
79
|
+
@_hash['total_amount'] = 'totalAmount'
|
|
80
|
+
@_hash['summaries'] = 'summaries'
|
|
81
|
+
@_hash
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# An array for optional fields
|
|
85
|
+
def self.optionals
|
|
86
|
+
%w[
|
|
87
|
+
pagination
|
|
88
|
+
total_approved_count
|
|
89
|
+
total_approved_amount
|
|
90
|
+
total_declined_count
|
|
91
|
+
total_declined_amount
|
|
92
|
+
total_approved_count_percent
|
|
93
|
+
total_approved_amount_percent
|
|
94
|
+
total_declined_count_percent
|
|
95
|
+
total_declined_amount_percent
|
|
96
|
+
total_count
|
|
97
|
+
total_amount
|
|
98
|
+
summaries
|
|
99
|
+
]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# An array for nullable fields
|
|
103
|
+
def self.nullables
|
|
104
|
+
[]
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def initialize(pagination: SKIP, total_approved_count: SKIP,
|
|
108
|
+
total_approved_amount: SKIP, total_declined_count: SKIP,
|
|
109
|
+
total_declined_amount: SKIP,
|
|
110
|
+
total_approved_count_percent: SKIP,
|
|
111
|
+
total_approved_amount_percent: SKIP,
|
|
112
|
+
total_declined_count_percent: SKIP,
|
|
113
|
+
total_declined_amount_percent: SKIP, total_count: SKIP,
|
|
114
|
+
total_amount: SKIP, summaries: SKIP,
|
|
115
|
+
additional_properties: nil)
|
|
116
|
+
# Add additional model properties to the instance
|
|
117
|
+
additional_properties = {} if additional_properties.nil?
|
|
118
|
+
|
|
119
|
+
@pagination = pagination unless pagination == SKIP
|
|
120
|
+
@total_approved_count = total_approved_count unless total_approved_count == SKIP
|
|
121
|
+
@total_approved_amount = total_approved_amount unless total_approved_amount == SKIP
|
|
122
|
+
@total_declined_count = total_declined_count unless total_declined_count == SKIP
|
|
123
|
+
@total_declined_amount = total_declined_amount unless total_declined_amount == SKIP
|
|
124
|
+
unless total_approved_count_percent == SKIP
|
|
125
|
+
@total_approved_count_percent =
|
|
126
|
+
total_approved_count_percent
|
|
127
|
+
end
|
|
128
|
+
unless total_approved_amount_percent == SKIP
|
|
129
|
+
@total_approved_amount_percent =
|
|
130
|
+
total_approved_amount_percent
|
|
131
|
+
end
|
|
132
|
+
unless total_declined_count_percent == SKIP
|
|
133
|
+
@total_declined_count_percent =
|
|
134
|
+
total_declined_count_percent
|
|
135
|
+
end
|
|
136
|
+
unless total_declined_amount_percent == SKIP
|
|
137
|
+
@total_declined_amount_percent =
|
|
138
|
+
total_declined_amount_percent
|
|
139
|
+
end
|
|
140
|
+
@total_count = total_count unless total_count == SKIP
|
|
141
|
+
@total_amount = total_amount unless total_amount == SKIP
|
|
142
|
+
@summaries = summaries unless summaries == SKIP
|
|
143
|
+
@additional_properties = additional_properties
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Creates an instance of the object from a hash.
|
|
147
|
+
def self.from_hash(hash)
|
|
148
|
+
return nil unless hash
|
|
149
|
+
|
|
150
|
+
# Extract variables from the hash.
|
|
151
|
+
pagination = PaginationResponse.from_hash(hash['pagination']) if hash['pagination']
|
|
152
|
+
total_approved_count =
|
|
153
|
+
hash.key?('totalApprovedCount') ? hash['totalApprovedCount'] : SKIP
|
|
154
|
+
total_approved_amount =
|
|
155
|
+
hash.key?('totalApprovedAmount') ? hash['totalApprovedAmount'] : SKIP
|
|
156
|
+
total_declined_count =
|
|
157
|
+
hash.key?('totalDeclinedCount') ? hash['totalDeclinedCount'] : SKIP
|
|
158
|
+
total_declined_amount =
|
|
159
|
+
hash.key?('totalDeclinedAmount') ? hash['totalDeclinedAmount'] : SKIP
|
|
160
|
+
total_approved_count_percent =
|
|
161
|
+
hash.key?('totalApprovedCountPercent') ? hash['totalApprovedCountPercent'] : SKIP
|
|
162
|
+
total_approved_amount_percent =
|
|
163
|
+
hash.key?('totalApprovedAmountPercent') ? hash['totalApprovedAmountPercent'] : SKIP
|
|
164
|
+
total_declined_count_percent =
|
|
165
|
+
hash.key?('totalDeclinedCountPercent') ? hash['totalDeclinedCountPercent'] : SKIP
|
|
166
|
+
total_declined_amount_percent =
|
|
167
|
+
hash.key?('totalDeclinedAmountPercent') ? hash['totalDeclinedAmountPercent'] : SKIP
|
|
168
|
+
total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP
|
|
169
|
+
total_amount = hash.key?('totalAmount') ? hash['totalAmount'] : SKIP
|
|
170
|
+
# Parameter is an array, so we need to iterate through it
|
|
171
|
+
summaries = nil
|
|
172
|
+
unless hash['summaries'].nil?
|
|
173
|
+
summaries = []
|
|
174
|
+
hash['summaries'].each do |structure|
|
|
175
|
+
summaries << (Summary6.from_hash(structure) if structure)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
summaries = SKIP unless hash.key?('summaries')
|
|
180
|
+
|
|
181
|
+
# Create a new hash for additional properties, removing known properties.
|
|
182
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
183
|
+
|
|
184
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
185
|
+
new_hash, proc { |value| value }
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
# Create object from extracted values.
|
|
189
|
+
SummaryDetailSuperChain.new(pagination: pagination,
|
|
190
|
+
total_approved_count: total_approved_count,
|
|
191
|
+
total_approved_amount: total_approved_amount,
|
|
192
|
+
total_declined_count: total_declined_count,
|
|
193
|
+
total_declined_amount: total_declined_amount,
|
|
194
|
+
total_approved_count_percent: total_approved_count_percent,
|
|
195
|
+
total_approved_amount_percent: total_approved_amount_percent,
|
|
196
|
+
total_declined_count_percent: total_declined_count_percent,
|
|
197
|
+
total_declined_amount_percent: total_declined_amount_percent,
|
|
198
|
+
total_count: total_count,
|
|
199
|
+
total_amount: total_amount,
|
|
200
|
+
summaries: summaries,
|
|
201
|
+
additional_properties: additional_properties)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Provides a human-readable string representation of the object.
|
|
205
|
+
def to_s
|
|
206
|
+
class_name = self.class.name.split('::').last
|
|
207
|
+
"<#{class_name} pagination: #{@pagination}, total_approved_count: #{@total_approved_count},"\
|
|
208
|
+
" total_approved_amount: #{@total_approved_amount}, total_declined_count:"\
|
|
209
|
+
" #{@total_declined_count}, total_declined_amount: #{@total_declined_amount},"\
|
|
210
|
+
" total_approved_count_percent: #{@total_approved_count_percent},"\
|
|
211
|
+
" total_approved_amount_percent: #{@total_approved_amount_percent},"\
|
|
212
|
+
" total_declined_count_percent: #{@total_declined_count_percent},"\
|
|
213
|
+
" total_declined_amount_percent: #{@total_declined_amount_percent}, total_count:"\
|
|
214
|
+
" #{@total_count}, total_amount: #{@total_amount}, summaries: #{@summaries},"\
|
|
215
|
+
" additional_properties: #{@additional_properties}>"
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
219
|
+
def inspect
|
|
220
|
+
class_name = self.class.name.split('::').last
|
|
221
|
+
"<#{class_name} pagination: #{@pagination.inspect}, total_approved_count:"\
|
|
222
|
+
" #{@total_approved_count.inspect}, total_approved_amount:"\
|
|
223
|
+
" #{@total_approved_amount.inspect}, total_declined_count: #{@total_declined_count.inspect},"\
|
|
224
|
+
" total_declined_amount: #{@total_declined_amount.inspect}, total_approved_count_percent:"\
|
|
225
|
+
" #{@total_approved_count_percent.inspect}, total_approved_amount_percent:"\
|
|
226
|
+
" #{@total_approved_amount_percent.inspect}, total_declined_count_percent:"\
|
|
227
|
+
" #{@total_declined_count_percent.inspect}, total_declined_amount_percent:"\
|
|
228
|
+
" #{@total_declined_amount_percent.inspect}, total_count: #{@total_count.inspect},"\
|
|
229
|
+
" total_amount: #{@total_amount.inspect}, summaries: #{@summaries.inspect},"\
|
|
230
|
+
" additional_properties: #{@additional_properties}>"
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# reporting_authorization_summary_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically
|
|
4
|
+
# generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingAuthorizationSummaryApi
|
|
7
|
+
# SummaryResponses Model.
|
|
8
|
+
class SummaryResponses < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Count of approved transactions.
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :total_approved_count
|
|
15
|
+
|
|
16
|
+
# Sum of the approved transactions.
|
|
17
|
+
# @return [Float]
|
|
18
|
+
attr_accessor :total_approved_amount
|
|
19
|
+
|
|
20
|
+
# Count of declined transactions.
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :total_declined_count
|
|
23
|
+
|
|
24
|
+
# Sum of the declined transactions.
|
|
25
|
+
# @return [Float]
|
|
26
|
+
attr_accessor :total_declined_amount
|
|
27
|
+
|
|
28
|
+
# Ratio of the count of approved transactions to the count of total
|
|
29
|
+
# transctions.
|
|
30
|
+
# @return [Float]
|
|
31
|
+
attr_accessor :total_approved_count_percent
|
|
32
|
+
|
|
33
|
+
# Ratio of the sum of the amount of approved transactions to the sum of the
|
|
34
|
+
# amount of total transctions.
|
|
35
|
+
# @return [Float]
|
|
36
|
+
attr_accessor :total_approved_amount_percent
|
|
37
|
+
|
|
38
|
+
# Ratio of the count of declined transactions to the count of total
|
|
39
|
+
# transctions.
|
|
40
|
+
# @return [Float]
|
|
41
|
+
attr_accessor :total_declined_count_percent
|
|
42
|
+
|
|
43
|
+
# Ratio of the sum of the amount of declined transactions to the sum of the
|
|
44
|
+
# amount of total transctions.
|
|
45
|
+
# @return [Float]
|
|
46
|
+
attr_accessor :total_declined_amount_percent
|
|
47
|
+
|
|
48
|
+
# Sum of the count of approved transactions and the count of declined
|
|
49
|
+
# transactions.
|
|
50
|
+
# @return [Integer]
|
|
51
|
+
attr_accessor :total_count
|
|
52
|
+
|
|
53
|
+
# Sum of the amount of approved transactions and the amount of declined
|
|
54
|
+
# transactions.
|
|
55
|
+
# @return [Float]
|
|
56
|
+
attr_accessor :total_amount
|
|
57
|
+
|
|
58
|
+
# A mapping from model property names to API property names.
|
|
59
|
+
def self.names
|
|
60
|
+
@_hash = {} if @_hash.nil?
|
|
61
|
+
@_hash['total_approved_count'] = 'totalApprovedCount'
|
|
62
|
+
@_hash['total_approved_amount'] = 'totalApprovedAmount'
|
|
63
|
+
@_hash['total_declined_count'] = 'totalDeclinedCount'
|
|
64
|
+
@_hash['total_declined_amount'] = 'totalDeclinedAmount'
|
|
65
|
+
@_hash['total_approved_count_percent'] = 'totalApprovedCountPercent'
|
|
66
|
+
@_hash['total_approved_amount_percent'] = 'totalApprovedAmountPercent'
|
|
67
|
+
@_hash['total_declined_count_percent'] = 'totalDeclinedCountPercent'
|
|
68
|
+
@_hash['total_declined_amount_percent'] = 'totalDeclinedAmountPercent'
|
|
69
|
+
@_hash['total_count'] = 'totalCount'
|
|
70
|
+
@_hash['total_amount'] = 'totalAmount'
|
|
71
|
+
@_hash
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# An array for optional fields
|
|
75
|
+
def self.optionals
|
|
76
|
+
%w[
|
|
77
|
+
total_approved_count
|
|
78
|
+
total_approved_amount
|
|
79
|
+
total_declined_count
|
|
80
|
+
total_declined_amount
|
|
81
|
+
total_approved_count_percent
|
|
82
|
+
total_approved_amount_percent
|
|
83
|
+
total_declined_count_percent
|
|
84
|
+
total_declined_amount_percent
|
|
85
|
+
total_count
|
|
86
|
+
total_amount
|
|
87
|
+
]
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# An array for nullable fields
|
|
91
|
+
def self.nullables
|
|
92
|
+
[]
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def initialize(total_approved_count: SKIP, total_approved_amount: SKIP,
|
|
96
|
+
total_declined_count: SKIP, total_declined_amount: SKIP,
|
|
97
|
+
total_approved_count_percent: SKIP,
|
|
98
|
+
total_approved_amount_percent: SKIP,
|
|
99
|
+
total_declined_count_percent: SKIP,
|
|
100
|
+
total_declined_amount_percent: SKIP, total_count: SKIP,
|
|
101
|
+
total_amount: SKIP, additional_properties: nil)
|
|
102
|
+
# Add additional model properties to the instance
|
|
103
|
+
additional_properties = {} if additional_properties.nil?
|
|
104
|
+
|
|
105
|
+
@total_approved_count = total_approved_count unless total_approved_count == SKIP
|
|
106
|
+
@total_approved_amount = total_approved_amount unless total_approved_amount == SKIP
|
|
107
|
+
@total_declined_count = total_declined_count unless total_declined_count == SKIP
|
|
108
|
+
@total_declined_amount = total_declined_amount unless total_declined_amount == SKIP
|
|
109
|
+
unless total_approved_count_percent == SKIP
|
|
110
|
+
@total_approved_count_percent =
|
|
111
|
+
total_approved_count_percent
|
|
112
|
+
end
|
|
113
|
+
unless total_approved_amount_percent == SKIP
|
|
114
|
+
@total_approved_amount_percent =
|
|
115
|
+
total_approved_amount_percent
|
|
116
|
+
end
|
|
117
|
+
unless total_declined_count_percent == SKIP
|
|
118
|
+
@total_declined_count_percent =
|
|
119
|
+
total_declined_count_percent
|
|
120
|
+
end
|
|
121
|
+
unless total_declined_amount_percent == SKIP
|
|
122
|
+
@total_declined_amount_percent =
|
|
123
|
+
total_declined_amount_percent
|
|
124
|
+
end
|
|
125
|
+
@total_count = total_count unless total_count == SKIP
|
|
126
|
+
@total_amount = total_amount unless total_amount == SKIP
|
|
127
|
+
@additional_properties = additional_properties
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Creates an instance of the object from a hash.
|
|
131
|
+
def self.from_hash(hash)
|
|
132
|
+
return nil unless hash
|
|
133
|
+
|
|
134
|
+
# Extract variables from the hash.
|
|
135
|
+
total_approved_count =
|
|
136
|
+
hash.key?('totalApprovedCount') ? hash['totalApprovedCount'] : SKIP
|
|
137
|
+
total_approved_amount =
|
|
138
|
+
hash.key?('totalApprovedAmount') ? hash['totalApprovedAmount'] : SKIP
|
|
139
|
+
total_declined_count =
|
|
140
|
+
hash.key?('totalDeclinedCount') ? hash['totalDeclinedCount'] : SKIP
|
|
141
|
+
total_declined_amount =
|
|
142
|
+
hash.key?('totalDeclinedAmount') ? hash['totalDeclinedAmount'] : SKIP
|
|
143
|
+
total_approved_count_percent =
|
|
144
|
+
hash.key?('totalApprovedCountPercent') ? hash['totalApprovedCountPercent'] : SKIP
|
|
145
|
+
total_approved_amount_percent =
|
|
146
|
+
hash.key?('totalApprovedAmountPercent') ? hash['totalApprovedAmountPercent'] : SKIP
|
|
147
|
+
total_declined_count_percent =
|
|
148
|
+
hash.key?('totalDeclinedCountPercent') ? hash['totalDeclinedCountPercent'] : SKIP
|
|
149
|
+
total_declined_amount_percent =
|
|
150
|
+
hash.key?('totalDeclinedAmountPercent') ? hash['totalDeclinedAmountPercent'] : SKIP
|
|
151
|
+
total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP
|
|
152
|
+
total_amount = hash.key?('totalAmount') ? hash['totalAmount'] : SKIP
|
|
153
|
+
|
|
154
|
+
# Create a new hash for additional properties, removing known properties.
|
|
155
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
156
|
+
|
|
157
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
158
|
+
new_hash, proc { |value| value }
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
# Create object from extracted values.
|
|
162
|
+
SummaryResponses.new(total_approved_count: total_approved_count,
|
|
163
|
+
total_approved_amount: total_approved_amount,
|
|
164
|
+
total_declined_count: total_declined_count,
|
|
165
|
+
total_declined_amount: total_declined_amount,
|
|
166
|
+
total_approved_count_percent: total_approved_count_percent,
|
|
167
|
+
total_approved_amount_percent: total_approved_amount_percent,
|
|
168
|
+
total_declined_count_percent: total_declined_count_percent,
|
|
169
|
+
total_declined_amount_percent: total_declined_amount_percent,
|
|
170
|
+
total_count: total_count,
|
|
171
|
+
total_amount: total_amount,
|
|
172
|
+
additional_properties: additional_properties)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Provides a human-readable string representation of the object.
|
|
176
|
+
def to_s
|
|
177
|
+
class_name = self.class.name.split('::').last
|
|
178
|
+
"<#{class_name} total_approved_count: #{@total_approved_count}, total_approved_amount:"\
|
|
179
|
+
" #{@total_approved_amount}, total_declined_count: #{@total_declined_count},"\
|
|
180
|
+
" total_declined_amount: #{@total_declined_amount}, total_approved_count_percent:"\
|
|
181
|
+
" #{@total_approved_count_percent}, total_approved_amount_percent:"\
|
|
182
|
+
" #{@total_approved_amount_percent}, total_declined_count_percent:"\
|
|
183
|
+
" #{@total_declined_count_percent}, total_declined_amount_percent:"\
|
|
184
|
+
" #{@total_declined_amount_percent}, total_count: #{@total_count}, total_amount:"\
|
|
185
|
+
" #{@total_amount}, additional_properties: #{@additional_properties}>"
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
189
|
+
def inspect
|
|
190
|
+
class_name = self.class.name.split('::').last
|
|
191
|
+
"<#{class_name} total_approved_count: #{@total_approved_count.inspect},"\
|
|
192
|
+
" total_approved_amount: #{@total_approved_amount.inspect}, total_declined_count:"\
|
|
193
|
+
" #{@total_declined_count.inspect}, total_declined_amount:"\
|
|
194
|
+
" #{@total_declined_amount.inspect}, total_approved_count_percent:"\
|
|
195
|
+
" #{@total_approved_count_percent.inspect}, total_approved_amount_percent:"\
|
|
196
|
+
" #{@total_approved_amount_percent.inspect}, total_declined_count_percent:"\
|
|
197
|
+
" #{@total_declined_count_percent.inspect}, total_declined_amount_percent:"\
|
|
198
|
+
" #{@total_declined_amount_percent.inspect}, total_count: #{@total_count.inspect},"\
|
|
199
|
+
" total_amount: #{@total_amount.inspect}, additional_properties: #{@additional_properties}>"
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# reporting_authorization_summary_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically
|
|
4
|
+
# generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingAuthorizationSummaryApi
|
|
7
|
+
# Summary of transaction date.
|
|
8
|
+
class SummaryTransactionDate < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [PaginationResponse]
|
|
14
|
+
attr_accessor :pagination
|
|
15
|
+
|
|
16
|
+
# Count of the approved transactions.
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :total_approved_count
|
|
19
|
+
|
|
20
|
+
# Sum of the amount of approved transactions.
|
|
21
|
+
# @return [Float]
|
|
22
|
+
attr_accessor :total_approved_amount
|
|
23
|
+
|
|
24
|
+
# Count of the declined transactions.
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
attr_accessor :total_declined_count
|
|
27
|
+
|
|
28
|
+
# Sum of the amount of declined transactions.
|
|
29
|
+
# @return [Float]
|
|
30
|
+
attr_accessor :total_declined_amount
|
|
31
|
+
|
|
32
|
+
# Ratio of the count of approved transactions to the count of total
|
|
33
|
+
# transctions.
|
|
34
|
+
# @return [Float]
|
|
35
|
+
attr_accessor :total_approved_count_percent
|
|
36
|
+
|
|
37
|
+
# Ratio of the sum of the amount of the approved transactions to the sum of
|
|
38
|
+
# amount of total transctions.
|
|
39
|
+
# @return [Float]
|
|
40
|
+
attr_accessor :total_approved_amount_percent
|
|
41
|
+
|
|
42
|
+
# Ratio of the count of the declined transactions to the count of total
|
|
43
|
+
# transctions.
|
|
44
|
+
# @return [Float]
|
|
45
|
+
attr_accessor :total_declined_count_percent
|
|
46
|
+
|
|
47
|
+
# Ratio of the sum of the amount of the declined transactions to the sum of
|
|
48
|
+
# the amount of total transctions.
|
|
49
|
+
# @return [Float]
|
|
50
|
+
attr_accessor :total_declined_amount_percent
|
|
51
|
+
|
|
52
|
+
# Sum of the count of the approved transactions and the count of the
|
|
53
|
+
# declined transactions.
|
|
54
|
+
# @return [Integer]
|
|
55
|
+
attr_accessor :total_count
|
|
56
|
+
|
|
57
|
+
# Sum of the amount of approved transactions and the amount of the declined
|
|
58
|
+
# transactions.
|
|
59
|
+
# @return [Float]
|
|
60
|
+
attr_accessor :total_amount
|
|
61
|
+
|
|
62
|
+
# Capturing the fields.
|
|
63
|
+
# @return [Array[Summary1]]
|
|
64
|
+
attr_accessor :summaries
|
|
65
|
+
|
|
66
|
+
# A mapping from model property names to API property names.
|
|
67
|
+
def self.names
|
|
68
|
+
@_hash = {} if @_hash.nil?
|
|
69
|
+
@_hash['pagination'] = 'pagination'
|
|
70
|
+
@_hash['total_approved_count'] = 'totalApprovedCount'
|
|
71
|
+
@_hash['total_approved_amount'] = 'totalApprovedAmount'
|
|
72
|
+
@_hash['total_declined_count'] = 'totalDeclinedCount'
|
|
73
|
+
@_hash['total_declined_amount'] = 'totalDeclinedAmount'
|
|
74
|
+
@_hash['total_approved_count_percent'] = 'totalApprovedCountPercent'
|
|
75
|
+
@_hash['total_approved_amount_percent'] = 'totalApprovedAmountPercent'
|
|
76
|
+
@_hash['total_declined_count_percent'] = 'totalDeclinedCountPercent'
|
|
77
|
+
@_hash['total_declined_amount_percent'] = 'totalDeclinedAmountPercent'
|
|
78
|
+
@_hash['total_count'] = 'totalCount'
|
|
79
|
+
@_hash['total_amount'] = 'totalAmount'
|
|
80
|
+
@_hash['summaries'] = 'summaries'
|
|
81
|
+
@_hash
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# An array for optional fields
|
|
85
|
+
def self.optionals
|
|
86
|
+
%w[
|
|
87
|
+
pagination
|
|
88
|
+
total_approved_count
|
|
89
|
+
total_approved_amount
|
|
90
|
+
total_declined_count
|
|
91
|
+
total_declined_amount
|
|
92
|
+
total_approved_count_percent
|
|
93
|
+
total_approved_amount_percent
|
|
94
|
+
total_declined_count_percent
|
|
95
|
+
total_declined_amount_percent
|
|
96
|
+
total_count
|
|
97
|
+
total_amount
|
|
98
|
+
summaries
|
|
99
|
+
]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# An array for nullable fields
|
|
103
|
+
def self.nullables
|
|
104
|
+
[]
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def initialize(pagination: SKIP, total_approved_count: SKIP,
|
|
108
|
+
total_approved_amount: SKIP, total_declined_count: SKIP,
|
|
109
|
+
total_declined_amount: SKIP,
|
|
110
|
+
total_approved_count_percent: SKIP,
|
|
111
|
+
total_approved_amount_percent: SKIP,
|
|
112
|
+
total_declined_count_percent: SKIP,
|
|
113
|
+
total_declined_amount_percent: SKIP, total_count: SKIP,
|
|
114
|
+
total_amount: SKIP, summaries: SKIP,
|
|
115
|
+
additional_properties: nil)
|
|
116
|
+
# Add additional model properties to the instance
|
|
117
|
+
additional_properties = {} if additional_properties.nil?
|
|
118
|
+
|
|
119
|
+
@pagination = pagination unless pagination == SKIP
|
|
120
|
+
@total_approved_count = total_approved_count unless total_approved_count == SKIP
|
|
121
|
+
@total_approved_amount = total_approved_amount unless total_approved_amount == SKIP
|
|
122
|
+
@total_declined_count = total_declined_count unless total_declined_count == SKIP
|
|
123
|
+
@total_declined_amount = total_declined_amount unless total_declined_amount == SKIP
|
|
124
|
+
unless total_approved_count_percent == SKIP
|
|
125
|
+
@total_approved_count_percent =
|
|
126
|
+
total_approved_count_percent
|
|
127
|
+
end
|
|
128
|
+
unless total_approved_amount_percent == SKIP
|
|
129
|
+
@total_approved_amount_percent =
|
|
130
|
+
total_approved_amount_percent
|
|
131
|
+
end
|
|
132
|
+
unless total_declined_count_percent == SKIP
|
|
133
|
+
@total_declined_count_percent =
|
|
134
|
+
total_declined_count_percent
|
|
135
|
+
end
|
|
136
|
+
unless total_declined_amount_percent == SKIP
|
|
137
|
+
@total_declined_amount_percent =
|
|
138
|
+
total_declined_amount_percent
|
|
139
|
+
end
|
|
140
|
+
@total_count = total_count unless total_count == SKIP
|
|
141
|
+
@total_amount = total_amount unless total_amount == SKIP
|
|
142
|
+
@summaries = summaries unless summaries == SKIP
|
|
143
|
+
@additional_properties = additional_properties
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Creates an instance of the object from a hash.
|
|
147
|
+
def self.from_hash(hash)
|
|
148
|
+
return nil unless hash
|
|
149
|
+
|
|
150
|
+
# Extract variables from the hash.
|
|
151
|
+
pagination = PaginationResponse.from_hash(hash['pagination']) if hash['pagination']
|
|
152
|
+
total_approved_count =
|
|
153
|
+
hash.key?('totalApprovedCount') ? hash['totalApprovedCount'] : SKIP
|
|
154
|
+
total_approved_amount =
|
|
155
|
+
hash.key?('totalApprovedAmount') ? hash['totalApprovedAmount'] : SKIP
|
|
156
|
+
total_declined_count =
|
|
157
|
+
hash.key?('totalDeclinedCount') ? hash['totalDeclinedCount'] : SKIP
|
|
158
|
+
total_declined_amount =
|
|
159
|
+
hash.key?('totalDeclinedAmount') ? hash['totalDeclinedAmount'] : SKIP
|
|
160
|
+
total_approved_count_percent =
|
|
161
|
+
hash.key?('totalApprovedCountPercent') ? hash['totalApprovedCountPercent'] : SKIP
|
|
162
|
+
total_approved_amount_percent =
|
|
163
|
+
hash.key?('totalApprovedAmountPercent') ? hash['totalApprovedAmountPercent'] : SKIP
|
|
164
|
+
total_declined_count_percent =
|
|
165
|
+
hash.key?('totalDeclinedCountPercent') ? hash['totalDeclinedCountPercent'] : SKIP
|
|
166
|
+
total_declined_amount_percent =
|
|
167
|
+
hash.key?('totalDeclinedAmountPercent') ? hash['totalDeclinedAmountPercent'] : SKIP
|
|
168
|
+
total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP
|
|
169
|
+
total_amount = hash.key?('totalAmount') ? hash['totalAmount'] : SKIP
|
|
170
|
+
# Parameter is an array, so we need to iterate through it
|
|
171
|
+
summaries = nil
|
|
172
|
+
unless hash['summaries'].nil?
|
|
173
|
+
summaries = []
|
|
174
|
+
hash['summaries'].each do |structure|
|
|
175
|
+
summaries << (Summary1.from_hash(structure) if structure)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
summaries = SKIP unless hash.key?('summaries')
|
|
180
|
+
|
|
181
|
+
# Create a new hash for additional properties, removing known properties.
|
|
182
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
183
|
+
|
|
184
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
185
|
+
new_hash, proc { |value| value }
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
# Create object from extracted values.
|
|
189
|
+
SummaryTransactionDate.new(pagination: pagination,
|
|
190
|
+
total_approved_count: total_approved_count,
|
|
191
|
+
total_approved_amount: total_approved_amount,
|
|
192
|
+
total_declined_count: total_declined_count,
|
|
193
|
+
total_declined_amount: total_declined_amount,
|
|
194
|
+
total_approved_count_percent: total_approved_count_percent,
|
|
195
|
+
total_approved_amount_percent: total_approved_amount_percent,
|
|
196
|
+
total_declined_count_percent: total_declined_count_percent,
|
|
197
|
+
total_declined_amount_percent: total_declined_amount_percent,
|
|
198
|
+
total_count: total_count,
|
|
199
|
+
total_amount: total_amount,
|
|
200
|
+
summaries: summaries,
|
|
201
|
+
additional_properties: additional_properties)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Provides a human-readable string representation of the object.
|
|
205
|
+
def to_s
|
|
206
|
+
class_name = self.class.name.split('::').last
|
|
207
|
+
"<#{class_name} pagination: #{@pagination}, total_approved_count: #{@total_approved_count},"\
|
|
208
|
+
" total_approved_amount: #{@total_approved_amount}, total_declined_count:"\
|
|
209
|
+
" #{@total_declined_count}, total_declined_amount: #{@total_declined_amount},"\
|
|
210
|
+
" total_approved_count_percent: #{@total_approved_count_percent},"\
|
|
211
|
+
" total_approved_amount_percent: #{@total_approved_amount_percent},"\
|
|
212
|
+
" total_declined_count_percent: #{@total_declined_count_percent},"\
|
|
213
|
+
" total_declined_amount_percent: #{@total_declined_amount_percent}, total_count:"\
|
|
214
|
+
" #{@total_count}, total_amount: #{@total_amount}, summaries: #{@summaries},"\
|
|
215
|
+
" additional_properties: #{@additional_properties}>"
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
219
|
+
def inspect
|
|
220
|
+
class_name = self.class.name.split('::').last
|
|
221
|
+
"<#{class_name} pagination: #{@pagination.inspect}, total_approved_count:"\
|
|
222
|
+
" #{@total_approved_count.inspect}, total_approved_amount:"\
|
|
223
|
+
" #{@total_approved_amount.inspect}, total_declined_count: #{@total_declined_count.inspect},"\
|
|
224
|
+
" total_declined_amount: #{@total_declined_amount.inspect}, total_approved_count_percent:"\
|
|
225
|
+
" #{@total_approved_count_percent.inspect}, total_approved_amount_percent:"\
|
|
226
|
+
" #{@total_approved_amount_percent.inspect}, total_declined_count_percent:"\
|
|
227
|
+
" #{@total_declined_count_percent.inspect}, total_declined_amount_percent:"\
|
|
228
|
+
" #{@total_declined_amount_percent.inspect}, total_count: #{@total_count.inspect},"\
|
|
229
|
+
" total_amount: #{@total_amount.inspect}, summaries: #{@summaries.inspect},"\
|
|
230
|
+
" additional_properties: #{@additional_properties}>"
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# reporting_authorization_summary_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically
|
|
4
|
+
# generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module ReportingAuthorizationSummaryApi
|
|
8
|
+
# A utility that supports dateTime conversion to different formats
|
|
9
|
+
class DateTimeHelper < CoreLibrary::DateTimeHelper
|
|
10
|
+
end
|
|
11
|
+
end
|