TicketsManager

management. TicketsManager

Abstracts interaction with the tickets endpoint.

Constructor

new TicketsManager()

Source:

Members

ticket :external:RestClient

Provides an abstraction layer for consuming the Tickets endpoint.
Type:
Source:

Methods

changePassword(cbopt) → {Promise}

Create a new password change ticket.
Parameters:
Name Type Attributes Description
cb function <optional>
Callback function.
Source:
Returns:
Type
Promise
Example
var params = {
  result_url: '{REDIRECT_URL}',  // Redirect after using the ticket.
  user_id: '{USER_ID}',  // Optional.
  email: '{USER_EMAIL}',  // Optional.
  new_password: '{PASSWORD}'
};

management.tickets.changePassword(params, function (err) {
  if (err) {
    // Handle error.
  }
});

verifyEmail(cbopt) → {Promise}

Create an email verification ticket.
Parameters:
Name Type Attributes Description
cb function <optional>
Callback function.
Source:
Returns:
Type
Promise
Example
var data = {
  user_id: '{USER_ID}',
  result_url: '{REDIRECT_URL}' // Optional redirect after the ticket is used.
};

management.tickets.verifyEmail(data, function (err) {
  if (err) {
    // Handle error.
  }
});