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,137 +1,137 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module JurisdictionOverrides
|
4
|
-
|
5
|
-
|
6
|
-
# Create one or more overrides
|
7
|
-
#
|
8
|
-
# Creates one or more jurisdiction override objects for this account.
|
9
|
-
#
|
10
|
-
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
11
|
-
# jurisdiction for a specific address. If you encounter an address that is on the boundary
|
12
|
-
# between two different jurisdictions, you can choose to set up a jurisdiction override
|
13
|
-
# to switch this address to use different taxing jurisdictions.
|
14
|
-
#
|
15
|
-
# ### Security Policies
|
16
|
-
#
|
17
|
-
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
18
|
-
# @param accountId [Integer] The ID of the account that owns this override
|
19
|
-
# @param model [JurisdictionOverrideModel[]] The jurisdiction override objects to create
|
20
|
-
# @return [JurisdictionOverrideModel[]]
|
21
|
-
def create_jurisdiction_overrides(accountId, model)
|
22
|
-
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
|
23
|
-
post(path, model)
|
24
|
-
end
|
25
|
-
|
26
|
-
|
27
|
-
# Delete a single override
|
28
|
-
#
|
29
|
-
# Marks the item object at this URL as deleted.
|
30
|
-
#
|
31
|
-
# ### Security Policies
|
32
|
-
#
|
33
|
-
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
34
|
-
# @param accountId [Integer] The ID of the account that owns this override
|
35
|
-
# @param id [Integer] The ID of the override you wish to delete
|
36
|
-
# @return [ErrorDetail[]]
|
37
|
-
def delete_jurisdiction_override(accountId, id)
|
38
|
-
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
|
39
|
-
delete(path)
|
40
|
-
end
|
41
|
-
|
42
|
-
|
43
|
-
# Retrieve a single override
|
44
|
-
#
|
45
|
-
# Get the item object identified by this URL.
|
46
|
-
#
|
47
|
-
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
48
|
-
# jurisdiction for a specific address. If you encounter an address that is on the boundary
|
49
|
-
# between two different jurisdictions, you can choose to set up a jurisdiction override
|
50
|
-
# to switch this address to use different taxing jurisdictions.
|
51
|
-
#
|
52
|
-
# ### Security Policies
|
53
|
-
#
|
54
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
55
|
-
# @param accountId [Integer] The ID of the account that owns this override
|
56
|
-
# @param id [Integer] The primary key of this override
|
57
|
-
# @return [Object]
|
58
|
-
def get_jurisdiction_override(accountId, id)
|
59
|
-
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
|
60
|
-
get(path)
|
61
|
-
end
|
62
|
-
|
63
|
-
|
64
|
-
# Retrieve overrides for this account
|
65
|
-
#
|
66
|
-
# List all jurisdiction override objects defined for this account.
|
67
|
-
#
|
68
|
-
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
69
|
-
# jurisdiction for a specific address. If you encounter an address that is on the boundary
|
70
|
-
# between two different jurisdictions, you can choose to set up a jurisdiction override
|
71
|
-
# to switch this address to use different taxing jurisdictions.
|
72
|
-
#
|
73
|
-
# 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/) .
|
74
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
75
|
-
#
|
76
|
-
# ### Security Policies
|
77
|
-
#
|
78
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
79
|
-
# @param accountId [Integer] The ID of the account that owns this override
|
80
|
-
# @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:* country, Jurisdictions
|
81
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
82
|
-
# @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.
|
83
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
84
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
85
|
-
# @return [FetchResult]
|
86
|
-
def list_jurisdiction_overrides_by_account(accountId, options={})
|
87
|
-
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
|
88
|
-
get(path, options)
|
89
|
-
end
|
90
|
-
|
91
|
-
|
92
|
-
# Retrieve all overrides
|
93
|
-
#
|
94
|
-
# Get multiple jurisdiction override objects across all companies.
|
95
|
-
#
|
96
|
-
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
97
|
-
# jurisdiction for a specific address. If you encounter an address that is on the boundary
|
98
|
-
# between two different jurisdictions, you can choose to set up a jurisdiction override
|
99
|
-
# to switch this address to use different taxing jurisdictions.
|
100
|
-
#
|
101
|
-
# 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/) .
|
102
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
103
|
-
#
|
104
|
-
# ### Security Policies
|
105
|
-
#
|
106
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
107
|
-
# @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:* country, Jurisdictions
|
108
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
109
|
-
# @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.
|
110
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
111
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
112
|
-
# @return [FetchResult]
|
113
|
-
def query_jurisdiction_overrides(options={})
|
114
|
-
path = "/api/v2/jurisdictionoverrides"
|
115
|
-
get(path, options)
|
116
|
-
end
|
117
|
-
|
118
|
-
|
119
|
-
# Update a single jurisdictionoverride
|
120
|
-
#
|
121
|
-
# Replace the existing jurisdictionoverride object at this URL with an updated object.
|
122
|
-
#
|
123
|
-
# ### Security Policies
|
124
|
-
#
|
125
|
-
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
126
|
-
# @param accountId [Integer] The ID of the account that this jurisdictionoverride belongs to.
|
127
|
-
# @param id [Integer] The ID of the jurisdictionoverride you wish to update
|
128
|
-
# @param model [Object] The jurisdictionoverride object you wish to update.
|
129
|
-
# @return [Object]
|
130
|
-
def update_jurisdiction_override(accountId, id, model)
|
131
|
-
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
|
132
|
-
put(path, model)
|
133
|
-
end
|
134
|
-
|
135
|
-
end
|
136
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module JurisdictionOverrides
|
4
|
+
|
5
|
+
|
6
|
+
# Create one or more overrides
|
7
|
+
#
|
8
|
+
# Creates one or more jurisdiction override objects for this account.
|
9
|
+
#
|
10
|
+
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
11
|
+
# jurisdiction for a specific address. If you encounter an address that is on the boundary
|
12
|
+
# between two different jurisdictions, you can choose to set up a jurisdiction override
|
13
|
+
# to switch this address to use different taxing jurisdictions.
|
14
|
+
#
|
15
|
+
# ### Security Policies
|
16
|
+
#
|
17
|
+
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
18
|
+
# @param accountId [Integer] The ID of the account that owns this override
|
19
|
+
# @param model [JurisdictionOverrideModel[]] The jurisdiction override objects to create
|
20
|
+
# @return [JurisdictionOverrideModel[]]
|
21
|
+
def create_jurisdiction_overrides(accountId, model)
|
22
|
+
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
|
23
|
+
post(path, model)
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
# Delete a single override
|
28
|
+
#
|
29
|
+
# Marks the item object at this URL as deleted.
|
30
|
+
#
|
31
|
+
# ### Security Policies
|
32
|
+
#
|
33
|
+
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
34
|
+
# @param accountId [Integer] The ID of the account that owns this override
|
35
|
+
# @param id [Integer] The ID of the override you wish to delete
|
36
|
+
# @return [ErrorDetail[]]
|
37
|
+
def delete_jurisdiction_override(accountId, id)
|
38
|
+
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
|
39
|
+
delete(path)
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
# Retrieve a single override
|
44
|
+
#
|
45
|
+
# Get the item object identified by this URL.
|
46
|
+
#
|
47
|
+
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
48
|
+
# jurisdiction for a specific address. If you encounter an address that is on the boundary
|
49
|
+
# between two different jurisdictions, you can choose to set up a jurisdiction override
|
50
|
+
# to switch this address to use different taxing jurisdictions.
|
51
|
+
#
|
52
|
+
# ### Security Policies
|
53
|
+
#
|
54
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
55
|
+
# @param accountId [Integer] The ID of the account that owns this override
|
56
|
+
# @param id [Integer] The primary key of this override
|
57
|
+
# @return [Object]
|
58
|
+
def get_jurisdiction_override(accountId, id)
|
59
|
+
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
|
60
|
+
get(path)
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
# Retrieve overrides for this account
|
65
|
+
#
|
66
|
+
# List all jurisdiction override objects defined for this account.
|
67
|
+
#
|
68
|
+
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
69
|
+
# jurisdiction for a specific address. If you encounter an address that is on the boundary
|
70
|
+
# between two different jurisdictions, you can choose to set up a jurisdiction override
|
71
|
+
# to switch this address to use different taxing jurisdictions.
|
72
|
+
#
|
73
|
+
# 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/) .
|
74
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
75
|
+
#
|
76
|
+
# ### Security Policies
|
77
|
+
#
|
78
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
79
|
+
# @param accountId [Integer] The ID of the account that owns this override
|
80
|
+
# @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:* country, Jurisdictions
|
81
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
82
|
+
# @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.
|
83
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
84
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
85
|
+
# @return [FetchResult]
|
86
|
+
def list_jurisdiction_overrides_by_account(accountId, options={})
|
87
|
+
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
|
88
|
+
get(path, options)
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
# Retrieve all overrides
|
93
|
+
#
|
94
|
+
# Get multiple jurisdiction override objects across all companies.
|
95
|
+
#
|
96
|
+
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
97
|
+
# jurisdiction for a specific address. If you encounter an address that is on the boundary
|
98
|
+
# between two different jurisdictions, you can choose to set up a jurisdiction override
|
99
|
+
# to switch this address to use different taxing jurisdictions.
|
100
|
+
#
|
101
|
+
# 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/) .
|
102
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
103
|
+
#
|
104
|
+
# ### Security Policies
|
105
|
+
#
|
106
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
107
|
+
# @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:* country, Jurisdictions
|
108
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
109
|
+
# @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.
|
110
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
111
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
112
|
+
# @return [FetchResult]
|
113
|
+
def query_jurisdiction_overrides(options={})
|
114
|
+
path = "/api/v2/jurisdictionoverrides"
|
115
|
+
get(path, options)
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
# Update a single jurisdictionoverride
|
120
|
+
#
|
121
|
+
# Replace the existing jurisdictionoverride object at this URL with an updated object.
|
122
|
+
#
|
123
|
+
# ### Security Policies
|
124
|
+
#
|
125
|
+
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
126
|
+
# @param accountId [Integer] The ID of the account that this jurisdictionoverride belongs to.
|
127
|
+
# @param id [Integer] The ID of the jurisdictionoverride you wish to update
|
128
|
+
# @param model [Object] The jurisdictionoverride object you wish to update.
|
129
|
+
# @return [Object]
|
130
|
+
def update_jurisdiction_override(accountId, id, model)
|
131
|
+
path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
|
132
|
+
put(path, model)
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|
136
|
+
end
|
137
137
|
end
|
@@ -1,161 +1,164 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Locations
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new location
|
7
|
-
#
|
8
|
-
# Create one or more new location objects attached to this company.
|
9
|
-
#
|
10
|
-
# ### Security Policies
|
11
|
-
#
|
12
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
13
|
-
# @param companyId [Integer] The ID of the company that owns this location.
|
14
|
-
# @param model [LocationModel[]] The location you wish to create.
|
15
|
-
# @return [LocationModel[]]
|
16
|
-
def create_locations(companyId, model)
|
17
|
-
path = "/api/v2/companies/#{companyId}/locations"
|
18
|
-
post(path, model)
|
19
|
-
end
|
20
|
-
|
21
|
-
|
22
|
-
# Delete a single location
|
23
|
-
#
|
24
|
-
# Mark the location object at this URL as deleted.
|
25
|
-
#
|
26
|
-
# ### Security Policies
|
27
|
-
#
|
28
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
29
|
-
# @param companyId [Integer] The ID of the company that owns this location.
|
30
|
-
# @param id [Integer] The ID of the location you wish to delete.
|
31
|
-
# @return [ErrorDetail[]]
|
32
|
-
def delete_location(companyId, id)
|
33
|
-
path = "/api/v2/companies/#{companyId}/locations/#{id}"
|
34
|
-
delete(path)
|
35
|
-
end
|
36
|
-
|
37
|
-
|
38
|
-
# Retrieve a single location
|
39
|
-
#
|
40
|
-
# Get the location object identified by this URL.
|
41
|
-
# An 'Location' represents a physical address where a company does business.
|
42
|
-
# Many taxing authorities require that you define a list of all locations where your company does business.
|
43
|
-
# These locations may require additional custom configuration or tax registration with these authorities.
|
44
|
-
# For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
|
45
|
-
#
|
46
|
-
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
47
|
-
#
|
48
|
-
# * LocationSettings
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
# @param
|
55
|
-
# @param
|
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
|
-
# @param
|
83
|
-
# @param
|
84
|
-
# @param
|
85
|
-
# @param
|
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
|
-
# @param
|
115
|
-
# @param
|
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
|
-
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Locations
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new location
|
7
|
+
#
|
8
|
+
# Create one or more new location objects attached to this company.
|
9
|
+
#
|
10
|
+
# ### Security Policies
|
11
|
+
#
|
12
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
13
|
+
# @param companyId [Integer] The ID of the company that owns this location.
|
14
|
+
# @param model [LocationModel[]] The location you wish to create.
|
15
|
+
# @return [LocationModel[]]
|
16
|
+
def create_locations(companyId, model)
|
17
|
+
path = "/api/v2/companies/#{companyId}/locations"
|
18
|
+
post(path, model)
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
# Delete a single location
|
23
|
+
#
|
24
|
+
# Mark the location object at this URL as deleted.
|
25
|
+
#
|
26
|
+
# ### Security Policies
|
27
|
+
#
|
28
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
29
|
+
# @param companyId [Integer] The ID of the company that owns this location.
|
30
|
+
# @param id [Integer] The ID of the location you wish to delete.
|
31
|
+
# @return [ErrorDetail[]]
|
32
|
+
def delete_location(companyId, id)
|
33
|
+
path = "/api/v2/companies/#{companyId}/locations/#{id}"
|
34
|
+
delete(path)
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
# Retrieve a single location
|
39
|
+
#
|
40
|
+
# Get the location object identified by this URL.
|
41
|
+
# An 'Location' represents a physical address where a company does business.
|
42
|
+
# Many taxing authorities require that you define a list of all locations where your company does business.
|
43
|
+
# These locations may require additional custom configuration or tax registration with these authorities.
|
44
|
+
# For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
|
45
|
+
#
|
46
|
+
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
47
|
+
#
|
48
|
+
# * LocationSettings
|
49
|
+
# * parameters
|
50
|
+
#
|
51
|
+
# ### Security Policies
|
52
|
+
#
|
53
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
54
|
+
# @param companyId [Integer] The ID of the company that owns this location
|
55
|
+
# @param id [Integer] The primary key of this location
|
56
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
57
|
+
# @return [Object]
|
58
|
+
def get_location(companyId, id, options={})
|
59
|
+
path = "/api/v2/companies/#{companyId}/locations/#{id}"
|
60
|
+
get(path, options)
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
# Retrieve locations for this company
|
65
|
+
#
|
66
|
+
# List all location objects defined for this company.
|
67
|
+
# An 'Location' represents a physical address where a company does business.
|
68
|
+
# Many taxing authorities require that you define a list of all locations where your company does business.
|
69
|
+
# These locations may require additional custom configuration or tax registration with these authorities.
|
70
|
+
# For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
|
71
|
+
#
|
72
|
+
# 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/) .
|
73
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
74
|
+
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
75
|
+
#
|
76
|
+
# * LocationSettings
|
77
|
+
# * parameters
|
78
|
+
#
|
79
|
+
# ### Security Policies
|
80
|
+
#
|
81
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
82
|
+
# @param companyId [Integer] The ID of the company that owns these locations
|
83
|
+
# @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:* settings, parameters
|
84
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
85
|
+
# @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.
|
86
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
87
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
88
|
+
# @return [FetchResult]
|
89
|
+
def list_locations_by_company(companyId, options={})
|
90
|
+
path = "/api/v2/companies/#{companyId}/locations"
|
91
|
+
get(path, options)
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
# Retrieve all locations
|
96
|
+
#
|
97
|
+
# Get multiple location objects across all companies.
|
98
|
+
# An 'Location' represents a physical address where a company does business.
|
99
|
+
# Many taxing authorities require that you define a list of all locations where your company does business.
|
100
|
+
# These locations may require additional custom configuration or tax registration with these authorities.
|
101
|
+
# For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
|
102
|
+
#
|
103
|
+
# 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/) .
|
104
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
105
|
+
#
|
106
|
+
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
107
|
+
#
|
108
|
+
# * LocationSettings
|
109
|
+
# * parameters
|
110
|
+
#
|
111
|
+
# ### Security Policies
|
112
|
+
#
|
113
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
114
|
+
# @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:* settings, parameters
|
115
|
+
# @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
|
116
|
+
# @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.
|
117
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
118
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
119
|
+
# @return [FetchResult]
|
120
|
+
def query_locations(options={})
|
121
|
+
path = "/api/v2/locations"
|
122
|
+
get(path, options)
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
# Update a single location
|
127
|
+
#
|
128
|
+
# Replace the existing location object at this URL with an updated object.
|
129
|
+
# All data from the existing object will be replaced with data in the object you PUT.
|
130
|
+
# 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.
|
131
|
+
#
|
132
|
+
# ### Security Policies
|
133
|
+
#
|
134
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
135
|
+
# @param companyId [Integer] The ID of the company that this location belongs to.
|
136
|
+
# @param id [Integer] The ID of the location you wish to update
|
137
|
+
# @param model [Object] The location you wish to update.
|
138
|
+
# @return [Object]
|
139
|
+
def update_location(companyId, id, model)
|
140
|
+
path = "/api/v2/companies/#{companyId}/locations/#{id}"
|
141
|
+
put(path, model)
|
142
|
+
end
|
143
|
+
|
144
|
+
|
145
|
+
# Validate the location against local requirements
|
146
|
+
#
|
147
|
+
# Returns validation information for this location.
|
148
|
+
# This API call is intended to compare this location against the currently known taxing authority rules and regulations,
|
149
|
+
# and provide information about what additional work is required to completely setup this location.
|
150
|
+
#
|
151
|
+
# ### Security Policies
|
152
|
+
#
|
153
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
154
|
+
# @param companyId [Integer] The ID of the company that owns this location
|
155
|
+
# @param id [Integer] The primary key of this location
|
156
|
+
# @return [Object]
|
157
|
+
def validate_location(companyId, id)
|
158
|
+
path = "/api/v2/companies/#{companyId}/locations/#{id}/validate"
|
159
|
+
get(path)
|
160
|
+
end
|
161
|
+
|
162
|
+
end
|
163
|
+
end
|
161
164
|
end
|