data-and-reporting-sdk 1.0.0 → 1.2.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 +15 -16
- data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +9 -9
- data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +210 -210
- data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +221 -221
- data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +9 -9
- data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +354 -354
- data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +15 -15
- data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +15 -15
- data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +15 -15
- data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +15 -15
- data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +54 -10
- data/lib/shell_data_reporting_ap_is/models/account_access.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/account_request.rb +17 -26
- data/lib/shell_data_reporting_ap_is/models/account_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +29 -53
- data/lib/shell_data_reporting_ap_is/models/accounts.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/address.rb +4 -11
- data/lib/shell_data_reporting_ap_is/models/audit_request.rb +17 -25
- data/lib/shell_data_reporting_ap_is/models/audit_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +50 -63
- data/lib/shell_data_reporting_ap_is/models/bank_account.rb +5 -13
- data/lib/shell_data_reporting_ap_is/models/base_model.rb +76 -28
- data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +9 -18
- data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +14 -29
- data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +3 -9
- data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +8 -19
- data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +6 -12
- data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +10 -20
- data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +3 -7
- data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +15 -31
- data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +5 -10
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/current_volume.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +31 -45
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +5 -12
- data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +7 -18
- data/lib/shell_data_reporting_ap_is/models/eid_access.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/eid_document.rb +11 -16
- data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +10 -15
- data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/error_details.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/error_status.rb +11 -2
- data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/exception_product.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/fee_item.rb +35 -71
- data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +5 -11
- data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +4 -10
- data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +3 -7
- data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +104 -0
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +9 -20
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +7 -14
- data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +86 -107
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +5 -7
- data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +21 -31
- data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +2 -7
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +21 -31
- data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +5 -10
- data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +39 -48
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +12 -25
- data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +21 -32
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +70 -122
- data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +11 -22
- data/lib/shell_data_reporting_ap_is/models/payer_access.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/payer_details.rb +49 -92
- data/lib/shell_data_reporting_ap_is/models/payer_request.rb +9 -12
- data/lib/shell_data_reporting_ap_is/models/payer_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/payers.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +8 -17
- data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +5 -6
- data/lib/shell_data_reporting_ap_is/models/price_list.rb +25 -45
- data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +28 -44
- data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +41 -59
- data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +20 -46
- data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +91 -201
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +22 -28
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +11 -2
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +91 -141
- data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +3 -6
- data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +1 -4
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +6 -14
- data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +29 -60
- data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/role.rb +3 -6
- data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +19 -27
- data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +9 -16
- data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +3 -7
- data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +4 -11
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +11 -18
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +2 -7
- data/lib/shell_data_reporting_ap_is/models/site_location.rb +11 -2
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +1 -3
- data/lib/shell_data_reporting_ap_is/models/tier.rb +8 -12
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +47 -92
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +12 -21
- data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +21 -33
- data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +2 -6
- data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +1 -2
- data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +3 -8
- data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +6 -14
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +2 -4
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +2 -5
- data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +2 -5
- data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +9 -9
- data/lib/shell_data_reporting_ap_is/utilities/union_type_lookup.rb +35 -0
- data/lib/shell_data_reporting_ap_is.rb +3 -0
- data/test/controllers/controller_test_base.rb +0 -5
- data/test/controllers/test_invoice_controller.rb +1 -1
- data/test/controllers/test_transaction_controller.rb +83 -75
- metadata +12 -16
@@ -50,10 +50,8 @@ module ShellDataReportingApIs
|
|
50
50
|
[]
|
51
51
|
end
|
52
52
|
|
53
|
-
def initialize(service_reference = SKIP,
|
54
|
-
|
55
|
-
error = SKIP,
|
56
|
-
request_id = SKIP)
|
53
|
+
def initialize(service_reference = SKIP, update_odometer_references = SKIP,
|
54
|
+
error = SKIP, request_id = SKIP)
|
57
55
|
@service_reference = service_reference unless service_reference == SKIP
|
58
56
|
unless update_odometer_references == SKIP
|
59
57
|
@update_odometer_references =
|
@@ -127,20 +127,12 @@ module ShellDataReportingApIs
|
|
127
127
|
]
|
128
128
|
end
|
129
129
|
|
130
|
-
def initialize(date = SKIP,
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
site_group_name = SKIP,
|
137
|
-
total_volume = SKIP,
|
138
|
-
total_gross = SKIP,
|
139
|
-
total_net = SKIP,
|
140
|
-
currency_code = SKIP,
|
141
|
-
currency_symbol = SKIP,
|
142
|
-
product_group_id = SKIP,
|
143
|
-
product_group_name = SKIP)
|
130
|
+
def initialize(date = SKIP, product_id = SKIP, product_code = SKIP,
|
131
|
+
product_name = SKIP, is_fuel_product = SKIP,
|
132
|
+
site_group_id = SKIP, site_group_name = SKIP,
|
133
|
+
total_volume = SKIP, total_gross = SKIP, total_net = SKIP,
|
134
|
+
currency_code = SKIP, currency_symbol = SKIP,
|
135
|
+
product_group_id = SKIP, product_group_name = SKIP)
|
144
136
|
@date = date unless date == SKIP
|
145
137
|
@product_id = product_id unless product_id == SKIP
|
146
138
|
@product_code = product_code unless product_code == SKIP
|
@@ -75,11 +75,8 @@ module ShellDataReportingApIs
|
|
75
75
|
[]
|
76
76
|
end
|
77
77
|
|
78
|
-
def initialize(col_co_id = SKIP,
|
79
|
-
|
80
|
-
payer_id = SKIP,
|
81
|
-
payer_number = SKIP,
|
82
|
-
include_history = SKIP,
|
78
|
+
def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
|
79
|
+
payer_number = SKIP, include_history = SKIP,
|
83
80
|
include_current_period_volume = SKIP)
|
84
81
|
@col_co_id = col_co_id unless col_co_id == SKIP
|
85
82
|
@col_co_code = col_co_code unless col_co_code == SKIP
|
@@ -56,10 +56,8 @@ module ShellDataReportingApIs
|
|
56
56
|
[]
|
57
57
|
end
|
58
58
|
|
59
|
-
def initialize(configuration = SKIP,
|
60
|
-
|
61
|
-
historical_bonus_paid = SKIP,
|
62
|
-
error = SKIP,
|
59
|
+
def initialize(configuration = SKIP, current_period_consumption = SKIP,
|
60
|
+
historical_bonus_paid = SKIP, error = SKIP,
|
63
61
|
request_id = SKIP)
|
64
62
|
@configuration = configuration unless configuration == SKIP
|
65
63
|
unless current_period_consumption == SKIP
|
@@ -68,11 +68,8 @@ module ShellDataReportingApIs
|
|
68
68
|
[]
|
69
69
|
end
|
70
70
|
|
71
|
-
def initialize(col_co_id = SKIP,
|
72
|
-
|
73
|
-
payer_id = SKIP,
|
74
|
-
payer_number = SKIP,
|
75
|
-
include_history = SKIP)
|
71
|
+
def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
|
72
|
+
payer_number = SKIP, include_history = SKIP)
|
76
73
|
@col_co_id = col_co_id unless col_co_id == SKIP
|
77
74
|
@col_co_code = col_co_code unless col_co_code == SKIP
|
78
75
|
@payer_id = payer_id unless payer_id == SKIP
|
@@ -56,11 +56,8 @@ module ShellDataReportingApIs
|
|
56
56
|
[]
|
57
57
|
end
|
58
58
|
|
59
|
-
def initialize(configuration = SKIP,
|
60
|
-
|
61
|
-
history = SKIP,
|
62
|
-
error = SKIP,
|
63
|
-
request_id = SKIP)
|
59
|
+
def initialize(configuration = SKIP, current_period_consumption = SKIP,
|
60
|
+
history = SKIP, error = SKIP, request_id = SKIP)
|
64
61
|
@configuration = configuration unless configuration == SKIP
|
65
62
|
unless current_period_consumption == SKIP
|
66
63
|
@current_period_consumption =
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
module ShellDataReportingApIs
|
7
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
|
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,35 @@
|
|
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
|
+
# The `UnionTypeLookUp` class serves as a utility class for
|
8
|
+
# storing and managing type combinator templates. It acts as a container for the templates
|
9
|
+
# used in handling various oneof/anyof instances within the sdk.
|
10
|
+
class UnionTypeLookUp
|
11
|
+
include CoreLibrary
|
12
|
+
# rubocop:disable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
|
13
|
+
def self.union_types
|
14
|
+
{
|
15
|
+
:PricedTransactionResponseTransactionsItemsLocation => OneOf.new(
|
16
|
+
[
|
17
|
+
LeafType.new(Object, UnionTypeContext.new(
|
18
|
+
is_nullable: true
|
19
|
+
)),
|
20
|
+
LeafType.new(PricedTransactionItemsLocationItems)
|
21
|
+
],
|
22
|
+
UnionTypeContext.new(
|
23
|
+
is_array: true,
|
24
|
+
is_optional: true
|
25
|
+
)
|
26
|
+
)
|
27
|
+
}
|
28
|
+
end
|
29
|
+
# rubocop:enable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
|
30
|
+
|
31
|
+
def self.get(name)
|
32
|
+
UnionTypeLookUp.union_types[name]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -16,6 +16,7 @@ require_relative 'shell_data_reporting_ap_is/client'
|
|
16
16
|
# Utilities
|
17
17
|
require_relative 'shell_data_reporting_ap_is/utilities/file_wrapper'
|
18
18
|
require_relative 'shell_data_reporting_ap_is/utilities/date_time_helper'
|
19
|
+
require_relative 'shell_data_reporting_ap_is/utilities/union_type_lookup'
|
19
20
|
|
20
21
|
# Http
|
21
22
|
require_relative 'shell_data_reporting_ap_is/http/http_call_back'
|
@@ -198,6 +199,8 @@ require_relative 'shell_data_reporting_ap_is/models/' \
|
|
198
199
|
'statement_of_account_request_filters'
|
199
200
|
require_relative 'shell_data_reporting_ap_is/models/' \
|
200
201
|
'invoice_dates_request_filters'
|
202
|
+
require_relative 'shell_data_reporting_ap_is/models/' \
|
203
|
+
'fleetmanagement_v1_user_loggedinuser_request'
|
201
204
|
require_relative 'shell_data_reporting_ap_is/models/o_auth_token'
|
202
205
|
require_relative 'shell_data_reporting_ap_is/models/' \
|
203
206
|
'priced_transaction_req_v2_invoice_status_enum'
|
@@ -25,10 +25,5 @@ class ControllerTestBase < Minitest::Test
|
|
25
25
|
def setup_class
|
26
26
|
_config = create_configuration
|
27
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
28
|
end
|
34
29
|
end
|
@@ -96,7 +96,7 @@ class InvoiceControllerTests < ControllerTestBase
|
|
96
96
|
# * Search invoices including einvoices
|
97
97
|
# * Search invoices by summary document
|
98
98
|
# * Search invoices by statement of account
|
99
|
-
# * Search invoices by fixed and custom date periods
|
99
|
+
# * Search invoices by fixed and custom date periods
|
100
100
|
def test_invoice_summary
|
101
101
|
# Parameters for the API call
|
102
102
|
request_id = '2b0cbe11-f109-4c43-9201-49af0370df1c'
|
@@ -13,16 +13,25 @@ class TransactionControllerTests < ControllerTestBase
|
|
13
13
|
@response_catcher = @controller.http_call_back
|
14
14
|
end
|
15
15
|
|
16
|
-
# This endpoint allows querying last 48 hours of transaction data of Shell Card (i.e. Priced, Billed, Unbilled etc. sales items). It provides a flexible search criteria and supports pagination. E.g., if the request is made at 08:30 AM on 18 Aug 2022 then transactions until 16 Aug 2022 08:30 AM (including) can be retrieved.
|
17
|
-
#
|
18
|
-
|
19
|
-
|
20
|
-
#
|
21
|
-
# * Search by
|
22
|
-
#
|
23
|
-
# * Search by
|
24
|
-
#
|
25
|
-
# * Search by
|
16
|
+
# This endpoint allows querying last 48 hours of transaction data of Shell Card (i.e. Priced, Billed, Unbilled etc. sales items). It provides a flexible search criteria and supports pagination. E.g., if the request is made at 08:30 AM on 18 Aug 2022 then transactions until 16 Aug 2022 08:30 AM (including) can be retrieved.
|
17
|
+
#
|
18
|
+
#
|
19
|
+
##### Supported operations
|
20
|
+
#
|
21
|
+
# * Search by Date and Time range (within the last 48 hours only)
|
22
|
+
#
|
23
|
+
# * Search by Payer and/or Account number
|
24
|
+
#
|
25
|
+
# * Search by Card
|
26
|
+
#
|
27
|
+
# * Search by Purchased Country
|
28
|
+
#
|
29
|
+
# * Search by Transaction posting date
|
30
|
+
#
|
31
|
+
# * Search by Driver Name or Vehicle registration number
|
32
|
+
#
|
33
|
+
# * Search by Fuel only transactions
|
34
|
+
#
|
26
35
|
# * Search by Product and/or Product group
|
27
36
|
def test_recent_transactions_new
|
28
37
|
# Parameters for the API call
|
@@ -121,7 +130,7 @@ class TransactionControllerTests < ControllerTestBase
|
|
121
130
|
# * EVChargeStartDate
|
122
131
|
# * EVChargeStartTime
|
123
132
|
# * EVChargeEndDate
|
124
|
-
# * EVChargeEndTime
|
133
|
+
# * EVChargeEndTime
|
125
134
|
def test_priced_transactions_v2
|
126
135
|
# Parameters for the API call
|
127
136
|
request_id = '2b0cbe11-f109-4c43-9201-49af0370df1c'
|
@@ -163,70 +172,69 @@ class TransactionControllerTests < ControllerTestBase
|
|
163
172
|
'2452","Additional2":"GBALLEGO0002452","Additional3":"GBALLEGO0002452","'\
|
164
173
|
'Additional4":"GBALLEGO0002452","AllowClearing":"Null","AuthorisationCod'\
|
165
174
|
'e":300796,"TransactionStatus":"Y","DriverName":"SATTY BHAMRA","CardExpi'\
|
166
|
-
'ryPeriod":2204,"CardExpiry":"
|
167
|
-
'
|
168
|
-
'
|
169
|
-
'
|
170
|
-
'
|
171
|
-
'
|
172
|
-
'
|
173
|
-
'
|
174
|
-
'
|
175
|
-
'
|
176
|
-
'
|
177
|
-
'
|
178
|
-
'
|
179
|
-
'
|
180
|
-
'
|
181
|
-
'
|
182
|
-
'
|
183
|
-
'
|
184
|
-
'
|
185
|
-
'
|
186
|
-
'
|
187
|
-
'"
|
188
|
-
'
|
189
|
-
'
|
190
|
-
'
|
191
|
-
'
|
192
|
-
'":
|
193
|
-
'
|
194
|
-
'
|
195
|
-
'
|
196
|
-
'
|
197
|
-
'
|
198
|
-
'
|
199
|
-
'
|
200
|
-
'
|
201
|
-
'
|
202
|
-
'
|
203
|
-
'
|
204
|
-
'
|
205
|
-
'
|
206
|
-
'
|
207
|
-
'
|
208
|
-
'
|
209
|
-
'908971030","
|
210
|
-
'
|
211
|
-
'
|
212
|
-
'
|
213
|
-
'
|
214
|
-
'
|
215
|
-
'
|
216
|
-
'
|
217
|
-
'
|
218
|
-
'
|
219
|
-
'
|
220
|
-
'
|
221
|
-
'
|
222
|
-
'
|
223
|
-
'
|
224
|
-
'
|
225
|
-
'
|
226
|
-
'
|
227
|
-
'
|
228
|
-
'
|
229
|
-
':0,"FuelOnly":true}],"Page":3,"PageSize":30,"TotalPages":5}'
|
175
|
+
'ryPeriod":2204,"CardExpiry":"20220101","CardGroupId":40000,"CardGroupNa'\
|
176
|
+
'me":"006240 FIRE BRIGHT SOLUTIONS","IssuerCode":7002,"CardPAN":"7002053'\
|
177
|
+
'465789891000","ReleaseCode":9,"CardSequenceNumber":617,"CardType":"GB S'\
|
178
|
+
'TD FLT NAT SINGLE R9","ColCoCode":"014","UnitDiscountInvoiceCurrency":-'\
|
179
|
+
'0.0051,"ColCoExchangeRate":0.851858,"InvoiceCurrencySymbol":"GBP","Corr'\
|
180
|
+
'ectionFlag":true,"CRMNumber":10,"CustomerCountry":"United Kingdom","Cus'\
|
181
|
+
'tomerCurrencyCode":"GBP","CustomerCurrencySymbol":"£","RebateonNetAmoun'\
|
182
|
+
'tInCustomerCurrency":0,"EffectiveDiscountInCustomerCurrency":-0.22,"Eff'\
|
183
|
+
'ectiveUnitDiscountInCustomerCurrency":-0.0051,"UnitPriceInInvoiceCurren'\
|
184
|
+
'cy":1.1024,"InvoiceTax":0,"InvoiceGrossAmount":57.25,"InvoiceNetAmount"'\
|
185
|
+
':47.71,"VATonNetAmountInCustomerCurrency":9.54,"CustomerRetailPriceUnit'\
|
186
|
+
'Gross":0,"CustomerRetailValueTotalGross":57.52,"CustomerRetailValueTota'\
|
187
|
+
'lNet":47.93,"TransactionTypeDescription":9.59,"RebateonNetAmountInTrans'\
|
188
|
+
'actionCurrency":-0.22,"EffectiveDiscountInTrxCurrency":-0.22,"DelCoToCo'\
|
189
|
+
'lCoExchangeRate":0,"Cards":[275549],"UnitDiscountTransactionCurrency":-'\
|
190
|
+
'0.005,"TransactionGrossAmount":57.25,"TransactionNetAmount":47.71,"Tran'\
|
191
|
+
'sactionTax":9.54,"VATonNetAmount":9.54,"DelcoListPriceUnitNet":0,"Delco'\
|
192
|
+
'RetailPriceUnitGross":1.32888,"UnitPriceInTransactionCurrency":1.1074,"'\
|
193
|
+
'DelcoRetailPriceUnitNet":1.1074,"DelcoRetailValueTotalGross":57.52,"Del'\
|
194
|
+
'coRetailValueTotalNet":47.93,"TransactionCurrencySymbol":"$","DiscountT'\
|
195
|
+
'ype":"Retail","DisputeStatus":false,"IsShellSite":false,"FleetIdInput":'\
|
196
|
+
'"YG67OUM","IncomingProductCode":23,"PostingDate":"20210802","PostingTim'\
|
197
|
+
'e":"14:15:22","ProductCode":30,"ProductName":"Unleaded - Medium octane"'\
|
198
|
+
',"ProductGroupId":22,"IncomingCurrencyCode":"GBP","IncomingSiteDescript'\
|
199
|
+
'ion":"Shell Broadway Ring","Location":"Shell Broadway Ring","SiteName":'\
|
200
|
+
'"Shell Broadway Ring","SiteCode":32,"IncomingSiteNumber":15,"InvoiceCur'\
|
201
|
+
'rencyCode":"GBP","InvoiceDate":"20210802","InvoiceNumber":3201016193,"F'\
|
202
|
+
'uelProduct":true,"VATApplicable":"Y","PayerName":"Colours Services Ltd"'\
|
203
|
+
',"PayerNumber":"GB12121212","ParentCustomerNumber":"GB12121212","PayerG'\
|
204
|
+
'roup":"H312066","PayerGroupName":"12162566 - FUEL CARD SERVICE","CheckD'\
|
205
|
+
'igit":6,"NetInvoiceIndicator":"Y","DelcoCode":5,"NetworkCode":3,"Purcha'\
|
206
|
+
'sedInCountry":"United Kingdom","SiteCountry":"United Kingdom","VATCount'\
|
207
|
+
'ry":"United Kingdom","DelcoName":"Shell U.K. Oil Products Limited","Net'\
|
208
|
+
'work":"Shell","OdometerInput":0,"OriginalSalesItemId":"Null","FleetIDDe'\
|
209
|
+
'scription":"YG67OUM","ParentCustomerId":6494,"PINIndicator":"Y, N","Pro'\
|
210
|
+
'ductGroupName":"Fees","PurchasedInCountryCode":"GB","Quantity":43.28,"R'\
|
211
|
+
'ebateRate":0.0022,"ReceiptNumber":6803,"RefundFlag":"Y","SiteGroupId":2'\
|
212
|
+
'02,"SiteGroupName":"CZ 9100 ECONOMY NETWORK","Latitude":53.83606,"Longi'\
|
213
|
+
'tude":-1.61854,"DelCoExchangeRate":0.851858,"EuroRebateAmount":-0.25825'\
|
214
|
+
'9,"NetEuroAmount":56.01,"EuroVATAmount":11.2,"ParentCustomerName":"FUEL'\
|
215
|
+
' CARD SERVICES LTD","IsInvoiced":false,"TransactionCurrencyCode":"GBP",'\
|
216
|
+
'"CreditDebitCode":"D or C","TransactionDate":"20210801","TransactionTim'\
|
217
|
+
'e":"12:16:58","TransactionItemId":"H305908971030","TrnIdentifier":"H305'\
|
218
|
+
'908971030","Type":"SALE","TransactionLine":1,"TransactionType":"Purchas'\
|
219
|
+
'e","UTCOffset":"Europe/London","VATCategory":"United Kingdom Standard V'\
|
220
|
+
'AT Rate","VATRate":0.2,"VehicleRegistration":"YG67OUM","IsCancelled":"Y'\
|
221
|
+
'","ColCoGrossAmount":57.25,"ColCoNetAmount":47.71,"ColCoVATAmount":9.54'\
|
222
|
+
',"OriginalCurrencySymbol":"$","OriginalCurrencyCode":"$","OriginalVATAm'\
|
223
|
+
'ount":0,"EmbossText":"PARKLANE PROPERTIES LTD","OriginalExchangeRate":0'\
|
224
|
+
',"OriginalTransactionItemInvoiceDate":"20220202","FeeTypeId":1,"LineIte'\
|
225
|
+
'mDescription":true,"FeeRuleDescription":"Simple Fee","Frequency":1,"Fee'\
|
226
|
+
'RuleId":1,"SystemEntryDate":"20210828","SystemEntryTime":"20:21:08","Is'\
|
227
|
+
'Manual":"Y","OriginalTransactionItemId":"Y","OriginalTransactionItemInv'\
|
228
|
+
'oiceNumber":6750802,"OriginalTransactionItemInvoiceId":234,"PayerShortN'\
|
229
|
+
'ame":"FUEL CARD SERVICES LTD","ReverseCharge":"Y","OriginalGrossAmount"'\
|
230
|
+
':57.25,"OriginalNetAmount":57.25,"UnitOfMeasure":"L","RoadType":"Nation'\
|
231
|
+
'al Road","CustomerCountryIsoCode":"DE","EVOperator":"Shell Recharge","E'\
|
232
|
+
'VSerialId":"GBALLEGO0002452","EVChargePointSerial":"GBALLEGO0002452","E'\
|
233
|
+
'VChargePointConnectorType":5,"EVChargePointConnectorTypeDescription":"D'\
|
234
|
+
'C 50 kW","EVChargeDuration":"PT3205S","EVChargeStartDate":"2021-08-01",'\
|
235
|
+
'"EVChargeStartTime":"20:08:01","EVChargeEndDate":"2022-08-01","EVCharge'\
|
236
|
+
'EndTime":"20:08:01","HostingCollectingCompanyNumber":0,"TransactionId":'\
|
237
|
+
'0,"FuelOnly":true}],"Page":3,"PageSize":30,"TotalPages":5}'
|
230
238
|
)
|
231
239
|
received_body = JSON.parse(@response_catcher.response.raw_body)
|
232
240
|
assert(ComparisonHelper.match_body(expected_body, received_body))
|
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: 1.
|
4
|
+
version: 1.2.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: 2024-
|
11
|
+
date: 2024-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apimatic_core_interfaces
|
@@ -16,62 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.
|
19
|
+
version: 0.2.1
|
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.1
|
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.11
|
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.11
|
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.4
|
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.4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
- - ">="
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version: 5.14.1
|
61
|
+
version: 5.24.0
|
65
62
|
type: :development
|
66
63
|
prerelease: false
|
67
64
|
version_requirements: !ruby/object:Gem::Requirement
|
68
65
|
requirements:
|
69
66
|
- - "~>"
|
70
67
|
- !ruby/object:Gem::Version
|
71
|
-
version:
|
72
|
-
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: 5.14.1
|
68
|
+
version: 5.24.0
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
70
|
name: minitest-proveit
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -179,6 +173,7 @@ files:
|
|
179
173
|
- lib/shell_data_reporting_ap_is/models/fee_summary_response.rb
|
180
174
|
- lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb
|
181
175
|
- lib/shell_data_reporting_ap_is/models/finance_currency.rb
|
176
|
+
- lib/shell_data_reporting_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb
|
182
177
|
- lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb
|
183
178
|
- lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb
|
184
179
|
- lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb
|
@@ -272,6 +267,7 @@ files:
|
|
272
267
|
- lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb
|
273
268
|
- lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb
|
274
269
|
- lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb
|
270
|
+
- lib/shell_data_reporting_ap_is/utilities/union_type_lookup.rb
|
275
271
|
- test/controllers/controller_test_base.rb
|
276
272
|
- test/controllers/test_invoice_controller.rb
|
277
273
|
- test/controllers/test_transaction_controller.rb
|