Skip to content

Commit

Permalink
Updates documentation for cancel method to show the newly required co…
Browse files Browse the repository at this point in the history
…de parameter
  • Loading branch information
craigpaul committed Oct 20, 2020
1 parent b556d27 commit 2b9b2bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ Create a new appointment using the pre-set parameters.

Set a relationship which will tell the API to use the given user identifier when creating an appointment.

- `cancel(appointment: number, attendee: number)`
- `cancel(appointment: number, attendee: number, code: string)`

Cancel an appointment for a specific attendee matching the given appointment and attendee identifiers.
Cancel an appointment for a specific attendee matching the given appointment, attendee and confirmation code identifiers.

- `campaign(campaign: string)`

Expand Down Expand Up @@ -224,7 +224,7 @@ class Appointments {
}

async cancel(attributes) {
const { appointment, attendee } = attributes;
const { appointment, attendee, code } = attributes;

// We can optionally submit custom form responses when cancelling
// appointments by utilizing the Response and Attendee models.
Expand All @@ -237,7 +237,7 @@ class Appointments {

return this.api.appointments()
.with(person)
.cancel(appointment, attendee);
.cancel(appointment, attendee, code);
}

async fetch({ code, id }) {
Expand Down

0 comments on commit 2b9b2bd

Please sign in to comment.