Skip to content

Commit

Permalink
Update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Wenger committed Jan 16, 2025
1 parent 37b56b2 commit 8192000
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,30 +66,32 @@ import Avalara.SDK.model.EInvoicing.V1.*;
public class MandatesApiExample {

public static void main(String[] args) {
Configuration configuration = new Configuration();
configuration.setAppName("Test");
configuration.setAppVersion("1.0");
configuration.setMachineName("LocalBox");
configuration.setTimeout(5000);
configuration.setEnvironment(AvaTaxEnvironment.Sandbox);
// Configure OAuth2 access token for authorization
configuration.setBearerToken("YOUR ACCESS TOKEN");

ApiClient apiClient = new ApiClient(configuration);
Avalara.SDK.api.EInvoicing.V1.MandatesApi apiInstance = new MandatesApi(apiClient);
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/) .
MandatesApi.GetMandatesRequest request = apiInstance.getGetMandatesRequest();
request.setXAvalaraClient(xAvalaraClient);
try {
MandatesResponse result = apiInstance.getMandates(request);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AddressesApi#resolveAddressPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
Configuration configuration = new Configuration();
configuration.setAppName("Test");
configuration.setAppVersion("1.0");
configuration.setMachineName("LocalBox");
configuration.setTimeout(5000);
configuration.setEnvironment(AvaTaxEnvironment.Sandbox);
// Configure OAuth2 access token for authorization
configuration.setBearerToken("YOUR ACCESS TOKEN");

try {
ApiClient apiClient = new ApiClient(configuration);
Avalara.SDK.api.EInvoicing.V1.MandatesApi apiInstance = new MandatesApi(apiClient);
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/) .
MandatesApi.GetMandatesRequest request = apiInstance.getGetMandatesRequest();
request.setXAvalaraClient(xAvalaraClient);
MandatesResponse result = apiInstance.getMandates(request);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MandatesAPI#getMandates");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}

Expand Down

0 comments on commit 8192000

Please sign in to comment.