Class: AgridClient::Address
- Inherits:
-
Object
- Object
- AgridClient::Address
- Includes:
- SwaggerModel
- Defined in:
- lib/agrid_client/models/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
City of company address.
-
#complement ⇒ Object
Additional info of company address.
-
#country ⇒ Object
Country of company address.
-
#district ⇒ Object
District of company address.
-
#number ⇒ Object
Number of company address.
-
#state ⇒ Object
State of company address.
-
#street ⇒ Object
Street of company address.
-
#zipcode ⇒ Object
Zipcode 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 = {}) ⇒ Address
constructor
Initializes the object.
Methods included from SwaggerModel
#_deserialize, #_to_hash, #build_from_hash, #eql?, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ Address
Initializes the object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/agrid_client/models/address.rb', line 74 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[:'street'] self.street = attributes[:'street'] end if attributes[:'number'] self.number = attributes[:'number'] end if attributes[:'complement'] self.complement = attributes[:'complement'] end if attributes[:'district'] self.district = attributes[:'district'] end if attributes[:'zipcode'] self.zipcode = attributes[:'zipcode'] end if attributes[:'city'] self.city = attributes[:'city'] end if attributes[:'state'] self.state = attributes[:'state'] end if attributes[:'country'] self.country = attributes[:'country'] end end |
Instance Attribute Details
#city ⇒ Object
City of company address
36 37 38 |
# File 'lib/agrid_client/models/address.rb', line 36 def city @city end |
#complement ⇒ Object
Additional info of company address
27 28 29 |
# File 'lib/agrid_client/models/address.rb', line 27 def complement @complement end |
#country ⇒ Object
Country of company address
42 43 44 |
# File 'lib/agrid_client/models/address.rb', line 42 def country @country end |
#district ⇒ Object
District of company address
30 31 32 |
# File 'lib/agrid_client/models/address.rb', line 30 def district @district end |
#number ⇒ Object
Number of company address
24 25 26 |
# File 'lib/agrid_client/models/address.rb', line 24 def number @number end |
#state ⇒ Object
State of company address
39 40 41 |
# File 'lib/agrid_client/models/address.rb', line 39 def state @state end |
#street ⇒ Object
Street of company address
21 22 23 |
# File 'lib/agrid_client/models/address.rb', line 21 def street @street end |
#zipcode ⇒ Object
Zipcode of company address
33 34 35 |
# File 'lib/agrid_client/models/address.rb', line 33 def zipcode @zipcode end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/agrid_client/models/address.rb', line 45 def self.attribute_map { :'street' => :'street', :'number' => :'number', :'complement' => :'complement', :'district' => :'district', :'zipcode' => :'zipcode', :'city' => :'city', :'state' => :'state', :'country' => :'country' } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/agrid_client/models/address.rb', line 59 def self.swagger_types { :'street' => :'String', :'number' => :'String', :'complement' => :'String', :'district' => :'String', :'zipcode' => :'String', :'city' => :'String', :'state' => :'String', :'country' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/agrid_client/models/address.rb', line 108 def ==(o) return true if self.equal?(o) self.class == o.class && street == o.street && number == o.number && complement == o.complement && district == o.district && zipcode == o.zipcode && city == o.city && state == o.state && country == o.country end |