avatax 22.3.0 → 22.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/gem-push.yml +31 -0
  3. data/.gitignore +55 -55
  4. data/.rspec +1 -1
  5. data/.vs/VSWorkspaceState.json +5 -5
  6. data/.yardopts +4 -4
  7. data/Gemfile +2 -2
  8. data/LICENSE +201 -201
  9. data/README.md +98 -98
  10. data/Rakefile +9 -9
  11. data/avatax.gemspec +38 -38
  12. data/example/avatax.rb +47 -47
  13. data/example/credentials.example.yaml +5 -5
  14. data/lib/avatax/api.rb +27 -27
  15. data/lib/avatax/client/accounts.rb +22 -22
  16. data/lib/avatax/client/addresses.rb +4 -4
  17. data/lib/avatax/client/advancedrules.rb +5 -5
  18. data/lib/avatax/client/avafileforms.rb +7 -7
  19. data/lib/avatax/client/batches.rb +16 -16
  20. data/lib/avatax/client/certexpressinvites.rb +6 -6
  21. data/lib/avatax/client/certificates.rb +30 -30
  22. data/lib/avatax/client/companies.rb +47 -45
  23. data/lib/avatax/client/compliance.rb +1 -1
  24. data/lib/avatax/client/contacts.rb +12 -12
  25. data/lib/avatax/client/customers.rb +26 -26
  26. data/lib/avatax/client/datasources.rb +12 -12
  27. data/lib/avatax/client/definitions.rb +90 -75
  28. data/lib/avatax/client/distancethresholds.rb +12 -12
  29. data/lib/avatax/client/ecms.rb +73 -73
  30. data/lib/avatax/client/ecommercetoken.rb +4 -4
  31. data/lib/avatax/client/errortransactions.rb +61 -61
  32. data/lib/avatax/client/firmclientlinkages.rb +17 -17
  33. data/lib/avatax/client/free.rb +1 -1
  34. data/lib/avatax/client/fundingrequests.rb +10 -6
  35. data/lib/avatax/client/items.rb +86 -62
  36. data/lib/avatax/client/jurisdictionoverrides.rb +12 -12
  37. data/lib/avatax/client/locations.rb +24 -24
  38. data/lib/avatax/client/multidocument.rb +20 -20
  39. data/lib/avatax/client/nexus.rb +30 -30
  40. data/lib/avatax/client/notices.rb +8 -8
  41. data/lib/avatax/client/notifications.rb +6 -6
  42. data/lib/avatax/client/onboarding.rb +55 -55
  43. data/lib/avatax/client/pointofsale.rb +21 -21
  44. data/lib/avatax/client/provisioning.rb +4 -4
  45. data/lib/avatax/client/registrar.rb +20 -20
  46. data/lib/avatax/client/reports.rb +7 -7
  47. data/lib/avatax/client/settings.rb +12 -12
  48. data/lib/avatax/client/subscriptions.rb +6 -6
  49. data/lib/avatax/client/taxcodes.rb +12 -12
  50. data/lib/avatax/client/taxcontent.rb +8 -8
  51. data/lib/avatax/client/taxprofiles.rb +42 -42
  52. data/lib/avatax/client/taxrules.rb +12 -12
  53. data/lib/avatax/client/transactions.rb +41 -41
  54. data/lib/avatax/client/upcs.rb +12 -12
  55. data/lib/avatax/client/userdefinedfields.rb +6 -6
  56. data/lib/avatax/client/users.rb +16 -16
  57. data/lib/avatax/client/utilities.rb +3 -3
  58. data/lib/avatax/client.rb +37 -37
  59. data/lib/avatax/configuration.rb +76 -76
  60. data/lib/avatax/connection.rb +53 -49
  61. data/lib/avatax/request.rb +51 -51
  62. data/lib/avatax/version.rb +3 -3
  63. data/lib/avatax.rb +26 -26
  64. data/spec/avatax/client/accounts_spec.rb +13 -13
  65. data/spec/avatax/client/transactions_spec.rb +80 -80
  66. data/spec/avatax/request_spec.rb +25 -25
  67. data/spec/avatax_spec.rb +45 -45
  68. data/spec/credentials.yaml.example +4 -4
  69. data/spec/fixtures/accounts.json +15 -15
  70. data/spec/spec_helper.rb +27 -27
  71. metadata +6 -6
  72. data/.travis.yml +0 -19
@@ -11,13 +11,13 @@ module AvaTax
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, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
15
15
  # Swagger Name: AvaTaxClient
16
16
  # @param accountId [Integer] The ID of the account that owns this subscription
17
17
  # @param id [Integer] The primary key of this subscription
18
18
  # @return [Object]
19
19
  def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
20
- get(path, {}, "22.3.0") end
20
+ get(path, {}, "22.7.0") end
21
21
 
22
22
  # Retrieve subscriptions for this account
23
23
  #
@@ -30,7 +30,7 @@ module AvaTax
30
30
  #
31
31
  # ### Security Policies
32
32
  #
33
- # * 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
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
34
34
  # Swagger Name: AvaTaxClient
35
35
  # @param accountId [Integer] The ID of the account that owns these subscriptions
36
36
  # @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
@@ -39,7 +39,7 @@ module AvaTax
39
39
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
40
40
  # @return [FetchResult]
41
41
  def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
42
- get(path, options, "22.3.0") end
42
+ get(path, options, "22.7.0") end
43
43
 
44
44
  # Retrieve all subscriptions
45
45
  #
@@ -52,7 +52,7 @@ module AvaTax
52
52
  #
53
53
  # ### Security Policies
54
54
  #
55
- # * 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.
55
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
56
56
  # Swagger Name: AvaTaxClient
57
57
  # @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
58
58
  # @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.
@@ -60,7 +60,7 @@ module AvaTax
60
60
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
61
61
  # @return [FetchResult]
62
62
  def query_subscriptions(options={}) path = "/api/v2/subscriptions"
63
- get(path, options, "22.3.0") end
63
+ get(path, options, "22.7.0") end
64
64
  end
65
65
  end
66
66
  end
@@ -13,13 +13,13 @@ 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, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
17
17
  # Swagger Name: AvaTaxClient
18
18
  # @param companyId [Integer] The ID of the company that owns this tax code.
19
19
  # @param model [TaxCodeModel[]] The tax code you wish to create.
20
20
  # @return [TaxCodeModel[]]
21
21
  def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
22
- post(path, model, {}, "22.3.0") end
22
+ post(path, model, {}, "22.7.0") end
23
23
 
24
24
  # Delete a single tax code
25
25
  #
@@ -27,13 +27,13 @@ module AvaTax
27
27
  #
28
28
  # ### Security Policies
29
29
  #
30
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
30
+ # * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
31
31
  # Swagger Name: AvaTaxClient
32
32
  # @param companyId [Integer] The ID of the company that owns this tax code.
33
33
  # @param id [Integer] The ID of the tax code you wish to delete.
34
34
  # @return [ErrorDetail[]]
35
35
  def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
36
- delete(path, {}, "22.3.0") end
36
+ delete(path, {}, "22.7.0") end
37
37
 
38
38
  # Retrieve a single tax code
39
39
  #
@@ -45,13 +45,13 @@ module AvaTax
45
45
  #
46
46
  # ### Security Policies
47
47
  #
48
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
48
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
49
49
  # Swagger Name: AvaTaxClient
50
50
  # @param companyId [Integer] The ID of the company that owns this tax code
51
51
  # @param id [Integer] The primary key of this tax code
52
52
  # @return [Object]
53
53
  def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
54
- get(path, {}, "22.3.0") end
54
+ get(path, {}, "22.7.0") end
55
55
 
56
56
  # Retrieve tax codes for this company
57
57
  #
@@ -66,7 +66,7 @@ module AvaTax
66
66
  #
67
67
  # ### Security Policies
68
68
  #
69
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
69
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70
70
  # Swagger Name: AvaTaxClient
71
71
  # @param companyId [Integer] The ID of the company that owns these tax codes
72
72
  # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
@@ -76,7 +76,7 @@ module AvaTax
76
76
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
77
77
  # @return [FetchResult]
78
78
  def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
79
- get(path, options, "22.3.0") end
79
+ get(path, options, "22.7.0") end
80
80
 
81
81
  # Retrieve all tax codes
82
82
  #
@@ -91,7 +91,7 @@ module AvaTax
91
91
  #
92
92
  # ### Security Policies
93
93
  #
94
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
94
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
95
95
  # Swagger Name: AvaTaxClient
96
96
  # @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
97
  # @param include [String] A comma separated list of additional data to retrieve.
@@ -100,7 +100,7 @@ module AvaTax
100
100
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
101
101
  # @return [FetchResult]
102
102
  def query_tax_codes(options={}) path = "/api/v2/taxcodes"
103
- get(path, options, "22.3.0") end
103
+ get(path, options, "22.7.0") end
104
104
 
105
105
  # Update a single tax code
106
106
  #
@@ -114,14 +114,14 @@ module AvaTax
114
114
  #
115
115
  # ### Security Policies
116
116
  #
117
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
117
+ # * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
118
118
  # Swagger Name: AvaTaxClient
119
119
  # @param companyId [Integer] The ID of the company that this tax code belongs to.
120
120
  # @param id [Integer] The ID of the tax code you wish to update
121
121
  # @param model [Object] The tax code you wish to update.
122
122
  # @return [Object]
123
123
  def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
124
- put(path, model, {}, "22.3.0") end
124
+ put(path, model, {}, "22.7.0") end
125
125
  end
126
126
  end
127
127
  end
@@ -31,13 +31,13 @@ module AvaTax
31
31
  #
32
32
  # ### Security Policies
33
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.
34
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
35
35
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
36
36
  # Swagger Name: AvaTaxClient
37
37
  # @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
38
38
  # @return [Object]
39
39
  def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
40
- post(path, model, {}, "22.3.0") end
40
+ post(path, model, {}, "22.7.0") end
41
41
 
42
42
  # Build a tax content file for a single location
43
43
  #
@@ -67,7 +67,7 @@ module AvaTax
67
67
  #
68
68
  # ### Security Policies
69
69
  #
70
- # * 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 requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
71
71
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
72
72
  # Swagger Name: AvaTaxClient
73
73
  # @param companyId [Integer] The ID number of the company that owns this location.
@@ -78,7 +78,7 @@ module AvaTax
78
78
  # @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
79
79
  # @return [Object]
80
80
  def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
81
- get(path, options, "22.3.0") end
81
+ get(path, options, "22.7.0") end
82
82
 
83
83
  # Download a file listing tax rates by postal code
84
84
  #
@@ -125,13 +125,13 @@ module AvaTax
125
125
  #
126
126
  # ### Security Policies
127
127
  #
128
- # * 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.
128
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
129
129
  # Swagger Name: AvaTaxClient
130
130
  # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
131
131
  # @param region [String] A two character region code which limits results to a specific region.
132
132
  # @return [Object]
133
133
  def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
134
- get(path, options, "22.3.0") end
134
+ get(path, options, "22.7.0") end
135
135
 
136
136
  # Sales tax rates for a specified address
137
137
  #
@@ -165,7 +165,7 @@ module AvaTax
165
165
  # @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`.
166
166
  # @return [Object]
167
167
  def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
168
- get(path, options, "22.3.0") end
168
+ get(path, options, "22.7.0") end
169
169
 
170
170
  # Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
171
171
  #
@@ -196,7 +196,7 @@ module AvaTax
196
196
  # @param postalCode [String] The postal code of the location.
197
197
  # @return [Object]
198
198
  def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
199
- get(path, options, "22.3.0") end
199
+ get(path, options, "22.7.0") end
200
200
  end
201
201
  end
202
202
  end
@@ -1,43 +1,43 @@
1
- module AvaTax
2
- class Client
3
- module TaxProfiles
4
-
5
-
6
- # Export the tax profile of this company to a backup file
7
- #
8
- # Exports the tax profile of a company to a file, containing all information that affects tax calculation for this company.
9
- #
10
- # A tax profile is a series of decisions and configuration choices that affect your company's tax calculation. These decisions
11
- # include your nexus declarations, your item catalog, your custom tax rules, and so on.
12
- #
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
- # 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.
20
- # @param companyId [Integer] The unique ID number of the company whose profile you wish to retrieve.
21
- # @return [Object]
22
- def export_tax_profile(companyId) path = "/api/v2/companies/#{companyId}/taxprofile"
23
- get(path) end
24
-
25
- # Import a tax profile.
26
- #
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.
33
- # @param accountId [Integer] The account id of the account to which the tax profile will be imported.
34
- # @param newCompanyCode [String] The companyCode to use for the imported company.
35
- # @param replaceAccountSettings [Boolean] Replace the current account settings with the ones in the tax profile.
36
- # @param bypassNexusValidation [Boolean] Enable invalid nexus to be imported.
37
- # @param taxProfile [Object] The taxProfile
38
- # @return [Object]
39
- def import_tax_profile() path = "/api/v2/taxprofile"
40
- post(path) end
41
- end
42
- end
1
+ module AvaTax
2
+ class Client
3
+ module TaxProfiles
4
+
5
+
6
+ # Export the tax profile of this company to a backup file
7
+ #
8
+ # Exports the tax profile of a company to a file, containing all information that affects tax calculation for this company.
9
+ #
10
+ # A tax profile is a series of decisions and configuration choices that affect your company's tax calculation. These decisions
11
+ # include your nexus declarations, your item catalog, your custom tax rules, and so on.
12
+ #
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
+ # 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.
20
+ # @param companyId [Integer] The unique ID number of the company whose profile you wish to retrieve.
21
+ # @return [Object]
22
+ def export_tax_profile(companyId) path = "/api/v2/companies/#{companyId}/taxprofile"
23
+ get(path) end
24
+
25
+ # Import a tax profile.
26
+ #
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.
33
+ # @param accountId [Integer] The account id of the account to which the tax profile will be imported.
34
+ # @param newCompanyCode [String] The companyCode to use for the imported company.
35
+ # @param replaceAccountSettings [Boolean] Replace the current account settings with the ones in the tax profile.
36
+ # @param bypassNexusValidation [Boolean] Enable invalid nexus to be imported.
37
+ # @param taxProfile [Object] The taxProfile
38
+ # @return [Object]
39
+ def import_tax_profile() path = "/api/v2/taxprofile"
40
+ post(path) end
41
+ end
42
+ end
43
43
  end
@@ -21,13 +21,13 @@ 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, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
25
25
  # Swagger Name: AvaTaxClient
26
26
  # @param companyId [Integer] The ID of the company that owns this tax rule.
27
27
  # @param model [TaxRuleModel[]] The tax rule you wish to create.
28
28
  # @return [TaxRuleModel[]]
29
29
  def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
30
- post(path, model, {}, "22.3.0") end
30
+ post(path, model, {}, "22.7.0") end
31
31
 
32
32
  # Delete a single tax rule
33
33
  #
@@ -47,13 +47,13 @@ module AvaTax
47
47
  #
48
48
  # ### Security Policies
49
49
  #
50
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
50
+ # * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
51
51
  # Swagger Name: AvaTaxClient
52
52
  # @param companyId [Integer] The ID of the company that owns this tax rule.
53
53
  # @param id [Integer] The ID of the tax rule you wish to delete.
54
54
  # @return [ErrorDetail[]]
55
55
  def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
56
- delete(path, {}, "22.3.0") end
56
+ delete(path, {}, "22.7.0") end
57
57
 
58
58
  # Retrieve a single tax rule
59
59
  #
@@ -73,13 +73,13 @@ module AvaTax
73
73
  #
74
74
  # ### Security Policies
75
75
  #
76
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
76
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
77
77
  # Swagger Name: AvaTaxClient
78
78
  # @param companyId [Integer] The ID of the company that owns this tax rule
79
79
  # @param id [Integer] The primary key of this tax rule
80
80
  # @return [Object]
81
81
  def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
82
- get(path, {}, "22.3.0") end
82
+ get(path, {}, "22.7.0") end
83
83
 
84
84
  # Retrieve tax rules for this company
85
85
  #
@@ -102,7 +102,7 @@ module AvaTax
102
102
  #
103
103
  # ### Security Policies
104
104
  #
105
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
105
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
106
106
  # Swagger Name: AvaTaxClient
107
107
  # @param companyId [Integer] The ID of the company that owns these tax rules
108
108
  # @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, taxTypeCode, taxRuleProductDetail, rateTypeCode, taxTypeGroup, taxSubType, unitOfBasis
@@ -112,7 +112,7 @@ module AvaTax
112
112
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
113
113
  # @return [FetchResult]
114
114
  def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
115
- get(path, options, "22.3.0") end
115
+ get(path, options, "22.7.0") end
116
116
 
117
117
  # Retrieve all tax rules
118
118
  #
@@ -135,7 +135,7 @@ module AvaTax
135
135
  #
136
136
  # ### Security Policies
137
137
  #
138
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
138
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
139
139
  # Swagger Name: AvaTaxClient
140
140
  # @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, taxTypeCode, taxRuleProductDetail, rateTypeCode, taxTypeGroup, taxSubType, unitOfBasis
141
141
  # @param include [String] A comma separated list of additional data to retrieve.
@@ -144,7 +144,7 @@ module AvaTax
144
144
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
145
145
  # @return [FetchResult]
146
146
  def query_tax_rules(options={}) path = "/api/v2/taxrules"
147
- get(path, options, "22.3.0") end
147
+ get(path, options, "22.7.0") end
148
148
 
149
149
  # Update a single tax rule
150
150
  #
@@ -164,14 +164,14 @@ module AvaTax
164
164
  #
165
165
  # ### Security Policies
166
166
  #
167
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
167
+ # * This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
168
168
  # Swagger Name: AvaTaxClient
169
169
  # @param companyId [Integer] The ID of the company that this tax rule belongs to.
170
170
  # @param id [Integer] The ID of the tax rule you wish to update
171
171
  # @param model [Object] The tax rule you wish to update.
172
172
  # @return [Object]
173
173
  def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
174
- put(path, model, {}, "22.3.0") end
174
+ put(path, model, {}, "22.7.0") end
175
175
  end
176
176
  end
177
177
  end