We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Propose attendees/ticketing API
With the orga app and the implementation of API endpoints in this PR https://github.com/fossasia/open-event-orga-server/pull/2379 we have the first steps to an attendee API. In how far would that overlap with a ticketing API?

What is the best way to implement this and keep it generic? Do we need two APIs - Attendees and Ticketing or would that be handled in one API?

Also related to https://github.com/fossasia/open-event-orga-server/issues/904


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `app/api/tickets.py`
Content:
```
1 from flask.ext.restplus import Namespace
2 
3 from app.helpers.ticketing import TicketingManager
4 
5 from .helpers.helpers import (
6     requires_auth,
7     can_access)
8 from .helpers.utils import POST_RESPONSES
9 from .helpers.utils import Resource
10 from .helpers import custom_fields as fields
11 from ..helpers.data_getter import DataGetter
12 
13 api = Namespace('tickets', description='Tickets', path='/')
14 
15 ORDER = api.model('Order', {
16     'id': fields.Integer(),
17     'identifier': fields.String(),
18     'amount': fields.Float(),
19     'paid_via': fields.String(),
20     'invoice_number': fields.String(),
21     'payment_mode': fields.String(),
22     'status': fields.String(),
23     'completed_at': fields.DateTime(),
24 })
25 
26 TICKET = api.model('Ticket', {
27     'id': fields.Integer(),
28     'name': fields.String(),
29     'description': fields.String(),
30     'type': fields.String(),
31     'price': fields.Float(),
32     'quantity': fields.Integer(),
33 })
34 
35 
36 @api.route('/events/<int:event_id>/tickets/')
37 class TicketsList(Resource):
38     @requires_auth
39     @api.doc('tickets', responses=POST_RESPONSES)
40     @api.marshal_list_with(TICKET)
41     def get(self, event_id):
42         """Get tickets of the event"""
43         return DataGetter.get_sales_open_tickets(event_id=event_id).all()
44 
45 
46 @api.route('/events/<int:event_id>/tickets/<int:ticket_id>')
47 class Ticket(Resource):
48     @requires_auth
49     @api.doc('ticket', responses=POST_RESPONSES)
50     @api.marshal_with(TICKET)
51     def get(self, event_id, ticket_id):
52         """Get information about a ticket"""
53         return TicketingManager.get_ticket(ticket_id=ticket_id)
54 
55 
56 
57
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/app/api/tickets.py b/app/api/tickets.py
--- a/app/api/tickets.py
+++ b/app/api/tickets.py
@@ -52,5 +52,13 @@
         """Get information about a ticket"""
         return TicketingManager.get_ticket(ticket_id=ticket_id)
 
+@api.route('/events/<int:event_id>/orders/<string:identifier>')
+class Order(Resource):
+    @requires_auth
+    @api.doc('order', responses=POST_RESPONSES)
+    @api.marshal_with(ORDER)
+    def get(self, event_id, identifier):
+        """Get information about a ticket"""
+        return TicketingManager.get_order_by_identifier(identifier=identifier)

{"golden_diff": "diff --git a/app/api/tickets.py b/app/api/tickets.py\n--- a/app/api/tickets.py\n+++ b/app/api/tickets.py\n@@ -52,5 +52,13 @@\n         \"\"\"Get information about a ticket\"\"\"\n         return TicketingManager.get_ticket(ticket_id=ticket_id)\n \n+@api.route('/events/<int:event_id>/orders/<string:identifier>')\n+class Order(Resource):\n+    @requires_auth\n+    @api.doc('order', responses=POST_RESPONSES)\n+    @api.marshal_with(ORDER)\n+    def get(self, event_id, identifier):\n+        \"\"\"Get information about a ticket\"\"\"\n+        return TicketingManager.get_order_by_identifier(identifier=identifier)\n", "issue": "Propose attendees/ticketing API\nWith the orga app and the implementation of API endpoints in this PR https://github.com/fossasia/open-event-orga-server/pull/2379 we have the first steps to an attendee API. In how far would that overlap with a ticketing API?\n\nWhat is the best way to implement this and keep it generic? Do we need two APIs - Attendees and Ticketing or would that be handled in one API?\n\nAlso related to https://github.com/fossasia/open-event-orga-server/issues/904\n\n", "before_files": [{"content": "from flask.ext.restplus import Namespace\n\nfrom app.helpers.ticketing import TicketingManager\n\nfrom .helpers.helpers import (\n    requires_auth,\n    can_access)\nfrom .helpers.utils import POST_RESPONSES\nfrom .helpers.utils import Resource\nfrom .helpers import custom_fields as fields\nfrom ..helpers.data_getter import DataGetter\n\napi = Namespace('tickets', description='Tickets', path='/')\n\nORDER = api.model('Order', {\n    'id': fields.Integer(),\n    'identifier': fields.String(),\n    'amount': fields.Float(),\n    'paid_via': fields.String(),\n    'invoice_number': fields.String(),\n    'payment_mode': fields.String(),\n    'status': fields.String(),\n    'completed_at': fields.DateTime(),\n})\n\nTICKET = api.model('Ticket', {\n    'id': fields.Integer(),\n    'name': fields.String(),\n    'description': fields.String(),\n    'type': fields.String(),\n    'price': fields.Float(),\n    'quantity': fields.Integer(),\n})\n\n\n@api.route('/events/<int:event_id>/tickets/')\nclass TicketsList(Resource):\n    @requires_auth\n    @api.doc('tickets', responses=POST_RESPONSES)\n    @api.marshal_list_with(TICKET)\n    def get(self, event_id):\n        \"\"\"Get tickets of the event\"\"\"\n        return DataGetter.get_sales_open_tickets(event_id=event_id).all()\n\n\n@api.route('/events/<int:event_id>/tickets/<int:ticket_id>')\nclass Ticket(Resource):\n    @requires_auth\n    @api.doc('ticket', responses=POST_RESPONSES)\n    @api.marshal_with(TICKET)\n    def get(self, event_id, ticket_id):\n        \"\"\"Get information about a ticket\"\"\"\n        return TicketingManager.get_ticket(ticket_id=ticket_id)\n\n\n\n", "path": "app/api/tickets.py"}], "after_files": [{"content": "from flask.ext.restplus import Namespace\n\nfrom app.helpers.ticketing import TicketingManager\n\nfrom .helpers.helpers import (\n    requires_auth,\n    can_access)\nfrom .helpers.utils import POST_RESPONSES\nfrom .helpers.utils import Resource\nfrom .helpers import custom_fields as fields\nfrom ..helpers.data_getter import DataGetter\n\napi = Namespace('tickets', description='Tickets', path='/')\n\nORDER = api.model('Order', {\n    'id': fields.Integer(),\n    'identifier': fields.String(),\n    'amount': fields.Float(),\n    'paid_via': fields.String(),\n    'invoice_number': fields.String(),\n    'payment_mode': fields.String(),\n    'status': fields.String(),\n    'completed_at': fields.DateTime(),\n})\n\nTICKET = api.model('Ticket', {\n    'id': fields.Integer(),\n    'name': fields.String(),\n    'description': fields.String(),\n    'type': fields.String(),\n    'price': fields.Float(),\n    'quantity': fields.Integer(),\n})\n\n\n@api.route('/events/<int:event_id>/tickets/')\nclass TicketsList(Resource):\n    @requires_auth\n    @api.doc('tickets', responses=POST_RESPONSES)\n    @api.marshal_list_with(TICKET)\n    def get(self, event_id):\n        \"\"\"Get tickets of the event\"\"\"\n        return DataGetter.get_sales_open_tickets(event_id=event_id).all()\n\n\n@api.route('/events/<int:event_id>/tickets/<int:ticket_id>')\nclass Ticket(Resource):\n    @requires_auth\n    @api.doc('ticket', responses=POST_RESPONSES)\n    @api.marshal_with(TICKET)\n    def get(self, event_id, ticket_id):\n        \"\"\"Get information about a ticket\"\"\"\n        return TicketingManager.get_ticket(ticket_id=ticket_id)\n\n@api.route('/events/<int:event_id>/orders/<string:identifier>')\nclass Order(Resource):\n    @requires_auth\n    @api.doc('order', responses=POST_RESPONSES)\n    @api.marshal_with(ORDER)\n    def get(self, event_id, identifier):\n        \"\"\"Get information about a ticket\"\"\"\n        return TicketingManager.get_order_by_identifier(identifier=identifier)\n\n\n", "path": "app/api/tickets.py"}]}