Class ModifySubscriptionRequest
java.lang.Object
com.broadleafcommerce.subscriptionoperation.web.domain.ModifySubscriptionRequest
- All Implemented Interfaces:
Serializable
Represents a request to modify a user's subscription.
- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe action to be performed on the specifiedSubscription.Miscellaneous attributes that can be set to this request in order to inform business logicDescribes details for access & charges in the current period in which the cancellation of this subscription is being requested/executed.Describes details of the applicable cancellation policy for this subscription.getItemChoice(String choiceKey) Mapping ofadd-on choice keystoadd-ons.Reference to the id (productId) of the item to upgrade or downgrade to.Type of newItemRef that this item is to be upgraded or downgraded to.The hydrated item identified bynewItemRefTypeandnewItemRefwhich the subscription will be upgraded or downgraded to.Gathers the expiration date of the subscription's prices.TheProductof the rootSubscriptionItem.The reason for modifying the subscription.The hydrated original root item of the subscription to be modified.Theid of the subscriptionto modify.Holds theSubscriptionWithItemsreferenced bysubscriptionId.The reference to the user requesting to perform the modification.The type of user requesting to preform the modification.inthashCode()booleanThe value to changeSubscription.isAutoRenewalEnabled()to.booleanShould this subscription be cancelled immediately?voidsetAction(SubscriptionAction action) The action to be performed on the specifiedSubscription.voidsetAdditionalAttributes(Map<String, Object> additionalAttributes) Miscellaneous attributes that can be set to this request in order to inform business logicvoidsetAutoRenewalEnabled(boolean autoRenewalEnabled) The value to changeSubscription.isAutoRenewalEnabled()to.voidsetCancellationPolicy(CancellationPolicy cancellationPolicy) Describes details for access & charges in the current period in which the cancellation of this subscription is being requested/executed.voidsetCancellationPolicyDetail(CancellationPolicyDetail cancellationPolicyDetail) Describes details of the applicable cancellation policy for this subscription.voidsetImmediateCancellation(boolean immediateCancellation) Should this subscription be cancelled immediately?voidsetItemChoiceByChoiceKey(Map<String, ItemChoice> itemChoiceByChoiceKey) Mapping ofadd-on choice keystoadd-ons.voidsetNewItemRef(String newItemRef) Reference to the id (productId) of the item to upgrade or downgrade to.voidsetNewItemRefType(String newItemRefType) Type of newItemRef that this item is to be upgraded or downgraded to.voidsetNextRootItem(SubscriptionReferencedItem nextRootItem) The hydrated item identified bynewItemRefTypeandnewItemRefwhich the subscription will be upgraded or downgraded to.voidsetProduct(Product product) TheProductof the rootSubscriptionItem.voidThe reason for modifying the subscription.voidsetRootItem(SubscriptionReferencedItem rootItem) The hydrated original root item of the subscription to be modified.voidsetSubscriptionId(String subscriptionId) Theid of the subscriptionto modify.voidsetSubscriptionWithItems(SubscriptionWithItems subscriptionWithItems) Holds theSubscriptionWithItemsreferenced bysubscriptionId.voidsetUserRef(String userRef) The reference to the user requesting to perform the modification.voidsetUserRefType(String userRefType) The type of user requesting to preform the modification.toString()
-
Constructor Details
-
ModifySubscriptionRequest
public ModifySubscriptionRequest()
-
-
Method Details
-
getItemChoice
-
getPriceExpirationDateUTC
Gathers the expiration date of the subscription's prices.- Returns:
- the expiration date of the subscription's prices.
-
getSubscriptionId
Theid of the subscriptionto modify. -
getUserRef
The reference to the user requesting to perform the modification. -
getUserRefType
The type of user requesting to preform the modification.- See Also:
-
getAction
The action to be performed on the specifiedSubscription. -
getReason
The reason for modifying the subscription. -
isImmediateCancellation
public boolean isImmediateCancellation()Should this subscription be cancelled immediately? -
getNewItemRefType
Type of newItemRef that this item is to be upgraded or downgraded to. e.g. BLC_PRODUCT.- See Also:
-
getNewItemRef
Reference to the id (productId) of the item to upgrade or downgrade to. -
isAutoRenewalEnabled
public boolean isAutoRenewalEnabled()The value to changeSubscription.isAutoRenewalEnabled()to. -
getAdditionalAttributes
Miscellaneous attributes that can be set to this request in order to inform business logic -
getSubscriptionWithItems
Holds theSubscriptionWithItemsreferenced bysubscriptionId. This should be hydrated in the service-layer, not on the REST API request. -
getRootItem
The hydrated original root item of the subscription to be modified. -
getNextRootItem
The hydrated item identified bynewItemRefTypeandnewItemRefwhich the subscription will be upgraded or downgraded to. -
getCancellationPolicy
Describes details for access & charges in the current period in which the cancellation of this subscription is being requested/executed. It should not be serialized. -
getCancellationPolicyDetail
Describes details of the applicable cancellation policy for this subscription. It should not be serialized. -
getProduct
TheProductof the rootSubscriptionItem. Used in the edit flow. -
getItemChoiceByChoiceKey
Mapping ofadd-on choice keystoadd-ons. Used in the edit flow. -
setSubscriptionId
Theid of the subscriptionto modify. -
setUserRef
The reference to the user requesting to perform the modification. -
setUserRefType
The type of user requesting to preform the modification.- See Also:
-
setAction
The action to be performed on the specifiedSubscription. -
setReason
The reason for modifying the subscription. -
setImmediateCancellation
public void setImmediateCancellation(boolean immediateCancellation) Should this subscription be cancelled immediately? -
setNewItemRefType
Type of newItemRef that this item is to be upgraded or downgraded to. e.g. BLC_PRODUCT.- See Also:
-
setNewItemRef
Reference to the id (productId) of the item to upgrade or downgrade to. -
setAutoRenewalEnabled
public void setAutoRenewalEnabled(boolean autoRenewalEnabled) The value to changeSubscription.isAutoRenewalEnabled()to. -
setAdditionalAttributes
Miscellaneous attributes that can be set to this request in order to inform business logic -
setSubscriptionWithItems
Holds theSubscriptionWithItemsreferenced bysubscriptionId. This should be hydrated in the service-layer, not on the REST API request. -
setRootItem
The hydrated original root item of the subscription to be modified. -
setNextRootItem
The hydrated item identified bynewItemRefTypeandnewItemRefwhich the subscription will be upgraded or downgraded to. -
setCancellationPolicy
Describes details for access & charges in the current period in which the cancellation of this subscription is being requested/executed. It should not be serialized. -
setCancellationPolicyDetail
Describes details of the applicable cancellation policy for this subscription. It should not be serialized. -
setProduct
TheProductof the rootSubscriptionItem. Used in the edit flow. -
setItemChoiceByChoiceKey
Mapping ofadd-on choice keystoadd-ons. Used in the edit flow. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-