data-and-reporting-sdk 1.3.0 → 2.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 +4 -4
- data/README.md +66 -35
- data/lib/shell_data_reporting_ap_is/api_helper.rb +2 -2
- data/lib/shell_data_reporting_ap_is/client.rb +11 -12
- data/lib/shell_data_reporting_ap_is/configuration.rb +23 -25
- data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +3 -9
- data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +251 -288
- data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +20 -20
- data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +7 -7
- data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +204 -259
- data/lib/shell_data_reporting_ap_is/exceptions/api_exception.rb +2 -2
- data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +7 -5
- data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +7 -5
- data/lib/shell_data_reporting_ap_is/http/auth/{bearer_token.rb → o_auth2.rb} +28 -27
- data/lib/shell_data_reporting_ap_is/http/http_call_back.rb +2 -2
- data/lib/shell_data_reporting_ap_is/http/http_method_enum.rb +2 -2
- data/lib/shell_data_reporting_ap_is/http/http_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/http/http_response.rb +2 -2
- data/lib/shell_data_reporting_ap_is/http/proxy_settings.rb +13 -0
- data/lib/shell_data_reporting_ap_is/models/account_access.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/account_req.rb +84 -0
- data/lib/shell_data_reporting_ap_is/models/account_request.rb +3 -3
- data/lib/shell_data_reporting_ap_is/models/account_res.rb +158 -0
- data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/accounts.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/address.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/associated_account.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/audit_array_elements.rb +71 -0
- data/lib/shell_data_reporting_ap_is/models/audit_req.rb +84 -0
- data/lib/shell_data_reporting_ap_is/models/audit_request.rb +29 -41
- data/lib/shell_data_reporting_ap_is/models/audit_response.rb +88 -53
- data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +29 -6
- data/lib/shell_data_reporting_ap_is/models/bank_account.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/base_model.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/card_group_req.rb +84 -0
- data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +6 -31
- data/lib/shell_data_reporting_ap_is/models/card_group_res.rb +158 -0
- data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/{error_user_access.rb → card_type_req.rb} +14 -14
- data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/card_type_res.rb +91 -0
- data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +3 -3
- data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_req.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_res.rb +116 -0
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +6 -26
- data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +4 -4
- data/lib/shell_data_reporting_ap_is/models/current_volume.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +4 -4
- data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +5 -32
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_req.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_res.rb +91 -0
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +7 -29
- data/lib/shell_data_reporting_ap_is/models/{default_error_fault_detail.rb → customer_req.rb} +15 -15
- data/lib/shell_data_reporting_ap_is/models/customer_res.rb +91 -0
- data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/eid_access.rb +3 -3
- data/lib/shell_data_reporting_ap_is/models/eid_document.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/eid_download_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/error_details.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/exception_product.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fee_item.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +57 -38
- data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/filters.rb +522 -0
- data/lib/shell_data_reporting_ap_is/models/{finance_currency.rb → finance_currency2.rb} +8 -9
- data/lib/shell_data_reporting_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_req.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +58 -33
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_download_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_details.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/last_statement_of_account2.rb +457 -0
- data/lib/shell_data_reporting_ap_is/models/{error_user_access_error.rb → location.rb} +25 -22
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_req.rb +63 -0
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_res.rb +91 -0
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +6 -30
- data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_req.rb +84 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_res.rb +158 -0
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +6 -57
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/payer_access.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/payer_details.rb +8 -6
- data/lib/shell_data_reporting_ap_is/models/payer_req.rb +84 -0
- data/lib/shell_data_reporting_ap_is/models/payer_request.rb +6 -33
- data/lib/shell_data_reporting_ap_is/models/payer_res.rb +158 -0
- data/lib/shell_data_reporting_ap_is/models/payers.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/price_list.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/price_trans_summary_req.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/price_transaction_req.rb +84 -0
- data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +4 -8
- data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_resp.rb +116 -0
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +5 -7
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_res.rb +158 -0
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +6 -27
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/role.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/site_location.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +9 -9
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/tier.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +5 -5
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_req.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_res.rb +116 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +6 -26
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_req.rb +84 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +6 -28
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_res.rb +158 -0
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_summary_req.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/update_odometer_resp.rb +116 -0
- data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +6 -26
- data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_req.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_res.rb +116 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +6 -27
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_req.rb +62 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +2 -2
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_res.rb +91 -0
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +28 -24
- data/lib/shell_data_reporting_ap_is/models/warning.rb +69 -0
- data/lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb +2 -2
- data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +2 -2
- data/lib/shell_data_reporting_ap_is/utilities/union_type_lookup.rb +2 -2
- data/lib/shell_data_reporting_ap_is.rb +54 -29
- data/test/controllers/controller_test_base.rb +2 -2
- data/test/controllers/test_invoice_controller.rb +3 -12
- data/test/controllers/test_transaction_controller.rb +3 -5
- data/test/http_response_catcher.rb +3 -3
- metadata +50 -26
- data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +0 -44
- data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +0 -44
- data/lib/shell_data_reporting_ap_is/http/auth/basic_auth.rb +0 -50
- data/lib/shell_data_reporting_ap_is/models/account_response.rb +0 -123
- data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +0 -121
- data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +0 -91
- data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +0 -71
- data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +0 -71
- data/lib/shell_data_reporting_ap_is/models/error_status.rb +0 -81
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +0 -121
- data/lib/shell_data_reporting_ap_is/models/payer_response.rb +0 -127
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +0 -91
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +0 -123
@@ -1,11 +1,11 @@
|
|
1
1
|
# shell_data_reporting_ap_is
|
2
2
|
#
|
3
|
-
# This file was automatically generated by
|
4
|
-
# ( https://apimatic.io ).
|
3
|
+
# This file was automatically generated by
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
5
5
|
|
6
6
|
require_relative 'controller_test_base'
|
7
7
|
|
8
|
-
class
|
8
|
+
class InvoiceControllerTest < ControllerTestBase
|
9
9
|
# Called only once for the class before any test has executed
|
10
10
|
def setup
|
11
11
|
setup_class
|
@@ -44,7 +44,6 @@ class InvoiceControllerTests < ControllerTestBase
|
|
44
44
|
|
45
45
|
# Test response code
|
46
46
|
assert_equal(200, @response_catcher.response.status_code)
|
47
|
-
|
48
47
|
# Test headers
|
49
48
|
expected_headers = {}
|
50
49
|
expected_headers['content-type'] = 'application/json'
|
@@ -114,7 +113,6 @@ class InvoiceControllerTests < ControllerTestBase
|
|
114
113
|
|
115
114
|
# Test response code
|
116
115
|
assert_equal(200, @response_catcher.response.status_code)
|
117
|
-
|
118
116
|
# Test headers
|
119
117
|
expected_headers = {}
|
120
118
|
expected_headers['content-type'] = 'application/json'
|
@@ -158,7 +156,6 @@ class InvoiceControllerTests < ControllerTestBase
|
|
158
156
|
|
159
157
|
# Test response code
|
160
158
|
assert_equal(200, @response_catcher.response.status_code)
|
161
|
-
|
162
159
|
# Test headers
|
163
160
|
expected_headers = {}
|
164
161
|
expected_headers['content-type'] = 'application/json'
|
@@ -217,7 +214,6 @@ class InvoiceControllerTests < ControllerTestBase
|
|
217
214
|
|
218
215
|
# Test response code
|
219
216
|
assert_equal(200, @response_catcher.response.status_code)
|
220
|
-
|
221
217
|
# Test headers
|
222
218
|
expected_headers = {}
|
223
219
|
expected_headers['content-type'] = 'application/json'
|
@@ -250,7 +246,6 @@ class InvoiceControllerTests < ControllerTestBase
|
|
250
246
|
|
251
247
|
# Test response code
|
252
248
|
assert_equal(200, @response_catcher.response.status_code)
|
253
|
-
|
254
249
|
# Test headers
|
255
250
|
expected_headers = {}
|
256
251
|
expected_headers['content-type'] = 'application/json'
|
@@ -291,7 +286,6 @@ class InvoiceControllerTests < ControllerTestBase
|
|
291
286
|
|
292
287
|
# Test response code
|
293
288
|
assert_equal(200, @response_catcher.response.status_code)
|
294
|
-
|
295
289
|
# Test headers
|
296
290
|
expected_headers = {}
|
297
291
|
expected_headers['content-type'] = 'application/json'
|
@@ -328,7 +322,6 @@ class InvoiceControllerTests < ControllerTestBase
|
|
328
322
|
|
329
323
|
# Test response code
|
330
324
|
assert_equal(200, @response_catcher.response.status_code)
|
331
|
-
|
332
325
|
# Test headers
|
333
326
|
expected_headers = {}
|
334
327
|
expected_headers['content-type'] = 'application/json'
|
@@ -364,7 +357,6 @@ class InvoiceControllerTests < ControllerTestBase
|
|
364
357
|
|
365
358
|
# Test response code
|
366
359
|
assert_equal(200, @response_catcher.response.status_code)
|
367
|
-
|
368
360
|
# Test headers
|
369
361
|
expected_headers = {}
|
370
362
|
expected_headers['content-type'] = 'application/octet-stream'
|
@@ -387,7 +379,6 @@ class InvoiceControllerTests < ControllerTestBase
|
|
387
379
|
|
388
380
|
# Test response code
|
389
381
|
assert_equal(200, @response_catcher.response.status_code)
|
390
|
-
|
391
382
|
# Test headers
|
392
383
|
expected_headers = {}
|
393
384
|
expected_headers['content-type'] = 'application/octet-stream'
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# shell_data_reporting_ap_is
|
2
2
|
#
|
3
|
-
# This file was automatically generated by
|
4
|
-
# ( https://apimatic.io ).
|
3
|
+
# This file was automatically generated by
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
5
5
|
|
6
6
|
require_relative 'controller_test_base'
|
7
7
|
|
8
|
-
class
|
8
|
+
class TransactionControllerTest < ControllerTestBase
|
9
9
|
# Called only once for the class before any test has executed
|
10
10
|
def setup
|
11
11
|
setup_class
|
@@ -51,7 +51,6 @@ class TransactionControllerTests < ControllerTestBase
|
|
51
51
|
|
52
52
|
# Test response code
|
53
53
|
assert_equal(200, @response_catcher.response.status_code)
|
54
|
-
|
55
54
|
# Test headers
|
56
55
|
expected_headers = {}
|
57
56
|
expected_headers['content-type'] = 'application/json'
|
@@ -156,7 +155,6 @@ class TransactionControllerTests < ControllerTestBase
|
|
156
155
|
|
157
156
|
# Test response code
|
158
157
|
assert_equal(200, @response_catcher.response.status_code)
|
159
|
-
|
160
158
|
# Test headers
|
161
159
|
expected_headers = {}
|
162
160
|
expected_headers['content-type'] = 'application/json'
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# shell_data_reporting_ap_is
|
2
2
|
#
|
3
|
-
# This file was automatically generated by
|
4
|
-
# ( https://apimatic.io ).
|
3
|
+
# This file was automatically generated by
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
5
5
|
|
6
6
|
class HttpResponseCatcher < ShellDataReportingApIs::HttpCallBack
|
7
|
-
|
7
|
+
attr_reader :response
|
8
8
|
|
9
9
|
def on_before_request(request)
|
10
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data-and-reporting-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- developer sdksio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apimatic_core_interfaces
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.
|
19
|
+
version: 0.2.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2.
|
26
|
+
version: 0.2.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: apimatic_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.
|
33
|
+
version: 0.3.19
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3.
|
40
|
+
version: 0.3.19
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: apimatic_faraday_client_adapter
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.
|
47
|
+
version: 0.1.6
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.
|
54
|
+
version: 0.1.6
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,23 +106,24 @@ files:
|
|
106
106
|
- lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb
|
107
107
|
- lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb
|
108
108
|
- lib/shell_data_reporting_ap_is/exceptions/api_exception.rb
|
109
|
-
- lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb
|
110
109
|
- lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb
|
111
|
-
- lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb
|
112
110
|
- lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb
|
113
|
-
- lib/shell_data_reporting_ap_is/http/auth/
|
114
|
-
- lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb
|
111
|
+
- lib/shell_data_reporting_ap_is/http/auth/o_auth2.rb
|
115
112
|
- lib/shell_data_reporting_ap_is/http/http_call_back.rb
|
116
113
|
- lib/shell_data_reporting_ap_is/http/http_method_enum.rb
|
117
114
|
- lib/shell_data_reporting_ap_is/http/http_request.rb
|
118
115
|
- lib/shell_data_reporting_ap_is/http/http_response.rb
|
116
|
+
- lib/shell_data_reporting_ap_is/http/proxy_settings.rb
|
119
117
|
- lib/shell_data_reporting_ap_is/models/account_access.rb
|
118
|
+
- lib/shell_data_reporting_ap_is/models/account_req.rb
|
120
119
|
- lib/shell_data_reporting_ap_is/models/account_request.rb
|
121
|
-
- lib/shell_data_reporting_ap_is/models/
|
120
|
+
- lib/shell_data_reporting_ap_is/models/account_res.rb
|
122
121
|
- lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb
|
123
122
|
- lib/shell_data_reporting_ap_is/models/accounts.rb
|
124
123
|
- lib/shell_data_reporting_ap_is/models/address.rb
|
125
124
|
- lib/shell_data_reporting_ap_is/models/associated_account.rb
|
125
|
+
- lib/shell_data_reporting_ap_is/models/audit_array_elements.rb
|
126
|
+
- lib/shell_data_reporting_ap_is/models/audit_req.rb
|
126
127
|
- lib/shell_data_reporting_ap_is/models/audit_request.rb
|
127
128
|
- lib/shell_data_reporting_ap_is/models/audit_response.rb
|
128
129
|
- lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb
|
@@ -132,25 +133,30 @@ files:
|
|
132
133
|
- lib/shell_data_reporting_ap_is/models/bonus_history.rb
|
133
134
|
- lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb
|
134
135
|
- lib/shell_data_reporting_ap_is/models/card_exceptions.rb
|
136
|
+
- lib/shell_data_reporting_ap_is/models/card_group_req.rb
|
135
137
|
- lib/shell_data_reporting_ap_is/models/card_group_request.rb
|
136
|
-
- lib/shell_data_reporting_ap_is/models/
|
138
|
+
- lib/shell_data_reporting_ap_is/models/card_group_res.rb
|
137
139
|
- lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb
|
140
|
+
- lib/shell_data_reporting_ap_is/models/card_type_req.rb
|
138
141
|
- lib/shell_data_reporting_ap_is/models/card_type_request.rb
|
139
|
-
- lib/shell_data_reporting_ap_is/models/
|
142
|
+
- lib/shell_data_reporting_ap_is/models/card_type_res.rb
|
140
143
|
- lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb
|
141
|
-
- lib/shell_data_reporting_ap_is/models/card_type_response_error.rb
|
142
144
|
- lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb
|
145
|
+
- lib/shell_data_reporting_ap_is/models/card_usage_summary_req.rb
|
143
146
|
- lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb
|
147
|
+
- lib/shell_data_reporting_ap_is/models/card_usage_summary_res.rb
|
144
148
|
- lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb
|
145
149
|
- lib/shell_data_reporting_ap_is/models/col_co_access.rb
|
146
150
|
- lib/shell_data_reporting_ap_is/models/current_volume.rb
|
147
151
|
- lib/shell_data_reporting_ap_is/models/customer_contract.rb
|
148
152
|
- lib/shell_data_reporting_ap_is/models/customer_detail_request.rb
|
149
153
|
- lib/shell_data_reporting_ap_is/models/customer_detail_response.rb
|
154
|
+
- lib/shell_data_reporting_ap_is/models/customer_price_list_req.rb
|
150
155
|
- lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb
|
156
|
+
- lib/shell_data_reporting_ap_is/models/customer_price_list_res.rb
|
151
157
|
- lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb
|
152
|
-
- lib/shell_data_reporting_ap_is/models/
|
153
|
-
- lib/shell_data_reporting_ap_is/models/
|
158
|
+
- lib/shell_data_reporting_ap_is/models/customer_req.rb
|
159
|
+
- lib/shell_data_reporting_ap_is/models/customer_res.rb
|
154
160
|
- lib/shell_data_reporting_ap_is/models/delivery_addresses.rb
|
155
161
|
- lib/shell_data_reporting_ap_is/models/eid_access.rb
|
156
162
|
- lib/shell_data_reporting_ap_is/models/eid_document.rb
|
@@ -160,9 +166,6 @@ files:
|
|
160
166
|
- lib/shell_data_reporting_ap_is/models/eid_search_req.rb
|
161
167
|
- lib/shell_data_reporting_ap_is/models/eid_search_request.rb
|
162
168
|
- lib/shell_data_reporting_ap_is/models/error_details.rb
|
163
|
-
- lib/shell_data_reporting_ap_is/models/error_status.rb
|
164
|
-
- lib/shell_data_reporting_ap_is/models/error_user_access.rb
|
165
|
-
- lib/shell_data_reporting_ap_is/models/error_user_access_error.rb
|
166
169
|
- lib/shell_data_reporting_ap_is/models/exception_product.rb
|
167
170
|
- lib/shell_data_reporting_ap_is/models/exception_site_location.rb
|
168
171
|
- lib/shell_data_reporting_ap_is/models/fee_item.rb
|
@@ -172,10 +175,12 @@ files:
|
|
172
175
|
- lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb
|
173
176
|
- lib/shell_data_reporting_ap_is/models/fee_summary_response.rb
|
174
177
|
- lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb
|
175
|
-
- lib/shell_data_reporting_ap_is/models/
|
178
|
+
- lib/shell_data_reporting_ap_is/models/filters.rb
|
179
|
+
- lib/shell_data_reporting_ap_is/models/finance_currency2.rb
|
176
180
|
- lib/shell_data_reporting_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb
|
177
181
|
- lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb
|
178
182
|
- lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb
|
183
|
+
- lib/shell_data_reporting_ap_is/models/fuel_consumption_req.rb
|
179
184
|
- lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb
|
180
185
|
- lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb
|
181
186
|
- lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb
|
@@ -196,11 +201,16 @@ files:
|
|
196
201
|
- lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb
|
197
202
|
- lib/shell_data_reporting_ap_is/models/invoices_summaries.rb
|
198
203
|
- lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb
|
199
|
-
- lib/shell_data_reporting_ap_is/models/
|
204
|
+
- lib/shell_data_reporting_ap_is/models/last_statement_of_account2.rb
|
205
|
+
- lib/shell_data_reporting_ap_is/models/location.rb
|
206
|
+
- lib/shell_data_reporting_ap_is/models/logged_in_user_req.rb
|
207
|
+
- lib/shell_data_reporting_ap_is/models/logged_in_user_res.rb
|
200
208
|
- lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb
|
201
209
|
- lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb
|
210
|
+
- lib/shell_data_reporting_ap_is/models/multi_priced_transaction_req.rb
|
202
211
|
- lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb
|
203
212
|
- lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb
|
213
|
+
- lib/shell_data_reporting_ap_is/models/multi_priced_transaction_res.rb
|
204
214
|
- lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb
|
205
215
|
- lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb
|
206
216
|
- lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb
|
@@ -208,23 +218,27 @@ files:
|
|
208
218
|
- lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb
|
209
219
|
- lib/shell_data_reporting_ap_is/models/payer_access.rb
|
210
220
|
- lib/shell_data_reporting_ap_is/models/payer_details.rb
|
221
|
+
- lib/shell_data_reporting_ap_is/models/payer_req.rb
|
211
222
|
- lib/shell_data_reporting_ap_is/models/payer_request.rb
|
212
|
-
- lib/shell_data_reporting_ap_is/models/
|
223
|
+
- lib/shell_data_reporting_ap_is/models/payer_res.rb
|
213
224
|
- lib/shell_data_reporting_ap_is/models/payers.rb
|
214
225
|
- lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb
|
215
226
|
- lib/shell_data_reporting_ap_is/models/pin_advice_types.rb
|
216
227
|
- lib/shell_data_reporting_ap_is/models/price_list.rb
|
228
|
+
- lib/shell_data_reporting_ap_is/models/price_trans_summary_req.rb
|
217
229
|
- lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb
|
230
|
+
- lib/shell_data_reporting_ap_is/models/price_transaction_req.rb
|
218
231
|
- lib/shell_data_reporting_ap_is/models/price_transaction_request.rb
|
219
232
|
- lib/shell_data_reporting_ap_is/models/priced_request_data.rb
|
220
233
|
- lib/shell_data_reporting_ap_is/models/priced_response_data.rb
|
221
|
-
- lib/shell_data_reporting_ap_is/models/
|
234
|
+
- lib/shell_data_reporting_ap_is/models/priced_trans_summary_resp.rb
|
222
235
|
- lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb
|
223
236
|
- lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb
|
224
237
|
- lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb
|
225
238
|
- lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb
|
226
239
|
- lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb
|
227
240
|
- lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb
|
241
|
+
- lib/shell_data_reporting_ap_is/models/priced_transaction_res.rb
|
228
242
|
- lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb
|
229
243
|
- lib/shell_data_reporting_ap_is/models/priced_transaction_response.rb
|
230
244
|
- lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb
|
@@ -252,19 +266,29 @@ files:
|
|
252
266
|
- lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb
|
253
267
|
- lib/shell_data_reporting_ap_is/models/tier.rb
|
254
268
|
- lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb
|
269
|
+
- lib/shell_data_reporting_ap_is/models/transaction_exceptions_req.rb
|
255
270
|
- lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb
|
271
|
+
- lib/shell_data_reporting_ap_is/models/transaction_exceptions_res.rb
|
256
272
|
- lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb
|
273
|
+
- lib/shell_data_reporting_ap_is/models/transaction_fees_req.rb
|
257
274
|
- lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb
|
258
|
-
- lib/shell_data_reporting_ap_is/models/
|
275
|
+
- lib/shell_data_reporting_ap_is/models/transaction_fees_res.rb
|
276
|
+
- lib/shell_data_reporting_ap_is/models/transaction_fees_summary_req.rb
|
259
277
|
- lib/shell_data_reporting_ap_is/models/update_odometer.rb
|
260
278
|
- lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb
|
261
279
|
- lib/shell_data_reporting_ap_is/models/update_odometer_request.rb
|
280
|
+
- lib/shell_data_reporting_ap_is/models/update_odometer_resp.rb
|
262
281
|
- lib/shell_data_reporting_ap_is/models/update_odometer_response.rb
|
263
282
|
- lib/shell_data_reporting_ap_is/models/usage_summary.rb
|
283
|
+
- lib/shell_data_reporting_ap_is/models/volume_based_bonus_req.rb
|
264
284
|
- lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb
|
285
|
+
- lib/shell_data_reporting_ap_is/models/volume_based_bonus_res.rb
|
265
286
|
- lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb
|
287
|
+
- lib/shell_data_reporting_ap_is/models/volume_based_pricing_req.rb
|
266
288
|
- lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb
|
289
|
+
- lib/shell_data_reporting_ap_is/models/volume_based_pricing_res.rb
|
267
290
|
- lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb
|
291
|
+
- lib/shell_data_reporting_ap_is/models/warning.rb
|
268
292
|
- lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb
|
269
293
|
- lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb
|
270
294
|
- lib/shell_data_reporting_ap_is/utilities/union_type_lookup.rb
|
@@ -1,44 +0,0 @@
|
|
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
|
-
# Error response
|
8
|
-
class DefaultErrorException < APIException
|
9
|
-
SKIP = Object.new
|
10
|
-
private_constant :SKIP
|
11
|
-
|
12
|
-
# Error object
|
13
|
-
# @return [DefaultErrorFault]
|
14
|
-
attr_accessor :fault
|
15
|
-
|
16
|
-
# The constructor.
|
17
|
-
# @param [String] The reason for raising an exception.
|
18
|
-
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
-
def initialize(reason, response)
|
20
|
-
super(reason, response)
|
21
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
-
unbox(hash)
|
23
|
-
end
|
24
|
-
|
25
|
-
# Populates this object by extracting properties from a hash.
|
26
|
-
# @param [Hash] The deserialized response sent by the server in the
|
27
|
-
# response body.
|
28
|
-
def unbox(hash)
|
29
|
-
@fault = DefaultErrorFault.from_hash(hash['fault']) if hash['fault']
|
30
|
-
end
|
31
|
-
|
32
|
-
# Provides a human-readable string representation of the object.
|
33
|
-
def to_s
|
34
|
-
class_name = self.class.name.split('::').last
|
35
|
-
"<#{class_name} fault: #{@fault}>"
|
36
|
-
end
|
37
|
-
|
38
|
-
# Provides a debugging-friendly string with detailed object information.
|
39
|
-
def inspect
|
40
|
-
class_name = self.class.name.split('::').last
|
41
|
-
"<#{class_name} fault: #{@fault.inspect}>"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,44 +0,0 @@
|
|
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
|
-
# ErrorUserAccess_Error1 class.
|
8
|
-
class ErrorUserAccessError1Exception < APIException
|
9
|
-
SKIP = Object.new
|
10
|
-
private_constant :SKIP
|
11
|
-
|
12
|
-
# TODO: Write general description for this method
|
13
|
-
# @return [ErrorUserAccessError]
|
14
|
-
attr_accessor :error
|
15
|
-
|
16
|
-
# The constructor.
|
17
|
-
# @param [String] The reason for raising an exception.
|
18
|
-
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
-
def initialize(reason, response)
|
20
|
-
super(reason, response)
|
21
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
-
unbox(hash)
|
23
|
-
end
|
24
|
-
|
25
|
-
# Populates this object by extracting properties from a hash.
|
26
|
-
# @param [Hash] The deserialized response sent by the server in the
|
27
|
-
# response body.
|
28
|
-
def unbox(hash)
|
29
|
-
@error = ErrorUserAccessError.from_hash(hash['Error']) if hash['Error']
|
30
|
-
end
|
31
|
-
|
32
|
-
# Provides a human-readable string representation of the object.
|
33
|
-
def to_s
|
34
|
-
class_name = self.class.name.split('::').last
|
35
|
-
"<#{class_name} error: #{@error}>"
|
36
|
-
end
|
37
|
-
|
38
|
-
# Provides a debugging-friendly string with detailed object information.
|
39
|
-
def inspect
|
40
|
-
class_name = self.class.name.split('::').last
|
41
|
-
"<#{class_name} error: #{@error.inspect}>"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,50 +0,0 @@
|
|
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
|
-
# Utility class for basic authorization.
|
8
|
-
class BasicAuth < CoreLibrary::HeaderAuth
|
9
|
-
include CoreLibrary
|
10
|
-
# Display error message on occurrence of authentication failure.
|
11
|
-
# @returns [String] The oAuth error message.
|
12
|
-
def error_message
|
13
|
-
'BasicAuth: username or password is undefined.'
|
14
|
-
end
|
15
|
-
|
16
|
-
# Initialization constructor.
|
17
|
-
def initialize(basic_auth_credentials)
|
18
|
-
auth_params = {}
|
19
|
-
unless basic_auth_credentials.nil? ||
|
20
|
-
basic_auth_credentials.username.nil? ||
|
21
|
-
basic_auth_credentials.password.nil?
|
22
|
-
auth_params['Authorization'] =
|
23
|
-
"Basic #{AuthHelper.get_base64_encoded_value(basic_auth_credentials.username,
|
24
|
-
basic_auth_credentials.password)}"
|
25
|
-
end
|
26
|
-
|
27
|
-
super auth_params
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
# Data class for BasicAuthCredentials.
|
32
|
-
class BasicAuthCredentials
|
33
|
-
attr_reader :username, :password
|
34
|
-
|
35
|
-
def initialize(username:, password:)
|
36
|
-
raise ArgumentError, 'username cannot be nil' if username.nil?
|
37
|
-
raise ArgumentError, 'password cannot be nil' if password.nil?
|
38
|
-
|
39
|
-
@username = username
|
40
|
-
@password = password
|
41
|
-
end
|
42
|
-
|
43
|
-
def clone_with(username: nil, password: nil)
|
44
|
-
username ||= self.username
|
45
|
-
password ||= self.password
|
46
|
-
|
47
|
-
BasicAuthCredentials.new(username: username, password: password)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,123 +0,0 @@
|
|
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
|
-
# AccountResponse Model.
|
8
|
-
class AccountResponse < BaseModel
|
9
|
-
SKIP = Object.new
|
10
|
-
private_constant :SKIP
|
11
|
-
|
12
|
-
# TODO: Write general description for this method
|
13
|
-
# @return [Array[AccountResponseAccountsItems]]
|
14
|
-
attr_accessor :accounts
|
15
|
-
|
16
|
-
# current page
|
17
|
-
# @return [Integer]
|
18
|
-
attr_accessor :current_page
|
19
|
-
|
20
|
-
# Total row count matched for the given input criteria
|
21
|
-
# @return [Integer]
|
22
|
-
attr_accessor :row_count
|
23
|
-
|
24
|
-
# Calculated page count based on page size from the incoming API request and
|
25
|
-
# total number of rows matched for the given input criteria.
|
26
|
-
# @return [Integer]
|
27
|
-
attr_accessor :total_pages
|
28
|
-
|
29
|
-
# Calculated page count based on page size from the incoming API request and
|
30
|
-
# total number of rows matched for the given input criteria.
|
31
|
-
# @return [ErrorStatus]
|
32
|
-
attr_accessor :error
|
33
|
-
|
34
|
-
# API Request ID
|
35
|
-
# @return [String]
|
36
|
-
attr_accessor :request_id
|
37
|
-
|
38
|
-
# A mapping from model property names to API property names.
|
39
|
-
def self.names
|
40
|
-
@_hash = {} if @_hash.nil?
|
41
|
-
@_hash['accounts'] = 'Accounts'
|
42
|
-
@_hash['current_page'] = 'CurrentPage'
|
43
|
-
@_hash['row_count'] = 'RowCount'
|
44
|
-
@_hash['total_pages'] = 'TotalPages'
|
45
|
-
@_hash['error'] = 'Error'
|
46
|
-
@_hash['request_id'] = 'RequestId'
|
47
|
-
@_hash
|
48
|
-
end
|
49
|
-
|
50
|
-
# An array for optional fields
|
51
|
-
def self.optionals
|
52
|
-
%w[
|
53
|
-
accounts
|
54
|
-
current_page
|
55
|
-
row_count
|
56
|
-
total_pages
|
57
|
-
error
|
58
|
-
request_id
|
59
|
-
]
|
60
|
-
end
|
61
|
-
|
62
|
-
# An array for nullable fields
|
63
|
-
def self.nullables
|
64
|
-
[]
|
65
|
-
end
|
66
|
-
|
67
|
-
def initialize(accounts = SKIP, current_page = SKIP, row_count = SKIP,
|
68
|
-
total_pages = SKIP, error = SKIP, request_id = SKIP)
|
69
|
-
@accounts = accounts unless accounts == SKIP
|
70
|
-
@current_page = current_page unless current_page == SKIP
|
71
|
-
@row_count = row_count unless row_count == SKIP
|
72
|
-
@total_pages = total_pages unless total_pages == SKIP
|
73
|
-
@error = error unless error == SKIP
|
74
|
-
@request_id = request_id unless request_id == SKIP
|
75
|
-
end
|
76
|
-
|
77
|
-
# Creates an instance of the object from a hash.
|
78
|
-
def self.from_hash(hash)
|
79
|
-
return nil unless hash
|
80
|
-
|
81
|
-
# Extract variables from the hash.
|
82
|
-
# Parameter is an array, so we need to iterate through it
|
83
|
-
accounts = nil
|
84
|
-
unless hash['Accounts'].nil?
|
85
|
-
accounts = []
|
86
|
-
hash['Accounts'].each do |structure|
|
87
|
-
accounts << (AccountResponseAccountsItems.from_hash(structure) if structure)
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
accounts = SKIP unless hash.key?('Accounts')
|
92
|
-
current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP
|
93
|
-
row_count = hash.key?('RowCount') ? hash['RowCount'] : SKIP
|
94
|
-
total_pages = hash.key?('TotalPages') ? hash['TotalPages'] : SKIP
|
95
|
-
error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
|
96
|
-
request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
|
97
|
-
|
98
|
-
# Create object from extracted values.
|
99
|
-
AccountResponse.new(accounts,
|
100
|
-
current_page,
|
101
|
-
row_count,
|
102
|
-
total_pages,
|
103
|
-
error,
|
104
|
-
request_id)
|
105
|
-
end
|
106
|
-
|
107
|
-
# Provides a human-readable string representation of the object.
|
108
|
-
def to_s
|
109
|
-
class_name = self.class.name.split('::').last
|
110
|
-
"<#{class_name} accounts: #{@accounts}, current_page: #{@current_page}, row_count:"\
|
111
|
-
" #{@row_count}, total_pages: #{@total_pages}, error: #{@error}, request_id:"\
|
112
|
-
" #{@request_id}>"
|
113
|
-
end
|
114
|
-
|
115
|
-
# Provides a debugging-friendly string with detailed object information.
|
116
|
-
def inspect
|
117
|
-
class_name = self.class.name.split('::').last
|
118
|
-
"<#{class_name} accounts: #{@accounts.inspect}, current_page: #{@current_page.inspect},"\
|
119
|
-
" row_count: #{@row_count.inspect}, total_pages: #{@total_pages.inspect}, error:"\
|
120
|
-
" #{@error.inspect}, request_id: #{@request_id.inspect}>"
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end
|