Class: Gonebusy::UpdateServiceByIdBody
- Defined in:
- lib/gonebusy/models/update_service_by_id_body.rb
Instance Attribute Summary collapse
-
#categories ⇒ String
Optional List of comma-separated Category IDs to associate with Service.
-
#description ⇒ String
Service Description.
-
#duration ⇒ Integer
Duration of the Service in minutes.
-
#max_duration ⇒ Integer
Max duration of the Service in minutes.
-
#name ⇒ String
Service Name.
-
#price_model_id ⇒ Integer
Optional Price Model Id.
-
#resources ⇒ String
Optional List of comma-separated Resource IDs that will provide this Service, default: API user’s resource id.
-
#short_name ⇒ String
Optional abbreviated Service name.
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(categories = nil, description = nil, duration = nil, max_duration = nil, name = nil, price_model_id = nil, resources = nil, short_name = nil) ⇒ UpdateServiceByIdBody
constructor
A new instance of UpdateServiceByIdBody.
Methods inherited from BaseModel
Constructor Details
#initialize(categories = nil, description = nil, duration = nil, max_duration = nil, name = nil, price_model_id = nil, resources = nil, short_name = nil) ⇒ UpdateServiceByIdBody
Returns a new instance of UpdateServiceByIdBody.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 53 def initialize(categories = nil, description = nil, duration = nil, max_duration = nil, name = nil, price_model_id = nil, resources = nil, short_name = nil) @categories = categories @description = description @duration = duration @max_duration = max_duration @name = name @price_model_id = price_model_id @resources = resources @short_name = short_name end |
Instance Attribute Details
#categories ⇒ String
Optional List of comma-separated Category IDs to associate with Service
7 8 9 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 7 def categories @categories end |
#description ⇒ String
Service Description
11 12 13 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 11 def description @description end |
#duration ⇒ Integer
Duration of the Service in minutes
15 16 17 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 15 def duration @duration end |
#max_duration ⇒ Integer
Max duration of the Service in minutes
19 20 21 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 19 def max_duration @max_duration end |
#name ⇒ String
Service Name
23 24 25 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 23 def name @name end |
#price_model_id ⇒ Integer
Optional Price Model Id
27 28 29 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 27 def price_model_id @price_model_id end |
#resources ⇒ String
Optional List of comma-separated Resource IDs that will provide this Service, default: API user’s resource id
31 32 33 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 31 def resources @resources end |
#short_name ⇒ String
Optional abbreviated Service name
35 36 37 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 35 def short_name @short_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 72 def self.from_hash(hash) if hash == nil nil else # Extract variables from the hash categories = hash["categories"] description = hash["description"] duration = hash["duration"] max_duration = hash["max_duration"] name = hash["name"] price_model_id = hash["price_model_id"] resources = hash["resources"] short_name = hash["short_name"] # Create object from extracted values UpdateServiceByIdBody.new(categories, description, duration, max_duration, name, price_model_id, resources, short_name) end end |
.names ⇒ Object
A mapping from model property names to API property names
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gonebusy/models/update_service_by_id_body.rb', line 38 def self.names if @hash.nil? @hash = {} @hash["categories"] = "categories" @hash["description"] = "description" @hash["duration"] = "duration" @hash["max_duration"] = "max_duration" @hash["name"] = "name" @hash["price_model_id"] = "price_model_id" @hash["resources"] = "resources" @hash["short_name"] = "short_name" end @hash end |