Voog.com

Discount

Discount represents an object describing discounts.

List of available attributes

amount

Returns discount amount. Depending on discount_type, the amount is either percentage or a fixed net discount.

applies_to

Returns to what discount applies to. Values can be "products", "categories", "cart", "shipping" or "cart_and_shipping".

applies_to_cart?

Returns true if discount applies to cart.

applies_to_categories?

Returns true if discount applies to categories.

applies_to_items?

Returns true if discount applies to products or categories.

applies_to_products?

Returns true if discount applies to products.

applies_to_shipping?

Returns true if discount applies to shipping.

code

Returns discount redemption code.

currency

Returns discount currency.

discount_type

Returns discount type. Values can be "percentage" or "fixed".

fixed?

Returns true if discount type is "fixed".

percentage?

Returns true if discount type is "percentage".