Class PurchaseAdjustment
-
- All Implemented Interfaces:
public final class PurchaseAdjustment
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
-
-
Constructor Summary
Constructors Constructor Description PurchaseAdjustment(String title, Integer price)
-
Method Summary
Modifier and Type Method Description final Integer
getPrice()
Price of adjustment, in cents (e.g. final String
getTitle()
Short user-readable name/title of the adjustment (eg. Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final JSONObject
toJSON()
Converts PurchaseAdjustment to JSON. -
-
Method Detail
-
getTitle
final String getTitle()
Short user-readable name/title of the adjustment (eg. shipping, discount).
-
toJSON
final JSONObject toJSON()
Converts PurchaseAdjustment to JSON.
- Returns:
JSON representation of a Purchase Adjustment
-
-
-
-