Class Adjustment
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ItemAdjustment
- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanjavax.money.MonetaryAmountThe amount of this adjustment.intIftypeisDefaultAdjustmentType.RECURRING_DISCOUNT, this is the beginning period for the discount.The campaign tracking id (if any) for this adjustment.The code used (if any) that triggered the application of the offer for this adjustment.IftypeisDefaultAdjustmentType.RECURRING_DISCOUNT, this is the ending period for the discount.intIftypeisDefaultAdjustmentType.FREE_TRIAL, then this defines the free trial's length.intThe quantity of the current line item that this offer was applied to.A reference to the OfferCode (if any).A reference to theOfferRef.intThe number of times that the offer this adjustment was created from is applied.A list ofOfferItemDetailsrepresenting the qualifier items where this adjustment was from.intThe quantity per offer usage of the target item that this adjustment is for.The serviceLevel that this adjustment applies to (typically used only with fulfillment group offers to indicate that the discount applies to the portion of the fulfillment price related to a specific service level.getType()inthashCode()booleanDeprecated, for removal: This API element is subject to removal in a future version.voidsetAdjustmentAmount(javax.money.MonetaryAmount adjustmentAmount) The amount of this adjustment.voidsetBeginPeriod(int beginPeriod) IftypeisDefaultAdjustmentType.RECURRING_DISCOUNT, this is the beginning period for the discount.voidsetCampaignTrackingId(String campaignTrackingId) The campaign tracking id (if any) for this adjustment.voidsetCodeUsed(String codeUsed) The code used (if any) that triggered the application of the offer for this adjustment.voidsetEndPeriod(Integer endPeriod) IftypeisDefaultAdjustmentType.RECURRING_DISCOUNT, this is the ending period for the discount.voidsetFreeTrialLength(int freeTrialLength) IftypeisDefaultAdjustmentType.FREE_TRIAL, then this defines the free trial's length.voidsetFreeTrialLengthUnits(String freeTrialLengthUnits) voidsetFutureCredit(boolean isFutureCredit) Deprecated, for removal: This API element is subject to removal in a future version.UsesetType(String)voidsetItemAdjustmentQuantity(int itemAdjustmentQuantity) The quantity of the current line item that this offer was applied to.voidsetOfferCodeRef(String offerCodeRef) A reference to the OfferCode (if any).voidsetOfferRef(OfferRef offerRef) A reference to theOfferRef.voidsetOfferUses(int offerUses) The number of times that the offer this adjustment was created from is applied.voidsetQualifierDetails(List<OfferItemDetail> qualifierDetails) A list ofOfferItemDetailsrepresenting the qualifier items where this adjustment was from.voidsetQuantityPerUsage(int quantityPerUsage) The quantity per offer usage of the target item that this adjustment is for.voidsetServiceLevel(String serviceLevel) The serviceLevel that this adjustment applies to (typically used only with fulfillment group offers to indicate that the discount applies to the portion of the fulfillment price related to a specific service level.voidtoString()
-
Constructor Details
-
Adjustment
public Adjustment()
-
-
Method Details
-
setType
- See Also:
-
type
-
getType
- See Also:
-
type
-
setFutureCredit
@Deprecated(since="Offer Client 2.0.2", forRemoval=true) public void setFutureCredit(boolean isFutureCredit) Deprecated, for removal: This API element is subject to removal in a future version.UsesetType(String)Sets theisFutureCreditflag.Since this flag is not deprecated and for the sake of backwards compatibility, this method will also set
type. IfisFutureCreditis true, then this method both sets the flag to true and thentypetoDefaultAdjustmentType.FUTURE_CREDIT. Else, the flag is set to false and thentypeis set toDefaultAdjustmentType.ORDER_DISCOUNTsince no other type was possible in earlier versions whenisFutureCreditwas still in use.- Parameters:
isFutureCredit- The new value to set forisFutureCredit.- See Also:
-
isFutureCredit
-
isFutureCredit
Deprecated, for removal: This API element is subject to removal in a future version.UsegetType()Returns the value ofisFutureCredit.Since that flag is not deprecated, this will check if
typeisDefaultAdjustmentType.FUTURE_CREDITas well for backwards compatibility.- See Also:
-
isFutureCredit
-
getOfferRef
A reference to theOfferRef. -
getOfferCodeRef
A reference to the OfferCode (if any). -
getAdjustmentAmount
public javax.money.MonetaryAmount getAdjustmentAmount()The amount of this adjustment. -
getCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Returns:
- The code used (if any) that triggered the application of the offer for this adjustment.
-
getQualifierDetails
A list ofOfferItemDetailsrepresenting the qualifier items where this adjustment was from.For example, ItemA and ItemB qualify for a free gift offer, which results Item_FG to be added as a free gift item. These details are used to identify ItemA and ItemB from free gift item Item_FG using its adjustment.
Take another example, ItemA qualifies for a Buy 1 itemA Get 1 itemB free offer. These details are used to identity the qualifier item ItemA from target item ItemB.
-
getQuantityPerUsage
public int getQuantityPerUsage()The quantity per offer usage of the target item that this adjustment is for. -
getItemAdjustmentQuantity
public int getItemAdjustmentQuantity()The quantity of the current line item that this offer was applied to. -
getOfferUses
public int getOfferUses()The number of times that the offer this adjustment was created from is applied. -
getCampaignTrackingId
The campaign tracking id (if any) for this adjustment. -
getServiceLevel
The serviceLevel that this adjustment applies to (typically used only with fulfillment group offers to indicate that the discount applies to the portion of the fulfillment price related to a specific service level. For example, for a group containing some items shipped by STANDARD and some as EXPRESS it is possible the discount only applies to the EXPRESS items. A blank value would indicate the discount applies to all service levels. -
getFreeTrialLength
public int getFreeTrialLength()IftypeisDefaultAdjustmentType.FREE_TRIAL, then this defines the free trial's length.- Since:
- Offer Client 2.0.2
- See Also:
-
freeTrialLengthUnits
-
getFreeTrialLengthUnits
IftypeisDefaultAdjustmentType.FREE_TRIAL, then this defines the units forfreeTrialLength. Default isDefaultFreeTrialLengthUnits.DAYS.- Since:
- Offer Client 2.0.2
- See Also:
-
DefaultFreeTrialLengthUnitsfreeTrialLength
-
getBeginPeriod
public int getBeginPeriod()IftypeisDefaultAdjustmentType.RECURRING_DISCOUNT, this is the beginning period for the discount. 1 refers to the first recurring billing period, and so on.- Since:
- Offer Client 2.0.2
-
getEndPeriod
IftypeisDefaultAdjustmentType.RECURRING_DISCOUNT, this is the ending period for the discount. 1 refers to the first recurring billing period, and so on.- Since:
- Offer Client 2.0.2
-
setOfferRef
A reference to theOfferRef. -
setOfferCodeRef
A reference to the OfferCode (if any). -
setAdjustmentAmount
public void setAdjustmentAmount(javax.money.MonetaryAmount adjustmentAmount) The amount of this adjustment. -
setCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Parameters:
codeUsed- The code used (if any) that triggered the application of the offer for this adjustment.
-
setQualifierDetails
A list ofOfferItemDetailsrepresenting the qualifier items where this adjustment was from.For example, ItemA and ItemB qualify for a free gift offer, which results Item_FG to be added as a free gift item. These details are used to identify ItemA and ItemB from free gift item Item_FG using its adjustment.
Take another example, ItemA qualifies for a Buy 1 itemA Get 1 itemB free offer. These details are used to identity the qualifier item ItemA from target item ItemB.
-
setQuantityPerUsage
public void setQuantityPerUsage(int quantityPerUsage) The quantity per offer usage of the target item that this adjustment is for. -
setItemAdjustmentQuantity
public void setItemAdjustmentQuantity(int itemAdjustmentQuantity) The quantity of the current line item that this offer was applied to. -
setOfferUses
public void setOfferUses(int offerUses) The number of times that the offer this adjustment was created from is applied. -
setCampaignTrackingId
The campaign tracking id (if any) for this adjustment. -
setServiceLevel
The serviceLevel that this adjustment applies to (typically used only with fulfillment group offers to indicate that the discount applies to the portion of the fulfillment price related to a specific service level. For example, for a group containing some items shipped by STANDARD and some as EXPRESS it is possible the discount only applies to the EXPRESS items. A blank value would indicate the discount applies to all service levels. -
setFreeTrialLength
public void setFreeTrialLength(int freeTrialLength) IftypeisDefaultAdjustmentType.FREE_TRIAL, then this defines the free trial's length.- Since:
- Offer Client 2.0.2
- See Also:
-
freeTrialLengthUnits
-
setFreeTrialLengthUnits
IftypeisDefaultAdjustmentType.FREE_TRIAL, then this defines the units forfreeTrialLength. Default isDefaultFreeTrialLengthUnits.DAYS.- Since:
- Offer Client 2.0.2
- See Also:
-
DefaultFreeTrialLengthUnitsfreeTrialLength
-
setBeginPeriod
public void setBeginPeriod(int beginPeriod) IftypeisDefaultAdjustmentType.RECURRING_DISCOUNT, this is the beginning period for the discount. 1 refers to the first recurring billing period, and so on.- Since:
- Offer Client 2.0.2
-
setEndPeriod
IftypeisDefaultAdjustmentType.RECURRING_DISCOUNT, this is the ending period for the discount. 1 refers to the first recurring billing period, and so on.- Since:
- Offer Client 2.0.2
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getType()