Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion examples/TemplateUpdateExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ public static void Run()
config.Username = "YOUR_API_KEY";
// config.AccessToken = "YOUR_ACCESS_TOKEN";

var formFields1 = new SubUpdateFormField(
apiId: "uniqueIdHere_1",
name: "New name 1"
);

var formFields2 = new SubUpdateFormField(
apiId: "uniqueIdHere_2",
name: "New name 2"
);

var formFields = new List<SubUpdateFormField>
{
formFields1,
formFields2,
};

var templateUpdateRequest = new TemplateUpdateRequest(
allowFormView: false,
title: "Test Title",
Expand All @@ -25,7 +41,8 @@ public static void Run()
ccRoles: [
"CC Role 1",
"CC Role 2",
]
],
formFields: formFields
);

try
Expand Down
14 changes: 14 additions & 0 deletions examples/TemplateUpdateExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ public static void main(String[] args)
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");

var formFields1 = new SubUpdateFormField();
formFields1.apiId("uniqueIdHere_1");
formFields1.name("New name 1");

var formFields2 = new SubUpdateFormField();
formFields2.apiId("uniqueIdHere_2");
formFields2.name("New name 2");

var formFields = new ArrayList<SubUpdateFormField>(List.of (
formFields1,
formFields2
));

var templateUpdateRequest = new TemplateUpdateRequest();
templateUpdateRequest.allowFormView(false);
templateUpdateRequest.title("Test Title");
Expand All @@ -32,6 +45,7 @@ public static void main(String[] args)
"CC Role 1",
"CC Role 2"
));
templateUpdateRequest.formFields(formFields);

try
{
Expand Down
16 changes: 15 additions & 1 deletion examples/TemplateUpdateExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
$config->setUsername("YOUR_API_KEY");
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$form_fields_1 = (new Dropbox\Sign\Model\SubUpdateFormField())
->setApiId("uniqueIdHere_1")
->setName("New name 1");

$form_fields_2 = (new Dropbox\Sign\Model\SubUpdateFormField())
->setApiId("uniqueIdHere_2")
->setName("New name 2");

$form_fields = [
$form_fields_1,
$form_fields_2,
];

$template_update_request = (new Dropbox\Sign\Model\TemplateUpdateRequest())
->setAllowFormView(false)
->setTitle("Test Title")
Expand All @@ -19,7 +32,8 @@
->setCcRoles([
"CC Role 1",
"CC Role 2",
]);
])
->setFormFields($form_fields);

try {
$response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateUpdate(
Expand Down
16 changes: 16 additions & 0 deletions examples/TemplateUpdateExample.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@
)

with ApiClient(configuration) as api_client:
form_fields_1 = models.SubUpdateFormField(
api_id="uniqueIdHere_1",
name="New name 1",
)

form_fields_2 = models.SubUpdateFormField(
api_id="uniqueIdHere_2",
name="New name 2",
)

form_fields = [
form_fields_1,
form_fields_2,
]

template_update_request = models.TemplateUpdateRequest(
allow_form_view=False,
title="Test Title",
Expand All @@ -19,6 +34,7 @@
"CC Role 1",
"CC Role 2",
],
form_fields=form_fields,
)

try:
Expand Down
14 changes: 14 additions & 0 deletions examples/TemplateUpdateExample.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
# config.access_token = "YOUR_ACCESS_TOKEN"
end

form_fields_1 = Dropbox::Sign::SubUpdateFormField.new
form_fields_1.api_id = "uniqueIdHere_1"
form_fields_1.name = "New name 1"

form_fields_2 = Dropbox::Sign::SubUpdateFormField.new
form_fields_2.api_id = "uniqueIdHere_2"
form_fields_2.name = "New name 2"

form_fields = [
form_fields_1,
form_fields_2,
]

template_update_request = Dropbox::Sign::TemplateUpdateRequest.new
template_update_request.allow_form_view = false
template_update_request.title = "Test Title"
Expand All @@ -15,6 +28,7 @@
"CC Role 1",
"CC Role 2",
]
template_update_request.form_fields = form_fields

begin
response = Dropbox::Sign::TemplateApi.new.template_update(
Expand Down
16 changes: 16 additions & 0 deletions examples/TemplateUpdateExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ const apiCaller = new api.TemplateApi();
apiCaller.username = "YOUR_API_KEY";
// apiCaller.accessToken = "YOUR_ACCESS_TOKEN";

const formFields1: models.SubUpdateFormField = {
apiId: "uniqueIdHere_1",
name: "New name 1",
};

const formFields2: models.SubUpdateFormField = {
apiId: "uniqueIdHere_2",
name: "New name 2",
};

const formFields = [
formFields1,
formFields2,
];

const templateUpdateRequest: models.TemplateUpdateRequest = {
allowFormView: false,
title: "Test Title",
Expand All @@ -15,6 +30,7 @@ const templateUpdateRequest: models.TemplateUpdateRequest = {
"CC Role 1",
"CC Role 2",
],
formFields: formFields,
};

apiCaller.templateUpdate(
Expand Down
12 changes: 11 additions & 1 deletion examples/json/TemplateUpdateRequest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,15 @@
"title": "Test Title",
"subject": "Test Subject",
"message": "Test Message",
"cc_roles": ["CC Role 1", "CC Role 2"]
"cc_roles": ["CC Role 1", "CC Role 2"],
"form_fields": [
{
"api_id": "uniqueIdHere_1",
"name": "New name 1"
},
{
"api_id": "uniqueIdHere_2",
"name": "New name 2"
}
]
}
16 changes: 16 additions & 0 deletions openapi-raw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9467,6 +9467,17 @@ components:
type: integer
default: 12
type: object
SubUpdateFormField:
required:
- api_id
properties:
api_id:
description: '_t__Sub::UpdateFormField::API_ID'
type: string
name:
description: '_t__Sub::UpdateFormField::NAME'
type: string
type: object
SubFormFieldsPerDocumentHyperlink:
description: '_t__Sub::FormFieldsPerDocument::DESCRIPTION_EXTENDS'
allOf:
Expand Down Expand Up @@ -10325,6 +10336,11 @@ components:
description: '_t__TemplateUpdate::MESSAGE'
type: string
maxLength: 5000
form_fields:
description: '_t__TemplateUpdate::FORM_FIELDS'
type: array
items:
$ref: '#/components/schemas/SubUpdateFormField'
type: object
TemplateUpdateFilesRequest:
properties:
Expand Down
20 changes: 18 additions & 2 deletions openapi-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7249,8 +7249,8 @@ paths:
post:
tags:
- Template
summary: 'Edit Template'
description: 'Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged.'
summary: 'Update Template'
description: 'Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged.'
operationId: templateUpdate
parameters:
-
Expand Down Expand Up @@ -9955,6 +9955,17 @@ components:
type: integer
default: 12
type: object
SubUpdateFormField:
required:
- api_id
properties:
api_id:
description: 'The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found'
type: string
name:
description: 'The new name of the field. If not passed the name will remain unchanged.'
type: string
type: object
SubFormFieldsPerDocumentHyperlink:
description: 'This class extends `SubFormFieldsPerDocumentBase`.'
allOf:
Expand Down Expand Up @@ -10962,6 +10973,11 @@ components:
description: 'The new default template email message.'
type: string
maxLength: 5000
form_fields:
description: 'A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field.'
type: array
items:
$ref: '#/components/schemas/SubUpdateFormField'
type: object
TemplateUpdateFilesRequest:
properties:
Expand Down
16 changes: 16 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9818,6 +9818,17 @@ components:
type: integer
default: 12
type: object
SubUpdateFormField:
required:
- api_id
properties:
api_id:
description: 'The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found'
type: string
name:
description: 'The new name of the field. If not passed the name will remain unchanged.'
type: string
type: object
SubFormFieldsPerDocumentHyperlink:
description: 'This class extends `SubFormFieldsPerDocumentBase`.'
allOf:
Expand Down Expand Up @@ -10825,6 +10836,11 @@ components:
description: 'The new default template email message.'
type: string
maxLength: 5000
form_fields:
description: 'A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field.'
type: array
items:
$ref: '#/components/schemas/SubUpdateFormField'
type: object
TemplateUpdateFilesRequest:
properties:
Expand Down
19 changes: 18 additions & 1 deletion sandbox/dotnet/src/Dropbox.SignSandbox/TemplateUpdateExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ public static void Run()
config.Username = "YOUR_API_KEY";
// config.AccessToken = "YOUR_ACCESS_TOKEN";

var formFields1 = new SubUpdateFormField(
apiId: "uniqueIdHere_1",
name: "New name 1"
);

var formFields2 = new SubUpdateFormField(
apiId: "uniqueIdHere_2",
name: "New name 2"
);

var formFields = new List<SubUpdateFormField>
{
formFields1,
formFields2,
};

var templateUpdateRequest = new TemplateUpdateRequest(
allowFormView: false,
title: "Test Title",
Expand All @@ -25,7 +41,8 @@ public static void Run()
ccRoles: [
"CC Role 1",
"CC Role 2",
]
],
formFields: formFields
);

try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ public static void main(String[] args)
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
// ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN");

var formFields1 = new SubUpdateFormField();
formFields1.apiId("uniqueIdHere_1");
formFields1.name("New name 1");

var formFields2 = new SubUpdateFormField();
formFields2.apiId("uniqueIdHere_2");
formFields2.name("New name 2");

var formFields = new ArrayList<SubUpdateFormField>(List.of (
formFields1,
formFields2
));

var templateUpdateRequest = new TemplateUpdateRequest();
templateUpdateRequest.allowFormView(false);
templateUpdateRequest.title("Test Title");
Expand All @@ -32,6 +45,7 @@ public static void main(String[] args)
"CC Role 1",
"CC Role 2"
));
templateUpdateRequest.formFields(formFields);

try
{
Expand Down
16 changes: 16 additions & 0 deletions sandbox/node/src/TemplateUpdateExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ const apiCaller = new api.TemplateApi();
apiCaller.username = "YOUR_API_KEY";
// apiCaller.accessToken = "YOUR_ACCESS_TOKEN";

const formFields1: models.SubUpdateFormField = {
apiId: "uniqueIdHere_1",
name: "New name 1",
};

const formFields2: models.SubUpdateFormField = {
apiId: "uniqueIdHere_2",
name: "New name 2",
};

const formFields = [
formFields1,
formFields2,
];

const templateUpdateRequest: models.TemplateUpdateRequest = {
allowFormView: false,
title: "Test Title",
Expand All @@ -15,6 +30,7 @@ const templateUpdateRequest: models.TemplateUpdateRequest = {
"CC Role 1",
"CC Role 2",
],
formFields: formFields,
};

apiCaller.templateUpdate(
Expand Down
Loading