amount: Amount

Description Usage Arguments Value Examples

Description

amount calculates the value of the object and returns the result.

Usage

1
2
3
4
5
6
7
amount(obj, ...)

## S4 method for signature 'single_item'
amount(obj, ...)

## S4 method for signature 'all_items'
amount(obj, ...)

Arguments

obj

An object.

Value

The value of a single_item.

The values of all items in an order.

Examples

1
2
## Not run: amount(an_item) #Calculates the value of a single_item: amount = quantity * unit price * discount(an_item).
## Not run: amount(shopping_cart) #Calculates sum of the values of all items in shopping_cart: sum(amount(each of the items)).

Samantha-Lui/EZRecords documentation built on May 5, 2019, 4:46 p.m.