Class: ShellDataReportingApIs::PricedRequestData

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

Overview

This endpoint allows querying the transaction data (i.e. Priced, Billed and Unbilled sales items) from SFSBI. It provides a flexible search criteria and supports paging

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_code = nil, invoice_status = nil, payer_number = nil, account_id = SKIP, account_number = SKIP, driver_name = SKIP, card_group_id = SKIP, card_pan = SKIP, product_code = SKIP, product_name = SKIP, site_code = SKIP, incoming_site_number = SKIP, invoice_date = SKIP, invoice_number = SKIP, purchased_in_country_code = SKIP, purchased_in_country = SKIP, site_group_id = SKIP, vehicle_registration_number = SKIP, fee_type_id = SKIP, line_item_description = SKIP, cards = SKIP, sort_order = SKIP, from_date = SKIP, to_date = SKIP, period = SKIP, posting_date_from = SKIP, posting_date_to = SKIP, transaction_item_id = SKIP, fuel_only = false, include_fees = SKIP, is_multipayer = SKIP, valid_invoice_date_only = false, invoice_from_date = SKIP, invoice_to_date = SKIP, hosting_collecting_company_number = SKIP, search = SKIP, transaction_id = SKIP) ⇒ PricedRequestData

Returns a new instance of PricedRequestData.



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
330
331
332
333
334
335
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
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 297

def initialize(col_co_code = nil, invoice_status = nil, payer_number = nil,
                = SKIP,  = SKIP, driver_name = SKIP,
               card_group_id = SKIP, card_pan = SKIP, product_code = SKIP,
               product_name = SKIP, site_code = SKIP,
               incoming_site_number = SKIP, invoice_date = SKIP,
               invoice_number = SKIP, purchased_in_country_code = SKIP,
               purchased_in_country = SKIP, site_group_id = SKIP,
               vehicle_registration_number = SKIP, fee_type_id = SKIP,
               line_item_description = SKIP, cards = SKIP,
               sort_order = SKIP, from_date = SKIP, to_date = SKIP,
               period = SKIP, posting_date_from = SKIP,
               posting_date_to = SKIP, transaction_item_id = SKIP,
               fuel_only = false, include_fees = SKIP, is_multipayer = SKIP,
               valid_invoice_date_only = false, invoice_from_date = SKIP,
               invoice_to_date = SKIP,
               hosting_collecting_company_number = SKIP, search = SKIP,
               transaction_id = SKIP)
  @col_co_code = col_co_code
  @invoice_status = invoice_status
  @payer_number = payer_number
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
  @driver_name = driver_name unless driver_name == SKIP
  @card_group_id = card_group_id unless card_group_id == SKIP
  @card_pan = card_pan unless card_pan == SKIP
  @product_code = product_code unless product_code == SKIP
  @product_name = product_name unless product_name == SKIP
  @site_code = site_code unless site_code == SKIP
  @incoming_site_number = incoming_site_number unless incoming_site_number == SKIP
  @invoice_date = invoice_date unless invoice_date == SKIP
  @invoice_number = invoice_number unless invoice_number == SKIP
  unless purchased_in_country_code == SKIP
    @purchased_in_country_code =
      purchased_in_country_code
  end
  @purchased_in_country = purchased_in_country unless purchased_in_country == SKIP
  @site_group_id = site_group_id unless site_group_id == SKIP
  unless vehicle_registration_number == SKIP
    @vehicle_registration_number =
      vehicle_registration_number
  end
  @fee_type_id = fee_type_id unless fee_type_id == SKIP
  @line_item_description = line_item_description unless line_item_description == SKIP
  @cards = cards unless cards == SKIP
  @sort_order = sort_order unless sort_order == SKIP
  @from_date = from_date unless from_date == SKIP
  @to_date = to_date unless to_date == SKIP
  @period = period unless period == SKIP
  @posting_date_from = posting_date_from unless posting_date_from == SKIP
  @posting_date_to = posting_date_to unless posting_date_to == SKIP
  @transaction_item_id = transaction_item_id unless transaction_item_id == SKIP
  @fuel_only = fuel_only unless fuel_only == SKIP
  @include_fees = include_fees unless include_fees == SKIP
  @is_multipayer = is_multipayer unless is_multipayer == 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
  unless hosting_collecting_company_number == SKIP
    @hosting_collecting_company_number =
      hosting_collecting_company_number
  end
  @search = search unless search == SKIP
  @transaction_id = transaction_id unless transaction_id == SKIP
end

Instance Attribute Details

#account_idInteger

Account Id (GFN customer id)

Returns:

  • (Integer)


28
29
30
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 28

def 
  @account_id
end

#account_numberString

Account Number of the selected account.

Returns:

  • (String)


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

def 
  @account_number
end

#card_group_idInteger

Card Group Id in GFN

Returns:

  • (Integer)


40
41
42
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 40

def card_group_id
  @card_group_id
end

#card_panString

Full Card PAN

Returns:

  • (String)


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

def card_pan
  @card_pan
end

#cardsArray[Integer]

This entity accepts the list of CardId to filter in the response. Note: The number of cardId allowed to be passed in the request is configurable to a maximum of 500 cards.

Returns:

  • (Array[Integer])


98
99
100
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 98

def cards
  @cards
end

#col_co_codeString

Collecting Company Code (Shell Code) of the selected payer.

Returns:

  • (String)


16
17
18
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 16

def col_co_code
  @col_co_code
end

#driver_nameString

Driver Name (of Card record)

Returns:

  • (String)


36
37
38
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 36

def driver_name
  @driver_name
end

#fee_type_idInteger

Card Id (i.e. Unique Card Id in GFN)

Returns:

  • (Integer)


88
89
90
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 88

def fee_type_id
  @fee_type_id
end

#from_dateString

From transaction delivery date

Returns:

  • (String)


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

def from_date
  @from_date
end

#fuel_onlyTrueClass | FalseClass

Is FuelOnly indicator

Returns:

  • (TrueClass | FalseClass)


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

def fuel_only
  @fuel_only
end

#hosting_collecting_company_numberString

Hosting Collecting Company Number of the selected payer.

Returns:

  • (String)


166
167
168
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 166

def hosting_collecting_company_number
  @hosting_collecting_company_number
end

#include_feesTrueClass | FalseClass

When passed as ‘true’ then all sales items along with fees will be included in the response and the follwoing filteres will be ignored

  • InvoiceNumber

  • InvoiceDate

  • PostingDateFrom

  • PostingDateTo

Returns:

  • (TrueClass | FalseClass)


141
142
143
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 141

def include_fees
  @include_fees
end

#incoming_site_numberString

Site Code as configured in GFN

Returns:

  • (String)


60
61
62
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 60

def incoming_site_number
  @incoming_site_number
end

#invoice_dateString

Returns the billed transaction for the given invoice date

Returns:

  • (String)


64
65
66
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 64

def invoice_date
  @invoice_date
end

#invoice_from_dateString

Invoice From Date, this is a search criterion to filter invoiced transactions with invoice date from this date.

Returns:

  • (String)


157
158
159
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 157

def invoice_from_date
  @invoice_from_date
end

#invoice_numberString

Returns the billed transaction for the given invoice number

Returns:

  • (String)


68
69
70
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 68

def invoice_number
  @invoice_number
end

#invoice_statusObject

Collecting Company Code (Shell Code) of the selected payer.

Returns:

  • (Object)


20
21
22
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 20

def invoice_status
  @invoice_status
end

#invoice_to_dateString

Invoice To Date, this is a search criterion to filter invoiced transactions with invoice date until this date.

Returns:

  • (String)


162
163
164
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 162

def invoice_to_date
  @invoice_to_date
end

#is_multipayerTrueClass | FalseClass

If true then returns all the data linked tothe payer group of the provided PayerNumberin the request

Returns:

  • (TrueClass | FalseClass)


146
147
148
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 146

def is_multipayer
  @is_multipayer
end

#line_item_descriptionString

Item identifier in the transaction.

Returns:

  • (String)


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

def line_item_description
  @line_item_description
end

#payer_numberString

Payer Number of the selected payer.

Returns:

  • (String)


24
25
26
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 24

def payer_number
  @payer_number
end

#periodPricedTransactionReqV2PeriodEnum

To transaction delivery date



116
117
118
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 116

def period
  @period
end

#posting_date_fromString

Transaction posting start date and time

Returns:

  • (String)


120
121
122
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 120

def posting_date_from
  @posting_date_from
end

#posting_date_toString

Transaction posting end date and time

Returns:

  • (String)


124
125
126
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 124

def posting_date_to
  @posting_date_to
end

#product_codeString

Product Code – Global as per GFN configuration

Returns:

  • (String)


48
49
50
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 48

def product_code
  @product_code
end

#product_nameString

Product Name – Global as per GFN configuration

Returns:

  • (String)


52
53
54
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 52

def product_name
  @product_name
end

#purchased_in_countryString

Network Delco PurchasedCountryName

Returns:

  • (String)


76
77
78
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 76

def purchased_in_country
  @purchased_in_country
end

#purchased_in_country_codeString

Purchased InCountryCode

Returns:

  • (String)


72
73
74
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 72

def purchased_in_country_code
  @purchased_in_country_code
end

#searchString

Search based on DriverName or VRN

Returns:

  • (String)


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

def search
  @search
end

#site_codeString

Site Code in GFN

Returns:

  • (String)


56
57
58
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 56

def site_code
  @site_code
end

#site_group_idInteger

Site Group Id in GFN

Returns:

  • (Integer)


80
81
82
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 80

def site_group_id
  @site_group_id
end

#sort_orderPricedTransactionReqV2SortOrderEnum

This entity accepts the list of CardId to filter in the response. Note: The number of cardId allowed to be passed in the request is configurable to a maximum of 500 cards.



104
105
106
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 104

def sort_order
  @sort_order
end

#to_dateString

To transaction delivery date

Returns:

  • (String)


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

def to_date
  @to_date
end

#transaction_idString

Unique id of the transaction that may include one or more salesitems

Returns:

  • (String)


174
175
176
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 174

def transaction_id
  @transaction_id
end

#transaction_item_idString

Unique id of the transaction that may include one or more salesitems

Returns:

  • (String)


128
129
130
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 128

def transaction_item_id
  @transaction_item_id
end

#valid_invoice_date_onlyTrueClass | FalseClass

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)


152
153
154
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 152

def valid_invoice_date_only
  @valid_invoice_date_only
end

#vehicle_registration_numberString

Vehicle Registration (of Card record)

Returns:

  • (String)


84
85
86
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 84

def vehicle_registration_number
  @vehicle_registration_number
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
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
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 363

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil
  invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : nil
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : nil
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
  driver_name = hash.key?('DriverName') ? hash['DriverName'] : SKIP
  card_group_id = hash.key?('CardGroupId') ? hash['CardGroupId'] : SKIP
  card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP
  product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
  product_name = hash.key?('ProductName') ? hash['ProductName'] : SKIP
  site_code = hash.key?('SiteCode') ? hash['SiteCode'] : SKIP
  incoming_site_number =
    hash.key?('IncomingSiteNumber') ? hash['IncomingSiteNumber'] : SKIP
  invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
  invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
  purchased_in_country_code =
    hash.key?('PurchasedInCountryCode') ? hash['PurchasedInCountryCode'] : SKIP
  purchased_in_country =
    hash.key?('PurchasedInCountry') ? hash['PurchasedInCountry'] : SKIP
  site_group_id = hash.key?('SiteGroupId') ? hash['SiteGroupId'] : SKIP
  vehicle_registration_number =
    hash.key?('VehicleRegistrationNumber') ? hash['VehicleRegistrationNumber'] : SKIP
  fee_type_id = hash.key?('FeeTypeId') ? hash['FeeTypeId'] : SKIP
  line_item_description =
    hash.key?('LineItemDescription') ? hash['LineItemDescription'] : SKIP
  cards = hash.key?('Cards') ? hash['Cards'] : SKIP
  sort_order = hash.key?('SortOrder') ? hash['SortOrder'] : SKIP
  from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
  to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
  period = hash.key?('Period') ? hash['Period'] : SKIP
  posting_date_from =
    hash.key?('PostingDateFrom') ? hash['PostingDateFrom'] : SKIP
  posting_date_to =
    hash.key?('PostingDateTo') ? hash['PostingDateTo'] : SKIP
  transaction_item_id =
    hash.key?('TransactionItemId') ? hash['TransactionItemId'] : SKIP
  fuel_only = hash['FuelOnly'] ||= false
  include_fees = hash.key?('IncludeFees') ? hash['IncludeFees'] : SKIP
  is_multipayer = hash.key?('IsMultipayer') ? hash['IsMultipayer'] : SKIP
  valid_invoice_date_only = hash['ValidInvoiceDateOnly'] ||= false
  invoice_from_date =
    hash.key?('InvoiceFromDate') ? hash['InvoiceFromDate'] : SKIP
  invoice_to_date =
    hash.key?('InvoiceToDate') ? hash['InvoiceToDate'] : SKIP
  hosting_collecting_company_number =
    hash.key?('HostingCollectingCompanyNumber') ? hash['HostingCollectingCompanyNumber'] : SKIP
  search = hash.key?('Search') ? hash['Search'] : SKIP
  transaction_id = hash.key?('TransactionId') ? hash['TransactionId'] : SKIP

  # Create object from extracted values.
  PricedRequestData.new(col_co_code,
                        invoice_status,
                        payer_number,
                        ,
                        ,
                        driver_name,
                        card_group_id,
                        card_pan,
                        product_code,
                        product_name,
                        site_code,
                        incoming_site_number,
                        invoice_date,
                        invoice_number,
                        purchased_in_country_code,
                        purchased_in_country,
                        site_group_id,
                        vehicle_registration_number,
                        fee_type_id,
                        line_item_description,
                        cards,
                        sort_order,
                        from_date,
                        to_date,
                        period,
                        posting_date_from,
                        posting_date_to,
                        transaction_item_id,
                        fuel_only,
                        include_fees,
                        is_multipayer,
                        valid_invoice_date_only,
                        invoice_from_date,
                        invoice_to_date,
                        hosting_collecting_company_number,
                        search,
                        transaction_id)
end

.namesObject

A mapping from model property names to API property names.



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 177

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['col_co_code'] = 'ColCoCode'
  @_hash['invoice_status'] = 'InvoiceStatus'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['driver_name'] = 'DriverName'
  @_hash['card_group_id'] = 'CardGroupId'
  @_hash['card_pan'] = 'CardPAN'
  @_hash['product_code'] = 'ProductCode'
  @_hash['product_name'] = 'ProductName'
  @_hash['site_code'] = 'SiteCode'
  @_hash['incoming_site_number'] = 'IncomingSiteNumber'
  @_hash['invoice_date'] = 'InvoiceDate'
  @_hash['invoice_number'] = 'InvoiceNumber'
  @_hash['purchased_in_country_code'] = 'PurchasedInCountryCode'
  @_hash['purchased_in_country'] = 'PurchasedInCountry'
  @_hash['site_group_id'] = 'SiteGroupId'
  @_hash['vehicle_registration_number'] = 'VehicleRegistrationNumber'
  @_hash['fee_type_id'] = 'FeeTypeId'
  @_hash['line_item_description'] = 'LineItemDescription'
  @_hash['cards'] = 'Cards'
  @_hash['sort_order'] = 'SortOrder'
  @_hash['from_date'] = 'FromDate'
  @_hash['to_date'] = 'ToDate'
  @_hash['period'] = 'Period'
  @_hash['posting_date_from'] = 'PostingDateFrom'
  @_hash['posting_date_to'] = 'PostingDateTo'
  @_hash['transaction_item_id'] = 'TransactionItemId'
  @_hash['fuel_only'] = 'FuelOnly'
  @_hash['include_fees'] = 'IncludeFees'
  @_hash['is_multipayer'] = 'IsMultipayer'
  @_hash['valid_invoice_date_only'] = 'ValidInvoiceDateOnly'
  @_hash['invoice_from_date'] = 'InvoiceFromDate'
  @_hash['invoice_to_date'] = 'InvoiceToDate'
  @_hash['hosting_collecting_company_number'] =
    'HostingCollectingCompanyNumber'
  @_hash['search'] = 'Search'
  @_hash['transaction_id'] = 'TransactionId'
  @_hash
end

.nullablesObject

An array for nullable fields



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
294
295
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 261

def self.nullables
  %w[
    col_co_code
    payer_number
    account_id
    account_number
    driver_name
    card_group_id
    card_pan
    product_code
    product_name
    site_code
    incoming_site_number
    invoice_date
    invoice_number
    purchased_in_country_code
    purchased_in_country
    site_group_id
    vehicle_registration_number
    fee_type_id
    line_item_description
    from_date
    to_date
    posting_date_from
    posting_date_to
    transaction_item_id
    fuel_only
    include_fees
    invoice_from_date
    invoice_to_date
    hosting_collecting_company_number
    search
    transaction_id
  ]
end

.optionalsObject

An array for optional fields



221
222
223
224
225
226
227
228
229
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
# File 'lib/shell_data_reporting_ap_is/models/priced_request_data.rb', line 221

def self.optionals
  %w[
    account_id
    account_number
    driver_name
    card_group_id
    card_pan
    product_code
    product_name
    site_code
    incoming_site_number
    invoice_date
    invoice_number
    purchased_in_country_code
    purchased_in_country
    site_group_id
    vehicle_registration_number
    fee_type_id
    line_item_description
    cards
    sort_order
    from_date
    to_date
    period
    posting_date_from
    posting_date_to
    transaction_item_id
    fuel_only
    include_fees
    is_multipayer
    valid_invoice_date_only
    invoice_from_date
    invoice_to_date
    hosting_collecting_company_number
    search
    transaction_id
  ]
end