avatax 20.1.0 → 20.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/avatax.gemspec +0 -1
  3. data/lib/avatax/client/accounts.rb +236 -172
  4. data/lib/avatax/client/addresses.rb +54 -54
  5. data/lib/avatax/client/advancedrules.rb +63 -162
  6. data/lib/avatax/client/avafileforms.rb +78 -78
  7. data/lib/avatax/client/batches.rb +223 -170
  8. data/lib/avatax/client/certexpressinvites.rb +97 -97
  9. data/lib/avatax/client/certificates.rb +424 -424
  10. data/lib/avatax/client/companies.rb +457 -350
  11. data/lib/avatax/client/compliance.rb +15 -15
  12. data/lib/avatax/client/contacts.rb +106 -106
  13. data/lib/avatax/client/customers.rb +376 -376
  14. data/lib/avatax/client/datasources.rb +99 -99
  15. data/lib/avatax/client/definitions.rb +862 -847
  16. data/lib/avatax/client/distancethresholds.rb +122 -122
  17. data/lib/avatax/client/ecommercetoken.rb +37 -0
  18. data/lib/avatax/client/filingcalendars.rb +20 -508
  19. data/lib/avatax/client/filings.rb +37 -26
  20. data/lib/avatax/client/firmclientlinkages.rb +123 -123
  21. data/lib/avatax/client/free.rb +100 -100
  22. data/lib/avatax/client/fundingrequests.rb +52 -52
  23. data/lib/avatax/client/items.rb +423 -423
  24. data/lib/avatax/client/jurisdictionoverrides.rb +118 -118
  25. data/lib/avatax/client/locations.rb +253 -139
  26. data/lib/avatax/client/multidocument.rb +390 -310
  27. data/lib/avatax/client/nexus.rb +341 -201
  28. data/lib/avatax/client/notifications.rb +75 -75
  29. data/lib/avatax/client/provisioning.rb +49 -49
  30. data/lib/avatax/client/registrar.rb +198 -198
  31. data/lib/avatax/client/reports.rb +97 -97
  32. data/lib/avatax/client/settings.rb +156 -156
  33. data/lib/avatax/client/subscriptions.rb +62 -62
  34. data/lib/avatax/client/taxcodes.rb +120 -120
  35. data/lib/avatax/client/taxcontent.rb +133 -133
  36. data/lib/avatax/client/taxrules.rb +170 -170
  37. data/lib/avatax/client/transactions.rb +836 -791
  38. data/lib/avatax/client/upcs.rb +111 -111
  39. data/lib/avatax/client/users.rb +183 -183
  40. data/lib/avatax/client/utilities.rb +61 -61
  41. data/lib/avatax/connection.rb +3 -3
  42. data/lib/avatax/request.rb +2 -0
  43. data/lib/avatax/version.rb +1 -1
  44. metadata +4 -17
@@ -1,76 +1,76 @@
1
- module AvaTax
2
- class Client
3
- module Notifications
4
-
5
-
6
- # Mark a single notification as dismissed.
7
- #
8
- # Marks the notification identified by this URL as dismissed.
9
- #
10
- # A notification is a message from Avalara that may have relevance to your business. You may want
11
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
12
- # any relevant concerns raised by this notification.
13
- #
14
- # An example of a notification would be a message about new software, or a change to AvaTax that may
15
- # affect you, or a potential issue with your company's tax profile.
16
- #
17
- # When you dismiss a notification, the notification will track the user and time when it was
18
- # dismissed. You can then later review which employees of your company dismissed notifications to
19
- # determine if they were resolved appropriately.
20
- #
21
- # A Global notification with null accountId and companyId cannot be dismissed and will expire within a given time span.
22
- #
23
- # ### Security Policies
24
- #
25
- # * 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.
26
- # @param id [Integer] The id of the notification you wish to mark as dismissed.
27
- # @return [Object]
28
- def dismiss_notification(id) path = "/api/v2/notifications/#{id}/dismiss"
29
- put(path) end
30
-
31
- # Retrieve a single notification.
32
- #
33
- # Retrieve a single notification by its unique ID number.
34
- #
35
- # A notification is a message from Avalara that may have relevance to your business. You may want
36
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
37
- # any relevant concerns raised by this notification.
38
- #
39
- # An example of a notification would be a message about new software, or a change to AvaTax that may
40
- # affect you, or a potential issue with your company's tax profile.
41
- #
42
- # ### Security Policies
43
- #
44
- # * 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.
45
- # @param id [Integer] The id of the notification to retrieve.
46
- # @return [Object]
47
- def get_notification(id) path = "/api/v2/notifications/#{id}"
48
- get(path) end
49
-
50
- # List all notifications.
51
- #
52
- # List all notifications.
53
- #
54
- # A notification is a message from Avalara that may have relevance to your business. You may want
55
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
56
- # any relevant concerns raised by this notification.
57
- #
58
- # An example of a notification would be a message about new software, or a change to AvaTax that may
59
- # affect you, or a potential issue with your company's tax profile.
60
- #
61
- # You may search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
62
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
63
- #
64
- # ### Security Policies
65
- #
66
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
67
- # @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/).
68
- # @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.
69
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
70
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
71
- # @return [FetchResult]
72
- def list_notifications(options={}) path = "/api/v2/notifications"
73
- get(path, options) end
74
- end
75
- end
1
+ module AvaTax
2
+ class Client
3
+ module Notifications
4
+
5
+
6
+ # Mark a single notification as dismissed.
7
+ #
8
+ # Marks the notification identified by this URL as dismissed.
9
+ #
10
+ # A notification is a message from Avalara that may have relevance to your business. You may want
11
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
12
+ # any relevant concerns raised by this notification.
13
+ #
14
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
15
+ # affect you, or a potential issue with your company's tax profile.
16
+ #
17
+ # When you dismiss a notification, the notification will track the user and time when it was
18
+ # dismissed. You can then later review which employees of your company dismissed notifications to
19
+ # determine if they were resolved appropriately.
20
+ #
21
+ # A Global notification with null accountId and companyId cannot be dismissed and will expire within a given time span.
22
+ #
23
+ # ### Security Policies
24
+ #
25
+ # * 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.
26
+ # @param id [Integer] The id of the notification you wish to mark as dismissed.
27
+ # @return [Object]
28
+ def dismiss_notification(id) path = "/api/v2/notifications/#{id}/dismiss"
29
+ put(path) end
30
+
31
+ # Retrieve a single notification.
32
+ #
33
+ # Retrieve a single notification by its unique ID number.
34
+ #
35
+ # A notification is a message from Avalara that may have relevance to your business. You may want
36
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
37
+ # any relevant concerns raised by this notification.
38
+ #
39
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
40
+ # affect you, or a potential issue with your company's tax profile.
41
+ #
42
+ # ### Security Policies
43
+ #
44
+ # * 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.
45
+ # @param id [Integer] The id of the notification to retrieve.
46
+ # @return [Object]
47
+ def get_notification(id) path = "/api/v2/notifications/#{id}"
48
+ get(path) end
49
+
50
+ # List all notifications.
51
+ #
52
+ # List all notifications.
53
+ #
54
+ # A notification is a message from Avalara that may have relevance to your business. You may want
55
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
56
+ # any relevant concerns raised by this notification.
57
+ #
58
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
59
+ # affect you, or a potential issue with your company's tax profile.
60
+ #
61
+ # You may search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
62
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
63
+ #
64
+ # ### Security Policies
65
+ #
66
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
67
+ # @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/).
68
+ # @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.
69
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
70
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
71
+ # @return [FetchResult]
72
+ def list_notifications(options={}) path = "/api/v2/notifications"
73
+ get(path, options) end
74
+ end
75
+ end
76
76
  end
@@ -1,50 +1,50 @@
1
- module AvaTax
2
- class Client
3
- module Provisioning
4
-
5
-
6
- # Request a new Avalara account
7
- #
8
- # This API is for use by partner provisioning 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 [Provisioning: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) path = "/api/v2/accounts/request"
31
- post(path, model) end
32
-
33
- # Request a new entitilement to an existing customer
34
- #
35
- # This API is for use by partner provisioning services customers only. This will allow the partners to allow
36
- # the add new entitlement to an existing customer
37
- #
38
- # ### Security Policies
39
- #
40
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
41
- # * 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
- # @param id [Integer] The avatax account id of the customer
44
- # @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
1
+ module AvaTax
2
+ class Client
3
+ module Provisioning
4
+
5
+
6
+ # Request a new Avalara account
7
+ #
8
+ # This API is for use by partner provisioning 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 [Provisioning: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) path = "/api/v2/accounts/request"
31
+ post(path, model) end
32
+
33
+ # Request a new entitilement to an existing customer
34
+ #
35
+ # This API is for use by partner provisioning services customers only. This will allow the partners to allow
36
+ # the add new entitlement to an existing customer
37
+ #
38
+ # ### Security Policies
39
+ #
40
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
41
+ # * 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
+ # @param id [Integer] The avatax account id of the customer
44
+ # @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
50
50
  end
@@ -1,199 +1,199 @@
1
- module AvaTax
2
- class Client
3
- module Registrar
4
-
5
-
6
- # Create a new account
7
- #
8
- # # For Registrar Use Only
9
- # This API is for use by Avalara Registrar administrative users only.
10
- #
11
- # Create a single new account object.
12
- # When creating an account object you may attach subscriptions and users as part of the 'Create' call.
13
- #
14
- # ### Security Policies
15
- #
16
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
17
- # @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
- #
24
- # This API is available by invitation only.
25
- #
26
- # Create a single notification.
27
- #
28
- # A notification is a message from Avalara that may have relevance to your business. You may want
29
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
30
- # any relevant concerns raised by this notification.
31
- #
32
- # A Global notification is a message which is directed to all the accounts and is set to expire within
33
- # a certain time and cannot be dismissed by the user. Make accountId and companyId null to create a global notification.
34
- #
35
- # An example of a notification would be a message about new software, or a change to AvaTax that may
36
- # affect you, or a potential issue with your company's tax profile.
37
- #
38
- # ### Security Policies
39
- #
40
- # * 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
- # @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
- #
49
- # This API is for use by Avalara Registrar administrative users only.
50
- #
51
- # Create one or more new subscription objects attached to this account.
52
- # A 'subscription' indicates a licensed subscription to a named Avalara service.
53
- # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
54
- #
55
- # ### Security Policies
56
- #
57
- # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
58
- # @param accountId [Integer] The ID of the account that owns this subscription.
59
- # @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
- #
66
- # # For Registrar Use Only
67
- # This API is for use by Avalara Registrar administrative users only.
68
- #
69
- # Delete an account.
70
- # Deleting an account will delete all companies and all account level users attached to this account.
71
- #
72
- # ### Security Policies
73
- #
74
- # * This API requires the user role SystemAdmin.
75
- # @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
- #
82
- # This API is available by invitation only.
83
- #
84
- # Delete the existing notification identified by this URL.
85
- #
86
- # A notification is a message from Avalara that may have relevance to your business. You may want
87
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
88
- # any relevant concerns raised by this notification.
89
- #
90
- # An example of a notification would be a message about new software, or a change to AvaTax that may
91
- # affect you, or a potential issue with your company's tax profile.
92
- #
93
- # ### Security Policies
94
- #
95
- # * 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].
97
- # @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
- #
104
- # # For Registrar Use Only
105
- # This API is for use by Avalara Registrar administrative users only.
106
- #
107
- # Mark the existing account identified by this URL as deleted.
108
- #
109
- # ### Security Policies
110
- #
111
- # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
112
- # @param accountId [Integer] The ID of the account that owns this subscription.
113
- # @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
- # Reset a user's password programmatically
119
- #
120
- # # For Registrar Use Only
121
- # This API is for use by Avalara Registrar administrative users only.
122
- #
123
- # Allows a system admin to reset the password for a specific user via the API.
124
- # This API is only available for Avalara Registrar Admins, and can be used to reset the password of any
125
- # user based on internal Avalara business processes.
126
- #
127
- # ### Security Policies
128
- #
129
- # * 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.
130
- # * This API is available to Avalara system-level (registrar-level) users only.
131
- # @param userId [Integer] The unique ID of the user whose password will be changed
132
- # @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this.
133
- # @param model [Object] The new password for this user
134
- # @return [String]
135
- def reset_password(userId, model, options={}) path = "/api/v2/passwords/#{userId}/reset"
136
- post(path, model, options) end
137
-
138
- # Update a single account
139
- #
140
- # # For Registrar Use Only
141
- # This API is for use by Avalara Registrar administrative users only.
142
- #
143
- # Replace an existing account object with an updated account object.
144
- #
145
- # ### Security Policies
146
- #
147
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
148
- # @param id [Integer] The ID of the account you wish to update.
149
- # @param model [Object] The account object you wish to update.
150
- # @return [Object]
151
- def update_account(id, model) path = "/api/v2/accounts/#{id}"
152
- put(path, model) end
153
-
154
- # Update a single notification.
155
- #
156
- # This API is available by invitation only.
157
- #
158
- # Replaces the notification identified by this URL with a new notification.
159
- #
160
- # A notification is a message from Avalara that may have relevance to your business. You may want
161
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
162
- # any relevant concerns raised by this notification.
163
- #
164
- # An example of a notification would be a message about new software, or a change to AvaTax that may
165
- # affect you, or a potential issue with your company's tax profile.
166
- #
167
- # ### Security Policies
168
- #
169
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
170
- # * 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].
171
- # @param id [Integer] The id of the notification you wish to update.
172
- # @param model [Object] The notification object you wish to update.
173
- # @return [Object]
174
- def update_notification(id, model) path = "/api/v2/notifications/#{id}"
175
- put(path, model) end
176
-
177
- # Update a single subscription
178
- #
179
- # # For Registrar Use Only
180
- # This API is for use by Avalara Registrar administrative users only.
181
- #
182
- # Replace the existing subscription object at this URL with an updated object.
183
- # A 'subscription' indicates a licensed subscription to a named Avalara service.
184
- # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
185
- # All data from the existing object will be replaced with data in the object you PUT.
186
- # To set a field's value to null, you may either set its value to null or omit that field from the object you post.
187
- #
188
- # ### Security Policies
189
- #
190
- # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
191
- # @param accountId [Integer] The ID of the account that this subscription belongs to.
192
- # @param id [Integer] The ID of the subscription you wish to update
193
- # @param model [Object] The subscription you wish to update.
194
- # @return [Object]
195
- def update_subscription(accountId, id, model) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
196
- put(path, model) end
197
- end
198
- end
1
+ module AvaTax
2
+ class Client
3
+ module Registrar
4
+
5
+
6
+ # Create a new account
7
+ #
8
+ # # For Registrar Use Only
9
+ # This API is for use by Avalara Registrar administrative users only.
10
+ #
11
+ # Create a single new account object.
12
+ # When creating an account object you may attach subscriptions and users as part of the 'Create' call.
13
+ #
14
+ # ### Security Policies
15
+ #
16
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
17
+ # @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
+ #
24
+ # This API is available by invitation only.
25
+ #
26
+ # Create a single notification.
27
+ #
28
+ # A notification is a message from Avalara that may have relevance to your business. You may want
29
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
30
+ # any relevant concerns raised by this notification.
31
+ #
32
+ # A Global notification is a message which is directed to all the accounts and is set to expire within
33
+ # a certain time and cannot be dismissed by the user. Make accountId and companyId null to create a global notification.
34
+ #
35
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
36
+ # affect you, or a potential issue with your company's tax profile.
37
+ #
38
+ # ### Security Policies
39
+ #
40
+ # * 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
+ # @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
+ #
49
+ # This API is for use by Avalara Registrar administrative users only.
50
+ #
51
+ # Create one or more new subscription objects attached to this account.
52
+ # A 'subscription' indicates a licensed subscription to a named Avalara service.
53
+ # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
54
+ #
55
+ # ### Security Policies
56
+ #
57
+ # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
58
+ # @param accountId [Integer] The ID of the account that owns this subscription.
59
+ # @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
+ #
66
+ # # For Registrar Use Only
67
+ # This API is for use by Avalara Registrar administrative users only.
68
+ #
69
+ # Delete an account.
70
+ # Deleting an account will delete all companies, all account level users and license keys attached to this account.
71
+ #
72
+ # ### Security Policies
73
+ #
74
+ # * This API requires the user role SystemAdmin.
75
+ # @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
+ #
82
+ # This API is available by invitation only.
83
+ #
84
+ # Delete the existing notification identified by this URL.
85
+ #
86
+ # A notification is a message from Avalara that may have relevance to your business. You may want
87
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
88
+ # any relevant concerns raised by this notification.
89
+ #
90
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
91
+ # affect you, or a potential issue with your company's tax profile.
92
+ #
93
+ # ### Security Policies
94
+ #
95
+ # * 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].
97
+ # @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
+ #
104
+ # # For Registrar Use Only
105
+ # This API is for use by Avalara Registrar administrative users only.
106
+ #
107
+ # Mark the existing account identified by this URL as deleted.
108
+ #
109
+ # ### Security Policies
110
+ #
111
+ # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
112
+ # @param accountId [Integer] The ID of the account that owns this subscription.
113
+ # @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
+ # Reset a user's password programmatically
119
+ #
120
+ # # For Registrar Use Only
121
+ # This API is for use by Avalara Registrar administrative users only.
122
+ #
123
+ # Allows a system admin to reset the password for a specific user via the API.
124
+ # This API is only available for Avalara Registrar Admins, and can be used to reset the password of any
125
+ # user based on internal Avalara business processes.
126
+ #
127
+ # ### Security Policies
128
+ #
129
+ # * 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.
130
+ # * This API is available to Avalara system-level (registrar-level) users only.
131
+ # @param userId [Integer] The unique ID of the user whose password will be changed
132
+ # @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this.
133
+ # @param model [Object] The new password for this user
134
+ # @return [String]
135
+ def reset_password(userId, model, options={}) path = "/api/v2/passwords/#{userId}/reset"
136
+ post(path, model, options) end
137
+
138
+ # Update a single account
139
+ #
140
+ # # For Registrar Use Only
141
+ # This API is for use by Avalara Registrar administrative users only.
142
+ #
143
+ # Replace an existing account object with an updated account object.
144
+ #
145
+ # ### Security Policies
146
+ #
147
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
148
+ # @param id [Integer] The ID of the account you wish to update.
149
+ # @param model [Object] The account object you wish to update.
150
+ # @return [Object]
151
+ def update_account(id, model) path = "/api/v2/accounts/#{id}"
152
+ put(path, model) end
153
+
154
+ # Update a single notification.
155
+ #
156
+ # This API is available by invitation only.
157
+ #
158
+ # Replaces the notification identified by this URL with a new notification.
159
+ #
160
+ # A notification is a message from Avalara that may have relevance to your business. You may want
161
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
162
+ # any relevant concerns raised by this notification.
163
+ #
164
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
165
+ # affect you, or a potential issue with your company's tax profile.
166
+ #
167
+ # ### Security Policies
168
+ #
169
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
170
+ # * 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].
171
+ # @param id [Integer] The id of the notification you wish to update.
172
+ # @param model [Object] The notification object you wish to update.
173
+ # @return [Object]
174
+ def update_notification(id, model) path = "/api/v2/notifications/#{id}"
175
+ put(path, model) end
176
+
177
+ # Update a single subscription
178
+ #
179
+ # # For Registrar Use Only
180
+ # This API is for use by Avalara Registrar administrative users only.
181
+ #
182
+ # Replace the existing subscription object at this URL with an updated object.
183
+ # A 'subscription' indicates a licensed subscription to a named Avalara service.
184
+ # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
185
+ # All data from the existing object will be replaced with data in the object you PUT.
186
+ # To set a field's value to null, you may either set its value to null or omit that field from the object you post.
187
+ #
188
+ # ### Security Policies
189
+ #
190
+ # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
191
+ # @param accountId [Integer] The ID of the account that this subscription belongs to.
192
+ # @param id [Integer] The ID of the subscription you wish to update
193
+ # @param model [Object] The subscription you wish to update.
194
+ # @return [Object]
195
+ def update_subscription(accountId, id, model) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
196
+ put(path, model) end
197
+ end
198
+ end
199
199
  end