Skip to content

Commit f590a58

Browse files
prabhupantiamareebjamal
authored andcommitted
docs(api): Modified API blueprints of Tickets and ticket tags (#5512)
1 parent b4f5ee0 commit f590a58

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

docs/api/api_blueprint.apib

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14495,7 +14495,7 @@ Delete a single ticket.
1449514495
+ 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.
1449614496

1449714497

14498-
### List Tickets [GET]
14498+
### List Tickets under an Event [GET]
1449914499

1450014500
+ Request
1450114501

@@ -14583,7 +14583,7 @@ Delete a single ticket.
1458314583
+ 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.
1458414584

1458514585

14586-
### List Tickets [GET]
14586+
### List Tickets under a Ticket-tag [GET]
1458714587

1458814588
+ Request
1458914589

@@ -14671,7 +14671,7 @@ Delete a single ticket.
1467114671
+ 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.
1467214672

1467314673

14674-
### List Tickets [GET]
14674+
### List Tickets for an Access Code [GET]
1467514675

1467614676
+ Request
1467714677

@@ -14758,7 +14758,7 @@ Delete a single ticket.
1475814758
+ 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.
1475914759

1476014760

14761-
### List Tickets [GET]
14761+
### List Tickets for a Discount Code [GET]
1476214762

1476314763
+ Request
1476414764

@@ -14843,7 +14843,7 @@ Delete a single ticket.
1484314843
+ Parameters
1484414844
+ order_identifier: 7201904e (string) - Indetifier of the order
1484514845

14846-
### List Tickets [GET]
14846+
### List Tickets for an Order [GET]
1484714847

1484814848
+ Request
1484914849

@@ -15141,7 +15141,7 @@ Delete a single ticket tag.
1514115141
+ sort (optional, string, `name`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
1514215142
+ 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.
1514315143

15144-
### List all Ticket Tags [GET]
15144+
### List Ticket Tags under an Event [GET]
1514515145

1514615146
+ Request (application/vnd.api+json)
1514715147

@@ -15200,7 +15200,7 @@ Delete a single ticket tag.
1520015200
+ sort (optional, string, `name`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
1520115201
+ 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.
1520215202

15203-
### List all Ticket Tags [GET]
15203+
### List Ticket Tags for a Ticket [GET]
1520415204

1520515205
+ Request (application/vnd.api+json)
1520615206

tests/hook_main.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ def ticket_delete(transaction):
16211621
db.session.commit()
16221622

16231623

1624-
@hooks.before("Tickets > List Tickets under an Event > List Tickets")
1624+
@hooks.before("Tickets > List Tickets under an Event > List Tickets under an Event")
16251625
def ticket_event(transaction):
16261626
"""
16271627
GET /events/1/tickets
@@ -1634,7 +1634,7 @@ def ticket_event(transaction):
16341634
db.session.commit()
16351635

16361636

1637-
@hooks.before("Tickets > List Tickets under a Ticket-tag > List Tickets")
1637+
@hooks.before("Tickets > List Tickets under a Ticket-tag > List Tickets under a Ticket-tag")
16381638
def tikcet_tag_ticket(transaction):
16391639
"""
16401640
GET /tikcet-tags/1/tickets
@@ -1647,7 +1647,7 @@ def tikcet_tag_ticket(transaction):
16471647
db.session.commit()
16481648

16491649

1650-
@hooks.before("Tickets > List Tickets for an Access Code > List Tickets")
1650+
@hooks.before("Tickets > List Tickets for an Access Code > List Tickets for an Access Code")
16511651
def access_code_ticket(transaction):
16521652
"""
16531653
GET /access-codes/1/tickets
@@ -1660,7 +1660,7 @@ def access_code_ticket(transaction):
16601660
db.session.commit()
16611661

16621662

1663-
@hooks.before("Tickets > List Tickets for a Discount Code > List Tickets")
1663+
@hooks.before("Tickets > List Tickets for a Discount Code > List Tickets for a Discount Code")
16641664
def discount_code_ticket(transaction):
16651665
"""
16661666
GET /discount-codes/1/tickets
@@ -1673,6 +1673,19 @@ def discount_code_ticket(transaction):
16731673
db.session.commit()
16741674

16751675

1676+
@hooks.before("Tickets > List Tickets for an Order > List Tickets for an Order")
1677+
def get_tickets_from_order(transaction):
1678+
"""
1679+
GET /v1/orders/{identifier}/tickets
1680+
:param transaction:
1681+
:return:
1682+
"""
1683+
with stash['app'].app_context():
1684+
order = OrderFactory()
1685+
order.identifier = "7201904e"
1686+
db.session.add(order)
1687+
db.session.commit()
1688+
16761689
# ------------------------- Ticket Fees -------------------------
16771690
@hooks.before("Ticket Fees > Ticket Fees Collection > List Ticket Fees")
16781691
def ticket_fees_get_list(transaction):
@@ -1792,7 +1805,7 @@ def ticket_tag_delete(transaction):
17921805
db.session.commit()
17931806

17941807

1795-
@hooks.before("Ticket Tags > List Ticket Tags under an Event > List all Ticket Tags")
1808+
@hooks.before("Ticket Tags > List Ticket Tags under an Event > List Ticket Tags under an Event")
17961809
def ticket_tag_event(transaction):
17971810
"""
17981811
GET /events/1/ticket-tags
@@ -1805,7 +1818,7 @@ def ticket_tag_event(transaction):
18051818
db.session.commit()
18061819

18071820

1808-
@hooks.before("Ticket Tags > List Ticket Tags for a Ticket > List all Ticket Tags")
1821+
@hooks.before("Ticket Tags > List Ticket Tags for a Ticket > List Ticket Tags for a Ticket")
18091822
def ticket_tag_ticket(transaction):
18101823
"""
18111824
GET /tickets/1/ticket-tags
@@ -4131,20 +4144,6 @@ def get_event_from_order(transaction):
41314144
db.session.commit()
41324145

41334146

4134-
@hooks.before("Tickets > List Tickets for an Order > List Tickets")
4135-
def get_tickets_from_order(transaction):
4136-
"""
4137-
GET /v1/orders/{identifier}/tickets
4138-
:param transaction:
4139-
:return:
4140-
"""
4141-
with stash['app'].app_context():
4142-
order = OrderFactory()
4143-
order.identifier = "7201904e"
4144-
db.session.add(order)
4145-
db.session.commit()
4146-
4147-
41484147
@hooks.before("Attendees > List Attendees under an order > List All Attendees under an order")
41494148
def get_attendees_from_order(transaction):
41504149
"""

0 commit comments

Comments
 (0)