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