diff --git a/docs/api/api_blueprint.apib b/docs/api/api_blueprint.apib index 4e4730b24b..4b99916462 100644 --- a/docs/api/api_blueprint.apib +++ b/docs/api/api_blueprint.apib @@ -14495,7 +14495,7 @@ Delete a single ticket. + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more. -### List Tickets [GET] +### List Tickets under an Event [GET] + Request @@ -14583,7 +14583,7 @@ Delete a single ticket. + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more. -### List Tickets [GET] +### List Tickets under a Ticket-tag [GET] + Request @@ -14671,7 +14671,7 @@ Delete a single ticket. + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more. -### List Tickets [GET] +### List Tickets for an Access Code [GET] + Request @@ -14758,7 +14758,7 @@ Delete a single ticket. + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more. -### List Tickets [GET] +### List Tickets for a Discount Code [GET] + Request @@ -14843,7 +14843,7 @@ Delete a single ticket. + Parameters + order_identifier: 7201904e (string) - Indetifier of the order -### List Tickets [GET] +### List Tickets for an Order [GET] + Request @@ -15141,7 +15141,7 @@ Delete a single ticket tag. + sort (optional, string, `name`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order. + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more. -### List all Ticket Tags [GET] +### List Ticket Tags under an Event [GET] + Request (application/vnd.api+json) @@ -15200,7 +15200,7 @@ Delete a single ticket tag. + sort (optional, string, `name`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order. + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more. -### List all Ticket Tags [GET] +### List Ticket Tags for a Ticket [GET] + Request (application/vnd.api+json) diff --git a/tests/hook_main.py b/tests/hook_main.py index 7e69968cac..ff2d38feee 100644 --- a/tests/hook_main.py +++ b/tests/hook_main.py @@ -1621,7 +1621,7 @@ def ticket_delete(transaction): db.session.commit() -@hooks.before("Tickets > List Tickets under an Event > List Tickets") +@hooks.before("Tickets > List Tickets under an Event > List Tickets under an Event") def ticket_event(transaction): """ GET /events/1/tickets @@ -1634,7 +1634,7 @@ def ticket_event(transaction): db.session.commit() -@hooks.before("Tickets > List Tickets under a Ticket-tag > List Tickets") +@hooks.before("Tickets > List Tickets under a Ticket-tag > List Tickets under a Ticket-tag") def tikcet_tag_ticket(transaction): """ GET /tikcet-tags/1/tickets @@ -1647,7 +1647,7 @@ def tikcet_tag_ticket(transaction): db.session.commit() -@hooks.before("Tickets > List Tickets for an Access Code > List Tickets") +@hooks.before("Tickets > List Tickets for an Access Code > List Tickets for an Access Code") def access_code_ticket(transaction): """ GET /access-codes/1/tickets @@ -1660,7 +1660,7 @@ def access_code_ticket(transaction): db.session.commit() -@hooks.before("Tickets > List Tickets for a Discount Code > List Tickets") +@hooks.before("Tickets > List Tickets for a Discount Code > List Tickets for a Discount Code") def discount_code_ticket(transaction): """ GET /discount-codes/1/tickets @@ -1673,6 +1673,19 @@ def discount_code_ticket(transaction): db.session.commit() +@hooks.before("Tickets > List Tickets for an Order > List Tickets for an Order") +def get_tickets_from_order(transaction): + """ + GET /v1/orders/{identifier}/tickets + :param transaction: + :return: + """ + with stash['app'].app_context(): + order = OrderFactory() + order.identifier = "7201904e" + db.session.add(order) + db.session.commit() + # ------------------------- Ticket Fees ------------------------- @hooks.before("Ticket Fees > Ticket Fees Collection > List Ticket Fees") def ticket_fees_get_list(transaction): @@ -1792,7 +1805,7 @@ def ticket_tag_delete(transaction): db.session.commit() -@hooks.before("Ticket Tags > List Ticket Tags under an Event > List all Ticket Tags") +@hooks.before("Ticket Tags > List Ticket Tags under an Event > List Ticket Tags under an Event") def ticket_tag_event(transaction): """ GET /events/1/ticket-tags @@ -1805,7 +1818,7 @@ def ticket_tag_event(transaction): db.session.commit() -@hooks.before("Ticket Tags > List Ticket Tags for a Ticket > List all Ticket Tags") +@hooks.before("Ticket Tags > List Ticket Tags for a Ticket > List Ticket Tags for a Ticket") def ticket_tag_ticket(transaction): """ GET /tickets/1/ticket-tags @@ -4131,20 +4144,6 @@ def get_event_from_order(transaction): db.session.commit() -@hooks.before("Tickets > List Tickets for an Order > List Tickets") -def get_tickets_from_order(transaction): - """ - GET /v1/orders/{identifier}/tickets - :param transaction: - :return: - """ - with stash['app'].app_context(): - order = OrderFactory() - order.identifier = "7201904e" - db.session.add(order) - db.session.commit() - - @hooks.before("Attendees > List Attendees under an order > List All Attendees under an order") def get_attendees_from_order(transaction): """