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,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
|
+
# Summary5 Model.
|
|
8
|
+
class Summary5 < 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
|
+
# 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['chain_code'] = 'chainCode'
|
|
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
|
+
chain_code
|
|
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
|
+
chain_code: 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
|
+
@chain_code = chain_code unless chain_code == 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
|
+
chain_code = hash.key?('chainCode') ? hash['chainCode'] : 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
|
+
Summary5.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
|
+
chain_code: chain_code,
|
|
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}, chain_code: #{@chain_code},"\
|
|
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}, chain_code: #{@chain_code.inspect},"\
|
|
171
|
+
" additional_properties: #{@additional_properties}>"
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
end
|
|
@@ -0,0 +1,173 @@
|
|
|
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
|
+
# Summary6 Model.
|
|
8
|
+
class Summary6 < 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 identifier code that represents the group of related chains of the
|
|
49
|
+
# partner.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :super_chain_code
|
|
52
|
+
|
|
53
|
+
# A mapping from model property names to API property names.
|
|
54
|
+
def self.names
|
|
55
|
+
@_hash = {} if @_hash.nil?
|
|
56
|
+
@_hash['approved_count'] = 'approvedCount'
|
|
57
|
+
@_hash['approved_amount'] = 'approvedAmount'
|
|
58
|
+
@_hash['declined_count'] = 'declinedCount'
|
|
59
|
+
@_hash['declined_amount'] = 'declinedAmount'
|
|
60
|
+
@_hash['approved_count_percent'] = 'approvedCountPercent'
|
|
61
|
+
@_hash['approved_amount_percent'] = 'approvedAmountPercent'
|
|
62
|
+
@_hash['declined_count_percent'] = 'declinedCountPercent'
|
|
63
|
+
@_hash['declined_amount_percent'] = 'declinedAmountPercent'
|
|
64
|
+
@_hash['super_chain_code'] = 'superChainCode'
|
|
65
|
+
@_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# An array for optional fields
|
|
69
|
+
def self.optionals
|
|
70
|
+
%w[
|
|
71
|
+
approved_count
|
|
72
|
+
approved_amount
|
|
73
|
+
declined_count
|
|
74
|
+
declined_amount
|
|
75
|
+
approved_count_percent
|
|
76
|
+
approved_amount_percent
|
|
77
|
+
declined_count_percent
|
|
78
|
+
declined_amount_percent
|
|
79
|
+
super_chain_code
|
|
80
|
+
]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# An array for nullable fields
|
|
84
|
+
def self.nullables
|
|
85
|
+
[]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def initialize(approved_count: SKIP, approved_amount: SKIP,
|
|
89
|
+
declined_count: SKIP, declined_amount: SKIP,
|
|
90
|
+
approved_count_percent: SKIP, approved_amount_percent: SKIP,
|
|
91
|
+
declined_count_percent: SKIP, declined_amount_percent: SKIP,
|
|
92
|
+
super_chain_code: SKIP, additional_properties: nil)
|
|
93
|
+
# Add additional model properties to the instance
|
|
94
|
+
additional_properties = {} if additional_properties.nil?
|
|
95
|
+
|
|
96
|
+
@approved_count = approved_count unless approved_count == SKIP
|
|
97
|
+
@approved_amount = approved_amount unless approved_amount == SKIP
|
|
98
|
+
@declined_count = declined_count unless declined_count == SKIP
|
|
99
|
+
@declined_amount = declined_amount unless declined_amount == SKIP
|
|
100
|
+
@approved_count_percent = approved_count_percent unless approved_count_percent == SKIP
|
|
101
|
+
@approved_amount_percent = approved_amount_percent unless approved_amount_percent == SKIP
|
|
102
|
+
@declined_count_percent = declined_count_percent unless declined_count_percent == SKIP
|
|
103
|
+
@declined_amount_percent = declined_amount_percent unless declined_amount_percent == SKIP
|
|
104
|
+
@super_chain_code = super_chain_code unless super_chain_code == SKIP
|
|
105
|
+
@additional_properties = additional_properties
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Creates an instance of the object from a hash.
|
|
109
|
+
def self.from_hash(hash)
|
|
110
|
+
return nil unless hash
|
|
111
|
+
|
|
112
|
+
# Extract variables from the hash.
|
|
113
|
+
approved_count = hash.key?('approvedCount') ? hash['approvedCount'] : SKIP
|
|
114
|
+
approved_amount =
|
|
115
|
+
hash.key?('approvedAmount') ? hash['approvedAmount'] : SKIP
|
|
116
|
+
declined_count = hash.key?('declinedCount') ? hash['declinedCount'] : SKIP
|
|
117
|
+
declined_amount =
|
|
118
|
+
hash.key?('declinedAmount') ? hash['declinedAmount'] : SKIP
|
|
119
|
+
approved_count_percent =
|
|
120
|
+
hash.key?('approvedCountPercent') ? hash['approvedCountPercent'] : SKIP
|
|
121
|
+
approved_amount_percent =
|
|
122
|
+
hash.key?('approvedAmountPercent') ? hash['approvedAmountPercent'] : SKIP
|
|
123
|
+
declined_count_percent =
|
|
124
|
+
hash.key?('declinedCountPercent') ? hash['declinedCountPercent'] : SKIP
|
|
125
|
+
declined_amount_percent =
|
|
126
|
+
hash.key?('declinedAmountPercent') ? hash['declinedAmountPercent'] : SKIP
|
|
127
|
+
super_chain_code =
|
|
128
|
+
hash.key?('superChainCode') ? hash['superChainCode'] : SKIP
|
|
129
|
+
|
|
130
|
+
# Create a new hash for additional properties, removing known properties.
|
|
131
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
132
|
+
|
|
133
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
134
|
+
new_hash, proc { |value| value }
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
# Create object from extracted values.
|
|
138
|
+
Summary6.new(approved_count: approved_count,
|
|
139
|
+
approved_amount: approved_amount,
|
|
140
|
+
declined_count: declined_count,
|
|
141
|
+
declined_amount: declined_amount,
|
|
142
|
+
approved_count_percent: approved_count_percent,
|
|
143
|
+
approved_amount_percent: approved_amount_percent,
|
|
144
|
+
declined_count_percent: declined_count_percent,
|
|
145
|
+
declined_amount_percent: declined_amount_percent,
|
|
146
|
+
super_chain_code: super_chain_code,
|
|
147
|
+
additional_properties: additional_properties)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Provides a human-readable string representation of the object.
|
|
151
|
+
def to_s
|
|
152
|
+
class_name = self.class.name.split('::').last
|
|
153
|
+
"<#{class_name} approved_count: #{@approved_count}, approved_amount: #{@approved_amount},"\
|
|
154
|
+
" declined_count: #{@declined_count}, declined_amount: #{@declined_amount},"\
|
|
155
|
+
" approved_count_percent: #{@approved_count_percent}, approved_amount_percent:"\
|
|
156
|
+
" #{@approved_amount_percent}, declined_count_percent: #{@declined_count_percent},"\
|
|
157
|
+
" declined_amount_percent: #{@declined_amount_percent}, super_chain_code:"\
|
|
158
|
+
" #{@super_chain_code}, additional_properties: #{@additional_properties}>"
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
162
|
+
def inspect
|
|
163
|
+
class_name = self.class.name.split('::').last
|
|
164
|
+
"<#{class_name} approved_count: #{@approved_count.inspect}, approved_amount:"\
|
|
165
|
+
" #{@approved_amount.inspect}, declined_count: #{@declined_count.inspect}, declined_amount:"\
|
|
166
|
+
" #{@declined_amount.inspect}, approved_count_percent: #{@approved_count_percent.inspect},"\
|
|
167
|
+
" approved_amount_percent: #{@approved_amount_percent.inspect}, declined_count_percent:"\
|
|
168
|
+
" #{@declined_count_percent.inspect}, declined_amount_percent:"\
|
|
169
|
+
" #{@declined_amount_percent.inspect}, super_chain_code: #{@super_chain_code.inspect},"\
|
|
170
|
+
" additional_properties: #{@additional_properties}>"
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
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
|
+
# The card network summary.
|
|
8
|
+
class SummaryCardNetwork < 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
|
+
# Summary
|
|
63
|
+
# @return [Array[Summary]]
|
|
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 << (Summary.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
|
+
SummaryCardNetwork.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
|