avatax 20.5.0 → 20.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avatax/client/accounts.rb +116 -83
- data/lib/avatax/client/addresses.rb +26 -20
- data/lib/avatax/client/advancedrules.rb +56 -41
- data/lib/avatax/client/avafileforms.rb +56 -41
- data/lib/avatax/client/batches.rb +125 -48
- data/lib/avatax/client/certexpressinvites.rb +36 -27
- data/lib/avatax/client/certificates.rb +156 -111
- data/lib/avatax/client/companies.rb +166 -118
- data/lib/avatax/client/compliance.rb +16 -13
- data/lib/avatax/client/contacts.rb +66 -48
- data/lib/avatax/client/customers.rb +136 -97
- data/lib/avatax/client/datasources.rb +66 -48
- data/lib/avatax/client/definitions.rb +596 -419
- data/lib/avatax/client/distancethresholds.rb +66 -48
- data/lib/avatax/client/filingcalendars.rb +16 -13
- data/lib/avatax/client/filings.rb +16 -13
- data/lib/avatax/client/firmclientlinkages.rb +96 -69
- data/lib/avatax/client/free.rb +36 -27
- data/lib/avatax/client/fundingrequests.rb +26 -20
- data/lib/avatax/client/items.rb +196 -139
- data/lib/avatax/client/jurisdictionoverrides.rb +66 -48
- data/lib/avatax/client/locations.rb +76 -55
- data/lib/avatax/client/multidocument.rb +106 -76
- data/lib/avatax/client/nexus.rb +82 -183
- data/lib/avatax/client/notifications.rb +36 -27
- data/lib/avatax/client/provisioning.rb +26 -20
- data/lib/avatax/client/registrar.rb +106 -76
- data/lib/avatax/client/reports.rb +46 -34
- data/lib/avatax/client/settings.rb +66 -48
- data/lib/avatax/client/subscriptions.rb +36 -27
- data/lib/avatax/client/taxcodes.rb +66 -48
- data/lib/avatax/client/taxcontent.rb +36 -27
- data/lib/avatax/client/taxrules.rb +66 -48
- data/lib/avatax/client/transactions.rb +216 -153
- data/lib/avatax/client/upcs.rb +66 -48
- data/lib/avatax/client/users.rb +86 -62
- data/lib/avatax/client/utilities.rb +36 -27
- data/lib/avatax/version.rb +1 -1
- metadata +2 -2
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module JurisdictionOverrides
|
4
|
-
|
5
|
-
|
6
|
-
# Create one or more overrides
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module JurisdictionOverrides
|
4
|
+
|
5
|
+
|
6
|
+
# Create one or more overrides
|
7
|
+
#
|
8
8
|
# Creates one or more jurisdiction override objects for this account.
|
9
9
|
#
|
10
10
|
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
@@ -14,28 +14,34 @@ module AvaTax
|
|
14
14
|
#
|
15
15
|
# ### Security Policies
|
16
16
|
#
|
17
|
-
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
17
|
+
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
18
18
|
# @param accountId [Integer] The ID of the account that owns this override
|
19
19
|
# @param model [JurisdictionOverrideModel[]] The jurisdiction override objects to create
|
20
|
-
# @return [JurisdictionOverrideModel[]]
|
21
|
-
def create_jurisdiction_overrides(accountId, model)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
+
#
|
26
29
|
# Marks the item object at this URL as deleted.
|
27
30
|
#
|
28
31
|
# ### Security Policies
|
29
32
|
#
|
30
|
-
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
33
|
+
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
31
34
|
# @param accountId [Integer] The ID of the account that owns this override
|
32
35
|
# @param id [Integer] The ID of the override you wish to delete
|
33
|
-
# @return [ErrorDetail[]]
|
34
|
-
def delete_jurisdiction_override(accountId, id)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
+
#
|
39
45
|
# Get the item object identified by this URL.
|
40
46
|
#
|
41
47
|
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
@@ -45,15 +51,18 @@ module AvaTax
|
|
45
51
|
#
|
46
52
|
# ### Security Policies
|
47
53
|
#
|
48
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
54
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
49
55
|
# @param accountId [Integer] The ID of the account that owns this override
|
50
56
|
# @param id [Integer] The primary key of this override
|
51
|
-
# @return [Object]
|
52
|
-
def get_jurisdiction_override(accountId, id)
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
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
|
+
#
|
57
66
|
# List all jurisdiction override objects defined for this account.
|
58
67
|
#
|
59
68
|
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
@@ -66,19 +75,22 @@ module AvaTax
|
|
66
75
|
#
|
67
76
|
# ### Security Policies
|
68
77
|
#
|
69
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
78
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
70
79
|
# @param accountId [Integer] The ID of the account that owns this override
|
71
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
|
72
81
|
# @param include [String] A comma separated list of additional data to retrieve.
|
73
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.
|
74
83
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
75
84
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
76
|
-
# @return [FetchResult]
|
77
|
-
def list_jurisdiction_overrides_by_account(accountId, options={})
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
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
|
+
#
|
82
94
|
# Get multiple jurisdiction override objects across all companies.
|
83
95
|
#
|
84
96
|
# A Jurisdiction Override is a configuration setting that allows you to select the taxing
|
@@ -91,29 +103,35 @@ module AvaTax
|
|
91
103
|
#
|
92
104
|
# ### Security Policies
|
93
105
|
#
|
94
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
106
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
95
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
|
96
108
|
# @param include [String] A comma separated list of additional data to retrieve.
|
97
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.
|
98
110
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
99
111
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
100
|
-
# @return [FetchResult]
|
101
|
-
def query_jurisdiction_overrides(options={})
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
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
|
+
#
|
106
121
|
# Replace the existing jurisdictionoverride object at this URL with an updated object.
|
107
122
|
#
|
108
123
|
# ### Security Policies
|
109
124
|
#
|
110
|
-
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
125
|
+
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
111
126
|
# @param accountId [Integer] The ID of the account that this jurisdictionoverride belongs to.
|
112
127
|
# @param id [Integer] The ID of the jurisdictionoverride you wish to update
|
113
128
|
# @param model [Object] The jurisdictionoverride object you wish to update.
|
114
|
-
# @return [Object]
|
115
|
-
def update_jurisdiction_override(accountId, id, model)
|
116
|
-
|
117
|
-
|
118
|
-
|
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
|
119
137
|
end
|
@@ -1,36 +1,42 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Locations
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new location
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Locations
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new location
|
7
|
+
#
|
8
8
|
# Create one or more new location objects attached to this company.
|
9
9
|
#
|
10
10
|
# ### Security Policies
|
11
11
|
#
|
12
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
12
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
13
13
|
# @param companyId [Integer] The ID of the company that owns this location.
|
14
14
|
# @param model [LocationModel[]] The location you wish to create.
|
15
|
-
# @return [LocationModel[]]
|
16
|
-
def create_locations(companyId, model)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
+
#
|
21
24
|
# Mark the location object at this URL as deleted.
|
22
25
|
#
|
23
26
|
# ### Security Policies
|
24
27
|
#
|
25
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
28
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
26
29
|
# @param companyId [Integer] The ID of the company that owns this location.
|
27
30
|
# @param id [Integer] The ID of the location you wish to delete.
|
28
|
-
# @return [ErrorDetail[]]
|
29
|
-
def delete_location(companyId, id)
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
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
|
+
#
|
34
40
|
# Get the location object identified by this URL.
|
35
41
|
# An 'Location' represents a physical address where a company does business.
|
36
42
|
# Many taxing authorities require that you define a list of all locations where your company does business.
|
@@ -44,16 +50,19 @@ module AvaTax
|
|
44
50
|
#
|
45
51
|
# ### Security Policies
|
46
52
|
#
|
47
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
53
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
48
54
|
# @param companyId [Integer] The ID of the company that owns this location
|
49
55
|
# @param id [Integer] The primary key of this location
|
50
56
|
# @param include [String] A comma separated list of additional data to retrieve.
|
51
|
-
# @return [Object]
|
52
|
-
def get_location(companyId, id, options={})
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
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
|
+
#
|
57
66
|
# List all location objects defined for this company.
|
58
67
|
# An 'Location' represents a physical address where a company does business.
|
59
68
|
# Many taxing authorities require that you define a list of all locations where your company does business.
|
@@ -69,19 +78,22 @@ module AvaTax
|
|
69
78
|
#
|
70
79
|
# ### Security Policies
|
71
80
|
#
|
72
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
81
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
73
82
|
# @param companyId [Integer] The ID of the company that owns these locations
|
74
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
|
75
84
|
# @param include [String] A comma separated list of additional data to retrieve.
|
76
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.
|
77
86
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
78
87
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
79
|
-
# @return [FetchResult]
|
80
|
-
def list_locations_by_company(companyId, options={})
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
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
|
+
#
|
85
97
|
# Get multiple location objects across all companies.
|
86
98
|
# An 'Location' represents a physical address where a company does business.
|
87
99
|
# Many taxing authorities require that you define a list of all locations where your company does business.
|
@@ -98,46 +110,55 @@ module AvaTax
|
|
98
110
|
#
|
99
111
|
# ### Security Policies
|
100
112
|
#
|
101
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
113
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
102
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
|
103
115
|
# @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
|
104
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.
|
105
117
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
106
118
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
107
|
-
# @return [FetchResult]
|
108
|
-
def query_locations(options={})
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
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
|
+
#
|
113
128
|
# Replace the existing location object at this URL with an updated object.
|
114
129
|
# All data from the existing object will be replaced with data in the object you PUT.
|
115
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.
|
116
131
|
#
|
117
132
|
# ### Security Policies
|
118
133
|
#
|
119
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
134
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
120
135
|
# @param companyId [Integer] The ID of the company that this location belongs to.
|
121
136
|
# @param id [Integer] The ID of the location you wish to update
|
122
137
|
# @param model [Object] The location you wish to update.
|
123
|
-
# @return [Object]
|
124
|
-
def update_location(companyId, id, model)
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
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
|
+
#
|
129
147
|
# Returns validation information for this location.
|
130
148
|
# This API call is intended to compare this location against the currently known taxing authority rules and regulations,
|
131
149
|
# and provide information about what additional work is required to completely setup this location.
|
132
150
|
#
|
133
151
|
# ### Security Policies
|
134
152
|
#
|
135
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
153
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
136
154
|
# @param companyId [Integer] The ID of the company that owns this location
|
137
155
|
# @param id [Integer] The primary key of this location
|
138
|
-
# @return [Object]
|
139
|
-
def validate_location(companyId, id)
|
140
|
-
|
141
|
-
|
142
|
-
|
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
|
143
164
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module MultiDocument
|
4
|
-
|
5
|
-
|
6
|
-
# Adjust a MultiDocument transaction
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module MultiDocument
|
4
|
+
|
5
|
+
|
6
|
+
# Adjust a MultiDocument transaction
|
7
|
+
#
|
8
8
|
# Adjusts the current MultiDocument transaction uniquely identified by this URL.
|
9
9
|
#
|
10
10
|
# A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
|
@@ -25,17 +25,20 @@ module AvaTax
|
|
25
25
|
# ### Security Policies
|
26
26
|
#
|
27
27
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
28
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
28
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
29
29
|
# @param code [String] The transaction code for this MultiDocument transaction
|
30
30
|
# @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
|
31
31
|
# @param include [String] Specifies objects to include in this fetch call
|
32
32
|
# @param model [Object] The adjust request you wish to execute
|
33
|
-
# @return [Object]
|
34
|
-
def adjust_multi_document_transaction(code, type, model, options={})
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
# @return [Object]
|
34
|
+
def adjust_multi_document_transaction(code, type, model, options={})
|
35
|
+
path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust"
|
36
|
+
post(path, model, options)
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
# Get audit information about a MultiDocument transaction
|
41
|
+
#
|
39
42
|
# Retrieve audit information about a MultiDocument transaction stored in AvaTax.
|
40
43
|
#
|
41
44
|
# The audit API retrieves audit information related to a specific MultiDocument transaction. This audit
|
@@ -60,15 +63,18 @@ module AvaTax
|
|
60
63
|
# ### Security Policies
|
61
64
|
#
|
62
65
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
63
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
66
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
64
67
|
# @param code [String] The transaction code for this MultiDocument transaction
|
65
68
|
# @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
|
66
|
-
# @return [Object]
|
67
|
-
def audit_multi_document_transaction(code, type)
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
# @return [Object]
|
70
|
+
def audit_multi_document_transaction(code, type)
|
71
|
+
path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit"
|
72
|
+
get(path)
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
# Commit a MultiDocument transaction
|
77
|
+
#
|
72
78
|
# Marks a list of transactions by changing its status to `Committed`.
|
73
79
|
#
|
74
80
|
# Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns.
|
@@ -87,14 +93,17 @@ module AvaTax
|
|
87
93
|
# ### Security Policies
|
88
94
|
#
|
89
95
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
90
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
96
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
91
97
|
# @param model [Object] The commit request you wish to execute
|
92
|
-
# @return [Object]
|
93
|
-
def commit_multi_document_transaction(model)
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
+
# @return [Object]
|
99
|
+
def commit_multi_document_transaction(model)
|
100
|
+
path = "/api/v2/transactions/multidocument/commit"
|
101
|
+
post(path, model)
|
102
|
+
end
|
103
|
+
|
104
|
+
|
105
|
+
# Create a new MultiDocument transaction
|
106
|
+
#
|
98
107
|
# Records a new MultiDocument transaction in AvaTax.
|
99
108
|
#
|
100
109
|
# A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
|
@@ -137,15 +146,18 @@ module AvaTax
|
|
137
146
|
# ### Security Policies
|
138
147
|
#
|
139
148
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
140
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
149
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
141
150
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
142
151
|
# @param model [Object] the multi document transaction model
|
143
|
-
# @return [Object]
|
144
|
-
def create_multi_document_transaction(model, options={})
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
152
|
+
# @return [Object]
|
153
|
+
def create_multi_document_transaction(model, options={})
|
154
|
+
path = "/api/v2/transactions/multidocument"
|
155
|
+
post(path, model, options)
|
156
|
+
end
|
157
|
+
|
158
|
+
|
159
|
+
# Retrieve a MultiDocument transaction
|
160
|
+
#
|
149
161
|
# Get the current MultiDocument transaction identified by this URL.
|
150
162
|
#
|
151
163
|
# If this transaction was adjusted, the return value of this API will be the current transaction with this code.
|
@@ -168,16 +180,19 @@ module AvaTax
|
|
168
180
|
# ### Security Policies
|
169
181
|
#
|
170
182
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
171
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
183
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
172
184
|
# @param code [String]
|
173
185
|
# @param type [String] (See DocumentType::* for a list of allowable values)
|
174
186
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
175
|
-
# @return [Object]
|
176
|
-
def get_multi_document_transaction_by_code_and_type(code, type, options={})
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
187
|
+
# @return [Object]
|
188
|
+
def get_multi_document_transaction_by_code_and_type(code, type, options={})
|
189
|
+
path = "/api/v2/transactions/multidocument/#{code}/type/#{type}"
|
190
|
+
get(path, options)
|
191
|
+
end
|
192
|
+
|
193
|
+
|
194
|
+
# Retrieve a MultiDocument transaction by ID
|
195
|
+
#
|
181
196
|
# Get the unique MultiDocument transaction identified by this URL.
|
182
197
|
#
|
183
198
|
# A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
|
@@ -209,15 +224,18 @@ module AvaTax
|
|
209
224
|
# ### Security Policies
|
210
225
|
#
|
211
226
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
212
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
227
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
213
228
|
# @param id [Integer] The unique ID number of the MultiDocument transaction to retrieve
|
214
229
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
215
|
-
# @return [Object]
|
216
|
-
def get_multi_document_transaction_by_id(id, options={})
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
230
|
+
# @return [Object]
|
231
|
+
def get_multi_document_transaction_by_id(id, options={})
|
232
|
+
path = "/api/v2/transactions/multidocument/#{id}"
|
233
|
+
get(path, options)
|
234
|
+
end
|
235
|
+
|
236
|
+
|
237
|
+
# Retrieve all MultiDocument transactions
|
238
|
+
#
|
221
239
|
# List all MultiDocument transactions within this account.
|
222
240
|
#
|
223
241
|
# This endpoint is limited to returning 1,000 MultiDocument transactions at a time. To retrieve more than 1,000 MultiDocument
|
@@ -247,18 +265,21 @@ module AvaTax
|
|
247
265
|
# ### Security Policies
|
248
266
|
#
|
249
267
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
250
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
268
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
251
269
|
# @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:* documents
|
252
270
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
253
271
|
# @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.
|
254
272
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
255
273
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
256
|
-
# @return [FetchResult]
|
257
|
-
def list_multi_document_transactions(options={})
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
274
|
+
# @return [FetchResult]
|
275
|
+
def list_multi_document_transactions(options={})
|
276
|
+
path = "/api/v2/transactions/multidocument"
|
277
|
+
get(path, options)
|
278
|
+
end
|
279
|
+
|
280
|
+
|
281
|
+
# Create a refund for a MultiDocument transaction
|
282
|
+
#
|
262
283
|
# Create a refund for a MultiDocument transaction.
|
263
284
|
#
|
264
285
|
# A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
|
@@ -305,17 +326,20 @@ module AvaTax
|
|
305
326
|
# ### Security Policies
|
306
327
|
#
|
307
328
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
308
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
329
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
309
330
|
# @param code [String] The code of this MultiDocument transaction
|
310
331
|
# @param type [String] The type of this MultiDocument transaction (See DocumentType::* for a list of allowable values)
|
311
332
|
# @param include [String] Specifies objects to include in the response after transaction is created
|
312
333
|
# @param model [Object] Information about the refund to create
|
313
|
-
# @return [Object]
|
314
|
-
def refund_multi_document_transaction(code, type, model, options={})
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
334
|
+
# @return [Object]
|
335
|
+
def refund_multi_document_transaction(code, type, model, options={})
|
336
|
+
path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund"
|
337
|
+
post(path, model, options)
|
338
|
+
end
|
339
|
+
|
340
|
+
|
341
|
+
# Verify a MultiDocument transaction
|
342
|
+
#
|
319
343
|
# Verifies that the MultiDocument transaction uniquely identified by this URL matches certain expected values.
|
320
344
|
#
|
321
345
|
# If the transaction does not match these expected values, this API will return an error code indicating which value did not match.
|
@@ -332,14 +356,17 @@ module AvaTax
|
|
332
356
|
# ### Security Policies
|
333
357
|
#
|
334
358
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
335
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
359
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
336
360
|
# @param model [Object] Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax
|
337
|
-
# @return [Object]
|
338
|
-
def verify_multi_document_transaction(model)
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
361
|
+
# @return [Object]
|
362
|
+
def verify_multi_document_transaction(model)
|
363
|
+
path = "/api/v2/transactions/multidocument/verify"
|
364
|
+
post(path, model)
|
365
|
+
end
|
366
|
+
|
367
|
+
|
368
|
+
# Void a MultiDocument transaction
|
369
|
+
#
|
343
370
|
# Voids the current transaction uniquely identified by this URL.
|
344
371
|
#
|
345
372
|
# A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
|
@@ -359,13 +386,16 @@ module AvaTax
|
|
359
386
|
# ### Security Policies
|
360
387
|
#
|
361
388
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
|
362
|
-
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
389
|
+
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
363
390
|
# @param code [String] The transaction code for this MultiDocument transaction
|
364
391
|
# @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
|
365
392
|
# @param model [Object] The void request you wish to execute
|
366
|
-
# @return [Object]
|
367
|
-
def void_multi_document_transaction(code, type, model)
|
368
|
-
|
369
|
-
|
370
|
-
|
393
|
+
# @return [Object]
|
394
|
+
def void_multi_document_transaction(code, type, model)
|
395
|
+
path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void"
|
396
|
+
post(path, model)
|
397
|
+
end
|
398
|
+
|
399
|
+
end
|
400
|
+
end
|
371
401
|
end
|