avatax 19.12.0 → 20.7.0

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