Account

Account

Account management methods

Constructor

new Account(api)

Main constructor

Source:
Parameters:
Name Type Description
api MkmApi

Parent api to make the calls

Methods

(async) get() → {Promise}

Get account information

Source:
Returns:
Type:
Promise

Account information

(async) recoverUsername(email) → {Promise}

Ask for the recovery of an user by passing it's mail address

Source:
Parameters:
Name Type Description
email String

Email address of the user

Returns:
Type:
Promise

Username

(async) redeemCoupon(coupons) → {Promise}

Redeem one or multiple coupons

Source:
Parameters:
Name Type Description
coupons String | Array.<String>

One or multiple coupons to be redeemed

Returns:
Type:
Promise

Operation result

(async) resetPassword(emailopt, usernameopt) → {Promise}

Ask for a password reset.
One of the params must be defined if both are it will use only the email

Source:
Parameters:
Name Type Attributes Default Description
email String <optional>
null

Email of the account

username String <optional>
null

Username

Returns:
Type:
Promise

Operation result

(async) setLanguage(idLanguage) → {Promise}

Set prefered language

Source:
Parameters:
Name Type Description
idLanguage int

Language code to be set

Returns:
Type:
Promise

Operation result

(async) setVacationMode(onVacation, cancelOrdersopt, relistItemsopt) → {Promise}

Sets/unsets account on vacation

Source:
Parameters:
Name Type Attributes Default Description
onVacation Boolean

Vacation is enabled

cancelOrders Boolean <optional>
false

Cancel all orders if possible or at least request it.

relistItems Boolean <optional>
false

Relist all items when cancellation resolves

Returns:
Type:
Promise

Operation result