Class: Gonebusy::EntitiesTimeWindowResponse
- Defined in:
- lib/gonebusy/models/entities_time_window_response.rb
Instance Attribute Summary collapse
-
#date_recurs_by ⇒ String
date_recurs_by.
-
#days ⇒ List of String
array of days of week TimeWindow falls on.
-
#end_date ⇒ Date
end date.
-
#end_time ⇒ String
end time.
-
#frequency ⇒ String
frequency.
-
#id ⇒ Integer
id of TimeWindow.
-
#occurrence ⇒ String
occurrence.
-
#recurs_by ⇒ String
recurs by.
-
#start_date ⇒ Date
start date.
-
#start_time ⇒ String
start time.
-
#total_minutes ⇒ Integer
total minutes spanned.
-
#unavailable ⇒ Boolean
true is available, false is unavailable.
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, start_date = nil, end_date = nil, start_time = nil, end_time = nil, total_minutes = nil, recurs_by = nil, frequency = nil, occurrence = nil, date_recurs_by = nil, days = nil, unavailable = nil) ⇒ EntitiesTimeWindowResponse
constructor
A new instance of EntitiesTimeWindowResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(id = nil, start_date = nil, end_date = nil, start_time = nil, end_time = nil, total_minutes = nil, recurs_by = nil, frequency = nil, occurrence = nil, date_recurs_by = nil, days = nil, unavailable = nil) ⇒ EntitiesTimeWindowResponse
Returns a new instance of EntitiesTimeWindowResponse.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 73 def initialize(id = nil, start_date = nil, end_date = nil, start_time = nil, end_time = nil, total_minutes = nil, recurs_by = nil, frequency = nil, occurrence = nil, date_recurs_by = nil, days = nil, unavailable = nil) @id = id @start_date = start_date @end_date = end_date @start_time = start_time @end_time = end_time @total_minutes = total_minutes @recurs_by = recurs_by @frequency = frequency @occurrence = occurrence @date_recurs_by = date_recurs_by @days = days @unavailable = unavailable end |
Instance Attribute Details
#date_recurs_by ⇒ String
date_recurs_by
43 44 45 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 43 def date_recurs_by @date_recurs_by end |
#days ⇒ List of String
array of days of week TimeWindow falls on
47 48 49 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 47 def days @days end |
#end_date ⇒ Date
end date
15 16 17 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 15 def end_date @end_date end |
#end_time ⇒ String
end time
23 24 25 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 23 def end_time @end_time end |
#frequency ⇒ String
frequency
35 36 37 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 35 def frequency @frequency end |
#id ⇒ Integer
id of TimeWindow
7 8 9 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 7 def id @id end |
#occurrence ⇒ String
occurrence
39 40 41 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 39 def occurrence @occurrence end |
#recurs_by ⇒ String
recurs by
31 32 33 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 31 def recurs_by @recurs_by end |
#start_date ⇒ Date
start date
11 12 13 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 11 def start_date @start_date end |
#start_time ⇒ String
start time
19 20 21 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 19 def start_time @start_time end |
#total_minutes ⇒ Integer
total minutes spanned
27 28 29 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 27 def total_minutes @total_minutes end |
#unavailable ⇒ Boolean
true is available, false is unavailable
51 52 53 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 51 def unavailable @unavailable end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 100 def self.from_hash(hash) return nil unless hash # Extract variables from the hash id = hash['id'] start_date = hash['start_date'] end_date = hash['end_date'] start_time = hash['start_time'] end_time = hash['end_time'] total_minutes = hash['total_minutes'] recurs_by = hash['recurs_by'] frequency = hash['frequency'] occurrence = hash['occurrence'] date_recurs_by = hash['date_recurs_by'] days = hash['days'] unavailable = hash['unavailable'] # Create object from extracted values EntitiesTimeWindowResponse.new(id, start_date, end_date, start_time, end_time, total_minutes, recurs_by, frequency, occurrence, date_recurs_by, days, unavailable) end |
.names ⇒ Object
A mapping from model property names to API property names
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/gonebusy/models/entities_time_window_response.rb', line 54 def self.names if @_hash.nil? @_hash = {} @_hash["id"] = "id" @_hash["start_date"] = "start_date" @_hash["end_date"] = "end_date" @_hash["start_time"] = "start_time" @_hash["end_time"] = "end_time" @_hash["total_minutes"] = "total_minutes" @_hash["recurs_by"] = "recurs_by" @_hash["frequency"] = "frequency" @_hash["occurrence"] = "occurrence" @_hash["date_recurs_by"] = "date_recurs_by" @_hash["days"] = "days" @_hash["unavailable"] = "unavailable" end @_hash end |