Billing | R Documentation |
R6 Class representing a central resource for managing billing groups.
This is the main object for Billing
sevenbridges2::Item
-> Billing
URL
List of URL endpoints for this resource.
id
Billing group identifier.
owner
Username of the user that owns the billing group.
name
Billing group name.
type
Billing group type.
pending
Billing group approval status.
disabled
Indicator of whether the billing group is disabled.
balance
Billing group balance.
new()
Create a new Billing object.
Billing$new(res = NA, ...)
res
Response containing Billing object information.
...
Other response arguments.
print()
Prints billing group information as a bullet list.
Billing$print()
\dontrun{ # x is API response when billing group is requested billing_object <- Billing$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Print billing group billing_object$print() }
reload()
Reload Billing group object.
Billing$reload(...)
...
Other arguments that can be passed to core api()
function
like 'limit', 'offset', 'fields', etc.
Billing
object.
\dontrun{ # x is API response when billing group is requested billing_object <- Billing$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Reload billing group billing_object$reload() }
analysis_breakdown()
Method for getting an analysis breakdown for a billing group.
Billing$analysis_breakdown( date_from = NULL, date_to = NULL, invoice = NULL, fields = NULL, limit = getOption("sevenbridges2")$limit, offset = getOption("sevenbridges2")$offset, ... )
date_from
A string representing the starting date for retrieving transactions analysis in the following format: mm-dd-yyyy.
date_to
A string representing the ending date for retrieving transactions analysis in the following format: mm-dd-yyyy.
invoice
A string representing invoice ID or Invoice object to show a breakdown for the specific invoice. If omitted, the current spending breakdown is returned.
fields
Selector specifying a subset of fields to include in the response.
limit
The maximum number of collection items to return
for a single request. Minimum value is 1
.
The maximum value is 100
and the default value is 50
.
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.
\dontrun{ # x is API response when billing group is requested billing_object <- Billing$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Get analysis breakdown billing_object$analysis_breakdown() }
storage_breakdown()
Method for getting a storage breakdown for a billing group.
Billing$storage_breakdown( date_from = NULL, date_to = NULL, invoice = NULL, fields = NULL, limit = getOption("sevenbridges2")$limit, offset = getOption("sevenbridges2")$offset, ... )
date_from
A string representing the starting date for retrieving storage analysis in the following format: mm-dd-yyyy.
date_to
A string representing the ending date for retrieving storage analysis in the following format: mm-dd-yyyy.
invoice
A string representing invoice ID or Invoice object to show a breakdown for the specific invoice. If omitted, the current spending breakdown is returned.
fields
Selector specifying a subset of fields to include in the response.
limit
The maximum number of collection items to return
for a single request. Minimum value is 1
.
The maximum value is 100
and the default value is 50
.
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.
\dontrun{ # x is API response when billing group is requested billing_object <- Billing$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Get storage breakdown billing_object$storage_breakdown() }
egress_breakdown()
Method for getting a egress breakdown for a billing group.
Billing$egress_breakdown( date_from = NULL, date_to = NULL, invoice = NULL, fields = NULL, limit = getOption("sevenbridges2")$limit, offset = getOption("sevenbridges2")$offset, ... )
date_from
A string representing the starting date for retrieving egress analysis in the following format: mm-dd-yyyy.
date_to
A string representing the ending date for retrieving egress analysis in the following format: mm-dd-yyyy.
invoice
A string representing invoice ID or Invoice object to show a breakdown for the specific invoice. If omitted, the current spending breakdown is returned.
fields
Selector specifying a subset of fields to include in the response.
limit
The maximum number of collection items to return
for a single request. Minimum value is 1
.
The maximum value is 100
and the default value is 50
.
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.
\dontrun{ # x is API response when billing group is requested billing_object <- Billing$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Get egress breakdown billing_object$egress_breakdown() }
clone()
The objects of this class are cloneable with this method.
Billing$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `Billing$print`
## ------------------------------------------------
## Not run:
# x is API response when billing group is requested
billing_object <- Billing$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Print billing group
billing_object$print()
## End(Not run)
## ------------------------------------------------
## Method `Billing$reload`
## ------------------------------------------------
## Not run:
# x is API response when billing group is requested
billing_object <- Billing$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Reload billing group
billing_object$reload()
## End(Not run)
## ------------------------------------------------
## Method `Billing$analysis_breakdown`
## ------------------------------------------------
## Not run:
# x is API response when billing group is requested
billing_object <- Billing$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Get analysis breakdown
billing_object$analysis_breakdown()
## End(Not run)
## ------------------------------------------------
## Method `Billing$storage_breakdown`
## ------------------------------------------------
## Not run:
# x is API response when billing group is requested
billing_object <- Billing$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Get storage breakdown
billing_object$storage_breakdown()
## End(Not run)
## ------------------------------------------------
## Method `Billing$egress_breakdown`
## ------------------------------------------------
## Not run:
# x is API response when billing group is requested
billing_object <- Billing$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Get egress breakdown
billing_object$egress_breakdown()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.