wp-sdk 1.0.0
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 +152 -0
- data/bin/console +15 -0
- data/lib/reporting_settlement_research_api/api_helper.rb +10 -0
- data/lib/reporting_settlement_research_api/apis/base_api.rb +65 -0
- data/lib/reporting_settlement_research_api/apis/settlement_batches_api.rb +67 -0
- data/lib/reporting_settlement_research_api/apis/settlement_daily_totals_api.rb +39 -0
- data/lib/reporting_settlement_research_api/apis/settlement_errors_api.rb +67 -0
- data/lib/reporting_settlement_research_api/apis/settlements_api.rb +40 -0
- data/lib/reporting_settlement_research_api/apis/transaction_status_api.rb +33 -0
- data/lib/reporting_settlement_research_api/apis/transaction_type_api.rb +33 -0
- data/lib/reporting_settlement_research_api/client.rb +105 -0
- data/lib/reporting_settlement_research_api/configuration.rb +164 -0
- data/lib/reporting_settlement_research_api/exceptions/api_exception.rb +21 -0
- data/lib/reporting_settlement_research_api/exceptions/search_date0_error_exception.rb +58 -0
- data/lib/reporting_settlement_research_api/exceptions/search_store0_error_exception.rb +58 -0
- data/lib/reporting_settlement_research_api/exceptions/settlementerrors_pendingsettlementbatches_search0_error_exception.rb +58 -0
- data/lib/reporting_settlement_research_api/exceptions/settlementerrors_settlementfileerrors_search0_error_exception.rb +58 -0
- data/lib/reporting_settlement_research_api/exceptions/settlements_daily_totals_search0_error_exception.rb +58 -0
- data/lib/reporting_settlement_research_api/exceptions/settlements_search0_error_exception.rb +58 -0
- data/lib/reporting_settlement_research_api/exceptions/transaction_statuses0_error_exception.rb +58 -0
- data/lib/reporting_settlement_research_api/exceptions/transaction_types0_error_exception.rb +58 -0
- data/lib/reporting_settlement_research_api/http/api_response.rb +19 -0
- data/lib/reporting_settlement_research_api/http/auth/custom_header_authentication.rb +52 -0
- data/lib/reporting_settlement_research_api/http/http_call_back.rb +10 -0
- data/lib/reporting_settlement_research_api/http/http_method_enum.rb +10 -0
- data/lib/reporting_settlement_research_api/http/http_request.rb +10 -0
- data/lib/reporting_settlement_research_api/http/http_response.rb +10 -0
- data/lib/reporting_settlement_research_api/http/proxy_settings.rb +22 -0
- data/lib/reporting_settlement_research_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/reporting_settlement_research_api/logging/sdk_logger.rb +17 -0
- data/lib/reporting_settlement_research_api/models/account_name_inquiry.rb +98 -0
- data/lib/reporting_settlement_research_api/models/aci.rb +98 -0
- data/lib/reporting_settlement_research_api/models/additional_details.rb +135 -0
- data/lib/reporting_settlement_research_api/models/authorization_currency.rb +98 -0
- data/lib/reporting_settlement_research_api/models/authorization_source.rb +98 -0
- data/lib/reporting_settlement_research_api/models/avs_response_code.rb +98 -0
- data/lib/reporting_settlement_research_api/models/bank_card_rej_real_time_transaction.rb +172 -0
- data/lib/reporting_settlement_research_api/models/bank_card_rejects_search_request.rb +159 -0
- data/lib/reporting_settlement_research_api/models/bank_card_rejects_search_response.rb +94 -0
- data/lib/reporting_settlement_research_api/models/base_model.rb +110 -0
- data/lib/reporting_settlement_research_api/models/batch_card_type.rb +41 -0
- data/lib/reporting_settlement_research_api/models/batch_card_type1.rb +41 -0
- data/lib/reporting_settlement_research_api/models/batch_hold_status.rb +98 -0
- data/lib/reporting_settlement_research_api/models/billing_indicator.rb +98 -0
- data/lib/reporting_settlement_research_api/models/card_account_term.rb +98 -0
- data/lib/reporting_settlement_research_api/models/card_details.rb +381 -0
- data/lib/reporting_settlement_research_api/models/card_details2.rb +381 -0
- data/lib/reporting_settlement_research_api/models/card_network.rb +98 -0
- data/lib/reporting_settlement_research_api/models/card_networks.rb +118 -0
- data/lib/reporting_settlement_research_api/models/card_product_results.rb +98 -0
- data/lib/reporting_settlement_research_api/models/card_product_type.rb +98 -0
- data/lib/reporting_settlement_research_api/models/card_types.rb +49 -0
- data/lib/reporting_settlement_research_api/models/card_types1.rb +44 -0
- data/lib/reporting_settlement_research_api/models/cardholder_id.rb +98 -0
- data/lib/reporting_settlement_research_api/models/code_and_description.rb +98 -0
- data/lib/reporting_settlement_research_api/models/code_and_description1.rb +85 -0
- data/lib/reporting_settlement_research_api/models/country_of_origin.rb +98 -0
- data/lib/reporting_settlement_research_api/models/credit_additional_details.rb +135 -0
- data/lib/reporting_settlement_research_api/models/credit_card_details.rb +230 -0
- data/lib/reporting_settlement_research_api/models/credit_interchange_details.rb +215 -0
- data/lib/reporting_settlement_research_api/models/credit_merchant_hierarchy_details.rb +112 -0
- data/lib/reporting_settlement_research_api/models/credit_other_services_details.rb +157 -0
- data/lib/reporting_settlement_research_api/models/credit_premium_payback_details.rb +120 -0
- data/lib/reporting_settlement_research_api/models/credit_transaction_details.rb +435 -0
- data/lib/reporting_settlement_research_api/models/customer_fields.rb +95 -0
- data/lib/reporting_settlement_research_api/models/customer_fields2.rb +95 -0
- data/lib/reporting_settlement_research_api/models/cvv2_presence_indicator.rb +98 -0
- data/lib/reporting_settlement_research_api/models/cvv2_response_code.rb +98 -0
- data/lib/reporting_settlement_research_api/models/date_range1.rb +85 -0
- data/lib/reporting_settlement_research_api/models/date_type.rb +36 -0
- data/lib/reporting_settlement_research_api/models/daterange.rb +85 -0
- data/lib/reporting_settlement_research_api/models/emv_details.rb +113 -0
- data/lib/reporting_settlement_research_api/models/emv_details2.rb +113 -0
- data/lib/reporting_settlement_research_api/models/entity.rb +99 -0
- data/lib/reporting_settlement_research_api/models/entry_mode.rb +98 -0
- data/lib/reporting_settlement_research_api/models/error.rb +96 -0
- data/lib/reporting_settlement_research_api/models/field_name.rb +93 -0
- data/lib/reporting_settlement_research_api/models/field_name1.rb +69 -0
- data/lib/reporting_settlement_research_api/models/field_name2.rb +57 -0
- data/lib/reporting_settlement_research_api/models/field_name3.rb +57 -0
- data/lib/reporting_settlement_research_api/models/field_name4.rb +61 -0
- data/lib/reporting_settlement_research_api/models/field_name5.rb +49 -0
- data/lib/reporting_settlement_research_api/models/fraud_coverage_type.rb +98 -0
- data/lib/reporting_settlement_research_api/models/fraud_detection_stage.rb +98 -0
- data/lib/reporting_settlement_research_api/models/fraud_fields.rb +99 -0
- data/lib/reporting_settlement_research_api/models/fraud_fields2.rb +99 -0
- data/lib/reporting_settlement_research_api/models/fraud_fields_fraud_score.rb +86 -0
- data/lib/reporting_settlement_research_api/models/fraud_response_code.rb +52 -0
- data/lib/reporting_settlement_research_api/models/fraud_response_code2.rb +98 -0
- data/lib/reporting_settlement_research_api/models/fraud_rule_result.rb +49 -0
- data/lib/reporting_settlement_research_api/models/fraud_rule_result2.rb +98 -0
- data/lib/reporting_settlement_research_api/models/fraud_score.rb +85 -0
- data/lib/reporting_settlement_research_api/models/fraud_sight_details.rb +124 -0
- data/lib/reporting_settlement_research_api/models/fraud_sight_details2.rb +124 -0
- data/lib/reporting_settlement_research_api/models/funded_net_settle.rb +110 -0
- data/lib/reporting_settlement_research_api/models/funded_net_settle2.rb +110 -0
- data/lib/reporting_settlement_research_api/models/hierarchy.rb +99 -0
- data/lib/reporting_settlement_research_api/models/hierarchy1.rb +99 -0
- data/lib/reporting_settlement_research_api/models/hierarchy10.rb +141 -0
- data/lib/reporting_settlement_research_api/models/hierarchy2.rb +85 -0
- data/lib/reporting_settlement_research_api/models/hierarchy4.rb +112 -0
- data/lib/reporting_settlement_research_api/models/hierarchy6.rb +99 -0
- data/lib/reporting_settlement_research_api/models/hierarchy7.rb +131 -0
- data/lib/reporting_settlement_research_api/models/hierarchy9.rb +119 -0
- data/lib/reporting_settlement_research_api/models/hierarchy_level.rb +99 -0
- data/lib/reporting_settlement_research_api/models/hierarchy_levels.rb +99 -0
- data/lib/reporting_settlement_research_api/models/interchange_code.rb +85 -0
- data/lib/reporting_settlement_research_api/models/interchange_data.rb +116 -0
- data/lib/reporting_settlement_research_api/models/interchange_details.rb +215 -0
- data/lib/reporting_settlement_research_api/models/interchange_details1.rb +116 -0
- data/lib/reporting_settlement_research_api/models/international_indicator.rb +98 -0
- data/lib/reporting_settlement_research_api/models/level.rb +45 -0
- data/lib/reporting_settlement_research_api/models/level1.rb +49 -0
- data/lib/reporting_settlement_research_api/models/level2.rb +37 -0
- data/lib/reporting_settlement_research_api/models/level3.rb +67 -0
- data/lib/reporting_settlement_research_api/models/level_indicator.rb +98 -0
- data/lib/reporting_settlement_research_api/models/location_details.rb +199 -0
- data/lib/reporting_settlement_research_api/models/location_details2.rb +198 -0
- data/lib/reporting_settlement_research_api/models/mail_phone_indicator.rb +98 -0
- data/lib/reporting_settlement_research_api/models/market_specific_data_indicator.rb +98 -0
- data/lib/reporting_settlement_research_api/models/mastercard_tic_indicator.rb +98 -0
- data/lib/reporting_settlement_research_api/models/merchant_category.rb +98 -0
- data/lib/reporting_settlement_research_api/models/merchant_hierarchy.rb +119 -0
- data/lib/reporting_settlement_research_api/models/merchant_hierarchy_detail.rb +131 -0
- data/lib/reporting_settlement_research_api/models/merchant_info.rb +141 -0
- data/lib/reporting_settlement_research_api/models/network_group.rb +98 -0
- data/lib/reporting_settlement_research_api/models/order_by.rb +36 -0
- data/lib/reporting_settlement_research_api/models/order_by_for_settled_daily_totals.rb +85 -0
- data/lib/reporting_settlement_research_api/models/order_by_for_settled_transactions_type.rb +85 -0
- data/lib/reporting_settlement_research_api/models/origin_type.rb +98 -0
- data/lib/reporting_settlement_research_api/models/other_services.rb +179 -0
- data/lib/reporting_settlement_research_api/models/other_services2.rb +179 -0
- data/lib/reporting_settlement_research_api/models/pagination.rb +87 -0
- data/lib/reporting_settlement_research_api/models/pagination4.rb +108 -0
- data/lib/reporting_settlement_research_api/models/pagination_response.rb +108 -0
- data/lib/reporting_settlement_research_api/models/paginationtype.rb +87 -0
- data/lib/reporting_settlement_research_api/models/payment_gateway_details.rb +127 -0
- data/lib/reporting_settlement_research_api/models/payment_gateway_details1.rb +127 -0
- data/lib/reporting_settlement_research_api/models/pin_less.rb +98 -0
- data/lib/reporting_settlement_research_api/models/pos_condition_code.rb +98 -0
- data/lib/reporting_settlement_research_api/models/premium_payback.rb +120 -0
- data/lib/reporting_settlement_research_api/models/processdaterange.rb +85 -0
- data/lib/reporting_settlement_research_api/models/rejection_reason.rb +98 -0
- data/lib/reporting_settlement_research_api/models/search_auth_transactions.rb +200 -0
- data/lib/reporting_settlement_research_api/models/search_daily_totals.rb +95 -0
- data/lib/reporting_settlement_research_api/models/search_daily_totals_details.rb +172 -0
- data/lib/reporting_settlement_research_api/models/search_date_request.rb +116 -0
- data/lib/reporting_settlement_research_api/models/search_date_response.rb +94 -0
- data/lib/reporting_settlement_research_api/models/search_requesttransaction_amount_range.rb +105 -0
- data/lib/reporting_settlement_research_api/models/search_settle_daily_totals_request.rb +135 -0
- data/lib/reporting_settlement_research_api/models/search_settle_transactions_request.rb +248 -0
- data/lib/reporting_settlement_research_api/models/search_store_request.rb +116 -0
- data/lib/reporting_settlement_research_api/models/search_store_response.rb +94 -0
- data/lib/reporting_settlement_research_api/models/search_transaction_details_response.rb +95 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_date_request.rb +116 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_date_response.rb +94 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_entity.rb +85 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_hierarchy.rb +112 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_sort_store.rb +85 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_sortbankcarddetails.rb +85 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_store_request.rb +116 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_store_response.rb +94 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_transaction_date.rb +195 -0
- data/lib/reporting_settlement_research_api/models/settlement_batches_transaction_store.rb +195 -0
- data/lib/reporting_settlement_research_api/models/settlement_rej_real_time_transaction.rb +152 -0
- data/lib/reporting_settlement_research_api/models/settlement_rejects_search_request.rb +104 -0
- data/lib/reporting_settlement_research_api/models/settlement_rejects_search_response.rb +94 -0
- data/lib/reporting_settlement_research_api/models/settlementerrors_pendingsettlementbatches_search_request.rb +159 -0
- data/lib/reporting_settlement_research_api/models/settlementerrors_pendingsettlementbatches_search_response.rb +94 -0
- data/lib/reporting_settlement_research_api/models/settlementerrors_settlementfileerrors_search_request.rb +104 -0
- data/lib/reporting_settlement_research_api/models/settlementerrors_settlementfileerrors_search_response.rb +94 -0
- data/lib/reporting_settlement_research_api/models/settlements_daily_totals_search_request.rb +135 -0
- data/lib/reporting_settlement_research_api/models/settlements_daily_totals_search_response.rb +94 -0
- data/lib/reporting_settlement_research_api/models/settlements_search_request.rb +248 -0
- data/lib/reporting_settlement_research_api/models/settlements_search_response.rb +95 -0
- data/lib/reporting_settlement_research_api/models/signature_capabilities_indicator.rb +98 -0
- data/lib/reporting_settlement_research_api/models/signature_compression.rb +98 -0
- data/lib/reporting_settlement_research_api/models/signature_pen.rb +98 -0
- data/lib/reporting_settlement_research_api/models/signify_details.rb +103 -0
- data/lib/reporting_settlement_research_api/models/signifyd_detail.rb +103 -0
- data/lib/reporting_settlement_research_api/models/sort_results_by.rb +85 -0
- data/lib/reporting_settlement_research_api/models/sort_results_by1.rb +85 -0
- data/lib/reporting_settlement_research_api/models/sort_results_by2.rb +85 -0
- data/lib/reporting_settlement_research_api/models/sort_results_by3.rb +85 -0
- data/lib/reporting_settlement_research_api/models/sort_results_by4.rb +85 -0
- data/lib/reporting_settlement_research_api/models/sort_results_by5.rb +85 -0
- data/lib/reporting_settlement_research_api/models/sortbankcarddetails.rb +85 -0
- data/lib/reporting_settlement_research_api/models/sortsettlementfiledetails.rb +85 -0
- data/lib/reporting_settlement_research_api/models/stand_in_indicator.rb +98 -0
- data/lib/reporting_settlement_research_api/models/stand_in_level.rb +98 -0
- data/lib/reporting_settlement_research_api/models/surcharge_reason.rb +85 -0
- data/lib/reporting_settlement_research_api/models/terminal.rb +109 -0
- data/lib/reporting_settlement_research_api/models/terminal_capability.rb +98 -0
- data/lib/reporting_settlement_research_api/models/terminal_details.rb +109 -0
- data/lib/reporting_settlement_research_api/models/transaction_amount_range.rb +105 -0
- data/lib/reporting_settlement_research_api/models/transaction_details.rb +723 -0
- data/lib/reporting_settlement_research_api/models/transaction_details2.rb +723 -0
- data/lib/reporting_settlement_research_api/models/transaction_status.rb +98 -0
- data/lib/reporting_settlement_research_api/models/transaction_status_code.rb +98 -0
- data/lib/reporting_settlement_research_api/models/transaction_status_code1.rb +1029 -0
- data/lib/reporting_settlement_research_api/models/transaction_summary.rb +182 -0
- data/lib/reporting_settlement_research_api/models/transaction_summary_data.rb +182 -0
- data/lib/reporting_settlement_research_api/models/transaction_type.rb +98 -0
- data/lib/reporting_settlement_research_api/models/transaction_type_code.rb +98 -0
- data/lib/reporting_settlement_research_api/models/transaction_type_code1.rb +221 -0
- data/lib/reporting_settlement_research_api/utilities/date_time_helper.rb +11 -0
- data/lib/reporting_settlement_research_api/utilities/file_wrapper.rb +28 -0
- data/lib/reporting_settlement_research_api.rb +302 -0
- metadata +294 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
7
|
+
# An enum for SDK environments.
|
|
8
|
+
class Environment
|
|
9
|
+
ENVIRONMENT = [
|
|
10
|
+
PRODUCTION = 'production'.freeze
|
|
11
|
+
].freeze
|
|
12
|
+
|
|
13
|
+
# Converts a string or symbol into a valid Environment constant.
|
|
14
|
+
def self.from_value(value, default_value = PRODUCTION)
|
|
15
|
+
return default_value if value.nil?
|
|
16
|
+
|
|
17
|
+
default_value
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# An enum for API servers.
|
|
22
|
+
class Server
|
|
23
|
+
SERVER = [
|
|
24
|
+
DEFAULT = 'default'.freeze
|
|
25
|
+
].freeze
|
|
26
|
+
|
|
27
|
+
# Converts a string or symbol into a valid Server constant.
|
|
28
|
+
def self.from_value(value, default_value = DEFAULT)
|
|
29
|
+
return default_value if value.nil?
|
|
30
|
+
|
|
31
|
+
default_value
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# All configuration including auth info and base URI for the API access
|
|
36
|
+
# are configured in this class.
|
|
37
|
+
class Configuration < CoreLibrary::HttpClientConfiguration
|
|
38
|
+
# The attribute readers for properties.
|
|
39
|
+
attr_reader :environment, :custom_header_authentication_credentials
|
|
40
|
+
|
|
41
|
+
class << self
|
|
42
|
+
attr_reader :environments
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def initialize(
|
|
46
|
+
connection: nil, adapter: :net_http_persistent, timeout: 60,
|
|
47
|
+
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
|
48
|
+
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
|
49
|
+
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
|
50
|
+
logging_configuration: nil, environment: Environment::PRODUCTION,
|
|
51
|
+
custom_header_authentication_credentials: nil
|
|
52
|
+
)
|
|
53
|
+
super connection: connection, adapter: adapter, timeout: timeout,
|
|
54
|
+
max_retries: max_retries, retry_interval: retry_interval,
|
|
55
|
+
backoff_factor: backoff_factor, retry_statuses: retry_statuses,
|
|
56
|
+
retry_methods: retry_methods, http_callback: http_callback,
|
|
57
|
+
proxy_settings: proxy_settings,
|
|
58
|
+
logging_configuration: logging_configuration
|
|
59
|
+
|
|
60
|
+
# Current API environment
|
|
61
|
+
@environment = String(environment)
|
|
62
|
+
|
|
63
|
+
# The object holding Custom Header Signature credentials
|
|
64
|
+
@custom_header_authentication_credentials = custom_header_authentication_credentials
|
|
65
|
+
|
|
66
|
+
# Initializing Custom Header Signature credentials with the provided auth parameters
|
|
67
|
+
@custom_header_authentication_credentials = custom_header_authentication_credentials
|
|
68
|
+
|
|
69
|
+
# The Http Client to use for making requests.
|
|
70
|
+
set_http_client CoreLibrary::FaradayClient.new(self)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def clone_with(connection: nil, adapter: nil, timeout: nil,
|
|
74
|
+
max_retries: nil, retry_interval: nil, backoff_factor: nil,
|
|
75
|
+
retry_statuses: nil, retry_methods: nil, http_callback: nil,
|
|
76
|
+
proxy_settings: nil, logging_configuration: nil,
|
|
77
|
+
environment: nil,
|
|
78
|
+
custom_header_authentication_credentials: nil)
|
|
79
|
+
connection ||= self.connection
|
|
80
|
+
adapter ||= self.adapter
|
|
81
|
+
timeout ||= self.timeout
|
|
82
|
+
max_retries ||= self.max_retries
|
|
83
|
+
retry_interval ||= self.retry_interval
|
|
84
|
+
backoff_factor ||= self.backoff_factor
|
|
85
|
+
retry_statuses ||= self.retry_statuses
|
|
86
|
+
retry_methods ||= self.retry_methods
|
|
87
|
+
http_callback ||= self.http_callback
|
|
88
|
+
proxy_settings ||= self.proxy_settings
|
|
89
|
+
logging_configuration ||= self.logging_configuration
|
|
90
|
+
environment ||= self.environment
|
|
91
|
+
custom_header_authentication_credentials ||= self.custom_header_authentication_credentials
|
|
92
|
+
|
|
93
|
+
Configuration.new(
|
|
94
|
+
connection: connection, adapter: adapter, timeout: timeout,
|
|
95
|
+
max_retries: max_retries, retry_interval: retry_interval,
|
|
96
|
+
backoff_factor: backoff_factor, retry_statuses: retry_statuses,
|
|
97
|
+
retry_methods: retry_methods, http_callback: http_callback,
|
|
98
|
+
proxy_settings: proxy_settings,
|
|
99
|
+
logging_configuration: logging_configuration, environment: environment,
|
|
100
|
+
custom_header_authentication_credentials: custom_header_authentication_credentials
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# All the environments the SDK can run in.
|
|
106
|
+
ENVIRONMENTS = {
|
|
107
|
+
Environment::PRODUCTION => {
|
|
108
|
+
Server::DEFAULT => 'https://apis.cert.worldpay.com/merchant-reporting/settlementresearch/v1'
|
|
109
|
+
}
|
|
110
|
+
}.freeze
|
|
111
|
+
|
|
112
|
+
# Generates the appropriate base URI for the environment and the server.
|
|
113
|
+
# @param [Configuration::Server] server The server enum for which the base URI is
|
|
114
|
+
# required.
|
|
115
|
+
# @return [String] The base URI.
|
|
116
|
+
def get_base_uri(server = Server::DEFAULT)
|
|
117
|
+
ENVIRONMENTS[environment][server].clone
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Builds a Configuration instance using environment variables.
|
|
121
|
+
def self.build_default_config_from_env
|
|
122
|
+
# === Core environment ===
|
|
123
|
+
environment = Environment.from_value(ENV.fetch('ENVIRONMENT', 'production'))
|
|
124
|
+
timeout = (ENV['TIMEOUT'] || 60).to_f
|
|
125
|
+
max_retries = (ENV['MAX_RETRIES'] || 0).to_i
|
|
126
|
+
retry_interval = (ENV['RETRY_INTERVAL'] || 1).to_f
|
|
127
|
+
backoff_factor = (ENV['BACKOFF_FACTOR'] || 2).to_f
|
|
128
|
+
retry_statuses = ENV.fetch('RETRY_STATUSES',
|
|
129
|
+
'[408, 413, 429, 500, 502, 503, 504, 521, 522, 524]').gsub(/[\[\]]/, '')
|
|
130
|
+
.split(',')
|
|
131
|
+
.map(&:strip)
|
|
132
|
+
.map do |item|
|
|
133
|
+
item.match?(/\A\d+\z/) ? item.to_i : item.downcase
|
|
134
|
+
end
|
|
135
|
+
retry_methods = ENV.fetch('RETRY_METHODS', '%i[get put]').gsub(/[\[\]]/, '')
|
|
136
|
+
.split(',')
|
|
137
|
+
.map(&:strip)
|
|
138
|
+
.map do |item|
|
|
139
|
+
item.match?(/\A\d+\z/) ? item.to_i : item.downcase
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# === Authentication credentials ===
|
|
143
|
+
custom_header_authentication_credentials = CustomHeaderAuthenticationCredentials.from_env
|
|
144
|
+
|
|
145
|
+
# === Proxy settings ===
|
|
146
|
+
proxy_settings = ProxySettings.from_env
|
|
147
|
+
# === Logging Configuration ===
|
|
148
|
+
logging_configuration = LoggingConfiguration.from_env if LoggingConfiguration.any_logging_configured?
|
|
149
|
+
|
|
150
|
+
Configuration.new(
|
|
151
|
+
environment: environment,
|
|
152
|
+
timeout: timeout,
|
|
153
|
+
max_retries: max_retries,
|
|
154
|
+
retry_interval: retry_interval,
|
|
155
|
+
backoff_factor: backoff_factor,
|
|
156
|
+
retry_statuses: retry_statuses,
|
|
157
|
+
retry_methods: retry_methods,
|
|
158
|
+
custom_header_authentication_credentials: custom_header_authentication_credentials,
|
|
159
|
+
proxy_settings: proxy_settings,
|
|
160
|
+
logging_configuration: logging_configuration
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
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
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
7
|
+
# Search Date 0 Error class.
|
|
8
|
+
class SearchDate0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Code of error
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :error_code
|
|
15
|
+
|
|
16
|
+
# Error Message
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :error_message
|
|
19
|
+
|
|
20
|
+
# Error Target
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :target
|
|
23
|
+
|
|
24
|
+
# The constructor.
|
|
25
|
+
# @param [String] reason The reason for raising an exception.
|
|
26
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
27
|
+
def initialize(reason, response)
|
|
28
|
+
super(reason, response)
|
|
29
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
30
|
+
unbox(hash)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Populates this object by extracting properties from a hash.
|
|
34
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
35
|
+
# response body.
|
|
36
|
+
def unbox(hash)
|
|
37
|
+
return nil unless hash
|
|
38
|
+
|
|
39
|
+
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
|
40
|
+
@error_message = hash.key?('errorMessage') ? hash['errorMessage'] : SKIP
|
|
41
|
+
@target = hash.key?('target') ? hash['target'] : SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Provides a human-readable string representation of the object.
|
|
45
|
+
def to_s
|
|
46
|
+
class_name = self.class.name.split('::').last
|
|
47
|
+
"<#{class_name} error_code: #{@error_code}, error_message: #{@error_message}, target:"\
|
|
48
|
+
" #{@target}>"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
52
|
+
def inspect
|
|
53
|
+
class_name = self.class.name.split('::').last
|
|
54
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_message:"\
|
|
55
|
+
" #{@error_message.inspect}, target: #{@target.inspect}>"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
7
|
+
# Search Store 0 Error class.
|
|
8
|
+
class SearchStore0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Code of error
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :error_code
|
|
15
|
+
|
|
16
|
+
# Error Message
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :error_message
|
|
19
|
+
|
|
20
|
+
# Error Target
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :target
|
|
23
|
+
|
|
24
|
+
# The constructor.
|
|
25
|
+
# @param [String] reason The reason for raising an exception.
|
|
26
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
27
|
+
def initialize(reason, response)
|
|
28
|
+
super(reason, response)
|
|
29
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
30
|
+
unbox(hash)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Populates this object by extracting properties from a hash.
|
|
34
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
35
|
+
# response body.
|
|
36
|
+
def unbox(hash)
|
|
37
|
+
return nil unless hash
|
|
38
|
+
|
|
39
|
+
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
|
40
|
+
@error_message = hash.key?('errorMessage') ? hash['errorMessage'] : SKIP
|
|
41
|
+
@target = hash.key?('target') ? hash['target'] : SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Provides a human-readable string representation of the object.
|
|
45
|
+
def to_s
|
|
46
|
+
class_name = self.class.name.split('::').last
|
|
47
|
+
"<#{class_name} error_code: #{@error_code}, error_message: #{@error_message}, target:"\
|
|
48
|
+
" #{@target}>"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
52
|
+
def inspect
|
|
53
|
+
class_name = self.class.name.split('::').last
|
|
54
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_message:"\
|
|
55
|
+
" #{@error_message.inspect}, target: #{@target.inspect}>"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
7
|
+
# Settlementerrors Pendingsettlementbatches Search 0 Error class.
|
|
8
|
+
class SettlementerrorsPendingsettlementbatchesSearch0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Code of error
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :error_code
|
|
15
|
+
|
|
16
|
+
# Error Message
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :error_message
|
|
19
|
+
|
|
20
|
+
# Error Target
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :target
|
|
23
|
+
|
|
24
|
+
# The constructor.
|
|
25
|
+
# @param [String] reason The reason for raising an exception.
|
|
26
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
27
|
+
def initialize(reason, response)
|
|
28
|
+
super(reason, response)
|
|
29
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
30
|
+
unbox(hash)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Populates this object by extracting properties from a hash.
|
|
34
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
35
|
+
# response body.
|
|
36
|
+
def unbox(hash)
|
|
37
|
+
return nil unless hash
|
|
38
|
+
|
|
39
|
+
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
|
40
|
+
@error_message = hash.key?('errorMessage') ? hash['errorMessage'] : SKIP
|
|
41
|
+
@target = hash.key?('target') ? hash['target'] : SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Provides a human-readable string representation of the object.
|
|
45
|
+
def to_s
|
|
46
|
+
class_name = self.class.name.split('::').last
|
|
47
|
+
"<#{class_name} error_code: #{@error_code}, error_message: #{@error_message}, target:"\
|
|
48
|
+
" #{@target}>"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
52
|
+
def inspect
|
|
53
|
+
class_name = self.class.name.split('::').last
|
|
54
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_message:"\
|
|
55
|
+
" #{@error_message.inspect}, target: #{@target.inspect}>"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
7
|
+
# Settlementerrors Settlementfileerrors Search 0 Error class.
|
|
8
|
+
class SettlementerrorsSettlementfileerrorsSearch0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Code of error
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :error_code
|
|
15
|
+
|
|
16
|
+
# Error Message
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :error_message
|
|
19
|
+
|
|
20
|
+
# Error Target
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :target
|
|
23
|
+
|
|
24
|
+
# The constructor.
|
|
25
|
+
# @param [String] reason The reason for raising an exception.
|
|
26
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
27
|
+
def initialize(reason, response)
|
|
28
|
+
super(reason, response)
|
|
29
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
30
|
+
unbox(hash)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Populates this object by extracting properties from a hash.
|
|
34
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
35
|
+
# response body.
|
|
36
|
+
def unbox(hash)
|
|
37
|
+
return nil unless hash
|
|
38
|
+
|
|
39
|
+
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
|
40
|
+
@error_message = hash.key?('errorMessage') ? hash['errorMessage'] : SKIP
|
|
41
|
+
@target = hash.key?('target') ? hash['target'] : SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Provides a human-readable string representation of the object.
|
|
45
|
+
def to_s
|
|
46
|
+
class_name = self.class.name.split('::').last
|
|
47
|
+
"<#{class_name} error_code: #{@error_code}, error_message: #{@error_message}, target:"\
|
|
48
|
+
" #{@target}>"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
52
|
+
def inspect
|
|
53
|
+
class_name = self.class.name.split('::').last
|
|
54
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_message:"\
|
|
55
|
+
" #{@error_message.inspect}, target: #{@target.inspect}>"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
7
|
+
# Settlements Daily Totals Search 0 Error class.
|
|
8
|
+
class SettlementsDailyTotalsSearch0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Code of error
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :error_code
|
|
15
|
+
|
|
16
|
+
# Error Message
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :error_message
|
|
19
|
+
|
|
20
|
+
# Error Target
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :target
|
|
23
|
+
|
|
24
|
+
# The constructor.
|
|
25
|
+
# @param [String] reason The reason for raising an exception.
|
|
26
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
27
|
+
def initialize(reason, response)
|
|
28
|
+
super(reason, response)
|
|
29
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
30
|
+
unbox(hash)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Populates this object by extracting properties from a hash.
|
|
34
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
35
|
+
# response body.
|
|
36
|
+
def unbox(hash)
|
|
37
|
+
return nil unless hash
|
|
38
|
+
|
|
39
|
+
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
|
40
|
+
@error_message = hash.key?('errorMessage') ? hash['errorMessage'] : SKIP
|
|
41
|
+
@target = hash.key?('target') ? hash['target'] : SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Provides a human-readable string representation of the object.
|
|
45
|
+
def to_s
|
|
46
|
+
class_name = self.class.name.split('::').last
|
|
47
|
+
"<#{class_name} error_code: #{@error_code}, error_message: #{@error_message}, target:"\
|
|
48
|
+
" #{@target}>"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
52
|
+
def inspect
|
|
53
|
+
class_name = self.class.name.split('::').last
|
|
54
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_message:"\
|
|
55
|
+
" #{@error_message.inspect}, target: #{@target.inspect}>"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
7
|
+
# Settlements Search 0 Error class.
|
|
8
|
+
class SettlementsSearch0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Code of error
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :error_code
|
|
15
|
+
|
|
16
|
+
# Error Message
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :error_message
|
|
19
|
+
|
|
20
|
+
# Error Target
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :target
|
|
23
|
+
|
|
24
|
+
# The constructor.
|
|
25
|
+
# @param [String] reason The reason for raising an exception.
|
|
26
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
27
|
+
def initialize(reason, response)
|
|
28
|
+
super(reason, response)
|
|
29
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
30
|
+
unbox(hash)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Populates this object by extracting properties from a hash.
|
|
34
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
35
|
+
# response body.
|
|
36
|
+
def unbox(hash)
|
|
37
|
+
return nil unless hash
|
|
38
|
+
|
|
39
|
+
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
|
40
|
+
@error_message = hash.key?('errorMessage') ? hash['errorMessage'] : SKIP
|
|
41
|
+
@target = hash.key?('target') ? hash['target'] : SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Provides a human-readable string representation of the object.
|
|
45
|
+
def to_s
|
|
46
|
+
class_name = self.class.name.split('::').last
|
|
47
|
+
"<#{class_name} error_code: #{@error_code}, error_message: #{@error_message}, target:"\
|
|
48
|
+
" #{@target}>"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
52
|
+
def inspect
|
|
53
|
+
class_name = self.class.name.split('::').last
|
|
54
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_message:"\
|
|
55
|
+
" #{@error_message.inspect}, target: #{@target.inspect}>"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
data/lib/reporting_settlement_research_api/exceptions/transaction_statuses0_error_exception.rb
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
7
|
+
# Transaction Statuses 0 Error class.
|
|
8
|
+
class TransactionStatuses0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Code of error
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :error_code
|
|
15
|
+
|
|
16
|
+
# Error Message
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :error_message
|
|
19
|
+
|
|
20
|
+
# Error Target
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :target
|
|
23
|
+
|
|
24
|
+
# The constructor.
|
|
25
|
+
# @param [String] reason The reason for raising an exception.
|
|
26
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
27
|
+
def initialize(reason, response)
|
|
28
|
+
super(reason, response)
|
|
29
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
30
|
+
unbox(hash)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Populates this object by extracting properties from a hash.
|
|
34
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
35
|
+
# response body.
|
|
36
|
+
def unbox(hash)
|
|
37
|
+
return nil unless hash
|
|
38
|
+
|
|
39
|
+
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
|
40
|
+
@error_message = hash.key?('errorMessage') ? hash['errorMessage'] : SKIP
|
|
41
|
+
@target = hash.key?('target') ? hash['target'] : SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Provides a human-readable string representation of the object.
|
|
45
|
+
def to_s
|
|
46
|
+
class_name = self.class.name.split('::').last
|
|
47
|
+
"<#{class_name} error_code: #{@error_code}, error_message: #{@error_message}, target:"\
|
|
48
|
+
" #{@target}>"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
52
|
+
def inspect
|
|
53
|
+
class_name = self.class.name.split('::').last
|
|
54
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_message:"\
|
|
55
|
+
" #{@error_message.inspect}, target: #{@target.inspect}>"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
7
|
+
# Transaction Types 0 Error class.
|
|
8
|
+
class TransactionTypes0ErrorException < APIException
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Code of error
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :error_code
|
|
15
|
+
|
|
16
|
+
# Error Message
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :error_message
|
|
19
|
+
|
|
20
|
+
# Error Target
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :target
|
|
23
|
+
|
|
24
|
+
# The constructor.
|
|
25
|
+
# @param [String] reason The reason for raising an exception.
|
|
26
|
+
# @param [HttpResponse] response The HttpReponse of the API call.
|
|
27
|
+
def initialize(reason, response)
|
|
28
|
+
super(reason, response)
|
|
29
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
|
30
|
+
unbox(hash)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Populates this object by extracting properties from a hash.
|
|
34
|
+
# @param [Hash] hash The deserialized response sent by the server in the
|
|
35
|
+
# response body.
|
|
36
|
+
def unbox(hash)
|
|
37
|
+
return nil unless hash
|
|
38
|
+
|
|
39
|
+
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
|
40
|
+
@error_message = hash.key?('errorMessage') ? hash['errorMessage'] : SKIP
|
|
41
|
+
@target = hash.key?('target') ? hash['target'] : SKIP
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Provides a human-readable string representation of the object.
|
|
45
|
+
def to_s
|
|
46
|
+
class_name = self.class.name.split('::').last
|
|
47
|
+
"<#{class_name} error_code: #{@error_code}, error_message: #{@error_message}, target:"\
|
|
48
|
+
" #{@target}>"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
52
|
+
def inspect
|
|
53
|
+
class_name = self.class.name.split('::').last
|
|
54
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_message:"\
|
|
55
|
+
" #{@error_message.inspect}, target: #{@target.inspect}>"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# reporting_settlement_research_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated
|
|
4
|
+
# by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ReportingSettlementResearchApi
|
|
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
|