warb 0.1.4 → 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 (78) 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/flow.md +5 -241
  9. data/docs/messages/interactive_call_to_action_url.md +9 -9
  10. data/docs/messages/interactive_list.md +2 -2
  11. data/docs/messages/interactive_reply_button.md +9 -9
  12. data/docs/setup.md +1 -45
  13. data/examples/audio.rb +10 -10
  14. data/examples/document.rb +34 -34
  15. data/examples/image.rb +22 -22
  16. data/examples/interactive_call_to_action_url.rb +46 -46
  17. data/examples/interactive_list.rb +61 -61
  18. data/examples/interactive_reply_button.rb +43 -43
  19. data/examples/location.rb +32 -32
  20. data/examples/location_request.rb +11 -11
  21. data/examples/message.rb +8 -8
  22. data/examples/sticker.rb +10 -10
  23. data/examples/video.rb +22 -22
  24. data/examples/webhook.rb +43 -77
  25. data/lib/warb/client.rb +5 -7
  26. data/lib/warb/components/action.rb +8 -12
  27. data/lib/warb/configuration.rb +1 -4
  28. data/lib/warb/connection.rb +9 -15
  29. data/lib/warb/dispatcher.rb +3 -4
  30. data/lib/warb/dispatcher_concern.rb +0 -6
  31. data/lib/warb/indicator_dispatcher.rb +4 -4
  32. data/lib/warb/media_dispatcher.rb +10 -10
  33. data/lib/warb/resources/audio.rb +1 -1
  34. data/lib/warb/resources/contact.rb +20 -22
  35. data/lib/warb/resources/document.rb +1 -1
  36. data/lib/warb/resources/flow.rb +20 -82
  37. data/lib/warb/resources/image.rb +1 -1
  38. data/lib/warb/resources/interactive_call_to_action_url.rb +8 -10
  39. data/lib/warb/resources/interactive_list.rb +5 -7
  40. data/lib/warb/resources/interactive_reply_button.rb +8 -10
  41. data/lib/warb/resources/location.rb +1 -11
  42. data/lib/warb/resources/location_request.rb +3 -5
  43. data/lib/warb/resources/reaction.rb +1 -1
  44. data/lib/warb/resources/resource.rb +4 -14
  45. data/lib/warb/resources/sticker.rb +1 -1
  46. data/lib/warb/resources/text.rb +3 -31
  47. data/lib/warb/resources/video.rb +1 -1
  48. data/lib/warb/utils.rb +1 -3
  49. data/lib/warb/version.rb +1 -1
  50. data/lib/warb.rb +31 -67
  51. metadata +3 -34
  52. data/docs/components/button.md +0 -62
  53. data/docs/components/copy_code_button.md +0 -57
  54. data/docs/components/flow_button.md +0 -102
  55. data/docs/components/url_button.md +0 -57
  56. data/docs/messages/template.md +0 -373
  57. data/docs/resources/README.md +0 -14
  58. data/docs/resources/currency.md +0 -22
  59. data/docs/resources/date_time.md +0 -11
  60. data/docs/resources/text.md +0 -9
  61. data/lib/warb/category.rb +0 -8
  62. data/lib/warb/components/button.rb +0 -29
  63. data/lib/warb/components/component.rb +0 -19
  64. data/lib/warb/components/copy_code_button.rb +0 -30
  65. data/lib/warb/components/flow_button.rb +0 -32
  66. data/lib/warb/components/quick_reply_button.rb +0 -15
  67. data/lib/warb/components/url_button.rb +0 -30
  68. data/lib/warb/components/voice_call_button.rb +0 -15
  69. data/lib/warb/errors.rb +0 -27
  70. data/lib/warb/language.rb +0 -8
  71. data/lib/warb/resources/currency.rb +0 -47
  72. data/lib/warb/resources/date_time.rb +0 -34
  73. data/lib/warb/resources/helpers/header.rb +0 -35
  74. data/lib/warb/resources/template.rb +0 -163
  75. data/lib/warb/resources/validation.rb +0 -30
  76. data/lib/warb/response.rb +0 -33
  77. data/lib/warb/response_error_handler.rb +0 -42
  78. data/lib/warb/template_dispatcher.rb +0 -21
data/examples/document.rb CHANGED
@@ -1,15 +1,15 @@
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
- document_link = ''
12
+ document_link = ""
13
13
 
14
14
  # We recommend testing one section at a time, as it can be overwhelming to see all the messages at once.
15
15
  # So you can comment out the sections you don't want to test.
@@ -25,8 +25,8 @@ warb_from_setup = Warb.setup do |config|
25
25
  end
26
26
 
27
27
  # To send document using its ID, you may need to retrieve it first, which can be retrieved this way
28
- file_path = '' # fill this in with the file path pointing to wherever the document is located
29
- file_type = '' # fill this in with the mimetype of the document to be uploaded
28
+ file_path = "" # fill this in with the file path pointing to wherever the document is located
29
+ file_type = "" # fill this in with the mimetype of the document to be uploaded
30
30
  # allow values for file_type:
31
31
  # text/plain, application/vnd.ms-excel, application/msword
32
32
  # application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint,
@@ -35,22 +35,22 @@ document_id = warb_from_setup.document.upload(file_path: file_path, file_type: f
35
35
  # if you already have a document id, you can simply replace the above line with such id
36
36
 
37
37
  warb_from_setup.document.dispatch(recipient_number, media_id: document_id)
38
- warb_from_setup.document.dispatch(recipient_number, media_id: document_id, filename: 'optional_name.pdf')
39
- warb_from_setup.document.dispatch(recipient_number, media_id: document_id, caption: 'OPTIONAL - Document caption')
38
+ warb_from_setup.document.dispatch(recipient_number, media_id: document_id, filename: "optional_name.pdf")
39
+ warb_from_setup.document.dispatch(recipient_number, media_id: document_id, caption: "OPTIONAL - Document caption")
40
40
  warb_from_setup.document.dispatch(recipient_number, link: document_link)
41
- warb_from_setup.document.dispatch(recipient_number, link: document_link, filename: 'optional_name.pdf')
42
- warb_from_setup.document.dispatch(recipient_number, link: document_link, caption: 'OPTIONAL - Document caption')
41
+ warb_from_setup.document.dispatch(recipient_number, link: document_link, filename: "optional_name.pdf")
42
+ warb_from_setup.document.dispatch(recipient_number, link: document_link, caption: "OPTIONAL - Document caption")
43
43
 
44
44
  warb_from_setup.document.dispatch(recipient_number) do |builder|
45
45
  builder.media_id = document_id
46
- builder.filename = 'optional_name.pdf'
47
- builder.caption = 'OPTIONAL - Document caption'
46
+ builder.filename = "optional_name.pdf"
47
+ builder.caption = "OPTIONAL - Document caption"
48
48
  end
49
49
 
50
50
  warb_from_setup.document.dispatch(recipient_number) do |builder|
51
51
  builder.link = document_link
52
- builder.filename = 'optional_name.pdf'
53
- builder.caption = 'OPTIONAL - Document caption'
52
+ builder.filename = "optional_name.pdf"
53
+ builder.caption = "OPTIONAL - Document caption"
54
54
  end
55
55
 
56
56
  # ############################################ #
@@ -64,8 +64,8 @@ warb_from_new = Warb.new(
64
64
  )
65
65
 
66
66
  # Same as stated above, if you need a document id, you can upload it this way
67
- file_path = '' # fill this in with the file path pointing to wherever the document is located
68
- file_type = '' # fill this in with the mimetype of the document to be uploaded
67
+ file_path = "" # fill this in with the file path pointing to wherever the document is located
68
+ file_type = "" # fill this in with the mimetype of the document to be uploaded
69
69
  # allow values for file_type:
70
70
  # text/plain, application/vnd.ms-excel, application/msword
71
71
  # application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint,
@@ -74,22 +74,22 @@ document_id = warb_from_setup.document.upload(file_path: file_path, file_type: f
74
74
  # if you already have a document id, you can simply replace the above line with such id
75
75
 
76
76
  warb_from_new.document.dispatch(recipient_number, media_id: document_id)
77
- warb_from_new.document.dispatch(recipient_number, media_id: document_id, filename: 'optional_name.pdf')
78
- warb_from_new.document.dispatch(recipient_number, media_id: document_id, caption: 'OPTIONAL - Document caption')
77
+ warb_from_new.document.dispatch(recipient_number, media_id: document_id, filename: "optional_name.pdf")
78
+ warb_from_new.document.dispatch(recipient_number, media_id: document_id, caption: "OPTIONAL - Document caption")
79
79
  warb_from_new.document.dispatch(recipient_number, link: document_link)
80
- warb_from_new.document.dispatch(recipient_number, link: document_link, filename: 'optional_name.pdf')
81
- warb_from_new.document.dispatch(recipient_number, link: document_link, caption: 'OPTIONAL - Document caption')
80
+ warb_from_new.document.dispatch(recipient_number, link: document_link, filename: "optional_name.pdf")
81
+ warb_from_new.document.dispatch(recipient_number, link: document_link, caption: "OPTIONAL - Document caption")
82
82
 
83
83
  warb_from_new.document.dispatch(recipient_number) do |builder|
84
84
  builder.media_id = document_id
85
- builder.filename = 'optional_name.pdf'
86
- builder.caption = 'OPTIONAL - Document caption'
85
+ builder.filename = "optional_name.pdf"
86
+ builder.caption = "OPTIONAL - Document caption"
87
87
  end
88
88
 
89
89
  warb_from_new.document.dispatch(recipient_number) do |builder|
90
90
  builder.link = document_link
91
- builder.filename = 'optional_name.pdf'
92
- builder.caption = 'OPTIONAL - Document caption'
91
+ builder.filename = "optional_name.pdf"
92
+ builder.caption = "OPTIONAL - Document caption"
93
93
  end
94
94
 
95
95
  # ################################################# #
@@ -97,20 +97,20 @@ end
97
97
  # ################################################# #
98
98
 
99
99
  Warb.document.dispatch(recipient_number, media_id: document_id)
100
- Warb.document.dispatch(recipient_number, media_id: document_id, filename: 'optional_name.pdf')
101
- Warb.document.dispatch(recipient_number, media_id: document_id, caption: 'OPTIONAL - Document caption')
100
+ Warb.document.dispatch(recipient_number, media_id: document_id, filename: "optional_name.pdf")
101
+ Warb.document.dispatch(recipient_number, media_id: document_id, caption: "OPTIONAL - Document caption")
102
102
  Warb.document.dispatch(recipient_number, link: document_link)
103
- Warb.document.dispatch(recipient_number, link: document_link, filename: 'optional_name.pdf')
104
- Warb.document.dispatch(recipient_number, link: document_link, caption: 'OPTIONAL - Document caption')
103
+ Warb.document.dispatch(recipient_number, link: document_link, filename: "optional_name.pdf")
104
+ Warb.document.dispatch(recipient_number, link: document_link, caption: "OPTIONAL - Document caption")
105
105
 
106
106
  Warb.document.dispatch(recipient_number) do |builder|
107
107
  builder.media_id = document_id
108
- builder.filename = 'optional_name.pdf'
109
- builder.caption = 'OPTIONAL - Document caption'
108
+ builder.filename = "optional_name.pdf"
109
+ builder.caption = "OPTIONAL - Document caption"
110
110
  end
111
111
 
112
112
  Warb.document.dispatch(recipient_number) do |builder|
113
113
  builder.link = document_link
114
- builder.filename = 'optional_name.pdf'
115
- builder.caption = 'OPTIONAL - Document caption'
114
+ builder.filename = "optional_name.pdf"
115
+ builder.caption = "OPTIONAL - Document caption"
116
116
  end
data/examples/image.rb CHANGED
@@ -1,15 +1,15 @@
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
- image_link = ''
12
+ image_link = ""
13
13
 
14
14
  # We recommend testing one section at a time, as it can be overwhelming to see all the messages at once.
15
15
  # So you can comment out the sections you don't want to test.
@@ -25,25 +25,25 @@ warb_from_setup = Warb.setup do |config|
25
25
  end
26
26
 
27
27
  warb_from_setup.image.dispatch(recipient_number, link: image_link)
28
- warb_from_setup.image.dispatch(recipient_number, link: image_link, caption: 'OPTIONAL - Image caption')
28
+ warb_from_setup.image.dispatch(recipient_number, link: image_link, caption: "OPTIONAL - Image caption")
29
29
 
30
30
  # To send image using its ID, you may need to retrieve it first, which can be retrieved this way
31
- file_path = '' # fill this in with the file path pointing to wherever the image is located
32
- file_type = '' # fill this in with the mimetype of the image to be uploaded. allowed values: "image/jpeg" or "image/png"
31
+ file_path = "" # fill this in with the file path pointing to wherever the image is located
32
+ file_type = "" # fill this in with the mimetype of the image to be uploaded. allowed values: "image/jpeg" or "image/png"
33
33
  image_id = warb_from_setup.image.upload(file_path: file_path, file_type: file_type)
34
34
  # if you already have an image id, you can simply replace the above line with such id
35
35
 
36
36
  warb_from_setup.image.dispatch(recipient_number, media_id: image_id)
37
- warb_from_setup.image.dispatch(recipient_number, media_id: image_id, caption: 'OPTIONAL - Image caption')
37
+ warb_from_setup.image.dispatch(recipient_number, media_id: image_id, caption: "OPTIONAL - Image caption")
38
38
 
39
39
  warb_from_setup.image.dispatch(recipient_number) do |builder|
40
40
  builder.media_id = image_id
41
- builder.caption = 'OPTIONAL - Image caption'
41
+ builder.caption = "OPTIONAL - Image caption"
42
42
  end
43
43
 
44
44
  warb_from_setup.image.dispatch(recipient_number) do |builder|
45
45
  builder.link = image_link
46
- builder.caption = 'OPTIONAL - Image caption'
46
+ builder.caption = "OPTIONAL - Image caption"
47
47
  end
48
48
 
49
49
  # ############################################ #
@@ -57,24 +57,24 @@ warb_from_new = Warb.new(
57
57
  )
58
58
 
59
59
  # Same as stated above, if you need an image id, you can upload it this way
60
- file_path = '' # fill this in with the file path pointing to wherever the image is located
61
- file_type = '' # fill this in with the mimetype of the image to be uploaded. allowed values: "image/jpeg" or "image/png"
60
+ file_path = "" # fill this in with the file path pointing to wherever the image is located
61
+ file_type = "" # fill this in with the mimetype of the image to be uploaded. allowed values: "image/jpeg" or "image/png"
62
62
  image_id = warb_from_new.image.upload(file_path: file_path, file_type: file_type)
63
63
  # if you already have an image id, you can simply replace the above line with such id
64
64
 
65
65
  warb_from_new.image.dispatch(recipient_number, media_id: image_id)
66
- warb_from_new.image.dispatch(recipient_number, media_id: image_id, caption: 'OPTIONAL - Image caption')
66
+ warb_from_new.image.dispatch(recipient_number, media_id: image_id, caption: "OPTIONAL - Image caption")
67
67
  warb_from_new.image.dispatch(recipient_number, link: image_link)
68
- warb_from_new.image.dispatch(recipient_number, link: image_link, caption: 'OPTIONAL - Image caption')
68
+ warb_from_new.image.dispatch(recipient_number, link: image_link, caption: "OPTIONAL - Image caption")
69
69
 
70
70
  warb_from_new.image.dispatch(recipient_number) do |builder|
71
71
  builder.media_id = image_id
72
- builder.caption = 'OPTIONAL - Image caption'
72
+ builder.caption = "OPTIONAL - Image caption"
73
73
  end
74
74
 
75
75
  warb_from_new.image.dispatch(recipient_number) do |builder|
76
76
  builder.link = image_link
77
- builder.caption = 'OPTIONAL - Image caption'
77
+ builder.caption = "OPTIONAL - Image caption"
78
78
  end
79
79
 
80
80
  # ################################################# #
@@ -82,16 +82,16 @@ end
82
82
  # ################################################# #
83
83
 
84
84
  Warb.image.dispatch(recipient_number, media_id: image_id)
85
- Warb.image.dispatch(recipient_number, media_id: image_id, caption: 'OPTIONAL - Image caption')
85
+ Warb.image.dispatch(recipient_number, media_id: image_id, caption: "OPTIONAL - Image caption")
86
86
  Warb.image.dispatch(recipient_number, link: image_link)
87
- Warb.image.dispatch(recipient_number, link: image_link, caption: 'OPTIONAL - Image caption')
87
+ Warb.image.dispatch(recipient_number, link: image_link, caption: "OPTIONAL - Image caption")
88
88
 
89
89
  Warb.image.dispatch(recipient_number) do |builder|
90
90
  builder.media_id = image_id
91
- builder.caption = 'OPTIONAL - Image caption'
91
+ builder.caption = "OPTIONAL - Image caption"
92
92
  end
93
93
 
94
94
  Warb.image.dispatch(recipient_number) do |builder|
95
95
  builder.link = image_link
96
- builder.caption = 'OPTIONAL - Image caption'
96
+ builder.caption = "OPTIONAL - Image caption"
97
97
  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::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