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,72 +1,72 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Subscriptions
|
4
|
-
|
5
|
-
|
6
|
-
# Retrieve a single subscription
|
7
|
-
#
|
8
|
-
# Get the subscription object identified by this URL.
|
9
|
-
# A 'subscription' indicates a licensed subscription to a named Avalara service.
|
10
|
-
# To request or remove subscriptions, please contact Avalara sales or your customer account manager.
|
11
|
-
#
|
12
|
-
# ### Security Policies
|
13
|
-
#
|
14
|
-
# * 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.
|
15
|
-
# @param accountId [Integer] The ID of the account that owns this subscription
|
16
|
-
# @param id [Integer] The primary key of this subscription
|
17
|
-
# @return [Object]
|
18
|
-
def get_subscription(accountId, id)
|
19
|
-
path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
20
|
-
get(path)
|
21
|
-
end
|
22
|
-
|
23
|
-
|
24
|
-
# Retrieve subscriptions for this account
|
25
|
-
#
|
26
|
-
# List all subscription objects attached to this account.
|
27
|
-
# A 'subscription' indicates a licensed subscription to a named Avalara service.
|
28
|
-
# To request or remove subscriptions, please contact Avalara sales or your customer account manager.
|
29
|
-
#
|
30
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
31
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
32
|
-
#
|
33
|
-
# ### Security Policies
|
34
|
-
#
|
35
|
-
# * 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.
|
36
|
-
# @param accountId [Integer] The ID of the account that owns these subscriptions
|
37
|
-
# @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:* subscriptionDescription
|
38
|
-
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
39
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
40
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
41
|
-
# @return [FetchResult]
|
42
|
-
def list_subscriptions_by_account(accountId, options={})
|
43
|
-
path = "/api/v2/accounts/#{accountId}/subscriptions"
|
44
|
-
get(path, options)
|
45
|
-
end
|
46
|
-
|
47
|
-
|
48
|
-
# Retrieve all subscriptions
|
49
|
-
#
|
50
|
-
# Get multiple subscription objects across all accounts.
|
51
|
-
# A 'subscription' indicates a licensed subscription to a named Avalara service.
|
52
|
-
# To request or remove subscriptions, please contact Avalara sales or your customer account manager.
|
53
|
-
#
|
54
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
55
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
56
|
-
#
|
57
|
-
# ### Security Policies
|
58
|
-
#
|
59
|
-
# * 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.
|
60
|
-
# @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:* subscriptionDescription
|
61
|
-
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
62
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
63
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
64
|
-
# @return [FetchResult]
|
65
|
-
def query_subscriptions(options={})
|
66
|
-
path = "/api/v2/subscriptions"
|
67
|
-
get(path, options)
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
71
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Subscriptions
|
4
|
+
|
5
|
+
|
6
|
+
# Retrieve a single subscription
|
7
|
+
#
|
8
|
+
# Get the subscription object identified by this URL.
|
9
|
+
# A 'subscription' indicates a licensed subscription to a named Avalara service.
|
10
|
+
# To request or remove subscriptions, please contact Avalara sales or your customer account manager.
|
11
|
+
#
|
12
|
+
# ### Security Policies
|
13
|
+
#
|
14
|
+
# * 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.
|
15
|
+
# @param accountId [Integer] The ID of the account that owns this subscription
|
16
|
+
# @param id [Integer] The primary key of this subscription
|
17
|
+
# @return [Object]
|
18
|
+
def get_subscription(accountId, id)
|
19
|
+
path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
|
20
|
+
get(path)
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# Retrieve subscriptions for this account
|
25
|
+
#
|
26
|
+
# List all subscription objects attached to this account.
|
27
|
+
# A 'subscription' indicates a licensed subscription to a named Avalara service.
|
28
|
+
# To request or remove subscriptions, please contact Avalara sales or your customer account manager.
|
29
|
+
#
|
30
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
31
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
32
|
+
#
|
33
|
+
# ### Security Policies
|
34
|
+
#
|
35
|
+
# * 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.
|
36
|
+
# @param accountId [Integer] The ID of the account that owns these subscriptions
|
37
|
+
# @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:* subscriptionDescription
|
38
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
39
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
40
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
41
|
+
# @return [FetchResult]
|
42
|
+
def list_subscriptions_by_account(accountId, options={})
|
43
|
+
path = "/api/v2/accounts/#{accountId}/subscriptions"
|
44
|
+
get(path, options)
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
# Retrieve all subscriptions
|
49
|
+
#
|
50
|
+
# Get multiple subscription objects across all accounts.
|
51
|
+
# A 'subscription' indicates a licensed subscription to a named Avalara service.
|
52
|
+
# To request or remove subscriptions, please contact Avalara sales or your customer account manager.
|
53
|
+
#
|
54
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
55
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
56
|
+
#
|
57
|
+
# ### Security Policies
|
58
|
+
#
|
59
|
+
# * 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.
|
60
|
+
# @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:* subscriptionDescription
|
61
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
62
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
63
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
64
|
+
# @return [FetchResult]
|
65
|
+
def query_subscriptions(options={})
|
66
|
+
path = "/api/v2/subscriptions"
|
67
|
+
get(path, options)
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
end
|
72
72
|
end
|
@@ -1,139 +1,139 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module TaxCodes
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new tax code
|
7
|
-
#
|
8
|
-
# Create one or more new taxcode objects attached to this company.
|
9
|
-
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
10
|
-
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
11
|
-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
12
|
-
# taxability rules for this product in all supported jurisdictions.
|
13
|
-
#
|
14
|
-
# ### Security Policies
|
15
|
-
#
|
16
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
17
|
-
# @param companyId [Integer] The ID of the company that owns this tax code.
|
18
|
-
# @param model [TaxCodeModel[]] The tax code you wish to create.
|
19
|
-
# @return [TaxCodeModel[]]
|
20
|
-
def create_tax_codes(companyId, model)
|
21
|
-
path = "/api/v2/companies/#{companyId}/taxcodes"
|
22
|
-
post(path, model)
|
23
|
-
end
|
24
|
-
|
25
|
-
|
26
|
-
# Delete a single tax code
|
27
|
-
#
|
28
|
-
# Marks the existing TaxCode object at this URL as deleted.
|
29
|
-
#
|
30
|
-
# ### Security Policies
|
31
|
-
#
|
32
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
33
|
-
# @param companyId [Integer] The ID of the company that owns this tax code.
|
34
|
-
# @param id [Integer] The ID of the tax code you wish to delete.
|
35
|
-
# @return [ErrorDetail[]]
|
36
|
-
def delete_tax_code(companyId, id)
|
37
|
-
path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
38
|
-
delete(path)
|
39
|
-
end
|
40
|
-
|
41
|
-
|
42
|
-
# Retrieve a single tax code
|
43
|
-
#
|
44
|
-
# Get the taxcode object identified by this URL.
|
45
|
-
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
46
|
-
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
47
|
-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
48
|
-
# taxability rules for this product in all supported jurisdictions.
|
49
|
-
#
|
50
|
-
# ### Security Policies
|
51
|
-
#
|
52
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
53
|
-
# @param companyId [Integer] The ID of the company that owns this tax code
|
54
|
-
# @param id [Integer] The primary key of this tax code
|
55
|
-
# @return [Object]
|
56
|
-
def get_tax_code(companyId, id)
|
57
|
-
path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
58
|
-
get(path)
|
59
|
-
end
|
60
|
-
|
61
|
-
|
62
|
-
# Retrieve tax codes for this company
|
63
|
-
#
|
64
|
-
# List all taxcode objects attached to this company.
|
65
|
-
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
66
|
-
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
67
|
-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
68
|
-
# taxability rules for this product in all supported jurisdictions.
|
69
|
-
#
|
70
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
71
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
72
|
-
#
|
73
|
-
# ### Security Policies
|
74
|
-
#
|
75
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
76
|
-
# @param companyId [Integer] The ID of the company that owns these tax codes
|
77
|
-
# @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/).
|
78
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
79
|
-
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
80
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
81
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
82
|
-
# @return [FetchResult]
|
83
|
-
def list_tax_codes_by_company(companyId, options={})
|
84
|
-
path = "/api/v2/companies/#{companyId}/taxcodes"
|
85
|
-
get(path, options)
|
86
|
-
end
|
87
|
-
|
88
|
-
|
89
|
-
# Retrieve all tax codes
|
90
|
-
#
|
91
|
-
# Get multiple taxcode objects across all companies.
|
92
|
-
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
93
|
-
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
94
|
-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
95
|
-
# taxability rules for this product in all supported jurisdictions.
|
96
|
-
#
|
97
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
98
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
99
|
-
#
|
100
|
-
# ### Security Policies
|
101
|
-
#
|
102
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
103
|
-
# @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/).
|
104
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
105
|
-
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
106
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
107
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
108
|
-
# @return [FetchResult]
|
109
|
-
def query_tax_codes(options={})
|
110
|
-
path = "/api/v2/taxcodes"
|
111
|
-
get(path, options)
|
112
|
-
end
|
113
|
-
|
114
|
-
|
115
|
-
# Update a single tax code
|
116
|
-
#
|
117
|
-
# Replace the existing taxcode object at this URL with an updated object.
|
118
|
-
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
119
|
-
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
120
|
-
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
121
|
-
# taxability rules for this product in all supported jurisdictions.
|
122
|
-
# All data from the existing object will be replaced with data in the object you PUT.
|
123
|
-
# To set a field's value to null, you may either set its value to null or omit that field from the object you post.
|
124
|
-
#
|
125
|
-
# ### Security Policies
|
126
|
-
#
|
127
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
128
|
-
# @param companyId [Integer] The ID of the company that this tax code belongs to.
|
129
|
-
# @param id [Integer] The ID of the tax code you wish to update
|
130
|
-
# @param model [Object] The tax code you wish to update.
|
131
|
-
# @return [Object]
|
132
|
-
def update_tax_code(companyId, id, model)
|
133
|
-
path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
134
|
-
put(path, model)
|
135
|
-
end
|
136
|
-
|
137
|
-
end
|
138
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module TaxCodes
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new tax code
|
7
|
+
#
|
8
|
+
# Create one or more new taxcode objects attached to this company.
|
9
|
+
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
10
|
+
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
11
|
+
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
12
|
+
# taxability rules for this product in all supported jurisdictions.
|
13
|
+
#
|
14
|
+
# ### Security Policies
|
15
|
+
#
|
16
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
17
|
+
# @param companyId [Integer] The ID of the company that owns this tax code.
|
18
|
+
# @param model [TaxCodeModel[]] The tax code you wish to create.
|
19
|
+
# @return [TaxCodeModel[]]
|
20
|
+
def create_tax_codes(companyId, model)
|
21
|
+
path = "/api/v2/companies/#{companyId}/taxcodes"
|
22
|
+
post(path, model)
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
# Delete a single tax code
|
27
|
+
#
|
28
|
+
# Marks the existing TaxCode object at this URL as deleted.
|
29
|
+
#
|
30
|
+
# ### Security Policies
|
31
|
+
#
|
32
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
33
|
+
# @param companyId [Integer] The ID of the company that owns this tax code.
|
34
|
+
# @param id [Integer] The ID of the tax code you wish to delete.
|
35
|
+
# @return [ErrorDetail[]]
|
36
|
+
def delete_tax_code(companyId, id)
|
37
|
+
path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
38
|
+
delete(path)
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
# Retrieve a single tax code
|
43
|
+
#
|
44
|
+
# Get the taxcode object identified by this URL.
|
45
|
+
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
46
|
+
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
47
|
+
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
48
|
+
# taxability rules for this product in all supported jurisdictions.
|
49
|
+
#
|
50
|
+
# ### Security Policies
|
51
|
+
#
|
52
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
53
|
+
# @param companyId [Integer] The ID of the company that owns this tax code
|
54
|
+
# @param id [Integer] The primary key of this tax code
|
55
|
+
# @return [Object]
|
56
|
+
def get_tax_code(companyId, id)
|
57
|
+
path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
58
|
+
get(path)
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
# Retrieve tax codes for this company
|
63
|
+
#
|
64
|
+
# List all taxcode objects attached to this company.
|
65
|
+
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
66
|
+
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
67
|
+
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
68
|
+
# taxability rules for this product in all supported jurisdictions.
|
69
|
+
#
|
70
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
71
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
72
|
+
#
|
73
|
+
# ### Security Policies
|
74
|
+
#
|
75
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
76
|
+
# @param companyId [Integer] The ID of the company that owns these tax codes
|
77
|
+
# @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/).
|
78
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
79
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
80
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
81
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
82
|
+
# @return [FetchResult]
|
83
|
+
def list_tax_codes_by_company(companyId, options={})
|
84
|
+
path = "/api/v2/companies/#{companyId}/taxcodes"
|
85
|
+
get(path, options)
|
86
|
+
end
|
87
|
+
|
88
|
+
|
89
|
+
# Retrieve all tax codes
|
90
|
+
#
|
91
|
+
# Get multiple taxcode objects across all companies.
|
92
|
+
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
93
|
+
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
94
|
+
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
95
|
+
# taxability rules for this product in all supported jurisdictions.
|
96
|
+
#
|
97
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
98
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
99
|
+
#
|
100
|
+
# ### Security Policies
|
101
|
+
#
|
102
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
103
|
+
# @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/).
|
104
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
105
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
106
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
107
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
108
|
+
# @return [FetchResult]
|
109
|
+
def query_tax_codes(options={})
|
110
|
+
path = "/api/v2/taxcodes"
|
111
|
+
get(path, options)
|
112
|
+
end
|
113
|
+
|
114
|
+
|
115
|
+
# Update a single tax code
|
116
|
+
#
|
117
|
+
# Replace the existing taxcode object at this URL with an updated object.
|
118
|
+
# A 'TaxCode' represents a uniquely identified type of product, good, or service.
|
119
|
+
# Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
|
120
|
+
# If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
|
121
|
+
# taxability rules for this product in all supported jurisdictions.
|
122
|
+
# All data from the existing object will be replaced with data in the object you PUT.
|
123
|
+
# To set a field's value to null, you may either set its value to null or omit that field from the object you post.
|
124
|
+
#
|
125
|
+
# ### Security Policies
|
126
|
+
#
|
127
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
128
|
+
# @param companyId [Integer] The ID of the company that this tax code belongs to.
|
129
|
+
# @param id [Integer] The ID of the tax code you wish to update
|
130
|
+
# @param model [Object] The tax code you wish to update.
|
131
|
+
# @return [Object]
|
132
|
+
def update_tax_code(companyId, id, model)
|
133
|
+
path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
|
134
|
+
put(path, model)
|
135
|
+
end
|
136
|
+
|
137
|
+
end
|
138
|
+
end
|
139
139
|
end
|
@@ -1,143 +1,143 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module TaxContent
|
4
|
-
|
5
|
-
|
6
|
-
# Build a multi-location tax content file
|
7
|
-
#
|
8
|
-
# Builds a tax content file containing information useful for a retail point-of-sale solution.
|
9
|
-
#
|
10
|
-
# Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
|
11
|
-
# that users of this tax content API download new data every day. Many tax authorities may finalize
|
12
|
-
# decisions on tax changes at unexpected times and may make changes in response to legal issues or
|
13
|
-
# governmental priorities. Any tax content downloaded for future time periods is subject to change
|
14
|
-
# if tax rates or tax laws change.
|
15
|
-
#
|
16
|
-
# A TaxContent file contains a matrix of the taxes that would be charged when you sell any of your
|
17
|
-
# Items at any of your Locations. To create items, use `CreateItems()`. To create locations, use
|
18
|
-
# `CreateLocations()`. The file is built by looking up the tax profile for your location and your
|
19
|
-
# item and calculating taxes for each in turn. To include a custom `TaxCode` in this tax content
|
20
|
-
# file, first create the custom tax code using `CreateTaxCodes()` to create the custom tax code,
|
21
|
-
# then use `CreateItems()` to create an item that uses the custom tax code.
|
22
|
-
#
|
23
|
-
# This data file can be customized for specific partner devices and usage conditions.
|
24
|
-
#
|
25
|
-
# The result of this API is the file you requested in the format you requested using the `responseType` field.
|
26
|
-
#
|
27
|
-
# This API builds the file on demand, and is limited to files with no more than 7500 scenarios. To build a tax content
|
28
|
-
# file for a single location at a time, please use `BuildTaxContentFileForLocation`.
|
29
|
-
#
|
30
|
-
# NOTE: This API does not work for Tennessee tax holiday scenarios.
|
31
|
-
#
|
32
|
-
# ### Security Policies
|
33
|
-
#
|
34
|
-
# * 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.
|
35
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
36
|
-
# @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
|
37
|
-
# @return [Object]
|
38
|
-
def build_tax_content_file(model)
|
39
|
-
path = "/api/v2/pointofsaledata/build"
|
40
|
-
post(path, model)
|
41
|
-
end
|
42
|
-
|
43
|
-
|
44
|
-
# Build a tax content file for a single location
|
45
|
-
#
|
46
|
-
# Builds a tax content file containing information useful for a retail point-of-sale solution.
|
47
|
-
#
|
48
|
-
# Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
|
49
|
-
# that users of this tax content API download new data every day. Many tax authorities may finalize
|
50
|
-
# decisions on tax changes at unexpected times and may make changes in response to legal issues or
|
51
|
-
# governmental priorities. Any tax content downloaded for future time periods is subject to change
|
52
|
-
# if tax rates or tax laws change.
|
53
|
-
#
|
54
|
-
# A TaxContent file contains a matrix of the taxes that would be charged when you sell any of your
|
55
|
-
# Items at any of your Locations. To create items, use `CreateItems()`. To create locations, use
|
56
|
-
# `CreateLocations()`. The file is built by looking up the tax profile for your location and your
|
57
|
-
# item and calculating taxes for each in turn. To include a custom `TaxCode` in this tax content
|
58
|
-
# file, first create the custom tax code using `CreateTaxCodes()` to create the custom tax code,
|
59
|
-
# then use `CreateItems()` to create an item that uses the custom tax code.
|
60
|
-
#
|
61
|
-
# This data file can be customized for specific partner devices and usage conditions.
|
62
|
-
#
|
63
|
-
# The result of this API is the file you requested in the format you requested using the `responseType` field.
|
64
|
-
#
|
65
|
-
# This API builds the file on demand, and is limited to files with no more than 7500 scenarios. To build a tax content
|
66
|
-
# file for a multiple locations in a single file, please use `BuildTaxContentFile`.
|
67
|
-
#
|
68
|
-
# NOTE: This API does not work for Tennessee tax holiday scenarios.
|
69
|
-
#
|
70
|
-
# ### Security Policies
|
71
|
-
#
|
72
|
-
# * 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.
|
73
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
74
|
-
# @param companyId [Integer] The ID number of the company that owns this location.
|
75
|
-
# @param id [Integer] The ID number of the location to retrieve point-of-sale data.
|
76
|
-
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
|
77
|
-
# @param format [String] The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values)
|
78
|
-
# @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
|
79
|
-
# @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
|
80
|
-
# @return [Object]
|
81
|
-
def build_tax_content_file_for_location(companyId, id, options={})
|
82
|
-
path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
|
83
|
-
get(path, options)
|
84
|
-
end
|
85
|
-
|
86
|
-
|
87
|
-
# Download a file listing tax rates by postal code
|
88
|
-
#
|
89
|
-
# Download a CSV file containing all five digit postal codes in the United States and their sales
|
90
|
-
# and use tax rates for tangible personal property.
|
91
|
-
#
|
92
|
-
# Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
|
93
|
-
# that users of this tax content API download new data every day. Many tax authorities may finalize
|
94
|
-
# decisions on tax changes at unexpected times and may make changes in response to legal issues or
|
95
|
-
# governmental priorities. Any tax content downloaded for future time periods is subject to change
|
96
|
-
# if tax rates or tax laws change.
|
97
|
-
#
|
98
|
-
# This rates file is intended to be used as a default for tax calculation when your software cannot
|
99
|
-
# call the `CreateTransaction` API call. When using this file, your software will be unable to
|
100
|
-
# handle complex tax rules such as:
|
101
|
-
#
|
102
|
-
# * Zip+4 - This tax file contains five digit zip codes only.
|
103
|
-
# * Different product types - This tax file contains tangible personal property tax rates only.
|
104
|
-
# * Mixed sourcing - This tax file cannot be used to resolve origin-based taxes.
|
105
|
-
# * Threshold-based taxes - This tax file does not contain information about thresholds.
|
106
|
-
#
|
107
|
-
# If you use this file to provide default tax rates, please ensure that your software calls `CreateTransaction`
|
108
|
-
# to reconcile the actual transaction and determine the difference between the estimated general tax
|
109
|
-
# rate and the final transaction tax.
|
110
|
-
#
|
111
|
-
# The file provided by this API is in CSV format with the following columns:
|
112
|
-
#
|
113
|
-
# * ZIP_CODE - The five digit zip code for this record.
|
114
|
-
# * STATE_ABBREV - A valid two character US state abbreviation for this record. Zip codes may span multiple states.
|
115
|
-
# * COUNTY_NAME - A valid county name for this record. Zip codes may span multiple counties.
|
116
|
-
# * CITY_NAME - A valid city name for this record. Zip codes may span multiple cities.
|
117
|
-
# * STATE_SALES_TAX - The state component of the sales tax rate.
|
118
|
-
# * STATE_USE_TAX - The state component of the use tax rate.
|
119
|
-
# * COUNTY_SALES_TAX - The county component of the sales tax rate.
|
120
|
-
# * COUNTY_USE_TAX - The county component of the use tax rate.
|
121
|
-
# * CITY_SALES_TAX - The city component of the sales tax rate.
|
122
|
-
# * CITY_USE_TAX - The city component of the use tax rate.
|
123
|
-
# * TOTAL_SALES_TAX - The total tax rate for sales tax for this postal code. This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
|
124
|
-
# * TOTAL_USE_TAX - The total tax rate for use tax for this postal code. This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
|
125
|
-
# * TAX_SHIPPING_ALONE - This column contains 'Y' if shipping is taxable.
|
126
|
-
# * TAX_SHIPPING_AND_HANDLING_TOGETHER - This column contains 'Y' if shipping and handling are taxable when sent together.
|
127
|
-
#
|
128
|
-
# For more detailed tax content, please use the `BuildTaxContentFile` API which allows usage of exact items and exact locations.
|
129
|
-
#
|
130
|
-
# ### Security Policies
|
131
|
-
#
|
132
|
-
# * 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.
|
133
|
-
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
|
134
|
-
# @param region [String] A two character region code which limits results to a specific region.
|
135
|
-
# @return [Object]
|
136
|
-
def download_tax_rates_by_zip_code(date, options={})
|
137
|
-
path = "/api/v2/taxratesbyzipcode/download/#{date}"
|
138
|
-
get(path, options)
|
139
|
-
end
|
140
|
-
|
141
|
-
end
|
142
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module TaxContent
|
4
|
+
|
5
|
+
|
6
|
+
# Build a multi-location tax content file
|
7
|
+
#
|
8
|
+
# Builds a tax content file containing information useful for a retail point-of-sale solution.
|
9
|
+
#
|
10
|
+
# Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
|
11
|
+
# that users of this tax content API download new data every day. Many tax authorities may finalize
|
12
|
+
# decisions on tax changes at unexpected times and may make changes in response to legal issues or
|
13
|
+
# governmental priorities. Any tax content downloaded for future time periods is subject to change
|
14
|
+
# if tax rates or tax laws change.
|
15
|
+
#
|
16
|
+
# A TaxContent file contains a matrix of the taxes that would be charged when you sell any of your
|
17
|
+
# Items at any of your Locations. To create items, use `CreateItems()`. To create locations, use
|
18
|
+
# `CreateLocations()`. The file is built by looking up the tax profile for your location and your
|
19
|
+
# item and calculating taxes for each in turn. To include a custom `TaxCode` in this tax content
|
20
|
+
# file, first create the custom tax code using `CreateTaxCodes()` to create the custom tax code,
|
21
|
+
# then use `CreateItems()` to create an item that uses the custom tax code.
|
22
|
+
#
|
23
|
+
# This data file can be customized for specific partner devices and usage conditions.
|
24
|
+
#
|
25
|
+
# The result of this API is the file you requested in the format you requested using the `responseType` field.
|
26
|
+
#
|
27
|
+
# This API builds the file on demand, and is limited to files with no more than 7500 scenarios. To build a tax content
|
28
|
+
# file for a single location at a time, please use `BuildTaxContentFileForLocation`.
|
29
|
+
#
|
30
|
+
# NOTE: This API does not work for Tennessee tax holiday scenarios.
|
31
|
+
#
|
32
|
+
# ### Security Policies
|
33
|
+
#
|
34
|
+
# * 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.
|
35
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
36
|
+
# @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
|
37
|
+
# @return [Object]
|
38
|
+
def build_tax_content_file(model)
|
39
|
+
path = "/api/v2/pointofsaledata/build"
|
40
|
+
post(path, model)
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
# Build a tax content file for a single location
|
45
|
+
#
|
46
|
+
# Builds a tax content file containing information useful for a retail point-of-sale solution.
|
47
|
+
#
|
48
|
+
# Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
|
49
|
+
# that users of this tax content API download new data every day. Many tax authorities may finalize
|
50
|
+
# decisions on tax changes at unexpected times and may make changes in response to legal issues or
|
51
|
+
# governmental priorities. Any tax content downloaded for future time periods is subject to change
|
52
|
+
# if tax rates or tax laws change.
|
53
|
+
#
|
54
|
+
# A TaxContent file contains a matrix of the taxes that would be charged when you sell any of your
|
55
|
+
# Items at any of your Locations. To create items, use `CreateItems()`. To create locations, use
|
56
|
+
# `CreateLocations()`. The file is built by looking up the tax profile for your location and your
|
57
|
+
# item and calculating taxes for each in turn. To include a custom `TaxCode` in this tax content
|
58
|
+
# file, first create the custom tax code using `CreateTaxCodes()` to create the custom tax code,
|
59
|
+
# then use `CreateItems()` to create an item that uses the custom tax code.
|
60
|
+
#
|
61
|
+
# This data file can be customized for specific partner devices and usage conditions.
|
62
|
+
#
|
63
|
+
# The result of this API is the file you requested in the format you requested using the `responseType` field.
|
64
|
+
#
|
65
|
+
# This API builds the file on demand, and is limited to files with no more than 7500 scenarios. To build a tax content
|
66
|
+
# file for a multiple locations in a single file, please use `BuildTaxContentFile`.
|
67
|
+
#
|
68
|
+
# NOTE: This API does not work for Tennessee tax holiday scenarios.
|
69
|
+
#
|
70
|
+
# ### Security Policies
|
71
|
+
#
|
72
|
+
# * 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.
|
73
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
74
|
+
# @param companyId [Integer] The ID number of the company that owns this location.
|
75
|
+
# @param id [Integer] The ID number of the location to retrieve point-of-sale data.
|
76
|
+
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
|
77
|
+
# @param format [String] The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values)
|
78
|
+
# @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
|
79
|
+
# @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
|
80
|
+
# @return [Object]
|
81
|
+
def build_tax_content_file_for_location(companyId, id, options={})
|
82
|
+
path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
|
83
|
+
get(path, options)
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
# Download a file listing tax rates by postal code
|
88
|
+
#
|
89
|
+
# Download a CSV file containing all five digit postal codes in the United States and their sales
|
90
|
+
# and use tax rates for tangible personal property.
|
91
|
+
#
|
92
|
+
# Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
|
93
|
+
# that users of this tax content API download new data every day. Many tax authorities may finalize
|
94
|
+
# decisions on tax changes at unexpected times and may make changes in response to legal issues or
|
95
|
+
# governmental priorities. Any tax content downloaded for future time periods is subject to change
|
96
|
+
# if tax rates or tax laws change.
|
97
|
+
#
|
98
|
+
# This rates file is intended to be used as a default for tax calculation when your software cannot
|
99
|
+
# call the `CreateTransaction` API call. When using this file, your software will be unable to
|
100
|
+
# handle complex tax rules such as:
|
101
|
+
#
|
102
|
+
# * Zip+4 - This tax file contains five digit zip codes only.
|
103
|
+
# * Different product types - This tax file contains tangible personal property tax rates only.
|
104
|
+
# * Mixed sourcing - This tax file cannot be used to resolve origin-based taxes.
|
105
|
+
# * Threshold-based taxes - This tax file does not contain information about thresholds.
|
106
|
+
#
|
107
|
+
# If you use this file to provide default tax rates, please ensure that your software calls `CreateTransaction`
|
108
|
+
# to reconcile the actual transaction and determine the difference between the estimated general tax
|
109
|
+
# rate and the final transaction tax.
|
110
|
+
#
|
111
|
+
# The file provided by this API is in CSV format with the following columns:
|
112
|
+
#
|
113
|
+
# * ZIP_CODE - The five digit zip code for this record.
|
114
|
+
# * STATE_ABBREV - A valid two character US state abbreviation for this record. Zip codes may span multiple states.
|
115
|
+
# * COUNTY_NAME - A valid county name for this record. Zip codes may span multiple counties.
|
116
|
+
# * CITY_NAME - A valid city name for this record. Zip codes may span multiple cities.
|
117
|
+
# * STATE_SALES_TAX - The state component of the sales tax rate.
|
118
|
+
# * STATE_USE_TAX - The state component of the use tax rate.
|
119
|
+
# * COUNTY_SALES_TAX - The county component of the sales tax rate.
|
120
|
+
# * COUNTY_USE_TAX - The county component of the use tax rate.
|
121
|
+
# * CITY_SALES_TAX - The city component of the sales tax rate.
|
122
|
+
# * CITY_USE_TAX - The city component of the use tax rate.
|
123
|
+
# * TOTAL_SALES_TAX - The total tax rate for sales tax for this postal code. This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
|
124
|
+
# * TOTAL_USE_TAX - The total tax rate for use tax for this postal code. This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
|
125
|
+
# * TAX_SHIPPING_ALONE - This column contains 'Y' if shipping is taxable.
|
126
|
+
# * TAX_SHIPPING_AND_HANDLING_TOGETHER - This column contains 'Y' if shipping and handling are taxable when sent together.
|
127
|
+
#
|
128
|
+
# For more detailed tax content, please use the `BuildTaxContentFile` API which allows usage of exact items and exact locations.
|
129
|
+
#
|
130
|
+
# ### Security Policies
|
131
|
+
#
|
132
|
+
# * 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.
|
133
|
+
# @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
|
134
|
+
# @param region [String] A two character region code which limits results to a specific region.
|
135
|
+
# @return [Object]
|
136
|
+
def download_tax_rates_by_zip_code(date, options={})
|
137
|
+
path = "/api/v2/taxratesbyzipcode/download/#{date}"
|
138
|
+
get(path, options)
|
139
|
+
end
|
140
|
+
|
141
|
+
end
|
142
|
+
end
|
143
143
|
end
|