Class: ShellDataReportingApIs::VolumeBasedBonusRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::VolumeBasedBonusRequest
- Defined in:
- lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb
Overview
VolumeBasedBonusRequest Model.
Instance Attribute Summary collapse
-
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#include_current_period_volume ⇒ TrueClass | FalseClass
The API will return the details of the monthly breakup of current period fuel consumption (Volume) in the response when this flag is ‘True’.
-
#include_history ⇒ TrueClass | FalseClass
The API will return the details of the previously calculated/paid bonus and fuel consumption (Volume) in the response when this flag is ‘True’.
-
#payer_id ⇒ Integer
Payer Id of the selected payer.
-
#payer_number ⇒ String
Payer Number of the selected payer.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, include_history = SKIP, include_current_period_volume = SKIP) ⇒ VolumeBasedBonusRequest
constructor
A new instance of VolumeBasedBonusRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, include_history = SKIP, include_current_period_volume = SKIP) ⇒ VolumeBasedBonusRequest
Returns a new instance of VolumeBasedBonusRequest.
78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 78 def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, include_history = SKIP, include_current_period_volume = 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 @include_history = include_history unless include_history == SKIP unless include_current_period_volume == SKIP @include_current_period_volume = include_current_period_volume end end |
Instance Attribute Details
#col_co_code ⇒ Integer
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
27 28 29 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 27 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer. Optional if ColCoCode is passed else Mandatory. Example: 1 for Philippines 5 for UK
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 18 def col_co_id @col_co_id end |
#include_current_period_volume ⇒ TrueClass | FalseClass
The API will return the details of the monthly breakup of current period fuel consumption (Volume) in the response when this flag is ‘True’.
47 48 49 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 47 def include_current_period_volume @include_current_period_volume end |
#include_history ⇒ TrueClass | FalseClass
The API will return the details of the previously calculated/paid bonus and fuel consumption (Volume) in the response when this flag is ‘True’.
42 43 44 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 42 def include_history @include_history end |
#payer_id ⇒ Integer
Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory
32 33 34 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 32 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number of the selected payer. Optional if PayerId is passed else Mandatory
37 38 39 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 37 def payer_number @payer_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 93 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 include_history = hash.key?('IncludeHistory') ? hash['IncludeHistory'] : SKIP include_current_period_volume = hash.key?('IncludeCurrentPeriodVolume') ? hash['IncludeCurrentPeriodVolume'] : SKIP # Create object from extracted values. VolumeBasedBonusRequest.new(col_co_id, col_co_code, payer_id, payer_number, include_history, include_current_period_volume) end |
.names ⇒ Object
A mapping from model property names to API property names.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 50 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['include_history'] = 'IncludeHistory' @_hash['include_current_period_volume'] = 'IncludeCurrentPeriodVolume' @_hash end |
.nullables ⇒ Object
An array for nullable fields
74 75 76 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 74 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb', line 62 def self.optionals %w[ col_co_id col_co_code payer_id payer_number include_history include_current_period_volume ] end |