warb 0.1.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -12
  3. data/README.md +9 -32
  4. data/Rakefile +3 -3
  5. data/docs/README.md +1 -4
  6. data/docs/components/README.md +1 -4
  7. data/docs/messages/README.md +1 -2
  8. data/docs/messages/interactive_call_to_action_url.md +9 -9
  9. data/docs/messages/interactive_list.md +2 -2
  10. data/docs/messages/interactive_reply_button.md +9 -9
  11. data/examples/audio.rb +10 -10
  12. data/examples/document.rb +34 -34
  13. data/examples/image.rb +22 -22
  14. data/examples/interactive_call_to_action_url.rb +46 -46
  15. data/examples/interactive_list.rb +61 -61
  16. data/examples/interactive_reply_button.rb +43 -43
  17. data/examples/location.rb +32 -32
  18. data/examples/location_request.rb +11 -11
  19. data/examples/message.rb +8 -8
  20. data/examples/sticker.rb +10 -10
  21. data/examples/video.rb +22 -22
  22. data/examples/webhook.rb +42 -44
  23. data/lib/warb/client.rb +5 -7
  24. data/lib/warb/components/action.rb +8 -12
  25. data/lib/warb/configuration.rb +1 -4
  26. data/lib/warb/connection.rb +9 -15
  27. data/lib/warb/dispatcher.rb +3 -4
  28. data/lib/warb/dispatcher_concern.rb +0 -6
  29. data/lib/warb/indicator_dispatcher.rb +4 -4
  30. data/lib/warb/media_dispatcher.rb +10 -10
  31. data/lib/warb/resources/audio.rb +1 -1
  32. data/lib/warb/resources/contact.rb +20 -22
  33. data/lib/warb/resources/document.rb +1 -1
  34. data/lib/warb/resources/flow.rb +8 -10
  35. data/lib/warb/resources/image.rb +1 -1
  36. data/lib/warb/resources/interactive_call_to_action_url.rb +8 -10
  37. data/lib/warb/resources/interactive_list.rb +5 -7
  38. data/lib/warb/resources/interactive_reply_button.rb +8 -10
  39. data/lib/warb/resources/location.rb +1 -11
  40. data/lib/warb/resources/location_request.rb +3 -5
  41. data/lib/warb/resources/reaction.rb +1 -1
  42. data/lib/warb/resources/resource.rb +4 -12
  43. data/lib/warb/resources/sticker.rb +1 -1
  44. data/lib/warb/resources/text.rb +3 -21
  45. data/lib/warb/resources/video.rb +1 -1
  46. data/lib/warb/utils.rb +1 -3
  47. data/lib/warb/version.rb +1 -1
  48. data/lib/warb.rb +31 -50
  49. metadata +3 -29
  50. data/docs/components/button.md +0 -61
  51. data/docs/components/copy_code_button.md +0 -57
  52. data/docs/components/url_button.md +0 -57
  53. data/docs/messages/template.md +0 -327
  54. data/docs/resources/currency.md +0 -22
  55. data/docs/resources/date_time.md +0 -11
  56. data/docs/resources/index.md +0 -14
  57. data/docs/resources/text.md +0 -9
  58. data/lib/warb/components/button.rb +0 -29
  59. data/lib/warb/components/component.rb +0 -19
  60. data/lib/warb/components/copy_code_button.rb +0 -30
  61. data/lib/warb/components/quick_reply_button.rb +0 -15
  62. data/lib/warb/components/url_button.rb +0 -30
  63. data/lib/warb/components/voice_call_button.rb +0 -15
  64. data/lib/warb/errors.rb +0 -27
  65. data/lib/warb/language.rb +0 -8
  66. data/lib/warb/resources/currency.rb +0 -47
  67. data/lib/warb/resources/date_time.rb +0 -34
  68. data/lib/warb/resources/template.rb +0 -167
  69. data/lib/warb/response.rb +0 -33
  70. data/lib/warb/response_error_handler.rb +0 -42
  71. data/lib/warb/template_dispatcher.rb +0 -12
@@ -1,21 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../lib/warb'
3
+ require_relative "../lib/warb"
4
4
 
5
5
  # Configure your variables here
6
6
 
7
- access_token = ''
8
- business_id = ''
9
- sender_id = ''
10
- recipient_number = ''
7
+ access_token = ""
8
+ business_id = ""
9
+ sender_id = ""
10
+ recipient_number = ""
11
11
 
12
12
  # You can use Resources to create headers for your messages.
13
- text_header = Warb::Resources::Text.as_header('OPTIONAL - Header')
13
+ text_header = Warb::Resources::Text.as_header("OPTIONAL - Header")
14
14
  image_header = Warb::Resources::Image.as_header(media_id: image_id)
15
15
  video_header = Warb::Resources::Video.as_header(link: image_url)
16
16
 
17
17
  # You can use Action Components to create actions for your messages.
18
- action_component = Warb::Components::CTAAction.new(button_text: 'Action button text', url: 'https://www.rebase.com.br')
18
+ action_component = Warb::Components::CTAAction.new(button_text: "Action button text", url: "https://www.rebase.com.br")
19
19
 
20
20
  # We recommend testing one section at a time, as it can be overwhelming to see all the messages at once.
21
21
  # So you can comment out the sections you don't want to test.
@@ -33,44 +33,44 @@ end
33
33
  warb_from_setup.interactive_call_to_action_url.dispatch(
34
34
  recipient_number,
35
35
  header: text_header,
36
- body: 'body',
37
- footer: 'footer',
36
+ body: "body",
37
+ footer: "footer",
38
38
  action: action_component
39
39
  )
40
40
 
41
41
  warb_from_setup.interactive_call_to_action_url.dispatch(
42
42
  recipient_number,
43
43
  header: image_header,
44
- body: 'body',
45
- footer: 'footer',
44
+ body: "body",
45
+ footer: "footer",
46
46
  action: action_component
47
47
  )
48
48
 
49
49
  warb_from_setup.interactive_call_to_action_url.dispatch(
50
50
  recipient_number,
51
51
  header: video_header,
52
- body: 'body',
53
- footer: 'footer',
52
+ body: "body",
53
+ footer: "footer",
54
54
  action: action_component
55
55
  )
56
56
 
57
57
  warb_from_setup.interactive_call_to_action_url.dispatch(recipient_number) do |builder|
58
58
  # OPTIONAL Headers: you can choose between text, image, or video headers.
59
59
 
60
- builder.add_text_header('Text Header')
60
+ builder.set_text_header("Text Header")
61
61
 
62
62
  # If you want to use an image header, uncomment the line below and provide a valid or Media ID or Link.
63
- # builder.add_image_header(media_id: image_id) # or builder.add_image_header(link: image_link)
63
+ # builder.set_image_header(media_id: image_id) # or builder.set_image_header(link: image_link)
64
64
 
65
65
  # If you want to use a video header, uncomment the line below and provide a valid Media ID or Link.
66
- # builder.add_video_header(media_id: video_id) # or builder.add_video_header(link: video_link)
66
+ # builder.set_video_header(media_id: video_id) # or builder.set_video_header(link: video_link)
67
67
 
68
- builder.body = 'body'
69
- builder.footer = 'footer'
68
+ builder.body = "body"
69
+ builder.footer = "footer"
70
70
 
71
71
  builder.build_action do |action|
72
- action.button_text = 'Action Button Text'
73
- action.url = 'https://www.rebase.com.br'
72
+ action.button_text = "Action Button Text"
73
+ action.url = "https://www.rebase.com.br"
74
74
  end
75
75
  end
76
76
 
@@ -87,44 +87,44 @@ warb_from_new = Warb.new(
87
87
  warb_from_new.interactive_call_to_action_url.dispatch(
88
88
  recipient_number,
89
89
  header: text_header,
90
- body: 'body',
91
- footer: 'footer',
90
+ body: "body",
91
+ footer: "footer",
92
92
  action: action_component
93
93
  )
94
94
 
95
95
  warb_from_new.interactive_call_to_action_url.dispatch(
96
96
  recipient_number,
97
97
  header: image_header,
98
- body: 'body',
99
- footer: 'footer',
98
+ body: "body",
99
+ footer: "footer",
100
100
  action: action_component
101
101
  )
102
102
 
103
103
  warb_from_new.interactive_call_to_action_url.dispatch(
104
104
  recipient_number,
105
105
  header: video_header,
106
- body: 'body',
107
- footer: 'footer',
106
+ body: "body",
107
+ footer: "footer",
108
108
  action: action_component
109
109
  )
110
110
 
111
111
  warb_from_new.interactive_call_to_action_url.dispatch(recipient_number) do |builder|
112
112
  # Headers: you can choose between text, image, or video headers.
113
113
 
114
- builder.add_text_header('Text Header')
114
+ builder.set_text_header("Text Header")
115
115
 
116
116
  # If you want to use an image header, uncomment the line below and provide a valid or Media ID or Link.
117
- # builder.add_image_header(media_id: image_id) # or builder.add_image_header(link: image_link)
117
+ # builder.set_image_header(media_id: image_id) # or builder.set_image_header(link: image_link)
118
118
 
119
119
  # If you want to use a video header, uncomment the line below and provide a valid Media ID or Link.
120
- # builder.add_video_header(media_id: video_id) # or builder.add_video_header(link: video_link)
120
+ # builder.set_video_header(media_id: video_id) # or builder.set_video_header(link: video_link)
121
121
 
122
- builder.body = 'body'
123
- builder.footer = 'footer'
122
+ builder.body = "body"
123
+ builder.footer = "footer"
124
124
 
125
125
  builder.build_action do |action|
126
- action.button_text = 'Action Button Text'
127
- action.url = 'https://www.rebase.com.br'
126
+ action.button_text = "Action Button Text"
127
+ action.url = "https://www.rebase.com.br"
128
128
  end
129
129
  end
130
130
 
@@ -135,43 +135,43 @@ end
135
135
  Warb.interactive_call_to_action_url.dispatch(
136
136
  recipient_number,
137
137
  header: text_header,
138
- body: 'body',
139
- footer: 'footer',
138
+ body: "body",
139
+ footer: "footer",
140
140
  action: action_component
141
141
  )
142
142
 
143
143
  Warb.interactive_call_to_action_url.dispatch(
144
144
  recipient_number,
145
145
  header: image_header,
146
- body: 'body',
147
- footer: 'footer',
146
+ body: "body",
147
+ footer: "footer",
148
148
  action: action_component
149
149
  )
150
150
 
151
151
  Warb.interactive_call_to_action_url.dispatch(
152
152
  recipient_number,
153
153
  header: video_header,
154
- body: 'body',
155
- footer: 'footer',
154
+ body: "body",
155
+ footer: "footer",
156
156
  action: action_component
157
157
  )
158
158
 
159
159
  Warb.interactive_call_to_action_url.dispatch(recipient_number) do |builder|
160
160
  # Headers: you can choose between text, image, or video headers.
161
161
 
162
- builder.add_text_header('Text Header')
162
+ builder.set_text_header("Text Header")
163
163
 
164
164
  # If you want to use an image header, uncomment the line below and provide a valid or Media ID or Link.
165
- # builder.add_image_header(media_id: image_id) # or builder.add_image_header(link: image_link)
165
+ # builder.set_image_header(media_id: image_id) # or builder.set_image_header(link: image_link)
166
166
 
167
167
  # If you want to use a video header, uncomment the line below and provide a valid Media ID or Link.
168
- # builder.add_video_header(media_id: video_id) # or builder.add_video_header(link: video_link)
168
+ # builder.set_video_header(media_id: video_id) # or builder.set_video_header(link: video_link)
169
169
 
170
- builder.body = 'body'
171
- builder.footer = 'footer'
170
+ builder.body = "body"
171
+ builder.footer = "footer"
172
172
 
173
173
  builder.build_action do |action|
174
- action.button_text = 'Action Button Text'
175
- action.url = 'https://www.rebase.com.br'
174
+ action.button_text = "Action Button Text"
175
+ action.url = "https://www.rebase.com.br"
176
176
  end
177
177
  end
@@ -1,21 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../lib/warb'
3
+ require_relative "../lib/warb"
4
4
 
5
5
  # Configure your variables here
6
6
 
7
- access_token = ''
8
- business_id = ''
9
- sender_id = ''
10
- recipient_number = ''
7
+ access_token = ""
8
+ business_id = ""
9
+ sender_id = ""
10
+ recipient_number = ""
11
11
 
12
12
  # You can use Resources to create headers for your messages.
13
- text_header = Warb::Resources::Text.as_header('OPTIONAL - Header')
13
+ text_header = Warb::Resources::Text.as_header("OPTIONAL - Header")
14
14
  image_header = Warb::Resources::Image.as_header(media_id: image_id)
15
15
  video_header = Warb::Resources::Video.as_header(link: image_url)
16
16
 
17
17
  # You can use Action Components to create actions for your messages.
18
- action_component = Warb::Components::ReplyButtonAction.new(['button 1', 'button 2', 'button 3'])
18
+ action_component = Warb::Components::ReplyButtonAction.new(["button 1", "button 2", "button 3"])
19
19
 
20
20
  # We recommend testing one section at a time, as it can be overwhelming to see all the messages at once.
21
21
  # So you can comment out the sections you don't want to test.
@@ -33,52 +33,52 @@ end
33
33
  warb_from_setup.interactive_list.dispatch(
34
34
  recipient_number,
35
35
  header: text_header,
36
- body: 'body',
37
- footer: 'footer',
36
+ body: "body",
37
+ footer: "footer",
38
38
  action: action_component
39
39
  )
40
40
 
41
41
  warb_from_setup.interactive_list.dispatch(
42
42
  recipient_number,
43
43
  header: image_header,
44
- body: 'body',
45
- footer: 'footer',
44
+ body: "body",
45
+ footer: "footer",
46
46
  action: action_component
47
47
  )
48
48
 
49
49
  warb_from_setup.interactive_list.dispatch(
50
50
  recipient_number,
51
51
  header: video_header,
52
- body: 'body',
53
- footer: 'footer',
52
+ body: "body",
53
+ footer: "footer",
54
54
  action: action_component
55
55
  )
56
56
 
57
57
  warb_from_setup.interactive_list.dispatch(recipient_number) do |builder|
58
58
  # OPTIONAL Headers: you can choose between text, image, or video headers.
59
59
 
60
- builder.add_text_header('Text Header')
60
+ builder.set_text_header("Text Header")
61
61
 
62
62
  # If you want to use an image header, uncomment the line below and provide a valid or Media ID or Link.
63
- # builder.add_image_header(media_id: image_id) # or builder.add_image_header(link: image_link)
63
+ # builder.set_image_header(media_id: image_id) # or builder.set_image_header(link: image_link)
64
64
 
65
65
  # If you want to use a video header, uncomment the line below and provide a valid Media ID or Link.
66
- # builder.add_video_header(media_id: video_id) # or builder.add_video_header(link: video_link)
66
+ # builder.set_video_header(media_id: video_id) # or builder.set_video_header(link: video_link)
67
67
 
68
- builder.body = 'body'
69
- builder.footer = 'footer'
68
+ builder.body = "body"
69
+ builder.footer = "footer"
70
70
 
71
71
  builder.build_action do |action|
72
- action.button_text = 'Action button text'
72
+ action.button_text = "Action button text"
73
73
 
74
74
  section = action.add_section
75
- section.title = 'Title'
76
- section.rows = [Warb::Components::Row.new(title: 'S #0 R #0')]
77
- section.add_row title: 'Second Row', description: 'Who knows?'
75
+ section.title = "Title"
76
+ section.rows = [Warb::Components::Row.new(title: "S #0 R #0")]
77
+ section.add_row title: "Second Row", description: "Who knows?"
78
78
 
79
- section = action.add_section title: 'Second Section'
80
- row = section.add_row title: 'KeK'
81
- row.description = 'Description'
79
+ section = action.add_section title: "Second Section"
80
+ row = section.add_row title: "KeK"
81
+ row.description = "Description"
82
82
  end
83
83
  end
84
84
 
@@ -95,52 +95,52 @@ warb_from_new = Warb.new(
95
95
  warb_from_new.interactive_list.dispatch(
96
96
  recipient_number,
97
97
  header: text_header,
98
- body: 'body',
99
- footer: 'footer',
98
+ body: "body",
99
+ footer: "footer",
100
100
  action: action_component
101
101
  )
102
102
 
103
103
  warb_from_new.interactive_list.dispatch(
104
104
  recipient_number,
105
105
  header: image_header,
106
- body: 'body',
107
- footer: 'footer',
106
+ body: "body",
107
+ footer: "footer",
108
108
  action: action_component
109
109
  )
110
110
 
111
111
  warb_from_new.interactive_list.dispatch(
112
112
  recipient_number,
113
113
  header: video_header,
114
- body: 'body',
115
- footer: 'footer',
114
+ body: "body",
115
+ footer: "footer",
116
116
  action: action_component
117
117
  )
118
118
 
119
119
  warb_from_new.interactive_list.dispatch(recipient_number) do |builder|
120
120
  # OPTIONAL Headers: you can choose between text, image, or video headers.
121
121
 
122
- builder.add_text_header('Text Header')
122
+ builder.set_text_header("Text Header")
123
123
 
124
124
  # If you want to use an image header, uncomment the line below and provide a valid or Media ID or Link.
125
- # builder.add_image_header(media_id: image_id) # or builder.add_image_header(link: image_link)
125
+ # builder.set_image_header(media_id: image_id) # or builder.set_image_header(link: image_link)
126
126
 
127
127
  # If you want to use a video header, uncomment the line below and provide a valid Media ID or Link.
128
- # builder.add_video_header(media_id: video_id) # or builder.add_video_header(link: video_link)
128
+ # builder.set_video_header(media_id: video_id) # or builder.set_video_header(link: video_link)
129
129
 
130
- builder.body = 'body'
131
- builder.footer = 'footer'
130
+ builder.body = "body"
131
+ builder.footer = "footer"
132
132
 
133
133
  builder.build_action do |action|
134
- action.button_text = 'Action button text'
134
+ action.button_text = "Action button text"
135
135
 
136
136
  section = action.add_section
137
- section.title = 'Title'
138
- section.rows = [Warb::Components::Row.new(title: 'S #0 R #0')]
139
- section.add_row title: 'Second Row', description: 'Who knows?'
137
+ section.title = "Title"
138
+ section.rows = [Warb::Components::Row.new(title: "S #0 R #0")]
139
+ section.add_row title: "Second Row", description: "Who knows?"
140
140
 
141
- section = action.add_section title: 'Second Section'
142
- row = section.add_row title: 'KeK'
143
- row.description = 'Description'
141
+ section = action.add_section title: "Second Section"
142
+ row = section.add_row title: "KeK"
143
+ row.description = "Description"
144
144
  end
145
145
  end
146
146
 
@@ -151,51 +151,51 @@ end
151
151
  Warb.interactive_list.dispatch(
152
152
  recipient_number,
153
153
  header: text_header,
154
- body: 'body',
155
- footer: 'footer',
154
+ body: "body",
155
+ footer: "footer",
156
156
  action: action_component
157
157
  )
158
158
 
159
159
  Warb.interactive_list.dispatch(
160
160
  recipient_number,
161
161
  header: image_header,
162
- body: 'body',
163
- footer: 'footer',
162
+ body: "body",
163
+ footer: "footer",
164
164
  action: action_component
165
165
  )
166
166
 
167
167
  Warb.interactive_list.dispatch(
168
168
  recipient_number,
169
169
  header: video_header,
170
- body: 'body',
171
- footer: 'footer',
170
+ body: "body",
171
+ footer: "footer",
172
172
  action: action_component
173
173
  )
174
174
 
175
175
  Warb.interactive_list.dispatch(recipient_number) do |builder|
176
176
  # OPTIONAL Headers: you can choose between text, image, or video headers.
177
177
 
178
- builder.add_text_header('Text Header')
178
+ builder.set_text_header("Text Header")
179
179
 
180
180
  # If you want to use an image header, uncomment the line below and provide a valid or Media ID or Link.
181
- # builder.add_image_header(media_id: image_id) # or builder.add_image_header(link: image_link)
181
+ # builder.set_image_header(media_id: image_id) # or builder.set_image_header(link: image_link)
182
182
 
183
183
  # If you want to use a video header, uncomment the line below and provide a valid Media ID or Link.
184
- # builder.add_video_header(media_id: video_id) # or builder.add_video_header(link: video_link)
184
+ # builder.set_video_header(media_id: video_id) # or builder.set_video_header(link: video_link)
185
185
 
186
- builder.body = 'body'
187
- builder.footer = 'footer'
186
+ builder.body = "body"
187
+ builder.footer = "footer"
188
188
 
189
189
  builder.build_action do |action|
190
- action.button_text = 'Action button text'
190
+ action.button_text = "Action button text"
191
191
 
192
192
  section = action.add_section
193
- section.title = 'Title'
194
- section.rows = [Warb::Components::Row.new(title: 'S #0 R #0')]
195
- section.add_row title: 'Second Row', description: 'Who knows?'
193
+ section.title = "Title"
194
+ section.rows = [Warb::Components::Row.new(title: "S #0 R #0")]
195
+ section.add_row title: "Second Row", description: "Who knows?"
196
196
 
197
- section = action.add_section title: 'Second Section'
198
- row = section.add_row title: 'KeK'
199
- row.description = 'Description'
197
+ section = action.add_section title: "Second Section"
198
+ row = section.add_row title: "KeK"
199
+ row.description = "Description"
200
200
  end
201
201
  end
@@ -1,21 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../lib/warb'
3
+ require_relative "../lib/warb"
4
4
 
5
5
  # Configure your variables here
6
6
 
7
- access_token = ''
8
- business_id = ''
9
- sender_id = ''
10
- recipient_number = ''
7
+ access_token = ""
8
+ business_id = ""
9
+ sender_id = ""
10
+ recipient_number = ""
11
11
 
12
12
  # You can use Resources to create headers for your messages.
13
- text_header = Warb::Resources::Text.as_header('OPTIONAL - Header')
13
+ text_header = Warb::Resources::Text.as_header("OPTIONAL - Header")
14
14
  image_header = Warb::Resources::Image.as_header(media_id: image_id)
15
15
  video_header = Warb::Resources::Video.as_header(link: image_url)
16
16
 
17
17
  # You can use Action Components to create actions for your messages.
18
- action_component = Warb::Components::ReplyButtonAction.new(['button 1', 'button 2', 'button 3'])
18
+ action_component = Warb::Components::ReplyButtonAction.new(["button 1", "button 2", "button 3"])
19
19
 
20
20
  # We recommend testing one section at a time, as it can be overwhelming to see all the messages at once.
21
21
  # So you can comment out the sections you don't want to test.
@@ -33,43 +33,43 @@ end
33
33
  warb_from_setup.interactive_reply_button.dispatch(
34
34
  recipient_number,
35
35
  header: text_header,
36
- body: 'body',
37
- footer: 'footer',
36
+ body: "body",
37
+ footer: "footer",
38
38
  action: action_component
39
39
  )
40
40
 
41
41
  warb_from_setup.interactive_reply_button.dispatch(
42
42
  recipient_number,
43
43
  header: image_header,
44
- body: 'body',
45
- footer: 'footer',
44
+ body: "body",
45
+ footer: "footer",
46
46
  action: action_component
47
47
  )
48
48
 
49
49
  warb_from_setup.interactive_reply_button.dispatch(
50
50
  recipient_number,
51
51
  header: video_header,
52
- body: 'body',
53
- footer: 'footer',
52
+ body: "body",
53
+ footer: "footer",
54
54
  action: action_component
55
55
  )
56
56
 
57
57
  warb_from_setup.interactive_reply_button.dispatch(recipient_number) do |builder|
58
58
  # OPTIONAL Headers: you can choose between text, image, or video headers.
59
59
 
60
- builder.add_text_header('Text Header')
60
+ builder.set_text_header("Text Header")
61
61
 
62
62
  # If you want to use an image header, uncomment the line below and provide a valid or Media ID or Link.
63
- # builder.add_image_header(media_id: image_id) # or builder.add_image_header(link: image_link)
63
+ # builder.set_image_header(media_id: image_id) # or builder.set_image_header(link: image_link)
64
64
 
65
65
  # If you want to use a video header, uncomment the line below and provide a valid Media ID or Link.
66
- # builder.add_video_header(media_id: video_id) # or builder.add_video_header(link: video_link)
66
+ # builder.set_video_header(media_id: video_id) # or builder.set_video_header(link: video_link)
67
67
 
68
- builder.body = 'body'
69
- builder.footer = 'footer'
68
+ builder.body = "body"
69
+ builder.footer = "footer"
70
70
 
71
71
  builder.build_action do |action|
72
- action.buttons_texts = ['button 1', 'button 2', 'button 3']
72
+ action.buttons_texts = ["button 1", "button 2", "button 3"]
73
73
  end
74
74
  end
75
75
 
@@ -86,43 +86,43 @@ warb_from_new = Warb.new(
86
86
  warb_from_new.interactive_reply_button.dispatch(
87
87
  recipient_number,
88
88
  header: text_header,
89
- body: 'body',
90
- footer: 'footer',
89
+ body: "body",
90
+ footer: "footer",
91
91
  action: action_component
92
92
  )
93
93
 
94
94
  warb_from_new.interactive_reply_button.dispatch(
95
95
  recipient_number,
96
96
  header: image_header,
97
- body: 'body',
98
- footer: 'footer',
97
+ body: "body",
98
+ footer: "footer",
99
99
  action: action_component
100
100
  )
101
101
 
102
102
  warb_from_new.interactive_reply_button.dispatch(
103
103
  recipient_number,
104
104
  header: video_header,
105
- body: 'body',
106
- footer: 'footer',
105
+ body: "body",
106
+ footer: "footer",
107
107
  action: action_component
108
108
  )
109
109
 
110
110
  warb_from_new.interactive_reply_button.dispatch(recipient_number) do |builder|
111
111
  # OPTIONAL Headers: you can choose between text, image, or video headers.
112
112
 
113
- builder.add_text_header('Text Header')
113
+ builder.set_text_header("Text Header")
114
114
 
115
115
  # If you want to use an image header, uncomment the line below and provide a valid or Media ID or Link.
116
- # builder.add_image_header(media_id: image_id) # or builder.add_image_header(link: image_link)
116
+ # builder.set_image_header(media_id: image_id) # or builder.set_image_header(link: image_link)
117
117
 
118
118
  # If you want to use a video header, uncomment the line below and provide a valid Media ID or Link.
119
- # builder.add_video_header(media_id: video_id) # or builder.add_video_header(link: video_link)
119
+ # builder.set_video_header(media_id: video_id) # or builder.set_video_header(link: video_link)
120
120
 
121
- builder.body = 'body'
122
- builder.footer = 'footer'
121
+ builder.body = "body"
122
+ builder.footer = "footer"
123
123
 
124
124
  builder.build_action do |action|
125
- action.buttons_texts = ['button 1', 'button 2', 'button 3']
125
+ action.buttons_texts = ["button 1", "button 2", "button 3"]
126
126
  end
127
127
  end
128
128
 
@@ -133,42 +133,42 @@ end
133
133
  Warb.interactive_reply_button.dispatch(
134
134
  recipient_number,
135
135
  header: text_header,
136
- body: 'body',
137
- footer: 'footer',
136
+ body: "body",
137
+ footer: "footer",
138
138
  action: action_component
139
139
  )
140
140
 
141
141
  Warb.interactive_reply_button.dispatch(
142
142
  recipient_number,
143
143
  header: image_header,
144
- body: 'body',
145
- footer: 'footer',
144
+ body: "body",
145
+ footer: "footer",
146
146
  action: action_component
147
147
  )
148
148
 
149
149
  Warb.interactive_reply_button.dispatch(
150
150
  recipient_number,
151
151
  header: video_header,
152
- body: 'body',
153
- footer: 'footer',
152
+ body: "body",
153
+ footer: "footer",
154
154
  action: action_component
155
155
  )
156
156
 
157
157
  Warb.interactive_reply_button.dispatch(recipient_number) do |builder|
158
158
  # OPTIONAL Headers: you can choose between text, image, or video headers.
159
159
 
160
- builder.add_text_header('Text Header')
160
+ builder.set_text_header("Text Header")
161
161
 
162
162
  # If you want to use an image header, uncomment the line below and provide a valid or Media ID or Link.
163
- # builder.add_image_header(media_id: image_id) # or builder.add_image_header(link: image_link)
163
+ # builder.set_image_header(media_id: image_id) # or builder.set_image_header(link: image_link)
164
164
 
165
165
  # If you want to use a video header, uncomment the line below and provide a valid Media ID or Link.
166
- # builder.add_video_header(media_id: video_id) # or builder.add_video_header(link: video_link)
166
+ # builder.set_video_header(media_id: video_id) # or builder.set_video_header(link: video_link)
167
167
 
168
- builder.body = 'body'
169
- builder.footer = 'footer'
168
+ builder.body = "body"
169
+ builder.footer = "footer"
170
170
 
171
171
  builder.build_action do |action|
172
- action.buttons_texts = ['button 1', 'button 2', 'button 3']
172
+ action.buttons_texts = ["button 1", "button 2", "button 3"]
173
173
  end
174
174
  end