Class: Bookafy::Model::Appointment

Inherits:
Object
  • Object
show all
Includes:
Timestamps
Defined in:
lib/bookafy/model/appointment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_dayObject

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_blockerObject

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_timeObject

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_timeObject

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

#categoryObject

Returns the value of attribute category.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def category
  @category
end

#client_idObject

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_atObject

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_idObject

Returns the value of attribute customer_id.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def customer_id
  @customer_id
end

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def description
  @description
end

#durationObject

Returns the value of attribute duration.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def duration
  @duration
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def id
  @id
end

#is_activeObject

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_blockerObject

Returns the value of attribute is_blocker.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def is_blocker
  @is_blocker
end

#priceObject

Returns the value of attribute price.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def price
  @price
end

#recurringObject

Returns the value of attribute recurring.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def recurring
  @recurring
end

#serviceObject

Returns the value of attribute service.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def service
  @service
end

#soft_deleteObject

Returns the value of attribute soft_delete.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def soft_delete
  @soft_delete
end

#titleObject

Returns the value of attribute title.



6
7
8
# File 'lib/bookafy/model/appointment.rb', line 6

def title
  @title
end

#updated_atObject

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

Returns:

  • (Boolean)


17
18
19
# File 'lib/bookafy/model/appointment.rb', line 17

def active?
  is_active
end

#all_day?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/bookafy/model/appointment.rb', line 25

def all_day?
  all_day
end

#all_day_blocker?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/bookafy/model/appointment.rb', line 49

def all_day_blocker?
  all_day_blocker
end

#blocker?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/bookafy/model/appointment.rb', line 21

def blocker?
  is_blocker
end

#category_idObject



41
42
43
# File 'lib/bookafy/model/appointment.rb', line 41

def category_id
  category['category_id'] unless category.blank?
end

#category_nameObject



45
46
47
# File 'lib/bookafy/model/appointment.rb', line 45

def category_name
  category['category_name'] unless category.blank?
end

#recurring?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/bookafy/model/appointment.rb', line 29

def recurring?
  recurring
end

#service_idObject



33
34
35
# File 'lib/bookafy/model/appointment.rb', line 33

def service_id
  service['service_id'] unless service.blank?
end

#service_nameObject



37
38
39
# File 'lib/bookafy/model/appointment.rb', line 37

def service_name
  service['service_name'] unless service.blank?
end