Methods
create(vendor_id, type, amount, items, start_at, end_at) → {Promise.<any>}
Create a new flash sale
Parameters:
Name | Type | Description |
---|---|---|
vendor_id |
String
|
Vendor ID |
type |
String
|
If the flash sale is on PERCENTAGE or DOLLAR basis |
amount |
int
|
Amount in cents to base the flash sale off of |
items |
Array.<Object>
|
List of items included in Flash Sale |
start_at |
String
|
Start time for Flash Sale in ISO format |
end_at |
String
|
End time for Flash Sale in ISO format |
Returns:
- Type:
-
Promise.<any>
update(id, items, end_at) → {Promise.<any>}
Update existing flash sale
Parameters:
Name | Type | Description |
---|---|---|
id |
String
|
Flash Sale ID |
items |
Array.<Object>
|
Updated List of items for Flash Sale |
end_at |
String
|
End time for Flash Sale in ISO format |
Returns:
- Type:
-
Promise.<any>