Class: Bookafy::Model::Appointment
- Inherits:
-
Object
- Object
- Bookafy::Model::Appointment
- Includes:
- Timestamps
- Defined in:
- lib/bookafy/model/appointment.rb
Instance Attribute Summary collapse
-
#all_day ⇒ Object
Returns the value of attribute all_day.
-
#all_day_blocker ⇒ Object
Returns the value of attribute all_day_blocker.
-
#appointment_end_time ⇒ Object
Returns the value of attribute appointment_end_time.
-
#appointment_start_time ⇒ Object
Returns the value of attribute appointment_start_time.
-
#category ⇒ Object
Returns the value of attribute category.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#description ⇒ Object
Returns the value of attribute description.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_active ⇒ Object
Returns the value of attribute is_active.
-
#is_blocker ⇒ Object
Returns the value of attribute is_blocker.
-
#price ⇒ Object
Returns the value of attribute price.
-
#recurring ⇒ Object
Returns the value of attribute recurring.
-
#service ⇒ Object
Returns the value of attribute service.
-
#soft_delete ⇒ Object
Returns the value of attribute soft_delete.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #active? ⇒ Boolean
- #all_day? ⇒ Boolean
- #all_day_blocker? ⇒ Boolean
- #blocker? ⇒ Boolean
- #category_id ⇒ Object
- #category_name ⇒ Object
-
#initialize(attrs = {}) ⇒ Appointment
constructor
A new instance of Appointment.
- #recurring? ⇒ Boolean
- #service_id ⇒ Object
- #service_name ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ Appointment
Returns a new instance of Appointment.
8 9 10 11 12 13 14 15 |
# File 'lib/bookafy/model/appointment.rb', line 8 def initialize(attrs = {}) attrs.each do |attr, val| if respond_to?("#{attr}=") send("#{attr}=", val) end end end |
Instance Attribute Details
#all_day ⇒ Object
Returns the value of attribute all_day.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def all_day @all_day end |
#all_day_blocker ⇒ Object
Returns the value of attribute all_day_blocker.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def all_day_blocker @all_day_blocker end |
#appointment_end_time ⇒ Object
Returns the value of attribute appointment_end_time.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def appointment_end_time @appointment_end_time end |
#appointment_start_time ⇒ Object
Returns the value of attribute appointment_start_time.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def appointment_start_time @appointment_start_time end |
#category ⇒ Object
Returns the value of attribute category.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def category @category end |
#client_id ⇒ Object
Returns the value of attribute client_id.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def client_id @client_id end |
#created_at ⇒ Object
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def created_at @created_at end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def customer_id @customer_id end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def description @description end |
#duration ⇒ Object
Returns the value of attribute duration.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def duration @duration end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def id @id end |
#is_active ⇒ Object
Returns the value of attribute is_active.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def is_active @is_active end |
#is_blocker ⇒ Object
Returns the value of attribute is_blocker.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def is_blocker @is_blocker end |
#price ⇒ Object
Returns the value of attribute price.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def price @price end |
#recurring ⇒ Object
Returns the value of attribute recurring.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def recurring @recurring end |
#service ⇒ Object
Returns the value of attribute service.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def service @service end |
#soft_delete ⇒ Object
Returns the value of attribute soft_delete.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def soft_delete @soft_delete end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
6 7 8 |
# File 'lib/bookafy/model/appointment.rb', line 6 def updated_at @updated_at end |
Instance Method Details
#active? ⇒ Boolean
17 18 19 |
# File 'lib/bookafy/model/appointment.rb', line 17 def active? is_active end |
#all_day? ⇒ Boolean
25 26 27 |
# File 'lib/bookafy/model/appointment.rb', line 25 def all_day? all_day end |
#all_day_blocker? ⇒ Boolean
49 50 51 |
# File 'lib/bookafy/model/appointment.rb', line 49 def all_day_blocker? all_day_blocker end |
#blocker? ⇒ Boolean
21 22 23 |
# File 'lib/bookafy/model/appointment.rb', line 21 def blocker? is_blocker end |
#category_id ⇒ Object
41 42 43 |
# File 'lib/bookafy/model/appointment.rb', line 41 def category_id category['category_id'] unless category.blank? end |
#category_name ⇒ Object
45 46 47 |
# File 'lib/bookafy/model/appointment.rb', line 45 def category_name category['category_name'] unless category.blank? end |
#recurring? ⇒ Boolean
29 30 31 |
# File 'lib/bookafy/model/appointment.rb', line 29 def recurring? recurring end |
#service_id ⇒ Object
33 34 35 |
# File 'lib/bookafy/model/appointment.rb', line 33 def service_id service['service_id'] unless service.blank? end |
#service_name ⇒ Object
37 38 39 |
# File 'lib/bookafy/model/appointment.rb', line 37 def service_name service['service_name'] unless service.blank? end |