Class: Manifestly::Entity::ChecklistRunStep

Inherits:
ChildEndpoint show all
Defined in:
lib/manifestly/entity/checklist_run_step.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ChildEndpoint

#delete, get, #initialize, list, location, #location, #parent_class, #update

Methods inherited from Endpoint

#client, client, #create, #delete, #endpoint_target, get, list, #location, location, #save, singular_endpoint_target, #singular_endpoint_target, #update

Methods inherited from Base

attr_accessor, attr_reader, #attributes, attributes, #attributes=, #initialize, invalid_class_method, invalid_method, #to_h

Constructor Details

This class inherits a constructor from Manifestly::Entity::ChildEndpoint

Instance Attribute Details

#assignee_avatar_urlObject

Returns the value of attribute assignee_avatar_url.



8
9
10
# File 'lib/manifestly/entity/checklist_run_step.rb', line 8

def assignee_avatar_url
  @assignee_avatar_url
end

#assignee_idObject

Returns the value of attribute assignee_id.



9
10
11
# File 'lib/manifestly/entity/checklist_run_step.rb', line 9

def assignee_id
  @assignee_id
end

#assignee_nameObject

Returns the value of attribute assignee_name.



10
11
12
# File 'lib/manifestly/entity/checklist_run_step.rb', line 10

def assignee_name
  @assignee_name
end

#assignee_simple_display_nameObject

Returns the value of attribute assignee_simple_display_name.



12
13
14
# File 'lib/manifestly/entity/checklist_run_step.rb', line 12

def assignee_simple_display_name
  @assignee_simple_display_name
end

#assignee_user_idObject

Returns the value of attribute assignee_user_id.



11
12
13
# File 'lib/manifestly/entity/checklist_run_step.rb', line 11

def assignee_user_id
  @assignee_user_id
end

#commentsObject

Returns the value of attribute comments.



14
15
16
# File 'lib/manifestly/entity/checklist_run_step.rb', line 14

def comments
  @comments
end

#completed_atObject

Returns the value of attribute completed_at.



13
14
15
# File 'lib/manifestly/entity/checklist_run_step.rb', line 13

def completed_at
  @completed_at
end

#dataObject

Returns the value of attribute data.



15
16
17
# File 'lib/manifestly/entity/checklist_run_step.rb', line 15

def data
  @data
end

Returns the value of attribute description_with_links.



16
17
18
# File 'lib/manifestly/entity/checklist_run_step.rb', line 16

def description_with_links
  @description_with_links
end

#header_stepObject

Header step needs to always be a boolean (even if not set)



44
45
46
# File 'lib/manifestly/entity/checklist_run_step.rb', line 44

def header_step
  @header_step
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/manifestly/entity/checklist_run_step.rb', line 7

def id
  @id
end

#late_atObject

Returns the value of attribute late_at.



19
20
21
# File 'lib/manifestly/entity/checklist_run_step.rb', line 19

def late_at
  @late_at
end

#pictureObject

Returns the value of attribute picture.



26
27
28
# File 'lib/manifestly/entity/checklist_run_step.rb', line 26

def picture
  @picture
end

#positionObject

Returns the value of attribute position.



20
21
22
# File 'lib/manifestly/entity/checklist_run_step.rb', line 20

def position
  @position
end

#run_detailed_titleObject

Returns the value of attribute run_detailed_title.



17
18
19
# File 'lib/manifestly/entity/checklist_run_step.rb', line 17

def run_detailed_title
  @run_detailed_title
end

#run_idObject

Returns the value of attribute run_id.



21
22
23
# File 'lib/manifestly/entity/checklist_run_step.rb', line 21

def run_id
  @run_id
end

#run_step_data_settingObject

Returns the value of attribute run_step_data_setting.



27
28
29
# File 'lib/manifestly/entity/checklist_run_step.rb', line 27

def run_step_data_setting
  @run_step_data_setting
end

#skippedObject

Returns the value of attribute skipped.



22
23
24
# File 'lib/manifestly/entity/checklist_run_step.rb', line 22

def skipped
  @skipped
end

#titleObject

Returns the value of attribute title.



23
24
25
# File 'lib/manifestly/entity/checklist_run_step.rb', line 23

def title
  @title
end

#userObject

Returns the value of attribute user.



25
26
27
# File 'lib/manifestly/entity/checklist_run_step.rb', line 25

def user
  @user
end

#user_idObject

Returns the value of attribute user_id.



24
25
26
# File 'lib/manifestly/entity/checklist_run_step.rb', line 24

def user_id
  @user_id
end

Class Method Details

.endpoint_targetObject



39
40
41
# File 'lib/manifestly/entity/checklist_run_step.rb', line 39

def self.endpoint_target
  :run_steps
end

.parent_classObject



35
36
37
# File 'lib/manifestly/entity/checklist_run_step.rb', line 35

def self.parent_class
  ChecklistRun
end

Instance Method Details

#add_comment(comment) ⇒ Object



89
90
91
92
93
# File 'lib/manifestly/entity/checklist_run_step.rb', line 89

def add_comment(comment)
  client.post("#{location}/#{id}/comments", params: {comment: comment})
  @parent.instance_variable_set(:@steps, nil)
  nil
end

#add_data(data) ⇒ Object



77
78
79
80
81
# File 'lib/manifestly/entity/checklist_run_step.rb', line 77

def add_data(data)
  client.post("#{location}/#{id}/data", params: {data: data})
  @parent.instance_variable_set(:@steps, nil)
  nil
end

#add_picture(base_64_encoded_picture_data) ⇒ Object



83
84
85
86
87
# File 'lib/manifestly/entity/checklist_run_step.rb', line 83

def add_picture(base_64_encoded_picture_data)
  client.post("#{location}/#{id}/picture", params: {picture: base_64_encoded_picture_data})
  @parent.instance_variable_set(:@steps, nil)
  nil
end

#assign(user_id) ⇒ Object



95
96
97
98
99
# File 'lib/manifestly/entity/checklist_run_step.rb', line 95

def assign(user_id)
  client.post("#{location}/#{id}/assign", params: {assignee_user_id: user_id})
  @parent.instance_variable_set(:@steps, nil)
  nil
end

#completeObject



53
54
55
56
57
# File 'lib/manifestly/entity/checklist_run_step.rb', line 53

def complete
  client.post("#{location}/#{id}/complete")
  @parent.instance_variable_set(:@steps, nil)
  nil
end

#skipObject



65
66
67
68
69
# File 'lib/manifestly/entity/checklist_run_step.rb', line 65

def skip
  client.post("#{location}/#{id}/skip")
  @parent.instance_variable_set(:@steps, nil)
  nil
end

#uncompleteObject



59
60
61
62
63
# File 'lib/manifestly/entity/checklist_run_step.rb', line 59

def uncomplete
  client.post("#{location}/#{id}/uncomplete")
  @parent.instance_variable_set(:@steps, nil)
  nil
end

#unskipObject



71
72
73
74
75
# File 'lib/manifestly/entity/checklist_run_step.rb', line 71

def unskip
  client.post("#{location}/#{id}/unskip")
  @parent.instance_variable_set(:@steps, nil)
  nil
end