@@ -32,11 +32,15 @@ class AuthenticationActionType(object):
32
32
class CallToActionActionType (object ):
33
33
URL = "URL"
34
34
PHONE_NUMBER = "PHONE_NUMBER"
35
+ COPY_CODE = "COPY_CODE"
36
+ VOICE_CALL = "VOICE_CALL"
35
37
36
38
class CardActionType (object ):
37
39
URL = "URL"
38
40
PHONE_NUMBER = "PHONE_NUMBER"
39
41
QUICK_REPLY = "QUICK_REPLY"
42
+ COPY_CODE = "COPY_CODE"
43
+ VOICE_CALL = "VOICE_CALL"
40
44
41
45
class CarouselActionType (object ):
42
46
URL = "URL"
@@ -321,7 +325,7 @@ class CallToActionAction(object):
321
325
:ivar title:
322
326
:ivar url:
323
327
:ivar phone:
324
- :ivar id :
328
+ :ivar code :
325
329
"""
326
330
327
331
def __init__ (self , payload : Dict [str , Any ]):
@@ -332,15 +336,15 @@ def __init__(self, payload: Dict[str, Any]):
332
336
self .title : Optional [str ] = payload .get ("title" )
333
337
self .url : Optional [str ] = payload .get ("url" )
334
338
self .phone : Optional [str ] = payload .get ("phone" )
335
- self .id : Optional [str ] = payload .get ("id " )
339
+ self .code : Optional [str ] = payload .get ("code " )
336
340
337
341
def to_dict (self ):
338
342
return {
339
343
"type" : self .type ,
340
344
"title" : self .title ,
341
345
"url" : self .url ,
342
346
"phone" : self .phone ,
343
- "id " : self .id ,
347
+ "code " : self .code ,
344
348
}
345
349
346
350
class CardAction (object ):
@@ -350,6 +354,7 @@ class CardAction(object):
350
354
:ivar url:
351
355
:ivar phone:
352
356
:ivar id:
357
+ :ivar code:
353
358
"""
354
359
355
360
def __init__ (self , payload : Dict [str , Any ]):
@@ -359,6 +364,7 @@ def __init__(self, payload: Dict[str, Any]):
359
364
self .url : Optional [str ] = payload .get ("url" )
360
365
self .phone : Optional [str ] = payload .get ("phone" )
361
366
self .id : Optional [str ] = payload .get ("id" )
367
+ self .code : Optional [str ] = payload .get ("code" )
362
368
363
369
def to_dict (self ):
364
370
return {
@@ -367,6 +373,7 @@ def to_dict(self):
367
373
"url" : self .url ,
368
374
"phone" : self .phone ,
369
375
"id" : self .id ,
376
+ "code" : self .code ,
370
377
}
371
378
372
379
class CarouselAction (object ):
@@ -474,6 +481,76 @@ def to_dict(self):
474
481
"types" : self .types .to_dict (),
475
482
}
476
483
484
+ class FlowsPage (object ):
485
+ """
486
+ :ivar id:
487
+ :ivar next_page_id:
488
+ :ivar title:
489
+ :ivar subtitle:
490
+ :ivar layout:
491
+ """
492
+
493
+ def __init__ (self , payload : Dict [str , Any ]):
494
+
495
+ self .id : Optional [str ] = payload .get ("id" )
496
+ self .next_page_id : Optional [str ] = payload .get ("next_page_id" )
497
+ self .title : Optional [str ] = payload .get ("title" )
498
+ self .subtitle : Optional [str ] = payload .get ("subtitle" )
499
+ self .layout : Optional [List [ContentList .FlowsPageComponent ]] = payload .get (
500
+ "layout"
501
+ )
502
+
503
+ def to_dict (self ):
504
+ return {
505
+ "id" : self .id ,
506
+ "next_page_id" : self .next_page_id ,
507
+ "title" : self .title ,
508
+ "subtitle" : self .subtitle ,
509
+ "layout" : [layout .to_dict () for layout in self .layout ],
510
+ }
511
+
512
+ class FlowsPageComponent (object ):
513
+ """
514
+ :ivar label:
515
+ :ivar type:
516
+ :ivar text:
517
+ :ivar options:
518
+ """
519
+
520
+ def __init__ (self , payload : Dict [str , Any ]):
521
+
522
+ self .label : Optional [str ] = payload .get ("label" )
523
+ self .type : Optional [str ] = payload .get ("type" )
524
+ self .text : Optional [str ] = payload .get ("text" )
525
+ self .options : Optional [List [ContentList .FlowsPageComponentSelectItem ]] = (
526
+ payload .get ("options" )
527
+ )
528
+
529
+ def to_dict (self ):
530
+ return {
531
+ "label" : self .label ,
532
+ "type" : self .type ,
533
+ "text" : self .text ,
534
+ "options" : [options .to_dict () for options in self .options ],
535
+ }
536
+
537
+ class FlowsPageComponentSelectItem (object ):
538
+ """
539
+ :ivar id:
540
+ :ivar title:
541
+ """
542
+
543
+ def __init__ (self , payload : Dict [str , Any ]):
544
+
545
+ self .id : Optional [str ] = payload .get ("id" )
546
+ self .title : Optional [str ] = payload .get ("title" )
547
+
548
+ def to_dict (self ):
549
+ return {
550
+ "id" : self .id ,
551
+ "title" : self .title ,
552
+ }
553
+
477
554
class ListItem (object ):
478
555
"""
479
556
:ivar id:
@@ -606,6 +683,35 @@ def to_dict(self):
606
683
"dynamic_items" : self .dynamic_items ,
607
684
}
608
685
686
+ class TwilioFlows (object ):
687
+ """
688
+ :ivar body:
689
+ :ivar button_text:
690
+ :ivar subtitle:
691
+ :ivar media_url:
692
+ :ivar pages:
693
+ :ivar type:
694
+ """
695
+
696
+ def __init__ (self , payload : Dict [str , Any ]):
697
+
698
+ self .body : Optional [str ] = payload .get ("body" )
699
+ self .button_text : Optional [str ] = payload .get ("button_text" )
700
+ self .subtitle : Optional [str ] = payload .get ("subtitle" )
701
+ self .media_url : Optional [str ] = payload .get ("media_url" )
702
+ self .pages : Optional [List [ContentList .FlowsPage ]] = payload .get ("pages" )
703
+ self .type : Optional [str ] = payload .get ("type" )
704
+
705
+ def to_dict (self ):
706
+ return {
707
+ "body" : self .body ,
708
+ "button_text" : self .button_text ,
709
+ "subtitle" : self .subtitle ,
710
+ "media_url" : self .media_url ,
711
+ "pages" : [pages .to_dict () for pages in self .pages ],
712
+ "type" : self .type ,
713
+ }
714
+
609
715
class TwilioListPicker (object ):
610
716
"""
611
717
:ivar body:
@@ -707,6 +813,7 @@ class Types(object):
707
813
:ivar twilio_card:
708
814
:ivar twilio_catalog:
709
815
:ivar twilio_carousel:
816
+ :ivar twilio_flows:
710
817
:ivar whatsapp_card:
711
818
:ivar whatsapp_authentication:
712
819
"""
@@ -740,6 +847,9 @@ def __init__(self, payload: Dict[str, Any]):
740
847
self .twilio_carousel : Optional [ContentList .TwilioCarousel ] = payload .get (
741
848
"twilio_carousel"
742
849
)
850
+ self .twilio_flows : Optional [ContentList .TwilioFlows ] = payload .get (
851
+ "twilio_flows"
852
+ )
743
853
self .whatsapp_card : Optional [ContentList .WhatsappCard ] = payload .get (
744
854
"whatsapp_card"
745
855
)
@@ -758,6 +868,7 @@ def to_dict(self):
758
868
"twilio_card" : self .twilio_card .to_dict (),
759
869
"twilio_catalog" : self .twilio_catalog .to_dict (),
760
870
"twilio_carousel" : self .twilio_carousel .to_dict (),
871
+ "twilio_flows" : self .twilio_flows .to_dict (),
761
872
"whatsapp_card" : self .whatsapp_card .to_dict (),
762
873
"whatsapp_authentication" : self .whatsapp_authentication .to_dict (),
763
874
}
0 commit comments