Class: TimeTree::Activity
- Defined in:
- lib/timetree/models/activity.rb
Overview
Model for TimeTree comment.
Constant Summary collapse
- TIME_FIELDS =
%i[updated_at created_at].freeze
Instance Attribute Summary collapse
-
#calendar_id ⇒ String
calendar’s id.
- #content ⇒ String
- #created_at ⇒ Time
-
#event_id ⇒ String
event’s id.
- #updated_at ⇒ Time
Attributes inherited from BaseModel
Instance Method Summary collapse
-
#create ⇒ TimeTree::Activity
Creates a comment to the associated event.
-
#data_params ⇒ Hash
convert to a TimeTree request body format.
Methods inherited from BaseModel
#initialize, #inspect, to_model
Constructor Details
This class inherits a constructor from TimeTree::BaseModel
Instance Attribute Details
#calendar_id ⇒ String
calendar’s id.
16 17 18 |
# File 'lib/timetree/models/activity.rb', line 16 def calendar_id @calendar_id end |
#content ⇒ String
9 10 11 |
# File 'lib/timetree/models/activity.rb', line 9 def content @content end |
#created_at ⇒ Time
13 14 15 |
# File 'lib/timetree/models/activity.rb', line 13 def created_at @created_at end |
#event_id ⇒ String
event’s id.
19 20 21 |
# File 'lib/timetree/models/activity.rb', line 19 def event_id @event_id end |
#updated_at ⇒ Time
11 12 13 |
# File 'lib/timetree/models/activity.rb', line 11 def updated_at @updated_at end |
Instance Method Details
#create ⇒ TimeTree::Activity
Creates a comment to the associated event.
32 33 34 35 |
# File 'lib/timetree/models/activity.rb', line 32 def create check_client _create end |
#data_params ⇒ Hash
convert to a TimeTree request body format.
42 43 44 45 46 |
# File 'lib/timetree/models/activity.rb', line 42 def data_params { data: {attributes: {content: content}} } end |