avatax 20.1.0 → 20.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/avatax.gemspec +0 -1
  3. data/lib/avatax/client/accounts.rb +236 -172
  4. data/lib/avatax/client/addresses.rb +54 -54
  5. data/lib/avatax/client/advancedrules.rb +63 -162
  6. data/lib/avatax/client/avafileforms.rb +78 -78
  7. data/lib/avatax/client/batches.rb +223 -170
  8. data/lib/avatax/client/certexpressinvites.rb +97 -97
  9. data/lib/avatax/client/certificates.rb +424 -424
  10. data/lib/avatax/client/companies.rb +457 -350
  11. data/lib/avatax/client/compliance.rb +15 -15
  12. data/lib/avatax/client/contacts.rb +106 -106
  13. data/lib/avatax/client/customers.rb +376 -376
  14. data/lib/avatax/client/datasources.rb +99 -99
  15. data/lib/avatax/client/definitions.rb +862 -847
  16. data/lib/avatax/client/distancethresholds.rb +122 -122
  17. data/lib/avatax/client/ecommercetoken.rb +37 -0
  18. data/lib/avatax/client/filingcalendars.rb +20 -508
  19. data/lib/avatax/client/filings.rb +37 -26
  20. data/lib/avatax/client/firmclientlinkages.rb +123 -123
  21. data/lib/avatax/client/free.rb +100 -100
  22. data/lib/avatax/client/fundingrequests.rb +52 -52
  23. data/lib/avatax/client/items.rb +423 -423
  24. data/lib/avatax/client/jurisdictionoverrides.rb +118 -118
  25. data/lib/avatax/client/locations.rb +253 -139
  26. data/lib/avatax/client/multidocument.rb +390 -310
  27. data/lib/avatax/client/nexus.rb +341 -201
  28. data/lib/avatax/client/notifications.rb +75 -75
  29. data/lib/avatax/client/provisioning.rb +49 -49
  30. data/lib/avatax/client/registrar.rb +198 -198
  31. data/lib/avatax/client/reports.rb +97 -97
  32. data/lib/avatax/client/settings.rb +156 -156
  33. data/lib/avatax/client/subscriptions.rb +62 -62
  34. data/lib/avatax/client/taxcodes.rb +120 -120
  35. data/lib/avatax/client/taxcontent.rb +133 -133
  36. data/lib/avatax/client/taxrules.rb +170 -170
  37. data/lib/avatax/client/transactions.rb +836 -791
  38. data/lib/avatax/client/upcs.rb +111 -111
  39. data/lib/avatax/client/users.rb +183 -183
  40. data/lib/avatax/client/utilities.rb +61 -61
  41. data/lib/avatax/connection.rb +3 -3
  42. data/lib/avatax/request.rb +2 -0
  43. data/lib/avatax/version.rb +1 -1
  44. metadata +4 -17
@@ -1,119 +1,119 @@
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) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
22
- post(path, model) end
23
-
24
- # Delete a single override
25
- #
26
- # Marks the item object at this URL as deleted.
27
- #
28
- # ### Security Policies
29
- #
30
- # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
31
- # @param accountId [Integer] The ID of the account that owns this override
32
- # @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
- #
39
- # Get the item object identified by this URL.
40
- #
41
- # A Jurisdiction Override is a configuration setting that allows you to select the taxing
42
- # jurisdiction for a specific address. If you encounter an address that is on the boundary
43
- # between two different jurisdictions, you can choose to set up a jurisdiction override
44
- # to switch this address to use different taxing jurisdictions.
45
- #
46
- # ### Security Policies
47
- #
48
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
49
- # @param accountId [Integer] The ID of the account that owns this override
50
- # @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
- #
57
- # List all jurisdiction override objects defined for this account.
58
- #
59
- # A Jurisdiction Override is a configuration setting that allows you to select the taxing
60
- # jurisdiction for a specific address. If you encounter an address that is on the boundary
61
- # between two different jurisdictions, you can choose to set up a jurisdiction override
62
- # to switch this address to use different taxing jurisdictions.
63
- #
64
- # 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/) .
65
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
66
- #
67
- # ### Security Policies
68
- #
69
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70
- # @param accountId [Integer] The ID of the account that owns this override
71
- # @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
- # @param include [String] A comma separated list of additional data to retrieve.
73
- # @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
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
75
- # @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
- #
82
- # Get multiple jurisdiction override objects across all companies.
83
- #
84
- # A Jurisdiction Override is a configuration setting that allows you to select the taxing
85
- # jurisdiction for a specific address. If you encounter an address that is on the boundary
86
- # between two different jurisdictions, you can choose to set up a jurisdiction override
87
- # to switch this address to use different taxing jurisdictions.
88
- #
89
- # 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/) .
90
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
91
- #
92
- # ### Security Policies
93
- #
94
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
95
- # @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
- # @param include [String] A comma separated list of additional data to retrieve.
97
- # @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
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
99
- # @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
- #
106
- # Replace the existing jurisdictionoverride object at this URL with an updated object.
107
- #
108
- # ### Security Policies
109
- #
110
- # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
111
- # @param accountId [Integer] The ID of the account that this jurisdictionoverride belongs to.
112
- # @param id [Integer] The ID of the jurisdictionoverride you wish to update
113
- # @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
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) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
22
+ post(path, model) end
23
+
24
+ # Delete a single override
25
+ #
26
+ # Marks the item object at this URL as deleted.
27
+ #
28
+ # ### Security Policies
29
+ #
30
+ # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
31
+ # @param accountId [Integer] The ID of the account that owns this override
32
+ # @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
+ #
39
+ # Get the item object identified by this URL.
40
+ #
41
+ # A Jurisdiction Override is a configuration setting that allows you to select the taxing
42
+ # jurisdiction for a specific address. If you encounter an address that is on the boundary
43
+ # between two different jurisdictions, you can choose to set up a jurisdiction override
44
+ # to switch this address to use different taxing jurisdictions.
45
+ #
46
+ # ### Security Policies
47
+ #
48
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
49
+ # @param accountId [Integer] The ID of the account that owns this override
50
+ # @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
+ #
57
+ # List all jurisdiction override objects defined for this account.
58
+ #
59
+ # A Jurisdiction Override is a configuration setting that allows you to select the taxing
60
+ # jurisdiction for a specific address. If you encounter an address that is on the boundary
61
+ # between two different jurisdictions, you can choose to set up a jurisdiction override
62
+ # to switch this address to use different taxing jurisdictions.
63
+ #
64
+ # 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/) .
65
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
66
+ #
67
+ # ### Security Policies
68
+ #
69
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70
+ # @param accountId [Integer] The ID of the account that owns this override
71
+ # @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
+ # @param include [String] A comma separated list of additional data to retrieve.
73
+ # @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
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
75
+ # @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
+ #
82
+ # Get multiple jurisdiction override objects across all companies.
83
+ #
84
+ # A Jurisdiction Override is a configuration setting that allows you to select the taxing
85
+ # jurisdiction for a specific address. If you encounter an address that is on the boundary
86
+ # between two different jurisdictions, you can choose to set up a jurisdiction override
87
+ # to switch this address to use different taxing jurisdictions.
88
+ #
89
+ # 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/) .
90
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
91
+ #
92
+ # ### Security Policies
93
+ #
94
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
95
+ # @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
+ # @param include [String] A comma separated list of additional data to retrieve.
97
+ # @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
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
99
+ # @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
+ #
106
+ # Replace the existing jurisdictionoverride object at this URL with an updated object.
107
+ #
108
+ # ### Security Policies
109
+ #
110
+ # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
111
+ # @param accountId [Integer] The ID of the account that this jurisdictionoverride belongs to.
112
+ # @param id [Integer] The ID of the jurisdictionoverride you wish to update
113
+ # @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
119
119
  end
@@ -1,140 +1,254 @@
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) path = "/api/v2/companies/#{companyId}/locations"
17
- post(path, model) end
18
-
19
- # Delete a single location
20
- #
21
- # Mark the location object at this URL as deleted.
22
- #
23
- # ### Security Policies
24
- #
25
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
26
- # @param companyId [Integer] The ID of the company that owns this location.
27
- # @param id [Integer] The ID of the location you wish to delete.
28
- # @return [ErrorDetail[]]
29
- def delete_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}"
30
- delete(path) end
31
-
32
- # Retrieve a single location
33
- #
34
- # Get the location object identified by this URL.
35
- # An 'Location' represents a physical address where a company does business.
36
- # Many taxing authorities require that you define a list of all locations where your company does business.
37
- # These locations may require additional custom configuration or tax registration with these authorities.
38
- # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
39
- #
40
- # 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:
41
- #
42
- # * LocationSettings
43
- #
44
- # ### Security Policies
45
- #
46
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
47
- # @param companyId [Integer] The ID of the company that owns this location
48
- # @param id [Integer] The primary key of this location
49
- # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
50
- # @return [Object]
51
- def get_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}"
52
- get(path, options) end
53
-
54
- # Retrieve locations for this company
55
- #
56
- # List all location objects defined for this company.
57
- # An 'Location' represents a physical address where a company does business.
58
- # Many taxing authorities require that you define a list of all locations where your company does business.
59
- # These locations may require additional custom configuration or tax registration with these authorities.
60
- # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
61
- #
62
- # 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/) .
63
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
64
- # 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:
65
- #
66
- # * LocationSettings
67
- #
68
- # ### Security Policies
69
- #
70
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
71
- # @param companyId [Integer] The ID of the company that owns these locations
72
- # @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
73
- # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
74
- # @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.
75
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
76
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
77
- # @return [FetchResult]
78
- def list_locations_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/locations"
79
- get(path, options) end
80
-
81
- # Retrieve all locations
82
- #
83
- # Get multiple location objects across all companies.
84
- # An 'Location' represents a physical address where a company does business.
85
- # Many taxing authorities require that you define a list of all locations where your company does business.
86
- # These locations may require additional custom configuration or tax registration with these authorities.
87
- # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
88
- #
89
- # 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/) .
90
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
91
- #
92
- # 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:
93
- #
94
- # * LocationSettings
95
- #
96
- # ### Security Policies
97
- #
98
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
99
- # @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
100
- # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
101
- # @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.
102
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
103
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
104
- # @return [FetchResult]
105
- def query_locations(options={}) path = "/api/v2/locations"
106
- get(path, options) end
107
-
108
- # Update a single location
109
- #
110
- # Replace the existing location object at this URL with an updated object.
111
- # All data from the existing object will be replaced with data in the object you PUT.
112
- # 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.
113
- #
114
- # ### Security Policies
115
- #
116
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
117
- # @param companyId [Integer] The ID of the company that this location belongs to.
118
- # @param id [Integer] The ID of the location you wish to update
119
- # @param model [Object] The location you wish to update.
120
- # @return [Object]
121
- def update_location(companyId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{id}"
122
- put(path, model) end
123
-
124
- # Validate the location against local requirements
125
- #
126
- # Returns validation information for this location.
127
- # This API call is intended to compare this location against the currently known taxing authority rules and regulations,
128
- # and provide information about what additional work is required to completely setup this location.
129
- #
130
- # ### Security Policies
131
- #
132
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
133
- # @param companyId [Integer] The ID of the company that owns this location
134
- # @param id [Integer] The primary key of this location
135
- # @return [Object]
136
- def validate_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}/validate"
137
- get(path) end
138
- end
139
- end
1
+ module AvaTax
2
+ class Client
3
+ module Locations
4
+
5
+
6
+ # Add parameters to a location.
7
+ #
8
+ # Add parameters to a location.
9
+ #
10
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
11
+ #
12
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
13
+ #
14
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
15
+ #
16
+ # To see available parameters for this location, call `/api/v2/definitions/parameters?$filter=attributeType eq Company`
17
+ #
18
+ # Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
19
+ #
20
+ # ### Security Policies
21
+ #
22
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
23
+ # @param companyId [Integer] The ID of the company that owns this location parameter.
24
+ # @param locationId [Integer] The location id.
25
+ # @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
+ #
32
+ # Create one or more new location objects attached to this company.
33
+ #
34
+ # ### Security Policies
35
+ #
36
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
37
+ # @param companyId [Integer] The ID of the company that owns this location.
38
+ # @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
+ #
45
+ # Mark the location object at this URL as deleted.
46
+ #
47
+ # ### Security Policies
48
+ #
49
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
50
+ # @param companyId [Integer] The ID of the company that owns this location.
51
+ # @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
+ #
58
+ # Delete a single location parameter.
59
+ #
60
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
61
+ #
62
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
63
+ #
64
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
65
+ #
66
+ # ### Security Policies
67
+ #
68
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
69
+ # @param companyId [Integer] The company id
70
+ # @param locationId [Integer] The location id
71
+ # @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
+ #
78
+ # Get the location object identified by this URL.
79
+ # An 'Location' represents a physical address where a company does business.
80
+ # Many taxing authorities require that you define a list of all locations where your company does business.
81
+ # These locations may require additional custom configuration or tax registration with these authorities.
82
+ # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
83
+ #
84
+ # 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:
85
+ #
86
+ # * LocationSettings
87
+ # * parameters
88
+ #
89
+ # ### Security Policies
90
+ #
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.
92
+ # @param companyId [Integer] The ID of the company that owns this location
93
+ # @param id [Integer] The primary key of this location
94
+ # @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
+ #
101
+ # Retrieve a single location parameter.
102
+ #
103
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
104
+ #
105
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
106
+ #
107
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
108
+ #
109
+ # ### Security Policies
110
+ #
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.
112
+ # @param companyId [Integer] The company id
113
+ # @param locationId [Integer] The location id
114
+ # @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
+ # List parameters for a location.
122
+ #
123
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
124
+ #
125
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
126
+ #
127
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
128
+ #
129
+ # 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/) .
130
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
131
+ #
132
+ # ### Security Policies
133
+ #
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.
135
+ # @param companyId [Integer] The company id
136
+ # @param locationId [Integer] The ID of the location
137
+ # @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
+ # @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
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
140
+ # @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
+ #
147
+ # List all location objects defined for this company.
148
+ # An 'Location' represents a physical address where a company does business.
149
+ # Many taxing authorities require that you define a list of all locations where your company does business.
150
+ # These locations may require additional custom configuration or tax registration with these authorities.
151
+ # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
152
+ #
153
+ # 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/) .
154
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
155
+ # 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:
156
+ #
157
+ # * LocationSettings
158
+ # * parameters
159
+ #
160
+ # ### Security Policies
161
+ #
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.
163
+ # @param companyId [Integer] The ID of the company that owns these locations
164
+ # @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
165
+ # @param include [String] A comma separated list of additional data to retrieve.
166
+ # @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
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
168
+ # @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
+ #
175
+ # Get multiple location objects across all companies.
176
+ # An 'Location' represents a physical address where a company does business.
177
+ # Many taxing authorities require that you define a list of all locations where your company does business.
178
+ # These locations may require additional custom configuration or tax registration with these authorities.
179
+ # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
180
+ #
181
+ # 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/) .
182
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
183
+ #
184
+ # 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:
185
+ #
186
+ # * LocationSettings
187
+ # * parameters
188
+ #
189
+ # ### Security Policies
190
+ #
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.
192
+ # @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
193
+ # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
194
+ # @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
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
196
+ # @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
+ #
203
+ # Replace the existing location object at this URL with an updated object.
204
+ # All data from the existing object will be replaced with data in the object you PUT.
205
+ # 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
+ #
207
+ # ### Security Policies
208
+ #
209
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
210
+ # @param companyId [Integer] The ID of the company that this location belongs to.
211
+ # @param id [Integer] The ID of the location you wish to update
212
+ # @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
+ #
219
+ # Update a location parameter.
220
+ #
221
+ # Some locations can be taxed differently depending on the properties of that location. In AvaTax, these tax-affecting properties are called "parameters".
222
+ #
223
+ # A parameter added to a location will be used by default in tax calculation but will not show on the transaction line referencing the location.
224
+ #
225
+ # A parameter specified on a transaction line will override a location parameter if they share the same parameter name.
226
+ #
227
+ # ### Security Policies
228
+ #
229
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
230
+ # @param companyId [Integer] The company id.
231
+ # @param locationId [Integer] The location id
232
+ # @param id [Integer] The location parameter id
233
+ # @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
+ #
240
+ # Returns validation information for this location.
241
+ # This API call is intended to compare this location against the currently known taxing authority rules and regulations,
242
+ # and provide information about what additional work is required to completely setup this location.
243
+ #
244
+ # ### Security Policies
245
+ #
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.
247
+ # @param companyId [Integer] The ID of the company that owns this location
248
+ # @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
140
254
  end