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,78 @@
|
|
|
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
|
+
# SummaryDetailEntitySuperChain Model.
|
|
8
|
+
class SummaryDetailEntitySuperChain < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The identifier code that represents the group of related chains of the
|
|
13
|
+
# partner.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :super_chain_code
|
|
16
|
+
|
|
17
|
+
# A mapping from model property names to API property names.
|
|
18
|
+
def self.names
|
|
19
|
+
@_hash = {} if @_hash.nil?
|
|
20
|
+
@_hash['super_chain_code'] = 'superChainCode'
|
|
21
|
+
@_hash
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# An array for optional fields
|
|
25
|
+
def self.optionals
|
|
26
|
+
%w[
|
|
27
|
+
super_chain_code
|
|
28
|
+
]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for nullable fields
|
|
32
|
+
def self.nullables
|
|
33
|
+
[]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def initialize(super_chain_code: SKIP, additional_properties: nil)
|
|
37
|
+
# Add additional model properties to the instance
|
|
38
|
+
additional_properties = {} if additional_properties.nil?
|
|
39
|
+
|
|
40
|
+
@super_chain_code = super_chain_code unless super_chain_code == SKIP
|
|
41
|
+
@additional_properties = additional_properties
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates an instance of the object from a hash.
|
|
45
|
+
def self.from_hash(hash)
|
|
46
|
+
return nil unless hash
|
|
47
|
+
|
|
48
|
+
# Extract variables from the hash.
|
|
49
|
+
super_chain_code =
|
|
50
|
+
hash.key?('superChainCode') ? hash['superChainCode'] : SKIP
|
|
51
|
+
|
|
52
|
+
# Create a new hash for additional properties, removing known properties.
|
|
53
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
54
|
+
|
|
55
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
56
|
+
new_hash, proc { |value| value }
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# Create object from extracted values.
|
|
60
|
+
SummaryDetailEntitySuperChain.new(super_chain_code: super_chain_code,
|
|
61
|
+
additional_properties: additional_properties)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Provides a human-readable string representation of the object.
|
|
65
|
+
def to_s
|
|
66
|
+
class_name = self.class.name.split('::').last
|
|
67
|
+
"<#{class_name} super_chain_code: #{@super_chain_code}, additional_properties:"\
|
|
68
|
+
" #{@additional_properties}>"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
72
|
+
def inspect
|
|
73
|
+
class_name = self.class.name.split('::').last
|
|
74
|
+
"<#{class_name} super_chain_code: #{@super_chain_code.inspect}, additional_properties:"\
|
|
75
|
+
" #{@additional_properties}>"
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
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
|
+
# SummaryDetailMerchant Model.
|
|
8
|
+
class SummaryDetailMerchant < 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[Summary4]]
|
|
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 << (Summary4.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
|
+
SummaryDetailMerchant.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,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
|
+
# SummaryDetailStore Model.
|
|
8
|
+
class SummaryDetailStore < 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[Summary2]]
|
|
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 << (Summary2.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
|
+
SummaryDetailStore.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
|