avatax 19.12.0 → 20.7.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 (43) hide show
  1. checksums.yaml +5 -5
  2. data/avatax.gemspec +0 -1
  3. data/lib/avatax/client/accounts.rb +269 -193
  4. data/lib/avatax/client/addresses.rb +60 -60
  5. data/lib/avatax/client/advancedrules.rb +81 -162
  6. data/lib/avatax/client/avafileforms.rb +93 -93
  7. data/lib/avatax/client/batches.rb +247 -188
  8. data/lib/avatax/client/certexpressinvites.rb +106 -106
  9. data/lib/avatax/client/certificates.rb +469 -469
  10. data/lib/avatax/client/companies.rb +400 -398
  11. data/lib/avatax/client/compliance.rb +18 -18
  12. data/lib/avatax/client/contacts.rb +124 -124
  13. data/lib/avatax/client/customers.rb +415 -415
  14. data/lib/avatax/client/datasources.rb +117 -117
  15. data/lib/avatax/client/definitions.rb +1039 -1007
  16. data/lib/avatax/client/distancethresholds.rb +140 -140
  17. data/lib/avatax/client/filingcalendars.rb +23 -508
  18. data/lib/avatax/client/filings.rb +29 -29
  19. data/lib/avatax/client/firmclientlinkages.rb +150 -150
  20. data/lib/avatax/client/free.rb +109 -109
  21. data/lib/avatax/client/fundingrequests.rb +58 -58
  22. data/lib/avatax/client/items.rb +480 -480
  23. data/lib/avatax/client/jurisdictionoverrides.rb +136 -136
  24. data/lib/avatax/client/locations.rb +163 -160
  25. data/lib/avatax/client/multidocument.rb +420 -340
  26. data/lib/avatax/client/nexus.rb +240 -225
  27. data/lib/avatax/client/notifications.rb +84 -84
  28. data/lib/avatax/client/provisioning.rb +55 -55
  29. data/lib/avatax/client/registrar.rb +228 -228
  30. data/lib/avatax/client/reports.rb +109 -109
  31. data/lib/avatax/client/settings.rb +174 -174
  32. data/lib/avatax/client/subscriptions.rb +71 -71
  33. data/lib/avatax/client/taxcodes.rb +138 -138
  34. data/lib/avatax/client/taxcontent.rb +142 -142
  35. data/lib/avatax/client/taxrules.rb +188 -188
  36. data/lib/avatax/client/transactions.rb +899 -854
  37. data/lib/avatax/client/upcs.rb +129 -129
  38. data/lib/avatax/client/users.rb +207 -207
  39. data/lib/avatax/client/utilities.rb +70 -70
  40. data/lib/avatax/connection.rb +3 -3
  41. data/lib/avatax/request.rb +2 -0
  42. data/lib/avatax/version.rb +1 -1
  43. metadata +4 -25
@@ -1,85 +1,85 @@
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)
29
- path = "/api/v2/notifications/#{id}/dismiss"
30
- put(path)
31
- end
32
-
33
-
34
- # Retrieve a single notification.
35
- #
36
- # Retrieve a single notification by its unique ID number.
37
- #
38
- # A notification is a message from Avalara that may have relevance to your business. You may want
39
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
40
- # any relevant concerns raised by this notification.
41
- #
42
- # An example of a notification would be a message about new software, or a change to AvaTax that may
43
- # affect you, or a potential issue with your company's tax profile.
44
- #
45
- # ### Security Policies
46
- #
47
- # * 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.
48
- # @param id [Integer] The id of the notification to retrieve.
49
- # @return [Object]
50
- def get_notification(id)
51
- path = "/api/v2/notifications/#{id}"
52
- get(path)
53
- end
54
-
55
-
56
- # List all notifications.
57
- #
58
- # List all notifications.
59
- #
60
- # A notification is a message from Avalara that may have relevance to your business. You may want
61
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
62
- # any relevant concerns raised by this notification.
63
- #
64
- # An example of a notification would be a message about new software, or a change to AvaTax that may
65
- # affect you, or a potential issue with your company's tax profile.
66
- #
67
- # 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/) .
68
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
69
- #
70
- # ### Security Policies
71
- #
72
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
73
- # @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/).
74
- # @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.
75
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
76
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
77
- # @return [FetchResult]
78
- def list_notifications(options={})
79
- path = "/api/v2/notifications"
80
- get(path, options)
81
- end
82
-
83
- end
84
- 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)
29
+ path = "/api/v2/notifications/#{id}/dismiss"
30
+ put(path)
31
+ end
32
+
33
+
34
+ # Retrieve a single notification.
35
+ #
36
+ # Retrieve a single notification by its unique ID number.
37
+ #
38
+ # A notification is a message from Avalara that may have relevance to your business. You may want
39
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
40
+ # any relevant concerns raised by this notification.
41
+ #
42
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
43
+ # affect you, or a potential issue with your company's tax profile.
44
+ #
45
+ # ### Security Policies
46
+ #
47
+ # * 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.
48
+ # @param id [Integer] The id of the notification to retrieve.
49
+ # @return [Object]
50
+ def get_notification(id)
51
+ path = "/api/v2/notifications/#{id}"
52
+ get(path)
53
+ end
54
+
55
+
56
+ # List all notifications.
57
+ #
58
+ # List all notifications.
59
+ #
60
+ # A notification is a message from Avalara that may have relevance to your business. You may want
61
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
62
+ # any relevant concerns raised by this notification.
63
+ #
64
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
65
+ # affect you, or a potential issue with your company's tax profile.
66
+ #
67
+ # 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/) .
68
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
69
+ #
70
+ # ### Security Policies
71
+ #
72
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
73
+ # @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/).
74
+ # @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.
75
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
76
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
77
+ # @return [FetchResult]
78
+ def list_notifications(options={})
79
+ path = "/api/v2/notifications"
80
+ get(path, options)
81
+ end
82
+
83
+ end
84
+ end
85
85
  end
@@ -1,56 +1,56 @@
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)
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 provisioning 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 [Provisioning: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 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)
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 provisioning 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 [Provisioning: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,229 +1,229 @@
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)
20
- path = "/api/v2/accounts"
21
- post(path, model)
22
- end
23
-
24
-
25
- # Create new notifications.
26
- #
27
- # This API is available by invitation only.
28
- #
29
- # Create a single notification.
30
- #
31
- # A notification is a message from Avalara that may have relevance to your business. You may want
32
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
33
- # any relevant concerns raised by this notification.
34
- #
35
- # A Global notification is a message which is directed to all the accounts and is set to expire within
36
- # a certain time and cannot be dismissed by the user. Make accountId and companyId null to create a global notification.
37
- #
38
- # An example of a notification would be a message about new software, or a change to AvaTax that may
39
- # affect you, or a potential issue with your company's tax profile.
40
- #
41
- # ### Security Policies
42
- #
43
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
44
- # * 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].
45
- # @param model [NotificationModel[]] The notifications you wish to create.
46
- # @return [NotificationModel[]]
47
- def create_notifications(model)
48
- path = "/api/v2/notifications"
49
- post(path, model)
50
- end
51
-
52
-
53
- # Create a new subscription
54
- #
55
- # This API is for use by Avalara Registrar administrative users only.
56
- #
57
- # Create one or more new subscription objects attached to this account.
58
- # A 'subscription' indicates a licensed subscription to a named Avalara service.
59
- # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
60
- #
61
- # ### Security Policies
62
- #
63
- # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
64
- # @param accountId [Integer] The ID of the account that owns this subscription.
65
- # @param model [SubscriptionModel[]] The subscription you wish to create.
66
- # @return [SubscriptionModel[]]
67
- def create_subscriptions(accountId, model)
68
- path = "/api/v2/accounts/#{accountId}/subscriptions"
69
- post(path, model)
70
- end
71
-
72
-
73
- # Delete a single account
74
- #
75
- # # For Registrar Use Only
76
- # This API is for use by Avalara Registrar administrative users only.
77
- #
78
- # Delete an account.
79
- # Deleting an account will delete all companies and all account level users attached to this account.
80
- #
81
- # ### Security Policies
82
- #
83
- # * This API requires the user role SystemAdmin.
84
- # @param id [Integer] The ID of the account you wish to delete.
85
- # @return [ErrorDetail[]]
86
- def delete_account(id)
87
- path = "/api/v2/accounts/#{id}"
88
- delete(path)
89
- end
90
-
91
-
92
- # Delete a single notification.
93
- #
94
- # This API is available by invitation only.
95
- #
96
- # Delete the existing notification identified by this URL.
97
- #
98
- # A notification is a message from Avalara that may have relevance to your business. You may want
99
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
100
- # any relevant concerns raised by this notification.
101
- #
102
- # An example of a notification would be a message about new software, or a change to AvaTax that may
103
- # affect you, or a potential issue with your company's tax profile.
104
- #
105
- # ### Security Policies
106
- #
107
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
108
- # * 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].
109
- # @param id [Integer] The id of the notification you wish to delete.
110
- # @return [ErrorDetail[]]
111
- def delete_notification(id)
112
- path = "/api/v2/notifications/#{id}"
113
- delete(path)
114
- end
115
-
116
-
117
- # Delete a single subscription
118
- #
119
- # # For Registrar Use Only
120
- # This API is for use by Avalara Registrar administrative users only.
121
- #
122
- # Mark the existing account identified by this URL as deleted.
123
- #
124
- # ### Security Policies
125
- #
126
- # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
127
- # @param accountId [Integer] The ID of the account that owns this subscription.
128
- # @param id [Integer] The ID of the subscription you wish to delete.
129
- # @return [ErrorDetail[]]
130
- def delete_subscription(accountId, id)
131
- path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
132
- delete(path)
133
- end
134
-
135
-
136
- # Reset a user's password programmatically
137
- #
138
- # # For Registrar Use Only
139
- # This API is for use by Avalara Registrar administrative users only.
140
- #
141
- # Allows a system admin to reset the password for a specific user via the API.
142
- # This API is only available for Avalara Registrar Admins, and can be used to reset the password of any
143
- # user based on internal Avalara business processes.
144
- #
145
- # ### Security Policies
146
- #
147
- # * 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.
148
- # * This API is available to Avalara system-level (registrar-level) users only.
149
- # @param userId [Integer] The unique ID of the user whose password will be changed
150
- # @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this.
151
- # @param model [Object] The new password for this user
152
- # @return [String]
153
- def reset_password(userId, model, options={})
154
- path = "/api/v2/passwords/#{userId}/reset"
155
- post(path, model, options)
156
- end
157
-
158
-
159
- # Update a single account
160
- #
161
- # # For Registrar Use Only
162
- # This API is for use by Avalara Registrar administrative users only.
163
- #
164
- # Replace an existing account object with an updated account object.
165
- #
166
- # ### Security Policies
167
- #
168
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
169
- # @param id [Integer] The ID of the account you wish to update.
170
- # @param model [Object] The account object you wish to update.
171
- # @return [Object]
172
- def update_account(id, model)
173
- path = "/api/v2/accounts/#{id}"
174
- put(path, model)
175
- end
176
-
177
-
178
- # Update a single notification.
179
- #
180
- # This API is available by invitation only.
181
- #
182
- # Replaces the notification identified by this URL with a new notification.
183
- #
184
- # A notification is a message from Avalara that may have relevance to your business. You may want
185
- # to regularly review notifications and then dismiss them when you are certain that you have addressed
186
- # any relevant concerns raised by this notification.
187
- #
188
- # An example of a notification would be a message about new software, or a change to AvaTax that may
189
- # affect you, or a potential issue with your company's tax profile.
190
- #
191
- # ### Security Policies
192
- #
193
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
194
- # * 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].
195
- # @param id [Integer] The id of the notification you wish to update.
196
- # @param model [Object] The notification object you wish to update.
197
- # @return [Object]
198
- def update_notification(id, model)
199
- path = "/api/v2/notifications/#{id}"
200
- put(path, model)
201
- end
202
-
203
-
204
- # Update a single subscription
205
- #
206
- # # For Registrar Use Only
207
- # This API is for use by Avalara Registrar administrative users only.
208
- #
209
- # Replace the existing subscription object at this URL with an updated object.
210
- # A 'subscription' indicates a licensed subscription to a named Avalara service.
211
- # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
212
- # All data from the existing object will be replaced with data in the object you PUT.
213
- # 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.
214
- #
215
- # ### Security Policies
216
- #
217
- # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
218
- # @param accountId [Integer] The ID of the account that this subscription belongs to.
219
- # @param id [Integer] The ID of the subscription you wish to update
220
- # @param model [Object] The subscription you wish to update.
221
- # @return [Object]
222
- def update_subscription(accountId, id, model)
223
- path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
224
- put(path, model)
225
- end
226
-
227
- end
228
- 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)
20
+ path = "/api/v2/accounts"
21
+ post(path, model)
22
+ end
23
+
24
+
25
+ # Create new notifications.
26
+ #
27
+ # This API is available by invitation only.
28
+ #
29
+ # Create a single notification.
30
+ #
31
+ # A notification is a message from Avalara that may have relevance to your business. You may want
32
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
33
+ # any relevant concerns raised by this notification.
34
+ #
35
+ # A Global notification is a message which is directed to all the accounts and is set to expire within
36
+ # a certain time and cannot be dismissed by the user. Make accountId and companyId null to create a global notification.
37
+ #
38
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
39
+ # affect you, or a potential issue with your company's tax profile.
40
+ #
41
+ # ### Security Policies
42
+ #
43
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
44
+ # * 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].
45
+ # @param model [NotificationModel[]] The notifications you wish to create.
46
+ # @return [NotificationModel[]]
47
+ def create_notifications(model)
48
+ path = "/api/v2/notifications"
49
+ post(path, model)
50
+ end
51
+
52
+
53
+ # Create a new subscription
54
+ #
55
+ # This API is for use by Avalara Registrar administrative users only.
56
+ #
57
+ # Create one or more new subscription objects attached to this account.
58
+ # A 'subscription' indicates a licensed subscription to a named Avalara service.
59
+ # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
60
+ #
61
+ # ### Security Policies
62
+ #
63
+ # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
64
+ # @param accountId [Integer] The ID of the account that owns this subscription.
65
+ # @param model [SubscriptionModel[]] The subscription you wish to create.
66
+ # @return [SubscriptionModel[]]
67
+ def create_subscriptions(accountId, model)
68
+ path = "/api/v2/accounts/#{accountId}/subscriptions"
69
+ post(path, model)
70
+ end
71
+
72
+
73
+ # Delete a single account
74
+ #
75
+ # # For Registrar Use Only
76
+ # This API is for use by Avalara Registrar administrative users only.
77
+ #
78
+ # Delete an account.
79
+ # Deleting an account will delete all companies, all account level users and license keys attached to this account.
80
+ #
81
+ # ### Security Policies
82
+ #
83
+ # * This API requires the user role SystemAdmin.
84
+ # @param id [Integer] The ID of the account you wish to delete.
85
+ # @return [ErrorDetail[]]
86
+ def delete_account(id)
87
+ path = "/api/v2/accounts/#{id}"
88
+ delete(path)
89
+ end
90
+
91
+
92
+ # Delete a single notification.
93
+ #
94
+ # This API is available by invitation only.
95
+ #
96
+ # Delete the existing notification identified by this URL.
97
+ #
98
+ # A notification is a message from Avalara that may have relevance to your business. You may want
99
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
100
+ # any relevant concerns raised by this notification.
101
+ #
102
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
103
+ # affect you, or a potential issue with your company's tax profile.
104
+ #
105
+ # ### Security Policies
106
+ #
107
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
108
+ # * 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].
109
+ # @param id [Integer] The id of the notification you wish to delete.
110
+ # @return [ErrorDetail[]]
111
+ def delete_notification(id)
112
+ path = "/api/v2/notifications/#{id}"
113
+ delete(path)
114
+ end
115
+
116
+
117
+ # Delete a single subscription
118
+ #
119
+ # # For Registrar Use Only
120
+ # This API is for use by Avalara Registrar administrative users only.
121
+ #
122
+ # Mark the existing account identified by this URL as deleted.
123
+ #
124
+ # ### Security Policies
125
+ #
126
+ # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
127
+ # @param accountId [Integer] The ID of the account that owns this subscription.
128
+ # @param id [Integer] The ID of the subscription you wish to delete.
129
+ # @return [ErrorDetail[]]
130
+ def delete_subscription(accountId, id)
131
+ path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
132
+ delete(path)
133
+ end
134
+
135
+
136
+ # Reset a user's password programmatically
137
+ #
138
+ # # For Registrar Use Only
139
+ # This API is for use by Avalara Registrar administrative users only.
140
+ #
141
+ # Allows a system admin to reset the password for a specific user via the API.
142
+ # This API is only available for Avalara Registrar Admins, and can be used to reset the password of any
143
+ # user based on internal Avalara business processes.
144
+ #
145
+ # ### Security Policies
146
+ #
147
+ # * 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.
148
+ # * This API is available to Avalara system-level (registrar-level) users only.
149
+ # @param userId [Integer] The unique ID of the user whose password will be changed
150
+ # @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this.
151
+ # @param model [Object] The new password for this user
152
+ # @return [String]
153
+ def reset_password(userId, model, options={})
154
+ path = "/api/v2/passwords/#{userId}/reset"
155
+ post(path, model, options)
156
+ end
157
+
158
+
159
+ # Update a single account
160
+ #
161
+ # # For Registrar Use Only
162
+ # This API is for use by Avalara Registrar administrative users only.
163
+ #
164
+ # Replace an existing account object with an updated account object.
165
+ #
166
+ # ### Security Policies
167
+ #
168
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
169
+ # @param id [Integer] The ID of the account you wish to update.
170
+ # @param model [Object] The account object you wish to update.
171
+ # @return [Object]
172
+ def update_account(id, model)
173
+ path = "/api/v2/accounts/#{id}"
174
+ put(path, model)
175
+ end
176
+
177
+
178
+ # Update a single notification.
179
+ #
180
+ # This API is available by invitation only.
181
+ #
182
+ # Replaces the notification identified by this URL with a new notification.
183
+ #
184
+ # A notification is a message from Avalara that may have relevance to your business. You may want
185
+ # to regularly review notifications and then dismiss them when you are certain that you have addressed
186
+ # any relevant concerns raised by this notification.
187
+ #
188
+ # An example of a notification would be a message about new software, or a change to AvaTax that may
189
+ # affect you, or a potential issue with your company's tax profile.
190
+ #
191
+ # ### Security Policies
192
+ #
193
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
194
+ # * 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].
195
+ # @param id [Integer] The id of the notification you wish to update.
196
+ # @param model [Object] The notification object you wish to update.
197
+ # @return [Object]
198
+ def update_notification(id, model)
199
+ path = "/api/v2/notifications/#{id}"
200
+ put(path, model)
201
+ end
202
+
203
+
204
+ # Update a single subscription
205
+ #
206
+ # # For Registrar Use Only
207
+ # This API is for use by Avalara Registrar administrative users only.
208
+ #
209
+ # Replace the existing subscription object at this URL with an updated object.
210
+ # A 'subscription' indicates a licensed subscription to a named Avalara service.
211
+ # To request or remove subscriptions, please contact Avalara sales or your customer account manager.
212
+ # All data from the existing object will be replaced with data in the object you PUT.
213
+ # 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.
214
+ #
215
+ # ### Security Policies
216
+ #
217
+ # * This API requires one of the following user roles: Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
218
+ # @param accountId [Integer] The ID of the account that this subscription belongs to.
219
+ # @param id [Integer] The ID of the subscription you wish to update
220
+ # @param model [Object] The subscription you wish to update.
221
+ # @return [Object]
222
+ def update_subscription(accountId, id, model)
223
+ path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
224
+ put(path, model)
225
+ end
226
+
227
+ end
228
+ end
229
229
  end