Class: Booker::V5::Models::Availability

Inherits:
Model
  • Object
show all
Defined in:
lib/booker/v5/models/availability.rb

Constant Summary

Constants inherited from Model

Model::CONSTANTIZE_MODULE

Constants inherited from Model

Model::CONSTANTIZE_MODULE

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

constantize, from_list, #initialize, #to_hash, #to_json

Constructor Details

This class inherits a constructor from Booker::Model

Instance Attribute Details

#employeesObject

Returns the value of attribute employees.



5
6
7
# File 'lib/booker/v5/models/availability.rb', line 5

def employees
  @employees
end

#endDateTimeObject

Returns the value of attribute endDateTime.



5
6
7
# File 'lib/booker/v5/models/availability.rb', line 5

def endDateTime
  @endDateTime
end

#startDateTimeObject

Returns the value of attribute startDateTime.



5
6
7
# File 'lib/booker/v5/models/availability.rb', line 5

def startDateTime
  @startDateTime
end

Class Method Details

.from_hash(hash) ⇒ Object



9
10
11
12
13
14
# File 'lib/booker/v5/models/availability.rb', line 9

def self.from_hash(hash)
  model = super
  model.startDateTime = Time.parse(model.startDateTime) if model.startDateTime
  model.endDateTime = Time.parse(model.endDateTime) if model.endDateTime
  model
end