Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Invoices

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private Readonly store

store: Store

Methods

add

  • Manually add an invoice to a subscription. Can be used for manually billing an account.

    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      apiKey: example_key,
      secretKey: example_secret
    });
    const response = await client.billing.subscriptions.add({
      "Subscription": {
        "Uid": "dQGxEz94"
      },
      "InvoiceDate": new Date('12/29/2021'),
      "InvoiceLineItems": [
        {
          "Description": "Example Item",
          "Amount": 50
        }
      ]
    });
    console.log(response);
    
    throws

    Response If the server returns a non-"OK" status, the whole response object will be thrown.

    Parameters

    • invoice: InvoiceAdd

      The invoice to add to Outseta.

    Returns Promise<Invoice | ValidationError<Invoice>>

    The response body if response status OK, or response body of validation errors if response status 400.

Generated using TypeDoc