pydo.invoices.get_summary_by_uuid()

Description

To retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary.

Parameters

Name Type Required Description Default Value
invoice_uuid string True UUID of the invoice

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

invoice = client.invoices.get_summary_by_uuid(invoice_uuid="1")

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

To retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary.

Click to expand an example response.
{
  "invoice_uuid": "22737513-0ea7-4206-8ceb-98a575af7681",
  "invoice_id": "123456789",
  "billing_period": "2020-01",
  "amount": "27.13",
  "user_name": "Sammy Shark",
  "user_billing_address": {
    "address_line1": "101 Shark Row",
    "city": "Atlantis",
    "region": "OC",
    "postal_code": "12345",
    "country_iso2_code": "US",
    "created_at": "2019-09-03T16:34:46.000+00:00",
    "updated_at": "2019-09-03T16:34:46.000+00:00"
  },
  "user_company": "DigitalOcean",
  "user_email": "[email protected]",
  "product_charges": {
    "name": "Product usage charges",
    "amount": "12.34",
    "items": [
      {
        "amount": "10.00",
        "name": "Spaces Subscription",
        "count": "1"
      },
      {
        "amount": "2.34",
        "name": "Database Clusters",
        "count": "1"
      }
    ]
  },
  "overages": {
    "name": "Overages",
    "amount": "3.45"
  },
  "taxes": {
    "name": "Taxes",
    "amount": "4.56"
  },
  "credits_and_adjustments": {
    "name": "Credits & adjustments",
    "amount": "6.78"
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}