From 07f16da18b8c2d2c3b717bff3bca221226a7a9dc Mon Sep 17 00:00:00 2001 From: Craig Paul Date: Mon, 14 Jan 2019 17:15:39 -0600 Subject: [PATCH] Adds preference model documentation --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 7bfa493..e4c14ca 100644 --- a/README.md +++ b/README.md @@ -211,6 +211,34 @@ class Locations { } ``` +### Preferences + +##### Methods + +- `between(start: string, end: string)` + +Set the attributes to determine the start and end time of the wait list request preference. + +- `next()` + +Set an attribute to say that the preference is for the next available opening. + +- `on(day: number)` + +Set the attribute to determine the preferred day of the wait list request preference and that it should only be for the certain supplied days. + +##### Example + +```javascript +import { Preference } from 'coconut-open-api-js'; + +class Preferences { + static create({ day, start, end }) { + return (new Preference).between(start, end).on(day); + } +} +``` + ### Questions ##### Methods