Class: MessageQuickly::Api::ThreadSettings
- Inherits:
-
Base
- Object
- Base
- MessageQuickly::Api::ThreadSettings
show all
- Defined in:
- lib/message_quickly/api/thread_settings.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
client, #initialize
Class Method Details
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/message_quickly/api/thread_settings.rb', line 15
def self.get_started_button(payload)
ThreadSettings.new.get_started_button(payload)
end
|
.greeting(text) ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'lib/message_quickly/api/thread_settings.rb', line 5
def self.greeting(text)
ThreadSettings.new.greeting(text)
end
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/message_quickly/api/thread_settings.rb', line 36
def self.(payloads = [])
ThreadSettings.new.(payloads)
end
|
28
29
30
31
32
33
34
|
# File 'lib/message_quickly/api/thread_settings.rb', line 28
def self.remove_get_started_button
ThreadSettings.new.remove_get_started_button
end
|
61
62
63
|
# File 'lib/message_quickly/api/thread_settings.rb', line 61
def self.
ThreadSettings.new.
end
|
Instance Method Details
70
71
72
73
|
# File 'lib/message_quickly/api/thread_settings.rb', line 70
def get_started_button(payload)
json = @client.post(request_string, { setting_type: 'call_to_actions', thread_state: 'new_thread', call_to_actions: [payload: payload] })
json['result'] == "Successfully added new_thread's CTAs"
end
|
#greeting(text) ⇒ Object
65
66
67
68
|
# File 'lib/message_quickly/api/thread_settings.rb', line 65
def greeting(text)
json = @client.post(request_string, { setting_type: 'greeting', greeting: { text: text } })
json['result'] == "Successfully updated greeting"
end
|
80
81
82
83
|
# File 'lib/message_quickly/api/thread_settings.rb', line 80
def (payloads = [])
json = @client.post(request_string, { setting_type: 'call_to_actions', thread_state: 'existing_thread', call_to_actions: payloads })
json['result'] == "Successfully added structured menu CTAs"
end
|
75
76
77
78
|
# File 'lib/message_quickly/api/thread_settings.rb', line 75
def remove_get_started_button
json = @client.delete(request_string, { setting_type: 'call_to_actions', thread_state: 'new_thread' })
json['result'] == "Successfully deleted all new_thread's CTAs"
end
|
85
86
87
88
|
# File 'lib/message_quickly/api/thread_settings.rb', line 85
def (payloads = [])
json = @client.delete(request_string, { setting_type: 'call_to_actions', thread_state: 'existing_thread' })
json['result'] == "Successfully deleted structured menu CTAs"
end
|