Class: module:models/DiscountRequest

module:models/DiscountRequest(type, value)

new module:models/DiscountRequest(type, value)

Constructs a new DiscountRequest. Document representing a discount to be applied to a custom price adjustment. The properties

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

The type of discount.

value Number

The amount of the discount.

Source:

Members

(readonly) TypeEnum :String

Allowed values for the type property.

Type:
  • String
Source:

(inner, constant) amount

value: "amount"

Source:

(inner, constant) fixed_price

value: "fixed_price"

Source:

(inner, constant) percentage

value: "percentage"

Source:

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

The type of discount.

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

(inner) value :Number

The amount of the discount.

Type:
  • Number
Source:

Methods

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

Constructs a DiscountRequest 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/DiscountRequest

Optional instance to populate.

Source:
Returns:

The populated DiscountRequest instance.

Type
module:models/DiscountRequest