avatax 21.8.0 → 22.2.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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +55 -55
  3. data/.rspec +1 -1
  4. data/.travis.yml +18 -18
  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 +94 -83
  16. data/lib/avatax/client/addresses.rb +22 -20
  17. data/lib/avatax/client/advancedrules.rb +46 -41
  18. data/lib/avatax/client/ageverification.rb +29 -0
  19. data/lib/avatax/client/avafileforms.rb +46 -41
  20. data/lib/avatax/client/batches.rb +70 -62
  21. data/lib/avatax/client/certexpressinvites.rb +30 -27
  22. data/lib/avatax/client/certificates.rb +126 -111
  23. data/lib/avatax/client/companies.rb +192 -152
  24. data/lib/avatax/client/compliance.rb +25 -14
  25. data/lib/avatax/client/contacts.rb +54 -48
  26. data/lib/avatax/client/customers.rb +110 -97
  27. data/lib/avatax/client/datasources.rb +54 -48
  28. data/lib/avatax/client/definitions.rb +620 -446
  29. data/lib/avatax/client/distancethresholds.rb +54 -48
  30. data/lib/avatax/client/ecms.rb +73 -73
  31. data/lib/avatax/client/ecommercetoken.rb +20 -18
  32. data/lib/avatax/client/errortransactions.rb +61 -61
  33. data/lib/avatax/client/filingcalendars.rb +44 -20
  34. data/lib/avatax/client/filings.rb +24 -20
  35. data/lib/avatax/client/firmclientlinkages.rb +78 -69
  36. data/lib/avatax/client/free.rb +14 -13
  37. data/lib/avatax/client/fundingrequests.rb +22 -20
  38. data/lib/avatax/client/items.rb +206 -181
  39. data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
  40. data/lib/avatax/client/locations.rb +102 -90
  41. data/lib/avatax/client/multidocument.rb +86 -76
  42. data/lib/avatax/client/nexus.rb +146 -103
  43. data/lib/avatax/client/notices.rb +30 -26
  44. data/lib/avatax/client/notifications.rb +30 -27
  45. data/lib/avatax/client/onboarding.rb +55 -55
  46. data/lib/avatax/client/pointofsale.rb +21 -21
  47. data/lib/avatax/client/provisioning.rb +22 -20
  48. data/lib/avatax/client/registrar.rb +94 -83
  49. data/lib/avatax/client/reports.rb +38 -34
  50. data/lib/avatax/client/settings.rb +54 -48
  51. data/lib/avatax/client/shippingverification.rb +66 -0
  52. data/lib/avatax/client/subscriptions.rb +30 -27
  53. data/lib/avatax/client/taxcodes.rb +54 -48
  54. data/lib/avatax/client/taxcontent.rb +46 -41
  55. data/lib/avatax/client/taxprofiles.rb +42 -42
  56. data/lib/avatax/client/taxrules.rb +56 -50
  57. data/lib/avatax/client/transactions.rb +174 -153
  58. data/lib/avatax/client/upcs.rb +54 -48
  59. data/lib/avatax/client/userdefinedfields.rb +52 -0
  60. data/lib/avatax/client/users.rb +70 -62
  61. data/lib/avatax/client/utilities.rb +30 -27
  62. data/lib/avatax/client.rb +37 -35
  63. data/lib/avatax/configuration.rb +76 -76
  64. data/lib/avatax/connection.rb +49 -49
  65. data/lib/avatax/request.rb +51 -42
  66. data/lib/avatax/version.rb +3 -3
  67. data/lib/avatax.rb +26 -26
  68. data/spec/avatax/client/accounts_spec.rb +13 -13
  69. data/spec/avatax/client/transactions_spec.rb +80 -80
  70. data/spec/avatax/request_spec.rb +25 -25
  71. data/spec/avatax_spec.rb +45 -45
  72. data/spec/credentials.yaml.example +4 -4
  73. data/spec/fixtures/accounts.json +15 -15
  74. data/spec/spec_helper.rb +27 -27
  75. metadata +9 -13
@@ -1,56 +1,56 @@
1
- module AvaTax
2
- class Client
3
- module Onboarding
4
-
5
-
6
- # Request a new Avalara account
7
- #
8
- # This API is for use by partner onboarding services customers only.
9
- #
10
- # Avalara invites select partners to refer new customers to the AvaTax service using the onboarding features
11
- # of AvaTax. These partners can create accounts for new customers using this API.
12
- #
13
- # Calling this API creates an account with the specified product subscriptions, but does not configure billing.
14
- # The customer will receive information from Avalara about how to configure billing for their account.
15
- # You should call this API when a customer has requested to begin using Avalara services.
16
- #
17
- # If the newly created account owner wishes, they can confirm that they have read and agree to the Avalara
18
- # terms and conditions. If they do so, they can receive a license key as part of this API and their
19
- # API will be created in `Active` status. If the customer has not yet read and accepted these terms and
20
- # conditions, the account will be created in `New` status and they can receive a license key by logging
21
- # onto the AvaTax website and reviewing terms and conditions online.
22
- #
23
- # ### Security Policies
24
- #
25
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
26
- # * This API is available by invitation only.
27
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount].
28
- # @param model [Object] Information about the account you wish to create and the selected product offerings.
29
- # @return [Object]
30
- def request_new_account(model)
31
- path = "/api/v2/accounts/request"
32
- post(path, model)
33
- end
34
-
35
-
36
- # Request a new entitilement to an existing customer
37
- #
38
- # This API is for use by partner onboarding services customers only. This will allow the partners to allow
39
- # the add new entitlement to an existing customer
40
- #
41
- # ### Security Policies
42
- #
43
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
44
- # * This API is available by invitation only.
45
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount].
46
- # @param id [Integer] The avatax account id of the customer
47
- # @param offer [String] The offer to be added to an already existing customer
48
- # @return [Object]
49
- def request_new_entitlement(id, offer)
50
- path = "/api/v2/accounts/#{id}/entitlements/#{offer}"
51
- post(path)
52
- end
53
-
54
- end
55
- end
1
+ module AvaTax
2
+ class Client
3
+ module Onboarding
4
+
5
+
6
+ # Request a new Avalara account
7
+ #
8
+ # This API is for use by partner onboarding services customers only.
9
+ #
10
+ # Avalara invites select partners to refer new customers to the AvaTax service using the onboarding features
11
+ # of AvaTax. These partners can create accounts for new customers using this API.
12
+ #
13
+ # Calling this API creates an account with the specified product subscriptions, but does not configure billing.
14
+ # The customer will receive information from Avalara about how to configure billing for their account.
15
+ # You should call this API when a customer has requested to begin using Avalara services.
16
+ #
17
+ # If the newly created account owner wishes, they can confirm that they have read and agree to the Avalara
18
+ # terms and conditions. If they do so, they can receive a license key as part of this API and their
19
+ # API will be created in `Active` status. If the customer has not yet read and accepted these terms and
20
+ # conditions, the account will be created in `New` status and they can receive a license key by logging
21
+ # onto the AvaTax website and reviewing terms and conditions online.
22
+ #
23
+ # ### Security Policies
24
+ #
25
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
26
+ # * This API is available by invitation only.
27
+ # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount].
28
+ # @param model [Object] Information about the account you wish to create and the selected product offerings.
29
+ # @return [Object]
30
+ def request_new_account(model)
31
+ path = "/api/v2/accounts/request"
32
+ post(path, model)
33
+ end
34
+
35
+
36
+ # Request a new entitilement to an existing customer
37
+ #
38
+ # This API is for use by partner onboarding services customers only. This will allow the partners to allow
39
+ # the add new entitlement to an existing customer
40
+ #
41
+ # ### Security Policies
42
+ #
43
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
44
+ # * This API is available by invitation only.
45
+ # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Onboarding:RequestNewAccount].
46
+ # @param id [Integer] The avatax account id of the customer
47
+ # @param offer [String] The offer to be added to an already existing customer
48
+ # @return [Object]
49
+ def request_new_entitlement(id, offer)
50
+ path = "/api/v2/accounts/#{id}/entitlements/#{offer}"
51
+ post(path)
52
+ end
53
+
54
+ end
55
+ end
56
56
  end
@@ -1,22 +1,22 @@
1
- module AvaTax
2
- class Client
3
- module PointOfSale
4
-
5
-
6
- # Point of sale data file generation
7
- #
8
- # Builds a point-of-sale data file containing tax rates and rules for items and locations that can be used
9
- # to correctly calculate tax in the event a point-of-sale device is not able to reach AvaTax.
10
- # This data file can be customized for specific partner devices and usage conditions.
11
- # The result of this API is the file you requested in the format you requested using the 'responseType' field.
12
- # This API builds the file on demand, and is limited to files with no more than 7500 scenarios.
13
- # @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
14
- # @return [Object]
15
- def build_point_of_sale_data_file(model)
16
- path = "/api/v2/pointofsaledata/build"
17
- post(path, model)
18
- end
19
-
20
- end
21
- end
1
+ module AvaTax
2
+ class Client
3
+ module PointOfSale
4
+
5
+
6
+ # Point of sale data file generation
7
+ #
8
+ # Builds a point-of-sale data file containing tax rates and rules for items and locations that can be used
9
+ # to correctly calculate tax in the event a point-of-sale device is not able to reach AvaTax.
10
+ # This data file can be customized for specific partner devices and usage conditions.
11
+ # The result of this API is the file you requested in the format you requested using the 'responseType' field.
12
+ # This API builds the file on demand, and is limited to files with no more than 7500 scenarios.
13
+ # @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
14
+ # @return [Object]
15
+ def build_point_of_sale_data_file(model)
16
+ path = "/api/v2/pointofsaledata/build"
17
+ post(path, model)
18
+ end
19
+
20
+ end
21
+ end
22
22
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Provisioning
4
-
5
-
6
- # Request a new Avalara account
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Provisioning
4
+
5
+
6
+ # Request a new Avalara account
7
+ #
8
8
  # This API is for use by partner provisioning services customers only.
9
9
  #
10
10
  # Avalara invites select partners to refer new customers to the AvaTax service using the onboarding features
@@ -24,14 +24,15 @@ module AvaTax
24
24
  #
25
25
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
26
26
  # * This API is available by invitation only.
27
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount].
27
+ # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount].
28
+ # Swagger Name: AvaTaxClient
28
29
  # @param model [Object] Information about the account you wish to create and the selected product offerings.
29
- # @return [Object]
30
- def request_new_account(model) path = "/api/v2/accounts/request"
31
- post(path, model) end
32
-
33
- # Request a new entitilement to an existing customer
34
- #
30
+ # @return [Object]
31
+ def request_new_account(model) path = "/api/v2/accounts/request"
32
+ post(path, model, {}, "22.2.0") end
33
+
34
+ # Request a new entitilement to an existing customer
35
+ #
35
36
  # This API is for use by partner provisioning services customers only. This will allow the partners to allow
36
37
  # the add new entitlement to an existing customer
37
38
  #
@@ -39,12 +40,13 @@ module AvaTax
39
40
  #
40
41
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
41
42
  # * This API is available by invitation only.
42
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount].
43
+ # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount].
44
+ # Swagger Name: AvaTaxClient
43
45
  # @param id [Integer] The avatax account id of the customer
44
46
  # @param offer [String] The offer to be added to an already existing customer
45
- # @return [Object]
46
- def request_new_entitlement(id, offer) path = "/api/v2/accounts/#{id}/entitlements/#{offer}"
47
- post(path) end
48
- end
49
- end
47
+ # @return [Object]
48
+ def request_new_entitlement(id, offer) path = "/api/v2/accounts/#{id}/entitlements/#{offer}"
49
+ post(path, {}, "22.2.0") end
50
+ end
51
+ end
50
52
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Registrar
4
-
5
-
6
- # Create a new account
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Registrar
4
+
5
+
6
+ # Create a new account
7
+ #
8
8
  # # For Registrar Use Only
9
9
  # This API is for use by Avalara Registrar administrative users only.
10
10
  #
@@ -13,14 +13,15 @@ module AvaTax
13
13
  #
14
14
  # ### Security Policies
15
15
  #
16
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
16
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
17
+ # Swagger Name: AvaTaxClient
17
18
  # @param model [Object] The account you wish to create.
18
- # @return [AccountModel[]]
19
- def create_account(model) path = "/api/v2/accounts"
20
- post(path, model) end
21
-
22
- # Create new notifications.
23
- #
19
+ # @return [AccountModel[]]
20
+ def create_account(model) path = "/api/v2/accounts"
21
+ post(path, model, {}, "22.2.0") end
22
+
23
+ # Create new notifications.
24
+ #
24
25
  # This API is available by invitation only.
25
26
  #
26
27
  # Create a single notification.
@@ -38,14 +39,15 @@ module AvaTax
38
39
  # ### Security Policies
39
40
  #
40
41
  # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
41
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
42
+ # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
43
+ # Swagger Name: AvaTaxClient
42
44
  # @param model [NotificationModel[]] The notifications you wish to create.
43
- # @return [NotificationModel[]]
44
- def create_notifications(model) path = "/api/v2/notifications"
45
- post(path, model) end
46
-
47
- # Create a new subscription
48
- #
45
+ # @return [NotificationModel[]]
46
+ def create_notifications(model) path = "/api/v2/notifications"
47
+ post(path, model, {}, "22.2.0") end
48
+
49
+ # Create a new subscription
50
+ #
49
51
  # This API is for use by Avalara Registrar administrative users only.
50
52
  #
51
53
  # Create one or more new subscription objects attached to this account.
@@ -54,15 +56,16 @@ module AvaTax
54
56
  #
55
57
  # ### Security Policies
56
58
  #
57
- # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
59
+ # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
60
+ # Swagger Name: AvaTaxClient
58
61
  # @param accountId [Integer] The ID of the account that owns this subscription.
59
62
  # @param model [SubscriptionModel[]] The subscription you wish to create.
60
- # @return [SubscriptionModel[]]
61
- def create_subscriptions(accountId, model) path = "/api/v2/accounts/#{accountId}/subscriptions"
62
- post(path, model) end
63
-
64
- # Delete a single account
65
- #
63
+ # @return [SubscriptionModel[]]
64
+ def create_subscriptions(accountId, model) path = "/api/v2/accounts/#{accountId}/subscriptions"
65
+ post(path, model, {}, "22.2.0") end
66
+
67
+ # Delete a single account
68
+ #
66
69
  # # For Registrar Use Only
67
70
  # This API is for use by Avalara Registrar administrative users only.
68
71
  #
@@ -71,14 +74,15 @@ module AvaTax
71
74
  #
72
75
  # ### Security Policies
73
76
  #
74
- # * This API requires the user role SystemAdmin.
77
+ # * This API requires the user role SystemAdmin.
78
+ # Swagger Name: AvaTaxClient
75
79
  # @param id [Integer] The ID of the account you wish to delete.
76
- # @return [ErrorDetail[]]
77
- def delete_account(id) path = "/api/v2/accounts/#{id}"
78
- delete(path) end
79
-
80
- # Delete a single notification.
81
- #
80
+ # @return [ErrorDetail[]]
81
+ def delete_account(id) path = "/api/v2/accounts/#{id}"
82
+ delete(path, {}, "22.2.0") end
83
+
84
+ # Delete a single notification.
85
+ #
82
86
  # This API is available by invitation only.
83
87
  #
84
88
  # Delete the existing notification identified by this URL.
@@ -93,14 +97,15 @@ module AvaTax
93
97
  # ### Security Policies
94
98
  #
95
99
  # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
96
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
100
+ # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
101
+ # Swagger Name: AvaTaxClient
97
102
  # @param id [Integer] The id of the notification you wish to delete.
98
- # @return [ErrorDetail[]]
99
- def delete_notification(id) path = "/api/v2/notifications/#{id}"
100
- delete(path) end
101
-
102
- # Delete a single subscription
103
- #
103
+ # @return [ErrorDetail[]]
104
+ def delete_notification(id) path = "/api/v2/notifications/#{id}"
105
+ delete(path, {}, "22.2.0") end
106
+
107
+ # Delete a single subscription
108
+ #
104
109
  # # For Registrar Use Only
105
110
  # This API is for use by Avalara Registrar administrative users only.
106
111
  #
@@ -108,25 +113,27 @@ module AvaTax
108
113
  #
109
114
  # ### Security Policies
110
115
  #
111
- # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
116
+ # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
117
+ # Swagger Name: AvaTaxClient
112
118
  # @param accountId [Integer] The ID of the account that owns this subscription.
113
119
  # @param id [Integer] The ID of the subscription you wish to delete.
114
- # @return [ErrorDetail[]]
115
- def delete_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
116
- delete(path) end
117
-
118
- # Retrieve List of Accounts by Account Migration Status
119
- #
120
+ # @return [ErrorDetail[]]
121
+ def delete_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
122
+ delete(path, {}, "22.2.0") end
123
+
124
+ # Retrieve List of Accounts by Account Migration Status
125
+ #
120
126
  # ### Security Policies
121
127
  #
122
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
128
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
129
+ # Swagger Name: AvaTaxClient
123
130
  # @param writeMode [String] (See TssAccountMigrationId::* for a list of allowable values)
124
- # @return [Object]
125
- def list_accounts_by_tss_write_mode(writeMode) path = "/api/v2/accounts/ListAccountsByTssWriteMode/#{writeMode}"
126
- get(path) end
127
-
128
- # Reset a user's password programmatically
129
- #
131
+ # @return [Object]
132
+ def list_accounts_by_tss_write_mode(writeMode) path = "/api/v2/accounts/ListAccountsByTssWriteMode/#{writeMode}"
133
+ get(path, {}, "22.2.0") end
134
+
135
+ # Reset a user's password programmatically
136
+ #
130
137
  # # For Registrar Use Only
131
138
  # This API is for use by Avalara Registrar administrative users only.
132
139
  #
@@ -137,16 +144,17 @@ module AvaTax
137
144
  # ### Security Policies
138
145
  #
139
146
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
140
- # * This API is available to Avalara system-level (registrar-level) users only.
147
+ # * This API is available to Avalara system-level (registrar-level) users only.
148
+ # Swagger Name: AvaTaxClient
141
149
  # @param userId [Integer] The unique ID of the user whose password will be changed
142
150
  # @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this.
143
151
  # @param model [Object] The new password for this user
144
- # @return [String]
145
- def reset_password(userId, model, options={}) path = "/api/v2/passwords/#{userId}/reset"
146
- post(path, model, options) end
147
-
148
- # Update a single account
149
- #
152
+ # @return [String]
153
+ def reset_password(userId, model, options={}) path = "/api/v2/passwords/#{userId}/reset"
154
+ post(path, model, options, "22.2.0") end
155
+
156
+ # Update a single account
157
+ #
150
158
  # # For Registrar Use Only
151
159
  # This API is for use by Avalara Registrar administrative users only.
152
160
  #
@@ -154,15 +162,16 @@ module AvaTax
154
162
  #
155
163
  # ### Security Policies
156
164
  #
157
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
165
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
166
+ # Swagger Name: AvaTaxClient
158
167
  # @param id [Integer] The ID of the account you wish to update.
159
168
  # @param model [Object] The account object you wish to update.
160
- # @return [Object]
161
- def update_account(id, model) path = "/api/v2/accounts/#{id}"
162
- put(path, model) end
163
-
164
- # Update a single notification.
165
- #
169
+ # @return [Object]
170
+ def update_account(id, model) path = "/api/v2/accounts/#{id}"
171
+ put(path, model, {}, "22.2.0") end
172
+
173
+ # Update a single notification.
174
+ #
166
175
  # This API is available by invitation only.
167
176
  #
168
177
  # Replaces the notification identified by this URL with a new notification.
@@ -177,15 +186,16 @@ module AvaTax
177
186
  # ### Security Policies
178
187
  #
179
188
  # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
180
- # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
189
+ # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].
190
+ # Swagger Name: AvaTaxClient
181
191
  # @param id [Integer] The id of the notification you wish to update.
182
192
  # @param model [Object] The notification object you wish to update.
183
- # @return [Object]
184
- def update_notification(id, model) path = "/api/v2/notifications/#{id}"
185
- put(path, model) end
186
-
187
- # Update a single subscription
188
- #
193
+ # @return [Object]
194
+ def update_notification(id, model) path = "/api/v2/notifications/#{id}"
195
+ put(path, model, {}, "22.2.0") end
196
+
197
+ # Update a single subscription
198
+ #
189
199
  # # For Registrar Use Only
190
200
  # This API is for use by Avalara Registrar administrative users only.
191
201
  #
@@ -197,13 +207,14 @@ module AvaTax
197
207
  #
198
208
  # ### Security Policies
199
209
  #
200
- # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
210
+ # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
211
+ # Swagger Name: AvaTaxClient
201
212
  # @param accountId [Integer] The ID of the account that this subscription belongs to.
202
213
  # @param id [Integer] The ID of the subscription you wish to update
203
214
  # @param model [Object] The subscription you wish to update.
204
- # @return [Object]
205
- def update_subscription(accountId, id, model) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
206
- put(path, model) end
207
- end
208
- end
215
+ # @return [Object]
216
+ def update_subscription(accountId, id, model) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
217
+ put(path, model, {}, "22.2.0") end
218
+ end
219
+ end
209
220
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Reports
4
-
5
-
6
- # Download a report
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Reports
4
+
5
+
6
+ # Download a report
7
+ #
8
8
  # This API downloads the file associated with a report.
9
9
  #
10
10
  # If the report is not yet complete, you will receive a `ReportNotFinished` error. To check if a report is complete,
@@ -22,14 +22,15 @@ module AvaTax
22
22
  #
23
23
  # ### Security Policies
24
24
  #
25
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
25
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
26
+ # Swagger Name: AvaTaxClient
26
27
  # @param id [Integer] The unique ID number of this report
27
- # @return [Object]
28
- def download_report(id) path = "/api/v2/reports/#{id}/attachment"
29
- get(path) end
30
-
31
- # Retrieve a single report
32
- #
28
+ # @return [Object]
29
+ def download_report(id) path = "/api/v2/reports/#{id}/attachment"
30
+ get(path, {}, "22.2.0") end
31
+
32
+ # Retrieve a single report
33
+ #
33
34
  # Retrieve a single report by its unique ID number.
34
35
  #
35
36
  # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
@@ -40,14 +41,15 @@ module AvaTax
40
41
  # * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
41
42
  # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
42
43
  #
43
- # This API call returns information about any report type.
44
+ # This API call returns information about any report type.
45
+ # Swagger Name: AvaTaxClient
44
46
  # @param id [Integer] The unique ID number of the report to retrieve
45
- # @return [Object]
46
- def get_report(id) path = "/api/v2/reports/#{id}"
47
- get(path) end
48
-
49
- # Initiate an ExportDocumentLine report task
50
- #
47
+ # @return [Object]
48
+ def get_report(id) path = "/api/v2/reports/#{id}"
49
+ get(path, {}, "22.2.0") end
50
+
51
+ # Initiate an ExportDocumentLine report task
52
+ #
51
53
  # Begins running an `ExportDocumentLine` report task and returns the identity of the report.
52
54
  #
53
55
  # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
@@ -71,15 +73,16 @@ module AvaTax
71
73
  #
72
74
  # ### Security Policies
73
75
  #
74
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
76
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
77
+ # Swagger Name: AvaTaxClient
75
78
  # @param companyId [Integer] The unique ID number of the company to report on.
76
79
  # @param model [Object] Options that may be configured to customize the report.
77
- # @return [ReportModel[]]
78
- def initiate_export_document_line_report(companyId, model) path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
79
- post(path, model) end
80
-
81
- # List all report tasks for account
82
- #
80
+ # @return [ReportModel[]]
81
+ def initiate_export_document_line_report(companyId, model) path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
82
+ post(path, model, {}, "22.2.0") end
83
+
84
+ # List all report tasks for account
85
+ #
83
86
  # List all report tasks for your account.
84
87
  #
85
88
  # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
@@ -94,14 +97,15 @@ module AvaTax
94
97
  #
95
98
  # ### Security Policies
96
99
  #
97
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
100
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
101
+ # Swagger Name: AvaTaxClient
98
102
  # @param companyId [Integer] The id of the company for which to get reports.
99
103
  # @param pageKey [String] Provide a page key to retrieve the next page of results.
100
104
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
101
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.
102
- # @return [FetchResult]
103
- def list_reports(options={}) path = "/api/v2/reports"
104
- get(path, options) end
105
- end
106
- end
106
+ # @return [FetchResult]
107
+ def list_reports(options={}) path = "/api/v2/reports"
108
+ get(path, options, "22.2.0") end
109
+ end
110
+ end
107
111
  end