Class: ShellDataReportingApIs::PricedTransactionItemsLocationItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::PricedTransactionItemsLocationItems
- Defined in:
- lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb
Overview
PricedTransactionItemsLocationItems Model.
Instance Attribute Summary collapse
-
#latitude ⇒ String
Latitude for the Site Geographic Location Example: 37.4224764 Note: - The value could be null/blank for fees item.
-
#longitude ⇒ String
Longitude for the Site Geographic Location Example: 122.0842499 Note: - The value could be null/blank for fees item.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(latitude = SKIP, longitude = SKIP) ⇒ PricedTransactionItemsLocationItems
constructor
A new instance of PricedTransactionItemsLocationItems.
Methods inherited from BaseModel
Constructor Details
#initialize(latitude = SKIP, longitude = SKIP) ⇒ PricedTransactionItemsLocationItems
Returns a new instance of PricedTransactionItemsLocationItems.
48 49 50 51 |
# File 'lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb', line 48 def initialize(latitude = SKIP, longitude = SKIP) @latitude = latitude unless latitude == SKIP @longitude = longitude unless longitude == SKIP end |
Instance Attribute Details
#latitude ⇒ String
Latitude for the Site Geographic Location Example: 37.4224764 Note: - The value could be null/blank for fees item.
16 17 18 |
# File 'lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb', line 16 def latitude @latitude end |
#longitude ⇒ String
Longitude for the Site Geographic Location Example: 122.0842499 Note: - The value could be null/blank for fees item.
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb', line 22 def longitude @longitude end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb', line 54 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. latitude = hash.key?('Latitude') ? hash['Latitude'] : SKIP longitude = hash.key?('Longitude') ? hash['Longitude'] : SKIP # Create object from extracted values. PricedTransactionItemsLocationItems.new(latitude, longitude) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 |
# File 'lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['latitude'] = 'Latitude' @_hash['longitude'] = 'Longitude' @_hash end |
.nullables ⇒ Object
An array for nullable fields
41 42 43 44 45 46 |
# File 'lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb', line 41 def self.nullables %w[ latitude longitude ] end |
.optionals ⇒ Object
An array for optional fields
33 34 35 36 37 38 |
# File 'lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb', line 33 def self.optionals %w[ latitude longitude ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
68 69 70 71 72 73 74 |
# File 'lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb', line 68 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |