From 5b0d0f4ad4bf5135c70df3c58d535247ed52a3eb Mon Sep 17 00:00:00 2001 From: J Cobb <777522+jwcobb@users.noreply.github.com> Date: Wed, 8 Dec 2021 08:28:01 -0700 Subject: [PATCH] Support new `/v9/listings` endpoints (#164) --- CHANGELOG.md | 4 + src/Client.php | 2 +- src/Resources/v9/listings.php | 125 +++++++++++++++++++++++ src/Resources/v9/service-description.php | 1 + 4 files changed, 131 insertions(+), 1 deletion(-) create mode 100755 src/Resources/v9/listings.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 03cda62..17a50ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 4.2.9 (December 8, 2021) +- Add new `listings()` method to use the new faster and more efficient [Listings / Index](https://ticketevolution.atlassian.net/wiki/spaces/API/pages/2853797930/Listings+Index) endpoint. +- Add new `showListing()` method to use the new faster and more efficient [Listings / Show](https://ticketevolution.atlassian.net/wiki/spaces/API/pages/2895052808/Listings+Show) endpoint. + ## 4.2.8 (November 29, 2021) - Add new `deleteClientEmailAddress()` method. diff --git a/src/Client.php b/src/Client.php index 9911d22..41be9b3 100755 --- a/src/Client.php +++ b/src/Client.php @@ -16,7 +16,7 @@ class Client * * @const string */ - const VERSION = '4.2.8'; + const VERSION = '4.2.9'; /** * Guzzle service description diff --git a/src/Resources/v9/listings.php b/src/Resources/v9/listings.php new file mode 100755 index 0000000..6b1014d --- /dev/null +++ b/src/Resources/v9/listings.php @@ -0,0 +1,125 @@ + [ + + /** + * Listings / Index + */ + 'listings' => [ + 'extends' => null, + 'httpMethod' => 'GET', + 'uri' => '/v9/listings', + 'summary' => 'The new, faster way to list all ticket groups for an event.', + 'notes' => '', + 'documentationUrl' => 'https://ticketevolution.atlassian.net/wiki/spaces/API/pages/2853797930/Listings+Index', + 'deprecated' => false, + 'responseModel' => 'defaultJsonResponse', + 'parameters' => [ + 'event_id' => [ + 'location' => 'query', + 'type' => 'integer', + 'description' => 'ID of the Event for which you would like to list tickets.', + 'required' => true, + ], + 'type' => [ + 'location' => 'query', + 'type' => 'string', + 'description' => 'Filter by Ticket Group Type.', + 'required' => false, + 'enum' => [ + 'event', + 'parking', + ] + ], + 'quantity' => [ + 'location' => 'query', + 'type' => 'integer', + 'description' => 'Filter by number of tickets greater than passed value.', + 'required' => false, + ], + 'section' => [ + 'location' => 'query', + 'type' => 'string', + 'description' => 'Filter by exact match section.', + 'required' => false, + ], + 'row' => [ + 'location' => 'query', + 'type' => 'string', + 'description' => 'Filter by exact match row.', + 'required' => false, + ], + 'owned' => [ + 'location' => 'query', + 'type' => ['boolean', 'string'], + 'description' => 'Show only your own listings.', + 'required' => false, + 'format' => 'boolean-string', + ], + 'order_by' => [ + 'location' => 'query', + 'type' => 'string', + 'description' => 'Sort results by any return parameter.', + 'required' => false, + ], + 'include_tevo_section_mappings' => [ + 'location' => 'query', + 'type' => ['boolean', 'string'], + 'description' => 'Include TEvo Section Mappings for use with ticketevolution/seatmaps-client', + 'required' => false, + 'default' => false, + 'format' => 'boolean-string', + ], + ], + 'additionalParameters' => ['location' => 'query'], + ], + + + /** + * Ticket Groups / Show + */ + 'showListing' => [ + 'extends' => null, + 'httpMethod' => 'GET', + 'uri' => '/v9/listings/{id}', + 'summary' => 'Get a single Listing (Ticket Group).', + 'notes' => '', + 'documentationUrl' => 'https://ticketevolution.atlassian.net/wiki/pages/viewpage.action?pageId=9469964', + 'deprecated' => false, + 'responseModel' => 'defaultJsonResponse', + 'parameters' => [ + 'id' => [ + 'location' => 'uri', + 'type' => 'integer', + 'description' => 'ID of the Listing to return.', + 'required' => true, + ], + ], + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Models + |-------------------------------------------------------------------------- + | + | This array of models is specifications to returning the response + | from the operation methods. + | + */ + + 'models' => [], +]; diff --git a/src/Resources/v9/service-description.php b/src/Resources/v9/service-description.php index 20b81b8..0779c0e 100755 --- a/src/Resources/v9/service-description.php +++ b/src/Resources/v9/service-description.php @@ -54,6 +54,7 @@ 'credit_memos.php', 'events.php', 'filtered_tickets.php', + 'listings.php', 'offices.php', 'orders.php', 'payments.php',