Class: ShellDataReportingApIs::PriceTransSummaryRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb

Overview

PriceTransSummaryRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, accounts = SKIP, card_id = SKIP, card_pan = SKIP, driver_name = SKIP, vehicle_registration_number = SKIP, invoice_status = SKIP, product_id = SKIP, product_code = SKIP, purchased_in_country = SKIP, card_group_id = SKIP, from_date = SKIP, to_date = SKIP, period = SKIP, site_code = SKIP, site_group_id = SKIP, posting_date_from = SKIP, posting_date_to = SKIP, sales_item_id = SKIP, transaction_id = SKIP, invoice_date = SKIP, invoice_number = SKIP, valid_invoice_date_only = SKIP, invoice_from_date = SKIP, invoice_to_date = SKIP, fuel_only = SKIP, include_fees = SKIP) ⇒ PriceTransSummaryRequest

Returns a new instance of PriceTransSummaryRequest.



336
337
338
339
340
341
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/models/price_trans_summary_request.rb', line 336

def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
               payer_number = SKIP, accounts = SKIP, card_id = SKIP,
               card_pan = SKIP, driver_name = SKIP,
               vehicle_registration_number = SKIP, invoice_status = SKIP,
               product_id = SKIP, product_code = SKIP,
               purchased_in_country = SKIP, card_group_id = SKIP,
               from_date = SKIP, to_date = SKIP, period = SKIP,
               site_code = SKIP, site_group_id = SKIP,
               posting_date_from = SKIP, posting_date_to = SKIP,
               sales_item_id = SKIP, transaction_id = SKIP,
               invoice_date = SKIP, invoice_number = SKIP,
               valid_invoice_date_only = SKIP, invoice_from_date = SKIP,
               invoice_to_date = SKIP, fuel_only = SKIP,
               include_fees = SKIP)
  @col_co_id = col_co_id unless col_co_id == SKIP
  @col_co_code = col_co_code unless col_co_code == SKIP
  @payer_id = payer_id unless payer_id == SKIP
  @payer_number = payer_number unless payer_number == SKIP
  @accounts = accounts unless accounts == SKIP
  @card_id = card_id unless card_id == SKIP
  @card_pan = card_pan unless card_pan == SKIP
  @driver_name = driver_name unless driver_name == SKIP
  unless vehicle_registration_number == SKIP
    @vehicle_registration_number =
      vehicle_registration_number
  end
  @invoice_status = invoice_status unless invoice_status == SKIP
  @product_id = product_id unless product_id == SKIP
  @product_code = product_code unless product_code == SKIP
  @purchased_in_country = purchased_in_country unless purchased_in_country == SKIP
  @card_group_id = card_group_id unless card_group_id == SKIP
  @from_date = from_date unless from_date == SKIP
  @to_date = to_date unless to_date == SKIP
  @period = period unless period == SKIP
  @site_code = site_code unless site_code == SKIP
  @site_group_id = site_group_id unless site_group_id == SKIP
  @posting_date_from = posting_date_from unless posting_date_from == SKIP
  @posting_date_to = posting_date_to unless posting_date_to == SKIP
  @sales_item_id = sales_item_id unless sales_item_id == SKIP
  @transaction_id = transaction_id unless transaction_id == SKIP
  @invoice_date = invoice_date unless invoice_date == SKIP
  @invoice_number = invoice_number unless invoice_number == SKIP
  @valid_invoice_date_only = valid_invoice_date_only unless valid_invoice_date_only == SKIP
  @invoice_from_date = invoice_from_date unless invoice_from_date == SKIP
  @invoice_to_date = invoice_to_date unless invoice_to_date == SKIP
  @fuel_only = fuel_only unless fuel_only == SKIP
  @include_fees = include_fees unless include_fees == SKIP
end

Instance Attribute Details

#accountsAccounts

Payer Number (Ex: GB000000123) of the selected payer. Optional if PayerId is passed else Mandatory Example: GB000000123

Returns:



44
45
46
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 44

def accounts
  @accounts
end

#card_group_idInteger

Card Group Id in GFN

Returns:

  • (Integer)


112
113
114
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 112

def card_group_id
  @card_group_id
end

#card_idInteger

Card Id (i.e. Unique Card Id in GFN) Optional When both Card Id and Card PAN are not present on request, the response will have transactions of all cards under the selected payer or account

Returns:

  • (Integer)


51
52
53
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 51

def card_id
  @card_id
end

#card_panString

Full Card PAN Optional When both Card Id and Card PAN are not present on request, the response will have transactions of all cards under the selected payer or account.

Returns:

  • (String)


58
59
60
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 58

def card_pan
  @card_pan
end

#col_co_codeInteger

Collecting Company Code of the selected payer. Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia, Ukraine etc. It is optional for other countries if ColCoID is provided. Example: 86 for Philippines 5 for UK

Returns:

  • (Integer)


27
28
29
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 27

def col_co_code
  @col_co_code
end

#col_co_idInteger

Collecting Company Id of the selected payer. Optional if ColCoCode is passed else Mandatory. Example: 1 for Philippines 5 for UK

Returns:

  • (Integer)


18
19
20
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 18

def col_co_id
  @col_co_id
end

#driver_nameString

Driver Name (of Card record) Optional Minimum of 4 characters should be provided else not considered Transactions of the card having the entered value at any part of the Driver Name will be returned

Returns:

  • (String)


66
67
68
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 66

def driver_name
  @driver_name
end

#from_dateString

Transactions from Date/Time. Optional – When provided, it should be with in last 24 months. Format: yyyyMMdd

Returns:

  • (String)


118
119
120
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 118

def from_date
  @from_date
end

#fuel_onlyTrueClass | FalseClass

True/False Optional Default value: False. When passed as ‘True’ Only returned records with Fuel transactions. When passed as ‘False’ the above condition will not be checked.

Returns:

  • (TrueClass | FalseClass)


249
250
251
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 249

def fuel_only
  @fuel_only
end

#include_feesTrueClass | FalseClass

True/False Optional Default value: False When passed as ‘True’ then ignore few filters, all sales items along with fees included on the same response

Returns:

  • (TrueClass | FalseClass)


257
258
259
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 257

def include_fees
  @include_fees
end

#invoice_dateString

Invoice Date. Optional Note: 1) If value is not blank then the system will ignore the InvoiceStatus parameter and it will return all the billed transactions for the given invoice date. Format: yyyyMMdd

Returns:

  • (String)


202
203
204
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 202

def invoice_date
  @invoice_date
end

#invoice_from_dateString

Start date for transaction search by invoice date. Optional Note: 1) Value should be with in last 24 months (if provided). 2) Maximum of 90(Configurable) day’s duration allowed per search. 3) When provided, InvoiceFromDate has to be less than or equal to InvoiceToDate. Format: yyyyMMdd

Returns:

  • (String)


231
232
233
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 231

def invoice_from_date
  @invoice_from_date
end

#invoice_numberString

Invoice Number. Optional Note: 1) If value is not blank then the system will ignore the InvoiceStatus parameter and it will return all the billed transactions for the given invoice date.

Returns:

  • (String)


211
212
213
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 211

def invoice_number
  @invoice_number
end

#invoice_statusString

Invoice status of the transactions. Mandatory Possible options: I - Invoiced U – Un-Invoiced A – All

Returns:

  • (String)


83
84
85
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 83

def invoice_status
  @invoice_status
end

#invoice_to_dateString

End date for transaction search by invoice date. Optional Note: 1) When InvoiceFromDate is provided and InvoiceToDate is null, then InvoiceToDate will be calculated as (InvoiceFromDate + 90 days) or (CurrentDate) whichever is lesser. Format: yyyyMMdd

Returns:

  • (String)


241
242
243
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 241

def invoice_to_date
  @invoice_to_date
end

#payer_idInteger

Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory

Returns:

  • (Integer)


32
33
34
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 32

def payer_id
  @payer_id
end

#payer_numberString

Payer Number (Ex: GB000000123) of the selected payer. Optional if PayerId is passed else Mandatory Example: GB000000123

Returns:

  • (String)


38
39
40
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 38

def payer_number
  @payer_number
end

#periodInteger

Transactions Period. Possible values are:

  1. Last 7 Days

  2. Last 30 Days

  3. Last 90 Days

Optional - Refer introduction section of this operation for the priority and sequence of different date and invoice number filters that are conditionally applied.

Returns:

  • (Integer)


143
144
145
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 143

def period
  @period
end

#posting_date_fromString

Transaction Posting Date/time in the Cards Platform - From Date/time. Note: 1) When the value of both PostingDateFrom and PostingDateTo are present in the request then the value of PostingDateFrom must be less than PostingDateTo. 2) If IncludeFees is true then this filter will be ignored Format: yyyyMMdd HH:mm:ss

Returns:

  • (String)


170
171
172
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 170

def posting_date_from
  @posting_date_from
end

#posting_date_toString

Transaction Posting Date/time in the Cards Platform – To Date/time. Note: 1) If IncludeFees is true then this filter will be ignored. 2) When the value of both PostingDateFrom and PostingDateTo are present in the request then the value of PostingDateFrom must be less than PostingDateTo. Format: yyyyMMdd HH:mm:ss

Returns:

  • (String)


180
181
182
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 180

def posting_date_to
  @posting_date_to
end

#product_codeString

Product Code – Global as per GFN configuration Optional Max Length: 8 Example: 10 TMF Charges 11 Tunnel/Bridges 12 Motorway toll 13 Ferries

Returns:

  • (String)


103
104
105
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 103

def product_code
  @product_code
end

#product_idInteger

Product Id Example: 21 Unleaded - High octane 22 Unleaded - Medium octane 23 Unleaded - Low octane 24 Unleaded Environmental

Returns:

  • (Integer)


92
93
94
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 92

def product_id
  @product_id
end

#purchased_in_countryString

ISO Country Code (ex: UK, FR) Note: If IncludeFees is true then this filter will be ignored

Returns:

  • (String)


108
109
110
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 108

def purchased_in_country
  @purchased_in_country
end

#sales_item_idString

Unique SalesItemId (Either Billed on Unbilled) Optional Note: If IncludeFees is true then this filter will be ignored

Returns:

  • (String)


186
187
188
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 186

def sales_item_id
  @sales_item_id
end

#site_codeString

Site Code as configured in GFN Example: 050001 - CHARNOCK RICHARD NTHBOUND MWSA 0755 050002 - CHARNOCK RICHARD STHBOUND MWSA 0755 050005 - HARTSHEAD MOOR EASTBOUND MWSA 0761. 050006 - HARTSHEAD MOOR WESTBOUND MWSA. Note: If IncludeFees is true then this filter will be ignored

Returns:

  • (String)


153
154
155
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 153

def site_code
  @site_code
end

#site_group_idInteger

Site Group Id in GFN Optional Example: 202 Note: If IncludeFees is true then this filter will be ignored

Returns:

  • (Integer)


160
161
162
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 160

def site_group_id
  @site_group_id
end

#to_dateString

Transactions to Date/Time. Optional- Refer introduction section of this operation for the priority and sequence of different date and invoice number filters that are conditionally applied. Note: 1) When the value is blank and FromDate is provided on the input, all transactions took place 210(Configurable) days after the given FromDate is returned. 2) Difference between FromDate and ToDate cannot be more than 210 (Configurable) days. Format: yyyyMMdd

Returns:

  • (String)


132
133
134
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 132

def to_date
  @to_date
end

#transaction_idString

Unique Transaction Id Optional Note: If IncludeFees is true then this filter will be ignored

Returns:

  • (String)


192
193
194
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 192

def transaction_id
  @transaction_id
end

#valid_invoice_date_onlyTrueClass | FalseClass

True/False Optional Default value: True. When passed as ‘True’ the transactions records with report date not equal to 9999-12-30 will be returned. When passed as ‘False’ the above condition will not be checked.

Returns:

  • (TrueClass | FalseClass)


220
221
222
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 220

def valid_invoice_date_only
  @valid_invoice_date_only
end

#vehicle_registration_numberString

Vehicle Registration (of Card record) Optional Minimum of 4 characters should be provided else not considered Transactions of the card having the entered value at any part of the VRN will be returned

Returns:

  • (String)


74
75
76
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 74

def vehicle_registration_number
  @vehicle_registration_number
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



386
387
388
389
390
391
392
393
394
395
396
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
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 386

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
  col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
  accounts = Accounts.from_hash(hash['Accounts']) if hash['Accounts']
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP
  driver_name = hash.key?('DriverName') ? hash['DriverName'] : SKIP
  vehicle_registration_number =
    hash.key?('VehicleRegistrationNumber') ? hash['VehicleRegistrationNumber'] : SKIP
  invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP
  product_id = hash.key?('ProductId') ? hash['ProductId'] : SKIP
  product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
  purchased_in_country =
    hash.key?('PurchasedInCountry') ? hash['PurchasedInCountry'] : SKIP
  card_group_id = hash.key?('CardGroupId') ? hash['CardGroupId'] : SKIP
  from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
  to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
  period = hash.key?('Period') ? hash['Period'] : SKIP
  site_code = hash.key?('SiteCode') ? hash['SiteCode'] : SKIP
  site_group_id = hash.key?('SiteGroupId') ? hash['SiteGroupId'] : SKIP
  posting_date_from =
    hash.key?('PostingDateFrom') ? hash['PostingDateFrom'] : SKIP
  posting_date_to =
    hash.key?('PostingDateTo') ? hash['PostingDateTo'] : SKIP
  sales_item_id = hash.key?('SalesItemId') ? hash['SalesItemId'] : SKIP
  transaction_id = hash.key?('TransactionId') ? hash['TransactionId'] : SKIP
  invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
  invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
  valid_invoice_date_only =
    hash.key?('ValidInvoiceDateOnly') ? hash['ValidInvoiceDateOnly'] : SKIP
  invoice_from_date =
    hash.key?('InvoiceFromDate') ? hash['InvoiceFromDate'] : SKIP
  invoice_to_date =
    hash.key?('InvoiceToDate') ? hash['InvoiceToDate'] : SKIP
  fuel_only = hash.key?('FuelOnly') ? hash['FuelOnly'] : SKIP
  include_fees = hash.key?('IncludeFees') ? hash['IncludeFees'] : SKIP

  # Create object from extracted values.
  PriceTransSummaryRequest.new(col_co_id,
                               col_co_code,
                               payer_id,
                               payer_number,
                               accounts,
                               card_id,
                               card_pan,
                               driver_name,
                               vehicle_registration_number,
                               invoice_status,
                               product_id,
                               product_code,
                               purchased_in_country,
                               card_group_id,
                               from_date,
                               to_date,
                               period,
                               site_code,
                               site_group_id,
                               posting_date_from,
                               posting_date_to,
                               sales_item_id,
                               transaction_id,
                               invoice_date,
                               invoice_number,
                               valid_invoice_date_only,
                               invoice_from_date,
                               invoice_to_date,
                               fuel_only,
                               include_fees)
end

.namesObject

A mapping from model property names to API property names.



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 260

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['col_co_id'] = 'ColCoId'
  @_hash['col_co_code'] = 'ColCoCode'
  @_hash['payer_id'] = 'PayerId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['accounts'] = 'Accounts'
  @_hash['card_id'] = 'CardId'
  @_hash['card_pan'] = 'CardPAN'
  @_hash['driver_name'] = 'DriverName'
  @_hash['vehicle_registration_number'] = 'VehicleRegistrationNumber'
  @_hash['invoice_status'] = 'InvoiceStatus'
  @_hash['product_id'] = 'ProductId'
  @_hash['product_code'] = 'ProductCode'
  @_hash['purchased_in_country'] = 'PurchasedInCountry'
  @_hash['card_group_id'] = 'CardGroupId'
  @_hash['from_date'] = 'FromDate'
  @_hash['to_date'] = 'ToDate'
  @_hash['period'] = 'Period'
  @_hash['site_code'] = 'SiteCode'
  @_hash['site_group_id'] = 'SiteGroupId'
  @_hash['posting_date_from'] = 'PostingDateFrom'
  @_hash['posting_date_to'] = 'PostingDateTo'
  @_hash['sales_item_id'] = 'SalesItemId'
  @_hash['transaction_id'] = 'TransactionId'
  @_hash['invoice_date'] = 'InvoiceDate'
  @_hash['invoice_number'] = 'InvoiceNumber'
  @_hash['valid_invoice_date_only'] = 'ValidInvoiceDateOnly'
  @_hash['invoice_from_date'] = 'InvoiceFromDate'
  @_hash['invoice_to_date'] = 'InvoiceToDate'
  @_hash['fuel_only'] = 'FuelOnly'
  @_hash['include_fees'] = 'IncludeFees'
  @_hash
end

.nullablesObject

An array for nullable fields



332
333
334
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 332

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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
328
329
# File 'lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb', line 296

def self.optionals
  %w[
    col_co_id
    col_co_code
    payer_id
    payer_number
    accounts
    card_id
    card_pan
    driver_name
    vehicle_registration_number
    invoice_status
    product_id
    product_code
    purchased_in_country
    card_group_id
    from_date
    to_date
    period
    site_code
    site_group_id
    posting_date_from
    posting_date_to
    sales_item_id
    transaction_id
    invoice_date
    invoice_number
    valid_invoice_date_only
    invoice_from_date
    invoice_to_date
    fuel_only
    include_fees
  ]
end