R6 Class representing invoice resource endpoints
Super class
sevenbridges2::Resource
-> Invoices
Methods
Inherited methods
Method query()
The call returns information about all your available
invoices, unless you use the billing_group
query parameter to specify
the ID of a particular billing group, in which case it will return the
invoice incurred by that billing group only.
Arguments
billing_group
ID of a billing group or billing group object you want to list invoices for. Optional.
limit
The maximum number of collection items to return for a single request. Minimum value is
1
. The maximum value is100
and the default value is50
. This is a pagination-specific attribute.offset
The zero-based starting index in the entire collection of the first item to return. The default value is
0
. This is a pagination-specific attribute....
Other arguments that can be passed to core
api()
function like query parameters or 'fields', etc.
Returns
Collection
of Invoice
objects.
Method get()
This call retrieves information about a selected invoice,
including the costs for analysis and storage, and the invoice period.
Use the call to list invoices to retrieve the invoice_id
s for a
specified billing group.
Arguments
id
The ID of the invoice you are querying.
...
Other arguments that can be passed to core
api()
function like 'fields', etc.
Returns
Invoice
object.
Examples
## ------------------------------------------------
## Method `Invoices$query`
## ------------------------------------------------
if (FALSE) {
invoices_object <- Invoices$new(
auth = auth
)
# List all your invoices
invoices_object$query(billing_group = billing_group)
}
## ------------------------------------------------
## Method `Invoices$get`
## ------------------------------------------------
if (FALSE) {
invoices_object <- Invoices$new(
auth = auth
)
# Get single invoice by id
invoices_object$get(id = id)
}