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,878 @@
|
|
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
|
+
# TransactionController
|
8
|
+
class TransactionController < BaseController
|
9
|
+
# This API allows querying transaction data (i.e. Priced, Billed and
|
10
|
+
# Unbilled sales items). It provides a flexible search criteria and supports
|
11
|
+
# paging.
|
12
|
+
# Transactions that are posted but not yet priced, billed or that are in
|
13
|
+
# error will not be returned by this API. The API also supports returning
|
14
|
+
# Fee Items.
|
15
|
+
# #### Supported operations
|
16
|
+
# * Get sales items and fee transactions
|
17
|
+
# * Search by invoice status
|
18
|
+
# * Search by fixed date period
|
19
|
+
# * Search by date range
|
20
|
+
# * Search by account
|
21
|
+
# * Search by card
|
22
|
+
# * Get sales items only
|
23
|
+
# * Search by transaction Id or location
|
24
|
+
# * Search by transaction posting date
|
25
|
+
# * Search by invoice number or date
|
26
|
+
# * Search by driver name or vehicle registration number
|
27
|
+
# * Search by card group
|
28
|
+
# * Search by fuel only transactions
|
29
|
+
# * Search by product
|
30
|
+
#
|
31
|
+
# This API fetches transactions for a period based on the below parameters
|
32
|
+
# and priority order:
|
33
|
+
# 1. InvoiceNumber
|
34
|
+
# 2. InvoiceDate
|
35
|
+
# 3. FromDate, ToDate
|
36
|
+
# 4. PostingFromDate, PostingToDate (Can be used only when IncludeFees =
|
37
|
+
# false)
|
38
|
+
# 5. InvoiceDateFrom, InvoiceDateTo
|
39
|
+
# 6. Period
|
40
|
+
# This API considers only one of the above set of parameters at a time. For
|
41
|
+
# example, if InvoiceNumber and Period are provided in the input then Period
|
42
|
+
# is ignored and transactions associated to the given invoice number are
|
43
|
+
# returned.
|
44
|
+
# If none of the above parameters are provided then last 7 days transactions
|
45
|
+
# will be fetched.
|
46
|
+
# This operation can fetch transactions that are old up to 24 (configurable)
|
47
|
+
# months. However, the date range between any of the ‘From’ and ‘To’ dates
|
48
|
+
# in the above combination cannot be more than 210 (configurable) days.
|
49
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
50
|
+
# specific environment which needs to be passed by the client.
|
51
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
52
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
53
|
+
# back in the response from the request.
|
54
|
+
# @param [PriceTransactionRequest] body Optional parameter: Priced
|
55
|
+
# Transaction Request Body
|
56
|
+
# @return [PricedTransactionResponse] response from the API call
|
57
|
+
def priced_transactions(apikey,
|
58
|
+
request_id,
|
59
|
+
body: nil)
|
60
|
+
new_api_call_builder
|
61
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
62
|
+
'/fleetmanagement/v1/transaction/pricedtransactions',
|
63
|
+
Server::SHELL)
|
64
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
65
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
66
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
67
|
+
.body_param(new_parameter(body))
|
68
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
69
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
70
|
+
.auth(Single.new('BasicAuth')))
|
71
|
+
.response(new_response_handler
|
72
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
73
|
+
.deserialize_into(PricedTransactionResponse.method(:from_hash))
|
74
|
+
.local_error('400',
|
75
|
+
"The server cannot or will not process the request due to'\
|
76
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
77
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
78
|
+
' or deceptive request routing).",
|
79
|
+
DefaultErrorException)
|
80
|
+
.local_error('401',
|
81
|
+
"The request has not been applied because it lacks valid '\
|
82
|
+
' authentication credentials for the target resource.\r\n",
|
83
|
+
DefaultErrorException)
|
84
|
+
.local_error('403',
|
85
|
+
"The server understood the request but refuses to authorize it.'\
|
86
|
+
'\r\n",
|
87
|
+
ErrorUserAccessError1Exception)
|
88
|
+
.local_error('404',
|
89
|
+
"The origin server did not find a current representation for'\
|
90
|
+
' the target resource or is not willing to disclose that one'\
|
91
|
+
' exists.\r\n",
|
92
|
+
DefaultErrorException)
|
93
|
+
.local_error('500',
|
94
|
+
"The server encountered an unexpected condition the prevented it'\
|
95
|
+
' from fulfilling the request.\r\n",
|
96
|
+
DefaultErrorException))
|
97
|
+
.execute
|
98
|
+
end
|
99
|
+
|
100
|
+
# This API returns the transaction summary data (i.e. Priced, Billed and
|
101
|
+
# Unbilled sales items). It provides a flexible search criteria.
|
102
|
+
# The API also supports returning Fee Items. Transactions posted for fee
|
103
|
+
# items that are in error are not included in the summary.
|
104
|
+
# The endpoint supports the exact same search criteria as the endpoint
|
105
|
+
# *transaction/prciedtransactions*.
|
106
|
+
# #### Supported operations
|
107
|
+
# * Get sales items and fee transactions
|
108
|
+
# * Search by invoice status
|
109
|
+
# * Search by fixed date period
|
110
|
+
# * Search by date range
|
111
|
+
# * Search by account
|
112
|
+
# * Search by card
|
113
|
+
# * Get sales items only
|
114
|
+
# * Search by transaction Id or location
|
115
|
+
# * Search by transaction posting date
|
116
|
+
# * Search by invoice number or date
|
117
|
+
# * Search by driver name or vehicle registration number
|
118
|
+
# * Search by card group
|
119
|
+
# * Search by fuel only transactions
|
120
|
+
# * Search by product
|
121
|
+
#
|
122
|
+
# This API fetches transactions for a period based on the below parameters
|
123
|
+
# and priority order:
|
124
|
+
# 1. InvoiceNumber
|
125
|
+
# 2. InvoiceDate
|
126
|
+
# 3. FromDate, ToDate
|
127
|
+
# 4. PostingFromDate, PostingToDate (Can be used only when IncludeFees =
|
128
|
+
# false)
|
129
|
+
# 5. InvoiceDateFrom, InvoiceDateTo
|
130
|
+
# 6. Period
|
131
|
+
# This API considers only one of the above set of parameters at a time. For
|
132
|
+
# example, if InvoiceNumber and Period are provided in the input then Period
|
133
|
+
# is ignored and transactions associated to the given invoice number are
|
134
|
+
# returned.
|
135
|
+
# If none of the above parameters are provided then last 7 days transactions
|
136
|
+
# will be fetched.
|
137
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
138
|
+
# specific environment which needs to be passed by the client.
|
139
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
140
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
141
|
+
# back in the response from the request.
|
142
|
+
# @param [PriceTransSummaryRequest] body Optional parameter: PricedSummary
|
143
|
+
# RequestBody
|
144
|
+
# @return [PricedTransSummaryResponse] response from the API call
|
145
|
+
def priced_transactions_summary(apikey,
|
146
|
+
request_id,
|
147
|
+
body: nil)
|
148
|
+
new_api_call_builder
|
149
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
150
|
+
'/fleetmanagement/v1/transaction/pricedtransactionssummary',
|
151
|
+
Server::SHELL)
|
152
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
153
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
154
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
155
|
+
.body_param(new_parameter(body))
|
156
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
157
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
158
|
+
.auth(Single.new('BasicAuth')))
|
159
|
+
.response(new_response_handler
|
160
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
161
|
+
.deserialize_into(PricedTransSummaryResponse.method(:from_hash))
|
162
|
+
.local_error('400',
|
163
|
+
"The server cannot or will not process the request due to'\
|
164
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
165
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
166
|
+
' or deceptive request routing).",
|
167
|
+
DefaultErrorException)
|
168
|
+
.local_error('401',
|
169
|
+
"The request has not been applied because it lacks valid '\
|
170
|
+
' authentication credentials for the target resource.\r\n",
|
171
|
+
DefaultErrorException)
|
172
|
+
.local_error('403',
|
173
|
+
"The server understood the request but refuses to authorize it.'\
|
174
|
+
'\r\n",
|
175
|
+
ErrorUserAccessError1Exception)
|
176
|
+
.local_error('404',
|
177
|
+
"The origin server did not find a current representation for'\
|
178
|
+
' the target resource or is not willing to disclose that one'\
|
179
|
+
' exists.\r\n",
|
180
|
+
DefaultErrorException)
|
181
|
+
.local_error('500',
|
182
|
+
"The server encountered an unexpected condition the prevented it'\
|
183
|
+
' from fulfilling the request.\r\n",
|
184
|
+
DefaultErrorException))
|
185
|
+
.execute
|
186
|
+
end
|
187
|
+
|
188
|
+
# This API allows querying transaction data (i.e. Priced, Billed and
|
189
|
+
# Unbilled sales items) for multiple payers. It provides a flexible search
|
190
|
+
# criteria and supports paging.
|
191
|
+
# Transactions that are posted but not yet priced, billed or that are in
|
192
|
+
# error will not be returned by this API. The API also supports returning
|
193
|
+
# Fee Items.
|
194
|
+
# At least one payer should be provided. Multiple payers must belong to the
|
195
|
+
# same payer group.
|
196
|
+
# #### Supported operations
|
197
|
+
# * Get sales items and fee transactions for multiple payers
|
198
|
+
# * Search by invoice status
|
199
|
+
# * Search by fixed date period
|
200
|
+
# * Search by date range
|
201
|
+
# * Get sales items only for multiple payers
|
202
|
+
# * Search by transaction location
|
203
|
+
# * Search by transaction posting date
|
204
|
+
# * Search by invoice number or date
|
205
|
+
# * Search by fuel only transactions
|
206
|
+
#
|
207
|
+
# This API fetches transactions for a period based on the below parameters
|
208
|
+
# and priority order:
|
209
|
+
# 1. InvoiceNumber
|
210
|
+
# 2. InvoiceDate
|
211
|
+
# 3. FromDate, ToDate
|
212
|
+
# 4. PostingFromDate, PostingToDate (Can be used only when IncludeFees =
|
213
|
+
# false)
|
214
|
+
# 5. InvoiceDateFrom, InvoiceDateTo
|
215
|
+
# 6. Period
|
216
|
+
# This API considers only one of the above set of parameters at a time. For
|
217
|
+
# example, if InvoiceNumber and Period are provided in the input then Period
|
218
|
+
# is ignored and transactions associated to the given invoice number are
|
219
|
+
# returned.
|
220
|
+
# If none of the above parameters are provided then last 7 days transactions
|
221
|
+
# will be fetched.
|
222
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
223
|
+
# specific environment which needs to be passed by the client.
|
224
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
225
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
226
|
+
# back in the response from the request.
|
227
|
+
# @param [MultiPricedTransactionRequest] body Optional parameter: MultiPayer
|
228
|
+
# RequestBody
|
229
|
+
# @return [MultiPricedTransactionResponse] response from the API call
|
230
|
+
def multipriced_transactions(apikey,
|
231
|
+
request_id,
|
232
|
+
body: nil)
|
233
|
+
new_api_call_builder
|
234
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
235
|
+
'/fleetmanagement/v1/transaction/multipayerspricedtransactions',
|
236
|
+
Server::SHELL)
|
237
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
238
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
239
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
240
|
+
.body_param(new_parameter(body))
|
241
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
242
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
243
|
+
.auth(Single.new('BasicAuth')))
|
244
|
+
.response(new_response_handler
|
245
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
246
|
+
.deserialize_into(MultiPricedTransactionResponse.method(:from_hash))
|
247
|
+
.local_error('400',
|
248
|
+
"The server cannot or will not process the request due to'\
|
249
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
250
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
251
|
+
' or deceptive request routing).",
|
252
|
+
DefaultErrorException)
|
253
|
+
.local_error('401',
|
254
|
+
"The request has not been applied because it lacks valid '\
|
255
|
+
' authentication credentials for the target resource.\r\n",
|
256
|
+
DefaultErrorException)
|
257
|
+
.local_error('403',
|
258
|
+
"The server understood the request but refuses to authorize it.'\
|
259
|
+
'\r\n",
|
260
|
+
ErrorUserAccessError1Exception)
|
261
|
+
.local_error('404',
|
262
|
+
"The origin server did not find a current representation for'\
|
263
|
+
' the target resource or is not willing to disclose that one'\
|
264
|
+
' exists.\r\n",
|
265
|
+
DefaultErrorException)
|
266
|
+
.local_error('500',
|
267
|
+
"The server encountered an unexpected condition the prevented it'\
|
268
|
+
' from fulfilling the request.\r\n",
|
269
|
+
DefaultErrorException))
|
270
|
+
.execute
|
271
|
+
end
|
272
|
+
|
273
|
+
# This operation is to provide the expenditure analysis for a card for the
|
274
|
+
# past 7 months.
|
275
|
+
# The response contains a daily summary of the transactions (billed &
|
276
|
+
# unbilled) from 1st of the last 7 months for the requested card grouped by
|
277
|
+
# card, site-group and product.
|
278
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
279
|
+
# specific environment which needs to be passed by the client.
|
280
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
281
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
282
|
+
# back in the response from the request.
|
283
|
+
# @param [CardUsageSummaryRequest] body Optional parameter: Card Usage
|
284
|
+
# Summary RequestBody
|
285
|
+
# @return [CardUsageSummaryResponse] response from the API call
|
286
|
+
def card_usage_summary(apikey,
|
287
|
+
request_id,
|
288
|
+
body: nil)
|
289
|
+
new_api_call_builder
|
290
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
291
|
+
'/fleetmanagement/v1/transaction/cardusagesummary',
|
292
|
+
Server::SHELL)
|
293
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
294
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
295
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
296
|
+
.body_param(new_parameter(body))
|
297
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
298
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
299
|
+
.auth(Single.new('BasicAuth')))
|
300
|
+
.response(new_response_handler
|
301
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
302
|
+
.deserialize_into(CardUsageSummaryResponse.method(:from_hash))
|
303
|
+
.local_error('400',
|
304
|
+
"The server cannot or will not process the request due to'\
|
305
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
306
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
307
|
+
' or deceptive request routing).",
|
308
|
+
DefaultErrorException)
|
309
|
+
.local_error('401',
|
310
|
+
"The request has not been applied because it lacks valid '\
|
311
|
+
' authentication credentials for the target resource.\r\n",
|
312
|
+
DefaultErrorException)
|
313
|
+
.local_error('403',
|
314
|
+
"The server understood the request but refuses to authorize it.'\
|
315
|
+
'\r\n",
|
316
|
+
ErrorUserAccessError1Exception)
|
317
|
+
.local_error('404',
|
318
|
+
"The origin server did not find a current representation for'\
|
319
|
+
' the target resource or is not willing to disclose that one'\
|
320
|
+
' exists.\r\n",
|
321
|
+
DefaultErrorException)
|
322
|
+
.local_error('500',
|
323
|
+
"The server encountered an unexpected condition the prevented it'\
|
324
|
+
' from fulfilling the request.\r\n",
|
325
|
+
DefaultErrorException))
|
326
|
+
.execute
|
327
|
+
end
|
328
|
+
|
329
|
+
# - This API provides the details of the bonus and/or association bonus
|
330
|
+
# rules setup for the given payer and that are active on the current date.
|
331
|
+
# - This API also returns the details of the monthly breakup of current
|
332
|
+
# period consumption as well as the details of the previously calculated
|
333
|
+
# bonus and consumption of the applicable payers.
|
334
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
335
|
+
# specific environment which needs to be passed by the client.
|
336
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
337
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
338
|
+
# back in the response from the request.
|
339
|
+
# @param [VolumeBasedBonusRequest] body Optional parameter: VolumeBasedBonus
|
340
|
+
# RequestBody
|
341
|
+
# @return [VolumeBasedBonusResponse] response from the API call
|
342
|
+
def volume_based_bonus(apikey,
|
343
|
+
request_id,
|
344
|
+
body: nil)
|
345
|
+
new_api_call_builder
|
346
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
347
|
+
'/fleetmanagement/v1/transaction/volumebasedbonus',
|
348
|
+
Server::SHELL)
|
349
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
350
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
351
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
352
|
+
.body_param(new_parameter(body))
|
353
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
354
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
355
|
+
.auth(Single.new('BasicAuth')))
|
356
|
+
.response(new_response_handler
|
357
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
358
|
+
.deserialize_into(VolumeBasedBonusResponse.method(:from_hash))
|
359
|
+
.local_error('400',
|
360
|
+
"The server cannot or will not process the request due to'\
|
361
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
362
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
363
|
+
' or deceptive request routing).",
|
364
|
+
DefaultErrorException)
|
365
|
+
.local_error('401',
|
366
|
+
"The request has not been applied because it lacks valid '\
|
367
|
+
' authentication credentials for the target resource.\r\n",
|
368
|
+
DefaultErrorException)
|
369
|
+
.local_error('403',
|
370
|
+
"The server understood the request but refuses to authorize it.'\
|
371
|
+
'\r\n",
|
372
|
+
ErrorUserAccessError1Exception)
|
373
|
+
.local_error('404',
|
374
|
+
"The origin server did not find a current representation for'\
|
375
|
+
' the target resource or is not willing to disclose that one'\
|
376
|
+
' exists.\r\n",
|
377
|
+
DefaultErrorException)
|
378
|
+
.local_error('500',
|
379
|
+
"The server encountered an unexpected condition the prevented it'\
|
380
|
+
' from fulfilling the request.\r\n",
|
381
|
+
DefaultErrorException))
|
382
|
+
.execute
|
383
|
+
end
|
384
|
+
|
385
|
+
# - This API will return the details of the in arrear fee rule applied to
|
386
|
+
# the payer along with details of locations, products, tiers as applied.
|
387
|
+
# - It will also show historical and current volume consumption and related
|
388
|
+
# tier applied for the following month.
|
389
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
390
|
+
# specific environment which needs to be passed by the client.
|
391
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
392
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
393
|
+
# back in the response from the request.
|
394
|
+
# @param [VolumeBasedPricingRequest] body Optional parameter:
|
395
|
+
# VolumeBasedPricing RequestBody
|
396
|
+
# @return [VolumeBasedPricingResponse] response from the API call
|
397
|
+
def volume_based_pricing(apikey,
|
398
|
+
request_id,
|
399
|
+
body: nil)
|
400
|
+
new_api_call_builder
|
401
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
402
|
+
'/fleetmanagement/v1/transaction/volumebasedpricing',
|
403
|
+
Server::SHELL)
|
404
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
405
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
406
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
407
|
+
.body_param(new_parameter(body))
|
408
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
409
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
410
|
+
.auth(Single.new('BasicAuth')))
|
411
|
+
.response(new_response_handler
|
412
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
413
|
+
.deserialize_into(VolumeBasedPricingResponse.method(:from_hash))
|
414
|
+
.local_error('400',
|
415
|
+
"The server cannot or will not process the request due to'\
|
416
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
417
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
418
|
+
' or deceptive request routing).",
|
419
|
+
DefaultErrorException)
|
420
|
+
.local_error('401',
|
421
|
+
"The request has not been applied because it lacks valid '\
|
422
|
+
' authentication credentials for the target resource.\r\n",
|
423
|
+
DefaultErrorException)
|
424
|
+
.local_error('403',
|
425
|
+
"The server understood the request but refuses to authorize it.'\
|
426
|
+
'\r\n",
|
427
|
+
ErrorUserAccessError1Exception)
|
428
|
+
.local_error('404',
|
429
|
+
"The origin server did not find a current representation for'\
|
430
|
+
' the target resource or is not willing to disclose that one'\
|
431
|
+
' exists.\r\n",
|
432
|
+
DefaultErrorException)
|
433
|
+
.local_error('500',
|
434
|
+
"The server encountered an unexpected condition the prevented it'\
|
435
|
+
' from fulfilling the request.\r\n",
|
436
|
+
DefaultErrorException))
|
437
|
+
.execute
|
438
|
+
end
|
439
|
+
|
440
|
+
# This API returns the fee/charges levied from a customer's account in a
|
441
|
+
# billing period or date range. The API returns both billed and unbilled fee
|
442
|
+
# items.
|
443
|
+
# To get the summary of charges, the endpoint *transaction/feessummary*
|
444
|
+
# should be called with the same input criteria.
|
445
|
+
# #### Supported operations
|
446
|
+
# * Get fees by invoice status
|
447
|
+
# * Get fees by date period
|
448
|
+
# * Get fees by account
|
449
|
+
# * Get fees by card Id or PAN
|
450
|
+
# * Get fees by fee type charges
|
451
|
+
# * Get fees including cancelled items
|
452
|
+
# * Get fees by line item description
|
453
|
+
# * Get fees by product
|
454
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
455
|
+
# specific environment which needs to be passed by the client.
|
456
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
457
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
458
|
+
# back in the response from the request.
|
459
|
+
# @param [TransactionFeesRequest] body Optional parameter: Transaction Fees
|
460
|
+
# RequestBody
|
461
|
+
# @return [TransactionFeesResponse] response from the API call
|
462
|
+
def fees(apikey,
|
463
|
+
request_id,
|
464
|
+
body: nil)
|
465
|
+
new_api_call_builder
|
466
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
467
|
+
'/fleetmanagement/v1/transaction/fees',
|
468
|
+
Server::SHELL)
|
469
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
470
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
471
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
472
|
+
.body_param(new_parameter(body))
|
473
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
474
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
475
|
+
.auth(Single.new('BasicAuth')))
|
476
|
+
.response(new_response_handler
|
477
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
478
|
+
.deserialize_into(TransactionFeesResponse.method(:from_hash))
|
479
|
+
.local_error('400',
|
480
|
+
"The server cannot or will not process the request due to'\
|
481
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
482
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
483
|
+
' or deceptive request routing).",
|
484
|
+
DefaultErrorException)
|
485
|
+
.local_error('401',
|
486
|
+
"The request has not been applied because it lacks valid '\
|
487
|
+
' authentication credentials for the target resource.\r\n",
|
488
|
+
DefaultErrorException)
|
489
|
+
.local_error('403',
|
490
|
+
"The server understood the request but refuses to authorize it.'\
|
491
|
+
'\r\n",
|
492
|
+
ErrorUserAccessError1Exception)
|
493
|
+
.local_error('404',
|
494
|
+
"The origin server did not find a current representation for'\
|
495
|
+
' the target resource or is not willing to disclose that one'\
|
496
|
+
' exists.\r\n",
|
497
|
+
DefaultErrorException)
|
498
|
+
.local_error('500',
|
499
|
+
"The server encountered an unexpected condition the prevented it'\
|
500
|
+
' from fulfilling the request.\r\n",
|
501
|
+
DefaultErrorException))
|
502
|
+
.execute
|
503
|
+
end
|
504
|
+
|
505
|
+
# This API returns the summary data of the fee/charges levied from a
|
506
|
+
# customer's account in a billing period or date range. The API returns both
|
507
|
+
# billed and unbilled fee items.
|
508
|
+
# The endpoint supports the exact same search criteria as the endpoint
|
509
|
+
# *transaction/feessummary*.
|
510
|
+
# #### Supported operations
|
511
|
+
# * Get fees by invoice status
|
512
|
+
# * Get fees by date period
|
513
|
+
# * Get fees by account
|
514
|
+
# * Get fees by card Id or PAN
|
515
|
+
# * Get fees by fee type charges
|
516
|
+
# * Get fees including cancelled items
|
517
|
+
# * Get fees by line item description
|
518
|
+
# * Get fees by product
|
519
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
520
|
+
# specific environment which needs to be passed by the client.
|
521
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
522
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
523
|
+
# back in the response from the request.
|
524
|
+
# @param [TransactionFeesRequest] body Optional parameter: FeeSummary
|
525
|
+
# RequestBody
|
526
|
+
# @return [FeeSummaryResponse] response from the API call
|
527
|
+
def fee_summary_response(apikey,
|
528
|
+
request_id,
|
529
|
+
body: nil)
|
530
|
+
new_api_call_builder
|
531
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
532
|
+
'/fleetmanagement/v1/transaction/feessummary',
|
533
|
+
Server::SHELL)
|
534
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
535
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
536
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
537
|
+
.body_param(new_parameter(body))
|
538
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
539
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
540
|
+
.auth(Single.new('BasicAuth')))
|
541
|
+
.response(new_response_handler
|
542
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
543
|
+
.deserialize_into(FeeSummaryResponse.method(:from_hash))
|
544
|
+
.local_error('400',
|
545
|
+
"The server cannot or will not process the request due to'\
|
546
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
547
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
548
|
+
' or deceptive request routing).",
|
549
|
+
DefaultErrorException)
|
550
|
+
.local_error('401',
|
551
|
+
"The request has not been applied because it lacks valid '\
|
552
|
+
' authentication credentials for the target resource.\r\n",
|
553
|
+
DefaultErrorException)
|
554
|
+
.local_error('403',
|
555
|
+
"The server understood the request but refuses to authorize it.'\
|
556
|
+
'\r\n",
|
557
|
+
ErrorUserAccessError1Exception)
|
558
|
+
.local_error('404',
|
559
|
+
"The origin server did not find a current representation for'\
|
560
|
+
' the target resource or is not willing to disclose that one'\
|
561
|
+
' exists.\r\n",
|
562
|
+
DefaultErrorException)
|
563
|
+
.local_error('500',
|
564
|
+
"The server encountered an unexpected condition the prevented it'\
|
565
|
+
' from fulfilling the request.\r\n",
|
566
|
+
DefaultErrorException))
|
567
|
+
.execute
|
568
|
+
end
|
569
|
+
|
570
|
+
# - This API returns the customer an overview of how many transactions, how
|
571
|
+
# much fuel volume used over a given period and the total volume used by a
|
572
|
+
# card
|
573
|
+
# - This operation response will contains card & transaction details for
|
574
|
+
# given period aggregated by payer, account, cardGroup, PAN, DriverName and
|
575
|
+
# VRN
|
576
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
577
|
+
# specific environment which needs to be passed by the client.
|
578
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
579
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
580
|
+
# back in the response from the request.
|
581
|
+
# @param [FuelConsumptionRequest] body Optional parameter: FuelConsumption
|
582
|
+
# RequestBody
|
583
|
+
# @return [FuelConsumptionResponse] response from the API call
|
584
|
+
def fuel_consumption(apikey,
|
585
|
+
request_id,
|
586
|
+
body: nil)
|
587
|
+
new_api_call_builder
|
588
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
589
|
+
'/fleetmanagement/v1/transaction/fuelconsumption',
|
590
|
+
Server::SHELL)
|
591
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
592
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
593
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
594
|
+
.body_param(new_parameter(body))
|
595
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
596
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
597
|
+
.auth(Single.new('BasicAuth')))
|
598
|
+
.response(new_response_handler
|
599
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
600
|
+
.deserialize_into(FuelConsumptionResponse.method(:from_hash))
|
601
|
+
.local_error('400',
|
602
|
+
"The server cannot or will not process the request due to'\
|
603
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
604
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
605
|
+
' or deceptive request routing).",
|
606
|
+
DefaultErrorException)
|
607
|
+
.local_error('401',
|
608
|
+
"The request has not been applied because it lacks valid '\
|
609
|
+
' authentication credentials for the target resource.\r\n",
|
610
|
+
DefaultErrorException)
|
611
|
+
.local_error('403',
|
612
|
+
"The server understood the request but refuses to authorize it.'\
|
613
|
+
'\r\n",
|
614
|
+
ErrorUserAccessError1Exception)
|
615
|
+
.local_error('404',
|
616
|
+
"The origin server did not find a current representation for'\
|
617
|
+
' the target resource or is not willing to disclose that one'\
|
618
|
+
' exists.\r\n",
|
619
|
+
DefaultErrorException)
|
620
|
+
.local_error('500',
|
621
|
+
"The server encountered an unexpected condition the prevented it'\
|
622
|
+
' from fulfilling the request.\r\n",
|
623
|
+
DefaultErrorException))
|
624
|
+
.execute
|
625
|
+
end
|
626
|
+
|
627
|
+
# - This API allows the users to update the odometer readings on the sales
|
628
|
+
# items (transaction data)
|
629
|
+
# - This is an asynchronous operation. If opted, the user will be notified
|
630
|
+
# on completion of processing.
|
631
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
632
|
+
# specific environment which needs to be passed by the client.
|
633
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
634
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
635
|
+
# back in the response from the request.
|
636
|
+
# @param [UpdateOdometerRequest] body Optional parameter: updateOdometer
|
637
|
+
# RequestBody
|
638
|
+
# @return [UpdateOdometerResponse] response from the API call
|
639
|
+
def update_odometer(apikey,
|
640
|
+
request_id,
|
641
|
+
body: nil)
|
642
|
+
new_api_call_builder
|
643
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
644
|
+
'/fleetmanagement/v1/transaction/updateodometer',
|
645
|
+
Server::SHELL)
|
646
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
647
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
648
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
649
|
+
.body_param(new_parameter(body))
|
650
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
651
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
652
|
+
.auth(Single.new('BasicAuth')))
|
653
|
+
.response(new_response_handler
|
654
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
655
|
+
.deserialize_into(UpdateOdometerResponse.method(:from_hash))
|
656
|
+
.local_error('400',
|
657
|
+
"The server cannot or will not process the request due to'\
|
658
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
659
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
660
|
+
' or deceptive request routing).",
|
661
|
+
DefaultErrorException)
|
662
|
+
.local_error('401',
|
663
|
+
"The request has not been applied because it lacks valid '\
|
664
|
+
' authentication credentials for the target resource.\r\n",
|
665
|
+
DefaultErrorException)
|
666
|
+
.local_error('403',
|
667
|
+
"The server understood the request but refuses to authorize it.'\
|
668
|
+
'\r\n",
|
669
|
+
ErrorUserAccessError1Exception)
|
670
|
+
.local_error('404',
|
671
|
+
"The origin server did not find a current representation for'\
|
672
|
+
' the target resource or is not willing to disclose that one'\
|
673
|
+
' exists.\r\n",
|
674
|
+
DefaultErrorException)
|
675
|
+
.local_error('500',
|
676
|
+
"The server encountered an unexpected condition the prevented it'\
|
677
|
+
' from fulfilling the request.\r\n",
|
678
|
+
DefaultErrorException))
|
679
|
+
.execute
|
680
|
+
end
|
681
|
+
|
682
|
+
# - This API provides the details of the Cards or Transaction related
|
683
|
+
# exceptions based on the given conditions for the Requested period.
|
684
|
+
# - This API will return the Transactions related exceptions when the
|
685
|
+
# OutputType input parameter is passed as ‘Transaction’ else will return the
|
686
|
+
# Cards related exceptions.
|
687
|
+
# @param [String] apikey Required parameter: This is the API key of the
|
688
|
+
# specific environment which needs to be passed by the client.
|
689
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
690
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
691
|
+
# back in the response from the request.
|
692
|
+
# @param [TransactionExceptionsRequest] body Optional parameter: Transaction
|
693
|
+
# Exceptions RequestBody
|
694
|
+
# @return [TransactionExceptionsResponse] response from the API call
|
695
|
+
def transaction_exceptions(apikey,
|
696
|
+
request_id,
|
697
|
+
body: nil)
|
698
|
+
new_api_call_builder
|
699
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
700
|
+
'/fleetmanagement/v1/transaction/exceptions',
|
701
|
+
Server::SHELL)
|
702
|
+
.header_param(new_parameter(apikey, key: 'apikey'))
|
703
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
704
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
705
|
+
.body_param(new_parameter(body))
|
706
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
707
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
708
|
+
.auth(Single.new('BasicAuth')))
|
709
|
+
.response(new_response_handler
|
710
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
711
|
+
.deserialize_into(TransactionExceptionsResponse.method(:from_hash))
|
712
|
+
.local_error('400',
|
713
|
+
"The server cannot or will not process the request due to'\
|
714
|
+
' something that is perceived to be a client\r\n error (e.g.,'\
|
715
|
+
' malformed request syntax, invalid \r\n request message framing,'\
|
716
|
+
' or deceptive request routing).",
|
717
|
+
DefaultErrorException)
|
718
|
+
.local_error('401',
|
719
|
+
"The request has not been applied because it lacks valid '\
|
720
|
+
' authentication credentials for the target resource.\r\n",
|
721
|
+
DefaultErrorException)
|
722
|
+
.local_error('403',
|
723
|
+
"The server understood the request but refuses to authorize it.'\
|
724
|
+
'\r\n",
|
725
|
+
ErrorUserAccessError1Exception)
|
726
|
+
.local_error('404',
|
727
|
+
"The origin server did not find a current representation for'\
|
728
|
+
' the target resource or is not willing to disclose that one'\
|
729
|
+
' exists.\r\n",
|
730
|
+
DefaultErrorException)
|
731
|
+
.local_error('500',
|
732
|
+
"The server encountered an unexpected condition the prevented it'\
|
733
|
+
' from fulfilling the request.\r\n",
|
734
|
+
DefaultErrorException))
|
735
|
+
.execute
|
736
|
+
end
|
737
|
+
|
738
|
+
# This endpoint allows querying last 48 hours of transaction data of Shell
|
739
|
+
# Card (i.e. Priced, Billed, Unbilled etc. sales items). It provides a
|
740
|
+
# flexible search criteria and supports pagination. E.g., if the request is
|
741
|
+
# made at 08:30 AM on 18 Aug 2022 then transactions until 16 Aug 2022 08:30
|
742
|
+
# AM (including) can be retrieved.
|
743
|
+
# #### Supported operations
|
744
|
+
# * Search by Date and Time range (within the last 48 hours only)
|
745
|
+
# * Search by Payer and/or Account number
|
746
|
+
# * Search by Card
|
747
|
+
# * Search by Purchased Country
|
748
|
+
# * Search by Transaction posting date
|
749
|
+
# * Search by Driver Name or Vehicle registration number
|
750
|
+
# * Search by Fuel only transactions
|
751
|
+
# * Search by Product and/or Product group
|
752
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
753
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
754
|
+
# back in the response from the request.
|
755
|
+
# @param [RecentTransactionRequest] body Optional parameter: New Recent
|
756
|
+
# Transaction RequestBody
|
757
|
+
# @return [RecentTransactionsResponse] response from the API call
|
758
|
+
def recent_transactions_new(request_id,
|
759
|
+
body: nil)
|
760
|
+
new_api_call_builder
|
761
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
762
|
+
'/transaction-data/v1/recent',
|
763
|
+
Server::SHELL)
|
764
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
765
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
766
|
+
.body_param(new_parameter(body))
|
767
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
768
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
769
|
+
.auth(Single.new('BearerToken')))
|
770
|
+
.response(new_response_handler
|
771
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
772
|
+
.deserialize_into(RecentTransactionsResponse.method(:from_hash))
|
773
|
+
.local_error('400',
|
774
|
+
"The server cannot or will not process the request due to'\
|
775
|
+
' something that is perceived to be a client error (e.g.,'\
|
776
|
+
' malformed request syntax, invalid request message framing, or'\
|
777
|
+
' deceptive request routing).\n",
|
778
|
+
ErrorObjectException)
|
779
|
+
.local_error('401',
|
780
|
+
"The request has not been applied because it lacks valid '\
|
781
|
+
' authentication credentials for the target resource.\n",
|
782
|
+
ErrorObjectException)
|
783
|
+
.local_error('403',
|
784
|
+
'Forbidden',
|
785
|
+
ErrorObjectException)
|
786
|
+
.local_error('404',
|
787
|
+
"The origin server did not find a current representation for'\
|
788
|
+
' the target resource or is not willing to disclose that one'\
|
789
|
+
' exists.\n",
|
790
|
+
ErrorObjectException)
|
791
|
+
.local_error('500',
|
792
|
+
"The server encountered an unexpected condition that prevented'\
|
793
|
+
' it from fulfilling the request.\n",
|
794
|
+
ErrorObjectException))
|
795
|
+
.execute
|
796
|
+
end
|
797
|
+
|
798
|
+
# This API allows querying transaction data (i.e. Priced, Billed and
|
799
|
+
# Unbilled sales items). It provides a flexible search criteria and supports
|
800
|
+
# paging.
|
801
|
+
# The version 2 is an enhancement to the version 1 where EV transactions and
|
802
|
+
# their details are added in the response.
|
803
|
+
# Transactions that are posted but not yet priced, billed or that are in
|
804
|
+
# error will not be returned by this API. The API also supports returning
|
805
|
+
# Fee Items.
|
806
|
+
# #### Supported operations
|
807
|
+
# * Get sales items and fee transactions
|
808
|
+
# * Search by invoice status
|
809
|
+
# * Search by fixed date period
|
810
|
+
# * Search by date range
|
811
|
+
# * Search by account
|
812
|
+
# * Search by card
|
813
|
+
# * Get sales items only
|
814
|
+
# * Search by transaction Id or location
|
815
|
+
# * Search by transaction posting date
|
816
|
+
# * Search by invoice number or date
|
817
|
+
# * Search by driver name or vehicle registration number
|
818
|
+
# * Search by card group
|
819
|
+
# * Search by fuel only transactions
|
820
|
+
# * Search by product
|
821
|
+
# * EV transaction details - Below are EV specific parameters
|
822
|
+
# * EVOperator
|
823
|
+
# * EVSerialId
|
824
|
+
# * EVChargePointSerial
|
825
|
+
# * EVChargePointConnectorType
|
826
|
+
# * EVChargePointConnectorTypeDescription
|
827
|
+
# * EVChargeDuration
|
828
|
+
# * EVChargeStartDate
|
829
|
+
# * EVChargeStartTime
|
830
|
+
# * EVChargeEndDate
|
831
|
+
# * EVChargeEndTime
|
832
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
833
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
834
|
+
# back in the response from the request.
|
835
|
+
# @param [PricedTransactionRequestV2] body Optional parameter: Priced
|
836
|
+
# TransactionV2 RequestBody
|
837
|
+
# @return [PricedTransactionResponseV2] response from the API call
|
838
|
+
def priced_transactions_v2(request_id,
|
839
|
+
body: nil)
|
840
|
+
new_api_call_builder
|
841
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
842
|
+
'/transaction-data/v1/priced',
|
843
|
+
Server::SHELL)
|
844
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
845
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
846
|
+
.body_param(new_parameter(body))
|
847
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
848
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
849
|
+
.auth(Single.new('BearerToken')))
|
850
|
+
.response(new_response_handler
|
851
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
852
|
+
.deserialize_into(PricedTransactionResponseV2.method(:from_hash))
|
853
|
+
.local_error('400',
|
854
|
+
"The server cannot or will not process the request due to'\
|
855
|
+
' something that is perceived to be a client error (e.g.,'\
|
856
|
+
' malformed request syntax, invalid request message framing, or'\
|
857
|
+
' deceptive request routing).\n",
|
858
|
+
ErrorObjectException)
|
859
|
+
.local_error('401',
|
860
|
+
"The request has not been applied because it lacks valid '\
|
861
|
+
' authentication credentials for the target resource.\n",
|
862
|
+
ErrorObjectException)
|
863
|
+
.local_error('403',
|
864
|
+
'Forbidden',
|
865
|
+
ErrorObjectException)
|
866
|
+
.local_error('404',
|
867
|
+
"The origin server did not find a current representation for'\
|
868
|
+
' the target resource or is not willing to disclose that one'\
|
869
|
+
' exists.\n",
|
870
|
+
ErrorObjectException)
|
871
|
+
.local_error('500',
|
872
|
+
"The server encountered an unexpected condition that prevented'\
|
873
|
+
' it from fulfilling the request.\n",
|
874
|
+
ErrorObjectException))
|
875
|
+
.execute
|
876
|
+
end
|
877
|
+
end
|
878
|
+
end
|