telnyx 5.61.0 → 5.63.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/conversation_add_message_params.rb +4 -4
- data/lib/telnyx/models/calls/action_start_noise_suppression_params.rb +135 -8
- data/lib/telnyx/models/porting_orders/phone_number_block_list_params.rb +7 -7
- data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +0 -2
- data/lib/telnyx/models/voice_clone_create_params.rb +0 -2
- data/lib/telnyx/models/voice_clone_data.rb +0 -2
- data/lib/telnyx/models/voice_clone_list_params.rb +0 -2
- data/lib/telnyx/models/voice_design_create_params.rb +0 -2
- data/lib/telnyx/models/voice_design_data.rb +0 -2
- data/lib/telnyx/models/voice_design_list_response.rb +0 -2
- data/lib/telnyx/models/voice_design_rename_response.rb +0 -2
- data/lib/telnyx/models/whatsapp/template_create_params.rb +421 -7
- data/lib/telnyx/models/whatsapp_message_template_update_params.rb +405 -3
- data/lib/telnyx/models/whatsapp_template_data.rb +10 -3
- data/lib/telnyx/models/x402/credit_account_settle_params.rb +4 -4
- data/lib/telnyx/resources/calls/actions.rb +1 -1
- data/lib/telnyx/resources/whatsapp/templates.rb +13 -5
- data/lib/telnyx/resources/whatsapp_message_templates.rb +1 -1
- data/lib/telnyx/resources/x402/credit_account.rb +2 -2
- data/lib/telnyx/version.rb +1 -1
- data/rbi/telnyx/models/ai/conversation_add_message_params.rbi +5 -5
- data/rbi/telnyx/models/calls/action_start_noise_suppression_params.rbi +338 -12
- data/rbi/telnyx/models/porting_orders/phone_number_block_list_params.rbi +18 -18
- data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +0 -10
- data/rbi/telnyx/models/voice_clone_create_params.rbi +0 -7
- data/rbi/telnyx/models/voice_clone_data.rbi +0 -4
- data/rbi/telnyx/models/voice_clone_list_params.rbi +0 -10
- data/rbi/telnyx/models/voice_design_create_params.rbi +0 -10
- data/rbi/telnyx/models/voice_design_data.rbi +0 -4
- data/rbi/telnyx/models/voice_design_list_response.rbi +0 -10
- data/rbi/telnyx/models/voice_design_rename_response.rbi +0 -10
- data/rbi/telnyx/models/whatsapp/template_create_params.rbi +891 -3
- data/rbi/telnyx/models/whatsapp_message_template_update_params.rbi +898 -5
- data/rbi/telnyx/models/whatsapp_template_data.rbi +10 -2
- data/rbi/telnyx/models/x402/credit_account_settle_params.rbi +6 -6
- data/rbi/telnyx/resources/calls/actions.rbi +4 -3
- data/rbi/telnyx/resources/whatsapp/templates.rbi +17 -1
- data/rbi/telnyx/resources/whatsapp_message_templates.rbi +11 -1
- data/rbi/telnyx/resources/x402/credit_account.rbi +2 -2
- data/sig/telnyx/models/ai/conversation_add_message_params.rbs +5 -5
- data/sig/telnyx/models/calls/action_start_noise_suppression_params.rbs +124 -4
- data/sig/telnyx/models/porting_orders/phone_number_block_list_params.rbs +5 -5
- data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +1 -3
- data/sig/telnyx/models/voice_clone_create_params.rbs +1 -3
- data/sig/telnyx/models/voice_clone_data.rbs +1 -3
- data/sig/telnyx/models/voice_clone_list_params.rbs +1 -3
- data/sig/telnyx/models/voice_design_create_params.rbs +1 -3
- data/sig/telnyx/models/voice_design_data.rbs +1 -3
- data/sig/telnyx/models/voice_design_list_response.rbs +1 -3
- data/sig/telnyx/models/voice_design_rename_response.rbs +1 -3
- data/sig/telnyx/models/whatsapp/template_create_params.rbs +369 -4
- data/sig/telnyx/models/whatsapp_message_template_update_params.rbs +369 -6
- data/sig/telnyx/models/x402/credit_account_settle_params.rbs +5 -5
- data/sig/telnyx/resources/whatsapp/templates.rbs +1 -1
- data/sig/telnyx/resources/whatsapp_message_templates.rbs +1 -1
- data/sig/telnyx/resources/x402/credit_account.rbs +1 -1
- metadata +2 -2
|
@@ -9,39 +9,55 @@ module Telnyx
|
|
|
9
9
|
include Telnyx::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
11
|
# @!attribute category
|
|
12
|
+
# Template category: AUTHENTICATION, UTILITY, or MARKETING.
|
|
12
13
|
#
|
|
13
14
|
# @return [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Category]
|
|
14
15
|
required :category, enum: -> { Telnyx::Whatsapp::TemplateCreateParams::Category }
|
|
15
16
|
|
|
16
17
|
# @!attribute components
|
|
18
|
+
# Template components defining message structure. Passed through to Meta Graph
|
|
19
|
+
# API. Templates with variables must include example values. Supports HEADER,
|
|
20
|
+
# BODY, FOOTER, BUTTONS, CAROUSEL and any future Meta component types.
|
|
17
21
|
#
|
|
18
|
-
# @return [Array<
|
|
22
|
+
# @return [Array<Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Body, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Footer, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Carousel>]
|
|
19
23
|
required :components,
|
|
20
|
-
Telnyx::Internal::Type::ArrayOf[Telnyx::
|
|
24
|
+
-> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::Whatsapp::TemplateCreateParams::Component] }
|
|
21
25
|
|
|
22
26
|
# @!attribute language
|
|
27
|
+
# Template language code (e.g. en_US, es, pt_BR).
|
|
23
28
|
#
|
|
24
29
|
# @return [String]
|
|
25
30
|
required :language, String
|
|
26
31
|
|
|
27
32
|
# @!attribute name
|
|
33
|
+
# Template name. Lowercase letters, numbers, and underscores only.
|
|
28
34
|
#
|
|
29
35
|
# @return [String]
|
|
30
36
|
required :name, String
|
|
31
37
|
|
|
32
38
|
# @!attribute waba_id
|
|
39
|
+
# The WhatsApp Business Account ID.
|
|
33
40
|
#
|
|
34
41
|
# @return [String]
|
|
35
42
|
required :waba_id, String
|
|
36
43
|
|
|
37
44
|
# @!method initialize(category:, components:, language:, name:, waba_id:, request_options: {})
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
# @param
|
|
42
|
-
#
|
|
45
|
+
# Some parameter documentations has been truncated, see
|
|
46
|
+
# {Telnyx::Models::Whatsapp::TemplateCreateParams} for more details.
|
|
47
|
+
#
|
|
48
|
+
# @param category [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Category] Template category: AUTHENTICATION, UTILITY, or MARKETING.
|
|
49
|
+
#
|
|
50
|
+
# @param components [Array<Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Body, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Footer, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Carousel>] Template components defining message structure. Passed through to Meta Graph API
|
|
51
|
+
#
|
|
52
|
+
# @param language [String] Template language code (e.g. en_US, es, pt_BR).
|
|
53
|
+
#
|
|
54
|
+
# @param name [String] Template name. Lowercase letters, numbers, and underscores only.
|
|
55
|
+
#
|
|
56
|
+
# @param waba_id [String] The WhatsApp Business Account ID.
|
|
57
|
+
#
|
|
43
58
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
44
59
|
|
|
60
|
+
# Template category: AUTHENTICATION, UTILITY, or MARKETING.
|
|
45
61
|
module Category
|
|
46
62
|
extend Telnyx::Internal::Type::Enum
|
|
47
63
|
|
|
@@ -52,6 +68,404 @@ module Telnyx
|
|
|
52
68
|
# @!method self.values
|
|
53
69
|
# @return [Array<Symbol>]
|
|
54
70
|
end
|
|
71
|
+
|
|
72
|
+
# A template component. Additional Meta component types not listed here are also
|
|
73
|
+
# accepted.
|
|
74
|
+
module Component
|
|
75
|
+
extend Telnyx::Internal::Type::Union
|
|
76
|
+
|
|
77
|
+
discriminator :type
|
|
78
|
+
|
|
79
|
+
# Optional header displayed at the top of the message.
|
|
80
|
+
variant :HEADER, -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Header }
|
|
81
|
+
|
|
82
|
+
# The main text content of the message. Supports multiple variable parameters ({{1}}, {{2}}, etc.). Variables cannot be at the start or end. Maximum 1024 characters.
|
|
83
|
+
variant :BODY, -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Body }
|
|
84
|
+
|
|
85
|
+
# Optional footer displayed at the bottom of the message. Does not support variables.
|
|
86
|
+
variant :FOOTER, -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Footer }
|
|
87
|
+
|
|
88
|
+
# Optional interactive buttons. Maximum 3 buttons per template.
|
|
89
|
+
variant :BUTTONS, -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons }
|
|
90
|
+
|
|
91
|
+
# Carousel component for multi-card templates. Each card can contain its own header, body, and buttons.
|
|
92
|
+
variant :CAROUSEL, -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel }
|
|
93
|
+
|
|
94
|
+
class Header < Telnyx::Internal::Type::BaseModel
|
|
95
|
+
# @!attribute file_format
|
|
96
|
+
# Header format type: TEXT (supports one variable), IMAGE, VIDEO, DOCUMENT, or
|
|
97
|
+
# LOCATION.
|
|
98
|
+
#
|
|
99
|
+
# @return [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header::Format]
|
|
100
|
+
required :file_format,
|
|
101
|
+
enum: -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format },
|
|
102
|
+
api_name: :format
|
|
103
|
+
|
|
104
|
+
# @!attribute type
|
|
105
|
+
#
|
|
106
|
+
# @return [Symbol, :HEADER]
|
|
107
|
+
required :type, const: :HEADER
|
|
108
|
+
|
|
109
|
+
# @!attribute example
|
|
110
|
+
# Sample values for header variables.
|
|
111
|
+
#
|
|
112
|
+
# @return [Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header::Example, nil]
|
|
113
|
+
optional :example, -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Example }
|
|
114
|
+
|
|
115
|
+
# @!attribute text
|
|
116
|
+
# Header text. Required when format is TEXT. Supports one variable ({{1}}).
|
|
117
|
+
# Variables cannot be at the start or end.
|
|
118
|
+
#
|
|
119
|
+
# @return [String, nil]
|
|
120
|
+
optional :text, String
|
|
121
|
+
|
|
122
|
+
# @!method initialize(file_format:, example: nil, text: nil, type: :HEADER)
|
|
123
|
+
# Some parameter documentations has been truncated, see
|
|
124
|
+
# {Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header} for more
|
|
125
|
+
# details.
|
|
126
|
+
#
|
|
127
|
+
# Optional header displayed at the top of the message.
|
|
128
|
+
#
|
|
129
|
+
# @param file_format [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header::Format] Header format type: TEXT (supports one variable), IMAGE, VIDEO, DOCUMENT, or LOC
|
|
130
|
+
#
|
|
131
|
+
# @param example [Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header::Example] Sample values for header variables.
|
|
132
|
+
#
|
|
133
|
+
# @param text [String] Header text. Required when format is TEXT. Supports one variable ({{1}}). Variab
|
|
134
|
+
#
|
|
135
|
+
# @param type [Symbol, :HEADER]
|
|
136
|
+
|
|
137
|
+
# Header format type: TEXT (supports one variable), IMAGE, VIDEO, DOCUMENT, or
|
|
138
|
+
# LOCATION.
|
|
139
|
+
#
|
|
140
|
+
# @see Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header#file_format
|
|
141
|
+
module Format
|
|
142
|
+
extend Telnyx::Internal::Type::Enum
|
|
143
|
+
|
|
144
|
+
TEXT = :TEXT
|
|
145
|
+
IMAGE = :IMAGE
|
|
146
|
+
VIDEO = :VIDEO
|
|
147
|
+
DOCUMENT = :DOCUMENT
|
|
148
|
+
LOCATION = :LOCATION
|
|
149
|
+
|
|
150
|
+
# @!method self.values
|
|
151
|
+
# @return [Array<Symbol>]
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# @see Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header#example
|
|
155
|
+
class Example < Telnyx::Internal::Type::BaseModel
|
|
156
|
+
# @!attribute header_handle
|
|
157
|
+
# Media handle for IMAGE, VIDEO, or DOCUMENT headers.
|
|
158
|
+
#
|
|
159
|
+
# @return [Array<String>, nil]
|
|
160
|
+
optional :header_handle, Telnyx::Internal::Type::ArrayOf[String]
|
|
161
|
+
|
|
162
|
+
# @!attribute header_text
|
|
163
|
+
# Sample values for text header variables.
|
|
164
|
+
#
|
|
165
|
+
# @return [Array<String>, nil]
|
|
166
|
+
optional :header_text, Telnyx::Internal::Type::ArrayOf[String]
|
|
167
|
+
|
|
168
|
+
# @!method initialize(header_handle: nil, header_text: nil)
|
|
169
|
+
# Sample values for header variables.
|
|
170
|
+
#
|
|
171
|
+
# @param header_handle [Array<String>] Media handle for IMAGE, VIDEO, or DOCUMENT headers.
|
|
172
|
+
#
|
|
173
|
+
# @param header_text [Array<String>] Sample values for text header variables.
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
class Body < Telnyx::Internal::Type::BaseModel
|
|
178
|
+
# @!attribute type
|
|
179
|
+
#
|
|
180
|
+
# @return [Symbol, :BODY]
|
|
181
|
+
required :type, const: :BODY
|
|
182
|
+
|
|
183
|
+
# @!attribute example
|
|
184
|
+
# Sample values for body variables. Required when body text contains parameters.
|
|
185
|
+
#
|
|
186
|
+
# @return [Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Body::Example, nil]
|
|
187
|
+
optional :example, -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Body::Example }
|
|
188
|
+
|
|
189
|
+
# @!attribute text
|
|
190
|
+
# Body text content. Use {{1}}, {{2}}, etc. for variable placeholders. Required
|
|
191
|
+
# for MARKETING and UTILITY templates. Optional for AUTHENTICATION templates where
|
|
192
|
+
# Meta provides the built-in OTP body.
|
|
193
|
+
#
|
|
194
|
+
# @return [String, nil]
|
|
195
|
+
optional :text, String
|
|
196
|
+
|
|
197
|
+
# @!method initialize(example: nil, text: nil, type: :BODY)
|
|
198
|
+
# Some parameter documentations has been truncated, see
|
|
199
|
+
# {Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Body} for more
|
|
200
|
+
# details.
|
|
201
|
+
#
|
|
202
|
+
# The main text content of the message. Supports multiple variable parameters
|
|
203
|
+
# ({{1}}, {{2}}, etc.). Variables cannot be at the start or end. Maximum 1024
|
|
204
|
+
# characters.
|
|
205
|
+
#
|
|
206
|
+
# @param example [Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Body::Example] Sample values for body variables. Required when body text contains parameters.
|
|
207
|
+
#
|
|
208
|
+
# @param text [String] Body text content. Use {{1}}, {{2}}, etc. for variable placeholders. Required fo
|
|
209
|
+
#
|
|
210
|
+
# @param type [Symbol, :BODY]
|
|
211
|
+
|
|
212
|
+
# @see Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Body#example
|
|
213
|
+
class Example < Telnyx::Internal::Type::BaseModel
|
|
214
|
+
# @!attribute body_text
|
|
215
|
+
# Array containing one array of sample values, one per variable in order.
|
|
216
|
+
#
|
|
217
|
+
# @return [Array<Array<String>>, nil]
|
|
218
|
+
optional :body_text, Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::ArrayOf[String]]
|
|
219
|
+
|
|
220
|
+
# @!method initialize(body_text: nil)
|
|
221
|
+
# Sample values for body variables. Required when body text contains parameters.
|
|
222
|
+
#
|
|
223
|
+
# @param body_text [Array<Array<String>>] Array containing one array of sample values, one per variable in order.
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
class Footer < Telnyx::Internal::Type::BaseModel
|
|
228
|
+
# @!attribute type
|
|
229
|
+
#
|
|
230
|
+
# @return [Symbol, :FOOTER]
|
|
231
|
+
required :type, const: :FOOTER
|
|
232
|
+
|
|
233
|
+
# @!attribute code_expiration_minutes
|
|
234
|
+
# OTP code expiration time in minutes. Used in AUTHENTICATION template footers
|
|
235
|
+
# instead of free-form text.
|
|
236
|
+
#
|
|
237
|
+
# @return [Integer, nil]
|
|
238
|
+
optional :code_expiration_minutes, Integer
|
|
239
|
+
|
|
240
|
+
# @!attribute text
|
|
241
|
+
# Footer text. Maximum 60 characters. For non-authentication templates.
|
|
242
|
+
#
|
|
243
|
+
# @return [String, nil]
|
|
244
|
+
optional :text, String
|
|
245
|
+
|
|
246
|
+
# @!method initialize(code_expiration_minutes: nil, text: nil, type: :FOOTER)
|
|
247
|
+
# Some parameter documentations has been truncated, see
|
|
248
|
+
# {Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Footer} for more
|
|
249
|
+
# details.
|
|
250
|
+
#
|
|
251
|
+
# Optional footer displayed at the bottom of the message. Does not support
|
|
252
|
+
# variables.
|
|
253
|
+
#
|
|
254
|
+
# @param code_expiration_minutes [Integer] OTP code expiration time in minutes. Used in AUTHENTICATION template footers ins
|
|
255
|
+
#
|
|
256
|
+
# @param text [String] Footer text. Maximum 60 characters. For non-authentication templates.
|
|
257
|
+
#
|
|
258
|
+
# @param type [Symbol, :FOOTER]
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
class Buttons < Telnyx::Internal::Type::BaseModel
|
|
262
|
+
# @!attribute buttons
|
|
263
|
+
# Array of button objects. Meta supports various combinations of button types.
|
|
264
|
+
#
|
|
265
|
+
# @return [Array<Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button>]
|
|
266
|
+
required :buttons,
|
|
267
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button] }
|
|
268
|
+
|
|
269
|
+
# @!attribute type
|
|
270
|
+
#
|
|
271
|
+
# @return [Symbol, :BUTTONS]
|
|
272
|
+
required :type, const: :BUTTONS
|
|
273
|
+
|
|
274
|
+
# @!method initialize(buttons:, type: :BUTTONS)
|
|
275
|
+
# Optional interactive buttons. Maximum 3 buttons per template.
|
|
276
|
+
#
|
|
277
|
+
# @param buttons [Array<Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button>] Array of button objects. Meta supports various combinations of button types.
|
|
278
|
+
#
|
|
279
|
+
# @param type [Symbol, :BUTTONS]
|
|
280
|
+
|
|
281
|
+
class Button < Telnyx::Internal::Type::BaseModel
|
|
282
|
+
# @!attribute type
|
|
283
|
+
#
|
|
284
|
+
# @return [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type]
|
|
285
|
+
required :type, enum: -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type }
|
|
286
|
+
|
|
287
|
+
# @!attribute autofill_text
|
|
288
|
+
# Custom autofill button text for ONE_TAP OTP buttons.
|
|
289
|
+
#
|
|
290
|
+
# @return [String, nil]
|
|
291
|
+
optional :autofill_text, String
|
|
292
|
+
|
|
293
|
+
# @!attribute example
|
|
294
|
+
# Sample values for URL variable.
|
|
295
|
+
#
|
|
296
|
+
# @return [Array<String>, nil]
|
|
297
|
+
optional :example, Telnyx::Internal::Type::ArrayOf[String]
|
|
298
|
+
|
|
299
|
+
# @!attribute flow_action
|
|
300
|
+
# Flow action type for FLOW-type buttons.
|
|
301
|
+
#
|
|
302
|
+
# @return [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction, nil]
|
|
303
|
+
optional :flow_action,
|
|
304
|
+
enum: -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction }
|
|
305
|
+
|
|
306
|
+
# @!attribute flow_id
|
|
307
|
+
# Flow ID for FLOW-type buttons.
|
|
308
|
+
#
|
|
309
|
+
# @return [String, nil]
|
|
310
|
+
optional :flow_id, String
|
|
311
|
+
|
|
312
|
+
# @!attribute navigate_screen
|
|
313
|
+
# Target screen name for FLOW buttons with navigate action.
|
|
314
|
+
#
|
|
315
|
+
# @return [String, nil]
|
|
316
|
+
optional :navigate_screen, String
|
|
317
|
+
|
|
318
|
+
# @!attribute otp_type
|
|
319
|
+
#
|
|
320
|
+
# @return [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType, nil]
|
|
321
|
+
optional :otp_type,
|
|
322
|
+
enum: -> { Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType }
|
|
323
|
+
|
|
324
|
+
# @!attribute package_name
|
|
325
|
+
# Android package name. Required for ONE_TAP OTP buttons.
|
|
326
|
+
#
|
|
327
|
+
# @return [String, nil]
|
|
328
|
+
optional :package_name, String
|
|
329
|
+
|
|
330
|
+
# @!attribute phone_number
|
|
331
|
+
# Phone number in E.164 format.
|
|
332
|
+
#
|
|
333
|
+
# @return [String, nil]
|
|
334
|
+
optional :phone_number, String
|
|
335
|
+
|
|
336
|
+
# @!attribute signature_hash
|
|
337
|
+
# Android app signing key hash. Required for ONE_TAP OTP buttons.
|
|
338
|
+
#
|
|
339
|
+
# @return [String, nil]
|
|
340
|
+
optional :signature_hash, String
|
|
341
|
+
|
|
342
|
+
# @!attribute text
|
|
343
|
+
# Button label text. Maximum 25 characters. Required for URL, PHONE_NUMBER, and
|
|
344
|
+
# QUICK_REPLY buttons. Not required for OTP buttons (Meta supplies the label).
|
|
345
|
+
#
|
|
346
|
+
# @return [String, nil]
|
|
347
|
+
optional :text, String
|
|
348
|
+
|
|
349
|
+
# @!attribute url
|
|
350
|
+
# URL for URL-type buttons. Supports one variable ({{1}}).
|
|
351
|
+
#
|
|
352
|
+
# @return [String, nil]
|
|
353
|
+
optional :url, String
|
|
354
|
+
|
|
355
|
+
# @!attribute zero_tap_terms_accepted
|
|
356
|
+
# Whether zero-tap terms have been accepted.
|
|
357
|
+
#
|
|
358
|
+
# @return [Boolean, nil]
|
|
359
|
+
optional :zero_tap_terms_accepted, Telnyx::Internal::Type::Boolean
|
|
360
|
+
|
|
361
|
+
# @!method initialize(type:, autofill_text: nil, example: nil, flow_action: nil, flow_id: nil, navigate_screen: nil, otp_type: nil, package_name: nil, phone_number: nil, signature_hash: nil, text: nil, url: nil, zero_tap_terms_accepted: nil)
|
|
362
|
+
# Some parameter documentations has been truncated, see
|
|
363
|
+
# {Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button} for
|
|
364
|
+
# more details.
|
|
365
|
+
#
|
|
366
|
+
# @param type [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type]
|
|
367
|
+
#
|
|
368
|
+
# @param autofill_text [String] Custom autofill button text for ONE_TAP OTP buttons.
|
|
369
|
+
#
|
|
370
|
+
# @param example [Array<String>] Sample values for URL variable.
|
|
371
|
+
#
|
|
372
|
+
# @param flow_action [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction] Flow action type for FLOW-type buttons.
|
|
373
|
+
#
|
|
374
|
+
# @param flow_id [String] Flow ID for FLOW-type buttons.
|
|
375
|
+
#
|
|
376
|
+
# @param navigate_screen [String] Target screen name for FLOW buttons with navigate action.
|
|
377
|
+
#
|
|
378
|
+
# @param otp_type [Symbol, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType]
|
|
379
|
+
#
|
|
380
|
+
# @param package_name [String] Android package name. Required for ONE_TAP OTP buttons.
|
|
381
|
+
#
|
|
382
|
+
# @param phone_number [String] Phone number in E.164 format.
|
|
383
|
+
#
|
|
384
|
+
# @param signature_hash [String] Android app signing key hash. Required for ONE_TAP OTP buttons.
|
|
385
|
+
#
|
|
386
|
+
# @param text [String] Button label text. Maximum 25 characters. Required for URL, PHONE_NUMBER, and QU
|
|
387
|
+
#
|
|
388
|
+
# @param url [String] URL for URL-type buttons. Supports one variable ({{1}}).
|
|
389
|
+
#
|
|
390
|
+
# @param zero_tap_terms_accepted [Boolean] Whether zero-tap terms have been accepted.
|
|
391
|
+
|
|
392
|
+
# @see Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button#type
|
|
393
|
+
module Type
|
|
394
|
+
extend Telnyx::Internal::Type::Enum
|
|
395
|
+
|
|
396
|
+
URL = :URL
|
|
397
|
+
PHONE_NUMBER = :PHONE_NUMBER
|
|
398
|
+
QUICK_REPLY = :QUICK_REPLY
|
|
399
|
+
OTP = :OTP
|
|
400
|
+
COPY_CODE = :COPY_CODE
|
|
401
|
+
FLOW = :FLOW
|
|
402
|
+
|
|
403
|
+
# @!method self.values
|
|
404
|
+
# @return [Array<Symbol>]
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# Flow action type for FLOW-type buttons.
|
|
408
|
+
#
|
|
409
|
+
# @see Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button#flow_action
|
|
410
|
+
module FlowAction
|
|
411
|
+
extend Telnyx::Internal::Type::Enum
|
|
412
|
+
|
|
413
|
+
NAVIGATE = :navigate
|
|
414
|
+
DATA_EXCHANGE = :data_exchange
|
|
415
|
+
|
|
416
|
+
# @!method self.values
|
|
417
|
+
# @return [Array<Symbol>]
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
# @see Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons::Button#otp_type
|
|
421
|
+
module OtpType
|
|
422
|
+
extend Telnyx::Internal::Type::Enum
|
|
423
|
+
|
|
424
|
+
COPY_CODE = :COPY_CODE
|
|
425
|
+
ONE_TAP = :ONE_TAP
|
|
426
|
+
|
|
427
|
+
# @!method self.values
|
|
428
|
+
# @return [Array<Symbol>]
|
|
429
|
+
end
|
|
430
|
+
end
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
class Carousel < Telnyx::Internal::Type::BaseModel
|
|
434
|
+
# @!attribute cards
|
|
435
|
+
# Array of card objects, each with its own components.
|
|
436
|
+
#
|
|
437
|
+
# @return [Array<Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Carousel::Card>]
|
|
438
|
+
required :cards,
|
|
439
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel::Card] }
|
|
440
|
+
|
|
441
|
+
# @!attribute type
|
|
442
|
+
#
|
|
443
|
+
# @return [Symbol, :CAROUSEL]
|
|
444
|
+
required :type, const: :CAROUSEL
|
|
445
|
+
|
|
446
|
+
# @!method initialize(cards:, type: :CAROUSEL)
|
|
447
|
+
# Carousel component for multi-card templates. Each card can contain its own
|
|
448
|
+
# header, body, and buttons.
|
|
449
|
+
#
|
|
450
|
+
# @param cards [Array<Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Carousel::Card>] Array of card objects, each with its own components.
|
|
451
|
+
#
|
|
452
|
+
# @param type [Symbol, :CAROUSEL]
|
|
453
|
+
|
|
454
|
+
class Card < Telnyx::Internal::Type::BaseModel
|
|
455
|
+
# @!attribute components
|
|
456
|
+
#
|
|
457
|
+
# @return [Array<Hash{Symbol=>Object}>, nil]
|
|
458
|
+
optional :components,
|
|
459
|
+
Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]]
|
|
460
|
+
|
|
461
|
+
# @!method initialize(components: nil)
|
|
462
|
+
# @param components [Array<Hash{Symbol=>Object}>]
|
|
463
|
+
end
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# @!method self.variants
|
|
467
|
+
# @return [Array(Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Header, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Body, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Footer, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Buttons, Telnyx::Models::Whatsapp::TemplateCreateParams::Component::Carousel)]
|
|
468
|
+
end
|
|
55
469
|
end
|
|
56
470
|
end
|
|
57
471
|
end
|