avatax 20.1.0 → 20.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,63 +1,63 @@
1
- module AvaTax
2
- class Client
3
- module Subscriptions
4
-
5
-
6
- # Retrieve a single subscription
7
- #
8
- # Get the subscription object identified by this URL.
9
- # A 'subscription' indicates a licensed subscription to a named Avalara service.
10
- # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
11
- #
12
- # ### Security Policies
13
- #
14
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
15
- # @param accountId [Integer] The ID of the account that owns this subscription
16
- # @param id [Integer] The primary key of this subscription
17
- # @return [Object]
18
- def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
19
- get(path) end
20
-
21
- # Retrieve subscriptions for this account
22
- #
23
- # List all subscription objects attached to this account.
24
- # A 'subscription' indicates a licensed subscription to a named Avalara service.
25
- # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
26
- #
27
- # 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/) .
28
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
29
- #
30
- # ### Security Policies
31
- #
32
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
33
- # @param accountId [Integer] The ID of the account that owns these subscriptions
34
- # @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:* subscriptionDescription
35
- # @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.
36
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
37
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
38
- # @return [FetchResult]
39
- def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
40
- get(path, options) end
41
-
42
- # Retrieve all subscriptions
43
- #
44
- # Get multiple subscription objects across all accounts.
45
- # A 'subscription' indicates a licensed subscription to a named Avalara service.
46
- # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
47
- #
48
- # 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/) .
49
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
50
- #
51
- # ### Security Policies
52
- #
53
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
54
- # @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:* subscriptionDescription
55
- # @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.
56
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
57
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
58
- # @return [FetchResult]
59
- def query_subscriptions(options={}) path = "/api/v2/subscriptions"
60
- get(path, options) end
61
- end
62
- end
1
+ module AvaTax
2
+ class Client
3
+ module Subscriptions
4
+
5
+
6
+ # Retrieve a single subscription
7
+ #
8
+ # Get the subscription object identified by this URL.
9
+ # A 'subscription' indicates a licensed subscription to a named Avalara service.
10
+ # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
11
+ #
12
+ # ### Security Policies
13
+ #
14
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
15
+ # @param accountId [Integer] The ID of the account that owns this subscription
16
+ # @param id [Integer] The primary key of this subscription
17
+ # @return [Object]
18
+ def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
19
+ get(path) end
20
+
21
+ # Retrieve subscriptions for this account
22
+ #
23
+ # List all subscription objects attached to this account.
24
+ # A 'subscription' indicates a licensed subscription to a named Avalara service.
25
+ # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
26
+ #
27
+ # 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/) .
28
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
29
+ #
30
+ # ### Security Policies
31
+ #
32
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
33
+ # @param accountId [Integer] The ID of the account that owns these subscriptions
34
+ # @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:* subscriptionDescription
35
+ # @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.
36
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
37
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
38
+ # @return [FetchResult]
39
+ def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
40
+ get(path, options) end
41
+
42
+ # Retrieve all subscriptions
43
+ #
44
+ # Get multiple subscription objects across all accounts.
45
+ # A 'subscription' indicates a licensed subscription to a named Avalara service.
46
+ # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
47
+ #
48
+ # 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/) .
49
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
50
+ #
51
+ # ### Security Policies
52
+ #
53
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
54
+ # @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:* subscriptionDescription
55
+ # @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.
56
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
57
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
58
+ # @return [FetchResult]
59
+ def query_subscriptions(options={}) path = "/api/v2/subscriptions"
60
+ get(path, options) end
61
+ end
62
+ end
63
63
  end
@@ -1,121 +1,121 @@
1
- module AvaTax
2
- class Client
3
- module TaxCodes
4
-
5
-
6
- # Create a new tax code
7
- #
8
- # Create one or more new taxcode objects attached to this company.
9
- # A 'TaxCode' represents a uniquely identified type of product, good, or service.
10
- # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
11
- # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
12
- # taxability rules for this product in all supported jurisdictions.
13
- #
14
- # ### Security Policies
15
- #
16
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
17
- # @param companyId [Integer] The ID of the company that owns this tax code.
18
- # @param model [TaxCodeModel[]] The tax code you wish to create.
19
- # @return [TaxCodeModel[]]
20
- def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
21
- post(path, model) end
22
-
23
- # Delete a single tax code
24
- #
25
- # Marks the existing TaxCode object at this URL as deleted.
26
- #
27
- # ### Security Policies
28
- #
29
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
30
- # @param companyId [Integer] The ID of the company that owns this tax code.
31
- # @param id [Integer] The ID of the tax code you wish to delete.
32
- # @return [ErrorDetail[]]
33
- def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
34
- delete(path) end
35
-
36
- # Retrieve a single tax code
37
- #
38
- # Get the taxcode object identified by this URL.
39
- # A 'TaxCode' represents a uniquely identified type of product, good, or service.
40
- # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
41
- # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
42
- # taxability rules for this product in all supported jurisdictions.
43
- #
44
- # ### Security Policies
45
- #
46
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
47
- # @param companyId [Integer] The ID of the company that owns this tax code
48
- # @param id [Integer] The primary key of this tax code
49
- # @return [Object]
50
- def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
51
- get(path) end
52
-
53
- # Retrieve tax codes for this company
54
- #
55
- # List all taxcode objects attached to this company.
56
- # A 'TaxCode' represents a uniquely identified type of product, good, or service.
57
- # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
58
- # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
59
- # taxability rules for this product in all supported jurisdictions.
60
- #
61
- # 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/) .
62
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
63
- #
64
- # ### Security Policies
65
- #
66
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
67
- # @param companyId [Integer] The ID of the company that owns these tax codes
68
- # @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/).
69
- # @param include [String] A comma separated list of additional data to retrieve.
70
- # @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.
71
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
72
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
73
- # @return [FetchResult]
74
- def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
75
- get(path, options) end
76
-
77
- # Retrieve all tax codes
78
- #
79
- # Get multiple taxcode objects across all companies.
80
- # A 'TaxCode' represents a uniquely identified type of product, good, or service.
81
- # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
82
- # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
83
- # taxability rules for this product in all supported jurisdictions.
84
- #
85
- # 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/) .
86
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
87
- #
88
- # ### Security Policies
89
- #
90
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
91
- # @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/).
92
- # @param include [String] A comma separated list of additional data to retrieve.
93
- # @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.
94
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
95
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
96
- # @return [FetchResult]
97
- def query_tax_codes(options={}) path = "/api/v2/taxcodes"
98
- get(path, options) end
99
-
100
- # Update a single tax code
101
- #
102
- # Replace the existing taxcode object at this URL with an updated object.
103
- # A 'TaxCode' represents a uniquely identified type of product, good, or service.
104
- # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
105
- # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
106
- # taxability rules for this product in all supported jurisdictions.
107
- # All data from the existing object will be replaced with data in the object you PUT.
108
- # 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.
109
- #
110
- # ### Security Policies
111
- #
112
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
113
- # @param companyId [Integer] The ID of the company that this tax code belongs to.
114
- # @param id [Integer] The ID of the tax code you wish to update
115
- # @param model [Object] The tax code you wish to update.
116
- # @return [Object]
117
- def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
118
- put(path, model) end
119
- end
120
- end
1
+ module AvaTax
2
+ class Client
3
+ module TaxCodes
4
+
5
+
6
+ # Create a new tax code
7
+ #
8
+ # Create one or more new taxcode objects attached to this company.
9
+ # A 'TaxCode' represents a uniquely identified type of product, good, or service.
10
+ # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
11
+ # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
12
+ # taxability rules for this product in all supported jurisdictions.
13
+ #
14
+ # ### Security Policies
15
+ #
16
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
17
+ # @param companyId [Integer] The ID of the company that owns this tax code.
18
+ # @param model [TaxCodeModel[]] The tax code you wish to create.
19
+ # @return [TaxCodeModel[]]
20
+ def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
21
+ post(path, model) end
22
+
23
+ # Delete a single tax code
24
+ #
25
+ # Marks the existing TaxCode object at this URL as deleted.
26
+ #
27
+ # ### Security Policies
28
+ #
29
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
30
+ # @param companyId [Integer] The ID of the company that owns this tax code.
31
+ # @param id [Integer] The ID of the tax code you wish to delete.
32
+ # @return [ErrorDetail[]]
33
+ def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
34
+ delete(path) end
35
+
36
+ # Retrieve a single tax code
37
+ #
38
+ # Get the taxcode object identified by this URL.
39
+ # A 'TaxCode' represents a uniquely identified type of product, good, or service.
40
+ # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
41
+ # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
42
+ # taxability rules for this product in all supported jurisdictions.
43
+ #
44
+ # ### Security Policies
45
+ #
46
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
47
+ # @param companyId [Integer] The ID of the company that owns this tax code
48
+ # @param id [Integer] The primary key of this tax code
49
+ # @return [Object]
50
+ def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
51
+ get(path) end
52
+
53
+ # Retrieve tax codes for this company
54
+ #
55
+ # List all taxcode objects attached to this company.
56
+ # A 'TaxCode' represents a uniquely identified type of product, good, or service.
57
+ # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
58
+ # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
59
+ # taxability rules for this product in all supported jurisdictions.
60
+ #
61
+ # 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/) .
62
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
63
+ #
64
+ # ### Security Policies
65
+ #
66
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
67
+ # @param companyId [Integer] The ID of the company that owns these tax codes
68
+ # @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/).
69
+ # @param include [String] A comma separated list of additional data to retrieve.
70
+ # @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.
71
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
72
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
73
+ # @return [FetchResult]
74
+ def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
75
+ get(path, options) end
76
+
77
+ # Retrieve all tax codes
78
+ #
79
+ # Get multiple taxcode objects across all companies.
80
+ # A 'TaxCode' represents a uniquely identified type of product, good, or service.
81
+ # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
82
+ # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
83
+ # taxability rules for this product in all supported jurisdictions.
84
+ #
85
+ # 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/) .
86
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
87
+ #
88
+ # ### Security Policies
89
+ #
90
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
91
+ # @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/).
92
+ # @param include [String] A comma separated list of additional data to retrieve.
93
+ # @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.
94
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
95
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
96
+ # @return [FetchResult]
97
+ def query_tax_codes(options={}) path = "/api/v2/taxcodes"
98
+ get(path, options) end
99
+
100
+ # Update a single tax code
101
+ #
102
+ # Replace the existing taxcode object at this URL with an updated object.
103
+ # A 'TaxCode' represents a uniquely identified type of product, good, or service.
104
+ # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
105
+ # If you identify your products by tax code in your 'Create Transacion' API calls, Avalara will correctly calculate tax rates and
106
+ # taxability rules for this product in all supported jurisdictions.
107
+ # All data from the existing object will be replaced with data in the object you PUT.
108
+ # 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.
109
+ #
110
+ # ### Security Policies
111
+ #
112
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
113
+ # @param companyId [Integer] The ID of the company that this tax code belongs to.
114
+ # @param id [Integer] The ID of the tax code you wish to update
115
+ # @param model [Object] The tax code you wish to update.
116
+ # @return [Object]
117
+ def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
118
+ put(path, model) end
119
+ end
120
+ end
121
121
  end
@@ -1,134 +1,134 @@
1
- module AvaTax
2
- class Client
3
- module TaxContent
4
-
5
-
6
- # Build a multi-location tax content file
7
- #
8
- # Builds a tax content file containing information useful for a retail point-of-sale solution.
9
- #
10
- # Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
11
- # that users of this tax content API download new data every day. Many tax authorities may finalize
12
- # decisions on tax changes at unexpected times and may make changes in response to legal issues or
13
- # governmental priorities. Any tax content downloaded for future time periods is subject to change
14
- # if tax rates or tax laws change.
15
- #
16
- # A TaxContent file contains a matrix of the taxes that would be charged when you sell any of your
17
- # Items at any of your Locations. To create items, use `CreateItems()`. To create locations, use
18
- # `CreateLocations()`. The file is built by looking up the tax profile for your location and your
19
- # item and calculating taxes for each in turn. To include a custom `TaxCode` in this tax content
20
- # file, first create the custom tax code using `CreateTaxCodes()` to create the custom tax code,
21
- # then use `CreateItems()` to create an item that uses the custom tax code.
22
- #
23
- # This data file can be customized for specific partner devices and usage conditions.
24
- #
25
- # The result of this API is the file you requested in the format you requested using the `responseType` field.
26
- #
27
- # This API builds the file on demand, and is limited to files with no more than 7500 scenarios. To build a tax content
28
- # file for a single location at a time, please use `BuildTaxContentFileForLocation`.
29
- #
30
- # NOTE: This API does not work for Tennessee tax holiday scenarios.
31
- #
32
- # ### Security Policies
33
- #
34
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
35
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
36
- # @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
37
- # @return [Object]
38
- def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
39
- post(path, model) end
40
-
41
- # Build a tax content file for a single location
42
- #
43
- # Builds a tax content file containing information useful for a retail point-of-sale solution.
44
- #
45
- # Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
46
- # that users of this tax content API download new data every day. Many tax authorities may finalize
47
- # decisions on tax changes at unexpected times and may make changes in response to legal issues or
48
- # governmental priorities. Any tax content downloaded for future time periods is subject to change
49
- # if tax rates or tax laws change.
50
- #
51
- # A TaxContent file contains a matrix of the taxes that would be charged when you sell any of your
52
- # Items at any of your Locations. To create items, use `CreateItems()`. To create locations, use
53
- # `CreateLocations()`. The file is built by looking up the tax profile for your location and your
54
- # item and calculating taxes for each in turn. To include a custom `TaxCode` in this tax content
55
- # file, first create the custom tax code using `CreateTaxCodes()` to create the custom tax code,
56
- # then use `CreateItems()` to create an item that uses the custom tax code.
57
- #
58
- # This data file can be customized for specific partner devices and usage conditions.
59
- #
60
- # The result of this API is the file you requested in the format you requested using the `responseType` field.
61
- #
62
- # This API builds the file on demand, and is limited to files with no more than 7500 scenarios. To build a tax content
63
- # file for a multiple locations in a single file, please use `BuildTaxContentFile`.
64
- #
65
- # NOTE: This API does not work for Tennessee tax holiday scenarios.
66
- #
67
- # ### Security Policies
68
- #
69
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
70
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
71
- # @param companyId [Integer] The ID number of the company that owns this location.
72
- # @param id [Integer] The ID number of the location to retrieve point-of-sale data.
73
- # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
74
- # @param format [String] The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values)
75
- # @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
76
- # @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
77
- # @return [Object]
78
- def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
79
- get(path, options) end
80
-
81
- # Download a file listing tax rates by postal code
82
- #
83
- # Download a CSV file containing all five digit postal codes in the United States and their sales
84
- # and use tax rates for tangible personal property.
85
- #
86
- # Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
87
- # that users of this tax content API download new data every day. Many tax authorities may finalize
88
- # decisions on tax changes at unexpected times and may make changes in response to legal issues or
89
- # governmental priorities. Any tax content downloaded for future time periods is subject to change
90
- # if tax rates or tax laws change.
91
- #
92
- # This rates file is intended to be used as a default for tax calculation when your software cannot
93
- # call the `CreateTransaction` API call. When using this file, your software will be unable to
94
- # handle complex tax rules such as:
95
- #
96
- # * Zip+4 - This tax file contains five digit zip codes only.
97
- # * Different product types - This tax file contains tangible personal property tax rates only.
98
- # * Mixed sourcing - This tax file cannot be used to resolve origin-based taxes.
99
- # * Threshold-based taxes - This tax file does not contain information about thresholds.
100
- #
101
- # If you use this file to provide default tax rates, please ensure that your software calls `CreateTransaction`
102
- # to reconcile the actual transaction and determine the difference between the estimated general tax
103
- # rate and the final transaction tax.
104
- #
105
- # The file provided by this API is in CSV format with the following columns:
106
- #
107
- # * ZIP_CODE - The five digit zip code for this record.
108
- # * STATE_ABBREV - A valid two character US state abbreviation for this record. Zip codes may span multiple states.
109
- # * COUNTY_NAME - A valid county name for this record. Zip codes may span multiple counties.
110
- # * CITY_NAME - A valid city name for this record. Zip codes may span multiple cities.
111
- # * STATE_SALES_TAX - The state component of the sales tax rate.
112
- # * STATE_USE_TAX - The state component of the use tax rate.
113
- # * COUNTY_SALES_TAX - The county component of the sales tax rate.
114
- # * COUNTY_USE_TAX - The county component of the use tax rate.
115
- # * CITY_SALES_TAX - The city component of the sales tax rate.
116
- # * CITY_USE_TAX - The city component of the use tax rate.
117
- # * TOTAL_SALES_TAX - The total tax rate for sales tax for this postal code. This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
118
- # * TOTAL_USE_TAX - The total tax rate for use tax for this postal code. This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
119
- # * TAX_SHIPPING_ALONE - This column contains 'Y' if shipping is taxable.
120
- # * TAX_SHIPPING_AND_HANDLING_TOGETHER - This column contains 'Y' if shipping and handling are taxable when sent together.
121
- #
122
- # For more detailed tax content, please use the `BuildTaxContentFile` API which allows usage of exact items and exact locations.
123
- #
124
- # ### Security Policies
125
- #
126
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
127
- # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
128
- # @param region [String] A two character region code which limits results to a specific region.
129
- # @return [Object]
130
- def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
131
- get(path, options) end
132
- end
133
- end
1
+ module AvaTax
2
+ class Client
3
+ module TaxContent
4
+
5
+
6
+ # Build a multi-location tax content file
7
+ #
8
+ # Builds a tax content file containing information useful for a retail point-of-sale solution.
9
+ #
10
+ # Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
11
+ # that users of this tax content API download new data every day. Many tax authorities may finalize
12
+ # decisions on tax changes at unexpected times and may make changes in response to legal issues or
13
+ # governmental priorities. Any tax content downloaded for future time periods is subject to change
14
+ # if tax rates or tax laws change.
15
+ #
16
+ # A TaxContent file contains a matrix of the taxes that would be charged when you sell any of your
17
+ # Items at any of your Locations. To create items, use `CreateItems()`. To create locations, use
18
+ # `CreateLocations()`. The file is built by looking up the tax profile for your location and your
19
+ # item and calculating taxes for each in turn. To include a custom `TaxCode` in this tax content
20
+ # file, first create the custom tax code using `CreateTaxCodes()` to create the custom tax code,
21
+ # then use `CreateItems()` to create an item that uses the custom tax code.
22
+ #
23
+ # This data file can be customized for specific partner devices and usage conditions.
24
+ #
25
+ # The result of this API is the file you requested in the format you requested using the `responseType` field.
26
+ #
27
+ # This API builds the file on demand, and is limited to files with no more than 7500 scenarios. To build a tax content
28
+ # file for a single location at a time, please use `BuildTaxContentFileForLocation`.
29
+ #
30
+ # NOTE: This API does not work for Tennessee tax holiday scenarios.
31
+ #
32
+ # ### Security Policies
33
+ #
34
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
35
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
36
+ # @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
37
+ # @return [Object]
38
+ def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
39
+ post(path, model) end
40
+
41
+ # Build a tax content file for a single location
42
+ #
43
+ # Builds a tax content file containing information useful for a retail point-of-sale solution.
44
+ #
45
+ # Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
46
+ # that users of this tax content API download new data every day. Many tax authorities may finalize
47
+ # decisions on tax changes at unexpected times and may make changes in response to legal issues or
48
+ # governmental priorities. Any tax content downloaded for future time periods is subject to change
49
+ # if tax rates or tax laws change.
50
+ #
51
+ # A TaxContent file contains a matrix of the taxes that would be charged when you sell any of your
52
+ # Items at any of your Locations. To create items, use `CreateItems()`. To create locations, use
53
+ # `CreateLocations()`. The file is built by looking up the tax profile for your location and your
54
+ # item and calculating taxes for each in turn. To include a custom `TaxCode` in this tax content
55
+ # file, first create the custom tax code using `CreateTaxCodes()` to create the custom tax code,
56
+ # then use `CreateItems()` to create an item that uses the custom tax code.
57
+ #
58
+ # This data file can be customized for specific partner devices and usage conditions.
59
+ #
60
+ # The result of this API is the file you requested in the format you requested using the `responseType` field.
61
+ #
62
+ # This API builds the file on demand, and is limited to files with no more than 7500 scenarios. To build a tax content
63
+ # file for a multiple locations in a single file, please use `BuildTaxContentFile`.
64
+ #
65
+ # NOTE: This API does not work for Tennessee tax holiday scenarios.
66
+ #
67
+ # ### Security Policies
68
+ #
69
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
70
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
71
+ # @param companyId [Integer] The ID number of the company that owns this location.
72
+ # @param id [Integer] The ID number of the location to retrieve point-of-sale data.
73
+ # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
74
+ # @param format [String] The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values)
75
+ # @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
76
+ # @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
77
+ # @return [Object]
78
+ def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
79
+ get(path, options) end
80
+
81
+ # Download a file listing tax rates by postal code
82
+ #
83
+ # Download a CSV file containing all five digit postal codes in the United States and their sales
84
+ # and use tax rates for tangible personal property.
85
+ #
86
+ # Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
87
+ # that users of this tax content API download new data every day. Many tax authorities may finalize
88
+ # decisions on tax changes at unexpected times and may make changes in response to legal issues or
89
+ # governmental priorities. Any tax content downloaded for future time periods is subject to change
90
+ # if tax rates or tax laws change.
91
+ #
92
+ # This rates file is intended to be used as a default for tax calculation when your software cannot
93
+ # call the `CreateTransaction` API call. When using this file, your software will be unable to
94
+ # handle complex tax rules such as:
95
+ #
96
+ # * Zip+4 - This tax file contains five digit zip codes only.
97
+ # * Different product types - This tax file contains tangible personal property tax rates only.
98
+ # * Mixed sourcing - This tax file cannot be used to resolve origin-based taxes.
99
+ # * Threshold-based taxes - This tax file does not contain information about thresholds.
100
+ #
101
+ # If you use this file to provide default tax rates, please ensure that your software calls `CreateTransaction`
102
+ # to reconcile the actual transaction and determine the difference between the estimated general tax
103
+ # rate and the final transaction tax.
104
+ #
105
+ # The file provided by this API is in CSV format with the following columns:
106
+ #
107
+ # * ZIP_CODE - The five digit zip code for this record.
108
+ # * STATE_ABBREV - A valid two character US state abbreviation for this record. Zip codes may span multiple states.
109
+ # * COUNTY_NAME - A valid county name for this record. Zip codes may span multiple counties.
110
+ # * CITY_NAME - A valid city name for this record. Zip codes may span multiple cities.
111
+ # * STATE_SALES_TAX - The state component of the sales tax rate.
112
+ # * STATE_USE_TAX - The state component of the use tax rate.
113
+ # * COUNTY_SALES_TAX - The county component of the sales tax rate.
114
+ # * COUNTY_USE_TAX - The county component of the use tax rate.
115
+ # * CITY_SALES_TAX - The city component of the sales tax rate.
116
+ # * CITY_USE_TAX - The city component of the use tax rate.
117
+ # * TOTAL_SALES_TAX - The total tax rate for sales tax for this postal code. This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
118
+ # * TOTAL_USE_TAX - The total tax rate for use tax for this postal code. This value may not equal the sum of the state/county/city due to special tax jurisdiction rules.
119
+ # * TAX_SHIPPING_ALONE - This column contains 'Y' if shipping is taxable.
120
+ # * TAX_SHIPPING_AND_HANDLING_TOGETHER - This column contains 'Y' if shipping and handling are taxable when sent together.
121
+ #
122
+ # For more detailed tax content, please use the `BuildTaxContentFile` API which allows usage of exact items and exact locations.
123
+ #
124
+ # ### Security Policies
125
+ #
126
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
127
+ # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
128
+ # @param region [String] A two character region code which limits results to a specific region.
129
+ # @return [Object]
130
+ def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
131
+ get(path, options) end
132
+ end
133
+ end
134
134
  end