Invoice {sevenbridges2}R Documentation

R6 Class representing invoice information.

Description

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

Public 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`
## ------------------------------------------------

## Not run: 
 # 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()

## End(Not run)


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

## Not run: 
 # 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()

## End(Not run)


[Package sevenbridges2 version 0.1.0 Index]