Module: AvaTax::Client::Users
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/users.rb
Instance Method Summary collapse
-
#change_password(model) ⇒ String
Change Password.
-
#create_users(accountId, model) ⇒ UserModel[]
Create new users.
-
#delete_user(id, accountId) ⇒ ErrorDetail[]
Delete a single user.
-
#get_user(id, accountId, options = {}) ⇒ Object
Retrieve a single user.
-
#get_user_entitlements(id, accountId) ⇒ Object
Retrieve all entitlements for a single user.
-
#list_users_by_account(accountId, options = {}) ⇒ FetchResult
Retrieve users for this account.
-
#query_users(options = {}) ⇒ FetchResult
Retrieve all users.
-
#update_user(id, accountId, model) ⇒ Object
Update a single user.
Instance Method Details
#change_password(model) ⇒ String
Change Password
Allows a user to change their password via an API call.
This API allows an authenticated user to change their password via an API call. This feature is only available for accounts that do not use SAML integrated password validation.
This API only allows the currently authenticated user to change their password; it cannot be used to apply to a different user than the one authenticating the current API call.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
22 23 |
# File 'lib/avatax/client/users.rb', line 22 def change_password(model) path = "/api/v2/passwords" put(path, model, {}, AvaTax::VERSION) end |
#create_users(accountId, model) ⇒ UserModel[]
Create new users
Create one or more new user objects attached to this account.
A user represents one person with access privileges to make API calls and work with a specific account.
Users who are account administrators or company users are permitted to create user records to invite additional team members to work with AvaTax.
A newly created user will receive an email inviting them to create their password. This means that you must provide a valid email address for all user accounts created.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
44 45 |
# File 'lib/avatax/client/users.rb', line 44 def create_users(accountId, model) path = "/api/v2/accounts/#{accountId}/users" post(path, model, {}, AvaTax::VERSION) end |
#delete_user(id, accountId) ⇒ ErrorDetail[]
Delete a single user
Mark the user object identified by this URL as deleted.
This API is available for use by account and company administrators only.
Account and company administrators may only delete users within the appropriate organizations they control.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin. Swagger Name: AvaTaxClient
63 64 |
# File 'lib/avatax/client/users.rb', line 63 def delete_user(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}" delete(path, {}, AvaTax::VERSION) end |
#get_user(id, accountId, options = {}) ⇒ Object
Retrieve a single user
Get the user object identified by this URL. A user represents one person with access privileges to make API calls and work with a specific account.
You may specify one or more of the following values in the $include
parameter to fetch additional nested data, using commas to separate multiple values:
- FetchDeleted
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
83 84 |
# File 'lib/avatax/client/users.rb', line 83 def get_user(id, accountId, ={}) path = "/api/v2/accounts/#{accountId}/users/#{id}" get(path, , AvaTax::VERSION) end |
#get_user_entitlements(id, accountId) ⇒ Object
Retrieve all entitlements for a single user
Return a list of all entitlements to which this user has rights to access. Entitlements are a list of specified API calls the user is permitted to make, a list of identifier numbers for companies the user is allowed to use, and an access level identifier that indicates what types of access roles the user is allowed to use. This API call is intended to provide a validation endpoint to determine, before making an API call, whether this call is likely to succeed. For example, if user 567 within account 999 is attempting to create a new child company underneath company 12345, you could preview the user's entitlements and predict whether this call would succeed:
- Retrieve entitlements by calling '/api/v2/accounts/999/users/567/entitlements' . If the call fails, you do not have accurate credentials for this user.
- If the 'accessLevel' field within entitlements is 'None', the call will fail.
- If the 'accessLevel' field within entitlements is 'SingleCompany' or 'SingleAccount', the call will fail if the companies table does not contain the ID number 12345.
- If the 'permissions' array within entitlements does not contain 'AccountSvc.CompanySave', the call will fail.
For a full list of defined permissions, please use '/api/v2/definitions/permissions' .
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
111 112 |
# File 'lib/avatax/client/users.rb', line 111 def get_user_entitlements(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements" get(path, {}, AvaTax::VERSION) end |
#list_users_by_account(accountId, options = {}) ⇒ FetchResult
Retrieve users for this account
List all user objects attached to this account. A user represents one person with access privileges to make API calls and work with a specific account.
When an API is called using a legacy AvaTax License Key, the API log entry is recorded as being performed by a special user attached to that license key. By default, this API will not return a listing of license key users. Users with registrar-level security may call this API to list license key users.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
You may specify one or more of the following values in the $include
parameter to fetch additional nested data, using commas to separate multiple values:
- FetchDeleted
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
140 141 |
# File 'lib/avatax/client/users.rb', line 140 def list_users_by_account(accountId, ={}) path = "/api/v2/accounts/#{accountId}/users" get(path, , AvaTax::VERSION) end |
#query_users(options = {}) ⇒ FetchResult
Retrieve all users
Get multiple user objects across all accounts.
A user represents one person or set of credentials with access privileges to make API calls and work with a specific account. A user can be authenticated via either username / password authentication, an OpenID / OAuth Bearer Token, or a legacy AvaTax License Key.
When an API is called using a legacy AvaTax License Key, the API log entry is recorded as being performed by a special user attached to that license key. By default, this API will not return a listing of license key users. Users with registrar-level security may call this API to list license key users.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
You may specify one or more of the following values in the $include
parameter to fetch additional nested data, using commas to separate multiple values:
- FetchDeleted
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
170 171 |
# File 'lib/avatax/client/users.rb', line 170 def query_users(={}) path = "/api/v2/users" get(path, , AvaTax::VERSION) end |
#update_user(id, accountId, model) ⇒ Object
Update a single user
Replace the existing user object at this URL with an updated object. A user represents one person with access privileges to make API calls and work with a specific account. All data from the existing object will be replaced with data in the object you PUT. 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.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient
188 189 |
# File 'lib/avatax/client/users.rb', line 188 def update_user(id, accountId, model) path = "/api/v2/accounts/#{accountId}/users/#{id}" put(path, model, {}, AvaTax::VERSION) end |