avatax 19.12.0 → 20.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/avatax.gemspec +0 -1
- data/lib/avatax/client/accounts.rb +269 -193
- data/lib/avatax/client/addresses.rb +60 -60
- data/lib/avatax/client/advancedrules.rb +81 -162
- data/lib/avatax/client/avafileforms.rb +93 -93
- data/lib/avatax/client/batches.rb +247 -188
- data/lib/avatax/client/certexpressinvites.rb +106 -106
- data/lib/avatax/client/certificates.rb +469 -469
- data/lib/avatax/client/companies.rb +400 -398
- data/lib/avatax/client/compliance.rb +18 -18
- data/lib/avatax/client/contacts.rb +124 -124
- data/lib/avatax/client/customers.rb +415 -415
- data/lib/avatax/client/datasources.rb +117 -117
- data/lib/avatax/client/definitions.rb +1039 -1007
- data/lib/avatax/client/distancethresholds.rb +140 -140
- data/lib/avatax/client/filingcalendars.rb +23 -508
- data/lib/avatax/client/filings.rb +29 -29
- data/lib/avatax/client/firmclientlinkages.rb +150 -150
- data/lib/avatax/client/free.rb +109 -109
- data/lib/avatax/client/fundingrequests.rb +58 -58
- data/lib/avatax/client/items.rb +480 -480
- data/lib/avatax/client/jurisdictionoverrides.rb +136 -136
- data/lib/avatax/client/locations.rb +163 -160
- data/lib/avatax/client/multidocument.rb +420 -340
- data/lib/avatax/client/nexus.rb +240 -225
- data/lib/avatax/client/notifications.rb +84 -84
- data/lib/avatax/client/provisioning.rb +55 -55
- data/lib/avatax/client/registrar.rb +228 -228
- data/lib/avatax/client/reports.rb +109 -109
- data/lib/avatax/client/settings.rb +174 -174
- data/lib/avatax/client/subscriptions.rb +71 -71
- data/lib/avatax/client/taxcodes.rb +138 -138
- data/lib/avatax/client/taxcontent.rb +142 -142
- data/lib/avatax/client/taxrules.rb +188 -188
- data/lib/avatax/client/transactions.rb +899 -854
- data/lib/avatax/client/upcs.rb +129 -129
- data/lib/avatax/client/users.rb +207 -207
- data/lib/avatax/client/utilities.rb +70 -70
- data/lib/avatax/connection.rb +3 -3
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +4 -25
@@ -1,30 +1,30 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Filings
|
4
|
-
|
5
|
-
|
6
|
-
# Retrieve a list of filed returns for the specified company in the year and month of a given filing period.
|
7
|
-
#
|
8
|
-
# ### Security Policies
|
9
|
-
#
|
10
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
11
|
-
# * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser, CompanyUser, AccountUser, CompanyAdmin, AccountAdmin.
|
12
|
-
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
13
|
-
# @param companyId [Integer] The ID of the company that owns these batches
|
14
|
-
# @param endPeriodMonth [Integer] The month of the period you are trying to retrieve
|
15
|
-
# @param endPeriodYear [Integer] The year of the period you are trying to retrieve
|
16
|
-
# @param frequency [String] The frequency of the return you are trying to retrieve (See FilingFrequencyId::* for a list of allowable values)
|
17
|
-
# @param status [String] The status of the return(s) you are trying to retrieve (See FilingStatusId::* for a list of allowable values)
|
18
|
-
# @param country [String] The country of the return(s) you are trying to retrieve
|
19
|
-
# @param region [String] The region of the return(s) you are trying to retrieve
|
20
|
-
# @param filingCalendarId [Integer] The filing calendar id of the return you are trying to retrieve
|
21
|
-
# @param taxformCode [String] The unique tax form code of the form.
|
22
|
-
# @return [FetchResult]
|
23
|
-
def get_filed_returns(companyId, options={})
|
24
|
-
path = "/api/v2/companies/#{companyId}/filings/returns/filed"
|
25
|
-
get(path, options)
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
29
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Filings
|
4
|
+
|
5
|
+
|
6
|
+
# Retrieve a list of filed returns for the specified company in the year and month of a given filing period.
|
7
|
+
#
|
8
|
+
# ### Security Policies
|
9
|
+
#
|
10
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
11
|
+
# * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser, CompanyUser, AccountUser, CompanyAdmin, AccountAdmin.
|
12
|
+
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
13
|
+
# @param companyId [Integer] The ID of the company that owns these batches
|
14
|
+
# @param endPeriodMonth [Integer] The month of the period you are trying to retrieve
|
15
|
+
# @param endPeriodYear [Integer] The year of the period you are trying to retrieve
|
16
|
+
# @param frequency [String] The frequency of the return you are trying to retrieve (See FilingFrequencyId::* for a list of allowable values)
|
17
|
+
# @param status [String] The status of the return(s) you are trying to retrieve (See FilingStatusId::* for a list of allowable values)
|
18
|
+
# @param country [String] The country of the return(s) you are trying to retrieve
|
19
|
+
# @param region [String] The region of the return(s) you are trying to retrieve
|
20
|
+
# @param filingCalendarId [Integer] The filing calendar id of the return you are trying to retrieve
|
21
|
+
# @param taxformCode [String] The unique tax form code of the form.
|
22
|
+
# @return [FetchResult]
|
23
|
+
def get_filed_returns(companyId, options={})
|
24
|
+
path = "/api/v2/companies/#{companyId}/filings/returns/filed"
|
25
|
+
get(path, options)
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
30
|
end
|
@@ -1,151 +1,151 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module FirmClientLinkages
|
4
|
-
|
5
|
-
|
6
|
-
# Approves linkage to a firm for a client account
|
7
|
-
#
|
8
|
-
# This API enables the account admin of a client account to approve linkage request by a firm.
|
9
|
-
#
|
10
|
-
# ### Security Policies
|
11
|
-
#
|
12
|
-
# * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
13
|
-
# @param id [Integer]
|
14
|
-
# @return [Object]
|
15
|
-
def approve_firm_client_linkage(id)
|
16
|
-
path = "/api/v2/firmclientlinkages/#{id}/approve"
|
17
|
-
post(path)
|
18
|
-
end
|
19
|
-
|
20
|
-
|
21
|
-
# Request a new FirmClient account and create an approved linkage to it
|
22
|
-
#
|
23
|
-
# This API is for use by Firms only.
|
24
|
-
#
|
25
|
-
# Avalara allows firms to manage returns for clients without the clients needing to use AvaTax service.
|
26
|
-
# Firms can create accounts of FirmClient for customers they are managing using this API.
|
27
|
-
#
|
28
|
-
# Calling this API creates an account with the specified product subscriptions, but without a new user for account.
|
29
|
-
# Account is then linked to the Firm so they can managed their returns.
|
30
|
-
# You should call this API when a customer does not have an AvaTax account and is to be managed only by the firm.
|
31
|
-
#
|
32
|
-
# The created account will be created in `Active` status but there will be no user or license key associated with account.
|
33
|
-
#
|
34
|
-
# ### Security Policies
|
35
|
-
#
|
36
|
-
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
|
37
|
-
# @param model [Object] Information about the account you wish to create.
|
38
|
-
# @return [Object]
|
39
|
-
def create_and_link_new_firm_client_account(model)
|
40
|
-
path = "/api/v2/firmclientlinkages/createandlinkclient"
|
41
|
-
post(path, model)
|
42
|
-
end
|
43
|
-
|
44
|
-
|
45
|
-
# Links a firm account with the client account
|
46
|
-
#
|
47
|
-
# This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
|
48
|
-
#
|
49
|
-
# ### Security Policies
|
50
|
-
#
|
51
|
-
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
52
|
-
# @param model [Object] FirmClientLinkageInputModel
|
53
|
-
# @return [Object]
|
54
|
-
def create_firm_client_linkage(model)
|
55
|
-
path = "/api/v2/firmclientlinkages"
|
56
|
-
post(path, model)
|
57
|
-
end
|
58
|
-
|
59
|
-
|
60
|
-
# Delete a linkage
|
61
|
-
#
|
62
|
-
# This API marks a linkage between a firm and client as deleted.
|
63
|
-
#
|
64
|
-
# ### Security Policies
|
65
|
-
#
|
66
|
-
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
67
|
-
# @param id [Integer]
|
68
|
-
# @return [ErrorDetail[]]
|
69
|
-
def delete_firm_client_linkage(id)
|
70
|
-
path = "/api/v2/firmclientlinkages/#{id}"
|
71
|
-
delete(path)
|
72
|
-
end
|
73
|
-
|
74
|
-
|
75
|
-
# Get linkage between a firm and client by id
|
76
|
-
#
|
77
|
-
# This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
|
78
|
-
#
|
79
|
-
# ### Security Policies
|
80
|
-
#
|
81
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
82
|
-
# @param id [Integer]
|
83
|
-
# @return [Object]
|
84
|
-
def get_firm_client_linkage(id)
|
85
|
-
path = "/api/v2/firmclientlinkages/#{id}"
|
86
|
-
get(path)
|
87
|
-
end
|
88
|
-
|
89
|
-
|
90
|
-
# List client linkages for a firm or client
|
91
|
-
#
|
92
|
-
# This API enables the firm or account users to request the associated linkages to the account.
|
93
|
-
#
|
94
|
-
# ### Security Policies
|
95
|
-
#
|
96
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
97
|
-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* firmAccountName, clientAccountName
|
98
|
-
# @return [FetchResult]
|
99
|
-
def list_firm_client_linkage(options={})
|
100
|
-
path = "/api/v2/firmclientlinkages"
|
101
|
-
get(path, options)
|
102
|
-
end
|
103
|
-
|
104
|
-
|
105
|
-
# Rejects linkage to a firm for a client account
|
106
|
-
#
|
107
|
-
# This API enables the account admin of a client account to reject linkage request by a firm.
|
108
|
-
#
|
109
|
-
# ### Security Policies
|
110
|
-
#
|
111
|
-
# * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
112
|
-
# @param id [Integer]
|
113
|
-
# @return [Object]
|
114
|
-
def reject_firm_client_linkage(id)
|
115
|
-
path = "/api/v2/firmclientlinkages/#{id}/reject"
|
116
|
-
post(path)
|
117
|
-
end
|
118
|
-
|
119
|
-
|
120
|
-
# Reset linkage status between a client and firm back to requested
|
121
|
-
#
|
122
|
-
# This API enables the firm admin of a client account to reset a previously created linkage request by a firm.
|
123
|
-
#
|
124
|
-
# ### Security Policies
|
125
|
-
#
|
126
|
-
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
127
|
-
# @param id [Integer]
|
128
|
-
# @return [Object]
|
129
|
-
def reset_firm_client_linkage(id)
|
130
|
-
path = "/api/v2/firmclientlinkages/#{id}/reset"
|
131
|
-
post(path)
|
132
|
-
end
|
133
|
-
|
134
|
-
|
135
|
-
# Revokes previously approved linkage to a firm for a client account
|
136
|
-
#
|
137
|
-
# This API enables the account admin of a client account to revoke a previously approved linkage request by a firm.
|
138
|
-
#
|
139
|
-
# ### Security Policies
|
140
|
-
#
|
141
|
-
# * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
142
|
-
# @param id [Integer]
|
143
|
-
# @return [Object]
|
144
|
-
def revoke_firm_client_linkage(id)
|
145
|
-
path = "/api/v2/firmclientlinkages/#{id}/revoke"
|
146
|
-
post(path)
|
147
|
-
end
|
148
|
-
|
149
|
-
end
|
150
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module FirmClientLinkages
|
4
|
+
|
5
|
+
|
6
|
+
# Approves linkage to a firm for a client account
|
7
|
+
#
|
8
|
+
# This API enables the account admin of a client account to approve linkage request by a firm.
|
9
|
+
#
|
10
|
+
# ### Security Policies
|
11
|
+
#
|
12
|
+
# * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
13
|
+
# @param id [Integer]
|
14
|
+
# @return [Object]
|
15
|
+
def approve_firm_client_linkage(id)
|
16
|
+
path = "/api/v2/firmclientlinkages/#{id}/approve"
|
17
|
+
post(path)
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
# Request a new FirmClient account and create an approved linkage to it
|
22
|
+
#
|
23
|
+
# This API is for use by Firms only.
|
24
|
+
#
|
25
|
+
# Avalara allows firms to manage returns for clients without the clients needing to use AvaTax service.
|
26
|
+
# Firms can create accounts of FirmClient for customers they are managing using this API.
|
27
|
+
#
|
28
|
+
# Calling this API creates an account with the specified product subscriptions, but without a new user for account.
|
29
|
+
# Account is then linked to the Firm so they can managed their returns.
|
30
|
+
# You should call this API when a customer does not have an AvaTax account and is to be managed only by the firm.
|
31
|
+
#
|
32
|
+
# The created account will be created in `Active` status but there will be no user or license key associated with account.
|
33
|
+
#
|
34
|
+
# ### Security Policies
|
35
|
+
#
|
36
|
+
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
|
37
|
+
# @param model [Object] Information about the account you wish to create.
|
38
|
+
# @return [Object]
|
39
|
+
def create_and_link_new_firm_client_account(model)
|
40
|
+
path = "/api/v2/firmclientlinkages/createandlinkclient"
|
41
|
+
post(path, model)
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
# Links a firm account with the client account
|
46
|
+
#
|
47
|
+
# This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
|
48
|
+
#
|
49
|
+
# ### Security Policies
|
50
|
+
#
|
51
|
+
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
52
|
+
# @param model [Object] FirmClientLinkageInputModel
|
53
|
+
# @return [Object]
|
54
|
+
def create_firm_client_linkage(model)
|
55
|
+
path = "/api/v2/firmclientlinkages"
|
56
|
+
post(path, model)
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
# Delete a linkage
|
61
|
+
#
|
62
|
+
# This API marks a linkage between a firm and client as deleted.
|
63
|
+
#
|
64
|
+
# ### Security Policies
|
65
|
+
#
|
66
|
+
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
67
|
+
# @param id [Integer]
|
68
|
+
# @return [ErrorDetail[]]
|
69
|
+
def delete_firm_client_linkage(id)
|
70
|
+
path = "/api/v2/firmclientlinkages/#{id}"
|
71
|
+
delete(path)
|
72
|
+
end
|
73
|
+
|
74
|
+
|
75
|
+
# Get linkage between a firm and client by id
|
76
|
+
#
|
77
|
+
# This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
|
78
|
+
#
|
79
|
+
# ### Security Policies
|
80
|
+
#
|
81
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
82
|
+
# @param id [Integer]
|
83
|
+
# @return [Object]
|
84
|
+
def get_firm_client_linkage(id)
|
85
|
+
path = "/api/v2/firmclientlinkages/#{id}"
|
86
|
+
get(path)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
# List client linkages for a firm or client
|
91
|
+
#
|
92
|
+
# This API enables the firm or account users to request the associated linkages to the account.
|
93
|
+
#
|
94
|
+
# ### Security Policies
|
95
|
+
#
|
96
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
97
|
+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* firmAccountName, clientAccountName
|
98
|
+
# @return [FetchResult]
|
99
|
+
def list_firm_client_linkage(options={})
|
100
|
+
path = "/api/v2/firmclientlinkages"
|
101
|
+
get(path, options)
|
102
|
+
end
|
103
|
+
|
104
|
+
|
105
|
+
# Rejects linkage to a firm for a client account
|
106
|
+
#
|
107
|
+
# This API enables the account admin of a client account to reject linkage request by a firm.
|
108
|
+
#
|
109
|
+
# ### Security Policies
|
110
|
+
#
|
111
|
+
# * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
112
|
+
# @param id [Integer]
|
113
|
+
# @return [Object]
|
114
|
+
def reject_firm_client_linkage(id)
|
115
|
+
path = "/api/v2/firmclientlinkages/#{id}/reject"
|
116
|
+
post(path)
|
117
|
+
end
|
118
|
+
|
119
|
+
|
120
|
+
# Reset linkage status between a client and firm back to requested
|
121
|
+
#
|
122
|
+
# This API enables the firm admin of a client account to reset a previously created linkage request by a firm.
|
123
|
+
#
|
124
|
+
# ### Security Policies
|
125
|
+
#
|
126
|
+
# * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
127
|
+
# @param id [Integer]
|
128
|
+
# @return [Object]
|
129
|
+
def reset_firm_client_linkage(id)
|
130
|
+
path = "/api/v2/firmclientlinkages/#{id}/reset"
|
131
|
+
post(path)
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
# Revokes previously approved linkage to a firm for a client account
|
136
|
+
#
|
137
|
+
# This API enables the account admin of a client account to revoke a previously approved linkage request by a firm.
|
138
|
+
#
|
139
|
+
# ### Security Policies
|
140
|
+
#
|
141
|
+
# * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
142
|
+
# @param id [Integer]
|
143
|
+
# @return [Object]
|
144
|
+
def revoke_firm_client_linkage(id)
|
145
|
+
path = "/api/v2/firmclientlinkages/#{id}/revoke"
|
146
|
+
post(path)
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
end
|
151
151
|
end
|
data/lib/avatax/client/free.rb
CHANGED
@@ -1,110 +1,110 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Free
|
4
|
-
|
5
|
-
|
6
|
-
# FREE API - Request a free trial of AvaTax
|
7
|
-
#
|
8
|
-
# Call this API to obtain a free AvaTax account.
|
9
|
-
#
|
10
|
-
# This API is free to use. No authentication credentials are required to call this API. You must read and
|
11
|
-
# accept [Avalara's terms and conditions](https://www1.avalara.com/us/en/legal/terms.html) for the account to be
|
12
|
-
# created.
|
13
|
-
#
|
14
|
-
# If all conditions are met, this API will grant a free trial version of AvaTax. For a list of functionality
|
15
|
-
# available in the free trial and its limitations, please see the [AvaTax Developer Website Free Trial page](https://developer.avalara.com/avatax/signup/).
|
16
|
-
#
|
17
|
-
# After your free trial concludes, you will still be able to use the [Free AvaTax API Suite](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Free/).
|
18
|
-
#
|
19
|
-
# ### Security Policies
|
20
|
-
#
|
21
|
-
# * This API may be called without providing authentication credentials.
|
22
|
-
# @param model [Object] Required information to provision a free trial account.
|
23
|
-
# @return [Object]
|
24
|
-
def request_free_trial(model)
|
25
|
-
path = "/api/v2/accounts/freetrials/request"
|
26
|
-
post(path, model)
|
27
|
-
end
|
28
|
-
|
29
|
-
|
30
|
-
# FREE API - Sales tax rates for a specified address
|
31
|
-
#
|
32
|
-
# # Free-To-Use
|
33
|
-
#
|
34
|
-
# The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
|
35
|
-
# Any customer can request a free AvaTax account and make use of the TaxRates API.
|
36
|
-
#
|
37
|
-
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
38
|
-
# response code 429 - `Too Many Requests`.
|
39
|
-
#
|
40
|
-
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
41
|
-
# location in the United States only.
|
42
|
-
#
|
43
|
-
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
44
|
-
# which supports features including, but not limited to:
|
45
|
-
#
|
46
|
-
# * Nexus declarations
|
47
|
-
# * Taxability based on product/service type
|
48
|
-
# * Sourcing rules affecting origin/destination states
|
49
|
-
# * Customers who are exempt from certain taxes
|
50
|
-
# * States that have dollar value thresholds for tax amounts
|
51
|
-
# * Refunds for products purchased on a different date
|
52
|
-
# * Detailed jurisdiction names and state assigned codes
|
53
|
-
# * And more!
|
54
|
-
#
|
55
|
-
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
56
|
-
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
57
|
-
# @param line1 [String] The street address of the location.
|
58
|
-
# @param line2 [String] The street address of the location.
|
59
|
-
# @param line3 [String] The street address of the location.
|
60
|
-
# @param city [String] The city name of the location.
|
61
|
-
# @param region [String] Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
|
62
|
-
# @param postalCode [String] The postal code of the location.
|
63
|
-
# @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
|
64
|
-
# @return [Object]
|
65
|
-
def tax_rates_by_address(options={})
|
66
|
-
path = "/api/v2/taxrates/byaddress"
|
67
|
-
get(path, options)
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
# FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
|
72
|
-
#
|
73
|
-
# # Free-To-Use
|
74
|
-
#
|
75
|
-
# This API is only available for a US postal codes.
|
76
|
-
#
|
77
|
-
# The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
|
78
|
-
# Any customer can request a free AvaTax account and make use of the TaxRates API.
|
79
|
-
#
|
80
|
-
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
81
|
-
# response code 429 - `Too Many Requests`.
|
82
|
-
#
|
83
|
-
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
84
|
-
# location in the United States only.
|
85
|
-
#
|
86
|
-
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
87
|
-
# which supports features including, but not limited to:
|
88
|
-
#
|
89
|
-
# * Nexus declarations
|
90
|
-
# * Taxability based on product/service type
|
91
|
-
# * Sourcing rules affecting origin/destination states
|
92
|
-
# * Customers who are exempt from certain taxes
|
93
|
-
# * States that have dollar value thresholds for tax amounts
|
94
|
-
# * Refunds for products purchased on a different date
|
95
|
-
# * Detailed jurisdiction names and state assigned codes
|
96
|
-
# * And more!
|
97
|
-
#
|
98
|
-
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
99
|
-
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
100
|
-
# @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
|
101
|
-
# @param postalCode [String] The postal code of the location.
|
102
|
-
# @return [Object]
|
103
|
-
def tax_rates_by_postal_code(options={})
|
104
|
-
path = "/api/v2/taxrates/bypostalcode"
|
105
|
-
get(path, options)
|
106
|
-
end
|
107
|
-
|
108
|
-
end
|
109
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Free
|
4
|
+
|
5
|
+
|
6
|
+
# FREE API - Request a free trial of AvaTax
|
7
|
+
#
|
8
|
+
# Call this API to obtain a free AvaTax account.
|
9
|
+
#
|
10
|
+
# This API is free to use. No authentication credentials are required to call this API. You must read and
|
11
|
+
# accept [Avalara's terms and conditions](https://www1.avalara.com/us/en/legal/terms.html) for the account to be
|
12
|
+
# created.
|
13
|
+
#
|
14
|
+
# If all conditions are met, this API will grant a free trial version of AvaTax. For a list of functionality
|
15
|
+
# available in the free trial and its limitations, please see the [AvaTax Developer Website Free Trial page](https://developer.avalara.com/avatax/signup/).
|
16
|
+
#
|
17
|
+
# After your free trial concludes, you will still be able to use the [Free AvaTax API Suite](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Free/).
|
18
|
+
#
|
19
|
+
# ### Security Policies
|
20
|
+
#
|
21
|
+
# * This API may be called without providing authentication credentials.
|
22
|
+
# @param model [Object] Required information to provision a free trial account.
|
23
|
+
# @return [Object]
|
24
|
+
def request_free_trial(model)
|
25
|
+
path = "/api/v2/accounts/freetrials/request"
|
26
|
+
post(path, model)
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
# FREE API - Sales tax rates for a specified address
|
31
|
+
#
|
32
|
+
# # Free-To-Use
|
33
|
+
#
|
34
|
+
# The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
|
35
|
+
# Any customer can request a free AvaTax account and make use of the TaxRates API.
|
36
|
+
#
|
37
|
+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
38
|
+
# response code 429 - `Too Many Requests`.
|
39
|
+
#
|
40
|
+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
41
|
+
# location in the United States only.
|
42
|
+
#
|
43
|
+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
44
|
+
# which supports features including, but not limited to:
|
45
|
+
#
|
46
|
+
# * Nexus declarations
|
47
|
+
# * Taxability based on product/service type
|
48
|
+
# * Sourcing rules affecting origin/destination states
|
49
|
+
# * Customers who are exempt from certain taxes
|
50
|
+
# * States that have dollar value thresholds for tax amounts
|
51
|
+
# * Refunds for products purchased on a different date
|
52
|
+
# * Detailed jurisdiction names and state assigned codes
|
53
|
+
# * And more!
|
54
|
+
#
|
55
|
+
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
56
|
+
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
57
|
+
# @param line1 [String] The street address of the location.
|
58
|
+
# @param line2 [String] The street address of the location.
|
59
|
+
# @param line3 [String] The street address of the location.
|
60
|
+
# @param city [String] The city name of the location.
|
61
|
+
# @param region [String] Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
|
62
|
+
# @param postalCode [String] The postal code of the location.
|
63
|
+
# @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
|
64
|
+
# @return [Object]
|
65
|
+
def tax_rates_by_address(options={})
|
66
|
+
path = "/api/v2/taxrates/byaddress"
|
67
|
+
get(path, options)
|
68
|
+
end
|
69
|
+
|
70
|
+
|
71
|
+
# FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
|
72
|
+
#
|
73
|
+
# # Free-To-Use
|
74
|
+
#
|
75
|
+
# This API is only available for a US postal codes.
|
76
|
+
#
|
77
|
+
# The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
|
78
|
+
# Any customer can request a free AvaTax account and make use of the TaxRates API.
|
79
|
+
#
|
80
|
+
# Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
|
81
|
+
# response code 429 - `Too Many Requests`.
|
82
|
+
#
|
83
|
+
# This API assumes that you are selling general tangible personal property at a retail point-of-sale
|
84
|
+
# location in the United States only.
|
85
|
+
#
|
86
|
+
# For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
|
87
|
+
# which supports features including, but not limited to:
|
88
|
+
#
|
89
|
+
# * Nexus declarations
|
90
|
+
# * Taxability based on product/service type
|
91
|
+
# * Sourcing rules affecting origin/destination states
|
92
|
+
# * Customers who are exempt from certain taxes
|
93
|
+
# * States that have dollar value thresholds for tax amounts
|
94
|
+
# * Refunds for products purchased on a different date
|
95
|
+
# * Detailed jurisdiction names and state assigned codes
|
96
|
+
# * And more!
|
97
|
+
#
|
98
|
+
# Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
|
99
|
+
# for information on how to upgrade to the full AvaTax CreateTransaction API.
|
100
|
+
# @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
|
101
|
+
# @param postalCode [String] The postal code of the location.
|
102
|
+
# @return [Object]
|
103
|
+
def tax_rates_by_postal_code(options={})
|
104
|
+
path = "/api/v2/taxrates/bypostalcode"
|
105
|
+
get(path, options)
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
end
|
110
110
|
end
|