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,165 @@
|
|
|
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
|
+
# An enum for SDK environments.
|
|
8
|
+
class Environment
|
|
9
|
+
# PRODUCTION: CCERT Server
|
|
10
|
+
ENVIRONMENT = [
|
|
11
|
+
PRODUCTION = 'production'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
# Converts a string or symbol into a valid Environment constant.
|
|
15
|
+
def self.from_value(value, default_value = PRODUCTION)
|
|
16
|
+
return default_value if value.nil?
|
|
17
|
+
|
|
18
|
+
default_value
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# An enum for API servers.
|
|
23
|
+
class Server
|
|
24
|
+
SERVER = [
|
|
25
|
+
DEFAULT = 'default'.freeze
|
|
26
|
+
].freeze
|
|
27
|
+
|
|
28
|
+
# Converts a string or symbol into a valid Server constant.
|
|
29
|
+
def self.from_value(value, default_value = DEFAULT)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# All configuration including auth info and base URI for the API access
|
|
37
|
+
# are configured in this class.
|
|
38
|
+
class Configuration < CoreLibrary::HttpClientConfiguration
|
|
39
|
+
# The attribute readers for properties.
|
|
40
|
+
attr_reader :environment, :custom_header_authentication_credentials
|
|
41
|
+
|
|
42
|
+
class << self
|
|
43
|
+
attr_reader :environments
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def initialize(
|
|
47
|
+
connection: nil, adapter: :net_http_persistent, timeout: 30,
|
|
48
|
+
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
|
49
|
+
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
|
50
|
+
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
|
51
|
+
logging_configuration: nil, environment: Environment::PRODUCTION,
|
|
52
|
+
custom_header_authentication_credentials: nil
|
|
53
|
+
)
|
|
54
|
+
super connection: connection, adapter: adapter, timeout: timeout,
|
|
55
|
+
max_retries: max_retries, retry_interval: retry_interval,
|
|
56
|
+
backoff_factor: backoff_factor, retry_statuses: retry_statuses,
|
|
57
|
+
retry_methods: retry_methods, http_callback: http_callback,
|
|
58
|
+
proxy_settings: proxy_settings,
|
|
59
|
+
logging_configuration: logging_configuration
|
|
60
|
+
|
|
61
|
+
# Current API environment
|
|
62
|
+
@environment = String(environment)
|
|
63
|
+
|
|
64
|
+
# The object holding Custom Header Signature credentials
|
|
65
|
+
@custom_header_authentication_credentials = custom_header_authentication_credentials
|
|
66
|
+
|
|
67
|
+
# Initializing Custom Header Signature credentials with the provided auth parameters
|
|
68
|
+
@custom_header_authentication_credentials = custom_header_authentication_credentials
|
|
69
|
+
|
|
70
|
+
# The Http Client to use for making requests.
|
|
71
|
+
set_http_client CoreLibrary::FaradayClient.new(self)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def clone_with(connection: nil, adapter: nil, timeout: nil,
|
|
75
|
+
max_retries: nil, retry_interval: nil, backoff_factor: nil,
|
|
76
|
+
retry_statuses: nil, retry_methods: nil, http_callback: nil,
|
|
77
|
+
proxy_settings: nil, logging_configuration: nil,
|
|
78
|
+
environment: nil,
|
|
79
|
+
custom_header_authentication_credentials: nil)
|
|
80
|
+
connection ||= self.connection
|
|
81
|
+
adapter ||= self.adapter
|
|
82
|
+
timeout ||= self.timeout
|
|
83
|
+
max_retries ||= self.max_retries
|
|
84
|
+
retry_interval ||= self.retry_interval
|
|
85
|
+
backoff_factor ||= self.backoff_factor
|
|
86
|
+
retry_statuses ||= self.retry_statuses
|
|
87
|
+
retry_methods ||= self.retry_methods
|
|
88
|
+
http_callback ||= self.http_callback
|
|
89
|
+
proxy_settings ||= self.proxy_settings
|
|
90
|
+
logging_configuration ||= self.logging_configuration
|
|
91
|
+
environment ||= self.environment
|
|
92
|
+
custom_header_authentication_credentials ||= self.custom_header_authentication_credentials
|
|
93
|
+
|
|
94
|
+
Configuration.new(
|
|
95
|
+
connection: connection, adapter: adapter, timeout: timeout,
|
|
96
|
+
max_retries: max_retries, retry_interval: retry_interval,
|
|
97
|
+
backoff_factor: backoff_factor, retry_statuses: retry_statuses,
|
|
98
|
+
retry_methods: retry_methods, http_callback: http_callback,
|
|
99
|
+
proxy_settings: proxy_settings,
|
|
100
|
+
logging_configuration: logging_configuration, environment: environment,
|
|
101
|
+
custom_header_authentication_credentials: custom_header_authentication_credentials
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
# All the environments the SDK can run in.
|
|
107
|
+
ENVIRONMENTS = {
|
|
108
|
+
Environment::PRODUCTION => {
|
|
109
|
+
Server::DEFAULT => 'https://apis.cert.worldpay.com/merchant-reporting/authorizationsummary/v2'
|
|
110
|
+
}
|
|
111
|
+
}.freeze
|
|
112
|
+
|
|
113
|
+
# Generates the appropriate base URI for the environment and the server.
|
|
114
|
+
# @param [Configuration::Server] server The server enum for which the base URI is
|
|
115
|
+
# required.
|
|
116
|
+
# @return [String] The base URI.
|
|
117
|
+
def get_base_uri(server = Server::DEFAULT)
|
|
118
|
+
ENVIRONMENTS[environment][server].clone
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Builds a Configuration instance using environment variables.
|
|
122
|
+
def self.build_default_config_from_env
|
|
123
|
+
# === Core environment ===
|
|
124
|
+
environment = Environment.from_value(ENV.fetch('ENVIRONMENT', 'production'))
|
|
125
|
+
timeout = (ENV['TIMEOUT'] || 30).to_f
|
|
126
|
+
max_retries = (ENV['MAX_RETRIES'] || 0).to_i
|
|
127
|
+
retry_interval = (ENV['RETRY_INTERVAL'] || 1).to_f
|
|
128
|
+
backoff_factor = (ENV['BACKOFF_FACTOR'] || 2).to_f
|
|
129
|
+
retry_statuses = ENV.fetch('RETRY_STATUSES',
|
|
130
|
+
'[408, 413, 429, 500, 502, 503, 504, 521, 522, 524]').gsub(/[\[\]]/, '')
|
|
131
|
+
.split(',')
|
|
132
|
+
.map(&:strip)
|
|
133
|
+
.map do |item|
|
|
134
|
+
item.match?(/\A\d+\z/) ? item.to_i : item.downcase
|
|
135
|
+
end
|
|
136
|
+
retry_methods = ENV.fetch('RETRY_METHODS', '%i[get put]').gsub(/[\[\]]/, '')
|
|
137
|
+
.split(',')
|
|
138
|
+
.map(&:strip)
|
|
139
|
+
.map do |item|
|
|
140
|
+
item.match?(/\A\d+\z/) ? item.to_i : item.downcase
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# === Authentication credentials ===
|
|
144
|
+
custom_header_authentication_credentials = CustomHeaderAuthenticationCredentials.from_env
|
|
145
|
+
|
|
146
|
+
# === Proxy settings ===
|
|
147
|
+
proxy_settings = ProxySettings.from_env
|
|
148
|
+
# === Logging Configuration ===
|
|
149
|
+
logging_configuration = LoggingConfiguration.from_env if LoggingConfiguration.any_logging_configured?
|
|
150
|
+
|
|
151
|
+
Configuration.new(
|
|
152
|
+
environment: environment,
|
|
153
|
+
timeout: timeout,
|
|
154
|
+
max_retries: max_retries,
|
|
155
|
+
retry_interval: retry_interval,
|
|
156
|
+
backoff_factor: backoff_factor,
|
|
157
|
+
retry_statuses: retry_statuses,
|
|
158
|
+
retry_methods: retry_methods,
|
|
159
|
+
custom_header_authentication_credentials: custom_header_authentication_credentials,
|
|
160
|
+
proxy_settings: proxy_settings,
|
|
161
|
+
logging_configuration: logging_configuration
|
|
162
|
+
)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
# Class for exceptions when there is a network error, status code error, etc.
|
|
8
|
+
class APIException < CoreLibrary::ApiException
|
|
9
|
+
# Provides a human-readable string representation of the object.
|
|
10
|
+
def to_s
|
|
11
|
+
class_name = self.class.name.split('::').last
|
|
12
|
+
"<#{class_name} status_code: #{@response_code}, reason: #{@reason}>"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
16
|
+
def inspect
|
|
17
|
+
class_name = self.class.name.split('::').last
|
|
18
|
+
"<#{class_name} status_code: #{@response_code.inspect}, reason: #{@reason.inspect}>"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary0_error_exception.rb
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
# Authorizations Summary 0 Error class.
|
|
8
|
+
class AuthorizationsSummary0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The list of errors.
|
|
13
|
+
# @return [Array[Error]]
|
|
14
|
+
attr_accessor :errors
|
|
15
|
+
|
|
16
|
+
# The constructor.
|
|
17
|
+
# @param [String] reason The reason for raising an exception.
|
|
18
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
19
|
+
def initialize(reason, response)
|
|
20
|
+
super(reason, response)
|
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
22
|
+
unbox(hash)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Populates this object by extracting properties from a hash.
|
|
26
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
27
|
+
# response body.
|
|
28
|
+
def unbox(hash)
|
|
29
|
+
return nil unless hash
|
|
30
|
+
|
|
31
|
+
# Parameter is an array, so we need to iterate through it
|
|
32
|
+
@errors = nil
|
|
33
|
+
unless hash['errors'].nil?
|
|
34
|
+
@errors = []
|
|
35
|
+
hash['errors'].each do |structure|
|
|
36
|
+
@errors << (Error.from_hash(structure) if structure)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
@errors = SKIP unless hash.key?('errors')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Provides a human-readable string representation of the object.
|
|
44
|
+
def to_s
|
|
45
|
+
class_name = self.class.name.split('::').last
|
|
46
|
+
"<#{class_name} errors: #{@errors}>"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
50
|
+
def inspect
|
|
51
|
+
class_name = self.class.name.split('::').last
|
|
52
|
+
"<#{class_name} errors: #{@errors.inspect}>"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
# Authorizations Summary Cardnetwork 0 Error class.
|
|
8
|
+
class AuthorizationsSummaryCardnetwork0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The list of errors.
|
|
13
|
+
# @return [Array[Error]]
|
|
14
|
+
attr_accessor :errors
|
|
15
|
+
|
|
16
|
+
# The constructor.
|
|
17
|
+
# @param [String] reason The reason for raising an exception.
|
|
18
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
19
|
+
def initialize(reason, response)
|
|
20
|
+
super(reason, response)
|
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
22
|
+
unbox(hash)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Populates this object by extracting properties from a hash.
|
|
26
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
27
|
+
# response body.
|
|
28
|
+
def unbox(hash)
|
|
29
|
+
return nil unless hash
|
|
30
|
+
|
|
31
|
+
# Parameter is an array, so we need to iterate through it
|
|
32
|
+
@errors = nil
|
|
33
|
+
unless hash['errors'].nil?
|
|
34
|
+
@errors = []
|
|
35
|
+
hash['errors'].each do |structure|
|
|
36
|
+
@errors << (Error.from_hash(structure) if structure)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
@errors = SKIP unless hash.key?('errors')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Provides a human-readable string representation of the object.
|
|
44
|
+
def to_s
|
|
45
|
+
class_name = self.class.name.split('::').last
|
|
46
|
+
"<#{class_name} errors: #{@errors}>"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
50
|
+
def inspect
|
|
51
|
+
class_name = self.class.name.split('::').last
|
|
52
|
+
"<#{class_name} errors: #{@errors.inspect}>"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
# Authorizations Summary Chain 0 Error class.
|
|
8
|
+
class AuthorizationsSummaryChain0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The list of errors.
|
|
13
|
+
# @return [Array[Error]]
|
|
14
|
+
attr_accessor :errors
|
|
15
|
+
|
|
16
|
+
# The constructor.
|
|
17
|
+
# @param [String] reason The reason for raising an exception.
|
|
18
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
19
|
+
def initialize(reason, response)
|
|
20
|
+
super(reason, response)
|
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
22
|
+
unbox(hash)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Populates this object by extracting properties from a hash.
|
|
26
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
27
|
+
# response body.
|
|
28
|
+
def unbox(hash)
|
|
29
|
+
return nil unless hash
|
|
30
|
+
|
|
31
|
+
# Parameter is an array, so we need to iterate through it
|
|
32
|
+
@errors = nil
|
|
33
|
+
unless hash['errors'].nil?
|
|
34
|
+
@errors = []
|
|
35
|
+
hash['errors'].each do |structure|
|
|
36
|
+
@errors << (Error.from_hash(structure) if structure)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
@errors = SKIP unless hash.key?('errors')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Provides a human-readable string representation of the object.
|
|
44
|
+
def to_s
|
|
45
|
+
class_name = self.class.name.split('::').last
|
|
46
|
+
"<#{class_name} errors: #{@errors}>"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
50
|
+
def inspect
|
|
51
|
+
class_name = self.class.name.split('::').last
|
|
52
|
+
"<#{class_name} errors: #{@errors.inspect}>"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
# Authorizations Summary Division 0 Error class.
|
|
8
|
+
class AuthorizationsSummaryDivision0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The list of errors.
|
|
13
|
+
# @return [Array[Error]]
|
|
14
|
+
attr_accessor :errors
|
|
15
|
+
|
|
16
|
+
# The constructor.
|
|
17
|
+
# @param [String] reason The reason for raising an exception.
|
|
18
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
19
|
+
def initialize(reason, response)
|
|
20
|
+
super(reason, response)
|
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
22
|
+
unbox(hash)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Populates this object by extracting properties from a hash.
|
|
26
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
27
|
+
# response body.
|
|
28
|
+
def unbox(hash)
|
|
29
|
+
return nil unless hash
|
|
30
|
+
|
|
31
|
+
# Parameter is an array, so we need to iterate through it
|
|
32
|
+
@errors = nil
|
|
33
|
+
unless hash['errors'].nil?
|
|
34
|
+
@errors = []
|
|
35
|
+
hash['errors'].each do |structure|
|
|
36
|
+
@errors << (Error.from_hash(structure) if structure)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
@errors = SKIP unless hash.key?('errors')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Provides a human-readable string representation of the object.
|
|
44
|
+
def to_s
|
|
45
|
+
class_name = self.class.name.split('::').last
|
|
46
|
+
"<#{class_name} errors: #{@errors}>"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
50
|
+
def inspect
|
|
51
|
+
class_name = self.class.name.split('::').last
|
|
52
|
+
"<#{class_name} errors: #{@errors.inspect}>"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
# Authorizations Summary Merchant 0 Error class.
|
|
8
|
+
class AuthorizationsSummaryMerchant0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The list of errors.
|
|
13
|
+
# @return [Array[Error]]
|
|
14
|
+
attr_accessor :errors
|
|
15
|
+
|
|
16
|
+
# The constructor.
|
|
17
|
+
# @param [String] reason The reason for raising an exception.
|
|
18
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
19
|
+
def initialize(reason, response)
|
|
20
|
+
super(reason, response)
|
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
22
|
+
unbox(hash)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Populates this object by extracting properties from a hash.
|
|
26
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
27
|
+
# response body.
|
|
28
|
+
def unbox(hash)
|
|
29
|
+
return nil unless hash
|
|
30
|
+
|
|
31
|
+
# Parameter is an array, so we need to iterate through it
|
|
32
|
+
@errors = nil
|
|
33
|
+
unless hash['errors'].nil?
|
|
34
|
+
@errors = []
|
|
35
|
+
hash['errors'].each do |structure|
|
|
36
|
+
@errors << (Error.from_hash(structure) if structure)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
@errors = SKIP unless hash.key?('errors')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Provides a human-readable string representation of the object.
|
|
44
|
+
def to_s
|
|
45
|
+
class_name = self.class.name.split('::').last
|
|
46
|
+
"<#{class_name} errors: #{@errors}>"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
50
|
+
def inspect
|
|
51
|
+
class_name = self.class.name.split('::').last
|
|
52
|
+
"<#{class_name} errors: #{@errors.inspect}>"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
# Authorizations Summary Store 0 Error class.
|
|
8
|
+
class AuthorizationsSummaryStore0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The list of errors.
|
|
13
|
+
# @return [Array[Error]]
|
|
14
|
+
attr_accessor :errors
|
|
15
|
+
|
|
16
|
+
# The constructor.
|
|
17
|
+
# @param [String] reason The reason for raising an exception.
|
|
18
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
19
|
+
def initialize(reason, response)
|
|
20
|
+
super(reason, response)
|
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
22
|
+
unbox(hash)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Populates this object by extracting properties from a hash.
|
|
26
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
27
|
+
# response body.
|
|
28
|
+
def unbox(hash)
|
|
29
|
+
return nil unless hash
|
|
30
|
+
|
|
31
|
+
# Parameter is an array, so we need to iterate through it
|
|
32
|
+
@errors = nil
|
|
33
|
+
unless hash['errors'].nil?
|
|
34
|
+
@errors = []
|
|
35
|
+
hash['errors'].each do |structure|
|
|
36
|
+
@errors << (Error.from_hash(structure) if structure)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
@errors = SKIP unless hash.key?('errors')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Provides a human-readable string representation of the object.
|
|
44
|
+
def to_s
|
|
45
|
+
class_name = self.class.name.split('::').last
|
|
46
|
+
"<#{class_name} errors: #{@errors}>"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
50
|
+
def inspect
|
|
51
|
+
class_name = self.class.name.split('::').last
|
|
52
|
+
"<#{class_name} errors: #{@errors.inspect}>"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
# Authorizations Summary Superchain 0 Error class.
|
|
8
|
+
class AuthorizationsSummarySuperchain0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The list of errors.
|
|
13
|
+
# @return [Array[Error]]
|
|
14
|
+
attr_accessor :errors
|
|
15
|
+
|
|
16
|
+
# The constructor.
|
|
17
|
+
# @param [String] reason The reason for raising an exception.
|
|
18
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
19
|
+
def initialize(reason, response)
|
|
20
|
+
super(reason, response)
|
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
22
|
+
unbox(hash)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Populates this object by extracting properties from a hash.
|
|
26
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
27
|
+
# response body.
|
|
28
|
+
def unbox(hash)
|
|
29
|
+
return nil unless hash
|
|
30
|
+
|
|
31
|
+
# Parameter is an array, so we need to iterate through it
|
|
32
|
+
@errors = nil
|
|
33
|
+
unless hash['errors'].nil?
|
|
34
|
+
@errors = []
|
|
35
|
+
hash['errors'].each do |structure|
|
|
36
|
+
@errors << (Error.from_hash(structure) if structure)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
@errors = SKIP unless hash.key?('errors')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Provides a human-readable string representation of the object.
|
|
44
|
+
def to_s
|
|
45
|
+
class_name = self.class.name.split('::').last
|
|
46
|
+
"<#{class_name} errors: #{@errors}>"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
50
|
+
def inspect
|
|
51
|
+
class_name = self.class.name.split('::').last
|
|
52
|
+
"<#{class_name} errors: #{@errors.inspect}>"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
# Authorizations Summary Transactiondate 0 Error class.
|
|
8
|
+
class AuthorizationsSummaryTransactiondate0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The list of errors.
|
|
13
|
+
# @return [Array[Error]]
|
|
14
|
+
attr_accessor :errors
|
|
15
|
+
|
|
16
|
+
# The constructor.
|
|
17
|
+
# @param [String] reason The reason for raising an exception.
|
|
18
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
19
|
+
def initialize(reason, response)
|
|
20
|
+
super(reason, response)
|
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
22
|
+
unbox(hash)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Populates this object by extracting properties from a hash.
|
|
26
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
27
|
+
# response body.
|
|
28
|
+
def unbox(hash)
|
|
29
|
+
return nil unless hash
|
|
30
|
+
|
|
31
|
+
# Parameter is an array, so we need to iterate through it
|
|
32
|
+
@errors = nil
|
|
33
|
+
unless hash['errors'].nil?
|
|
34
|
+
@errors = []
|
|
35
|
+
hash['errors'].each do |structure|
|
|
36
|
+
@errors << (Error.from_hash(structure) if structure)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
@errors = SKIP unless hash.key?('errors')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Provides a human-readable string representation of the object.
|
|
44
|
+
def to_s
|
|
45
|
+
class_name = self.class.name.split('::').last
|
|
46
|
+
"<#{class_name} errors: #{@errors}>"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
50
|
+
def inspect
|
|
51
|
+
class_name = self.class.name.split('::').last
|
|
52
|
+
"<#{class_name} errors: #{@errors.inspect}>"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
# Http response received.
|
|
8
|
+
class ApiResponse < CoreLibrary::ApiResponse
|
|
9
|
+
# The constructor
|
|
10
|
+
# @param [HttpResponse] http_response The original, raw response from the api.
|
|
11
|
+
# @param [Object] data The data field specified for the response.
|
|
12
|
+
# @param [Array<String>] errors Any errors returned by the server.
|
|
13
|
+
def initialize(http_response,
|
|
14
|
+
data: nil,
|
|
15
|
+
errors: nil)
|
|
16
|
+
super
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|