Class: Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/message_send_whatsapp_params.rb

Defined Under Namespace

Modules: Type Classes: Contact, Interactive, Location, Reaction

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(emoji: nil, message_id: nil) ⇒ Object

Parameters:

  • emoji (String) (defaults to: nil)
  • message_id (String) (defaults to: nil)


52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 52

class WhatsappMessage < Telnyx::Internal::Type::BaseModel
  # @!attribute audio
  #
  #   @return [Telnyx::Models::WhatsappMedia, nil]
  optional :audio, -> { Telnyx::WhatsappMedia }

  # @!attribute biz_opaque_callback_data
  #   custom data to return with status update
  #
  #   @return [String, nil]
  optional :biz_opaque_callback_data, String

  # @!attribute contacts
  #
  #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact>, nil]
  optional :contacts,
           -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Contact] }

  # @!attribute document
  #
  #   @return [Telnyx::Models::WhatsappMedia, nil]
  optional :document, -> { Telnyx::WhatsappMedia }

  # @!attribute image
  #
  #   @return [Telnyx::Models::WhatsappMedia, nil]
  optional :image, -> { Telnyx::WhatsappMedia }

  # @!attribute interactive
  #
  #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive, nil]
  optional :interactive, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive }

  # @!attribute location
  #
  #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Location, nil]
  optional :location, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Location }

  # @!attribute reaction
  #
  #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Reaction, nil]
  optional :reaction, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Reaction }

  # @!attribute sticker
  #
  #   @return [Telnyx::Models::WhatsappMedia, nil]
  optional :sticker, -> { Telnyx::WhatsappMedia }

  # @!attribute type
  #
  #   @return [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Type, nil]
  optional :type, enum: -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Type }

  # @!attribute video
  #
  #   @return [Telnyx::Models::WhatsappMedia, nil]
  optional :video, -> { Telnyx::WhatsappMedia }

  # @!method initialize(audio: nil, biz_opaque_callback_data: nil, contacts: nil, document: nil, image: nil, interactive: nil, location: nil, reaction: nil, sticker: nil, type: nil, video: nil)
  #   @param audio [Telnyx::Models::WhatsappMedia]
  #
  #   @param biz_opaque_callback_data [String] custom data to return with status update
  #
  #   @param contacts [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact>]
  #
  #   @param document [Telnyx::Models::WhatsappMedia]
  #
  #   @param image [Telnyx::Models::WhatsappMedia]
  #
  #   @param interactive [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive]
  #
  #   @param location [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Location]
  #
  #   @param reaction [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Reaction]
  #
  #   @param sticker [Telnyx::Models::WhatsappMedia]
  #
  #   @param type [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Type]
  #
  #   @param video [Telnyx::Models::WhatsappMedia]

  class Contact < Telnyx::Internal::Type::BaseModel
    # @!attribute addresses
    #
    #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::Address>, nil]
    optional :addresses,
             -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Contact::Address] }

    # @!attribute birthday
    #
    #   @return [String, nil]
    optional :birthday, String

    # @!attribute emails
    #
    #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::Email>, nil]
    optional :emails,
             -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Contact::Email] }

    # @!attribute name
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute org
    #
    #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::Org, nil]
    optional :org, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Contact::Org }

    # @!attribute phones
    #
    #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::Phone>, nil]
    optional :phones,
             -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Contact::Phone] }

    # @!attribute urls
    #
    #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::URL>, nil]
    optional :urls,
             -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Contact::URL] }

    # @!method initialize(addresses: nil, birthday: nil, emails: nil, name: nil, org: nil, phones: nil, urls: nil)
    #   @param addresses [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::Address>]
    #   @param birthday [String]
    #   @param emails [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::Email>]
    #   @param name [String]
    #   @param org [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::Org]
    #   @param phones [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::Phone>]
    #   @param urls [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact::URL>]

    class Address < Telnyx::Internal::Type::BaseModel
      # @!attribute city
      #
      #   @return [String, nil]
      optional :city, String

      # @!attribute country
      #
      #   @return [String, nil]
      optional :country, String

      # @!attribute country_code
      #
      #   @return [String, nil]
      optional :country_code, String

      # @!attribute state
      #
      #   @return [String, nil]
      optional :state, String

      # @!attribute street
      #
      #   @return [String, nil]
      optional :street, String

      # @!attribute type
      #
      #   @return [String, nil]
      optional :type, String

      # @!attribute zip
      #
      #   @return [String, nil]
      optional :zip, String

      # @!method initialize(city: nil, country: nil, country_code: nil, state: nil, street: nil, type: nil, zip: nil)
      #   @param city [String]
      #   @param country [String]
      #   @param country_code [String]
      #   @param state [String]
      #   @param street [String]
      #   @param type [String]
      #   @param zip [String]
    end

    class Email < Telnyx::Internal::Type::BaseModel
      # @!attribute email
      #
      #   @return [String, nil]
      optional :email, String

      # @!attribute type
      #
      #   @return [String, nil]
      optional :type, String

      # @!method initialize(email: nil, type: nil)
      #   @param email [String]
      #   @param type [String]
    end

    # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact#org
    class Org < Telnyx::Internal::Type::BaseModel
      # @!attribute company
      #
      #   @return [String, nil]
      optional :company, String

      # @!attribute department
      #
      #   @return [String, nil]
      optional :department, String

      # @!attribute title
      #
      #   @return [String, nil]
      optional :title, String

      # @!method initialize(company: nil, department: nil, title: nil)
      #   @param company [String]
      #   @param department [String]
      #   @param title [String]
    end

    class Phone < Telnyx::Internal::Type::BaseModel
      # @!attribute phone
      #
      #   @return [String, nil]
      optional :phone, String

      # @!attribute type
      #
      #   @return [String, nil]
      optional :type, String

      # @!attribute wa_id
      #
      #   @return [String, nil]
      optional :wa_id, String

      # @!method initialize(phone: nil, type: nil, wa_id: nil)
      #   @param phone [String]
      #   @param type [String]
      #   @param wa_id [String]
    end

    class URL < Telnyx::Internal::Type::BaseModel
      # @!attribute type
      #
      #   @return [String, nil]
      optional :type, String

      # @!attribute url
      #
      #   @return [String, nil]
      optional :url, String

      # @!method initialize(type: nil, url: nil)
      #   @param type [String]
      #   @param url [String]
    end
  end

  # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage#interactive
  class Interactive < Telnyx::Internal::Type::BaseModel
    # @!attribute action
    #
    #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action, nil]
    optional :action, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action }

    # @!attribute body
    #
    #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Body, nil]
    optional :body, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Body }

    # @!attribute footer
    #
    #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Footer, nil]
    optional :footer, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Footer }

    # @!attribute header
    #
    #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Header, nil]
    optional :header, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Header }

    # @!attribute type
    #
    #   @return [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Type, nil]
    optional :type, enum: -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Type }

    # @!method initialize(action: nil, body: nil, footer: nil, header: nil, type: nil)
    #   @param action [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action]
    #   @param body [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Body]
    #   @param footer [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Footer]
    #   @param header [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Header]
    #   @param type [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Type]

    # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive#action
    class Action < Telnyx::Internal::Type::BaseModel
      # @!attribute button
      #
      #   @return [String, nil]
      optional :button, String

      # @!attribute buttons
      #
      #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button>, nil]
      optional :buttons,
               -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button] }

      # @!attribute cards
      #
      #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card>, nil]
      optional :cards,
               -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card] }

      # @!attribute catalog_id
      #
      #   @return [String, nil]
      optional :catalog_id, String

      # @!attribute mode
      #
      #   @return [String, nil]
      optional :mode, String

      # @!attribute name
      #
      #   @return [String, nil]
      optional :name, String

      # @!attribute parameters
      #
      #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Parameters, nil]
      optional :parameters,
               -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Parameters }

      # @!attribute product_retailer_id
      #
      #   @return [String, nil]
      optional :product_retailer_id, String

      # @!attribute sections
      #
      #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Section>, nil]
      optional :sections,
               -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Section] }

      # @!method initialize(button: nil, buttons: nil, cards: nil, catalog_id: nil, mode: nil, name: nil, parameters: nil, product_retailer_id: nil, sections: nil)
      #   @param button [String]
      #   @param buttons [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button>]
      #   @param cards [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card>]
      #   @param catalog_id [String]
      #   @param mode [String]
      #   @param name [String]
      #   @param parameters [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Parameters]
      #   @param product_retailer_id [String]
      #   @param sections [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Section>]

      class Button < Telnyx::Internal::Type::BaseModel
        # @!attribute reply
        #
        #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button::Reply, nil]
        optional :reply,
                 -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button::Reply }

        # @!attribute type
        #
        #   @return [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button::Type, nil]
        optional :type,
                 enum: -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button::Type }

        # @!method initialize(reply: nil, type: nil)
        #   @param reply [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button::Reply]
        #   @param type [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button::Type]

        # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button#reply
        class Reply < Telnyx::Internal::Type::BaseModel
          # @!attribute id
          #   unique identifier for each button, 256 character maximum
          #
          #   @return [String, nil]
          optional :id, String

          # @!attribute title
          #   button label, 20 character maximum
          #
          #   @return [String, nil]
          optional :title, String

          # @!method initialize(id: nil, title: nil)
          #   @param id [String] unique identifier for each button, 256 character maximum
          #
          #   @param title [String] button label, 20 character maximum
        end

        # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Button#type
        module Type
          extend Telnyx::Internal::Type::Enum

          REPLY = :reply

          # @!method self.values
          #   @return [Array<Symbol>]
        end
      end

      class Card < Telnyx::Internal::Type::BaseModel
        # @!attribute action
        #
        #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Action, nil]
        optional :action,
                 -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Action }

        # @!attribute body
        #
        #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Body, nil]
        optional :body, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Body }

        # @!attribute card_index
        #   unique index for each card (0-9)
        #
        #   @return [Integer, nil]
        optional :card_index, Integer

        # @!attribute header
        #
        #   @return [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Header, nil]
        optional :header,
                 -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Header }

        # @!attribute type
        #
        #   @return [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Type, nil]
        optional :type,
                 enum: -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Type }

        # @!method initialize(action: nil, body: nil, card_index: nil, header: nil, type: nil)
        #   @param action [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Action]
        #
        #   @param body [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Body]
        #
        #   @param card_index [Integer] unique index for each card (0-9)
        #
        #   @param header [Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Header]
        #
        #   @param type [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Type]

        # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card#action
        class Action < Telnyx::Internal::Type::BaseModel
          # @!attribute catalog_id
          #   the unique ID of the catalog
          #
          #   @return [String, nil]
          optional :catalog_id, String

          # @!attribute product_retailer_id
          #   the unique retailer ID of the product
          #
          #   @return [String, nil]
          optional :product_retailer_id, String

          # @!method initialize(catalog_id: nil, product_retailer_id: nil)
          #   @param catalog_id [String] the unique ID of the catalog
          #
          #   @param product_retailer_id [String] the unique retailer ID of the product
        end

        # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card#body
        class Body < Telnyx::Internal::Type::BaseModel
          # @!attribute text
          #   160 character maximum, up to 2 line breaks
          #
          #   @return [String, nil]
          optional :text, String

          # @!method initialize(text: nil)
          #   @param text [String] 160 character maximum, up to 2 line breaks
        end

        # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card#header
        class Header < Telnyx::Internal::Type::BaseModel
          # @!attribute image
          #
          #   @return [Telnyx::Models::WhatsappMedia, nil]
          optional :image, -> { Telnyx::WhatsappMedia }

          # @!attribute type
          #
          #   @return [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Header::Type, nil]
          optional :type,
                   enum: -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Header::Type }

          # @!attribute video
          #
          #   @return [Telnyx::Models::WhatsappMedia, nil]
          optional :video, -> { Telnyx::WhatsappMedia }

          # @!method initialize(image: nil, type: nil, video: nil)
          #   @param image [Telnyx::Models::WhatsappMedia]
          #   @param type [Symbol, Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Header::Type]
          #   @param video [Telnyx::Models::WhatsappMedia]

          # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card::Header#type
          module Type
            extend Telnyx::Internal::Type::Enum

            IMAGE = :image
            VIDEO = :video

            # @!method self.values
            #   @return [Array<Symbol>]
          end
        end

        # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Card#type
        module Type
          extend Telnyx::Internal::Type::Enum

          CTA_URL = :cta_url

          # @!method self.values
          #   @return [Array<Symbol>]
        end
      end

      # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action#parameters
      class Parameters < Telnyx::Internal::Type::BaseModel
        # @!attribute display_text
        #   button label text, 20 character maximum
        #
        #   @return [String, nil]
        optional :display_text, String

        # @!attribute url
        #   button URL to load when tapped by the user
        #
        #   @return [String, nil]
        optional :url, String

        # @!method initialize(display_text: nil, url: nil)
        #   @param display_text [String] button label text, 20 character maximum
        #
        #   @param url [String] button URL to load when tapped by the user
      end

      class Section < Telnyx::Internal::Type::BaseModel
        # @!attribute product_items
        #
        #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Section::ProductItem>, nil]
        optional :product_items,
                 -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Section::ProductItem] }

        # @!attribute rows
        #
        #   @return [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Section::Row>, nil]
        optional :rows,
                 -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Section::Row] }

        # @!attribute title
        #   section title, 24 character maximum
        #
        #   @return [String, nil]
        optional :title, String

        # @!method initialize(product_items: nil, rows: nil, title: nil)
        #   @param product_items [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Section::ProductItem>]
        #
        #   @param rows [Array<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive::Action::Section::Row>]
        #
        #   @param title [String] section title, 24 character maximum

        class ProductItem < Telnyx::Internal::Type::BaseModel
          # @!attribute product_retailer_id
          #
          #   @return [String, nil]
          optional :product_retailer_id, String

          # @!method initialize(product_retailer_id: nil)
          #   @param product_retailer_id [String]
        end

        class Row < Telnyx::Internal::Type::BaseModel
          # @!attribute id
          #   arbitrary string identifying the row, 200 character maximum
          #
          #   @return [String, nil]
          optional :id, String

          # @!attribute description
          #   row description, 72 character maximum
          #
          #   @return [String, nil]
          optional :description, String

          # @!attribute title
          #   row title, 24 character maximum
          #
          #   @return [String, nil]
          optional :title, String

          # @!method initialize(id: nil, description: nil, title: nil)
          #   @param id [String] arbitrary string identifying the row, 200 character maximum
          #
          #   @param description [String] row description, 72 character maximum
          #
          #   @param title [String] row title, 24 character maximum
        end
      end
    end

    # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive#body
    class Body < Telnyx::Internal::Type::BaseModel
      # @!attribute text
      #   body text, 1024 character maximum
      #
      #   @return [String, nil]
      optional :text, String

      # @!method initialize(text: nil)
      #   @param text [String] body text, 1024 character maximum
    end

    # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive#footer
    class Footer < Telnyx::Internal::Type::BaseModel
      # @!attribute text
      #   footer text, 60 character maximum
      #
      #   @return [String, nil]
      optional :text, String

      # @!method initialize(text: nil)
      #   @param text [String] footer text, 60 character maximum
    end

    # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive#header
    class Header < Telnyx::Internal::Type::BaseModel
      # @!attribute document
      #
      #   @return [Telnyx::Models::WhatsappMedia, nil]
      optional :document, -> { Telnyx::WhatsappMedia }

      # @!attribute image
      #
      #   @return [Telnyx::Models::WhatsappMedia, nil]
      optional :image, -> { Telnyx::WhatsappMedia }

      # @!attribute sub_text
      #
      #   @return [String, nil]
      optional :sub_text, String

      # @!attribute text
      #   header text, 60 character maximum
      #
      #   @return [String, nil]
      optional :text, String

      # @!attribute video
      #
      #   @return [Telnyx::Models::WhatsappMedia, nil]
      optional :video, -> { Telnyx::WhatsappMedia }

      # @!method initialize(document: nil, image: nil, sub_text: nil, text: nil, video: nil)
      #   @param document [Telnyx::Models::WhatsappMedia]
      #
      #   @param image [Telnyx::Models::WhatsappMedia]
      #
      #   @param sub_text [String]
      #
      #   @param text [String] header text, 60 character maximum
      #
      #   @param video [Telnyx::Models::WhatsappMedia]
    end

    # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive#type
    module Type
      extend Telnyx::Internal::Type::Enum

      CTA_URL = :cta_url
      LIST = :list
      CAROUSEL = :carousel
      BUTTON = :button
      LOCATION_REQUEST_MESSAGE = :location_request_message

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage#location
  class Location < Telnyx::Internal::Type::BaseModel
    # @!attribute address
    #
    #   @return [String, nil]
    optional :address, String

    # @!attribute latitude
    #
    #   @return [String, nil]
    optional :latitude, String

    # @!attribute longitude
    #
    #   @return [String, nil]
    optional :longitude, String

    # @!attribute name
    #
    #   @return [String, nil]
    optional :name, String

    # @!method initialize(address: nil, latitude: nil, longitude: nil, name: nil)
    #   @param address [String]
    #   @param latitude [String]
    #   @param longitude [String]
    #   @param name [String]
  end

  # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage#reaction
  class Reaction < Telnyx::Internal::Type::BaseModel
    # @!attribute emoji
    #
    #   @return [String, nil]
    optional :emoji, String

    # @!attribute message_id
    #
    #   @return [String, nil]
    optional :message_id, String

    # @!method initialize(emoji: nil, message_id: nil)
    #   @param emoji [String]
    #   @param message_id [String]
  end

  # @see Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage#type
  module Type
    extend Telnyx::Internal::Type::Enum

    AUDIO = :audio
    DOCUMENT = :document
    IMAGE = :image
    STICKER = :sticker
    VIDEO = :video
    INTERACTIVE = :interactive
    LOCATION = :location
    TEMPLATE = :template
    REACTION = :reaction
    CONTACTS = :contacts

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#audioTelnyx::Models::WhatsappMedia?



56
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 56

optional :audio, -> { Telnyx::WhatsappMedia }

#biz_opaque_callback_dataString?

custom data to return with status update

Returns:

  • (String, nil)


62
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 62

optional :biz_opaque_callback_data, String

#contactsArray<Telnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Contact>?



67
68
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 67

optional :contacts,
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessageSendWhatsappParams::WhatsappMessage::Contact] }

#documentTelnyx::Models::WhatsappMedia?



73
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 73

optional :document, -> { Telnyx::WhatsappMedia }

#imageTelnyx::Models::WhatsappMedia?



78
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 78

optional :image, -> { Telnyx::WhatsappMedia }

#interactiveTelnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Interactive?



83
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 83

optional :interactive, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Interactive }

#locationTelnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Location?



88
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 88

optional :location, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Location }

#reactionTelnyx::Models::MessageSendWhatsappParams::WhatsappMessage::Reaction?



93
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 93

optional :reaction, -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Reaction }

#stickerTelnyx::Models::WhatsappMedia?



98
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 98

optional :sticker, -> { Telnyx::WhatsappMedia }

#typeSymbol, ...



103
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 103

optional :type, enum: -> { Telnyx::MessageSendWhatsappParams::WhatsappMessage::Type }

#videoTelnyx::Models::WhatsappMedia?



108
# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 108

optional :video, -> { Telnyx::WhatsappMedia }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/message_send_whatsapp_params.rb', line 728