@@ -32,12 +32,13 @@ def create_web_form_template(cls, args):
3232
3333 @classmethod
3434 def create_web_form_instance (cls , form_id , args ):
35+ #ds-snippet-start:WebForms1Step2
3536 api_client = ApiClient ()
3637 api_client .host = args ["base_path" ]
3738 api_client .set_default_header (header_name = "Authorization" , header_value = f"Bearer { args ['access_token' ]} " )
39+ #ds-snippet-end:WebForms1Step2
3840
39- webforms_api = FormInstanceManagementApi (api_client )
40-
41+ #ds-snippet-start:WebForms1Step4
4142 web_form_values = {
4243 "PhoneNumber" : "555-555-5555" ,
4344 "Yes" : ["Yes" ],
@@ -49,8 +50,12 @@ def create_web_form_instance(cls, form_id, args):
4950 form_values = web_form_values ,
5051 expiration_offset = 3600
5152 )
53+ #ds-snippet-end:WebForms1Step4
5254
55+ #ds-snippet-start:WebForms1Step5
56+ webforms_api = FormInstanceManagementApi (api_client )
5357 web_form = webforms_api .create_instance (args ["account_id" ], form_id , web_form_req_object )
58+ #ds-snippet-end:WebForms1Step5
5459
5560 return web_form
5661
@@ -60,8 +65,10 @@ def list_web_forms(cls, args):
6065 api_client .host = args ["base_path" ]
6166 api_client .set_default_header (header_name = "Authorization" , header_value = f"Bearer { args ['access_token' ]} " )
6267
68+ #ds-snippet-start:WebForms1Step3
6369 webforms_api = FormManagementApi (api_client )
6470 web_forms = webforms_api .list_forms (args ["account_id" ], search = args ["form_name" ])
71+ #ds-snippet-end:WebForms1Step3
6572
6673 return web_forms
6774
0 commit comments