Skip to content

Commit 8192000

Browse files
author
Jonathan Wenger
committed
Update readme.
1 parent 37b56b2 commit 8192000

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

README.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,32 @@ import Avalara.SDK.model.EInvoicing.V1.*;
6666
public class MandatesApiExample {
6767

6868
public static void main(String[] args) {
69-
Configuration configuration = new Configuration();
70-
configuration.setAppName("Test");
71-
configuration.setAppVersion("1.0");
72-
configuration.setMachineName("LocalBox");
73-
configuration.setTimeout(5000);
74-
configuration.setEnvironment(AvaTaxEnvironment.Sandbox);
75-
// Configure OAuth2 access token for authorization
76-
configuration.setBearerToken("YOUR ACCESS TOKEN");
77-
78-
ApiClient apiClient = new ApiClient(configuration);
79-
Avalara.SDK.api.EInvoicing.V1.MandatesApi apiInstance = new MandatesApi(apiClient);
80-
String xAvalaraClient = "Swagger UI; 22.7.0; Custom; 1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .
81-
MandatesApi.GetMandatesRequest request = apiInstance.getGetMandatesRequest();
82-
request.setXAvalaraClient(xAvalaraClient);
83-
try {
84-
MandatesResponse result = apiInstance.getMandates(request);
85-
System.out.println(result);
86-
} catch (ApiException e) {
87-
System.err.println("Exception when calling AddressesApi#resolveAddressPost");
88-
System.err.println("Status code: " + e.getCode());
89-
System.err.println("Reason: " + e.getResponseBody());
90-
System.err.println("Response headers: " + e.getResponseHeaders());
91-
e.printStackTrace();
92-
}
69+
Configuration configuration = new Configuration();
70+
configuration.setAppName("Test");
71+
configuration.setAppVersion("1.0");
72+
configuration.setMachineName("LocalBox");
73+
configuration.setTimeout(5000);
74+
configuration.setEnvironment(AvaTaxEnvironment.Sandbox);
75+
// Configure OAuth2 access token for authorization
76+
configuration.setBearerToken("YOUR ACCESS TOKEN");
77+
78+
try {
79+
ApiClient apiClient = new ApiClient(configuration);
80+
Avalara.SDK.api.EInvoicing.V1.MandatesApi apiInstance = new MandatesApi(apiClient);
81+
String xAvalaraClient = "Swagger UI; 22.7.0; Custom; 1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .
82+
MandatesApi.GetMandatesRequest request = apiInstance.getGetMandatesRequest();
83+
request.setXAvalaraClient(xAvalaraClient);
84+
MandatesResponse result = apiInstance.getMandates(request);
85+
System.out.println(result);
86+
} catch (ApiException e) {
87+
System.err.println("Exception when calling MandatesAPI#getMandates");
88+
System.err.println("Status code: " + e.getCode());
89+
System.err.println("Reason: " + e.getResponseBody());
90+
System.err.println("Response headers: " + e.getResponseHeaders());
91+
e.printStackTrace();
92+
} catch (Exception e) {
93+
e.printStackTrace();
94+
}
9395
}
9496
}
9597

0 commit comments

Comments
 (0)