data-and-reporting-sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +104 -0
- data/lib/shell_data_reporting_ap_is/api_helper.rb +10 -0
- data/lib/shell_data_reporting_ap_is/client.rb +84 -0
- data/lib/shell_data_reporting_ap_is/configuration.rb +110 -0
- data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +66 -0
- data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +478 -0
- data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +470 -0
- data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +42 -0
- data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +878 -0
- data/lib/shell_data_reporting_ap_is/exceptions/api_exception.rb +10 -0
- data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +32 -0
- data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +54 -0
- data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +32 -0
- data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +48 -0
- data/lib/shell_data_reporting_ap_is/http/auth/basic_auth.rb +50 -0
- data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +89 -0
- data/lib/shell_data_reporting_ap_is/http/http_call_back.rb +10 -0
- data/lib/shell_data_reporting_ap_is/http/http_method_enum.rb +10 -0
- data/lib/shell_data_reporting_ap_is/http/http_request.rb +10 -0
- data/lib/shell_data_reporting_ap_is/http/http_response.rb +10 -0
- data/lib/shell_data_reporting_ap_is/models/account_access.rb +128 -0
- data/lib/shell_data_reporting_ap_is/models/account_request.rb +252 -0
- data/lib/shell_data_reporting_ap_is/models/account_response.rb +111 -0
- data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +750 -0
- data/lib/shell_data_reporting_ap_is/models/accounts.rb +65 -0
- data/lib/shell_data_reporting_ap_is/models/address.rb +174 -0
- data/lib/shell_data_reporting_ap_is/models/associated_account.rb +98 -0
- data/lib/shell_data_reporting_ap_is/models/audit_request.rb +256 -0
- data/lib/shell_data_reporting_ap_is/models/audit_response.rb +111 -0
- data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +450 -0
- data/lib/shell_data_reporting_ap_is/models/bank_account.rb +192 -0
- data/lib/shell_data_reporting_ap_is/models/base_model.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +419 -0
- data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +444 -0
- data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +159 -0
- data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +268 -0
- data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +178 -0
- data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +109 -0
- data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +301 -0
- data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +145 -0
- data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +470 -0
- data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +60 -0
- data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +281 -0
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +159 -0
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +88 -0
- data/lib/shell_data_reporting_ap_is/models/current_volume.rb +99 -0
- data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +63 -0
- data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +123 -0
- data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +437 -0
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +200 -0
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +82 -0
- data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +60 -0
- data/lib/shell_data_reporting_ap_is/models/default_error_fault_detail.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +258 -0
- data/lib/shell_data_reporting_ap_is/models/eid_access.rb +75 -0
- data/lib/shell_data_reporting_ap_is/models/eid_document.rb +166 -0
- data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +140 -0
- data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +86 -0
- data/lib/shell_data_reporting_ap_is/models/eid_download_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +160 -0
- data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +70 -0
- data/lib/shell_data_reporting_ap_is/models/error_details.rb +81 -0
- data/lib/shell_data_reporting_ap_is/models/error_status.rb +60 -0
- data/lib/shell_data_reporting_ap_is/models/error_user_access.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +60 -0
- data/lib/shell_data_reporting_ap_is/models/exception_product.rb +65 -0
- data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +63 -0
- data/lib/shell_data_reporting_ap_is/models/fee_item.rb +977 -0
- data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +194 -0
- data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +153 -0
- data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +98 -0
- data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +74 -0
- data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +85 -0
- data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +124 -0
- data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +98 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +73 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +267 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +197 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +146 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +80 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +99 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +99 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_download_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +80 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +913 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +91 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +344 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +127 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_details.rb +129 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +345 -0
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +221 -0
- data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +421 -0
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +107 -0
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +394 -0
- data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +112 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +360 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +84 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +110 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +1724 -0
- data/lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb +45 -0
- data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +100 -0
- data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +502 -0
- data/lib/shell_data_reporting_ap_is/models/payer_access.rb +147 -0
- data/lib/shell_data_reporting_ap_is/models/payer_details.rb +1412 -0
- data/lib/shell_data_reporting_ap_is/models/payer_request.rb +126 -0
- data/lib/shell_data_reporting_ap_is/models/payer_response.rb +115 -0
- data/lib/shell_data_reporting_ap_is/models/payers.rb +109 -0
- data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +322 -0
- data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +80 -0
- data/lib/shell_data_reporting_ap_is/models/price_list.rb +485 -0
- data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +477 -0
- data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +572 -0
- data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +485 -0
- data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +2132 -0
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +79 -0
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +242 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +67 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb +27 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb +27 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb +37 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +72 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb +23 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response.rb +59 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +1719 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +110 -0
- data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +115 -0
- data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +105 -0
- data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +114 -0
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +217 -0
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +66 -0
- data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +918 -0
- data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +110 -0
- data/lib/shell_data_reporting_ap_is/models/role.rb +102 -0
- data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +269 -0
- data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +204 -0
- data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +70 -0
- data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +122 -0
- data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +197 -0
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +220 -0
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +70 -0
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +120 -0
- data/lib/shell_data_reporting_ap_is/models/site_location.rb +67 -0
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_request.rb +50 -0
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +197 -0
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +138 -0
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +80 -0
- data/lib/shell_data_reporting_ap_is/models/tier.rb +167 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +1267 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +267 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +100 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +348 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +111 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +67 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +146 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +93 -0
- data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +202 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +118 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +120 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +103 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +120 -0
- data/lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +16 -0
- data/lib/shell_data_reporting_ap_is.rb +229 -0
- data/test/controllers/controller_test_base.rb +34 -0
- data/test/controllers/test_invoice_controller.rb +398 -0
- data/test/controllers/test_transaction_controller.rb +235 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +302 -0
@@ -0,0 +1,103 @@
|
|
1
|
+
# shell_data_reporting_ap_is
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module ShellDataReportingApIs
|
7
|
+
# VolumeBasedPricingRequest Model.
|
8
|
+
class VolumeBasedPricingRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Collecting Company Id of the selected payer.
|
13
|
+
# Optional if ColCoCode is passed else Mandatory.
|
14
|
+
# Example:
|
15
|
+
# 1 for Philippines
|
16
|
+
# 5 for UK
|
17
|
+
# @return [Integer]
|
18
|
+
attr_accessor :col_co_id
|
19
|
+
|
20
|
+
# Collecting Company Code of the selected payer.
|
21
|
+
# Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
|
22
|
+
# Ukraine etc. It is optional for other countries if ColCoID is provided.
|
23
|
+
# Example:
|
24
|
+
# 86 for Philippines
|
25
|
+
# 5 for UK
|
26
|
+
# @return [Integer]
|
27
|
+
attr_accessor :col_co_code
|
28
|
+
|
29
|
+
# Payer Id of the selected payer.
|
30
|
+
# Optional if PayerNumber is passed else Mandatory
|
31
|
+
# @return [Integer]
|
32
|
+
attr_accessor :payer_id
|
33
|
+
|
34
|
+
# Payer Number of the selected payer.
|
35
|
+
# Optional if PayerId is passed else Mandatory
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :payer_number
|
38
|
+
|
39
|
+
# The API will return the details of the previously calculated/paid bonus
|
40
|
+
# and fuel consumption (Volume) in the response when this flag is ‘True’.
|
41
|
+
# @return [TrueClass | FalseClass]
|
42
|
+
attr_accessor :include_history
|
43
|
+
|
44
|
+
# A mapping from model property names to API property names.
|
45
|
+
def self.names
|
46
|
+
@_hash = {} if @_hash.nil?
|
47
|
+
@_hash['col_co_id'] = 'ColCoId'
|
48
|
+
@_hash['col_co_code'] = 'ColCoCode'
|
49
|
+
@_hash['payer_id'] = 'PayerId'
|
50
|
+
@_hash['payer_number'] = 'PayerNumber'
|
51
|
+
@_hash['include_history'] = 'IncludeHistory'
|
52
|
+
@_hash
|
53
|
+
end
|
54
|
+
|
55
|
+
# An array for optional fields
|
56
|
+
def self.optionals
|
57
|
+
%w[
|
58
|
+
col_co_id
|
59
|
+
col_co_code
|
60
|
+
payer_id
|
61
|
+
payer_number
|
62
|
+
include_history
|
63
|
+
]
|
64
|
+
end
|
65
|
+
|
66
|
+
# An array for nullable fields
|
67
|
+
def self.nullables
|
68
|
+
[]
|
69
|
+
end
|
70
|
+
|
71
|
+
def initialize(col_co_id = SKIP,
|
72
|
+
col_co_code = SKIP,
|
73
|
+
payer_id = SKIP,
|
74
|
+
payer_number = SKIP,
|
75
|
+
include_history = SKIP)
|
76
|
+
@col_co_id = col_co_id unless col_co_id == SKIP
|
77
|
+
@col_co_code = col_co_code unless col_co_code == SKIP
|
78
|
+
@payer_id = payer_id unless payer_id == SKIP
|
79
|
+
@payer_number = payer_number unless payer_number == SKIP
|
80
|
+
@include_history = include_history unless include_history == SKIP
|
81
|
+
end
|
82
|
+
|
83
|
+
# Creates an instance of the object from a hash.
|
84
|
+
def self.from_hash(hash)
|
85
|
+
return nil unless hash
|
86
|
+
|
87
|
+
# Extract variables from the hash.
|
88
|
+
col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
|
89
|
+
col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
|
90
|
+
payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
|
91
|
+
payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
|
92
|
+
include_history =
|
93
|
+
hash.key?('IncludeHistory') ? hash['IncludeHistory'] : SKIP
|
94
|
+
|
95
|
+
# Create object from extracted values.
|
96
|
+
VolumeBasedPricingRequest.new(col_co_id,
|
97
|
+
col_co_code,
|
98
|
+
payer_id,
|
99
|
+
payer_number,
|
100
|
+
include_history)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# shell_data_reporting_ap_is
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module ShellDataReportingApIs
|
7
|
+
# VolumeBasedPricingResponse Model.
|
8
|
+
class VolumeBasedPricingResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Array[BonusConfiguration]]
|
14
|
+
attr_accessor :configuration
|
15
|
+
|
16
|
+
# TODO: Write general description for this method
|
17
|
+
# @return [Array[PricingCurrentVolume]]
|
18
|
+
attr_accessor :current_period_consumption
|
19
|
+
|
20
|
+
# TODO: Write general description for this method
|
21
|
+
# @return [Array[PricingHistory]]
|
22
|
+
attr_accessor :history
|
23
|
+
|
24
|
+
# TODO: Write general description for this method
|
25
|
+
# @return [ErrorStatus]
|
26
|
+
attr_accessor :error
|
27
|
+
|
28
|
+
# API Request Id
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :request_id
|
31
|
+
|
32
|
+
# A mapping from model property names to API property names.
|
33
|
+
def self.names
|
34
|
+
@_hash = {} if @_hash.nil?
|
35
|
+
@_hash['configuration'] = 'Configuration'
|
36
|
+
@_hash['current_period_consumption'] = 'CurrentPeriodConsumption'
|
37
|
+
@_hash['history'] = 'History'
|
38
|
+
@_hash['error'] = 'Error'
|
39
|
+
@_hash['request_id'] = 'RequestId'
|
40
|
+
@_hash
|
41
|
+
end
|
42
|
+
|
43
|
+
# An array for optional fields
|
44
|
+
def self.optionals
|
45
|
+
%w[
|
46
|
+
configuration
|
47
|
+
current_period_consumption
|
48
|
+
history
|
49
|
+
error
|
50
|
+
request_id
|
51
|
+
]
|
52
|
+
end
|
53
|
+
|
54
|
+
# An array for nullable fields
|
55
|
+
def self.nullables
|
56
|
+
[]
|
57
|
+
end
|
58
|
+
|
59
|
+
def initialize(configuration = SKIP,
|
60
|
+
current_period_consumption = SKIP,
|
61
|
+
history = SKIP,
|
62
|
+
error = SKIP,
|
63
|
+
request_id = SKIP)
|
64
|
+
@configuration = configuration unless configuration == SKIP
|
65
|
+
unless current_period_consumption == SKIP
|
66
|
+
@current_period_consumption =
|
67
|
+
current_period_consumption
|
68
|
+
end
|
69
|
+
@history = history unless history == SKIP
|
70
|
+
@error = error unless error == SKIP
|
71
|
+
@request_id = request_id unless request_id == SKIP
|
72
|
+
end
|
73
|
+
|
74
|
+
# Creates an instance of the object from a hash.
|
75
|
+
def self.from_hash(hash)
|
76
|
+
return nil unless hash
|
77
|
+
|
78
|
+
# Extract variables from the hash.
|
79
|
+
# Parameter is an array, so we need to iterate through it
|
80
|
+
configuration = nil
|
81
|
+
unless hash['Configuration'].nil?
|
82
|
+
configuration = []
|
83
|
+
hash['Configuration'].each do |structure|
|
84
|
+
configuration << (BonusConfiguration.from_hash(structure) if structure)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
configuration = SKIP unless hash.key?('Configuration')
|
89
|
+
# Parameter is an array, so we need to iterate through it
|
90
|
+
current_period_consumption = nil
|
91
|
+
unless hash['CurrentPeriodConsumption'].nil?
|
92
|
+
current_period_consumption = []
|
93
|
+
hash['CurrentPeriodConsumption'].each do |structure|
|
94
|
+
current_period_consumption << (PricingCurrentVolume.from_hash(structure) if structure)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
current_period_consumption = SKIP unless hash.key?('CurrentPeriodConsumption')
|
99
|
+
# Parameter is an array, so we need to iterate through it
|
100
|
+
history = nil
|
101
|
+
unless hash['History'].nil?
|
102
|
+
history = []
|
103
|
+
hash['History'].each do |structure|
|
104
|
+
history << (PricingHistory.from_hash(structure) if structure)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
history = SKIP unless hash.key?('History')
|
109
|
+
error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
|
110
|
+
request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
|
111
|
+
|
112
|
+
# Create object from extracted values.
|
113
|
+
VolumeBasedPricingResponse.new(configuration,
|
114
|
+
current_period_consumption,
|
115
|
+
history,
|
116
|
+
error,
|
117
|
+
request_id)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# shell_data_reporting_ap_is
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'date'
|
7
|
+
module ShellDataReportingApIs
|
8
|
+
# A utility that supports dateTime conversion to different formats
|
9
|
+
class DateTimeHelper < CoreLibrary::DateTimeHelper
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# shell_data_reporting_ap_is
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module ShellDataReportingApIs
|
7
|
+
# A utility to allow users to set the content-type for files
|
8
|
+
class FileWrapper < CoreLibrary::FileWrapper
|
9
|
+
# The constructor.
|
10
|
+
# @param [File] file The file to be sent in the request.
|
11
|
+
# @param [string] content_type The content type of the provided file.
|
12
|
+
def initialize(file, content_type: 'application/octet-stream')
|
13
|
+
super
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
# shell_data_reporting_ap_is
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'date'
|
7
|
+
require 'json'
|
8
|
+
|
9
|
+
require 'apimatic_core_interfaces'
|
10
|
+
require 'apimatic_core'
|
11
|
+
require 'apimatic_faraday_client_adapter'
|
12
|
+
|
13
|
+
require_relative 'shell_data_reporting_ap_is/api_helper'
|
14
|
+
require_relative 'shell_data_reporting_ap_is/client'
|
15
|
+
|
16
|
+
# Utilities
|
17
|
+
require_relative 'shell_data_reporting_ap_is/utilities/file_wrapper'
|
18
|
+
require_relative 'shell_data_reporting_ap_is/utilities/date_time_helper'
|
19
|
+
|
20
|
+
# Http
|
21
|
+
require_relative 'shell_data_reporting_ap_is/http/http_call_back'
|
22
|
+
require_relative 'shell_data_reporting_ap_is/http/http_method_enum'
|
23
|
+
require_relative 'shell_data_reporting_ap_is/http/http_request'
|
24
|
+
require_relative 'shell_data_reporting_ap_is/http/http_response'
|
25
|
+
|
26
|
+
# Logger
|
27
|
+
require_relative 'shell_data_reporting_ap_is/http/auth/basic_auth'
|
28
|
+
require_relative 'shell_data_reporting_ap_is/http/auth/bearer_token'
|
29
|
+
|
30
|
+
# Models
|
31
|
+
require_relative 'shell_data_reporting_ap_is/models/base_model'
|
32
|
+
require_relative 'shell_data_reporting_ap_is/models/logged_in_user_request'
|
33
|
+
require_relative 'shell_data_reporting_ap_is/models/logged_in_user_response'
|
34
|
+
require_relative 'shell_data_reporting_ap_is/models/role'
|
35
|
+
require_relative 'shell_data_reporting_ap_is/models/payer_access'
|
36
|
+
require_relative 'shell_data_reporting_ap_is/models/account_access'
|
37
|
+
require_relative 'shell_data_reporting_ap_is/models/col_co_access'
|
38
|
+
require_relative 'shell_data_reporting_ap_is/models/eid_access'
|
39
|
+
require_relative 'shell_data_reporting_ap_is/models/error_status'
|
40
|
+
require_relative 'shell_data_reporting_ap_is/models/default_error_fault'
|
41
|
+
require_relative 'shell_data_reporting_ap_is/models/default_error_fault_detail'
|
42
|
+
require_relative 'shell_data_reporting_ap_is/models/error_user_access'
|
43
|
+
require_relative 'shell_data_reporting_ap_is/models/error_user_access_error'
|
44
|
+
require_relative 'shell_data_reporting_ap_is/models/payer_request'
|
45
|
+
require_relative 'shell_data_reporting_ap_is/models/payers'
|
46
|
+
require_relative 'shell_data_reporting_ap_is/models/payer_response'
|
47
|
+
require_relative 'shell_data_reporting_ap_is/models/payer_details'
|
48
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_distribution_method'
|
49
|
+
require_relative 'shell_data_reporting_ap_is/models/bank_account'
|
50
|
+
require_relative 'shell_data_reporting_ap_is/models/address'
|
51
|
+
require_relative 'shell_data_reporting_ap_is/models/finance_currency'
|
52
|
+
require_relative 'shell_data_reporting_ap_is/models/customer_contract'
|
53
|
+
require_relative 'shell_data_reporting_ap_is/models/customer_detail_request'
|
54
|
+
require_relative 'shell_data_reporting_ap_is/models/customer_detail_response'
|
55
|
+
require_relative 'shell_data_reporting_ap_is/models/delivery_addresses'
|
56
|
+
require_relative 'shell_data_reporting_ap_is/models/pin_advice_types'
|
57
|
+
require_relative 'shell_data_reporting_ap_is/models/customer_price_list_request'
|
58
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
59
|
+
'customer_price_list_response'
|
60
|
+
require_relative 'shell_data_reporting_ap_is/models/price_list'
|
61
|
+
require_relative 'shell_data_reporting_ap_is/models/tier'
|
62
|
+
require_relative 'shell_data_reporting_ap_is/models/account_request'
|
63
|
+
require_relative 'shell_data_reporting_ap_is/models/accounts'
|
64
|
+
require_relative 'shell_data_reporting_ap_is/models/account_response'
|
65
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
66
|
+
'account_response_accounts_items'
|
67
|
+
require_relative 'shell_data_reporting_ap_is/models/card_type_request'
|
68
|
+
require_relative 'shell_data_reporting_ap_is/models/card_type_response'
|
69
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
70
|
+
'card_type_response_customer_card_types_items'
|
71
|
+
require_relative 'shell_data_reporting_ap_is/models/card_day_time_restrictions'
|
72
|
+
require_relative 'shell_data_reporting_ap_is/models/purchase_categories'
|
73
|
+
require_relative 'shell_data_reporting_ap_is/models/card_usage_restrictions'
|
74
|
+
require_relative 'shell_data_reporting_ap_is/models/card_type_response_error'
|
75
|
+
require_relative 'shell_data_reporting_ap_is/models/card_group_request'
|
76
|
+
require_relative 'shell_data_reporting_ap_is/models/card_group_response'
|
77
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
78
|
+
'card_group_response_card_groups_items'
|
79
|
+
require_relative 'shell_data_reporting_ap_is/models/audit_request'
|
80
|
+
require_relative 'shell_data_reporting_ap_is/models/audit_response'
|
81
|
+
require_relative 'shell_data_reporting_ap_is/models/audit_response_audits_items'
|
82
|
+
require_relative 'shell_data_reporting_ap_is/models/price_transaction_request'
|
83
|
+
require_relative 'shell_data_reporting_ap_is/models/priced_transaction_response'
|
84
|
+
require_relative 'shell_data_reporting_ap_is/models/price_trans_summary_request'
|
85
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
86
|
+
'priced_trans_summary_response'
|
87
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
88
|
+
'multi_priced_transaction_request'
|
89
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
90
|
+
'multi_priced_transaction_response'
|
91
|
+
require_relative 'shell_data_reporting_ap_is/models/site_location'
|
92
|
+
require_relative 'shell_data_reporting_ap_is/models/card_usage_summary_request'
|
93
|
+
require_relative 'shell_data_reporting_ap_is/models/card_usage_summary_response'
|
94
|
+
require_relative 'shell_data_reporting_ap_is/models/usage_summary'
|
95
|
+
require_relative 'shell_data_reporting_ap_is/models/volume_based_bonus_request'
|
96
|
+
require_relative 'shell_data_reporting_ap_is/models/volume_based_bonus_response'
|
97
|
+
require_relative 'shell_data_reporting_ap_is/models/bonus_configuration'
|
98
|
+
require_relative 'shell_data_reporting_ap_is/models/fee_rule_location'
|
99
|
+
require_relative 'shell_data_reporting_ap_is/models/fee_rule_tier'
|
100
|
+
require_relative 'shell_data_reporting_ap_is/models/associated_account'
|
101
|
+
require_relative 'shell_data_reporting_ap_is/models/fee_rule_product'
|
102
|
+
require_relative 'shell_data_reporting_ap_is/models/current_volume'
|
103
|
+
require_relative 'shell_data_reporting_ap_is/models/bonus_history'
|
104
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
105
|
+
'volume_based_pricing_request'
|
106
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
107
|
+
'volume_based_pricing_response'
|
108
|
+
require_relative 'shell_data_reporting_ap_is/models/pricing_current_volume'
|
109
|
+
require_relative 'shell_data_reporting_ap_is/models/pricing_history'
|
110
|
+
require_relative 'shell_data_reporting_ap_is/models/transaction_fees_request'
|
111
|
+
require_relative 'shell_data_reporting_ap_is/models/transaction_fees_response'
|
112
|
+
require_relative 'shell_data_reporting_ap_is/models/fee_item'
|
113
|
+
require_relative 'shell_data_reporting_ap_is/models/fees_fee_rule_tiers'
|
114
|
+
require_relative 'shell_data_reporting_ap_is/models/fee_summary_response'
|
115
|
+
require_relative 'shell_data_reporting_ap_is/models/fee_item_summary_all_of0'
|
116
|
+
require_relative 'shell_data_reporting_ap_is/models/fuel_consumption_request'
|
117
|
+
require_relative 'shell_data_reporting_ap_is/models/fuel_consumption_card'
|
118
|
+
require_relative 'shell_data_reporting_ap_is/models/fuel_consumption_response'
|
119
|
+
require_relative 'shell_data_reporting_ap_is/models/fuel_consumption_data'
|
120
|
+
require_relative 'shell_data_reporting_ap_is/models/update_odometer_request'
|
121
|
+
require_relative 'shell_data_reporting_ap_is/models/update_odometer'
|
122
|
+
require_relative 'shell_data_reporting_ap_is/models/update_odometer_response'
|
123
|
+
require_relative 'shell_data_reporting_ap_is/models/update_odometer_reference'
|
124
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
125
|
+
'transaction_exceptions_request'
|
126
|
+
require_relative 'shell_data_reporting_ap_is/models/exception_product'
|
127
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
128
|
+
'transaction_exceptions_response'
|
129
|
+
require_relative 'shell_data_reporting_ap_is/models/card_exceptions'
|
130
|
+
require_relative 'shell_data_reporting_ap_is/models/transaction_exceptions'
|
131
|
+
require_relative 'shell_data_reporting_ap_is/models/exception_site_location'
|
132
|
+
require_relative 'shell_data_reporting_ap_is/models/recent_transaction_request'
|
133
|
+
require_relative 'shell_data_reporting_ap_is/models/recent_transaction_req'
|
134
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
135
|
+
'recent_transactions_response'
|
136
|
+
require_relative 'shell_data_reporting_ap_is/models/recent_transactions'
|
137
|
+
require_relative 'shell_data_reporting_ap_is/models/error_details'
|
138
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
139
|
+
'priced_transaction_request_v2'
|
140
|
+
require_relative 'shell_data_reporting_ap_is/models/priced_request_data'
|
141
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
142
|
+
'priced_transaction_response_v2'
|
143
|
+
require_relative 'shell_data_reporting_ap_is/models/priced_response_data'
|
144
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_search_request'
|
145
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_search_response'
|
146
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_search_details'
|
147
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
148
|
+
'invoice_search_additional_document'
|
149
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_summary_request'
|
150
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_summary_response'
|
151
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_summary_details'
|
152
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
153
|
+
'statement_of_account_request'
|
154
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
155
|
+
'statement_of_account_response'
|
156
|
+
require_relative 'shell_data_reporting_ap_is/models/statement_of_account_resp'
|
157
|
+
require_relative 'shell_data_reporting_ap_is/models/last_statement_of_account'
|
158
|
+
require_relative 'shell_data_reporting_ap_is/models/monthly_invoice_trend'
|
159
|
+
require_relative 'shell_data_reporting_ap_is/models/past_statement_of_accounts'
|
160
|
+
require_relative 'shell_data_reporting_ap_is/models/payments_since_last_soa'
|
161
|
+
require_relative 'shell_data_reporting_ap_is/models/invoices_summaries'
|
162
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_dates_request'
|
163
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_dates_response_data'
|
164
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_dates_data'
|
165
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
166
|
+
'search_statement_of_account_request'
|
167
|
+
require_relative 'shell_data_reporting_ap_is/models/search_soa_req'
|
168
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
169
|
+
'search_statement_of_account_response'
|
170
|
+
require_relative 'shell_data_reporting_ap_is/models/search_statement_of_account'
|
171
|
+
require_relative 'shell_data_reporting_ap_is/models/search_documents_request'
|
172
|
+
require_relative 'shell_data_reporting_ap_is/models/search_doc_req'
|
173
|
+
require_relative 'shell_data_reporting_ap_is/models/search_documents_response'
|
174
|
+
require_relative 'shell_data_reporting_ap_is/models/search_documents_invoice'
|
175
|
+
require_relative 'shell_data_reporting_ap_is/models/eid_search_request'
|
176
|
+
require_relative 'shell_data_reporting_ap_is/models/eid_search_req'
|
177
|
+
require_relative 'shell_data_reporting_ap_is/models/eid_document_response'
|
178
|
+
require_relative 'shell_data_reporting_ap_is/models/eid_document'
|
179
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_download_request'
|
180
|
+
require_relative 'shell_data_reporting_ap_is/models/invoice_download_req'
|
181
|
+
require_relative 'shell_data_reporting_ap_is/models/eid_download_request'
|
182
|
+
require_relative 'shell_data_reporting_ap_is/models/eid_download_req'
|
183
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
184
|
+
'priced_transaction_response_transactions_items'
|
185
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
186
|
+
'priced_transaction_items_location_items'
|
187
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
188
|
+
'priced_trans_summary_response_transactions_summary_items'
|
189
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
190
|
+
'multi_priced_transaction_request_accounts_items'
|
191
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
192
|
+
'multi_priced_transaction_response_transactions_items'
|
193
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
194
|
+
'invoice_search_request_filters'
|
195
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
196
|
+
'invoice_summary_request_filters'
|
197
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
198
|
+
'statement_of_account_request_filters'
|
199
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
200
|
+
'invoice_dates_request_filters'
|
201
|
+
require_relative 'shell_data_reporting_ap_is/models/o_auth_token'
|
202
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
203
|
+
'priced_transaction_req_v2_invoice_status_enum'
|
204
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
205
|
+
'priced_transaction_req_v2_sort_order_enum'
|
206
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
207
|
+
'priced_transaction_req_v2_period_enum'
|
208
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
209
|
+
'priced_transaction_resp_v2_refund_flag_enum'
|
210
|
+
require_relative 'shell_data_reporting_ap_is/models/o_auth_provider_error_enum'
|
211
|
+
|
212
|
+
# Exceptions
|
213
|
+
require_relative 'shell_data_reporting_ap_is/exceptions/api_exception'
|
214
|
+
require_relative 'shell_data_reporting_ap_is/exceptions/default_error_exception'
|
215
|
+
require_relative 'shell_data_reporting_ap_is/exceptions/error_object_exception'
|
216
|
+
require_relative 'shell_data_reporting_ap_is/exceptions/' \
|
217
|
+
'error_user_access_error1_exception'
|
218
|
+
require_relative 'shell_data_reporting_ap_is/exceptions/' \
|
219
|
+
'o_auth_provider_exception'
|
220
|
+
|
221
|
+
require_relative 'shell_data_reporting_ap_is/configuration'
|
222
|
+
|
223
|
+
# Controllers
|
224
|
+
require_relative 'shell_data_reporting_ap_is/controllers/base_controller'
|
225
|
+
require_relative 'shell_data_reporting_ap_is/controllers/customer_controller'
|
226
|
+
require_relative 'shell_data_reporting_ap_is/controllers/transaction_controller'
|
227
|
+
require_relative 'shell_data_reporting_ap_is/controllers/invoice_controller'
|
228
|
+
require_relative 'shell_data_reporting_ap_is/controllers/' \
|
229
|
+
'o_auth_authorization_controller'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# shell_data_reporting_ap_is
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'json'
|
7
|
+
require 'minitest/autorun'
|
8
|
+
require 'minitest/hell'
|
9
|
+
require 'minitest/pride'
|
10
|
+
require 'minitest/proveit'
|
11
|
+
require 'shell_data_reporting_ap_is'
|
12
|
+
require_relative '../http_response_catcher'
|
13
|
+
|
14
|
+
class ControllerTestBase < Minitest::Test
|
15
|
+
parallelize_me!
|
16
|
+
include ShellDataReportingApIs
|
17
|
+
include CoreLibrary
|
18
|
+
|
19
|
+
# Create configuration and set any test parameters
|
20
|
+
def create_configuration
|
21
|
+
Configuration.new(http_callback: HttpResponseCatcher.new)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Initializes the base test controller
|
25
|
+
def setup_class
|
26
|
+
_config = create_configuration
|
27
|
+
@client = Client.new(config: _config)
|
28
|
+
|
29
|
+
bearer_token_token = @client.bearer_token.fetch_token()
|
30
|
+
bearer_token_credentials = _config.bearer_token_credentials.clone_with(o_auth_token: bearer_token_token)
|
31
|
+
_config = _config.clone_with(bearer_token_credentials: bearer_token_credentials)
|
32
|
+
@client = Client.new(config: _config)
|
33
|
+
end
|
34
|
+
end
|