Class: AgridClient::Phone
- Inherits:
-
Object
- Object
- AgridClient::Phone
- Includes:
- SwaggerModel
- Defined in:
- lib/agrid_client/models/phone.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
Company phone number.
-
#person_in_charge ⇒ Object
Company phone number.
-
#phone_type ⇒ Object
Company 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 = {}) ⇒ Phone
constructor
Initializes the object.
Methods included from SwaggerModel
#_deserialize, #_to_hash, #build_from_hash, #eql?, #to_body, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ Phone
Initializes the object
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/agrid_client/models/phone.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} self.number = attributes[:'number'] if attributes[:'number'] self.person_in_charge = attributes[:'person_in_charge'] if attributes[:'person_in_charge'] self.phone_type = attributes[:'phone_type'] if attributes[:'phone_type'] end |
Instance Attribute Details
#number ⇒ Object
Company phone number
21 22 23 |
# File 'lib/agrid_client/models/phone.rb', line 21 def number @number end |
#person_in_charge ⇒ Object
Company phone number
21 22 23 |
# File 'lib/agrid_client/models/phone.rb', line 21 def person_in_charge @person_in_charge end |
#phone_type ⇒ Object
Company phone number
21 22 23 |
# File 'lib/agrid_client/models/phone.rb', line 21 def phone_type @phone_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
24 25 26 27 28 29 30 |
# File 'lib/agrid_client/models/phone.rb', line 24 def self.attribute_map { :'number' => :'number', :'person_in_charge' => :'person_in_charge', :'phone_type' => :'phone_type' } end |
.swagger_types ⇒ Object
Attribute type mapping.
33 34 35 36 37 38 39 |
# File 'lib/agrid_client/models/phone.rb', line 33 def self.swagger_types { :'number' => :'String', :'person_in_charge' => :'String', :'phone_type' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
57 58 59 60 61 62 63 |
# File 'lib/agrid_client/models/phone.rb', line 57 def ==(o) return true if self.equal?(o) self.class == o.class && number == o.number && person_in_charge == o.person_in_charge && phone_type == o.phone_type end |