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,215 @@
|
|
|
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
|
+
# InterchangeDetails Model.
|
|
8
|
+
class InterchangeDetails < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [CardProductResults]
|
|
14
|
+
attr_accessor :card_product_results
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [CardProductType]
|
|
18
|
+
attr_accessor :card_product_type
|
|
19
|
+
|
|
20
|
+
# The number of days late.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :days_late
|
|
23
|
+
|
|
24
|
+
# The amount of the discount applied.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :discount_amount
|
|
27
|
+
|
|
28
|
+
# The amount of the discount applied.
|
|
29
|
+
# @return [InterchangeCode]
|
|
30
|
+
attr_accessor :interchange_code
|
|
31
|
+
|
|
32
|
+
# Fees between banks for processing credit and debit transactions
|
|
33
|
+
# interchangeably.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :interchange_fee
|
|
36
|
+
|
|
37
|
+
# Indicator of organization interchange.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :original_interchange_indicator
|
|
40
|
+
|
|
41
|
+
# The additional fee added to the original cost or payment.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :surcharge_amount
|
|
44
|
+
|
|
45
|
+
# The additional fee added to the original cost or payment.
|
|
46
|
+
# @return [SurchargeReason]
|
|
47
|
+
attr_accessor :surcharge_reason
|
|
48
|
+
|
|
49
|
+
# The additional fee imposed by a merchant for using a particular payment
|
|
50
|
+
# method or service.
|
|
51
|
+
# @return [String]
|
|
52
|
+
attr_accessor :merchant_surcharge_amount
|
|
53
|
+
|
|
54
|
+
# The charge for the convenience of using a service or making a transaction,
|
|
55
|
+
# typically online.
|
|
56
|
+
# @return [String]
|
|
57
|
+
attr_accessor :convenience_fee
|
|
58
|
+
|
|
59
|
+
# The charge for the convenience of using a service or making a transaction,
|
|
60
|
+
# typically online.
|
|
61
|
+
# @return [BillingIndicator]
|
|
62
|
+
attr_accessor :billing_indicator
|
|
63
|
+
|
|
64
|
+
# A mapping from model property names to API property names.
|
|
65
|
+
def self.names
|
|
66
|
+
@_hash = {} if @_hash.nil?
|
|
67
|
+
@_hash['card_product_results'] = 'cardProductResults'
|
|
68
|
+
@_hash['card_product_type'] = 'cardProductType'
|
|
69
|
+
@_hash['days_late'] = 'daysLate'
|
|
70
|
+
@_hash['discount_amount'] = 'discountAmount'
|
|
71
|
+
@_hash['interchange_code'] = 'interchangeCode'
|
|
72
|
+
@_hash['interchange_fee'] = 'interchangeFee'
|
|
73
|
+
@_hash['original_interchange_indicator'] =
|
|
74
|
+
'originalInterchangeIndicator'
|
|
75
|
+
@_hash['surcharge_amount'] = 'surchargeAmount'
|
|
76
|
+
@_hash['surcharge_reason'] = 'surchargeReason'
|
|
77
|
+
@_hash['merchant_surcharge_amount'] = 'merchantSurchargeAmount'
|
|
78
|
+
@_hash['convenience_fee'] = 'convenienceFee'
|
|
79
|
+
@_hash['billing_indicator'] = 'billingIndicator'
|
|
80
|
+
@_hash
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# An array for optional fields
|
|
84
|
+
def self.optionals
|
|
85
|
+
%w[
|
|
86
|
+
card_product_results
|
|
87
|
+
card_product_type
|
|
88
|
+
days_late
|
|
89
|
+
discount_amount
|
|
90
|
+
interchange_code
|
|
91
|
+
interchange_fee
|
|
92
|
+
original_interchange_indicator
|
|
93
|
+
surcharge_amount
|
|
94
|
+
surcharge_reason
|
|
95
|
+
merchant_surcharge_amount
|
|
96
|
+
convenience_fee
|
|
97
|
+
billing_indicator
|
|
98
|
+
]
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# An array for nullable fields
|
|
102
|
+
def self.nullables
|
|
103
|
+
[]
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def initialize(card_product_results: SKIP, card_product_type: SKIP,
|
|
107
|
+
days_late: SKIP, discount_amount: SKIP,
|
|
108
|
+
interchange_code: SKIP, interchange_fee: SKIP,
|
|
109
|
+
original_interchange_indicator: SKIP, surcharge_amount: SKIP,
|
|
110
|
+
surcharge_reason: SKIP, merchant_surcharge_amount: SKIP,
|
|
111
|
+
convenience_fee: SKIP, billing_indicator: SKIP,
|
|
112
|
+
additional_properties: nil)
|
|
113
|
+
# Add additional model properties to the instance
|
|
114
|
+
additional_properties = {} if additional_properties.nil?
|
|
115
|
+
|
|
116
|
+
@card_product_results = card_product_results unless card_product_results == SKIP
|
|
117
|
+
@card_product_type = card_product_type unless card_product_type == SKIP
|
|
118
|
+
@days_late = days_late unless days_late == SKIP
|
|
119
|
+
@discount_amount = discount_amount unless discount_amount == SKIP
|
|
120
|
+
@interchange_code = interchange_code unless interchange_code == SKIP
|
|
121
|
+
@interchange_fee = interchange_fee unless interchange_fee == SKIP
|
|
122
|
+
unless original_interchange_indicator == SKIP
|
|
123
|
+
@original_interchange_indicator =
|
|
124
|
+
original_interchange_indicator
|
|
125
|
+
end
|
|
126
|
+
@surcharge_amount = surcharge_amount unless surcharge_amount == SKIP
|
|
127
|
+
@surcharge_reason = surcharge_reason unless surcharge_reason == SKIP
|
|
128
|
+
unless merchant_surcharge_amount == SKIP
|
|
129
|
+
@merchant_surcharge_amount =
|
|
130
|
+
merchant_surcharge_amount
|
|
131
|
+
end
|
|
132
|
+
@convenience_fee = convenience_fee unless convenience_fee == SKIP
|
|
133
|
+
@billing_indicator = billing_indicator unless billing_indicator == SKIP
|
|
134
|
+
@additional_properties = additional_properties
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Creates an instance of the object from a hash.
|
|
138
|
+
def self.from_hash(hash)
|
|
139
|
+
return nil unless hash
|
|
140
|
+
|
|
141
|
+
# Extract variables from the hash.
|
|
142
|
+
card_product_results = CardProductResults.from_hash(hash['cardProductResults']) if
|
|
143
|
+
hash['cardProductResults']
|
|
144
|
+
card_product_type = CardProductType.from_hash(hash['cardProductType']) if
|
|
145
|
+
hash['cardProductType']
|
|
146
|
+
days_late = hash.key?('daysLate') ? hash['daysLate'] : SKIP
|
|
147
|
+
discount_amount =
|
|
148
|
+
hash.key?('discountAmount') ? hash['discountAmount'] : SKIP
|
|
149
|
+
interchange_code = InterchangeCode.from_hash(hash['interchangeCode']) if
|
|
150
|
+
hash['interchangeCode']
|
|
151
|
+
interchange_fee =
|
|
152
|
+
hash.key?('interchangeFee') ? hash['interchangeFee'] : SKIP
|
|
153
|
+
original_interchange_indicator =
|
|
154
|
+
hash.key?('originalInterchangeIndicator') ? hash['originalInterchangeIndicator'] : SKIP
|
|
155
|
+
surcharge_amount =
|
|
156
|
+
hash.key?('surchargeAmount') ? hash['surchargeAmount'] : SKIP
|
|
157
|
+
surcharge_reason = SurchargeReason.from_hash(hash['surchargeReason']) if
|
|
158
|
+
hash['surchargeReason']
|
|
159
|
+
merchant_surcharge_amount =
|
|
160
|
+
hash.key?('merchantSurchargeAmount') ? hash['merchantSurchargeAmount'] : SKIP
|
|
161
|
+
convenience_fee =
|
|
162
|
+
hash.key?('convenienceFee') ? hash['convenienceFee'] : SKIP
|
|
163
|
+
billing_indicator = BillingIndicator.from_hash(hash['billingIndicator']) if
|
|
164
|
+
hash['billingIndicator']
|
|
165
|
+
|
|
166
|
+
# Create a new hash for additional properties, removing known properties.
|
|
167
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
168
|
+
|
|
169
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
170
|
+
new_hash, proc { |value| value }
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
# Create object from extracted values.
|
|
174
|
+
InterchangeDetails.new(card_product_results: card_product_results,
|
|
175
|
+
card_product_type: card_product_type,
|
|
176
|
+
days_late: days_late,
|
|
177
|
+
discount_amount: discount_amount,
|
|
178
|
+
interchange_code: interchange_code,
|
|
179
|
+
interchange_fee: interchange_fee,
|
|
180
|
+
original_interchange_indicator: original_interchange_indicator,
|
|
181
|
+
surcharge_amount: surcharge_amount,
|
|
182
|
+
surcharge_reason: surcharge_reason,
|
|
183
|
+
merchant_surcharge_amount: merchant_surcharge_amount,
|
|
184
|
+
convenience_fee: convenience_fee,
|
|
185
|
+
billing_indicator: billing_indicator,
|
|
186
|
+
additional_properties: additional_properties)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Provides a human-readable string representation of the object.
|
|
190
|
+
def to_s
|
|
191
|
+
class_name = self.class.name.split('::').last
|
|
192
|
+
"<#{class_name} card_product_results: #{@card_product_results}, card_product_type:"\
|
|
193
|
+
" #{@card_product_type}, days_late: #{@days_late}, discount_amount: #{@discount_amount},"\
|
|
194
|
+
" interchange_code: #{@interchange_code}, interchange_fee: #{@interchange_fee},"\
|
|
195
|
+
" original_interchange_indicator: #{@original_interchange_indicator}, surcharge_amount:"\
|
|
196
|
+
" #{@surcharge_amount}, surcharge_reason: #{@surcharge_reason}, merchant_surcharge_amount:"\
|
|
197
|
+
" #{@merchant_surcharge_amount}, convenience_fee: #{@convenience_fee}, billing_indicator:"\
|
|
198
|
+
" #{@billing_indicator}, additional_properties: #{@additional_properties}>"
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
202
|
+
def inspect
|
|
203
|
+
class_name = self.class.name.split('::').last
|
|
204
|
+
"<#{class_name} card_product_results: #{@card_product_results.inspect}, card_product_type:"\
|
|
205
|
+
" #{@card_product_type.inspect}, days_late: #{@days_late.inspect}, discount_amount:"\
|
|
206
|
+
" #{@discount_amount.inspect}, interchange_code: #{@interchange_code.inspect},"\
|
|
207
|
+
" interchange_fee: #{@interchange_fee.inspect}, original_interchange_indicator:"\
|
|
208
|
+
" #{@original_interchange_indicator.inspect}, surcharge_amount:"\
|
|
209
|
+
" #{@surcharge_amount.inspect}, surcharge_reason: #{@surcharge_reason.inspect},"\
|
|
210
|
+
" merchant_surcharge_amount: #{@merchant_surcharge_amount.inspect}, convenience_fee:"\
|
|
211
|
+
" #{@convenience_fee.inspect}, billing_indicator: #{@billing_indicator.inspect},"\
|
|
212
|
+
" additional_properties: #{@additional_properties}>"
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
# InterchangeDetails1 Model.
|
|
8
|
+
class InterchangeDetails1 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Mechanism to resolve disputes or conflicts in settlements.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :tie_breaker
|
|
15
|
+
|
|
16
|
+
# Fees between banks for processing credit and debit transactions
|
|
17
|
+
# interchangeably.
|
|
18
|
+
# @return [Float]
|
|
19
|
+
attr_accessor :interchange_fees
|
|
20
|
+
|
|
21
|
+
# An additional fee added to the original cost or payment.
|
|
22
|
+
# @return [Float]
|
|
23
|
+
attr_accessor :surcharge_amount
|
|
24
|
+
|
|
25
|
+
# An additional fee imposed by a merchant for using a particular payment
|
|
26
|
+
# method or service.
|
|
27
|
+
# @return [Float]
|
|
28
|
+
attr_accessor :merchant_surcharge_amount
|
|
29
|
+
|
|
30
|
+
# A mapping from model property names to API property names.
|
|
31
|
+
def self.names
|
|
32
|
+
@_hash = {} if @_hash.nil?
|
|
33
|
+
@_hash['tie_breaker'] = 'tieBreaker'
|
|
34
|
+
@_hash['interchange_fees'] = 'interchangeFees'
|
|
35
|
+
@_hash['surcharge_amount'] = 'surchargeAmount'
|
|
36
|
+
@_hash['merchant_surcharge_amount'] = 'merchantSurchargeAmount'
|
|
37
|
+
@_hash
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# An array for optional fields
|
|
41
|
+
def self.optionals
|
|
42
|
+
%w[
|
|
43
|
+
tie_breaker
|
|
44
|
+
interchange_fees
|
|
45
|
+
surcharge_amount
|
|
46
|
+
merchant_surcharge_amount
|
|
47
|
+
]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# An array for nullable fields
|
|
51
|
+
def self.nullables
|
|
52
|
+
[]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def initialize(tie_breaker: SKIP, interchange_fees: SKIP,
|
|
56
|
+
surcharge_amount: SKIP, merchant_surcharge_amount: SKIP,
|
|
57
|
+
additional_properties: nil)
|
|
58
|
+
# Add additional model properties to the instance
|
|
59
|
+
additional_properties = {} if additional_properties.nil?
|
|
60
|
+
|
|
61
|
+
@tie_breaker = tie_breaker unless tie_breaker == SKIP
|
|
62
|
+
@interchange_fees = interchange_fees unless interchange_fees == SKIP
|
|
63
|
+
@surcharge_amount = surcharge_amount unless surcharge_amount == SKIP
|
|
64
|
+
unless merchant_surcharge_amount == SKIP
|
|
65
|
+
@merchant_surcharge_amount =
|
|
66
|
+
merchant_surcharge_amount
|
|
67
|
+
end
|
|
68
|
+
@additional_properties = additional_properties
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Creates an instance of the object from a hash.
|
|
72
|
+
def self.from_hash(hash)
|
|
73
|
+
return nil unless hash
|
|
74
|
+
|
|
75
|
+
# Extract variables from the hash.
|
|
76
|
+
tie_breaker = hash.key?('tieBreaker') ? hash['tieBreaker'] : SKIP
|
|
77
|
+
interchange_fees =
|
|
78
|
+
hash.key?('interchangeFees') ? hash['interchangeFees'] : SKIP
|
|
79
|
+
surcharge_amount =
|
|
80
|
+
hash.key?('surchargeAmount') ? hash['surchargeAmount'] : SKIP
|
|
81
|
+
merchant_surcharge_amount =
|
|
82
|
+
hash.key?('merchantSurchargeAmount') ? hash['merchantSurchargeAmount'] : SKIP
|
|
83
|
+
|
|
84
|
+
# Create a new hash for additional properties, removing known properties.
|
|
85
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
86
|
+
|
|
87
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
88
|
+
new_hash, proc { |value| value }
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
# Create object from extracted values.
|
|
92
|
+
InterchangeDetails1.new(tie_breaker: tie_breaker,
|
|
93
|
+
interchange_fees: interchange_fees,
|
|
94
|
+
surcharge_amount: surcharge_amount,
|
|
95
|
+
merchant_surcharge_amount: merchant_surcharge_amount,
|
|
96
|
+
additional_properties: additional_properties)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Provides a human-readable string representation of the object.
|
|
100
|
+
def to_s
|
|
101
|
+
class_name = self.class.name.split('::').last
|
|
102
|
+
"<#{class_name} tie_breaker: #{@tie_breaker}, interchange_fees: #{@interchange_fees},"\
|
|
103
|
+
" surcharge_amount: #{@surcharge_amount}, merchant_surcharge_amount:"\
|
|
104
|
+
" #{@merchant_surcharge_amount}, additional_properties: #{@additional_properties}>"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
108
|
+
def inspect
|
|
109
|
+
class_name = self.class.name.split('::').last
|
|
110
|
+
"<#{class_name} tie_breaker: #{@tie_breaker.inspect}, interchange_fees:"\
|
|
111
|
+
" #{@interchange_fees.inspect}, surcharge_amount: #{@surcharge_amount.inspect},"\
|
|
112
|
+
" merchant_surcharge_amount: #{@merchant_surcharge_amount.inspect}, additional_properties:"\
|
|
113
|
+
" #{@additional_properties}>"
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
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
|
+
# InternationalIndicator Model.
|
|
8
|
+
class InternationalIndicator < 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
|
+
InternationalIndicator.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,45 @@
|
|
|
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
|
+
# The support levels such as Chain, Division, Store, and Merchant with a
|
|
8
|
+
# maximum limit of 2000 values.
|
|
9
|
+
class Level
|
|
10
|
+
LEVEL = [
|
|
11
|
+
# TODO: Write general description for MERCHANT
|
|
12
|
+
MERCHANT = 'MERCHANT'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for STORE
|
|
15
|
+
STORE = 'STORE'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for DIVISION
|
|
18
|
+
DIVISION = 'DIVISION'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for CHAIN
|
|
21
|
+
CHAIN = 'CHAIN'.freeze
|
|
22
|
+
].freeze
|
|
23
|
+
|
|
24
|
+
def self.validate(value)
|
|
25
|
+
return false if value.nil?
|
|
26
|
+
|
|
27
|
+
true
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.from_value(value, default_value = MERCHANT)
|
|
31
|
+
return default_value if value.nil?
|
|
32
|
+
|
|
33
|
+
str = value.to_s.strip
|
|
34
|
+
|
|
35
|
+
case str.downcase
|
|
36
|
+
when 'merchant' then MERCHANT
|
|
37
|
+
when 'store' then STORE
|
|
38
|
+
when 'division' then DIVISION
|
|
39
|
+
when 'chain' then CHAIN
|
|
40
|
+
else
|
|
41
|
+
default_value
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
# The support levels such as Super_Chain with a maximum limit of 7 values,
|
|
8
|
+
# Chain, Division, Store, and Merchant with a maximum limit of 2000 values.
|
|
9
|
+
class Level1
|
|
10
|
+
LEVEL1 = [
|
|
11
|
+
# TODO: Write general description for MERCHANT
|
|
12
|
+
MERCHANT = 'MERCHANT'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for STORE
|
|
15
|
+
STORE = 'STORE'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for DIVISION
|
|
18
|
+
DIVISION = 'DIVISION'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for CHAIN
|
|
21
|
+
CHAIN = 'CHAIN'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for SUPER_CHAIN
|
|
24
|
+
SUPER_CHAIN = 'SUPER_CHAIN'.freeze
|
|
25
|
+
].freeze
|
|
26
|
+
|
|
27
|
+
def self.validate(value)
|
|
28
|
+
return false if value.nil?
|
|
29
|
+
|
|
30
|
+
true
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.from_value(value, default_value = MERCHANT)
|
|
34
|
+
return default_value if value.nil?
|
|
35
|
+
|
|
36
|
+
str = value.to_s.strip
|
|
37
|
+
|
|
38
|
+
case str.downcase
|
|
39
|
+
when 'merchant' then MERCHANT
|
|
40
|
+
when 'store' then STORE
|
|
41
|
+
when 'division' then DIVISION
|
|
42
|
+
when 'chain' then CHAIN
|
|
43
|
+
when 'super_chain' then SUPER_CHAIN
|
|
44
|
+
else
|
|
45
|
+
default_value
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
# Support levels such as Chain and Merchant with a maximum limit of 2,000
|
|
8
|
+
# values.
|
|
9
|
+
class Level2
|
|
10
|
+
LEVEL2 = [
|
|
11
|
+
# TODO: Write general description for MERCHANT
|
|
12
|
+
MERCHANT = 'MERCHANT'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for CHAIN
|
|
15
|
+
CHAIN = 'CHAIN'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
true
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = MERCHANT)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'merchant' then MERCHANT
|
|
31
|
+
when 'chain' then CHAIN
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
# The support levels such as SalesOrganization and Sales Channel with a
|
|
8
|
+
# maximum limit of 1 value, National, SuperChain, and Partner with a maximum
|
|
9
|
+
# limit of 10 values, and Chain, Division, Store, and Merchant with a maximum
|
|
10
|
+
# limit of 2,000 values.
|
|
11
|
+
class Level3
|
|
12
|
+
LEVEL3 = [
|
|
13
|
+
# TODO: Write general description for MERCHANT
|
|
14
|
+
MERCHANT = 'MERCHANT'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for STORE
|
|
17
|
+
STORE = 'STORE'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for DIVISION
|
|
20
|
+
DIVISION = 'DIVISION'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for CHAIN
|
|
23
|
+
CHAIN = 'CHAIN'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for PARTNER
|
|
26
|
+
PARTNER = 'PARTNER'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for SUPER_CHAIN
|
|
29
|
+
SUPER_CHAIN = 'SUPER_CHAIN'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for NATIONAL
|
|
32
|
+
NATIONAL = 'NATIONAL'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for INDEPENDENT_SALES_CHANNEL
|
|
35
|
+
INDEPENDENT_SALES_CHANNEL = 'INDEPENDENT_SALES_CHANNEL'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for INDEPENDENT_SALES_ORGANIZATION
|
|
38
|
+
INDEPENDENT_SALES_ORGANIZATION = 'INDEPENDENT_SALES_ORGANIZATION'.freeze
|
|
39
|
+
].freeze
|
|
40
|
+
|
|
41
|
+
def self.validate(value)
|
|
42
|
+
return false if value.nil?
|
|
43
|
+
|
|
44
|
+
true
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def self.from_value(value, default_value = MERCHANT)
|
|
48
|
+
return default_value if value.nil?
|
|
49
|
+
|
|
50
|
+
str = value.to_s.strip
|
|
51
|
+
|
|
52
|
+
case str.downcase
|
|
53
|
+
when 'merchant' then MERCHANT
|
|
54
|
+
when 'store' then STORE
|
|
55
|
+
when 'division' then DIVISION
|
|
56
|
+
when 'chain' then CHAIN
|
|
57
|
+
when 'partner' then PARTNER
|
|
58
|
+
when 'super_chain' then SUPER_CHAIN
|
|
59
|
+
when 'national' then NATIONAL
|
|
60
|
+
when 'independent_sales_channel' then INDEPENDENT_SALES_CHANNEL
|
|
61
|
+
when 'independent_sales_organization' then INDEPENDENT_SALES_ORGANIZATION
|
|
62
|
+
else
|
|
63
|
+
default_value
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|