avatax 20.5.0 → 20.6.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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +116 -83
  3. data/lib/avatax/client/addresses.rb +26 -20
  4. data/lib/avatax/client/advancedrules.rb +56 -41
  5. data/lib/avatax/client/avafileforms.rb +56 -41
  6. data/lib/avatax/client/batches.rb +125 -48
  7. data/lib/avatax/client/certexpressinvites.rb +36 -27
  8. data/lib/avatax/client/certificates.rb +156 -111
  9. data/lib/avatax/client/companies.rb +166 -118
  10. data/lib/avatax/client/compliance.rb +16 -13
  11. data/lib/avatax/client/contacts.rb +66 -48
  12. data/lib/avatax/client/customers.rb +136 -97
  13. data/lib/avatax/client/datasources.rb +66 -48
  14. data/lib/avatax/client/definitions.rb +596 -419
  15. data/lib/avatax/client/distancethresholds.rb +66 -48
  16. data/lib/avatax/client/filingcalendars.rb +16 -13
  17. data/lib/avatax/client/filings.rb +16 -13
  18. data/lib/avatax/client/firmclientlinkages.rb +96 -69
  19. data/lib/avatax/client/free.rb +36 -27
  20. data/lib/avatax/client/fundingrequests.rb +26 -20
  21. data/lib/avatax/client/items.rb +196 -139
  22. data/lib/avatax/client/jurisdictionoverrides.rb +66 -48
  23. data/lib/avatax/client/locations.rb +76 -55
  24. data/lib/avatax/client/multidocument.rb +106 -76
  25. data/lib/avatax/client/nexus.rb +82 -183
  26. data/lib/avatax/client/notifications.rb +36 -27
  27. data/lib/avatax/client/provisioning.rb +26 -20
  28. data/lib/avatax/client/registrar.rb +106 -76
  29. data/lib/avatax/client/reports.rb +46 -34
  30. data/lib/avatax/client/settings.rb +66 -48
  31. data/lib/avatax/client/subscriptions.rb +36 -27
  32. data/lib/avatax/client/taxcodes.rb +66 -48
  33. data/lib/avatax/client/taxcontent.rb +36 -27
  34. data/lib/avatax/client/taxrules.rb +66 -48
  35. data/lib/avatax/client/transactions.rb +216 -153
  36. data/lib/avatax/client/upcs.rb +66 -48
  37. data/lib/avatax/client/users.rb +86 -62
  38. data/lib/avatax/client/utilities.rb +36 -27
  39. data/lib/avatax/version.rb +1 -1
  40. metadata +2 -2
@@ -1,25 +1,28 @@
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)
19
+ path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
20
+ get(path)
21
+ end
22
+
23
+
24
+ # Retrieve subscriptions for this account
25
+ #
23
26
  # List all subscription objects attached to this account.
24
27
  # A 'subscription' indicates a licensed subscription to a named Avalara service.
25
28
  # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
@@ -29,18 +32,21 @@ module AvaTax
29
32
  #
30
33
  # ### Security Policies
31
34
  #
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.
35
+ # * 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
36
  # @param accountId [Integer] The ID of the account that owns these subscriptions
34
37
  # @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
38
  # @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
39
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
37
40
  # @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
- #
41
+ # @return [FetchResult]
42
+ def list_subscriptions_by_account(accountId, options={})
43
+ path = "/api/v2/accounts/#{accountId}/subscriptions"
44
+ get(path, options)
45
+ end
46
+
47
+
48
+ # Retrieve all subscriptions
49
+ #
44
50
  # Get multiple subscription objects across all accounts.
45
51
  # A 'subscription' indicates a licensed subscription to a named Avalara service.
46
52
  # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
@@ -50,14 +56,17 @@ module AvaTax
50
56
  #
51
57
  # ### Security Policies
52
58
  #
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.
59
+ # * 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
60
  # @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
61
  # @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
62
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
57
63
  # @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
64
+ # @return [FetchResult]
65
+ def query_subscriptions(options={})
66
+ path = "/api/v2/subscriptions"
67
+ get(path, options)
68
+ end
69
+
70
+ end
71
+ end
63
72
  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,34 @@ 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)
21
+ path = "/api/v2/companies/#{companyId}/taxcodes"
22
+ post(path, model)
23
+ end
24
+
25
+
26
+ # Delete a single tax code
27
+ #
25
28
  # Marks the existing TaxCode object at this URL as deleted.
26
29
  #
27
30
  # ### Security Policies
28
31
  #
29
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
32
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
30
33
  # @param companyId [Integer] The ID of the company that owns this tax code.
31
34
  # @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
- #
35
+ # @return [ErrorDetail[]]
36
+ def delete_tax_code(companyId, id)
37
+ path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
38
+ delete(path)
39
+ end
40
+
41
+
42
+ # Retrieve a single tax code
43
+ #
38
44
  # Get the taxcode object identified by this URL.
39
45
  # A 'TaxCode' represents a uniquely identified type of product, good, or service.
40
46
  # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
@@ -43,15 +49,18 @@ module AvaTax
43
49
  #
44
50
  # ### Security Policies
45
51
  #
46
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
52
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
47
53
  # @param companyId [Integer] The ID of the company that owns this tax code
48
54
  # @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
+ # @return [Object]
56
+ def get_tax_code(companyId, id)
57
+ path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
58
+ get(path)
59
+ end
60
+
61
+
62
+ # Retrieve tax codes for this company
63
+ #
55
64
  # List all taxcode objects attached to this company.
56
65
  # A 'TaxCode' represents a uniquely identified type of product, good, or service.
57
66
  # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
@@ -63,19 +72,22 @@ module AvaTax
63
72
  #
64
73
  # ### Security Policies
65
74
  #
66
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
75
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
67
76
  # @param companyId [Integer] The ID of the company that owns these tax codes
68
77
  # @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
78
  # @param include [String] A comma separated list of additional data to retrieve.
70
79
  # @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
80
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
72
81
  # @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
- #
82
+ # @return [FetchResult]
83
+ def list_tax_codes_by_company(companyId, options={})
84
+ path = "/api/v2/companies/#{companyId}/taxcodes"
85
+ get(path, options)
86
+ end
87
+
88
+
89
+ # Retrieve all tax codes
90
+ #
79
91
  # Get multiple taxcode objects across all companies.
80
92
  # A 'TaxCode' represents a uniquely identified type of product, good, or service.
81
93
  # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
@@ -87,18 +99,21 @@ module AvaTax
87
99
  #
88
100
  # ### Security Policies
89
101
  #
90
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
102
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
91
103
  # @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
104
  # @param include [String] A comma separated list of additional data to retrieve.
93
105
  # @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
106
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
95
107
  # @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
- #
108
+ # @return [FetchResult]
109
+ def query_tax_codes(options={})
110
+ path = "/api/v2/taxcodes"
111
+ get(path, options)
112
+ end
113
+
114
+
115
+ # Update a single tax code
116
+ #
102
117
  # Replace the existing taxcode object at this URL with an updated object.
103
118
  # A 'TaxCode' represents a uniquely identified type of product, good, or service.
104
119
  # Avalara supports correct tax rates and taxability rules for all TaxCodes in all supported jurisdictions.
@@ -109,13 +124,16 @@ module AvaTax
109
124
  #
110
125
  # ### Security Policies
111
126
  #
112
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
127
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
113
128
  # @param companyId [Integer] The ID of the company that this tax code belongs to.
114
129
  # @param id [Integer] The ID of the tax code you wish to update
115
130
  # @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
131
+ # @return [Object]
132
+ def update_tax_code(companyId, id, model)
133
+ path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
134
+ put(path, model)
135
+ end
136
+
137
+ end
138
+ end
121
139
  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,17 @@ 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<br />*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)
39
+ path = "/api/v2/pointofsaledata/build"
40
+ post(path, model)
41
+ end
42
+
43
+
44
+ # Build a tax content file for a single location
45
+ #
43
46
  # Builds a tax content file containing information useful for a retail point-of-sale solution.
44
47
  #
45
48
  # Since tax rates may change based on decisions made by a variety of tax authorities, we recommend
@@ -67,19 +70,22 @@ module AvaTax
67
70
  # ### Security Policies
68
71
  #
69
72
  # * 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.
73
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
71
74
  # @param companyId [Integer] The ID number of the company that owns this location.
72
75
  # @param id [Integer] The ID number of the location to retrieve point-of-sale data.
73
76
  # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
74
77
  # @param format [String] The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values)
75
78
  # @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
76
79
  # @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
- #
80
+ # @return [Object]
81
+ def build_tax_content_file_for_location(companyId, id, options={})
82
+ path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
83
+ get(path, options)
84
+ end
85
+
86
+
87
+ # Download a file listing tax rates by postal code
88
+ #
83
89
  # Download a CSV file containing all five digit postal codes in the United States and their sales
84
90
  # and use tax rates for tangible personal property.
85
91
  #
@@ -123,12 +129,15 @@ module AvaTax
123
129
  #
124
130
  # ### Security Policies
125
131
  #
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.
132
+ # * 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
133
  # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
128
134
  # @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
135
+ # @return [Object]
136
+ def download_tax_rates_by_zip_code(date, options={})
137
+ path = "/api/v2/taxratesbyzipcode/download/#{date}"
138
+ get(path, options)
139
+ end
140
+
141
+ end
142
+ end
134
143
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module TaxRules
4
-
5
-
6
- # Create a new tax rule
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module TaxRules
4
+
5
+
6
+ # Create a new tax rule
7
+ #
8
8
  # Create one or more custom tax rules attached to this company.
9
9
  #
10
10
  # A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
@@ -21,15 +21,18 @@ module AvaTax
21
21
  #
22
22
  # ### Security Policies
23
23
  #
24
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
24
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
25
25
  # @param companyId [Integer] The ID of the company that owns this tax rule.
26
26
  # @param model [TaxRuleModel[]] The tax rule you wish to create.
27
- # @return [TaxRuleModel[]]
28
- def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
29
- post(path, model) end
30
-
31
- # Delete a single tax rule
32
- #
27
+ # @return [TaxRuleModel[]]
28
+ def create_tax_rules(companyId, model)
29
+ path = "/api/v2/companies/#{companyId}/taxrules"
30
+ post(path, model)
31
+ end
32
+
33
+
34
+ # Delete a single tax rule
35
+ #
33
36
  # Mark the custom tax rule identified by this URL as deleted.
34
37
  #
35
38
  # A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
@@ -46,15 +49,18 @@ module AvaTax
46
49
  #
47
50
  # ### Security Policies
48
51
  #
49
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
52
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
50
53
  # @param companyId [Integer] The ID of the company that owns this tax rule.
51
54
  # @param id [Integer] The ID of the tax rule you wish to delete.
52
- # @return [ErrorDetail[]]
53
- def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
54
- delete(path) end
55
-
56
- # Retrieve a single tax rule
57
- #
55
+ # @return [ErrorDetail[]]
56
+ def delete_tax_rule(companyId, id)
57
+ path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
58
+ delete(path)
59
+ end
60
+
61
+
62
+ # Retrieve a single tax rule
63
+ #
58
64
  # Get the taxrule object identified by this URL.
59
65
  #
60
66
  # A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
@@ -71,15 +77,18 @@ module AvaTax
71
77
  #
72
78
  # ### Security Policies
73
79
  #
74
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
80
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
75
81
  # @param companyId [Integer] The ID of the company that owns this tax rule
76
82
  # @param id [Integer] The primary key of this tax rule
77
- # @return [Object]
78
- def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
79
- get(path) end
80
-
81
- # Retrieve tax rules for this company
82
- #
83
+ # @return [Object]
84
+ def get_tax_rule(companyId, id)
85
+ path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
86
+ get(path)
87
+ end
88
+
89
+
90
+ # Retrieve tax rules for this company
91
+ #
83
92
  # List all taxrule objects attached to this company.
84
93
  #
85
94
  # A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
@@ -99,19 +108,22 @@ module AvaTax
99
108
  #
100
109
  # ### Security Policies
101
110
  #
102
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
111
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
103
112
  # @param companyId [Integer] The ID of the company that owns these tax rules
104
113
  # @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:* taxCode, rateTypeCode, taxTypeGroup, taxSubType
105
114
  # @param include [String] A comma separated list of additional data to retrieve.
106
115
  # @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.
107
116
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
108
117
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
109
- # @return [FetchResult]
110
- def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
111
- get(path, options) end
112
-
113
- # Retrieve all tax rules
114
- #
118
+ # @return [FetchResult]
119
+ def list_tax_rules(companyId, options={})
120
+ path = "/api/v2/companies/#{companyId}/taxrules"
121
+ get(path, options)
122
+ end
123
+
124
+
125
+ # Retrieve all tax rules
126
+ #
115
127
  # Get multiple taxrule objects across all companies.
116
128
  #
117
129
  # A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
@@ -131,18 +143,21 @@ module AvaTax
131
143
  #
132
144
  # ### Security Policies
133
145
  #
134
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
146
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
135
147
  # @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:* taxCode, rateTypeCode, taxTypeGroup, taxSubType
136
148
  # @param include [String] A comma separated list of additional data to retrieve.
137
149
  # @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.
138
150
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
139
151
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
140
- # @return [FetchResult]
141
- def query_tax_rules(options={}) path = "/api/v2/taxrules"
142
- get(path, options) end
143
-
144
- # Update a single tax rule
145
- #
152
+ # @return [FetchResult]
153
+ def query_tax_rules(options={})
154
+ path = "/api/v2/taxrules"
155
+ get(path, options)
156
+ end
157
+
158
+
159
+ # Update a single tax rule
160
+ #
146
161
  # Replace the existing custom tax rule object at this URL with an updated object.
147
162
  #
148
163
  # A tax rule represents a rule that changes the default AvaTax behavior for a product or jurisdiction. Custom tax rules
@@ -159,13 +174,16 @@ module AvaTax
159
174
  #
160
175
  # ### Security Policies
161
176
  #
162
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
177
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
163
178
  # @param companyId [Integer] The ID of the company that this tax rule belongs to.
164
179
  # @param id [Integer] The ID of the tax rule you wish to update
165
180
  # @param model [Object] The tax rule you wish to update.
166
- # @return [Object]
167
- def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
168
- put(path, model) end
169
- end
170
- end
181
+ # @return [Object]
182
+ def update_tax_rule(companyId, id, model)
183
+ path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
184
+ put(path, model)
185
+ end
186
+
187
+ end
188
+ end
171
189
  end