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,190 @@
|
|
|
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
|
+
# Summary2 Model.
|
|
8
|
+
class Summary2 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Count of the approved transactions.
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :approved_count
|
|
15
|
+
|
|
16
|
+
# Sum of the amount of approved transactions.
|
|
17
|
+
# @return [Float]
|
|
18
|
+
attr_accessor :approved_amount
|
|
19
|
+
|
|
20
|
+
# Count of the declined transactions.
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :declined_count
|
|
23
|
+
|
|
24
|
+
# Sum of the amount of the declined transactions.
|
|
25
|
+
# @return [Float]
|
|
26
|
+
attr_accessor :declined_amount
|
|
27
|
+
|
|
28
|
+
# Ratio of the count of the approved transactions to the count of total
|
|
29
|
+
# transctions.
|
|
30
|
+
# @return [Float]
|
|
31
|
+
attr_accessor :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 :approved_amount_percent
|
|
37
|
+
|
|
38
|
+
# Ratio of the count of the declined transactions to the count of total
|
|
39
|
+
# transctions.
|
|
40
|
+
# @return [Float]
|
|
41
|
+
attr_accessor :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 :declined_amount_percent
|
|
47
|
+
|
|
48
|
+
# The level of the merchant hierarchy that groups merchant identifiers
|
|
49
|
+
# (MIDs) and any related roll-up values under a common identifier for
|
|
50
|
+
# settlement, billing, and reporting. Chain Code is the primary identifier
|
|
51
|
+
# for merchants boarded in a MDB (Merchant Database) system.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :chain_code
|
|
54
|
+
|
|
55
|
+
# The lowest roll-up level in the hierarchy system, grouping multiple
|
|
56
|
+
# merchant account numbers (MIDs) used in a single merchant location
|
|
57
|
+
# assigned to different terminals and/or business lines (MCCs). A Store
|
|
58
|
+
# Number is nine digits and unique to a particular Chain, meaning the same
|
|
59
|
+
# Store Number can exist for a Store under a different Divison/Chain, but
|
|
60
|
+
# not duplicates under the same Divison/Chain. <br> Supports entities Chain,
|
|
61
|
+
# National.
|
|
62
|
+
# @return [String]
|
|
63
|
+
attr_accessor :store_number
|
|
64
|
+
|
|
65
|
+
# A mapping from model property names to API property names.
|
|
66
|
+
def self.names
|
|
67
|
+
@_hash = {} if @_hash.nil?
|
|
68
|
+
@_hash['approved_count'] = 'approvedCount'
|
|
69
|
+
@_hash['approved_amount'] = 'approvedAmount'
|
|
70
|
+
@_hash['declined_count'] = 'declinedCount'
|
|
71
|
+
@_hash['declined_amount'] = 'declinedAmount'
|
|
72
|
+
@_hash['approved_count_percent'] = 'approvedCountPercent'
|
|
73
|
+
@_hash['approved_amount_percent'] = 'approvedAmountPercent'
|
|
74
|
+
@_hash['declined_count_percent'] = 'declinedCountPercent'
|
|
75
|
+
@_hash['declined_amount_percent'] = 'declinedAmountPercent'
|
|
76
|
+
@_hash['chain_code'] = 'chainCode'
|
|
77
|
+
@_hash['store_number'] = 'storeNumber'
|
|
78
|
+
@_hash
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# An array for optional fields
|
|
82
|
+
def self.optionals
|
|
83
|
+
%w[
|
|
84
|
+
approved_count
|
|
85
|
+
approved_amount
|
|
86
|
+
declined_count
|
|
87
|
+
declined_amount
|
|
88
|
+
approved_count_percent
|
|
89
|
+
approved_amount_percent
|
|
90
|
+
declined_count_percent
|
|
91
|
+
declined_amount_percent
|
|
92
|
+
chain_code
|
|
93
|
+
store_number
|
|
94
|
+
]
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# An array for nullable fields
|
|
98
|
+
def self.nullables
|
|
99
|
+
[]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def initialize(approved_count: SKIP, approved_amount: SKIP,
|
|
103
|
+
declined_count: SKIP, declined_amount: SKIP,
|
|
104
|
+
approved_count_percent: SKIP, approved_amount_percent: SKIP,
|
|
105
|
+
declined_count_percent: SKIP, declined_amount_percent: SKIP,
|
|
106
|
+
chain_code: SKIP, store_number: SKIP,
|
|
107
|
+
additional_properties: nil)
|
|
108
|
+
# Add additional model properties to the instance
|
|
109
|
+
additional_properties = {} if additional_properties.nil?
|
|
110
|
+
|
|
111
|
+
@approved_count = approved_count unless approved_count == SKIP
|
|
112
|
+
@approved_amount = approved_amount unless approved_amount == SKIP
|
|
113
|
+
@declined_count = declined_count unless declined_count == SKIP
|
|
114
|
+
@declined_amount = declined_amount unless declined_amount == SKIP
|
|
115
|
+
@approved_count_percent = approved_count_percent unless approved_count_percent == SKIP
|
|
116
|
+
@approved_amount_percent = approved_amount_percent unless approved_amount_percent == SKIP
|
|
117
|
+
@declined_count_percent = declined_count_percent unless declined_count_percent == SKIP
|
|
118
|
+
@declined_amount_percent = declined_amount_percent unless declined_amount_percent == SKIP
|
|
119
|
+
@chain_code = chain_code unless chain_code == SKIP
|
|
120
|
+
@store_number = store_number unless store_number == SKIP
|
|
121
|
+
@additional_properties = additional_properties
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Creates an instance of the object from a hash.
|
|
125
|
+
def self.from_hash(hash)
|
|
126
|
+
return nil unless hash
|
|
127
|
+
|
|
128
|
+
# Extract variables from the hash.
|
|
129
|
+
approved_count = hash.key?('approvedCount') ? hash['approvedCount'] : SKIP
|
|
130
|
+
approved_amount =
|
|
131
|
+
hash.key?('approvedAmount') ? hash['approvedAmount'] : SKIP
|
|
132
|
+
declined_count = hash.key?('declinedCount') ? hash['declinedCount'] : SKIP
|
|
133
|
+
declined_amount =
|
|
134
|
+
hash.key?('declinedAmount') ? hash['declinedAmount'] : SKIP
|
|
135
|
+
approved_count_percent =
|
|
136
|
+
hash.key?('approvedCountPercent') ? hash['approvedCountPercent'] : SKIP
|
|
137
|
+
approved_amount_percent =
|
|
138
|
+
hash.key?('approvedAmountPercent') ? hash['approvedAmountPercent'] : SKIP
|
|
139
|
+
declined_count_percent =
|
|
140
|
+
hash.key?('declinedCountPercent') ? hash['declinedCountPercent'] : SKIP
|
|
141
|
+
declined_amount_percent =
|
|
142
|
+
hash.key?('declinedAmountPercent') ? hash['declinedAmountPercent'] : SKIP
|
|
143
|
+
chain_code = hash.key?('chainCode') ? hash['chainCode'] : SKIP
|
|
144
|
+
store_number = hash.key?('storeNumber') ? hash['storeNumber'] : SKIP
|
|
145
|
+
|
|
146
|
+
# Create a new hash for additional properties, removing known properties.
|
|
147
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
148
|
+
|
|
149
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
150
|
+
new_hash, proc { |value| value }
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
# Create object from extracted values.
|
|
154
|
+
Summary2.new(approved_count: approved_count,
|
|
155
|
+
approved_amount: approved_amount,
|
|
156
|
+
declined_count: declined_count,
|
|
157
|
+
declined_amount: declined_amount,
|
|
158
|
+
approved_count_percent: approved_count_percent,
|
|
159
|
+
approved_amount_percent: approved_amount_percent,
|
|
160
|
+
declined_count_percent: declined_count_percent,
|
|
161
|
+
declined_amount_percent: declined_amount_percent,
|
|
162
|
+
chain_code: chain_code,
|
|
163
|
+
store_number: store_number,
|
|
164
|
+
additional_properties: additional_properties)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Provides a human-readable string representation of the object.
|
|
168
|
+
def to_s
|
|
169
|
+
class_name = self.class.name.split('::').last
|
|
170
|
+
"<#{class_name} approved_count: #{@approved_count}, approved_amount: #{@approved_amount},"\
|
|
171
|
+
" declined_count: #{@declined_count}, declined_amount: #{@declined_amount},"\
|
|
172
|
+
" approved_count_percent: #{@approved_count_percent}, approved_amount_percent:"\
|
|
173
|
+
" #{@approved_amount_percent}, declined_count_percent: #{@declined_count_percent},"\
|
|
174
|
+
" declined_amount_percent: #{@declined_amount_percent}, chain_code: #{@chain_code},"\
|
|
175
|
+
" store_number: #{@store_number}, additional_properties: #{@additional_properties}>"
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
179
|
+
def inspect
|
|
180
|
+
class_name = self.class.name.split('::').last
|
|
181
|
+
"<#{class_name} approved_count: #{@approved_count.inspect}, approved_amount:"\
|
|
182
|
+
" #{@approved_amount.inspect}, declined_count: #{@declined_count.inspect}, declined_amount:"\
|
|
183
|
+
" #{@declined_amount.inspect}, approved_count_percent: #{@approved_count_percent.inspect},"\
|
|
184
|
+
" approved_amount_percent: #{@approved_amount_percent.inspect}, declined_count_percent:"\
|
|
185
|
+
" #{@declined_count_percent.inspect}, declined_amount_percent:"\
|
|
186
|
+
" #{@declined_amount_percent.inspect}, chain_code: #{@chain_code.inspect}, store_number:"\
|
|
187
|
+
" #{@store_number.inspect}, additional_properties: #{@additional_properties}>"
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
@@ -0,0 +1,189 @@
|
|
|
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
|
+
# Summary3 Model.
|
|
8
|
+
class Summary3 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Count of the approved transactions.
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :approved_count
|
|
15
|
+
|
|
16
|
+
# Sum of the amount of approved transactions.
|
|
17
|
+
# @return [Float]
|
|
18
|
+
attr_accessor :approved_amount
|
|
19
|
+
|
|
20
|
+
# Count of the declined transactions.
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :declined_count
|
|
23
|
+
|
|
24
|
+
# Sum of the amount of the declined transactions.
|
|
25
|
+
# @return [Float]
|
|
26
|
+
attr_accessor :declined_amount
|
|
27
|
+
|
|
28
|
+
# Ratio of the count of the approved transactions to the count of total
|
|
29
|
+
# transctions.
|
|
30
|
+
# @return [Float]
|
|
31
|
+
attr_accessor :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 :approved_amount_percent
|
|
37
|
+
|
|
38
|
+
# Ratio of the count of the declined transactions to the count of total
|
|
39
|
+
# transctions.
|
|
40
|
+
# @return [Float]
|
|
41
|
+
attr_accessor :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 :declined_amount_percent
|
|
47
|
+
|
|
48
|
+
# The level of the merchant hierarchy that groups merchant identifiers
|
|
49
|
+
# (MIDs) and any related roll-up values under a common identifier for
|
|
50
|
+
# settlement, billing, and reporting. Chain Code is the primary identifier
|
|
51
|
+
# for merchants boarded in a MDB (Merchant Database) system.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :chain_code
|
|
54
|
+
|
|
55
|
+
# The hierarchy level that enables merchants to roll-up child entities for
|
|
56
|
+
# Stores/Locations into different groups under a Chain. It is an optional
|
|
57
|
+
# hierarchy level, but if created, is required for all child entities under
|
|
58
|
+
# the Division Number which is unique to that particular Chain. <br>
|
|
59
|
+
# Supports entities Chain, National.
|
|
60
|
+
# @return [String]
|
|
61
|
+
attr_accessor :division_number
|
|
62
|
+
|
|
63
|
+
# A mapping from model property names to API property names.
|
|
64
|
+
def self.names
|
|
65
|
+
@_hash = {} if @_hash.nil?
|
|
66
|
+
@_hash['approved_count'] = 'approvedCount'
|
|
67
|
+
@_hash['approved_amount'] = 'approvedAmount'
|
|
68
|
+
@_hash['declined_count'] = 'declinedCount'
|
|
69
|
+
@_hash['declined_amount'] = 'declinedAmount'
|
|
70
|
+
@_hash['approved_count_percent'] = 'approvedCountPercent'
|
|
71
|
+
@_hash['approved_amount_percent'] = 'approvedAmountPercent'
|
|
72
|
+
@_hash['declined_count_percent'] = 'declinedCountPercent'
|
|
73
|
+
@_hash['declined_amount_percent'] = 'declinedAmountPercent'
|
|
74
|
+
@_hash['chain_code'] = 'chainCode'
|
|
75
|
+
@_hash['division_number'] = 'divisionNumber'
|
|
76
|
+
@_hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# An array for optional fields
|
|
80
|
+
def self.optionals
|
|
81
|
+
%w[
|
|
82
|
+
approved_count
|
|
83
|
+
approved_amount
|
|
84
|
+
declined_count
|
|
85
|
+
declined_amount
|
|
86
|
+
approved_count_percent
|
|
87
|
+
approved_amount_percent
|
|
88
|
+
declined_count_percent
|
|
89
|
+
declined_amount_percent
|
|
90
|
+
chain_code
|
|
91
|
+
division_number
|
|
92
|
+
]
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# An array for nullable fields
|
|
96
|
+
def self.nullables
|
|
97
|
+
[]
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def initialize(approved_count: SKIP, approved_amount: SKIP,
|
|
101
|
+
declined_count: SKIP, declined_amount: SKIP,
|
|
102
|
+
approved_count_percent: SKIP, approved_amount_percent: SKIP,
|
|
103
|
+
declined_count_percent: SKIP, declined_amount_percent: SKIP,
|
|
104
|
+
chain_code: SKIP, division_number: SKIP,
|
|
105
|
+
additional_properties: nil)
|
|
106
|
+
# Add additional model properties to the instance
|
|
107
|
+
additional_properties = {} if additional_properties.nil?
|
|
108
|
+
|
|
109
|
+
@approved_count = approved_count unless approved_count == SKIP
|
|
110
|
+
@approved_amount = approved_amount unless approved_amount == SKIP
|
|
111
|
+
@declined_count = declined_count unless declined_count == SKIP
|
|
112
|
+
@declined_amount = declined_amount unless declined_amount == SKIP
|
|
113
|
+
@approved_count_percent = approved_count_percent unless approved_count_percent == SKIP
|
|
114
|
+
@approved_amount_percent = approved_amount_percent unless approved_amount_percent == SKIP
|
|
115
|
+
@declined_count_percent = declined_count_percent unless declined_count_percent == SKIP
|
|
116
|
+
@declined_amount_percent = declined_amount_percent unless declined_amount_percent == SKIP
|
|
117
|
+
@chain_code = chain_code unless chain_code == SKIP
|
|
118
|
+
@division_number = division_number unless division_number == SKIP
|
|
119
|
+
@additional_properties = additional_properties
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Creates an instance of the object from a hash.
|
|
123
|
+
def self.from_hash(hash)
|
|
124
|
+
return nil unless hash
|
|
125
|
+
|
|
126
|
+
# Extract variables from the hash.
|
|
127
|
+
approved_count = hash.key?('approvedCount') ? hash['approvedCount'] : SKIP
|
|
128
|
+
approved_amount =
|
|
129
|
+
hash.key?('approvedAmount') ? hash['approvedAmount'] : SKIP
|
|
130
|
+
declined_count = hash.key?('declinedCount') ? hash['declinedCount'] : SKIP
|
|
131
|
+
declined_amount =
|
|
132
|
+
hash.key?('declinedAmount') ? hash['declinedAmount'] : SKIP
|
|
133
|
+
approved_count_percent =
|
|
134
|
+
hash.key?('approvedCountPercent') ? hash['approvedCountPercent'] : SKIP
|
|
135
|
+
approved_amount_percent =
|
|
136
|
+
hash.key?('approvedAmountPercent') ? hash['approvedAmountPercent'] : SKIP
|
|
137
|
+
declined_count_percent =
|
|
138
|
+
hash.key?('declinedCountPercent') ? hash['declinedCountPercent'] : SKIP
|
|
139
|
+
declined_amount_percent =
|
|
140
|
+
hash.key?('declinedAmountPercent') ? hash['declinedAmountPercent'] : SKIP
|
|
141
|
+
chain_code = hash.key?('chainCode') ? hash['chainCode'] : SKIP
|
|
142
|
+
division_number =
|
|
143
|
+
hash.key?('divisionNumber') ? hash['divisionNumber'] : SKIP
|
|
144
|
+
|
|
145
|
+
# Create a new hash for additional properties, removing known properties.
|
|
146
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
147
|
+
|
|
148
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
149
|
+
new_hash, proc { |value| value }
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
# Create object from extracted values.
|
|
153
|
+
Summary3.new(approved_count: approved_count,
|
|
154
|
+
approved_amount: approved_amount,
|
|
155
|
+
declined_count: declined_count,
|
|
156
|
+
declined_amount: declined_amount,
|
|
157
|
+
approved_count_percent: approved_count_percent,
|
|
158
|
+
approved_amount_percent: approved_amount_percent,
|
|
159
|
+
declined_count_percent: declined_count_percent,
|
|
160
|
+
declined_amount_percent: declined_amount_percent,
|
|
161
|
+
chain_code: chain_code,
|
|
162
|
+
division_number: division_number,
|
|
163
|
+
additional_properties: additional_properties)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Provides a human-readable string representation of the object.
|
|
167
|
+
def to_s
|
|
168
|
+
class_name = self.class.name.split('::').last
|
|
169
|
+
"<#{class_name} approved_count: #{@approved_count}, approved_amount: #{@approved_amount},"\
|
|
170
|
+
" declined_count: #{@declined_count}, declined_amount: #{@declined_amount},"\
|
|
171
|
+
" approved_count_percent: #{@approved_count_percent}, approved_amount_percent:"\
|
|
172
|
+
" #{@approved_amount_percent}, declined_count_percent: #{@declined_count_percent},"\
|
|
173
|
+
" declined_amount_percent: #{@declined_amount_percent}, chain_code: #{@chain_code},"\
|
|
174
|
+
" division_number: #{@division_number}, additional_properties: #{@additional_properties}>"
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
178
|
+
def inspect
|
|
179
|
+
class_name = self.class.name.split('::').last
|
|
180
|
+
"<#{class_name} approved_count: #{@approved_count.inspect}, approved_amount:"\
|
|
181
|
+
" #{@approved_amount.inspect}, declined_count: #{@declined_count.inspect}, declined_amount:"\
|
|
182
|
+
" #{@declined_amount.inspect}, approved_count_percent: #{@approved_count_percent.inspect},"\
|
|
183
|
+
" approved_amount_percent: #{@approved_amount_percent.inspect}, declined_count_percent:"\
|
|
184
|
+
" #{@declined_count_percent.inspect}, declined_amount_percent:"\
|
|
185
|
+
" #{@declined_amount_percent.inspect}, chain_code: #{@chain_code.inspect}, division_number:"\
|
|
186
|
+
" #{@division_number.inspect}, additional_properties: #{@additional_properties}>"
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
# Summary4 Model.
|
|
8
|
+
class Summary4 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Count of the approved transactions.
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :approved_count
|
|
15
|
+
|
|
16
|
+
# Sum of the amount of approved transactions.
|
|
17
|
+
# @return [Float]
|
|
18
|
+
attr_accessor :approved_amount
|
|
19
|
+
|
|
20
|
+
# Count of the declined transactions.
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
attr_accessor :declined_count
|
|
23
|
+
|
|
24
|
+
# Sum of the amount of the declined transactions.
|
|
25
|
+
# @return [Float]
|
|
26
|
+
attr_accessor :declined_amount
|
|
27
|
+
|
|
28
|
+
# Ratio of the count of the approved transactions to the count of total
|
|
29
|
+
# transctions.
|
|
30
|
+
# @return [Float]
|
|
31
|
+
attr_accessor :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 :approved_amount_percent
|
|
37
|
+
|
|
38
|
+
# Ratio of the count of the declined transactions to the count of total
|
|
39
|
+
# transctions.
|
|
40
|
+
# @return [Float]
|
|
41
|
+
attr_accessor :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 :declined_amount_percent
|
|
47
|
+
|
|
48
|
+
# The last level in the Vertical Hierarchy and the unique identifier
|
|
49
|
+
# assigned for a processing location, business type, and MCC Code. It
|
|
50
|
+
# requires a specific value to define merchant authorizations, settlement,
|
|
51
|
+
# reporting, pricing, and billing levels.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :merchant_id
|
|
54
|
+
|
|
55
|
+
# A mapping from model property names to API property names.
|
|
56
|
+
def self.names
|
|
57
|
+
@_hash = {} if @_hash.nil?
|
|
58
|
+
@_hash['approved_count'] = 'approvedCount'
|
|
59
|
+
@_hash['approved_amount'] = 'approvedAmount'
|
|
60
|
+
@_hash['declined_count'] = 'declinedCount'
|
|
61
|
+
@_hash['declined_amount'] = 'declinedAmount'
|
|
62
|
+
@_hash['approved_count_percent'] = 'approvedCountPercent'
|
|
63
|
+
@_hash['approved_amount_percent'] = 'approvedAmountPercent'
|
|
64
|
+
@_hash['declined_count_percent'] = 'declinedCountPercent'
|
|
65
|
+
@_hash['declined_amount_percent'] = 'declinedAmountPercent'
|
|
66
|
+
@_hash['merchant_id'] = 'merchantId'
|
|
67
|
+
@_hash
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# An array for optional fields
|
|
71
|
+
def self.optionals
|
|
72
|
+
%w[
|
|
73
|
+
approved_count
|
|
74
|
+
approved_amount
|
|
75
|
+
declined_count
|
|
76
|
+
declined_amount
|
|
77
|
+
approved_count_percent
|
|
78
|
+
approved_amount_percent
|
|
79
|
+
declined_count_percent
|
|
80
|
+
declined_amount_percent
|
|
81
|
+
merchant_id
|
|
82
|
+
]
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# An array for nullable fields
|
|
86
|
+
def self.nullables
|
|
87
|
+
[]
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def initialize(approved_count: SKIP, approved_amount: SKIP,
|
|
91
|
+
declined_count: SKIP, declined_amount: SKIP,
|
|
92
|
+
approved_count_percent: SKIP, approved_amount_percent: SKIP,
|
|
93
|
+
declined_count_percent: SKIP, declined_amount_percent: SKIP,
|
|
94
|
+
merchant_id: SKIP, additional_properties: nil)
|
|
95
|
+
# Add additional model properties to the instance
|
|
96
|
+
additional_properties = {} if additional_properties.nil?
|
|
97
|
+
|
|
98
|
+
@approved_count = approved_count unless approved_count == SKIP
|
|
99
|
+
@approved_amount = approved_amount unless approved_amount == SKIP
|
|
100
|
+
@declined_count = declined_count unless declined_count == SKIP
|
|
101
|
+
@declined_amount = declined_amount unless declined_amount == SKIP
|
|
102
|
+
@approved_count_percent = approved_count_percent unless approved_count_percent == SKIP
|
|
103
|
+
@approved_amount_percent = approved_amount_percent unless approved_amount_percent == SKIP
|
|
104
|
+
@declined_count_percent = declined_count_percent unless declined_count_percent == SKIP
|
|
105
|
+
@declined_amount_percent = declined_amount_percent unless declined_amount_percent == SKIP
|
|
106
|
+
@merchant_id = merchant_id unless merchant_id == SKIP
|
|
107
|
+
@additional_properties = additional_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Creates an instance of the object from a hash.
|
|
111
|
+
def self.from_hash(hash)
|
|
112
|
+
return nil unless hash
|
|
113
|
+
|
|
114
|
+
# Extract variables from the hash.
|
|
115
|
+
approved_count = hash.key?('approvedCount') ? hash['approvedCount'] : SKIP
|
|
116
|
+
approved_amount =
|
|
117
|
+
hash.key?('approvedAmount') ? hash['approvedAmount'] : SKIP
|
|
118
|
+
declined_count = hash.key?('declinedCount') ? hash['declinedCount'] : SKIP
|
|
119
|
+
declined_amount =
|
|
120
|
+
hash.key?('declinedAmount') ? hash['declinedAmount'] : SKIP
|
|
121
|
+
approved_count_percent =
|
|
122
|
+
hash.key?('approvedCountPercent') ? hash['approvedCountPercent'] : SKIP
|
|
123
|
+
approved_amount_percent =
|
|
124
|
+
hash.key?('approvedAmountPercent') ? hash['approvedAmountPercent'] : SKIP
|
|
125
|
+
declined_count_percent =
|
|
126
|
+
hash.key?('declinedCountPercent') ? hash['declinedCountPercent'] : SKIP
|
|
127
|
+
declined_amount_percent =
|
|
128
|
+
hash.key?('declinedAmountPercent') ? hash['declinedAmountPercent'] : SKIP
|
|
129
|
+
merchant_id = hash.key?('merchantId') ? hash['merchantId'] : SKIP
|
|
130
|
+
|
|
131
|
+
# Create a new hash for additional properties, removing known properties.
|
|
132
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
133
|
+
|
|
134
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
135
|
+
new_hash, proc { |value| value }
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
# Create object from extracted values.
|
|
139
|
+
Summary4.new(approved_count: approved_count,
|
|
140
|
+
approved_amount: approved_amount,
|
|
141
|
+
declined_count: declined_count,
|
|
142
|
+
declined_amount: declined_amount,
|
|
143
|
+
approved_count_percent: approved_count_percent,
|
|
144
|
+
approved_amount_percent: approved_amount_percent,
|
|
145
|
+
declined_count_percent: declined_count_percent,
|
|
146
|
+
declined_amount_percent: declined_amount_percent,
|
|
147
|
+
merchant_id: merchant_id,
|
|
148
|
+
additional_properties: additional_properties)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Provides a human-readable string representation of the object.
|
|
152
|
+
def to_s
|
|
153
|
+
class_name = self.class.name.split('::').last
|
|
154
|
+
"<#{class_name} approved_count: #{@approved_count}, approved_amount: #{@approved_amount},"\
|
|
155
|
+
" declined_count: #{@declined_count}, declined_amount: #{@declined_amount},"\
|
|
156
|
+
" approved_count_percent: #{@approved_count_percent}, approved_amount_percent:"\
|
|
157
|
+
" #{@approved_amount_percent}, declined_count_percent: #{@declined_count_percent},"\
|
|
158
|
+
" declined_amount_percent: #{@declined_amount_percent}, merchant_id: #{@merchant_id},"\
|
|
159
|
+
" additional_properties: #{@additional_properties}>"
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
163
|
+
def inspect
|
|
164
|
+
class_name = self.class.name.split('::').last
|
|
165
|
+
"<#{class_name} approved_count: #{@approved_count.inspect}, approved_amount:"\
|
|
166
|
+
" #{@approved_amount.inspect}, declined_count: #{@declined_count.inspect}, declined_amount:"\
|
|
167
|
+
" #{@declined_amount.inspect}, approved_count_percent: #{@approved_count_percent.inspect},"\
|
|
168
|
+
" approved_amount_percent: #{@approved_amount_percent.inspect}, declined_count_percent:"\
|
|
169
|
+
" #{@declined_count_percent.inspect}, declined_amount_percent:"\
|
|
170
|
+
" #{@declined_amount_percent.inspect}, merchant_id: #{@merchant_id.inspect},"\
|
|
171
|
+
" additional_properties: #{@additional_properties}>"
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
end
|