| Billing {sevenbridges2} | R Documentation |
R6 Class representing billing information.
Description
R6 Class representing a central resource for managing billing groups.
Details
This is main object for Billing
Super class
sevenbridges2::Item -> Billing
Public fields
URLList of URL endpoints for this resource.
idBilling group identifier.
ownerUsername of the user that owns the billing group.
nameBilling group name.
typeBilling group type
pendingBilling group approval status.
disabledIndicator of whether the billing group is disabled.
balanceBilling group balance.
Methods
Public methods
Method new()
Create a new Billing object.
Usage
Billing$new(res = NA, ...)
Arguments
resResponse containing Billing object information.
...Other response arguments.
Method print()
Print billing group information as a bullet list.
Usage
Billing$print()
Examples
\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()
}
Method reload()
Reload Billing group object.
Usage
Billing$reload(...)
Arguments
...Other arguments that can be passed to core
api()function like 'limit', 'offset', 'fields', etc.
Returns
Billing object.
Examples
\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()
}
Method analysis_breakdown()
Method for getting a analysis breakdown for a billing group.
Usage
Billing$analysis_breakdown(
date_from = NULL,
date_to = NULL,
invoice = NULL,
fields = NULL,
limit = getOption("sevenbridges2")$limit,
offset = getOption("sevenbridges2")$offset,
...
)Arguments
date_fromA string representing the starting date for retrieving transactions analysis in the following format: mm-dd-yyyy.
date_toA string representing the ending date for retrieving transactions analysis in the following format: mm-dd-yyyy.
invoiceA string representing invoice ID or Invoice object to show a breakdown for the specific invoice. If omitted, the current spending breakdown is returned.
fieldsSelector specifying a subset of fields to include in the response.
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.
Examples
\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()
}
Method storage_breakdown()
Method for getting a storage breakdown for a billing group.
Usage
Billing$storage_breakdown(
date_from = NULL,
date_to = NULL,
invoice = NULL,
fields = NULL,
limit = getOption("sevenbridges2")$limit,
offset = getOption("sevenbridges2")$offset,
...
)Arguments
date_fromA string representing the starting date for retrieving storage analysis in the following format: mm-dd-yyyy.
date_toA string representing the ending date for retrieving storage analysis in the following format: mm-dd-yyyy.
invoiceA string representing invoice ID or Invoice object to show a breakdown for the specific invoice. If omitted, the current spending breakdown is returned.
fieldsSelector specifying a subset of fields to include in the response.
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.
Examples
\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()
}
Method egress_breakdown()
Method for getting a egress breakdown for a billing group.
Usage
Billing$egress_breakdown(
date_from = NULL,
date_to = NULL,
invoice = NULL,
fields = NULL,
limit = getOption("sevenbridges2")$limit,
offset = getOption("sevenbridges2")$offset,
...
)Arguments
date_fromA string representing the starting date for retrieving egress analysis in the following format: mm-dd-yyyy.
date_toA string representing the ending date for retrieving egress analysis in the following format: mm-dd-yyyy.
invoiceA string representing invoice ID or Invoice object to show a breakdown for the specific invoice. If omitted, the current spending breakdown is returned.
fieldsSelector specifying a subset of fields to include in the response.
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.
Examples
\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()
}
Method clone()
The objects of this class are cloneable with this method.
Usage
Billing$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
## ------------------------------------------------
## 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)