Class: AgridClient::Customer
- Inherits:
-
Object
- Object
- AgridClient::Customer
- Includes:
- SwaggerModel
- Defined in:
- lib/agrid_client/models/customer.rb
Instance Attribute Summary collapse
-
#avatar ⇒ Object
URL of customer’s avatar image.
-
#email ⇒ Object
Email address.
-
#id ⇒ Object
Unique Id.
-
#name ⇒ Object
Customer’s name.
-
#phone ⇒ Object
Phone number.
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 = {}) ⇒ Customer
constructor
Initializes the object.
Methods included from SwaggerModel
#_deserialize, #_to_hash, #build_from_hash, #eql?, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ Customer
Initializes the object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/agrid_client/models/customer.rb', line 59 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[:'id'] self.id = attributes[:'id'] end if attributes[:'avatar'] self.avatar = attributes[:'avatar'] end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'email'] self.email = attributes[:'email'] end if attributes[:'phone'] self.phone = attributes[:'phone'] end end |
Instance Attribute Details
#avatar ⇒ Object
URL of customer’s avatar image
24 25 26 |
# File 'lib/agrid_client/models/customer.rb', line 24 def avatar @avatar end |
#email ⇒ Object
Email address
30 31 32 |
# File 'lib/agrid_client/models/customer.rb', line 30 def email @email end |
#id ⇒ Object
Unique Id
21 22 23 |
# File 'lib/agrid_client/models/customer.rb', line 21 def id @id end |
#name ⇒ Object
Customer’s name
27 28 29 |
# File 'lib/agrid_client/models/customer.rb', line 27 def name @name end |
#phone ⇒ Object
Phone number
33 34 35 |
# File 'lib/agrid_client/models/customer.rb', line 33 def phone @phone end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
36 37 38 39 40 41 42 43 44 |
# File 'lib/agrid_client/models/customer.rb', line 36 def self.attribute_map { :'id' => :'id', :'avatar' => :'avatar', :'name' => :'name', :'email' => :'email', :'phone' => :'phone' } end |
.swagger_types ⇒ Object
Attribute type mapping.
47 48 49 50 51 52 53 54 55 |
# File 'lib/agrid_client/models/customer.rb', line 47 def self.swagger_types { :'id' => :'String', :'avatar' => :'String', :'name' => :'String', :'email' => :'String', :'phone' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
84 85 86 87 88 |
# File 'lib/agrid_client/models/customer.rb', line 84 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id end |