avatax 20.9.0 → 21.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.vs/slnx.sqlite +0 -0
  3. data/lib/avatax/client/accounts.rb +83 -83
  4. data/lib/avatax/client/addresses.rb +21 -21
  5. data/lib/avatax/client/advancedrules.rb +41 -51
  6. data/lib/avatax/client/avafileforms.rb +41 -41
  7. data/lib/avatax/client/batches.rb +62 -62
  8. data/lib/avatax/client/certexpressinvites.rb +39 -39
  9. data/lib/avatax/client/certificates.rb +163 -163
  10. data/lib/avatax/client/companies.rb +157 -156
  11. data/lib/avatax/client/contacts.rb +48 -48
  12. data/lib/avatax/client/customers.rb +145 -145
  13. data/lib/avatax/client/datasources.rb +48 -48
  14. data/lib/avatax/client/definitions.rb +591 -422
  15. data/lib/avatax/client/distancethresholds.rb +48 -48
  16. data/lib/avatax/client/ecms.rb +26 -31
  17. data/lib/avatax/client/ecommercetoken.rb +17 -17
  18. data/lib/avatax/client/errortransactions.rb +27 -15
  19. data/lib/avatax/client/filingcalendars.rb +48 -12
  20. data/lib/avatax/client/filings.rb +23 -21
  21. data/lib/avatax/client/firmclientlinkages.rb +69 -69
  22. data/lib/avatax/client/free.rb +13 -86
  23. data/lib/avatax/client/fundingrequests.rb +20 -20
  24. data/lib/avatax/client/items.rb +255 -137
  25. data/lib/avatax/client/jurisdictionoverrides.rb +48 -48
  26. data/lib/avatax/client/locations.rb +92 -92
  27. data/lib/avatax/client/multidocument.rb +78 -78
  28. data/lib/avatax/client/nexus.rb +133 -105
  29. data/lib/avatax/client/notices.rb +43 -504
  30. data/lib/avatax/client/notifications.rb +27 -27
  31. data/lib/avatax/client/provisioning.rb +20 -20
  32. data/lib/avatax/client/registrar.rb +85 -75
  33. data/lib/avatax/client/reports.rb +44 -35
  34. data/lib/avatax/client/settings.rb +55 -50
  35. data/lib/avatax/client/subscriptions.rb +27 -27
  36. data/lib/avatax/client/taxcodes.rb +48 -48
  37. data/lib/avatax/client/taxcontent.rb +90 -27
  38. data/lib/avatax/client/taxprofiles.rb +14 -10
  39. data/lib/avatax/client/taxrules.rb +50 -50
  40. data/lib/avatax/client/transactions.rb +155 -155
  41. data/lib/avatax/client/upcs.rb +48 -48
  42. data/lib/avatax/client/users.rb +64 -64
  43. data/lib/avatax/client/utilities.rb +27 -27
  44. data/lib/avatax/configuration.rb +1 -1
  45. data/lib/avatax/request.rb +11 -5
  46. data/lib/avatax/version.rb +1 -1
  47. data/spec/avatax/request_spec.rb +25 -0
  48. metadata +12 -4
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Settings
4
-
5
-
6
- # Create a new setting
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Settings
4
+
5
+
6
+ # Create a new setting
7
+ #
8
8
  # Create one or more new setting objects attached to this company.
9
9
  #
10
10
  # The company settings system is a metadata system that you can use to store extra information
@@ -16,17 +16,22 @@ module AvaTax
16
16
  # When creating this object, you may define your own `set`, `name`, and `value` parameters.
17
17
  # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
18
18
  #
19
+ # Use Set = Transactions, Name = TaxCodePrioritization/HSCodePrioritization and Value = Transaction/ItemMaster for prioritizing which TaxCodes/HsCodes should be used for calculating taxes.
20
+ #
21
+ # Example: To prioritize TaxCodes passed in a Transaction over values stored with Items when calculating tax, use
22
+ # Set = Transactions, Name = TaxCodePrioritization, Value = Transaction
23
+ #
19
24
  # ### Security Policies
20
25
  #
21
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
26
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
22
27
  # @param companyId [Integer] The ID of the company that owns this setting.
23
28
  # @param model [SettingModel[]] The setting you wish to create.
24
- # @return [SettingModel[]]
25
- def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings"
26
- post(path, model) end
27
-
28
- # Delete a single setting
29
- #
29
+ # @return [SettingModel[]]
30
+ def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings"
31
+ post(path, model) end
32
+
33
+ # Delete a single setting
34
+ #
30
35
  # Mark the setting object at this URL as deleted.
31
36
  #
32
37
  # The company settings system is a metadata system that you can use to store extra information
@@ -40,15 +45,15 @@ module AvaTax
40
45
  #
41
46
  # ### Security Policies
42
47
  #
43
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
48
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
44
49
  # @param companyId [Integer] The ID of the company that owns this setting.
45
50
  # @param id [Integer] The ID of the setting you wish to delete.
46
- # @return [ErrorDetail[]]
47
- def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
48
- delete(path) end
49
-
50
- # Retrieve a single setting
51
- #
51
+ # @return [ErrorDetail[]]
52
+ def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
53
+ delete(path) end
54
+
55
+ # Retrieve a single setting
56
+ #
52
57
  # Get a single setting object by its unique ID.
53
58
  #
54
59
  # The company settings system is a metadata system that you can use to store extra information
@@ -62,15 +67,15 @@ module AvaTax
62
67
  #
63
68
  # ### Security Policies
64
69
  #
65
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
66
71
  # @param companyId [Integer] The ID of the company that owns this setting
67
72
  # @param id [Integer] The primary key of this setting
68
- # @return [Object]
69
- def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
70
- get(path) end
71
-
72
- # Retrieve all settings for this company
73
- #
73
+ # @return [Object]
74
+ def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
75
+ get(path) end
76
+
77
+ # Retrieve all settings for this company
78
+ #
74
79
  # List all setting objects attached to this company.
75
80
  #
76
81
  # The company settings system is a metadata system that you can use to store extra information
@@ -87,19 +92,19 @@ module AvaTax
87
92
  #
88
93
  # ### Security Policies
89
94
  #
90
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
95
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
91
96
  # @param companyId [Integer] The ID of the company that owns these settings
92
- # @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/).
97
+ # @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:* modifiedDate, ModifiedUserId
93
98
  # @param include [String] A comma separated list of additional data to retrieve.
94
99
  # @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.
95
100
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
96
101
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
97
- # @return [FetchResult]
98
- def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings"
99
- get(path, options) end
100
-
101
- # Retrieve all settings
102
- #
102
+ # @return [FetchResult]
103
+ def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings"
104
+ get(path, options) end
105
+
106
+ # Retrieve all settings
107
+ #
103
108
  # Get multiple setting objects across all companies.
104
109
  #
105
110
  # The company settings system is a metadata system that you can use to store extra information
@@ -116,18 +121,18 @@ module AvaTax
116
121
  #
117
122
  # ### Security Policies
118
123
  #
119
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
120
- # @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/).
124
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
125
+ # @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:* modifiedDate, ModifiedUserId
121
126
  # @param include [String] A comma separated list of additional data to retrieve.
122
127
  # @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.
123
128
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
124
129
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
125
- # @return [FetchResult]
126
- def query_settings(options={}) path = "/api/v2/settings"
127
- get(path, options) end
128
-
129
- # Update a single setting
130
- #
130
+ # @return [FetchResult]
131
+ def query_settings(options={}) path = "/api/v2/settings"
132
+ get(path, options) end
133
+
134
+ # Update a single setting
135
+ #
131
136
  # Replace the existing setting object at this URL with an updated object.
132
137
  #
133
138
  # The company settings system is a metadata system that you can use to store extra information
@@ -145,13 +150,13 @@ module AvaTax
145
150
  #
146
151
  # ### Security Policies
147
152
  #
148
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
153
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
149
154
  # @param companyId [Integer] The ID of the company that this setting belongs to.
150
155
  # @param id [Integer] The ID of the setting you wish to update
151
156
  # @param model [Object] The setting you wish to update.
152
- # @return [Object]
153
- def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}"
154
- put(path, model) end
155
- end
156
- end
157
+ # @return [Object]
158
+ def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}"
159
+ put(path, model) end
160
+ end
161
+ end
157
162
  end
@@ -1,25 +1,25 @@
1
- module AvaTax
2
- class Client
3
- module Subscriptions
4
-
5
-
6
- # Retrieve a single subscription
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Subscriptions
4
+
5
+
6
+ # Retrieve a single subscription
7
+ #
8
8
  # Get the subscription object identified by this URL.
9
9
  # A 'subscription' indicates a licensed subscription to a named Avalara service.
10
10
  # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
11
11
  #
12
12
  # ### Security Policies
13
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.
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
15
  # @param accountId [Integer] The ID of the account that owns this subscription
16
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
- #
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
23
  # List all subscription objects attached to this account.
24
24
  # A 'subscription' indicates a licensed subscription to a named Avalara service.
25
25
  # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
@@ -29,18 +29,18 @@ module AvaTax
29
29
  #
30
30
  # ### Security Policies
31
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.
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
33
  # @param accountId [Integer] The ID of the account that owns these subscriptions
34
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
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
36
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
37
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
- #
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
44
  # Get multiple subscription objects across all accounts.
45
45
  # A 'subscription' indicates a licensed subscription to a named Avalara service.
46
46
  # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
@@ -50,14 +50,14 @@ module AvaTax
50
50
  #
51
51
  # ### Security Policies
52
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.
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
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
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
56
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
57
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
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,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module TaxCodes
4
-
5
-
6
- # Create a new tax code
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module TaxCodes
4
+
5
+
6
+ # Create a new tax code
7
+ #
8
8
  # Create one or more new taxcode objects attached to this company.
9
9
  # A 'TaxCode' represents a uniquely identified type of product, good, or service.
10
10
  # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
@@ -13,28 +13,28 @@ module AvaTax
13
13
  #
14
14
  # ### Security Policies
15
15
  #
16
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
16
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
17
17
  # @param companyId [Integer] The ID of the company that owns this tax code.
18
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
- #
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
25
  # Marks the existing TaxCode object at this URL as deleted.
26
26
  #
27
27
  # ### Security Policies
28
28
  #
29
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
29
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
30
30
  # @param companyId [Integer] The ID of the company that owns this tax code.
31
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
- #
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
38
  # Get the taxcode object identified by this URL.
39
39
  # A 'TaxCode' represents a uniquely identified type of product, good, or service.
40
40
  # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
@@ -43,15 +43,15 @@ module AvaTax
43
43
  #
44
44
  # ### Security Policies
45
45
  #
46
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
46
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
47
47
  # @param companyId [Integer] The ID of the company that owns this tax code
48
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
- #
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
55
  # List all taxcode objects attached to this company.
56
56
  # A 'TaxCode' represents a uniquely identified type of product, good, or service.
57
57
  # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
@@ -63,19 +63,19 @@ module AvaTax
63
63
  #
64
64
  # ### Security Policies
65
65
  #
66
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
66
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
67
67
  # @param companyId [Integer] The ID of the company that owns these tax codes
68
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
69
  # @param include [String] A comma separated list of additional data to retrieve.
70
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
71
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
72
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
- #
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
79
  # Get multiple taxcode objects across all companies.
80
80
  # A 'TaxCode' represents a uniquely identified type of product, good, or service.
81
81
  # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
@@ -87,18 +87,18 @@ module AvaTax
87
87
  #
88
88
  # ### Security Policies
89
89
  #
90
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
90
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
91
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
92
  # @param include [String] A comma separated list of additional data to retrieve.
93
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
94
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
95
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
- #
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
102
  # Replace the existing taxcode object at this URL with an updated object.
103
103
  # A 'TaxCode' represents a uniquely identified type of product, good, or service.
104
104
  # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
@@ -109,13 +109,13 @@ module AvaTax
109
109
  #
110
110
  # ### Security Policies
111
111
  #
112
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
112
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
113
113
  # @param companyId [Integer] The ID of the company that this tax code belongs to.
114
114
  # @param id [Integer] The ID of the tax code you wish to update
115
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
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,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module TaxContent
4
-
5
-
6
- # Build a multi-location tax content file
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module TaxContent
4
+
5
+
6
+ # Build a multi-location tax content file
7
+ #
8
8
  # Builds a tax content file containing information useful for a retail point-of-sale solution.
9
9
  #
10
10
  # Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
@@ -32,14 +32,14 @@ module AvaTax
32
32
  # ### Security Policies
33
33
  #
34
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.
35
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
36
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
- #
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
43
  # Builds a tax content file containing information useful for a retail point-of-sale solution.
44
44
  #
45
45
  # Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
@@ -67,19 +67,19 @@ module AvaTax
67
67
  # ### Security Policies
68
68
  #
69
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.
70
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
71
71
  # @param companyId [Integer] The ID number of the company that owns this location.
72
72
  # @param id [Integer] The ID number of the location to retrieve point-of-sale data.
73
73
  # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
74
74
  # @param format [String] The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values)
75
75
  # @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
76
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
- #
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
83
  # Download a CSV file containing all five digit postal codes in the United States and their sales
84
84
  # and use tax rates for tangible personal property.
85
85
  #
@@ -123,12 +123,75 @@ module AvaTax
123
123
  #
124
124
  # ### Security Policies
125
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.
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
127
  # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
128
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
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
+
133
+ # Sales tax rates for a specified address
134
+ #
135
+ # Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
136
+ # response code 429 - `Too Many Requests`.
137
+ #
138
+ # This API assumes that you are selling general tangible personal property at a retail point-of-sale
139
+ # location in the United States only.
140
+ #
141
+ # For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
142
+ # which supports features including, but not limited to:
143
+ #
144
+ # * Nexus declarations
145
+ # * Taxability based on product/service type
146
+ # * Sourcing rules affecting origin/destination states
147
+ # * Customers who are exempt from certain taxes
148
+ # * States that have dollar value thresholds for tax amounts
149
+ # * Refunds for products purchased on a different date
150
+ # * Detailed jurisdiction names and state assigned codes
151
+ # * And more!
152
+ #
153
+ # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
154
+ # for information on how to upgrade to the full AvaTax CreateTransaction API.
155
+ # @param line1 [String] The street address of the location.
156
+ # @param line2 [String] The street address of the location.
157
+ # @param line3 [String] The street address of the location.
158
+ # @param city [String] The city name of the location.
159
+ # @param region [String] Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
160
+ # @param postalCode [String] The postal code of the location.
161
+ # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
162
+ # @return [Object]
163
+ def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
164
+ get(path, options) end
165
+
166
+ # Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
167
+ #
168
+ # This API is only available for a US postal codes.
169
+ #
170
+ # Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
171
+ # response code 429 - `Too Many Requests`.
172
+ #
173
+ # This API assumes that you are selling general tangible personal property at a retail point-of-sale
174
+ # location in the United States only.
175
+ #
176
+ # For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
177
+ # which supports features including, but not limited to:
178
+ #
179
+ # * Nexus declarations
180
+ # * Taxability based on product/service type
181
+ # * Sourcing rules affecting origin/destination states
182
+ # * Customers who are exempt from certain taxes
183
+ # * States that have dollar value thresholds for tax amounts
184
+ # * Refunds for products purchased on a different date
185
+ # * Detailed jurisdiction names and state assigned codes
186
+ # * And more!
187
+ #
188
+ # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
189
+ # for information on how to upgrade to the full AvaTax CreateTransaction API.
190
+ # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
191
+ # @param postalCode [String] The postal code of the location.
192
+ # @return [Object]
193
+ def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
194
+ get(path, options) end
195
+ end
196
+ end
134
197
  end
@@ -12,28 +12,32 @@ module AvaTax
12
12
  #
13
13
  # This API can be used to export a complete zip file containing your company's current tax profile, and you can then restore this
14
14
  # profile to a different company or compare it over time to see if your profile has been changed.
15
+ #
16
+ # ### Security Policies
17
+ #
18
+ # * 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.
19
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
15
20
  # @param companyId [Integer] The unique ID number of the company whose profile you wish to retrieve.
16
21
  # @return [Object]
17
- def export_tax_profile(companyId)
18
- path = "/api/v2/companies/#{companyId}/taxprofile"
19
- get(path)
20
- end
21
-
22
+ def export_tax_profile(companyId) path = "/api/v2/companies/#{companyId}/taxprofile"
23
+ get(path) end
22
24
 
23
25
  # Import a tax profile.
24
26
  #
25
27
  # Imports a tax profile to a new company, along with the option to import account settings.
28
+ #
29
+ # ### Security Policies
30
+ #
31
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
32
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
26
33
  # @param accountId [Integer] The account id of the account to which the tax profile will be imported.
27
34
  # @param newCompanyCode [String] The companyCode to use for the imported company.
28
35
  # @param replaceAccountSettings [Boolean] Replace the current account settings with the ones in the tax profile.
29
36
  # @param bypassNexusValidation [Boolean] Enable invalid nexus to be imported.
30
37
  # @param taxProfile [Object] The taxProfile
31
38
  # @return [Object]
32
- def import_tax_profile()
33
- path = "/api/v2/taxprofile"
34
- post(path)
35
- end
36
-
39
+ def import_tax_profile() path = "/api/v2/taxprofile"
40
+ post(path) end
37
41
  end
38
42
  end
39
43
  end