R6 Class representing a central resource for managing billing groups.
Super class
sevenbridges2::Item
-> Billing
Public fields
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.
Methods
Method print()
Print billing group information as a bullet list.
Method reload()
Reload Billing group object.
Arguments
...
Other arguments that can be passed to core
api()
function like 'limit', 'offset', 'fields', etc.
Method analysis_breakdown()
Method for getting a analysis breakdown for a billing group.
Arguments
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 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.
Method storage_breakdown()
Method for getting a storage breakdown for a billing group.
Arguments
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 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.
Method egress_breakdown()
Method for getting a egress breakdown for a billing group.
Arguments
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 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.
Examples
## ------------------------------------------------
## Method `Billing$print`
## ------------------------------------------------
if (FALSE) {
# 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()
}
## ------------------------------------------------
## Method `Billing$reload`
## ------------------------------------------------
if (FALSE) {
# 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()
}
## ------------------------------------------------
## Method `Billing$analysis_breakdown`
## ------------------------------------------------
if (FALSE) {
# 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()
}
## ------------------------------------------------
## Method `Billing$storage_breakdown`
## ------------------------------------------------
if (FALSE) {
# 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()
}
## ------------------------------------------------
## Method `Billing$egress_breakdown`
## ------------------------------------------------
if (FALSE) {
# 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()
}