new TicketsAPI(rest)
This class is used to interact with Tickets in TidyHQ.
Parameters:
Name | Type | Description |
---|---|---|
rest | Rest | The rest instance to use for requests. |
- Source
Methods
(async) createTicket(event_id, name, optionsopt) → {Promise.<TidyAPI_V1_Ticket>}
Create a ticket category for an event.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
event_id | number | The ID of the event. | ||||||||||||||||||||||||||
name | string | The name for the type of ticket. | ||||||||||||||||||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The newly created ticket.
- Type:
- Promise.<TidyAPI_V1_Ticket>
(async) deleteTicket(event_id, ticket_id, optionsopt) → {Promise.<TidyAPI_Response>}
Delete a ticket category for an event.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
event_id | number | The ID of the event. | ||||||||||
ticket_id | string | The ID of the ticket. | ||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- Whether or not the ticket was deleted.
- Type:
- Promise.<TidyAPI_Response>
(async) getSoldTickets(event_id, optionsopt) → {Promise.<TidyAPI_V1_SoldTickets>}
Get a list of all sold tickets from an event.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
event_id | number | The ID of the event. | ||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The list of sold tickets.
- Type:
- Promise.<TidyAPI_V1_SoldTickets>
(async) getTicket(event_id, ticket_id, optionsopt) → {Promise.<TidyAPI_V1_Ticket>}
Get a list of all tickets from an event.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
event_id | number | The ID of the event. | ||||||||||
ticket_id | string | The ID of the ticket. | ||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The ticket.
- Type:
- Promise.<TidyAPI_V1_Ticket>
(async) getTickets(event_id, optionsopt) → {Promise.<TidyAPI_V1_Tickets>}
Get a list of all tickets from an event.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
event_id | number | The ID of the event. | ||||||||||
options | object | <optional> | {} | Properties
|
- Source
Returns:
- The list of tickets.
- Type:
- Promise.<TidyAPI_V1_Tickets>
(async) updateTicket(event_id, ticket_id, optionsopt) → {Promise.<TidyAPI_V1_Ticket>}
Update a ticket category for an event.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
event_id | number | The ID of the event. | |||||||||||||||||||||||||||||
ticket_id | string | The ID of the ticket. | |||||||||||||||||||||||||||||
options | Object | <optional> | The options for the ticket. At least one option is required that isn't the access token.Properties
|
- Source
Returns:
- The updated ticket.
- Type:
- Promise.<TidyAPI_V1_Ticket>