Module: AvaTax::Client::Registrar

Included in:
AvaTax::Client
Defined in:
lib/avatax/client/registrar.rb

Instance Method Summary collapse

Instance Method Details

#create_account(model) ⇒ AccountModel[]

Create a new account

For Registrar Use Only

This API is for use by Avalara Registrar administrative users only.

Create a single new account object. When creating an account object you may attach subscriptions and users as part of the 'Create' call.

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • model (Object)

    The account you wish to create.

Returns:

  • (AccountModel[])


20
21
# File 'lib/avatax/client/registrar.rb', line 20

def (model)        path = "/api/v2/accounts"
post(path, model, {}, "22.10.0")      end

#create_notifications(model) ⇒ NotificationModel[]

Create new notifications.

This API is available by invitation only.

Create a single notification.

A notification is a message from Avalara that may have relevance to your business. You may want to regularly review notifications and then dismiss them when you are certain that you have addressed any relevant concerns raised by this notification.

A Global notification is a message which is directed to all the accounts and is set to expire within a certain time and cannot be dismissed by the user. Make accountId and companyId null to create a global notification.

An example of a notification would be a message about new software, or a change to AvaTax that may affect you, or a potential issue with your company's tax profile.

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
  • 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]. Swagger Name: AvaTaxClient

Parameters:

  • model (NotificationModel[])

    The notifications you wish to create.

Returns:

  • (NotificationModel[])


46
47
# File 'lib/avatax/client/registrar.rb', line 46

def create_notifications(model)        path = "/api/v2/notifications"
post(path, model, {}, "22.10.0")      end

#create_service_types(model) ⇒ Object

Create Avalara-supported subscription (ServiceTypes)

For Registrar Use Only This API is for use by Avalara Registrar administrative users only.

Create one service/subscription object.

Returns the newly created Avalara-supported subscription (service) type. This API is intended to be useful for adding new Avalara-supported subscription type (service type). You may always contact Avalara's sales department for information on available products or services.

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • model (Object)

    The subscription type object you wish to create.

Returns:

  • (Object)


66
67
# File 'lib/avatax/client/registrar.rb', line 66

def create_service_types(model)        path = "/api/v2/servicetypes"
post(path, model, {}, "22.10.0")      end

#create_subscriptions(accountId, model) ⇒ SubscriptionModel[]

Create a new subscription

This API is for use by Avalara Registrar administrative users only.

Create one or more new subscription objects attached to this account. A 'subscription' indicates a licensed subscription to a named Avalara service. To request or remove subscriptions, please contact Avalara sales or your customer account manager.

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • accountId (Integer)

    The ID of the account that owns this subscription.

  • model (SubscriptionModel[])

    The subscription you wish to create.

Returns:

  • (SubscriptionModel[])


84
85
# File 'lib/avatax/client/registrar.rb', line 84

def create_subscriptions(accountId, model)        path = "/api/v2/accounts/#{accountId}/subscriptions"
post(path, model, {}, "22.10.0")      end

#delete_account(id) ⇒ ErrorDetail[]

Delete a single account

For Registrar Use Only

This API is for use by Avalara Registrar administrative users only.

Delete an account. Deleting an account will delete all companies, all account level users and license keys attached to this account.

Security Policies

  • This API requires the user role SystemAdmin. Swagger Name: AvaTaxClient

Parameters:

  • id (Integer)

    The ID of the account you wish to delete.

Returns:

  • (ErrorDetail[])


101
102
# File 'lib/avatax/client/registrar.rb', line 101

def (id)        path = "/api/v2/accounts/#{id}"
delete(path, {}, "22.10.0")      end

#delete_notification(id) ⇒ ErrorDetail[]

Delete a single notification.

This API is available by invitation only.

Delete the existing notification identified by this URL.

A notification is a message from Avalara that may have relevance to your business. You may want to regularly review notifications and then dismiss them when you are certain that you have addressed any relevant concerns raised by this notification.

An example of a notification would be a message about new software, or a change to AvaTax that may affect you, or a potential issue with your company's tax profile.

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
  • 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]. Swagger Name: AvaTaxClient

Parameters:

  • id (Integer)

    The id of the notification you wish to delete.

Returns:

  • (ErrorDetail[])


124
125
# File 'lib/avatax/client/registrar.rb', line 124

def delete_notification(id)        path = "/api/v2/notifications/#{id}"
delete(path, {}, "22.10.0")      end

#delete_service_type(id) ⇒ ErrorDetail[]

Delete a single Subscription (ServiceTypes) object

For Registrar Use Only This API is for use by Avalara Registrar administrative users only.

Marks the Subscription (ServiceTypes) object identified by this URL as deleted. This API is useful for deleting an existing Avalara-supported subscription type (service type).

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • id (Integer)

    The unique ID number of the Subscription object you wish to delete.

Returns:

  • (ErrorDetail[])


141
142
# File 'lib/avatax/client/registrar.rb', line 141

def delete_service_type(id)        path = "/api/v2/servicetypes/#{id}"
delete(path, {}, "22.10.0")      end

#delete_subscription(accountId, id) ⇒ ErrorDetail[]

Delete a single subscription

For Registrar Use Only

This API is for use by Avalara Registrar administrative users only.

Mark the existing account identified by this URL as deleted.

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • accountId (Integer)

    The ID of the account that owns this subscription.

  • id (Integer)

    The ID of the subscription you wish to delete.

Returns:

  • (ErrorDetail[])


158
159
# File 'lib/avatax/client/registrar.rb', line 158

def delete_subscription(accountId, id)        path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
delete(path, {}, "22.10.0")      end

#list_service_types(options = {}) ⇒ FetchResult

Retrieve the full list of Avalara-supported subscription (ServiceTypes)

For Registrar Use Only This API is for use by Avalara Registrar administrative users only.

Returns the full list of Avalara-supported subscription types. This API is intended to be useful for identifying which features you have added to your account. You may always contact Avalara's sales department for information on available products or services. You cannot change your subscriptions/service directly through the API.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient

Parameters:

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.

  • 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.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


180
181
# File 'lib/avatax/client/registrar.rb', line 180

def list_service_types(options={})        path = "/api/v2/servicetypes/servicetypes"
get(path, options, "22.10.0")      end

#reset_password(userId, model, options = {}) ⇒ String

Reset a user's password programmatically

For Registrar Use Only

This API is for use by Avalara Registrar administrative users only.

Allows a system admin to reset the password for a specific user via the API. This API is only available for Avalara Registrar Admins, and can be used to reset the password of any user based on internal Avalara business processes.

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.
  • This API is available to Avalara system-level (registrar-level) users only. Swagger Name: AvaTaxClient

Parameters:

  • userId (Integer)

    The unique ID of the user whose password will be changed

  • isUndoMigrateRequest (Boolean)

    If user's password was migrated to AI, undo this.

  • model (Object)

    The new password for this user

Returns:

  • (String)


201
202
# File 'lib/avatax/client/registrar.rb', line 201

def reset_password(userId, model, options={})        path = "/api/v2/passwords/#{userId}/reset"
post(path, model, options, "22.10.0")      end

#update_account(id, model) ⇒ Object

Update a single account

For Registrar Use Only

This API is for use by Avalara Registrar administrative users only.

Replace an existing account object with an updated account object.

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • id (Integer)

    The ID of the account you wish to update.

  • model (Object)

    The account object you wish to update.

Returns:

  • (Object)


218
219
# File 'lib/avatax/client/registrar.rb', line 218

def (id, model)        path = "/api/v2/accounts/#{id}"
put(path, model, {}, "22.10.0")      end

#update_notification(id, model) ⇒ Object

Update a single notification.

This API is available by invitation only.

Replaces the notification identified by this URL with a new notification.

A notification is a message from Avalara that may have relevance to your business. You may want to regularly review notifications and then dismiss them when you are certain that you have addressed any relevant concerns raised by this notification.

An example of a notification would be a message about new software, or a change to AvaTax that may affect you, or a potential issue with your company's tax profile.

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
  • 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]. Swagger Name: AvaTaxClient

Parameters:

  • id (Integer)

    The id of the notification you wish to update.

  • model (Object)

    The notification object you wish to update.

Returns:

  • (Object)


242
243
# File 'lib/avatax/client/registrar.rb', line 242

def update_notification(id, model)        path = "/api/v2/notifications/#{id}"
put(path, model, {}, "22.10.0")      end

#update_service_type(id, model) ⇒ Object

Update existing Avalara-supported subscription (ServiceTypes)

For Registrar Use Only This API is for use by Avalara Registrar administrative users only.

Returns the updated Avalara-supported service types. This API is intended to be useful for updating an existing subscription(service) type detail. You may always contact Avalara's sales department for information on available products or services.

Security Policies

  • This API requires one of the following user roles: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • id (Integer)

    The unique ID number of the existing subscription type object to replace.

  • model (Object)

    The subscription type object to update.

Returns:

  • (Object)


261
262
# File 'lib/avatax/client/registrar.rb', line 261

def update_service_type(id, model)        path = "/api/v2/servicetypes/#{id}"
put(path, model, {}, "22.10.0")      end

#update_subscription(accountId, id, model) ⇒ Object

Update a single subscription

For Registrar Use Only

This API is for use by Avalara Registrar administrative users only.

Replace the existing subscription object at this URL with an updated object. A 'subscription' indicates a licensed subscription to a named Avalara service. To request or remove subscriptions, please contact Avalara sales or your customer account manager. 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: BatchServiceAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • accountId (Integer)

    The ID of the account that this subscription belongs to.

  • id (Integer)

    The ID of the subscription you wish to update

  • model (Object)

    The subscription you wish to update.

Returns:

  • (Object)


283
284
# File 'lib/avatax/client/registrar.rb', line 283

def update_subscription(accountId, id, model)        path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
put(path, model, {}, "22.10.0")      end