Class: ShellDataReportingApIs::TransactionController

Inherits:
BaseController show all
Defined in:
lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb

Overview

TransactionController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_api_call_builder, #new_parameter, #new_request_builder, #new_response_handler, user_agent

Constructor Details

This class inherits a constructor from ShellDataReportingApIs::BaseController

Instance Method Details

#card_usage_summary(apikey, request_id, body: nil) ⇒ CardUsageSummaryResponse

This operation is to provide the expenditure analysis for a card for the past 7 months. The response contains a daily summary of the transactions (billed & unbilled) from 1st of the last 7 months for the requested card grouped by card, site-group and product. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. Summary RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (CardUsageSummaryRequest) (defaults to: nil)

    Optional parameter: Card Usage

Returns:



286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 286

def card_usage_summary(apikey,
                       request_id,
                       body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/cardusagesummary',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(CardUsageSummaryResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionCardusagesummary400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionCardusagesummary401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionCardusagesummary403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionCardusagesummary404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionCardusagesummary500ErrorException))
    .execute
end

#fee_summary_response(apikey, request_id, body: nil) ⇒ FeeSummaryResponse

This API returns the summary data of the fee/charges levied from a customer’s account in a billing period or date range. The API returns both billed and unbilled fee items. The endpoint supports the exact same search criteria as the endpoint transaction/feessummary. #### Supported operations

* Get fees by invoice status
* Get fees by date period
* Get fees by account
* Get fees by card Id or PAN
* Get fees by fee type charges
* Get fees including cancelled items
* Get fees by line item description
* Get fees by product

specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (TransactionFeesRequest) (defaults to: nil)

    Optional parameter: FeeSummary

Returns:



527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 527

def fee_summary_response(apikey,
                         request_id,
                         body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/feessummary',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(FeeSummaryResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionFeessummary400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionFeessummary401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionFeessummary403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionFeessummary404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionFeessummary500ErrorException))
    .execute
end

#fees(apikey, request_id, body: nil) ⇒ TransactionFeesResponse

This API returns the fee/charges levied from a customer’s account in a billing period or date range. The API returns both billed and unbilled fee items. To get the summary of charges, the endpoint transaction/feessummary should be called with the same input criteria. #### Supported operations

* Get fees by invoice status
* Get fees by date period
* Get fees by account
* Get fees by card Id or PAN
* Get fees by fee type charges
* Get fees including cancelled items
* Get fees by line item description
* Get fees by product

specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (TransactionFeesRequest) (defaults to: nil)

    Optional parameter: Transaction Fees

Returns:



462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 462

def fees(apikey,
         request_id,
         body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/fees',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(TransactionFeesResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionFees400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionFees401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionFees403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionFees404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionFees500ErrorException))
    .execute
end

#fuel_consumption(apikey, request_id, body: nil) ⇒ FuelConsumptionResponse

  • This API returns the customer an overview of how many transactions, how

much fuel volume used over a given period and the total volume used by a card

  • This operation response will contains card & transaction details for

given period aggregated by payer, account, cardGroup, PAN, DriverName and VRN specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (FuelConsumptionRequest) (defaults to: nil)

    Optional parameter: FuelConsumption

Returns:



584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 584

def fuel_consumption(apikey,
                     request_id,
                     body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/fuelconsumption',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(FuelConsumptionResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionFuelconsumption400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionFuelconsumption401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionFuelconsumption403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionFuelconsumption404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionFuelconsumption500ErrorException))
    .execute
end

#multipriced_transactions(apikey, request_id, body: nil) ⇒ MultiPricedTransactionResponse

This API allows querying transaction data (i.e. Priced, Billed and Unbilled sales items) for multiple payers. It provides a flexible search criteria and supports paging. Transactions that are posted but not yet priced, billed or that are in error will not be returned by this API. The API also supports returning Fee Items. At least one payer should be provided. Multiple payers must belong to the same payer group. #### Supported operations

 * Get sales items and fee transactions for multiple payers
   * Search by invoice status
   * Search by fixed date period
   * Search by date range
 * Get sales items only for multiple payers
   * Search by transaction location
   * Search by transaction posting date
   * Search by invoice number or date
   * Search by fuel only transactions

This API fetches transactions for a period based on the below parameters

and priority order:

1.    InvoiceNumber
2.    InvoiceDate
3.    FromDate, ToDate
4.    PostingFromDate, PostingToDate (Can be used only when IncludeFees =

false)

5.    InvoiceDateFrom, InvoiceDateTo
6.    Period
This API considers only one of the above set of parameters at a time. For

example, if InvoiceNumber and Period are provided in the input then Period is ignored and transactions associated to the given invoice number are returned. If none of the above parameters are provided then last 7 days transactions will be fetched. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (MultiPricedTransactionRequest) (defaults to: nil)

    Optional parameter: MultiPayer

Returns:



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 230

def multipriced_transactions(apikey,
                             request_id,
                             body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/multipayerspricedtransactions',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(MultiPricedTransactionResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionMultipayerspricedtransactions400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionMultipayerspricedtransactions401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionMultipayerspricedtransactions403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionMultipayerspricedtransactions404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionMultipayerspricedtransactions500ErrorException))
    .execute
end

#priced_transactions(apikey, request_id, body: nil) ⇒ PricedTransactionResponse

This API allows querying transaction data (i.e. Priced, Billed and Unbilled sales items). It provides a flexible search criteria and supports paging. Transactions that are posted but not yet priced, billed or that are in error will not be returned by this API. The API also supports returning Fee Items. #### Supported operations

 * Get sales items and fee transactions
   * Search by invoice status
   * Search by fixed date period
   * Search by date range
   * Search by account
   * Search by card
 * Get sales items only
   * Search by transaction Id or location
   * Search by transaction posting date
   * Search by invoice number or date
   * Search by driver name or vehicle registration number
   * Search by card group
   * Search by fuel only transactions
   * Search by product

This API fetches transactions for a period based on the below parameters

and priority order:

  1. InvoiceNumber

  2. InvoiceDate

  3. FromDate, ToDate

  4. PostingFromDate, PostingToDate (Can be used only when IncludeFees =

false)

5.    InvoiceDateFrom, InvoiceDateTo
6.    Period
This API considers only one of the above set of parameters at a time. For

example, if InvoiceNumber and Period are provided in the input then Period is ignored and transactions associated to the given invoice number are returned. If none of the above parameters are provided then last 7 days transactions will be fetched. This operation can fetch transactions that are old up to 24 (configurable) months. However, the date range between any of the ‘From’ and ‘To’ dates in the above combination cannot be more than 210 (configurable) days. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. Transaction Request Body

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (PriceTransactionRequest) (defaults to: nil)

    Optional parameter: Priced

Returns:



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 57

def priced_transactions(apikey,
                        request_id,
                        body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/pricedtransactions',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(PricedTransactionResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionPricedtransactions400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionPricedtransactions401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionPricedtransactions403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionPricedtransactions404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionPricedtransactions500ErrorException))
    .execute
end

#priced_transactions_summary(apikey, request_id, body: nil) ⇒ PricedTransSummaryResponse

This API returns the transaction summary data (i.e. Priced, Billed and Unbilled sales items). It provides a flexible search criteria. The API also supports returning Fee Items. Transactions posted for fee items that are in error are not included in the summary. The endpoint supports the exact same search criteria as the endpoint transaction/prciedtransactions. #### Supported operations

 * Get sales items and fee transactions
   * Search by invoice status
   * Search by fixed date period
   * Search by date range
   * Search by account
   * Search by card
 * Get sales items only
   * Search by transaction Id or location
   * Search by transaction posting date
   * Search by invoice number or date
   * Search by driver name or vehicle registration number
   * Search by card group
   * Search by fuel only transactions
   * Search by product

This API fetches transactions for a period based on the below parameters

and priority order:

1.    InvoiceNumber
2.    InvoiceDate
3.    FromDate, ToDate
4.    PostingFromDate, PostingToDate (Can be used only when IncludeFees =

false)

5.    InvoiceDateFrom, InvoiceDateTo
6.    Period
This API considers only one of the above set of parameters at a time. For

example, if InvoiceNumber and Period are provided in the input then Period is ignored and transactions associated to the given invoice number are returned. If none of the above parameters are provided then last 7 days transactions will be fetched. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (PriceTransSummaryRequest) (defaults to: nil)

    Optional parameter: PricedSummary

Returns:



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 145

def priced_transactions_summary(apikey,
                                request_id,
                                body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/pricedtransactionssummary',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(PricedTransSummaryResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionPricedtransactionssummary400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionPricedtransactionssummary401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionPricedtransactionssummary403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionPricedtransactionssummary404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionPricedtransactionssummary500ErrorException))
    .execute
end

#priced_transactions_v2(request_id, body: nil) ⇒ PricedTransactionResponseV2

This API allows querying transaction data (i.e. Priced, Billed and Unbilled sales items). It provides a flexible search criteria and supports paging. The version 2 is an enhancement to the version 1 where EV transactions and their details are added in the response. Transactions that are posted but not yet priced, billed or that are in error will not be returned by this API. The API also supports returning Fee Items. #### Supported operations

 * Get sales items and fee transactions
   * Search by invoice status
   * Search by fixed date period
   * Search by date range
   * Search by account
   * Search by card
 * Get sales items only
   * Search by transaction Id or location
   * Search by transaction posting date
   * Search by invoice number or date
   * Search by driver name or vehicle registration number
   * Search by card group
   * Search by fuel only transactions
   * Search by product
* EV transaction details - Below are EV specific parameters
   * EVOperator
   * EVSerialId
   * EVChargePointSerial
   * EVChargePointConnectorType
   * EVChargePointConnectorTypeDescription
   * EVChargeDuration
   * EVChargeStartDate
   * EVChargeStartTime
   * EVChargeEndDate
   * EVChargeEndTime

to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. TransactionV2 RequestBody

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (PricedTransactionRequestV2) (defaults to: nil)

    Optional parameter: Priced

Returns:



838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 838

def priced_transactions_v2(request_id,
                           body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/transaction-data/v1/priced',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(PricedTransactionResponseV2.method(:from_hash))
                .local_error('400',
                             'The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).',
                             TransactionDataV1Priced400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             TransactionDataV1Priced401ErrorException)
                .local_error('403',
                             'Forbidden',
                             TransactionDataV1Priced403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             TransactionDataV1Priced404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.',
                             TransactionDataV1Priced500ErrorException))
    .execute
end

#recent_transactions_new(request_id, body: nil) ⇒ RecentTransactionsResponse

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. #### Supported operations

* Search by Date and Time range (within the last 48 hours only)
* Search by Payer and/or Account number
* Search by Card
* Search by Purchased Country
* Search by Transaction posting date
* Search by Driver Name or Vehicle registration number
* Search by Fuel only transactions
* Search by Product and/or Product group

to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. Transaction RequestBody

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (RecentTransactionRequest) (defaults to: nil)

    Optional parameter: New Recent

Returns:



758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 758

def recent_transactions_new(request_id,
                            body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/transaction-data/v1/recent',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(RecentTransactionsResponse.method(:from_hash))
                .local_error('400',
                             'The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).',
                             TransactionDataV1Recent400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             TransactionDataV1Recent401ErrorException)
                .local_error('403',
                             'Forbidden',
                             TransactionDataV1Recent403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             TransactionDataV1Recent404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.',
                             TransactionDataV1Recent500ErrorException))
    .execute
end

#transaction_exceptions(apikey, request_id, body: nil) ⇒ TransactionExceptionsResponse

  • This API provides the details of the Cards or Transaction related

exceptions based on the given conditions for the Requested period.

  • This API will return the Transactions related exceptions when the

OutputType input parameter is passed as ‘Transaction’ else will return the Cards related exceptions. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. Exceptions RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (TransactionExceptionsRequest) (defaults to: nil)

    Optional parameter: Transaction

Returns:



695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 695

def transaction_exceptions(apikey,
                           request_id,
                           body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/exceptions',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(TransactionExceptionsResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionExceptions400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionExceptions401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionExceptions403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionExceptions404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionExceptions500ErrorException))
    .execute
end

#update_odometer(apikey, request_id, body: nil) ⇒ UpdateOdometerResponse

  • This API allows the users to update the odometer readings on the sales

items (transaction data)

  • This is an asynchronous operation. If opted, the user will be notified

on completion of processing. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (UpdateOdometerRequest) (defaults to: nil)

    Optional parameter: updateOdometer

Returns:



639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 639

def update_odometer(apikey,
                    request_id,
                    body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/updateodometer',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(UpdateOdometerResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionUpdateodometer400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionUpdateodometer401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionUpdateodometer403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionUpdateodometer404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionUpdateodometer500ErrorException))
    .execute
end

#volume_based_bonus(apikey, request_id, body: nil) ⇒ VolumeBasedBonusResponse

  • This API provides the details of the bonus and/or association bonus

rules setup for the given payer and that are active on the current date.

  • This API also returns the details of the monthly breakup of current

period consumption as well as the details of the previously calculated bonus and consumption of the applicable payers. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (VolumeBasedBonusRequest) (defaults to: nil)

    Optional parameter: VolumeBasedBonus

Returns:



342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 342

def volume_based_bonus(apikey,
                       request_id,
                       body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/volumebasedbonus',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(VolumeBasedBonusResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionVolumebasedbonus400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionVolumebasedbonus401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionVolumebasedbonus403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionVolumebasedbonus404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionVolumebasedbonus500ErrorException))
    .execute
end

#volume_based_pricing(apikey, request_id, body: nil) ⇒ VolumeBasedPricingResponse

  • This API will return the details of the in arrear fee rule applied to

the payer along with details of locations, products, tiers as applied.

  • It will also show historical and current volume consumption and related

tier applied for the following month. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. VolumeBasedPricing RequestBody

Parameters:

  • apikey (String)

    Required parameter: This is the API key of the

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (VolumeBasedPricingRequest) (defaults to: nil)

    Optional parameter:

Returns:



397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
# File 'lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb', line 397

def volume_based_pricing(apikey,
                         request_id,
                         body: nil)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/fleetmanagement/v1/transaction/volumebasedpricing',
                                 Server::SHELL)
               .header_param(new_parameter(apikey, key: 'apikey'))
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BasicAuth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(VolumeBasedPricingResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request  due to'\
                              ' something that is perceived to be a client\r\n error (e.g.,'\
                              ' malformed request syntax, invalid \r\n request message'\
                              ' framing, or deceptive request routing).",
                             FleetmanagementV1TransactionVolumebasedpricing400ErrorException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             FleetmanagementV1TransactionVolumebasedpricing401ErrorException)
                .local_error('403',
                             'The server understood the request but refuses to authorize it'\
                              '.',
                             FleetmanagementV1TransactionVolumebasedpricing403ErrorException)
                .local_error('404',
                             'The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.',
                             FleetmanagementV1TransactionVolumebasedpricing404ErrorException)
                .local_error('500',
                             'The server encountered an unexpected condition the prevented'\
                              ' it from fulfilling the request.',
                             FleetmanagementV1TransactionVolumebasedpricing500ErrorException))
    .execute
end