PurchaseAdjustment

class PurchaseAdjustment(title: String, price: Int)

Purchase Adjustments (positive or negative) that should be applied to the total order value. Title and price (in cents) are required. The amount should be negative to factor in a deduction to the final price, such as a discount; the amount should be positive to factor in an additional cost, such as shipping.

Recommended keys:

tax – Taxes applied to order

shipping – Any shipping and/or handling fees applied to order

discount – Discount off order from promotion code, coupon, etc.

gift_card – Amount of order covered by gift card payment

gift_wrap – Additional fee for gift wrapping.

credits – Amount of order covered by account credit

tip – Any gratuity added to purchase

Constructors

Link copied to clipboard
constructor(title: String, price: Int)

Properties

Link copied to clipboard
var price: Int

Price of adjustment, in cents (e.g. $10.99 is 1099).

Link copied to clipboard

Short user-readable name/title of the adjustment (eg. shipping, discount).

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Converts PurchaseAdjustment to JSON.

Link copied to clipboard
open override fun toString(): String