Account

Account

Account.

Constructor

new Account()

Source:

Members

types :sting

Account types.

Source:
Type:
  • sting

Methods

create(opts, accountIdopt, passwordopt) → {JsonApiResponse}

Create an account.

Source:
Parameters:
Name Type Attributes Description
opts object

Account options.

Name Type Attributes Description
type string

Account type.

platformId string

User's platform.

facebookToken string <optional>

Can override email, firstName, lastName and city.

currency string <optional>

Preferred currency.

locale string <optional>

Preferred user's locale.

email string

User's email.

firstName string

User's first name.

lastName string

User's last name.

phoneNumber string

User's phone number.

city string <optional>

User's city.

company string <optional>

User's company.

externalAccount object <optional>

Link external oAuth account.

Name Type Description
id string

ID in the external system.

oauthProvider string

oAuth provider.

accessToken string

oAuth access token

accountId string <optional>

User's account ID. Use account ID of the attached token by default.

password string <optional>

Desired password.

Returns:
Type:
JsonApiResponse

delete(accountId)

Remove account by ID

Source:
Parameters:
Name Type Description
accountId string

get(accountIdopt) → {JsonApiResponse}

Get user's account.

Source:
Parameters:
Name Type Attributes Description
accountId sting <optional>

User's account ID. Use account ID of the attached token by default.

Returns:
Type:
JsonApiResponse

getAccounts(query) → {JsonApiResponse}

Get multiple accounts.

Source:
Parameters:
Name Type Description
query object

Request options.

Name Type Description
in string

List of account ids splitted by ','

Returns:
Type:
JsonApiResponse

getCreateLotRequests(queryopt) → {JsonApiResponse}

Get account create lot requests.

Source:
Parameters:
Name Type Attributes Description
query object <optional>

Request options.

Name Type Attributes Description
page.number Number <optional>

Page number.

page.size Number <optional>

Page size.

sort Array.<string> <optional>

Sorting params.

requestor string <optional>

Requestor of the request.

reviewer reviewer <optional>

Reviewer of the request.

Returns:
Type:
JsonApiResponse

resendEmailVerificationCode(accountIdopt)

Resend phone verification code.

Source:
Parameters:
Name Type Attributes Description
accountId string <optional>

User's account ID. Use account ID of the attached token by default.

resendPhoneVerificationCode(accountIdopt)

Resend phone verification code.

Source:
Parameters:
Name Type Attributes Description
accountId string <optional>

User's account ID. Use account ID of the attached token by default.

update(opts, accountIdopt) → {JsonApiResponse}

Update account details.

Source:
Parameters:
Name Type Attributes Description
opts object

Account options.

Name Type Attributes Description
facebookToken string <optional>

Can override email, firstName, lastName and city.

currency string <optional>

Preferred currency.

locale string <optional>

Preferred user's locale.

firstName string <optional>

User's first name.

lastName string <optional>

User's last name.

city string <optional>

User's city.

company string <optional>

User's company.

accountId string <optional>

User's account ID. Use account ID of the attached token by default.

Returns:
Type:
JsonApiResponse

verifyEmail(token, accountIdopt)

Verify user's phone number.

Source:
Parameters:
Name Type Attributes Description
token string

6-digit token from SMS.

accountId string <optional>

User's account ID. Use account ID of the attached token by default.

verifyPhone(token, accountIdopt)

Verify user's phone number.

Source:
Parameters:
Name Type Attributes Description
token string

6-digit token from SMS.

accountId string <optional>

User's account ID. Use account ID of the attached token by default.