Class: ShellDataReportingApIs::UpdateOdometerReference
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::UpdateOdometerReference
- Defined in:
- lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb
Overview
UpdateOdometerReference Model.
Instance Attribute Summary collapse
-
#sales_item_id ⇒ Integer
SalesItemId of input parameter.
-
#update_odometer_reference_id ⇒ Integer
Reference number for each individual update odometer reference.
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(sales_item_id = SKIP, update_odometer_reference_id = SKIP) ⇒ UpdateOdometerReference
constructor
A new instance of UpdateOdometerReference.
Methods inherited from BaseModel
Constructor Details
#initialize(sales_item_id = SKIP, update_odometer_reference_id = SKIP) ⇒ UpdateOdometerReference
Returns a new instance of UpdateOdometerReference.
44 45 46 47 48 49 50 |
# File 'lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb', line 44 def initialize(sales_item_id = SKIP, update_odometer_reference_id = SKIP) @sales_item_id = sales_item_id unless sales_item_id == SKIP unless update_odometer_reference_id == SKIP @update_odometer_reference_id = update_odometer_reference_id end end |
Instance Attribute Details
#sales_item_id ⇒ Integer
SalesItemId of input parameter
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb', line 14 def sales_item_id @sales_item_id end |
#update_odometer_reference_id ⇒ Integer
Reference number for each individual update odometer reference.
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb', line 18 def update_odometer_reference_id @update_odometer_reference_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb', line 53 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. sales_item_id = hash.key?('SalesItemId') ? hash['SalesItemId'] : SKIP update_odometer_reference_id = hash.key?('UpdateOdometerReferenceId') ? hash['UpdateOdometerReferenceId'] : SKIP # Create object from extracted values. UpdateOdometerReference.new(sales_item_id, update_odometer_reference_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['sales_item_id'] = 'SalesItemId' @_hash['update_odometer_reference_id'] = 'UpdateOdometerReferenceId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
37 38 39 40 41 42 |
# File 'lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb', line 37 def self.nullables %w[ sales_item_id update_odometer_reference_id ] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 34 |
# File 'lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb', line 29 def self.optionals %w[ sales_item_id update_odometer_reference_id ] end |