Home / Function/ create_invoice() — fastapi Function Reference

create_invoice() — fastapi Function Reference

Architecture documentation for the create_invoice() function in tutorial001_py39.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  b15b19c8_8580_2a04_4a02_cf66e393b453["create_invoice()"]
  d49c7609_2f45_09fa_af5f_de5d6d4d7067["tutorial001_py39.py"]
  b15b19c8_8580_2a04_4a02_cf66e393b453 -->|defined in| d49c7609_2f45_09fa_af5f_de5d6d4d7067
  style b15b19c8_8580_2a04_4a02_cf66e393b453 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs_src/openapi_callbacks/tutorial001_py39.py lines 36–53

def create_invoice(invoice: Invoice, callback_url: Union[HttpUrl, None] = None):
    """
    Create an invoice.

    This will (let's imagine) let the API user (some external developer) create an
    invoice.

    And this path operation will:

    * Send the invoice to the client.
    * Collect the money from the client.
    * Send a notification back to the API user (the external developer), as a callback.
        * At this point is that the API will somehow send a POST request to the
            external API with the notification of the invoice event
            (e.g. "payment successful").
    """
    # Send the invoice, collect the money, send the notification (the callback)
    return {"msg": "Invoice received"}

Domain

Subdomains

Frequently Asked Questions

What does create_invoice() do?
create_invoice() is a function in the fastapi codebase, defined in docs_src/openapi_callbacks/tutorial001_py39.py.
Where is create_invoice() defined?
create_invoice() is defined in docs_src/openapi_callbacks/tutorial001_py39.py at line 36.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free