Class: Gonebusy::EntitiesBookingResponse
- Defined in:
- lib/gonebusy/models/entities_booking_response.rb
Instance Attribute Summary collapse
-
#collaborative_link ⇒ String
video chat or other link associated with Booking, if any.
-
#description ⇒ String
description for Booking, if any.
-
#external_link ⇒ String
external management link for Booking, if any.
-
#id ⇒ Integer
id of Booking.
-
#name ⇒ String
name of Booking, if any.
-
#owner_id ⇒ Integer
id of owner of Booking.
-
#resource_id ⇒ Integer
id of Resource performing Booking.
-
#service_id ⇒ Integer
id of Service booked.
-
#time_window ⇒ EntitiesTimeWindowResponse
TimeWindow corresponding to Booking.
-
#workflow_state ⇒ String
status of Booking.
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(id = nil, owner_id = nil, workflow_state = nil, name = nil, time_window = nil, resource_id = nil, service_id = nil, description = nil, external_link = nil, collaborative_link = nil) ⇒ EntitiesBookingResponse
constructor
A new instance of EntitiesBookingResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(id = nil, owner_id = nil, workflow_state = nil, name = nil, time_window = nil, resource_id = nil, service_id = nil, description = nil, external_link = nil, collaborative_link = nil) ⇒ EntitiesBookingResponse
Returns a new instance of EntitiesBookingResponse.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 63 def initialize(id = nil, owner_id = nil, workflow_state = nil, name = nil, time_window = nil, resource_id = nil, service_id = nil, description = nil, external_link = nil, collaborative_link = nil) @id = id @owner_id = owner_id @workflow_state = workflow_state @name = name @time_window = time_window @resource_id = resource_id @service_id = service_id @description = description @external_link = external_link @collaborative_link = collaborative_link end |
Instance Attribute Details
#collaborative_link ⇒ String
video chat or other link associated with Booking, if any
43 44 45 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 43 def collaborative_link @collaborative_link end |
#description ⇒ String
description for Booking, if any
35 36 37 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 35 def description @description end |
#external_link ⇒ String
external management link for Booking, if any
39 40 41 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 39 def external_link @external_link end |
#id ⇒ Integer
id of Booking
7 8 9 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 7 def id @id end |
#name ⇒ String
name of Booking, if any
19 20 21 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 19 def name @name end |
#owner_id ⇒ Integer
id of owner of Booking
11 12 13 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 11 def owner_id @owner_id end |
#resource_id ⇒ Integer
id of Resource performing Booking
27 28 29 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 27 def resource_id @resource_id end |
#service_id ⇒ Integer
id of Service booked
31 32 33 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 31 def service_id @service_id end |
#time_window ⇒ EntitiesTimeWindowResponse
TimeWindow corresponding to Booking
23 24 25 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 23 def time_window @time_window end |
#workflow_state ⇒ String
status of Booking
15 16 17 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 15 def workflow_state @workflow_state end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 86 def self.from_hash(hash) return nil unless hash # Extract variables from the hash id = hash['id'] owner_id = hash['owner_id'] workflow_state = hash['workflow_state'] name = hash['name'] time_window = EntitiesTimeWindowResponse.from_hash(hash['time_window']) if hash['time_window'] resource_id = hash['resource_id'] service_id = hash['service_id'] description = hash['description'] external_link = hash['external_link'] collaborative_link = hash['collaborative_link'] # Create object from extracted values EntitiesBookingResponse.new(id, owner_id, workflow_state, name, time_window, resource_id, service_id, description, external_link, collaborative_link) end |
.names ⇒ Object
A mapping from model property names to API property names
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/gonebusy/models/entities_booking_response.rb', line 46 def self.names if @_hash.nil? @_hash = {} @_hash["id"] = "id" @_hash["owner_id"] = "owner_id" @_hash["workflow_state"] = "workflow_state" @_hash["name"] = "name" @_hash["time_window"] = "time_window" @_hash["resource_id"] = "resource_id" @_hash["service_id"] = "service_id" @_hash["description"] = "description" @_hash["external_link"] = "external_link" @_hash["collaborative_link"] = "collaborative_link" end @_hash end |