org.pdf.ticket ============== .. py:module:: org.pdf.ticket Classes ------- .. autoapisummary:: org.pdf.ticket.TicketQrCode org.pdf.ticket.TicketPdf org.pdf.ticket.TicketsPdf Module Contents --------------- .. py:class:: TicketQrCode(payload: str | bytes, border: int | None = None, box_size: int | None = None, fill_color: str | None = None, back_color: str | None = None, img_format: str | None = None, encoding: Literal['base64'] | None = None) Bases: :py:obj:`onegov.qrcode.QrCode` Generates QR Codes .. py:attribute:: _border :value: 0 .. py:class:: TicketPdf(*args: Any, **kwargs: Any) Bases: :py:obj:`onegov.org.pdf.core.OrgPdf` A PDF document. .. py:method:: page_fn_header_and_footer_qr(canvas: reportlab.pdfgen.canvas.Canvas, doc: onegov.pdf.templates.Template) -> None :staticmethod: .. py:property:: page_fn :type: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None] First page the same as later except Qr-Code. .. py:method:: ticket_summary(html: str | None, linkify: bool = True) -> None A copy of the mini_html adapted for ticket summary. We have to guarantee some backwards compatibility here whenever we change the templates and thereby the snapshot of tickets. Must work for templates: - directory_entry_submission - display_event - display_form - reservations .. py:method:: ticket_metadata(ticket: onegov.ticket.Ticket, layout: onegov.org.layout.TicketLayout) -> None .. py:method:: ticket_invoice(ticket: onegov.ticket.Ticket, layout: onegov.org.layout.TicketLayout) -> None .. py:method:: ticket_payment(ticket: onegov.ticket.Ticket, layout: onegov.org.layout.TicketLayout) -> None .. py:method:: ticket_timeline(msg_feed: collections.abc.Mapping[str, Any] | None) -> None Will parse the timeline from view_messages_feed .. py:method:: extract_feed_info(html: str) -> list[str | None] | None :staticmethod: Must be able to parse templates message_{message.type}.pt and return the useful data in cleaned form. .. py:method:: add_ticket(ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest) -> None Adds a ticket to the story. .. py:method:: from_ticket(request: onegov.org.request.OrgRequest, ticket: onegov.ticket.Ticket) -> io.BytesIO :classmethod: Creates a PDF representation of the ticket. It is sensible to the templates used to render the message feed and the summary of the ticket coming from ticket handler. With this approach, snapshotted summaries are supported. .. py:class:: TicketsPdf(*args: Any, **kwargs: Any) Bases: :py:obj:`TicketPdf` A PDF document. .. py:method:: filter_info(form: onegov.org.forms.TicketInvoiceSearchForm, request: onegov.org.request.OrgRequest) -> None .. py:method:: from_tickets(request: onegov.org.request.OrgRequest, tickets: collections.abc.Collection[onegov.ticket.Ticket], form: onegov.org.forms.TicketInvoiceSearchForm | None = None) -> io.BytesIO :classmethod: Creates a PDF representation of the tickets. It is sensible to the templates used to render the message feed and the summary of the ticket coming from ticket handler. With this approach, snapshotted summaries are supported.