@@ -32,11 +32,15 @@ class AuthenticationActionType(object):
3232 class CallToActionActionType (object ):
3333 URL = "URL"
3434 PHONE_NUMBER = "PHONE_NUMBER"
35+ COPY_CODE = "COPY_CODE"
36+ VOICE_CALL = "VOICE_CALL"
3537
3638 class CardActionType (object ):
3739 URL = "URL"
3840 PHONE_NUMBER = "PHONE_NUMBER"
3941 QUICK_REPLY = "QUICK_REPLY"
42+ COPY_CODE = "COPY_CODE"
43+ VOICE_CALL = "VOICE_CALL"
4044
4145 class CarouselActionType (object ):
4246 URL = "URL"
@@ -321,7 +325,7 @@ class CallToActionAction(object):
321325 :ivar title:
322326 :ivar url:
323327 :ivar phone:
324- :ivar id :
328+ :ivar code :
325329 """
326330
327331 def __init__ (self , payload : Dict [str , Any ]):
@@ -332,15 +336,15 @@ def __init__(self, payload: Dict[str, Any]):
332336 self .title : Optional [str ] = payload .get ("title" )
333337 self .url : Optional [str ] = payload .get ("url" )
334338 self .phone : Optional [str ] = payload .get ("phone" )
335- self .id : Optional [str ] = payload .get ("id " )
339+ self .code : Optional [str ] = payload .get ("code " )
336340
337341 def to_dict (self ):
338342 return {
339343 "type" : self .type ,
340344 "title" : self .title ,
341345 "url" : self .url ,
342346 "phone" : self .phone ,
343- "id " : self .id ,
347+ "code " : self .code ,
344348 }
345349
346350 class CardAction (object ):
@@ -350,6 +354,7 @@ class CardAction(object):
350354 :ivar url:
351355 :ivar phone:
352356 :ivar id:
357+ :ivar code:
353358 """
354359
355360 def __init__ (self , payload : Dict [str , Any ]):
@@ -359,6 +364,7 @@ def __init__(self, payload: Dict[str, Any]):
359364 self .url : Optional [str ] = payload .get ("url" )
360365 self .phone : Optional [str ] = payload .get ("phone" )
361366 self .id : Optional [str ] = payload .get ("id" )
367+ self .code : Optional [str ] = payload .get ("code" )
362368
363369 def to_dict (self ):
364370 return {
@@ -367,6 +373,7 @@ def to_dict(self):
367373 "url" : self .url ,
368374 "phone" : self .phone ,
369375 "id" : self .id ,
376+ "code" : self .code ,
370377 }
371378
372379 class CarouselAction (object ):
@@ -474,6 +481,76 @@ def to_dict(self):
474481 "types" : self .types .to_dict (),
475482 }
476483
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+
477554 class ListItem (object ):
478555 """
479556 :ivar id:
@@ -606,6 +683,35 @@ def to_dict(self):
606683 "dynamic_items" : self .dynamic_items ,
607684 }
608685
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+
609715 class TwilioListPicker (object ):
610716 """
611717 :ivar body:
@@ -707,6 +813,7 @@ class Types(object):
707813 :ivar twilio_card:
708814 :ivar twilio_catalog:
709815 :ivar twilio_carousel:
816+ :ivar twilio_flows:
710817 :ivar whatsapp_card:
711818 :ivar whatsapp_authentication:
712819 """
@@ -740,6 +847,9 @@ def __init__(self, payload: Dict[str, Any]):
740847 self .twilio_carousel : Optional [ContentList .TwilioCarousel ] = payload .get (
741848 "twilio_carousel"
742849 )
850+ self .twilio_flows : Optional [ContentList .TwilioFlows ] = payload .get (
851+ "twilio_flows"
852+ )
743853 self .whatsapp_card : Optional [ContentList .WhatsappCard ] = payload .get (
744854 "whatsapp_card"
745855 )
@@ -758,6 +868,7 @@ def to_dict(self):
758868 "twilio_card" : self .twilio_card .to_dict (),
759869 "twilio_catalog" : self .twilio_catalog .to_dict (),
760870 "twilio_carousel" : self .twilio_carousel .to_dict (),
871+ "twilio_flows" : self .twilio_flows .to_dict (),
761872 "whatsapp_card" : self .whatsapp_card .to_dict (),
762873 "whatsapp_authentication" : self .whatsapp_authentication .to_dict (),
763874 }
0 commit comments