Lager - v5.2.0
    Preparing search index...
    • Function

      Creates a new invoice in the API.

      This function retrieves a JWT token from SecureStore and uses it to authenticate a POST request to the API. The request creates a new invoice with the provided invoice details and returns the response data. If an error occurs during the request, it is caught and logged. In the case of an error, the function returns void.

      createInvoice

      Parameters

      • invoice: Partial<NewInvoice>

        The details of the new invoice to create.

      Returns Promise<void | Invoice>

      The response data from the API, which contains the created invoice, or void if an error occurs.

      If there is an error during the request, it is caught and logged.