avatax 21.7.1 → 21.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +94 -83
  3. data/lib/avatax/client/addresses.rb +22 -20
  4. data/lib/avatax/client/advancedrules.rb +46 -41
  5. data/lib/avatax/client/ageverification.rb +29 -0
  6. data/lib/avatax/client/avafileforms.rb +46 -41
  7. data/lib/avatax/client/batches.rb +70 -62
  8. data/lib/avatax/client/certexpressinvites.rb +30 -27
  9. data/lib/avatax/client/certificates.rb +126 -111
  10. data/lib/avatax/client/companies.rb +174 -153
  11. data/lib/avatax/client/compliance.rb +25 -14
  12. data/lib/avatax/client/contacts.rb +54 -48
  13. data/lib/avatax/client/customers.rb +110 -97
  14. data/lib/avatax/client/datasources.rb +54 -48
  15. data/lib/avatax/client/definitions.rb +624 -450
  16. data/lib/avatax/client/distancethresholds.rb +54 -48
  17. data/lib/avatax/client/ecommercetoken.rb +20 -18
  18. data/lib/avatax/client/filingcalendars.rb +44 -20
  19. data/lib/avatax/client/filings.rb +24 -20
  20. data/lib/avatax/client/firmclientlinkages.rb +78 -69
  21. data/lib/avatax/client/free.rb +14 -13
  22. data/lib/avatax/client/fundingrequests.rb +22 -20
  23. data/lib/avatax/client/items.rb +209 -181
  24. data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
  25. data/lib/avatax/client/locations.rb +102 -90
  26. data/lib/avatax/client/multidocument.rb +86 -76
  27. data/lib/avatax/client/nexus.rb +148 -105
  28. data/lib/avatax/client/notices.rb +30 -26
  29. data/lib/avatax/client/notifications.rb +30 -27
  30. data/lib/avatax/client/provisioning.rb +22 -20
  31. data/lib/avatax/client/registrar.rb +94 -83
  32. data/lib/avatax/client/reports.rb +38 -34
  33. data/lib/avatax/client/settings.rb +54 -48
  34. data/lib/avatax/client/shippingverification.rb +66 -0
  35. data/lib/avatax/client/subscriptions.rb +30 -27
  36. data/lib/avatax/client/taxcodes.rb +54 -48
  37. data/lib/avatax/client/taxcontent.rb +46 -41
  38. data/lib/avatax/client/taxrules.rb +56 -50
  39. data/lib/avatax/client/transactions.rb +174 -153
  40. data/lib/avatax/client/upcs.rb +54 -48
  41. data/lib/avatax/client/userdefinedfields.rb +52 -0
  42. data/lib/avatax/client/users.rb +70 -62
  43. data/lib/avatax/client/utilities.rb +30 -27
  44. data/lib/avatax/client.rb +2 -0
  45. data/lib/avatax/connection.rb +1 -1
  46. data/lib/avatax/request.rb +21 -12
  47. data/lib/avatax/version.rb +1 -1
  48. metadata +6 -3
@@ -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,30 @@ 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
+ # Swagger Name: AvaTaxClient
18
19
  # @param accountId [Integer] The ID of the account that owns this override
19
20
  # @param model [JurisdictionOverrideModel[]] The jurisdiction override objects to create
20
- # @return [JurisdictionOverrideModel[]]
21
- def create_jurisdiction_overrides(accountId, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
22
- post(path, model) end
23
-
24
- # Delete a single override
25
- #
21
+ # @return [JurisdictionOverrideModel[]]
22
+ def create_jurisdiction_overrides(accountId, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
23
+ post(path, model, {}, "21.12.0") end
24
+
25
+ # Delete a single override
26
+ #
26
27
  # Marks the item object at this URL as deleted.
27
28
  #
28
29
  # ### Security Policies
29
30
  #
30
- # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
31
+ # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
32
+ # Swagger Name: AvaTaxClient
31
33
  # @param accountId [Integer] The ID of the account that owns this override
32
34
  # @param id [Integer] The ID of the override you wish to delete
33
- # @return [ErrorDetail[]]
34
- def delete_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
35
- delete(path) end
36
-
37
- # Retrieve a single override
38
- #
35
+ # @return [ErrorDetail[]]
36
+ def delete_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
37
+ delete(path, {}, "21.12.0") end
38
+
39
+ # Retrieve a single override
40
+ #
39
41
  # Get the item object identified by this URL.
40
42
  #
41
43
  # A Jurisdiction Override is a configuration setting that allows you to select the taxing
@@ -45,15 +47,16 @@ module AvaTax
45
47
  #
46
48
  # ### Security Policies
47
49
  #
48
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
50
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
51
+ # Swagger Name: AvaTaxClient
49
52
  # @param accountId [Integer] The ID of the account that owns this override
50
53
  # @param id [Integer] The primary key of this override
51
- # @return [Object]
52
- def get_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
53
- get(path) end
54
-
55
- # Retrieve overrides for this account
56
- #
54
+ # @return [Object]
55
+ def get_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
56
+ get(path, {}, "21.12.0") end
57
+
58
+ # Retrieve overrides for this account
59
+ #
57
60
  # List all jurisdiction override objects defined for this account.
58
61
  #
59
62
  # A Jurisdiction Override is a configuration setting that allows you to select the taxing
@@ -66,19 +69,20 @@ module AvaTax
66
69
  #
67
70
  # ### Security Policies
68
71
  #
69
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
72
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
73
+ # Swagger Name: AvaTaxClient
70
74
  # @param accountId [Integer] The ID of the account that owns this override
71
75
  # @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
76
  # @param include [String] A comma separated list of additional data to retrieve.
73
77
  # @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
78
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
75
79
  # @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={}) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
78
- get(path, options) end
79
-
80
- # Retrieve all overrides
81
- #
80
+ # @return [FetchResult]
81
+ def list_jurisdiction_overrides_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
82
+ get(path, options, "21.12.0") end
83
+
84
+ # Retrieve all overrides
85
+ #
82
86
  # Get multiple jurisdiction override objects across all companies.
83
87
  #
84
88
  # A Jurisdiction Override is a configuration setting that allows you to select the taxing
@@ -91,29 +95,31 @@ module AvaTax
91
95
  #
92
96
  # ### Security Policies
93
97
  #
94
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
98
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
99
+ # Swagger Name: AvaTaxClient
95
100
  # @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
101
  # @param include [String] A comma separated list of additional data to retrieve.
97
102
  # @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
103
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
99
104
  # @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={}) path = "/api/v2/jurisdictionoverrides"
102
- get(path, options) end
103
-
104
- # Update a single jurisdictionoverride
105
- #
105
+ # @return [FetchResult]
106
+ def query_jurisdiction_overrides(options={}) path = "/api/v2/jurisdictionoverrides"
107
+ get(path, options, "21.12.0") end
108
+
109
+ # Update a single jurisdictionoverride
110
+ #
106
111
  # Replace the existing jurisdictionoverride object at this URL with an updated object.
107
112
  #
108
113
  # ### Security Policies
109
114
  #
110
- # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
115
+ # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
116
+ # Swagger Name: AvaTaxClient
111
117
  # @param accountId [Integer] The ID of the account that this jurisdictionoverride belongs to.
112
118
  # @param id [Integer] The ID of the jurisdictionoverride you wish to update
113
119
  # @param model [Object] The jurisdictionoverride object you wish to update.
114
- # @return [Object]
115
- def update_jurisdiction_override(accountId, id, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
116
- put(path, model) end
117
- end
118
- end
120
+ # @return [Object]
121
+ def update_jurisdiction_override(accountId, id, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
122
+ put(path, model, {}, "21.12.0") end
123
+ end
124
+ end
119
125
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Locations
4
-
5
-
6
- # Add parameters to a location.
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Locations
4
+
5
+
6
+ # Add parameters to a location.
7
+ #
8
8
  # Add parameters to a location.
9
9
  #
10
10
  # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
@@ -19,42 +19,45 @@ module AvaTax
19
19
  #
20
20
  # ### Security Policies
21
21
  #
22
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
22
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
23
+ # Swagger Name: AvaTaxClient
23
24
  # @param companyId [Integer] The ID of the company that owns this location parameter.
24
25
  # @param locationId [Integer] The location id.
25
26
  # @param model [LocationParameterModel[]] The location parameters you wish to create.
26
- # @return [LocationParameterModel[]]
27
- def create_location_parameters(companyId, locationId, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
28
- post(path, model) end
29
-
30
- # Create a new location
31
- #
27
+ # @return [LocationParameterModel[]]
28
+ def create_location_parameters(companyId, locationId, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
29
+ post(path, model, {}, "21.12.0") end
30
+
31
+ # Create a new location
32
+ #
32
33
  # Create one or more new location objects attached to this company.
33
34
  #
34
35
  # ### Security Policies
35
36
  #
36
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
37
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
38
+ # Swagger Name: AvaTaxClient
37
39
  # @param companyId [Integer] The ID of the company that owns this location.
38
40
  # @param model [LocationModel[]] The location you wish to create.
39
- # @return [LocationModel[]]
40
- def create_locations(companyId, model) path = "/api/v2/companies/#{companyId}/locations"
41
- post(path, model) end
42
-
43
- # Delete a single location
44
- #
41
+ # @return [LocationModel[]]
42
+ def create_locations(companyId, model) path = "/api/v2/companies/#{companyId}/locations"
43
+ post(path, model, {}, "21.12.0") end
44
+
45
+ # Delete a single location
46
+ #
45
47
  # Mark the location object at this URL as deleted.
46
48
  #
47
49
  # ### Security Policies
48
50
  #
49
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
51
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
52
+ # Swagger Name: AvaTaxClient
50
53
  # @param companyId [Integer] The ID of the company that owns this location.
51
54
  # @param id [Integer] The ID of the location you wish to delete.
52
- # @return [ErrorDetail[]]
53
- def delete_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}"
54
- delete(path) end
55
-
56
- # Delete a single location parameter
57
- #
55
+ # @return [ErrorDetail[]]
56
+ def delete_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}"
57
+ delete(path, {}, "21.12.0") end
58
+
59
+ # Delete a single location parameter
60
+ #
58
61
  # Delete a single location parameter.
59
62
  #
60
63
  # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
@@ -65,16 +68,17 @@ module AvaTax
65
68
  #
66
69
  # ### Security Policies
67
70
  #
68
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
71
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
72
+ # Swagger Name: AvaTaxClient
69
73
  # @param companyId [Integer] The company id
70
74
  # @param locationId [Integer] The location id
71
75
  # @param id [Integer] The parameter id
72
- # @return [ErrorDetail[]]
73
- def delete_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
74
- delete(path) end
75
-
76
- # Retrieve a single location
77
- #
76
+ # @return [ErrorDetail[]]
77
+ def delete_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
78
+ delete(path, {}, "21.12.0") end
79
+
80
+ # Retrieve a single location
81
+ #
78
82
  # Get the location object identified by this URL.
79
83
  # An 'Location' represents a physical address where a company does business.
80
84
  # Many taxing authorities require that you define a list of all locations where your company does business.
@@ -88,16 +92,17 @@ module AvaTax
88
92
  #
89
93
  # ### Security Policies
90
94
  #
91
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
95
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
96
+ # Swagger Name: AvaTaxClient
92
97
  # @param companyId [Integer] The ID of the company that owns this location
93
98
  # @param id [Integer] The primary key of this location
94
99
  # @param include [String] A comma separated list of additional data to retrieve.
95
- # @return [Object]
96
- def get_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}"
97
- get(path, options) end
98
-
99
- # Retrieve a single company location parameter
100
- #
100
+ # @return [Object]
101
+ def get_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}"
102
+ get(path, options, "21.12.0") end
103
+
104
+ # Retrieve a single company location parameter
105
+ #
101
106
  # Retrieve a single location parameter.
102
107
  #
103
108
  # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
@@ -108,16 +113,17 @@ module AvaTax
108
113
  #
109
114
  # ### Security Policies
110
115
  #
111
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
116
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
117
+ # Swagger Name: AvaTaxClient
112
118
  # @param companyId [Integer] The company id
113
119
  # @param locationId [Integer] The location id
114
120
  # @param id [Integer] The parameter id
115
- # @return [Object]
116
- def get_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
117
- get(path) end
118
-
119
- # Retrieve parameters for a location
120
- #
121
+ # @return [Object]
122
+ def get_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
123
+ get(path, {}, "21.12.0") end
124
+
125
+ # Retrieve parameters for a location
126
+ #
121
127
  # List parameters for a location.
122
128
  #
123
129
  # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
@@ -131,19 +137,20 @@ module AvaTax
131
137
  #
132
138
  # ### Security Policies
133
139
  #
134
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
140
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
141
+ # Swagger Name: AvaTaxClient
135
142
  # @param companyId [Integer] The company id
136
143
  # @param locationId [Integer] The ID of the location
137
144
  # @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:* name, unit
138
145
  # @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.
139
146
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
140
147
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
141
- # @return [FetchResult]
142
- def list_location_parameters(companyId, locationId, options={}) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
143
- get(path, options) end
144
-
145
- # Retrieve locations for this company
146
- #
148
+ # @return [FetchResult]
149
+ def list_location_parameters(companyId, locationId, options={}) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
150
+ get(path, options, "21.12.0") end
151
+
152
+ # Retrieve locations for this company
153
+ #
147
154
  # List all location objects defined for this company.
148
155
  # An 'Location' represents a physical address where a company does business.
149
156
  # Many taxing authorities require that you define a list of all locations where your company does business.
@@ -159,19 +166,20 @@ module AvaTax
159
166
  #
160
167
  # ### Security Policies
161
168
  #
162
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
169
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
170
+ # Swagger Name: AvaTaxClient
163
171
  # @param companyId [Integer] The ID of the company that owns these locations
164
172
  # @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:* isMarketplaceOutsideUsa, settings, parameters
165
173
  # @param include [String] A comma separated list of additional data to retrieve.
166
174
  # @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.
167
175
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
168
176
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
169
- # @return [FetchResult]
170
- def list_locations_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/locations"
171
- get(path, options) end
172
-
173
- # Retrieve all locations
174
- #
177
+ # @return [FetchResult]
178
+ def list_locations_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/locations"
179
+ get(path, options, "21.12.0") end
180
+
181
+ # Retrieve all locations
182
+ #
175
183
  # Get multiple location objects across all companies.
176
184
  # An 'Location' represents a physical address where a company does business.
177
185
  # Many taxing authorities require that you define a list of all locations where your company does business.
@@ -188,34 +196,36 @@ module AvaTax
188
196
  #
189
197
  # ### Security Policies
190
198
  #
191
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
199
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
200
+ # Swagger Name: AvaTaxClient
192
201
  # @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:* isMarketplaceOutsideUsa, settings, parameters
193
202
  # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
194
203
  # @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.
195
204
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
196
205
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
197
- # @return [FetchResult]
198
- def query_locations(options={}) path = "/api/v2/locations"
199
- get(path, options) end
200
-
201
- # Update a single location
202
- #
206
+ # @return [FetchResult]
207
+ def query_locations(options={}) path = "/api/v2/locations"
208
+ get(path, options, "21.12.0") end
209
+
210
+ # Update a single location
211
+ #
203
212
  # Replace the existing location object at this URL with an updated object.
204
213
  # All data from the existing object will be replaced with data in the object you PUT.
205
214
  # 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.
206
215
  #
207
216
  # ### Security Policies
208
217
  #
209
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
218
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
219
+ # Swagger Name: AvaTaxClient
210
220
  # @param companyId [Integer] The ID of the company that this location belongs to.
211
221
  # @param id [Integer] The ID of the location you wish to update
212
222
  # @param model [Object] The location you wish to update.
213
- # @return [Object]
214
- def update_location(companyId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{id}"
215
- put(path, model) end
216
-
217
- # Update a location parameter
218
- #
223
+ # @return [Object]
224
+ def update_location(companyId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{id}"
225
+ put(path, model, {}, "21.12.0") end
226
+
227
+ # Update a location parameter
228
+ #
219
229
  # Update a location parameter.
220
230
  #
221
231
  # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
@@ -226,29 +236,31 @@ module AvaTax
226
236
  #
227
237
  # ### Security Policies
228
238
  #
229
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
239
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
240
+ # Swagger Name: AvaTaxClient
230
241
  # @param companyId [Integer] The company id.
231
242
  # @param locationId [Integer] The location id
232
243
  # @param id [Integer] The location parameter id
233
244
  # @param model [Object] The location parameter object you wish to update.
234
- # @return [Object]
235
- def update_location_parameter(companyId, locationId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
236
- put(path, model) end
237
-
238
- # Validate the location against local requirements
239
- #
245
+ # @return [Object]
246
+ def update_location_parameter(companyId, locationId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
247
+ put(path, model, {}, "21.12.0") end
248
+
249
+ # Validate the location against local requirements
250
+ #
240
251
  # Returns validation information for this location.
241
252
  # This API call is intended to compare this location against the currently known taxing authority rules and regulations,
242
253
  # and provide information about what additional work is required to completely setup this location.
243
254
  #
244
255
  # ### Security Policies
245
256
  #
246
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
257
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
258
+ # Swagger Name: AvaTaxClient
247
259
  # @param companyId [Integer] The ID of the company that owns this location
248
260
  # @param id [Integer] The primary key of this location
249
- # @return [Object]
250
- def validate_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}/validate"
251
- get(path) end
252
- end
253
- end
261
+ # @return [Object]
262
+ def validate_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}/validate"
263
+ get(path, {}, "21.12.0") end
264
+ end
265
+ end
254
266
  end