-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathFaxDraftCreateExample.java
More file actions
48 lines (41 loc) · 1.73 KB
/
Copy pathFaxDraftCreateExample.java
File metadata and controls
48 lines (41 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.dropbox.sign_sandbox;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.FaxApi;
import com.dropbox.sign.auth.HttpBasicAuth;
import com.dropbox.sign.model.FaxDraftCreateRequest;
import com.dropbox.sign.model.SubEditorPageOptions;
import java.util.List;
public class FaxDraftCreateExample
{
public static void main(String[] args)
{
var config = Configuration.getDefaultApiClient();
((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY");
var editorOptions = new SubEditorPageOptions();
editorOptions.forceUploadPage(false);
editorOptions.forceEditorPage(true);
editorOptions.forceReviewPage(true);
var faxDraftCreateRequest = new FaxDraftCreateRequest();
faxDraftCreateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a");
faxDraftCreateRequest.fileUrls(List.of(
"https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1"
));
faxDraftCreateRequest.recipients(List.of("+14155552671"));
faxDraftCreateRequest.editorOptions(editorOptions);
faxDraftCreateRequest.testMode(true);
try
{
var response = new FaxApi(config).faxDraftCreate(
faxDraftCreateRequest
);
System.out.println(response);
} catch (ApiException e) {
System.err.println("Exception when calling FaxApi#faxDraftCreate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}