Class: AgridClient::Location
- Inherits:
-
Object
- Object
- AgridClient::Location
- Includes:
- SwaggerModel
- Defined in:
- lib/agrid_client/models/location.rb
Instance Attribute Summary collapse
-
#lat ⇒ Object
Latitude of company address.
-
#lon ⇒ Object
Longitude of company address.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#initialize(attributes = {}) ⇒ Location
constructor
Initializes the object.
Methods included from SwaggerModel
#_deserialize, #_to_hash, #build_from_hash, #eql?, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ Location
Initializes the object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/agrid_client/models/location.rb', line 43 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes[:'lat'] self.lat = attributes[:'lat'] end if attributes[:'lon'] self.lon = attributes[:'lon'] end end |
Instance Attribute Details
#lat ⇒ Object
Latitude of company address
20 21 22 |
# File 'lib/agrid_client/models/location.rb', line 20 def lat @lat end |
#lon ⇒ Object
Longitude of company address
23 24 25 |
# File 'lib/agrid_client/models/location.rb', line 23 def lon @lon end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
26 27 28 29 30 31 |
# File 'lib/agrid_client/models/location.rb', line 26 def self.attribute_map { :'lat' => :'lat', :'lon' => :'lon' } end |
.swagger_types ⇒ Object
Attribute type mapping.
34 35 36 37 38 39 |
# File 'lib/agrid_client/models/location.rb', line 34 def self.swagger_types { :'lat' => :'String', :'lon' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
59 60 61 62 63 64 |
# File 'lib/agrid_client/models/location.rb', line 59 def ==(o) return true if self.equal?(o) self.class == o.class && lat == o.lat && lon == o.lon end |