invoice_summary
Creates, updates, deletes, gets or lists an invoice_summary
resource.
Overview
Name | invoice_summary |
Type | Resource |
Id | digitalocean.billing.invoice_summary |
Fields
The following fields are returned by SELECT
queries:
- invoices_get_summary_by_uuid
To retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary
.
Name | Datatype | Description |
---|---|---|
invoice_id | string | ID of the invoice (example: 123456789) |
user_name | string | Name of the DigitalOcean customer being invoiced. (example: Sammy Shark) |
amount | string | Total amount of the invoice, in USD. This will reflect month-to-date usage in the invoice preview. (example: 27.13) |
billing_period | string | Billing period of usage for which the invoice is issued, in YYYY-MM format. (example: 2020-01) |
credits_and_adjustments | object | A summary of the credits and adjustments contributing to the invoice. |
invoice_uuid | string | UUID of the invoice (example: 22737513-0ea7-4206-8ceb-98a575af7681) |
overages | object | A summary of the overages contributing to the invoice. |
product_charges | object | A summary of the product usage charges contributing to the invoice. This will include an amount, and grouped aggregates by resource type under the items key. |
taxes | object | A summary of the taxes contributing to the invoice. |
user_billing_address | object | The billing address of the customer being invoiced. |
user_company | string | Company of the DigitalOcean customer being invoiced, if set. (example: DigitalOcean) |
user_email | string | Email of the DigitalOcean customer being invoiced. (example: sammy@digitalocean.com) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
invoices_get_summary_by_uuid | select | invoice_uuid | To retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary . |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
invoice_uuid | string | UUID of the invoice (example: 22737513-0ea7-4206-8ceb-98a575af7681) |
SELECT
examples
- invoices_get_summary_by_uuid
To retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary
.
SELECT
invoice_id,
user_name,
amount,
billing_period,
credits_and_adjustments,
invoice_uuid,
overages,
product_charges,
taxes,
user_billing_address,
user_company,
user_email
FROM digitalocean.billing.invoice_summary
WHERE invoice_uuid = '{{ invoice_uuid }}' -- required;