Class: Gonebusy::UpdateResourceByIdBody
- Defined in:
- lib/gonebusy/models/update_resource_by_id_body.rb
Instance Attribute Summary collapse
-
#capacity ⇒ Integer
Optional Capacity.
-
#description ⇒ String
Optional Description.
-
#gender ⇒ GenderEnum
Optional Gender.
-
#name ⇒ String
Resource Name.
-
#thing_type_id ⇒ Integer
When Resource is a Thing, the type Id.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(capacity = nil, description = nil, gender = nil, name = nil, thing_type_id = nil) ⇒ UpdateResourceByIdBody
constructor
A new instance of UpdateResourceByIdBody.
Methods inherited from BaseModel
Constructor Details
#initialize(capacity = nil, description = nil, gender = nil, name = nil, thing_type_id = nil) ⇒ UpdateResourceByIdBody
Returns a new instance of UpdateResourceByIdBody.
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/gonebusy/models/update_resource_by_id_body.rb', line 38 def initialize(capacity = nil, description = nil, gender = nil, name = nil, thing_type_id = nil) @capacity = capacity @description = description @gender = gender @name = name @thing_type_id = thing_type_id end |
Instance Attribute Details
#capacity ⇒ Integer
Optional Capacity
7 8 9 |
# File 'lib/gonebusy/models/update_resource_by_id_body.rb', line 7 def capacity @capacity end |
#description ⇒ String
Optional Description
11 12 13 |
# File 'lib/gonebusy/models/update_resource_by_id_body.rb', line 11 def description @description end |
#gender ⇒ GenderEnum
Optional Gender
15 16 17 |
# File 'lib/gonebusy/models/update_resource_by_id_body.rb', line 15 def gender @gender end |
#name ⇒ String
Resource Name
19 20 21 |
# File 'lib/gonebusy/models/update_resource_by_id_body.rb', line 19 def name @name end |
#thing_type_id ⇒ Integer
When Resource is a Thing, the type Id
23 24 25 |
# File 'lib/gonebusy/models/update_resource_by_id_body.rb', line 23 def thing_type_id @thing_type_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/gonebusy/models/update_resource_by_id_body.rb', line 51 def self.from_hash(hash) if hash == nil nil else # Extract variables from the hash capacity = hash["capacity"] description = hash["description"] gender = hash["gender"] name = hash["name"] thing_type_id = hash["thing_type_id"] # Create object from extracted values UpdateResourceByIdBody.new(capacity, description, gender, name, thing_type_id) end end |
.names ⇒ Object
A mapping from model property names to API property names
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/gonebusy/models/update_resource_by_id_body.rb', line 26 def self.names if @hash.nil? @hash = {} @hash["capacity"] = "capacity" @hash["description"] = "description" @hash["gender"] = "gender" @hash["name"] = "name" @hash["thing_type_id"] = "thing_type_id" end @hash end |