-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathConfiguration.java
More file actions
222 lines (176 loc) · 5.54 KB
/
Configuration.java
File metadata and controls
222 lines (176 loc) · 5.54 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/*
* AvaTax Software Development Kit for Java (JRE)
*
* (c) 2004-2022 Avalara, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* IAMDS
*
* Platform IAMDS consists of services on top of which the Avalara Compliance Cloud platform is built. These services are foundational and provide functionality such as common organization, tenant and user management for the rest of the compliance platform.
*
* @author Sachin Baijal <sachin.baijal@avalara.com>
* @author Jonathan Wenger <jonathan.wenger@avalara.com>
* @copyright 2004-2022 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @version 2.4.33
* @link https://github.com/avadev/AvaTax-REST-V3-JRE-SDK
*/
package Avalara.SDK;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Configuration {
public Configuration() {
Timeout = 10000;
}
/**
* Official URL of AvaTax (QA)
*/
private static final String AVATAX_QA_URL = "https://superapi.qa.avalara.io";
/**
* Official URL of AvaTax (Sandbox)
*/
private static final String AVATAX_SANDBOX_URL = "https://api.sbx.avalara.com";
/**
* Official URL of AvaTax (Production)
*/
private static final String AVATAX_PRODUCTION_URL = "https://api.avalara.com";
/**
* Gets or sets the Username (HTTP basic authentication).
*/
private String Username;
public String getUsername() {
return Username;
}
public void setUsername(String username) {
Username = username;
}
/**
* Gets or sets the password (HTTP basic authentication).
*/
private String Password;
public String getPassword() {
return Password;
}
public void setPassword(String password) {
Password = password;
}
/**
* Gets or sets the access token (OAuth 2.0).
*/
private String BearerToken;
public String getBearerToken() {
return BearerToken;
}
public void setBearerToken(String bearerToken) {
BearerToken = bearerToken;
}
/**
* Gets or sets the AvaTax Environment the API is targeting.
*/
private AvaTaxEnvironment Environment;
public AvaTaxEnvironment getEnvironment() {
return Environment;
}
public void setEnvironment(AvaTaxEnvironment environment) {
Environment = environment;
}
/**
* Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds.
*/
private int Timeout;
public int getTimeout() {
return Timeout;
}
public void setTimeout(int timeout) {
Timeout = timeout;
}
/**
* Gets or sets the Application Name.
*/
private String AppName;
public String getAppName() {
return AppName;
}
public void setAppName(String appName) {
AppName = appName;
}
/**
* Gets or sets the Application Version.
*/
private String AppVersion;
public String getAppVersion() {
return AppVersion;
}
public void setAppVersion(String appVersion) {
AppVersion = appVersion;
}
/**
* Gets or sets the Machine Name.
*/
private String MachineName;
public String getMachineName() {
return MachineName;
}
public void setMachineName(String machineName) {
MachineName = machineName;
}
/**
* Gets or sets the Test Url. Used for local developer testing.
*/
private String TestBasePath;
public String getTestBasePath() {
return TestBasePath;
}
public void setTestBasePath(String testBasePath) {
TestBasePath = testBasePath;
}
/**
* Gets or sets the Token URL. Used for local developer testing for retrieving OAuth tokens.
*/
private String tokenUrl;
public String getTokenUrl() {
return tokenUrl;
}
public void setTokenUrl(String tokenUrl) {
this.tokenUrl = tokenUrl;
}
/**
* Gets or sets the Token URL. Used for local developer testing for retrieving OAuth tokens.
*/
private String deviceAuthorizationUrl;
public String getDeviceAuthorizationUrl() {
return deviceAuthorizationUrl;
}
public void setDeviceAuthorizationUrl(String deviceAuthorizationUrl) {
this.deviceAuthorizationUrl = deviceAuthorizationUrl;
}
/**
* Gets or sets the ClientId Used for OAuth2 Client Credentials flow.
*/
private String ClientId;
public String getClientId() {
return ClientId;
}
public void setClientId(String clientId) {
ClientId = clientId;
}
/**
* Gets the Base Path.
*/
public String getBasePath() {
switch (this.getEnvironment()) {
case Production:
return AVATAX_PRODUCTION_URL;
case Sandbox:
return AVATAX_SANDBOX_URL;
case QA:
return AVATAX_QA_URL;
case Test:
if (this.getTestBasePath() == null)
throw new NullPointerException("When Environment is set to 'Test', the Test URL is a required parameter.");
return this.getTestBasePath();
}
throw new Error("Environment does not match any base path.");
}
}