Class: AgridClient::CustomerInput
- Inherits:
-
Object
- Object
- AgridClient::CustomerInput
- Includes:
- SwaggerModel
- Defined in:
- lib/agrid_client/models/customer_input.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
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 = {}) ⇒ CustomerInput
constructor
Initializes the object.
Methods included from SwaggerModel
#_deserialize, #_to_hash, #build_from_hash, #eql?, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ CustomerInput
Initializes the object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/agrid_client/models/customer_input.rb', line 46 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[:'email'] self.email = attributes[:'email'] end if attributes[:'phone'] self.phone = attributes[:'phone'] end if attributes[:'name'] self.name = attributes[:'name'] end end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
20 21 22 |
# File 'lib/agrid_client/models/customer_input.rb', line 20 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
24 25 26 |
# File 'lib/agrid_client/models/customer_input.rb', line 24 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
22 23 24 |
# File 'lib/agrid_client/models/customer_input.rb', line 22 def phone @phone end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
27 28 29 30 31 32 33 |
# File 'lib/agrid_client/models/customer_input.rb', line 27 def self.attribute_map { :'email' => :'email', :'phone' => :'phone', :'name' => :'name' } end |
.swagger_types ⇒ Object
Attribute type mapping.
36 37 38 39 40 41 42 |
# File 'lib/agrid_client/models/customer_input.rb', line 36 def self.swagger_types { :'email' => :'String', :'phone' => :'String', :'name' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
65 66 67 68 69 70 71 |
# File 'lib/agrid_client/models/customer_input.rb', line 65 def ==(o) return true if self.equal?(o) self.class == o.class && email == o.email && phone == o.phone && name == o.name end |