Class: module:models/Discount

module:models/Discount(type)

new module:models/Discount(type)

Constructs a new Discount. Document representing a discount that was

Parameters:
Name Type Description
type module:models/Discount.TypeEnum

The type of discount.

Source:

Members

(readonly) TypeEnum :String

Allowed values for the type property.

Type:
  • String
Source:

(inner) amount :Number

The amount that is used with the amount and fixed price types.

Type:
  • Number
Source:

(inner, constant) amount

value: "amount"

Source:

(inner, constant) bonus

value: "bonus"

Source:

(inner, constant) bonus_choice

value: "bonus_choice"

Source:

(inner, constant) fixed_price

value: "fixed_price"

Source:

(inner, constant) free

value: "free"

Source:

(inner) percentage :Number

The percentage that is used with percentage types.

Type:
  • Number
Source:

(inner, constant) percentage

value: "percentage"

Source:

(inner, constant) percentage_off_options

value: "percentage_off_options"

Source:

(inner) price_book_id :String

The price book id that is used with some types.

Type:
  • String
Source:

(inner, constant) price_book_price

value: "price_book_price"

Source:

(inner, constant) total_fixed_price

value: "total_fixed_price"

Source:

(inner) type :module:models/Discount.TypeEnum

The type of discount.

Type:
  • module:models/Discount.TypeEnum
Source:

Methods

(static) constructFromObject(data, obj) → {module:models/Discount}

Constructs a Discount from a plain JavaScript object, optionally creating a new instance. Copies all relevant properties from data to obj if supplied or a new instance if not.

Parameters:
Name Type Description
data Object

The plain JavaScript object bearing properties of interest.

obj module:models/Discount

Optional instance to populate.

Source:
Returns:

The populated Discount instance.

Type
module:models/Discount