Skip to content

Commit 6592fcb

Browse files
committed
adding codeDepot markers
1 parent 2a02486 commit 6592fcb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/Services/Examples/WebForms/CreateAndEmbedFormService.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public static function getForms(
5252
* @param string $templateId
5353
* @return void
5454
*/
55-
public static function addTemplateIdToForm(string $fileLocation, string $templateId): void
55+
#ds-snippet-start:WebForms1Step3
56+
public static function addTemplateIdToForm(string $fileLocation, string $templateId): void
5657
{
5758
$targetString = "template-id";
5859

@@ -64,6 +65,7 @@ public static function addTemplateIdToForm(string $fileLocation, string $templat
6465
echo "An error occurred: " . $ex->getMessage();
6566
}
6667
}
68+
#ds-snippet-end:WebForms1Step3
6769

6870
/**
6971
* @param FormInstanceManagementApi $formInstanceApi
@@ -72,12 +74,13 @@ public static function addTemplateIdToForm(string $fileLocation, string $templat
7274
* @return WebFormInstance
7375
* @throws ApiException
7476
*/
75-
public static function createInstance(
77+
public static function createInstance(
7678
FormInstanceManagementApi $formInstanceApi,
7779
string $accountId,
7880
string $formId
7981
): WebFormInstance
8082
{
83+
#ds-snippet-start:WebForms1Step4
8184
$formValues = new WebFormValues([
8285
["PhoneNumber" => "555-555-5555"],
8386
["Yes" => ["Yes"]],
@@ -90,8 +93,11 @@ public static function createInstance(
9093
'form_values' => $formValues,
9194
'expiration_offset' => 3600,
9295
]);
96+
#ds-snippet-end:WebForms1Step4
9397

98+
#ds-snippet-start:WebForms1Step5
9499
return $formInstanceApi->createInstance($accountId, $formId, $options);
100+
#ds-snippet-end:WebForms1Step5
95101
}
96102

97103
/**

src/Services/WebFormsApiClientService.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ public function __construct($args)
3232
# Construct your API headers
3333
# Exceptions will be caught by the calling function
3434

35+
#ds-snippet-start:WebFormsPHPStep2
3536
$config = new Configuration();
3637
$config->setHost('https://apps-d.docusign.com/api/webforms/v1.1');
3738
$config->addDefaultHeader('Authorization', 'Bearer ' . $args['ds_access_token']);
3839
$this->apiClient = new ApiClient($config);
40+
#ds-snippet-end:WebFormsPHPStep2
3941

4042
$this->routerService = new RouterService();
4143
}

0 commit comments

Comments
 (0)