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,52 @@
|
|
|
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
|
+
# Utility class for custom header authorization.
|
|
8
|
+
class CustomHeaderAuthentication < CoreLibrary::HeaderAuth
|
|
9
|
+
# Display error message on occurrence of authentication failure.
|
|
10
|
+
# @returns [String] The oAuth error message.
|
|
11
|
+
def error_message
|
|
12
|
+
'CustomHeaderAuthentication: authorization is undefined.'
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Initialization constructor.
|
|
16
|
+
def initialize(custom_header_authentication_credentials)
|
|
17
|
+
auth_params = {}
|
|
18
|
+
auth_params['Authorization'] = custom_header_authentication_credentials.authorization unless
|
|
19
|
+
custom_header_authentication_credentials.nil? || custom_header_authentication_credentials.authorization.nil?
|
|
20
|
+
|
|
21
|
+
super auth_params
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Data class for CustomHeaderAuthenticationCredentials.
|
|
26
|
+
# Data class for CustomHeaderAuthenticationCredentials.
|
|
27
|
+
class CustomHeaderAuthenticationCredentials
|
|
28
|
+
attr_reader :authorization
|
|
29
|
+
|
|
30
|
+
def initialize(authorization:)
|
|
31
|
+
raise ArgumentError, 'authorization cannot be nil' if authorization.nil?
|
|
32
|
+
|
|
33
|
+
@authorization = authorization
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.from_env
|
|
37
|
+
authorization = ENV['AUTHORIZATION']
|
|
38
|
+
all_nil = [
|
|
39
|
+
authorization
|
|
40
|
+
].all?(&:nil?)
|
|
41
|
+
return nil if all_nil
|
|
42
|
+
|
|
43
|
+
new(authorization: authorization)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def clone_with(authorization: nil)
|
|
47
|
+
authorization ||= self.authorization
|
|
48
|
+
|
|
49
|
+
CustomHeaderAuthenticationCredentials.new(authorization: authorization)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
# HttpCallBack allows defining callables for pre and post API calls.
|
|
8
|
+
class HttpCallBack < CoreLibrary::HttpCallback
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
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 Methods Enumeration.
|
|
8
|
+
class HttpMethodEnum < CoreLibrary::HttpMethod
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
# Represents a single Http Request.
|
|
8
|
+
class HttpRequest < CoreLibrary::HttpRequest
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
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 HttpResponse < CoreLibrary::HttpResponse
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
##
|
|
8
|
+
# ProxySettings encapsulates HTTP proxy configuration for Faraday,
|
|
9
|
+
# including optional basic authentication.
|
|
10
|
+
#
|
|
11
|
+
class ProxySettings < CoreLibrary::ProxySettings
|
|
12
|
+
def self.from_env
|
|
13
|
+
address = ENV['PROXY_ADDRESS']
|
|
14
|
+
port = ENV['PROXY_PORT']
|
|
15
|
+
username = ENV['PROXY_USERNAME']
|
|
16
|
+
password = ENV['PROXY_PASSWORD']
|
|
17
|
+
return nil if address.nil? || address.strip.empty?
|
|
18
|
+
|
|
19
|
+
new(address: address, port: port, username: username, password: password)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,186 @@
|
|
|
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
|
+
# Initializes a new instance of RequestLoggingConfiguration.
|
|
8
|
+
class RequestLoggingConfiguration < CoreLibrary::ApiRequestLoggingConfiguration
|
|
9
|
+
# @param log_body [Boolean] Indicates whether the message body should be logged. Default is false.
|
|
10
|
+
# @param log_headers [Boolean] Indicates whether the message headers should be logged. Default is false.
|
|
11
|
+
# @param headers_to_exclude [Array<String>] Array of headers not displayed in logging. Default is an empty array.
|
|
12
|
+
# @param headers_to_include [Array<String>] Array of headers to be displayed in logging. Default is an empty array.
|
|
13
|
+
# @param headers_to_unmask [Array<String>] Array of headers which values are non-sensitive to display in logging.
|
|
14
|
+
# Default is an empty array.
|
|
15
|
+
def initialize(log_body: false, log_headers: false, headers_to_include: nil,
|
|
16
|
+
headers_to_exclude: nil, headers_to_unmask: nil,
|
|
17
|
+
include_query_in_path: false)
|
|
18
|
+
super(
|
|
19
|
+
log_body,
|
|
20
|
+
log_headers,
|
|
21
|
+
headers_to_exclude,
|
|
22
|
+
headers_to_include,
|
|
23
|
+
headers_to_unmask,
|
|
24
|
+
include_query_in_path
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil,
|
|
29
|
+
headers_to_exclude: nil, headers_to_unmask: nil, include_query_in_path: nil)
|
|
30
|
+
log_body ||= self.log_body
|
|
31
|
+
log_headers ||= self.log_headers
|
|
32
|
+
headers_to_include ||= self.headers_to_include
|
|
33
|
+
headers_to_exclude ||= self.headers_to_exclude
|
|
34
|
+
headers_to_unmask ||= self.headers_to_unmask
|
|
35
|
+
include_query_in_path ||= self.include_query_in_path
|
|
36
|
+
|
|
37
|
+
RequestLoggingConfiguration.new(
|
|
38
|
+
log_body: log_body,
|
|
39
|
+
log_headers: log_headers,
|
|
40
|
+
headers_to_include: headers_to_include,
|
|
41
|
+
headers_to_exclude: headers_to_exclude,
|
|
42
|
+
headers_to_unmask: headers_to_unmask,
|
|
43
|
+
include_query_in_path: include_query_in_path
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def self.from_env
|
|
48
|
+
log_body = ENV['REQUEST_LOG_BODY']
|
|
49
|
+
log_headers = ENV['REQUEST_LOG_HEADERS']
|
|
50
|
+
headers_to_include = ENV['REQUEST_HEADERS_TO_INCLUDE']
|
|
51
|
+
headers_to_exclude = ENV['REQUEST_HEADERS_TO_EXCLUDE']
|
|
52
|
+
headers_to_unmask = ENV['REQUEST_HEADERS_TO_UNMASK']
|
|
53
|
+
include_query_in_path = ENV['REQUEST_INCLUDE_QUERY_IN_PATH']
|
|
54
|
+
|
|
55
|
+
new(
|
|
56
|
+
log_body: log_body,
|
|
57
|
+
log_headers: log_headers,
|
|
58
|
+
headers_to_include: headers_to_include,
|
|
59
|
+
headers_to_exclude: headers_to_exclude,
|
|
60
|
+
headers_to_unmask: headers_to_unmask,
|
|
61
|
+
include_query_in_path: include_query_in_path
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def self.any_logging_configured?
|
|
66
|
+
%w[
|
|
67
|
+
REQUEST_LOG_BODY
|
|
68
|
+
REQUEST_LOG_HEADERS
|
|
69
|
+
REQUEST_HEADERS_TO_INCLUDE
|
|
70
|
+
REQUEST_HEADERS_TO_EXCLUDE
|
|
71
|
+
REQUEST_HEADERS_TO_UNMASK
|
|
72
|
+
REQUEST_INCLUDE_QUERY_IN_PATH
|
|
73
|
+
].any? { |key| ENV.key?(key) && !ENV[key].nil? && !ENV[key].empty? }
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes a new instance of ResponseLoggingConfiguration.
|
|
78
|
+
class ResponseLoggingConfiguration < CoreLibrary::ApiResponseLoggingConfiguration
|
|
79
|
+
def initialize(log_body: false, log_headers: false, headers_to_include: nil,
|
|
80
|
+
headers_to_exclude: nil, headers_to_unmask: nil)
|
|
81
|
+
super(
|
|
82
|
+
log_body,
|
|
83
|
+
log_headers,
|
|
84
|
+
headers_to_exclude,
|
|
85
|
+
headers_to_include,
|
|
86
|
+
headers_to_unmask
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil,
|
|
91
|
+
headers_to_exclude: nil, headers_to_unmask: nil)
|
|
92
|
+
log_body ||= self.log_body
|
|
93
|
+
log_headers ||= self.log_headers
|
|
94
|
+
headers_to_include ||= self.headers_to_include
|
|
95
|
+
headers_to_exclude ||= self.headers_to_exclude
|
|
96
|
+
headers_to_unmask ||= self.headers_to_unmask
|
|
97
|
+
|
|
98
|
+
ResponseLoggingConfiguration.new(
|
|
99
|
+
log_body: log_body,
|
|
100
|
+
log_headers: log_headers,
|
|
101
|
+
headers_to_include: headers_to_include,
|
|
102
|
+
headers_to_exclude: headers_to_exclude,
|
|
103
|
+
headers_to_unmask: headers_to_unmask
|
|
104
|
+
)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def self.from_env
|
|
108
|
+
log_body = ENV['RESPONSE_LOG_BODY']
|
|
109
|
+
log_headers = ENV['RESPONSE_LOG_HEADERS']
|
|
110
|
+
headers_to_include = ENV['RESPONSE_HEADERS_TO_INCLUDE']
|
|
111
|
+
headers_to_exclude = ENV['RESPONSE_HEADERS_TO_EXCLUDE']
|
|
112
|
+
headers_to_unmask = ENV['RESPONSE_HEADERS_TO_UNMASK']
|
|
113
|
+
|
|
114
|
+
new(
|
|
115
|
+
log_body: log_body,
|
|
116
|
+
log_headers: log_headers,
|
|
117
|
+
headers_to_include: headers_to_include,
|
|
118
|
+
headers_to_exclude: headers_to_exclude,
|
|
119
|
+
headers_to_unmask: headers_to_unmask
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def self.any_logging_configured?
|
|
124
|
+
%w[
|
|
125
|
+
RESPONSE_LOG_BODY
|
|
126
|
+
RESPONSE_LOG_HEADERS
|
|
127
|
+
RESPONSE_HEADERS_TO_INCLUDE
|
|
128
|
+
RESPONSE_HEADERS_TO_EXCLUDE
|
|
129
|
+
RESPONSE_HEADERS_TO_UNMASK
|
|
130
|
+
].any? { |key| ENV.key?(key) && !ENV[key].nil? && !ENV[key].empty? }
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Initializes a new instance of LoggingConfiguration.
|
|
135
|
+
class LoggingConfiguration < CoreLibrary::ApiLoggingConfiguration
|
|
136
|
+
def initialize(logger: nil, log_level: nil, mask_sensitive_headers: true,
|
|
137
|
+
request_logging_config: nil,
|
|
138
|
+
response_logging_config: nil)
|
|
139
|
+
request_logging_config ||= RequestLoggingConfiguration.new
|
|
140
|
+
response_logging_config ||= ResponseLoggingConfiguration.new
|
|
141
|
+
super(
|
|
142
|
+
logger,
|
|
143
|
+
log_level,
|
|
144
|
+
request_logging_config,
|
|
145
|
+
response_logging_config,
|
|
146
|
+
mask_sensitive_headers
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def clone_with(logger: nil, log_level: nil, mask_sensitive_headers: nil,
|
|
151
|
+
request_logging_config: nil, response_logging_config: nil)
|
|
152
|
+
logger ||= self.logger
|
|
153
|
+
log_level ||= self.log_level
|
|
154
|
+
mask_sensitive_headers ||= self.mask_sensitive_headers
|
|
155
|
+
request_logging_config ||= self.request_logging_config.clone
|
|
156
|
+
response_logging_config ||= self.response_logging_config.clone
|
|
157
|
+
|
|
158
|
+
LoggingConfiguration.new(
|
|
159
|
+
logger: logger,
|
|
160
|
+
log_level: log_level,
|
|
161
|
+
mask_sensitive_headers: mask_sensitive_headers,
|
|
162
|
+
request_logging_config: request_logging_config,
|
|
163
|
+
response_logging_config: response_logging_config
|
|
164
|
+
)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def self.from_env
|
|
168
|
+
log_level = ENV['LOG_LEVEL']
|
|
169
|
+
mask_sensitive_headers = ENV['MASK_SENSITIVE_HEADERS']
|
|
170
|
+
|
|
171
|
+
new(
|
|
172
|
+
log_level: log_level,
|
|
173
|
+
mask_sensitive_headers: mask_sensitive_headers,
|
|
174
|
+
request_logging_config: RequestLoggingConfiguration.from_env,
|
|
175
|
+
response_logging_config: ResponseLoggingConfiguration.from_env
|
|
176
|
+
)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def self.any_logging_configured?
|
|
180
|
+
RequestLoggingConfiguration.any_logging_configured? ||
|
|
181
|
+
ResponseLoggingConfiguration.any_logging_configured? ||
|
|
182
|
+
ENV.key?('LOG_LEVEL') ||
|
|
183
|
+
ENV.key?('MASK_SENSITIVE_HEADERS')
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
# Represents the generic logger facade
|
|
8
|
+
class AbstractLogger < Logger
|
|
9
|
+
# Logs a message with a specified log level and additional parameters.
|
|
10
|
+
# @param level [Symbol] The log level of the message.
|
|
11
|
+
# @param message [String] The message to log.
|
|
12
|
+
# @param params [Hash] Additional parameters to include in the log message.
|
|
13
|
+
def log(level, message, params)
|
|
14
|
+
raise NotImplementedError, 'This method needs to be implemented in a child class.'
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
# AccountNameInquiry Model.
|
|
8
|
+
class AccountNameInquiry < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The identifier code.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :code
|
|
15
|
+
|
|
16
|
+
# The short description of the code.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :short_description
|
|
19
|
+
|
|
20
|
+
# The long description of the code.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :long_description
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['code'] = 'code'
|
|
28
|
+
@_hash['short_description'] = 'shortDescription'
|
|
29
|
+
@_hash['long_description'] = 'longDescription'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
code
|
|
37
|
+
short_description
|
|
38
|
+
long_description
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(code: SKIP, short_description: SKIP, long_description: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@code = code unless code == SKIP
|
|
53
|
+
@short_description = short_description unless short_description == SKIP
|
|
54
|
+
@long_description = long_description unless long_description == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
code = hash.key?('code') ? hash['code'] : SKIP
|
|
64
|
+
short_description =
|
|
65
|
+
hash.key?('shortDescription') ? hash['shortDescription'] : SKIP
|
|
66
|
+
long_description =
|
|
67
|
+
hash.key?('longDescription') ? hash['longDescription'] : SKIP
|
|
68
|
+
|
|
69
|
+
# Create a new hash for additional properties, removing known properties.
|
|
70
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
71
|
+
|
|
72
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
73
|
+
new_hash, proc { |value| value }
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Create object from extracted values.
|
|
77
|
+
AccountNameInquiry.new(code: code,
|
|
78
|
+
short_description: short_description,
|
|
79
|
+
long_description: long_description,
|
|
80
|
+
additional_properties: additional_properties)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Provides a human-readable string representation of the object.
|
|
84
|
+
def to_s
|
|
85
|
+
class_name = self.class.name.split('::').last
|
|
86
|
+
"<#{class_name} code: #{@code}, short_description: #{@short_description}, long_description:"\
|
|
87
|
+
" #{@long_description}, additional_properties: #{@additional_properties}>"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
91
|
+
def inspect
|
|
92
|
+
class_name = self.class.name.split('::').last
|
|
93
|
+
"<#{class_name} code: #{@code.inspect}, short_description: #{@short_description.inspect},"\
|
|
94
|
+
" long_description: #{@long_description.inspect}, additional_properties:"\
|
|
95
|
+
" #{@additional_properties}>"
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
# Aci Model.
|
|
8
|
+
class Aci < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The identifier code.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :code
|
|
15
|
+
|
|
16
|
+
# The short description of the code.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :short_description
|
|
19
|
+
|
|
20
|
+
# The long description of the code.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :long_description
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['code'] = 'code'
|
|
28
|
+
@_hash['short_description'] = 'shortDescription'
|
|
29
|
+
@_hash['long_description'] = 'longDescription'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
code
|
|
37
|
+
short_description
|
|
38
|
+
long_description
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(code: SKIP, short_description: SKIP, long_description: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@code = code unless code == SKIP
|
|
53
|
+
@short_description = short_description unless short_description == SKIP
|
|
54
|
+
@long_description = long_description unless long_description == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
code = hash.key?('code') ? hash['code'] : SKIP
|
|
64
|
+
short_description =
|
|
65
|
+
hash.key?('shortDescription') ? hash['shortDescription'] : SKIP
|
|
66
|
+
long_description =
|
|
67
|
+
hash.key?('longDescription') ? hash['longDescription'] : SKIP
|
|
68
|
+
|
|
69
|
+
# Create a new hash for additional properties, removing known properties.
|
|
70
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
71
|
+
|
|
72
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
73
|
+
new_hash, proc { |value| value }
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Create object from extracted values.
|
|
77
|
+
Aci.new(code: code,
|
|
78
|
+
short_description: short_description,
|
|
79
|
+
long_description: long_description,
|
|
80
|
+
additional_properties: additional_properties)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Provides a human-readable string representation of the object.
|
|
84
|
+
def to_s
|
|
85
|
+
class_name = self.class.name.split('::').last
|
|
86
|
+
"<#{class_name} code: #{@code}, short_description: #{@short_description}, long_description:"\
|
|
87
|
+
" #{@long_description}, additional_properties: #{@additional_properties}>"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
91
|
+
def inspect
|
|
92
|
+
class_name = self.class.name.split('::').last
|
|
93
|
+
"<#{class_name} code: #{@code.inspect}, short_description: #{@short_description.inspect},"\
|
|
94
|
+
" long_description: #{@long_description.inspect}, additional_properties:"\
|
|
95
|
+
" #{@additional_properties}>"
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,135 @@
|
|
|
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
|
+
# AdditionalDetails Model.
|
|
8
|
+
class AdditionalDetails < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Refers to any adjustment made in the records.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :has_adjustment_records
|
|
15
|
+
|
|
16
|
+
# Possible values are True or False.
|
|
17
|
+
# @return [TrueClass | FalseClass]
|
|
18
|
+
attr_accessor :force_post
|
|
19
|
+
|
|
20
|
+
# Unique identifier for the airline invoice billing transactions.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :airline_invoice_number
|
|
23
|
+
|
|
24
|
+
# Unique identifier for the airline ticket billing transactions.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :airline_ticket_number
|
|
27
|
+
|
|
28
|
+
# The scheduled day a flight leaves.
|
|
29
|
+
# @return [Date]
|
|
30
|
+
attr_accessor :airline_departure_date
|
|
31
|
+
|
|
32
|
+
# Indicates funds without corresponding transaction records in the accounts.
|
|
33
|
+
# Possible values are true or false.
|
|
34
|
+
# @return [TrueClass | FalseClass]
|
|
35
|
+
attr_accessor :unmatched_credit
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['has_adjustment_records'] = 'hasAdjustmentRecords'
|
|
41
|
+
@_hash['force_post'] = 'forcePost'
|
|
42
|
+
@_hash['airline_invoice_number'] = 'airlineInvoiceNumber'
|
|
43
|
+
@_hash['airline_ticket_number'] = 'airlineTicketNumber'
|
|
44
|
+
@_hash['airline_departure_date'] = 'airlineDepartureDate'
|
|
45
|
+
@_hash['unmatched_credit'] = 'unmatchedCredit'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
has_adjustment_records
|
|
53
|
+
force_post
|
|
54
|
+
airline_invoice_number
|
|
55
|
+
airline_ticket_number
|
|
56
|
+
airline_departure_date
|
|
57
|
+
unmatched_credit
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
[]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(has_adjustment_records: SKIP, force_post: SKIP,
|
|
67
|
+
airline_invoice_number: SKIP, airline_ticket_number: SKIP,
|
|
68
|
+
airline_departure_date: SKIP, unmatched_credit: SKIP,
|
|
69
|
+
additional_properties: nil)
|
|
70
|
+
# Add additional model properties to the instance
|
|
71
|
+
additional_properties = {} if additional_properties.nil?
|
|
72
|
+
|
|
73
|
+
@has_adjustment_records = has_adjustment_records unless has_adjustment_records == SKIP
|
|
74
|
+
@force_post = force_post unless force_post == SKIP
|
|
75
|
+
@airline_invoice_number = airline_invoice_number unless airline_invoice_number == SKIP
|
|
76
|
+
@airline_ticket_number = airline_ticket_number unless airline_ticket_number == SKIP
|
|
77
|
+
@airline_departure_date = airline_departure_date unless airline_departure_date == SKIP
|
|
78
|
+
@unmatched_credit = unmatched_credit unless unmatched_credit == SKIP
|
|
79
|
+
@additional_properties = additional_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Creates an instance of the object from a hash.
|
|
83
|
+
def self.from_hash(hash)
|
|
84
|
+
return nil unless hash
|
|
85
|
+
|
|
86
|
+
# Extract variables from the hash.
|
|
87
|
+
has_adjustment_records =
|
|
88
|
+
hash.key?('hasAdjustmentRecords') ? hash['hasAdjustmentRecords'] : SKIP
|
|
89
|
+
force_post = hash.key?('forcePost') ? hash['forcePost'] : SKIP
|
|
90
|
+
airline_invoice_number =
|
|
91
|
+
hash.key?('airlineInvoiceNumber') ? hash['airlineInvoiceNumber'] : SKIP
|
|
92
|
+
airline_ticket_number =
|
|
93
|
+
hash.key?('airlineTicketNumber') ? hash['airlineTicketNumber'] : SKIP
|
|
94
|
+
airline_departure_date =
|
|
95
|
+
hash.key?('airlineDepartureDate') ? hash['airlineDepartureDate'] : SKIP
|
|
96
|
+
unmatched_credit =
|
|
97
|
+
hash.key?('unmatchedCredit') ? hash['unmatchedCredit'] : SKIP
|
|
98
|
+
|
|
99
|
+
# Create a new hash for additional properties, removing known properties.
|
|
100
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
101
|
+
|
|
102
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
103
|
+
new_hash, proc { |value| value }
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# Create object from extracted values.
|
|
107
|
+
AdditionalDetails.new(has_adjustment_records: has_adjustment_records,
|
|
108
|
+
force_post: force_post,
|
|
109
|
+
airline_invoice_number: airline_invoice_number,
|
|
110
|
+
airline_ticket_number: airline_ticket_number,
|
|
111
|
+
airline_departure_date: airline_departure_date,
|
|
112
|
+
unmatched_credit: unmatched_credit,
|
|
113
|
+
additional_properties: additional_properties)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Provides a human-readable string representation of the object.
|
|
117
|
+
def to_s
|
|
118
|
+
class_name = self.class.name.split('::').last
|
|
119
|
+
"<#{class_name} has_adjustment_records: #{@has_adjustment_records}, force_post:"\
|
|
120
|
+
" #{@force_post}, airline_invoice_number: #{@airline_invoice_number}, airline_ticket_number:"\
|
|
121
|
+
" #{@airline_ticket_number}, airline_departure_date: #{@airline_departure_date},"\
|
|
122
|
+
" unmatched_credit: #{@unmatched_credit}, additional_properties: #{@additional_properties}>"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
126
|
+
def inspect
|
|
127
|
+
class_name = self.class.name.split('::').last
|
|
128
|
+
"<#{class_name} has_adjustment_records: #{@has_adjustment_records.inspect}, force_post:"\
|
|
129
|
+
" #{@force_post.inspect}, airline_invoice_number: #{@airline_invoice_number.inspect},"\
|
|
130
|
+
" airline_ticket_number: #{@airline_ticket_number.inspect}, airline_departure_date:"\
|
|
131
|
+
" #{@airline_departure_date.inspect}, unmatched_credit: #{@unmatched_credit.inspect},"\
|
|
132
|
+
" additional_properties: #{@additional_properties}>"
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|