Class: ShellDataReportingApIs::CustomerPriceListRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::CustomerPriceListRequest
- Defined in:
- lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb
Overview
CustomerPriceListRequest Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account Id of the customer.
-
#account_number ⇒ String
Account Number of the customer.
-
#col_co_code ⇒ Integer
TODO: Write general description for this method.
-
#col_co_id ⇒ Integer
TODO: Write general description for this method.
-
#customer_specific_list ⇒ Integer
Whether customer specific price lists and customer specific discount values set on pump prices are to be returned or not.
-
#del_co_id ⇒ Integer
Delivering Company ID Optional.
-
#from_date ⇒ String
Start date to fetch the price lists, discount values on pump prices and VAT rates.
-
#include_pump_price_discounts ⇒ TrueClass | FalseClass
True / False.
-
#payer_id ⇒ Integer
Payer Id of the selected payer.
-
#payer_number ⇒ String
Payer Number of the selected payer.
-
#price_list_type ⇒ Integer
Specifies the type of price lists to be included in the response.
-
#to_date ⇒ String
End date to fetch the price lists, discount values on pump prices and VAT rates.
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(from_date = nil, to_date = nil, col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, customer_specific_list = SKIP, price_list_type = SKIP, del_co_id = SKIP, include_pump_price_discounts = SKIP) ⇒ CustomerPriceListRequest
constructor
A new instance of CustomerPriceListRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(from_date = nil, to_date = nil, col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, customer_specific_list = SKIP, price_list_type = SKIP, del_co_id = SKIP, include_pump_price_discounts = SKIP) ⇒ CustomerPriceListRequest
Returns a new instance of CustomerPriceListRequest.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 135 def initialize(from_date = nil, to_date = nil, col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account_id = SKIP, account_number = SKIP, customer_specific_list = SKIP, price_list_type = SKIP, del_co_id = SKIP, include_pump_price_discounts = 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 @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @customer_specific_list = customer_specific_list unless customer_specific_list == SKIP @price_list_type = price_list_type unless price_list_type == SKIP @del_co_id = del_co_id unless del_co_id == SKIP @from_date = from_date @to_date = to_date unless include_pump_price_discounts == SKIP @include_pump_price_discounts = include_pump_price_discounts end end |
Instance Attribute Details
#account_id ⇒ Integer
Account Id of the customer. Optional
33 34 35 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 33 def account_id @account_id end |
#account_number ⇒ String
Account Number of the customer. Optional
38 39 40 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 38 def account_number @account_number end |
#col_co_code ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 18 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 14 def col_co_id @col_co_id end |
#customer_specific_list ⇒ Integer
Whether customer specific price lists and customer specific discount values set on pump prices are to be returned or not.
43 44 45 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 43 def customer_specific_list @customer_specific_list end |
#del_co_id ⇒ Integer
Delivering Company ID Optional.
57 58 59 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 57 def del_co_id @del_co_id end |
#from_date ⇒ String
Start date to fetch the price lists, discount values on pump prices and VAT rates. Mandatory Format: yyyyMMdd
64 65 66 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 64 def from_date @from_date end |
#include_pump_price_discounts ⇒ TrueClass | FalseClass
True / False. A flag to request the discount information set on pump prices for the customer to be included in the response. Optional Default value: False
81 82 83 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 81 def include_pump_price_discounts @include_pump_price_discounts end |
#payer_id ⇒ Integer
Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory
23 24 25 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 23 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number of the selected payer. Optional if PayerId is passed else Mandatory
28 29 30 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 28 def payer_number @payer_number end |
#price_list_type ⇒ Integer
Specifies the type of price lists to be included in the response. Optional – default value is zero. Allowed values: 0 – All 1 – National Only 2 – International Only
52 53 54 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 52 def price_list_type @price_list_type end |
#to_date ⇒ String
End date to fetch the price lists, discount values on pump prices and VAT rates. Mandatory and greater than or equal to FromDate. Maximum of 30 (configurable) day’s duration is allowed between ‘From’ and ‘To’ dates. Format: yyyyMMdd
73 74 75 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 73 def to_date @to_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 187 188 189 190 191 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 158 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. from_date = hash.key?('FromDate') ? hash['FromDate'] : nil to_date = hash.key?('ToDate') ? hash['ToDate'] : nil 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 account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP customer_specific_list = hash.key?('CustomerSpecificList') ? hash['CustomerSpecificList'] : SKIP price_list_type = hash.key?('PriceListType') ? hash['PriceListType'] : SKIP del_co_id = hash.key?('DelCoId') ? hash['DelCoId'] : SKIP include_pump_price_discounts = hash.key?('IncludePumpPriceDiscounts') ? hash['IncludePumpPriceDiscounts'] : SKIP # Create object from extracted values. CustomerPriceListRequest.new(from_date, to_date, col_co_id, col_co_code, payer_id, payer_number, account_id, account_number, customer_specific_list, price_list_type, del_co_id, include_pump_price_discounts) end |
.names ⇒ Object
A mapping from model property names to API property names.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 84 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['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['customer_specific_list'] = 'CustomerSpecificList' @_hash['price_list_type'] = 'PriceListType' @_hash['del_co_id'] = 'DelCoId' @_hash['from_date'] = 'FromDate' @_hash['to_date'] = 'ToDate' @_hash['include_pump_price_discounts'] = 'IncludePumpPriceDiscounts' @_hash end |
.nullables ⇒ Object
An array for nullable fields
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 118 def self.nullables %w[ col_co_id col_co_code payer_id payer_number account_id account_number customer_specific_list price_list_type del_co_id from_date to_date include_pump_price_discounts ] end |
.optionals ⇒ Object
An array for optional fields
102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb', line 102 def self.optionals %w[ col_co_id col_co_code payer_id payer_number account_id account_number customer_specific_list price_list_type del_co_id include_pump_price_discounts ] end |