VendorController

VendorController

Controller for vendors.

Constructor

new VendorController()

Source:

Methods

addVendorTesterByEmailAddress(id, email_address) → {Promise.<any>}

Add a new vendor tester by email address.

Source:
Parameters:
Name Type Description
id string

Vendor's ID.

email_address string

Customer's email address to add as a tester.

Returns:
Type:
Promise.<any>

create(vendor) → {Promise.<any>}

TODO: Deprecate this method Create a new vendor, return vendor ID if successful

Source:
Parameters:
Name Type Description
vendor Object

The Vendor Object

Returns:
Type:
Promise.<any>

createWithEmployee(vendor) → {Promise.<any>}

Create a new Vendor Object with an Employee Object

Source:
Parameters:
Name Type Description
vendor Object

The Vendor Object

Returns:
Type:
Promise.<any>
  • The id of the Vendor Object

deleteVendorTester(id) → {Promise.<string>}

Delete a vendor tester by ID.

Source:
Parameters:
Name Type Description
id

Vendor tester's ID.

Returns:
Type:
Promise.<string>

requestVendorApproval(id) → {Promise.<any>}

Request profile approval from administrators before publishing the store.

Source:
Parameters:
Name Type Description
id string

ID of the vendor.

Returns:
Type:
Promise.<any>

update(id, vendor) → {Promise.<any>}

Update a vendor

Source:
Parameters:
Name Type Description
id string

The id of the Vendor Object

vendor Object

The Vendor Object

Returns:
Type:
Promise.<any>

updateAllMenuItemsStatus(vendor_id, status) → {Promise.<any>}

Update a vendor

Source:
Parameters:
Name Type Description
vendor_id string

The id of the Vendor Object

status Object

Updated status of the items

Returns:
Type:
Promise.<any>

updateVendorApprovalStatus(id, approval_status) → {Promise.<string>}

Update a vendor's approval status, this can only be called by master.

Source:
Parameters:
Name Type Description
id string

ID of the vendor.

approval_status string

New approval status, can be APPROVED, PENDING, NOT_APPROVED

Returns:
Type:
Promise.<string>