| Invoices {sevenbridges2} | R Documentation |
R6 Class representing invoices endpoints
Description
R6 Class representing invoice resource endpoints
Super class
sevenbridges2::Resource -> Invoices
Public fields
URLList of URL endpoints for this resource.
Methods
Public methods
Inherited methods
Method new()
Create a new Invoices object.
Usage
Invoices$new(...)
Arguments
...Other response arguments.
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.
Usage
Invoices$query(
billing_group = NULL,
limit = getOption("sevenbridges2")$limit,
offset = getOption("sevenbridges2")$offset,
...
)Arguments
billing_groupID of a billing group or billing group object you want to list invoices for. Optional.
limitThe maximum number of collection items to return for a single request. Minimum value is
1. The maximum value is100and the default value is50. This is a pagination-specific attribute.offsetThe 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.
Examples
\dontrun{
invoices_object <- Invoices$new(
auth = auth
)
# List all your invoices
invoices_object$query(billing_group = billing_group)
}
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_ids for a
specified billing group.
Usage
Invoices$get(id, ...)
Arguments
idThe ID of the invoice you are querying.
...Other arguments that can be passed to core
api()function like 'fields', etc.
Returns
Invoice object.
Examples
\dontrun{
invoices_object <- Invoices$new(
auth = auth
)
# Get single invoice by id
invoices_object$get(id = id)
}
Method clone()
The objects of this class are cloneable with this method.
Usage
Invoices$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
## ------------------------------------------------
## Method `Invoices$query`
## ------------------------------------------------
## Not run:
invoices_object <- Invoices$new(
auth = auth
)
# List all your invoices
invoices_object$query(billing_group = billing_group)
## End(Not run)
## ------------------------------------------------
## Method `Invoices$get`
## ------------------------------------------------
## Not run:
invoices_object <- Invoices$new(
auth = auth
)
# Get single invoice by id
invoices_object$get(id = id)
## End(Not run)