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
|
@@ -15,20 +15,39 @@ module Telnyx
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
# Template category: AUTHENTICATION, UTILITY, or MARKETING.
|
|
18
19
|
sig do
|
|
19
20
|
returns(Telnyx::Whatsapp::TemplateCreateParams::Category::OrSymbol)
|
|
20
21
|
end
|
|
21
22
|
attr_accessor :category
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
# Template components defining message structure. Passed through to Meta Graph
|
|
25
|
+
# API. Templates with variables must include example values. Supports HEADER,
|
|
26
|
+
# BODY, FOOTER, BUTTONS, CAROUSEL and any future Meta component types.
|
|
27
|
+
sig do
|
|
28
|
+
returns(
|
|
29
|
+
T::Array[
|
|
30
|
+
T.any(
|
|
31
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header,
|
|
32
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body,
|
|
33
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Footer,
|
|
34
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons,
|
|
35
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel
|
|
36
|
+
)
|
|
37
|
+
]
|
|
38
|
+
)
|
|
39
|
+
end
|
|
24
40
|
attr_accessor :components
|
|
25
41
|
|
|
42
|
+
# Template language code (e.g. en_US, es, pt_BR).
|
|
26
43
|
sig { returns(String) }
|
|
27
44
|
attr_accessor :language
|
|
28
45
|
|
|
46
|
+
# Template name. Lowercase letters, numbers, and underscores only.
|
|
29
47
|
sig { returns(String) }
|
|
30
48
|
attr_accessor :name
|
|
31
49
|
|
|
50
|
+
# The WhatsApp Business Account ID.
|
|
32
51
|
sig { returns(String) }
|
|
33
52
|
attr_accessor :waba_id
|
|
34
53
|
|
|
@@ -36,7 +55,16 @@ module Telnyx
|
|
|
36
55
|
params(
|
|
37
56
|
category:
|
|
38
57
|
Telnyx::Whatsapp::TemplateCreateParams::Category::OrSymbol,
|
|
39
|
-
components:
|
|
58
|
+
components:
|
|
59
|
+
T::Array[
|
|
60
|
+
T.any(
|
|
61
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::OrHash,
|
|
62
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body::OrHash,
|
|
63
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Footer::OrHash,
|
|
64
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::OrHash,
|
|
65
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel::OrHash
|
|
66
|
+
)
|
|
67
|
+
],
|
|
40
68
|
language: String,
|
|
41
69
|
name: String,
|
|
42
70
|
waba_id: String,
|
|
@@ -44,10 +72,17 @@ module Telnyx
|
|
|
44
72
|
).returns(T.attached_class)
|
|
45
73
|
end
|
|
46
74
|
def self.new(
|
|
75
|
+
# Template category: AUTHENTICATION, UTILITY, or MARKETING.
|
|
47
76
|
category:,
|
|
77
|
+
# Template components defining message structure. Passed through to Meta Graph
|
|
78
|
+
# API. Templates with variables must include example values. Supports HEADER,
|
|
79
|
+
# BODY, FOOTER, BUTTONS, CAROUSEL and any future Meta component types.
|
|
48
80
|
components:,
|
|
81
|
+
# Template language code (e.g. en_US, es, pt_BR).
|
|
49
82
|
language:,
|
|
83
|
+
# Template name. Lowercase letters, numbers, and underscores only.
|
|
50
84
|
name:,
|
|
85
|
+
# The WhatsApp Business Account ID.
|
|
51
86
|
waba_id:,
|
|
52
87
|
request_options: {}
|
|
53
88
|
)
|
|
@@ -58,7 +93,16 @@ module Telnyx
|
|
|
58
93
|
{
|
|
59
94
|
category:
|
|
60
95
|
Telnyx::Whatsapp::TemplateCreateParams::Category::OrSymbol,
|
|
61
|
-
components:
|
|
96
|
+
components:
|
|
97
|
+
T::Array[
|
|
98
|
+
T.any(
|
|
99
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header,
|
|
100
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body,
|
|
101
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Footer,
|
|
102
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons,
|
|
103
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel
|
|
104
|
+
)
|
|
105
|
+
],
|
|
62
106
|
language: String,
|
|
63
107
|
name: String,
|
|
64
108
|
waba_id: String,
|
|
@@ -69,6 +113,7 @@ module Telnyx
|
|
|
69
113
|
def to_hash
|
|
70
114
|
end
|
|
71
115
|
|
|
116
|
+
# Template category: AUTHENTICATION, UTILITY, or MARKETING.
|
|
72
117
|
module Category
|
|
73
118
|
extend Telnyx::Internal::Type::Enum
|
|
74
119
|
|
|
@@ -104,6 +149,849 @@ module Telnyx
|
|
|
104
149
|
def self.values
|
|
105
150
|
end
|
|
106
151
|
end
|
|
152
|
+
|
|
153
|
+
# A template component. Additional Meta component types not listed here are also
|
|
154
|
+
# accepted.
|
|
155
|
+
module Component
|
|
156
|
+
extend Telnyx::Internal::Type::Union
|
|
157
|
+
|
|
158
|
+
Variants =
|
|
159
|
+
T.type_alias do
|
|
160
|
+
T.any(
|
|
161
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header,
|
|
162
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body,
|
|
163
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Footer,
|
|
164
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons,
|
|
165
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
class Header < Telnyx::Internal::Type::BaseModel
|
|
170
|
+
OrHash =
|
|
171
|
+
T.type_alias do
|
|
172
|
+
T.any(
|
|
173
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header,
|
|
174
|
+
Telnyx::Internal::AnyHash
|
|
175
|
+
)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Header format type: TEXT (supports one variable), IMAGE, VIDEO, DOCUMENT, or
|
|
179
|
+
# LOCATION.
|
|
180
|
+
sig do
|
|
181
|
+
returns(
|
|
182
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format::OrSymbol
|
|
183
|
+
)
|
|
184
|
+
end
|
|
185
|
+
attr_accessor :file_format
|
|
186
|
+
|
|
187
|
+
sig { returns(Symbol) }
|
|
188
|
+
attr_accessor :type
|
|
189
|
+
|
|
190
|
+
# Sample values for header variables.
|
|
191
|
+
sig do
|
|
192
|
+
returns(
|
|
193
|
+
T.nilable(
|
|
194
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Example
|
|
195
|
+
)
|
|
196
|
+
)
|
|
197
|
+
end
|
|
198
|
+
attr_reader :example
|
|
199
|
+
|
|
200
|
+
sig do
|
|
201
|
+
params(
|
|
202
|
+
example:
|
|
203
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Example::OrHash
|
|
204
|
+
).void
|
|
205
|
+
end
|
|
206
|
+
attr_writer :example
|
|
207
|
+
|
|
208
|
+
# Header text. Required when format is TEXT. Supports one variable ({{1}}).
|
|
209
|
+
# Variables cannot be at the start or end.
|
|
210
|
+
sig { returns(T.nilable(String)) }
|
|
211
|
+
attr_reader :text
|
|
212
|
+
|
|
213
|
+
sig { params(text: String).void }
|
|
214
|
+
attr_writer :text
|
|
215
|
+
|
|
216
|
+
# Optional header displayed at the top of the message.
|
|
217
|
+
sig do
|
|
218
|
+
params(
|
|
219
|
+
file_format:
|
|
220
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format::OrSymbol,
|
|
221
|
+
example:
|
|
222
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Example::OrHash,
|
|
223
|
+
text: String,
|
|
224
|
+
type: Symbol
|
|
225
|
+
).returns(T.attached_class)
|
|
226
|
+
end
|
|
227
|
+
def self.new(
|
|
228
|
+
# Header format type: TEXT (supports one variable), IMAGE, VIDEO, DOCUMENT, or
|
|
229
|
+
# LOCATION.
|
|
230
|
+
file_format:,
|
|
231
|
+
# Sample values for header variables.
|
|
232
|
+
example: nil,
|
|
233
|
+
# Header text. Required when format is TEXT. Supports one variable ({{1}}).
|
|
234
|
+
# Variables cannot be at the start or end.
|
|
235
|
+
text: nil,
|
|
236
|
+
type: :HEADER
|
|
237
|
+
)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
sig do
|
|
241
|
+
override.returns(
|
|
242
|
+
{
|
|
243
|
+
file_format:
|
|
244
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format::OrSymbol,
|
|
245
|
+
type: Symbol,
|
|
246
|
+
example:
|
|
247
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Example,
|
|
248
|
+
text: String
|
|
249
|
+
}
|
|
250
|
+
)
|
|
251
|
+
end
|
|
252
|
+
def to_hash
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Header format type: TEXT (supports one variable), IMAGE, VIDEO, DOCUMENT, or
|
|
256
|
+
# LOCATION.
|
|
257
|
+
module Format
|
|
258
|
+
extend Telnyx::Internal::Type::Enum
|
|
259
|
+
|
|
260
|
+
TaggedSymbol =
|
|
261
|
+
T.type_alias do
|
|
262
|
+
T.all(
|
|
263
|
+
Symbol,
|
|
264
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format
|
|
265
|
+
)
|
|
266
|
+
end
|
|
267
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
268
|
+
|
|
269
|
+
TEXT =
|
|
270
|
+
T.let(
|
|
271
|
+
:TEXT,
|
|
272
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format::TaggedSymbol
|
|
273
|
+
)
|
|
274
|
+
IMAGE =
|
|
275
|
+
T.let(
|
|
276
|
+
:IMAGE,
|
|
277
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format::TaggedSymbol
|
|
278
|
+
)
|
|
279
|
+
VIDEO =
|
|
280
|
+
T.let(
|
|
281
|
+
:VIDEO,
|
|
282
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format::TaggedSymbol
|
|
283
|
+
)
|
|
284
|
+
DOCUMENT =
|
|
285
|
+
T.let(
|
|
286
|
+
:DOCUMENT,
|
|
287
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format::TaggedSymbol
|
|
288
|
+
)
|
|
289
|
+
LOCATION =
|
|
290
|
+
T.let(
|
|
291
|
+
:LOCATION,
|
|
292
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format::TaggedSymbol
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
sig do
|
|
296
|
+
override.returns(
|
|
297
|
+
T::Array[
|
|
298
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Format::TaggedSymbol
|
|
299
|
+
]
|
|
300
|
+
)
|
|
301
|
+
end
|
|
302
|
+
def self.values
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
class Example < Telnyx::Internal::Type::BaseModel
|
|
307
|
+
OrHash =
|
|
308
|
+
T.type_alias do
|
|
309
|
+
T.any(
|
|
310
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Header::Example,
|
|
311
|
+
Telnyx::Internal::AnyHash
|
|
312
|
+
)
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Media handle for IMAGE, VIDEO, or DOCUMENT headers.
|
|
316
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
317
|
+
attr_reader :header_handle
|
|
318
|
+
|
|
319
|
+
sig { params(header_handle: T::Array[String]).void }
|
|
320
|
+
attr_writer :header_handle
|
|
321
|
+
|
|
322
|
+
# Sample values for text header variables.
|
|
323
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
324
|
+
attr_reader :header_text
|
|
325
|
+
|
|
326
|
+
sig { params(header_text: T::Array[String]).void }
|
|
327
|
+
attr_writer :header_text
|
|
328
|
+
|
|
329
|
+
# Sample values for header variables.
|
|
330
|
+
sig do
|
|
331
|
+
params(
|
|
332
|
+
header_handle: T::Array[String],
|
|
333
|
+
header_text: T::Array[String]
|
|
334
|
+
).returns(T.attached_class)
|
|
335
|
+
end
|
|
336
|
+
def self.new(
|
|
337
|
+
# Media handle for IMAGE, VIDEO, or DOCUMENT headers.
|
|
338
|
+
header_handle: nil,
|
|
339
|
+
# Sample values for text header variables.
|
|
340
|
+
header_text: nil
|
|
341
|
+
)
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
sig do
|
|
345
|
+
override.returns(
|
|
346
|
+
{
|
|
347
|
+
header_handle: T::Array[String],
|
|
348
|
+
header_text: T::Array[String]
|
|
349
|
+
}
|
|
350
|
+
)
|
|
351
|
+
end
|
|
352
|
+
def to_hash
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
class Body < Telnyx::Internal::Type::BaseModel
|
|
358
|
+
OrHash =
|
|
359
|
+
T.type_alias do
|
|
360
|
+
T.any(
|
|
361
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body,
|
|
362
|
+
Telnyx::Internal::AnyHash
|
|
363
|
+
)
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
sig { returns(Symbol) }
|
|
367
|
+
attr_accessor :type
|
|
368
|
+
|
|
369
|
+
# Sample values for body variables. Required when body text contains parameters.
|
|
370
|
+
sig do
|
|
371
|
+
returns(
|
|
372
|
+
T.nilable(
|
|
373
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body::Example
|
|
374
|
+
)
|
|
375
|
+
)
|
|
376
|
+
end
|
|
377
|
+
attr_reader :example
|
|
378
|
+
|
|
379
|
+
sig do
|
|
380
|
+
params(
|
|
381
|
+
example:
|
|
382
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body::Example::OrHash
|
|
383
|
+
).void
|
|
384
|
+
end
|
|
385
|
+
attr_writer :example
|
|
386
|
+
|
|
387
|
+
# Body text content. Use {{1}}, {{2}}, etc. for variable placeholders. Required
|
|
388
|
+
# for MARKETING and UTILITY templates. Optional for AUTHENTICATION templates where
|
|
389
|
+
# Meta provides the built-in OTP body.
|
|
390
|
+
sig { returns(T.nilable(String)) }
|
|
391
|
+
attr_reader :text
|
|
392
|
+
|
|
393
|
+
sig { params(text: String).void }
|
|
394
|
+
attr_writer :text
|
|
395
|
+
|
|
396
|
+
# The main text content of the message. Supports multiple variable parameters
|
|
397
|
+
# ({{1}}, {{2}}, etc.). Variables cannot be at the start or end. Maximum 1024
|
|
398
|
+
# characters.
|
|
399
|
+
sig do
|
|
400
|
+
params(
|
|
401
|
+
example:
|
|
402
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body::Example::OrHash,
|
|
403
|
+
text: String,
|
|
404
|
+
type: Symbol
|
|
405
|
+
).returns(T.attached_class)
|
|
406
|
+
end
|
|
407
|
+
def self.new(
|
|
408
|
+
# Sample values for body variables. Required when body text contains parameters.
|
|
409
|
+
example: nil,
|
|
410
|
+
# Body text content. Use {{1}}, {{2}}, etc. for variable placeholders. Required
|
|
411
|
+
# for MARKETING and UTILITY templates. Optional for AUTHENTICATION templates where
|
|
412
|
+
# Meta provides the built-in OTP body.
|
|
413
|
+
text: nil,
|
|
414
|
+
type: :BODY
|
|
415
|
+
)
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
sig do
|
|
419
|
+
override.returns(
|
|
420
|
+
{
|
|
421
|
+
type: Symbol,
|
|
422
|
+
example:
|
|
423
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body::Example,
|
|
424
|
+
text: String
|
|
425
|
+
}
|
|
426
|
+
)
|
|
427
|
+
end
|
|
428
|
+
def to_hash
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
class Example < Telnyx::Internal::Type::BaseModel
|
|
432
|
+
OrHash =
|
|
433
|
+
T.type_alias do
|
|
434
|
+
T.any(
|
|
435
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Body::Example,
|
|
436
|
+
Telnyx::Internal::AnyHash
|
|
437
|
+
)
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Array containing one array of sample values, one per variable in order.
|
|
441
|
+
sig { returns(T.nilable(T::Array[T::Array[String]])) }
|
|
442
|
+
attr_reader :body_text
|
|
443
|
+
|
|
444
|
+
sig { params(body_text: T::Array[T::Array[String]]).void }
|
|
445
|
+
attr_writer :body_text
|
|
446
|
+
|
|
447
|
+
# Sample values for body variables. Required when body text contains parameters.
|
|
448
|
+
sig do
|
|
449
|
+
params(body_text: T::Array[T::Array[String]]).returns(
|
|
450
|
+
T.attached_class
|
|
451
|
+
)
|
|
452
|
+
end
|
|
453
|
+
def self.new(
|
|
454
|
+
# Array containing one array of sample values, one per variable in order.
|
|
455
|
+
body_text: nil
|
|
456
|
+
)
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
sig do
|
|
460
|
+
override.returns({ body_text: T::Array[T::Array[String]] })
|
|
461
|
+
end
|
|
462
|
+
def to_hash
|
|
463
|
+
end
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
class Footer < Telnyx::Internal::Type::BaseModel
|
|
468
|
+
OrHash =
|
|
469
|
+
T.type_alias do
|
|
470
|
+
T.any(
|
|
471
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Footer,
|
|
472
|
+
Telnyx::Internal::AnyHash
|
|
473
|
+
)
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
sig { returns(Symbol) }
|
|
477
|
+
attr_accessor :type
|
|
478
|
+
|
|
479
|
+
# OTP code expiration time in minutes. Used in AUTHENTICATION template footers
|
|
480
|
+
# instead of free-form text.
|
|
481
|
+
sig { returns(T.nilable(Integer)) }
|
|
482
|
+
attr_reader :code_expiration_minutes
|
|
483
|
+
|
|
484
|
+
sig { params(code_expiration_minutes: Integer).void }
|
|
485
|
+
attr_writer :code_expiration_minutes
|
|
486
|
+
|
|
487
|
+
# Footer text. Maximum 60 characters. For non-authentication templates.
|
|
488
|
+
sig { returns(T.nilable(String)) }
|
|
489
|
+
attr_reader :text
|
|
490
|
+
|
|
491
|
+
sig { params(text: String).void }
|
|
492
|
+
attr_writer :text
|
|
493
|
+
|
|
494
|
+
# Optional footer displayed at the bottom of the message. Does not support
|
|
495
|
+
# variables.
|
|
496
|
+
sig do
|
|
497
|
+
params(
|
|
498
|
+
code_expiration_minutes: Integer,
|
|
499
|
+
text: String,
|
|
500
|
+
type: Symbol
|
|
501
|
+
).returns(T.attached_class)
|
|
502
|
+
end
|
|
503
|
+
def self.new(
|
|
504
|
+
# OTP code expiration time in minutes. Used in AUTHENTICATION template footers
|
|
505
|
+
# instead of free-form text.
|
|
506
|
+
code_expiration_minutes: nil,
|
|
507
|
+
# Footer text. Maximum 60 characters. For non-authentication templates.
|
|
508
|
+
text: nil,
|
|
509
|
+
type: :FOOTER
|
|
510
|
+
)
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
sig do
|
|
514
|
+
override.returns(
|
|
515
|
+
{ type: Symbol, code_expiration_minutes: Integer, text: String }
|
|
516
|
+
)
|
|
517
|
+
end
|
|
518
|
+
def to_hash
|
|
519
|
+
end
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
class Buttons < Telnyx::Internal::Type::BaseModel
|
|
523
|
+
OrHash =
|
|
524
|
+
T.type_alias do
|
|
525
|
+
T.any(
|
|
526
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons,
|
|
527
|
+
Telnyx::Internal::AnyHash
|
|
528
|
+
)
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
# Array of button objects. Meta supports various combinations of button types.
|
|
532
|
+
sig do
|
|
533
|
+
returns(
|
|
534
|
+
T::Array[
|
|
535
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button
|
|
536
|
+
]
|
|
537
|
+
)
|
|
538
|
+
end
|
|
539
|
+
attr_accessor :buttons
|
|
540
|
+
|
|
541
|
+
sig { returns(Symbol) }
|
|
542
|
+
attr_accessor :type
|
|
543
|
+
|
|
544
|
+
# Optional interactive buttons. Maximum 3 buttons per template.
|
|
545
|
+
sig do
|
|
546
|
+
params(
|
|
547
|
+
buttons:
|
|
548
|
+
T::Array[
|
|
549
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OrHash
|
|
550
|
+
],
|
|
551
|
+
type: Symbol
|
|
552
|
+
).returns(T.attached_class)
|
|
553
|
+
end
|
|
554
|
+
def self.new(
|
|
555
|
+
# Array of button objects. Meta supports various combinations of button types.
|
|
556
|
+
buttons:,
|
|
557
|
+
type: :BUTTONS
|
|
558
|
+
)
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
sig do
|
|
562
|
+
override.returns(
|
|
563
|
+
{
|
|
564
|
+
buttons:
|
|
565
|
+
T::Array[
|
|
566
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button
|
|
567
|
+
],
|
|
568
|
+
type: Symbol
|
|
569
|
+
}
|
|
570
|
+
)
|
|
571
|
+
end
|
|
572
|
+
def to_hash
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
class Button < Telnyx::Internal::Type::BaseModel
|
|
576
|
+
OrHash =
|
|
577
|
+
T.type_alias do
|
|
578
|
+
T.any(
|
|
579
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button,
|
|
580
|
+
Telnyx::Internal::AnyHash
|
|
581
|
+
)
|
|
582
|
+
end
|
|
583
|
+
|
|
584
|
+
sig do
|
|
585
|
+
returns(
|
|
586
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::OrSymbol
|
|
587
|
+
)
|
|
588
|
+
end
|
|
589
|
+
attr_accessor :type
|
|
590
|
+
|
|
591
|
+
# Custom autofill button text for ONE_TAP OTP buttons.
|
|
592
|
+
sig { returns(T.nilable(String)) }
|
|
593
|
+
attr_reader :autofill_text
|
|
594
|
+
|
|
595
|
+
sig { params(autofill_text: String).void }
|
|
596
|
+
attr_writer :autofill_text
|
|
597
|
+
|
|
598
|
+
# Sample values for URL variable.
|
|
599
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
600
|
+
attr_reader :example
|
|
601
|
+
|
|
602
|
+
sig { params(example: T::Array[String]).void }
|
|
603
|
+
attr_writer :example
|
|
604
|
+
|
|
605
|
+
# Flow action type for FLOW-type buttons.
|
|
606
|
+
sig do
|
|
607
|
+
returns(
|
|
608
|
+
T.nilable(
|
|
609
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction::OrSymbol
|
|
610
|
+
)
|
|
611
|
+
)
|
|
612
|
+
end
|
|
613
|
+
attr_reader :flow_action
|
|
614
|
+
|
|
615
|
+
sig do
|
|
616
|
+
params(
|
|
617
|
+
flow_action:
|
|
618
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction::OrSymbol
|
|
619
|
+
).void
|
|
620
|
+
end
|
|
621
|
+
attr_writer :flow_action
|
|
622
|
+
|
|
623
|
+
# Flow ID for FLOW-type buttons.
|
|
624
|
+
sig { returns(T.nilable(String)) }
|
|
625
|
+
attr_reader :flow_id
|
|
626
|
+
|
|
627
|
+
sig { params(flow_id: String).void }
|
|
628
|
+
attr_writer :flow_id
|
|
629
|
+
|
|
630
|
+
# Target screen name for FLOW buttons with navigate action.
|
|
631
|
+
sig { returns(T.nilable(String)) }
|
|
632
|
+
attr_reader :navigate_screen
|
|
633
|
+
|
|
634
|
+
sig { params(navigate_screen: String).void }
|
|
635
|
+
attr_writer :navigate_screen
|
|
636
|
+
|
|
637
|
+
sig do
|
|
638
|
+
returns(
|
|
639
|
+
T.nilable(
|
|
640
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType::OrSymbol
|
|
641
|
+
)
|
|
642
|
+
)
|
|
643
|
+
end
|
|
644
|
+
attr_reader :otp_type
|
|
645
|
+
|
|
646
|
+
sig do
|
|
647
|
+
params(
|
|
648
|
+
otp_type:
|
|
649
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType::OrSymbol
|
|
650
|
+
).void
|
|
651
|
+
end
|
|
652
|
+
attr_writer :otp_type
|
|
653
|
+
|
|
654
|
+
# Android package name. Required for ONE_TAP OTP buttons.
|
|
655
|
+
sig { returns(T.nilable(String)) }
|
|
656
|
+
attr_reader :package_name
|
|
657
|
+
|
|
658
|
+
sig { params(package_name: String).void }
|
|
659
|
+
attr_writer :package_name
|
|
660
|
+
|
|
661
|
+
# Phone number in E.164 format.
|
|
662
|
+
sig { returns(T.nilable(String)) }
|
|
663
|
+
attr_reader :phone_number
|
|
664
|
+
|
|
665
|
+
sig { params(phone_number: String).void }
|
|
666
|
+
attr_writer :phone_number
|
|
667
|
+
|
|
668
|
+
# Android app signing key hash. Required for ONE_TAP OTP buttons.
|
|
669
|
+
sig { returns(T.nilable(String)) }
|
|
670
|
+
attr_reader :signature_hash
|
|
671
|
+
|
|
672
|
+
sig { params(signature_hash: String).void }
|
|
673
|
+
attr_writer :signature_hash
|
|
674
|
+
|
|
675
|
+
# Button label text. Maximum 25 characters. Required for URL, PHONE_NUMBER, and
|
|
676
|
+
# QUICK_REPLY buttons. Not required for OTP buttons (Meta supplies the label).
|
|
677
|
+
sig { returns(T.nilable(String)) }
|
|
678
|
+
attr_reader :text
|
|
679
|
+
|
|
680
|
+
sig { params(text: String).void }
|
|
681
|
+
attr_writer :text
|
|
682
|
+
|
|
683
|
+
# URL for URL-type buttons. Supports one variable ({{1}}).
|
|
684
|
+
sig { returns(T.nilable(String)) }
|
|
685
|
+
attr_reader :url
|
|
686
|
+
|
|
687
|
+
sig { params(url: String).void }
|
|
688
|
+
attr_writer :url
|
|
689
|
+
|
|
690
|
+
# Whether zero-tap terms have been accepted.
|
|
691
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
692
|
+
attr_reader :zero_tap_terms_accepted
|
|
693
|
+
|
|
694
|
+
sig { params(zero_tap_terms_accepted: T::Boolean).void }
|
|
695
|
+
attr_writer :zero_tap_terms_accepted
|
|
696
|
+
|
|
697
|
+
sig do
|
|
698
|
+
params(
|
|
699
|
+
type:
|
|
700
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::OrSymbol,
|
|
701
|
+
autofill_text: String,
|
|
702
|
+
example: T::Array[String],
|
|
703
|
+
flow_action:
|
|
704
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction::OrSymbol,
|
|
705
|
+
flow_id: String,
|
|
706
|
+
navigate_screen: String,
|
|
707
|
+
otp_type:
|
|
708
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType::OrSymbol,
|
|
709
|
+
package_name: String,
|
|
710
|
+
phone_number: String,
|
|
711
|
+
signature_hash: String,
|
|
712
|
+
text: String,
|
|
713
|
+
url: String,
|
|
714
|
+
zero_tap_terms_accepted: T::Boolean
|
|
715
|
+
).returns(T.attached_class)
|
|
716
|
+
end
|
|
717
|
+
def self.new(
|
|
718
|
+
type:,
|
|
719
|
+
# Custom autofill button text for ONE_TAP OTP buttons.
|
|
720
|
+
autofill_text: nil,
|
|
721
|
+
# Sample values for URL variable.
|
|
722
|
+
example: nil,
|
|
723
|
+
# Flow action type for FLOW-type buttons.
|
|
724
|
+
flow_action: nil,
|
|
725
|
+
# Flow ID for FLOW-type buttons.
|
|
726
|
+
flow_id: nil,
|
|
727
|
+
# Target screen name for FLOW buttons with navigate action.
|
|
728
|
+
navigate_screen: nil,
|
|
729
|
+
otp_type: nil,
|
|
730
|
+
# Android package name. Required for ONE_TAP OTP buttons.
|
|
731
|
+
package_name: nil,
|
|
732
|
+
# Phone number in E.164 format.
|
|
733
|
+
phone_number: nil,
|
|
734
|
+
# Android app signing key hash. Required for ONE_TAP OTP buttons.
|
|
735
|
+
signature_hash: nil,
|
|
736
|
+
# Button label text. Maximum 25 characters. Required for URL, PHONE_NUMBER, and
|
|
737
|
+
# QUICK_REPLY buttons. Not required for OTP buttons (Meta supplies the label).
|
|
738
|
+
text: nil,
|
|
739
|
+
# URL for URL-type buttons. Supports one variable ({{1}}).
|
|
740
|
+
url: nil,
|
|
741
|
+
# Whether zero-tap terms have been accepted.
|
|
742
|
+
zero_tap_terms_accepted: nil
|
|
743
|
+
)
|
|
744
|
+
end
|
|
745
|
+
|
|
746
|
+
sig do
|
|
747
|
+
override.returns(
|
|
748
|
+
{
|
|
749
|
+
type:
|
|
750
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::OrSymbol,
|
|
751
|
+
autofill_text: String,
|
|
752
|
+
example: T::Array[String],
|
|
753
|
+
flow_action:
|
|
754
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction::OrSymbol,
|
|
755
|
+
flow_id: String,
|
|
756
|
+
navigate_screen: String,
|
|
757
|
+
otp_type:
|
|
758
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType::OrSymbol,
|
|
759
|
+
package_name: String,
|
|
760
|
+
phone_number: String,
|
|
761
|
+
signature_hash: String,
|
|
762
|
+
text: String,
|
|
763
|
+
url: String,
|
|
764
|
+
zero_tap_terms_accepted: T::Boolean
|
|
765
|
+
}
|
|
766
|
+
)
|
|
767
|
+
end
|
|
768
|
+
def to_hash
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
module Type
|
|
772
|
+
extend Telnyx::Internal::Type::Enum
|
|
773
|
+
|
|
774
|
+
TaggedSymbol =
|
|
775
|
+
T.type_alias do
|
|
776
|
+
T.all(
|
|
777
|
+
Symbol,
|
|
778
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type
|
|
779
|
+
)
|
|
780
|
+
end
|
|
781
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
782
|
+
|
|
783
|
+
URL =
|
|
784
|
+
T.let(
|
|
785
|
+
:URL,
|
|
786
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::TaggedSymbol
|
|
787
|
+
)
|
|
788
|
+
PHONE_NUMBER =
|
|
789
|
+
T.let(
|
|
790
|
+
:PHONE_NUMBER,
|
|
791
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::TaggedSymbol
|
|
792
|
+
)
|
|
793
|
+
QUICK_REPLY =
|
|
794
|
+
T.let(
|
|
795
|
+
:QUICK_REPLY,
|
|
796
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::TaggedSymbol
|
|
797
|
+
)
|
|
798
|
+
OTP =
|
|
799
|
+
T.let(
|
|
800
|
+
:OTP,
|
|
801
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::TaggedSymbol
|
|
802
|
+
)
|
|
803
|
+
COPY_CODE =
|
|
804
|
+
T.let(
|
|
805
|
+
:COPY_CODE,
|
|
806
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::TaggedSymbol
|
|
807
|
+
)
|
|
808
|
+
FLOW =
|
|
809
|
+
T.let(
|
|
810
|
+
:FLOW,
|
|
811
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::TaggedSymbol
|
|
812
|
+
)
|
|
813
|
+
|
|
814
|
+
sig do
|
|
815
|
+
override.returns(
|
|
816
|
+
T::Array[
|
|
817
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::Type::TaggedSymbol
|
|
818
|
+
]
|
|
819
|
+
)
|
|
820
|
+
end
|
|
821
|
+
def self.values
|
|
822
|
+
end
|
|
823
|
+
end
|
|
824
|
+
|
|
825
|
+
# Flow action type for FLOW-type buttons.
|
|
826
|
+
module FlowAction
|
|
827
|
+
extend Telnyx::Internal::Type::Enum
|
|
828
|
+
|
|
829
|
+
TaggedSymbol =
|
|
830
|
+
T.type_alias do
|
|
831
|
+
T.all(
|
|
832
|
+
Symbol,
|
|
833
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction
|
|
834
|
+
)
|
|
835
|
+
end
|
|
836
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
837
|
+
|
|
838
|
+
NAVIGATE =
|
|
839
|
+
T.let(
|
|
840
|
+
:navigate,
|
|
841
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction::TaggedSymbol
|
|
842
|
+
)
|
|
843
|
+
DATA_EXCHANGE =
|
|
844
|
+
T.let(
|
|
845
|
+
:data_exchange,
|
|
846
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction::TaggedSymbol
|
|
847
|
+
)
|
|
848
|
+
|
|
849
|
+
sig do
|
|
850
|
+
override.returns(
|
|
851
|
+
T::Array[
|
|
852
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::FlowAction::TaggedSymbol
|
|
853
|
+
]
|
|
854
|
+
)
|
|
855
|
+
end
|
|
856
|
+
def self.values
|
|
857
|
+
end
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
module OtpType
|
|
861
|
+
extend Telnyx::Internal::Type::Enum
|
|
862
|
+
|
|
863
|
+
TaggedSymbol =
|
|
864
|
+
T.type_alias do
|
|
865
|
+
T.all(
|
|
866
|
+
Symbol,
|
|
867
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType
|
|
868
|
+
)
|
|
869
|
+
end
|
|
870
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
871
|
+
|
|
872
|
+
COPY_CODE =
|
|
873
|
+
T.let(
|
|
874
|
+
:COPY_CODE,
|
|
875
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType::TaggedSymbol
|
|
876
|
+
)
|
|
877
|
+
ONE_TAP =
|
|
878
|
+
T.let(
|
|
879
|
+
:ONE_TAP,
|
|
880
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType::TaggedSymbol
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
sig do
|
|
884
|
+
override.returns(
|
|
885
|
+
T::Array[
|
|
886
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Buttons::Button::OtpType::TaggedSymbol
|
|
887
|
+
]
|
|
888
|
+
)
|
|
889
|
+
end
|
|
890
|
+
def self.values
|
|
891
|
+
end
|
|
892
|
+
end
|
|
893
|
+
end
|
|
894
|
+
end
|
|
895
|
+
|
|
896
|
+
class Carousel < Telnyx::Internal::Type::BaseModel
|
|
897
|
+
OrHash =
|
|
898
|
+
T.type_alias do
|
|
899
|
+
T.any(
|
|
900
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel,
|
|
901
|
+
Telnyx::Internal::AnyHash
|
|
902
|
+
)
|
|
903
|
+
end
|
|
904
|
+
|
|
905
|
+
# Array of card objects, each with its own components.
|
|
906
|
+
sig do
|
|
907
|
+
returns(
|
|
908
|
+
T::Array[
|
|
909
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel::Card
|
|
910
|
+
]
|
|
911
|
+
)
|
|
912
|
+
end
|
|
913
|
+
attr_accessor :cards
|
|
914
|
+
|
|
915
|
+
sig { returns(Symbol) }
|
|
916
|
+
attr_accessor :type
|
|
917
|
+
|
|
918
|
+
# Carousel component for multi-card templates. Each card can contain its own
|
|
919
|
+
# header, body, and buttons.
|
|
920
|
+
sig do
|
|
921
|
+
params(
|
|
922
|
+
cards:
|
|
923
|
+
T::Array[
|
|
924
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel::Card::OrHash
|
|
925
|
+
],
|
|
926
|
+
type: Symbol
|
|
927
|
+
).returns(T.attached_class)
|
|
928
|
+
end
|
|
929
|
+
def self.new(
|
|
930
|
+
# Array of card objects, each with its own components.
|
|
931
|
+
cards:,
|
|
932
|
+
type: :CAROUSEL
|
|
933
|
+
)
|
|
934
|
+
end
|
|
935
|
+
|
|
936
|
+
sig do
|
|
937
|
+
override.returns(
|
|
938
|
+
{
|
|
939
|
+
cards:
|
|
940
|
+
T::Array[
|
|
941
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel::Card
|
|
942
|
+
],
|
|
943
|
+
type: Symbol
|
|
944
|
+
}
|
|
945
|
+
)
|
|
946
|
+
end
|
|
947
|
+
def to_hash
|
|
948
|
+
end
|
|
949
|
+
|
|
950
|
+
class Card < Telnyx::Internal::Type::BaseModel
|
|
951
|
+
OrHash =
|
|
952
|
+
T.type_alias do
|
|
953
|
+
T.any(
|
|
954
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Carousel::Card,
|
|
955
|
+
Telnyx::Internal::AnyHash
|
|
956
|
+
)
|
|
957
|
+
end
|
|
958
|
+
|
|
959
|
+
sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) }
|
|
960
|
+
attr_reader :components
|
|
961
|
+
|
|
962
|
+
sig do
|
|
963
|
+
params(components: T::Array[T::Hash[Symbol, T.anything]]).void
|
|
964
|
+
end
|
|
965
|
+
attr_writer :components
|
|
966
|
+
|
|
967
|
+
sig do
|
|
968
|
+
params(
|
|
969
|
+
components: T::Array[T::Hash[Symbol, T.anything]]
|
|
970
|
+
).returns(T.attached_class)
|
|
971
|
+
end
|
|
972
|
+
def self.new(components: nil)
|
|
973
|
+
end
|
|
974
|
+
|
|
975
|
+
sig do
|
|
976
|
+
override.returns(
|
|
977
|
+
{ components: T::Array[T::Hash[Symbol, T.anything]] }
|
|
978
|
+
)
|
|
979
|
+
end
|
|
980
|
+
def to_hash
|
|
981
|
+
end
|
|
982
|
+
end
|
|
983
|
+
end
|
|
984
|
+
|
|
985
|
+
sig do
|
|
986
|
+
override.returns(
|
|
987
|
+
T::Array[
|
|
988
|
+
Telnyx::Whatsapp::TemplateCreateParams::Component::Variants
|
|
989
|
+
]
|
|
990
|
+
)
|
|
991
|
+
end
|
|
992
|
+
def self.variants
|
|
993
|
+
end
|
|
994
|
+
end
|
|
107
995
|
end
|
|
108
996
|
end
|
|
109
997
|
end
|