Skip to contents

R6 Class representing invoice information.

Details

This object contains information about a selected invoice, including the costs for analysis and storage, and the invoice period.

Super class

sevenbridges2::Item -> Invoice

Public fields

URL

List of URL endpoints for this resource.

id

Invoice identifier.

pending

Invoice approval status.

approval_date

Invoice approval date.

invoice_period

Invoicing period (from-to).

analysis_costs

Costs of your analysis.

storage_costs

Storage costs.

total

Total costs.

Methods


Method new()

Create new Invoice object.

Usage

Invoice$new(res = NA, ...)

Arguments

res

Response containing Invoice object information.

...

Other response arguments.


Method print()

Print invoice information as a bullet list.

Usage

Invoice$print()

Examples

\dontrun{
 # x is API response when invoice is requested
 invoice_object <- Invoice$new(
                    res = x,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Print invoice object
 invoice_object$print()
}


Method reload()

Reload Invoice.

Usage

Invoice$reload(...)

Arguments

...

Other arguments that can be passed to core api() function like 'fields', etc.

Returns

Invoice object.

Examples

\dontrun{
 # x is API response when invoice is requested
 invoice_object <- Invoice$new(
                    res = x,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Reload invoice object
 invoice_object$reload()
}


Method clone()

The objects of this class are cloneable with this method.

Usage

Invoice$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `Invoice$print`
## ------------------------------------------------

if (FALSE) {
 # x is API response when invoice is requested
 invoice_object <- Invoice$new(
                    res = x,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Print invoice object
 invoice_object$print()
}


## ------------------------------------------------
## Method `Invoice$reload`
## ------------------------------------------------

if (FALSE) {
 # x is API response when invoice is requested
 invoice_object <- Invoice$new(
                    res = x,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Reload invoice object
 invoice_object$reload()
}