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.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +147 -0
  4. data/bin/console +15 -0
  5. data/lib/reporting_authorization_summary_api/api_helper.rb +10 -0
  6. data/lib/reporting_authorization_summary_api/apis/authorizations_api.rb +258 -0
  7. data/lib/reporting_authorization_summary_api/apis/base_api.rb +67 -0
  8. data/lib/reporting_authorization_summary_api/client.rb +75 -0
  9. data/lib/reporting_authorization_summary_api/configuration.rb +165 -0
  10. data/lib/reporting_authorization_summary_api/exceptions/api_exception.rb +21 -0
  11. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary0_error_exception.rb +55 -0
  12. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_cardnetwork0_error_exception.rb +55 -0
  13. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_chain0_error_exception.rb +55 -0
  14. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_division0_error_exception.rb +55 -0
  15. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_merchant0_error_exception.rb +55 -0
  16. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_store0_error_exception.rb +55 -0
  17. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_superchain0_error_exception.rb +55 -0
  18. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_transactiondate0_error_exception.rb +55 -0
  19. data/lib/reporting_authorization_summary_api/http/api_response.rb +19 -0
  20. data/lib/reporting_authorization_summary_api/http/auth/custom_header_authentication.rb +52 -0
  21. data/lib/reporting_authorization_summary_api/http/http_call_back.rb +10 -0
  22. data/lib/reporting_authorization_summary_api/http/http_method_enum.rb +10 -0
  23. data/lib/reporting_authorization_summary_api/http/http_request.rb +10 -0
  24. data/lib/reporting_authorization_summary_api/http/http_response.rb +10 -0
  25. data/lib/reporting_authorization_summary_api/http/proxy_settings.rb +22 -0
  26. data/lib/reporting_authorization_summary_api/logging/configuration/api_logging_configuration.rb +186 -0
  27. data/lib/reporting_authorization_summary_api/logging/sdk_logger.rb +17 -0
  28. data/lib/reporting_authorization_summary_api/models/auth_transactions_request.rb +107 -0
  29. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_chain.rb +116 -0
  30. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_division.rb +116 -0
  31. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_store.rb +116 -0
  32. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_super_chain.rb +116 -0
  33. data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_card_network.rb +116 -0
  34. data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_merchant.rb +116 -0
  35. data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_transaction_date.rb +116 -0
  36. data/lib/reporting_authorization_summary_api/models/authorizations_summary_cardnetwork_response.rb +233 -0
  37. data/lib/reporting_authorization_summary_api/models/authorizations_summary_transactiondate_response.rb +233 -0
  38. data/lib/reporting_authorization_summary_api/models/base_model.rb +110 -0
  39. data/lib/reporting_authorization_summary_api/models/card_network_type.rb +68 -0
  40. data/lib/reporting_authorization_summary_api/models/code_and_description.rb +98 -0
  41. data/lib/reporting_authorization_summary_api/models/common_summary_detail.rb +161 -0
  42. data/lib/reporting_authorization_summary_api/models/common_summary_responses.rb +213 -0
  43. data/lib/reporting_authorization_summary_api/models/date_range.rb +82 -0
  44. data/lib/reporting_authorization_summary_api/models/date_range_type.rb +85 -0
  45. data/lib/reporting_authorization_summary_api/models/entity.rb +99 -0
  46. data/lib/reporting_authorization_summary_api/models/entity_division_response.rb +94 -0
  47. data/lib/reporting_authorization_summary_api/models/entity_store_response.rb +95 -0
  48. data/lib/reporting_authorization_summary_api/models/error.rb +96 -0
  49. data/lib/reporting_authorization_summary_api/models/error_response.rb +84 -0
  50. data/lib/reporting_authorization_summary_api/models/level.rb +67 -0
  51. data/lib/reporting_authorization_summary_api/models/pagination.rb +87 -0
  52. data/lib/reporting_authorization_summary_api/models/pagination_response.rb +108 -0
  53. data/lib/reporting_authorization_summary_api/models/pagination_type.rb +87 -0
  54. data/lib/reporting_authorization_summary_api/models/summary.rb +183 -0
  55. data/lib/reporting_authorization_summary_api/models/summary1.rb +173 -0
  56. data/lib/reporting_authorization_summary_api/models/summary2.rb +190 -0
  57. data/lib/reporting_authorization_summary_api/models/summary3.rb +189 -0
  58. data/lib/reporting_authorization_summary_api/models/summary4.rb +174 -0
  59. data/lib/reporting_authorization_summary_api/models/summary5.rb +174 -0
  60. data/lib/reporting_authorization_summary_api/models/summary6.rb +173 -0
  61. data/lib/reporting_authorization_summary_api/models/summary_card_network.rb +233 -0
  62. data/lib/reporting_authorization_summary_api/models/summary_detail_chain.rb +233 -0
  63. data/lib/reporting_authorization_summary_api/models/summary_detail_division.rb +233 -0
  64. data/lib/reporting_authorization_summary_api/models/summary_detail_entity_chain.rb +79 -0
  65. data/lib/reporting_authorization_summary_api/models/summary_detail_entity_entity.rb +79 -0
  66. data/lib/reporting_authorization_summary_api/models/summary_detail_entity_super_chain.rb +78 -0
  67. data/lib/reporting_authorization_summary_api/models/summary_detail_merchant.rb +233 -0
  68. data/lib/reporting_authorization_summary_api/models/summary_detail_store.rb +233 -0
  69. data/lib/reporting_authorization_summary_api/models/summary_detail_super_chain.rb +233 -0
  70. data/lib/reporting_authorization_summary_api/models/summary_responses.rb +202 -0
  71. data/lib/reporting_authorization_summary_api/models/summary_transaction_date.rb +233 -0
  72. data/lib/reporting_authorization_summary_api/utilities/date_time_helper.rb +11 -0
  73. data/lib/reporting_authorization_summary_api/utilities/file_wrapper.rb +28 -0
  74. data/lib/reporting_authorization_summary_api.rb +132 -0
  75. 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
+ # SummaryDetailChain Model.
8
+ class SummaryDetailChain < 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[Summary5]]
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 << (Summary5.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
+ SummaryDetailChain.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
+ # SummaryDetailDivision Model.
8
+ class SummaryDetailDivision < 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[Summary3]]
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 << (Summary3.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
+ SummaryDetailDivision.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,79 @@
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
+ # SummaryDetailEntityChain Model.
8
+ class SummaryDetailEntityChain < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The level of the merchant hierarchy that groups merchant identifiers
13
+ # (MIDs) and any related roll-up values under a common identifier for
14
+ # settlement, billing, and reporting. Chain Code is the primary identifier
15
+ # for merchants boarded in a MDB (Merchant Database) system.
16
+ # @return [String]
17
+ attr_accessor :chain_code
18
+
19
+ # A mapping from model property names to API property names.
20
+ def self.names
21
+ @_hash = {} if @_hash.nil?
22
+ @_hash['chain_code'] = 'chainCode'
23
+ @_hash
24
+ end
25
+
26
+ # An array for optional fields
27
+ def self.optionals
28
+ %w[
29
+ chain_code
30
+ ]
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(chain_code: SKIP, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @chain_code = chain_code unless chain_code == SKIP
43
+ @additional_properties = additional_properties
44
+ end
45
+
46
+ # Creates an instance of the object from a hash.
47
+ def self.from_hash(hash)
48
+ return nil unless hash
49
+
50
+ # Extract variables from the hash.
51
+ chain_code = hash.key?('chainCode') ? hash['chainCode'] : SKIP
52
+
53
+ # Create a new hash for additional properties, removing known properties.
54
+ new_hash = hash.reject { |k, _| names.value?(k) }
55
+
56
+ additional_properties = APIHelper.get_additional_properties(
57
+ new_hash, proc { |value| value }
58
+ )
59
+
60
+ # Create object from extracted values.
61
+ SummaryDetailEntityChain.new(chain_code: chain_code,
62
+ additional_properties: additional_properties)
63
+ end
64
+
65
+ # Provides a human-readable string representation of the object.
66
+ def to_s
67
+ class_name = self.class.name.split('::').last
68
+ "<#{class_name} chain_code: #{@chain_code}, additional_properties:"\
69
+ " #{@additional_properties}>"
70
+ end
71
+
72
+ # Provides a debugging-friendly string with detailed object information.
73
+ def inspect
74
+ class_name = self.class.name.split('::').last
75
+ "<#{class_name} chain_code: #{@chain_code.inspect}, additional_properties:"\
76
+ " #{@additional_properties}>"
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,79 @@
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
+ # SummaryDetailEntityEntity Model.
8
+ class SummaryDetailEntityEntity < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The last level in the Vertical Hierarchy and the unique identifier
13
+ # assigned for a processing location, business type, and MCC Code. It
14
+ # requires a specific value to define merchant authorizations, settlement,
15
+ # reporting, pricing, and billing levels.
16
+ # @return [String]
17
+ attr_accessor :merchant_id
18
+
19
+ # A mapping from model property names to API property names.
20
+ def self.names
21
+ @_hash = {} if @_hash.nil?
22
+ @_hash['merchant_id'] = 'merchantId'
23
+ @_hash
24
+ end
25
+
26
+ # An array for optional fields
27
+ def self.optionals
28
+ %w[
29
+ merchant_id
30
+ ]
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(merchant_id: SKIP, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @merchant_id = merchant_id unless merchant_id == SKIP
43
+ @additional_properties = additional_properties
44
+ end
45
+
46
+ # Creates an instance of the object from a hash.
47
+ def self.from_hash(hash)
48
+ return nil unless hash
49
+
50
+ # Extract variables from the hash.
51
+ merchant_id = hash.key?('merchantId') ? hash['merchantId'] : SKIP
52
+
53
+ # Create a new hash for additional properties, removing known properties.
54
+ new_hash = hash.reject { |k, _| names.value?(k) }
55
+
56
+ additional_properties = APIHelper.get_additional_properties(
57
+ new_hash, proc { |value| value }
58
+ )
59
+
60
+ # Create object from extracted values.
61
+ SummaryDetailEntityEntity.new(merchant_id: merchant_id,
62
+ additional_properties: additional_properties)
63
+ end
64
+
65
+ # Provides a human-readable string representation of the object.
66
+ def to_s
67
+ class_name = self.class.name.split('::').last
68
+ "<#{class_name} merchant_id: #{@merchant_id}, additional_properties:"\
69
+ " #{@additional_properties}>"
70
+ end
71
+
72
+ # Provides a debugging-friendly string with detailed object information.
73
+ def inspect
74
+ class_name = self.class.name.split('::').last
75
+ "<#{class_name} merchant_id: #{@merchant_id.inspect}, additional_properties:"\
76
+ " #{@additional_properties}>"
77
+ end
78
+ end
79
+ end