Class ModifySubscriptionRequest

java.lang.Object
com.broadleafcommerce.subscriptionoperation.web.domain.ModifySubscriptionRequest
All Implemented Interfaces:
Serializable

public class ModifySubscriptionRequest extends Object implements Serializable
Represents a request to modify a user's subscription.
Author:
Nathan Moore (nathandmoore)
See Also:
  • Constructor Details

    • ModifySubscriptionRequest

      public ModifySubscriptionRequest()
  • Method Details

    • getItemChoice

      public ItemChoice getItemChoice(String choiceKey)
    • getPriceExpirationDateUTC

      public Instant getPriceExpirationDateUTC()
      Gathers the expiration date of the subscription's prices.
      Returns:
      the expiration date of the subscription's prices.
    • getSubscriptionId

      public String getSubscriptionId()
      The id of the subscription to modify.
    • getUserRef

      public String getUserRef()
      The reference to the user requesting to perform the modification.
    • getUserRefType

      public String getUserRefType()
      The type of user requesting to preform the modification.
      See Also:
    • getAction

      public SubscriptionAction getAction()
      The action to be performed on the specified Subscription.
    • getReason

      public String getReason()
      The reason for modifying the subscription.
    • isImmediateCancellation

      public boolean isImmediateCancellation()
      Should this subscription be cancelled immediately?
    • getNewItemRefType

      public String getNewItemRefType()
      Type of newItemRef that this item is to be upgraded or downgraded to. e.g. BLC_PRODUCT.
      See Also:
    • getNewItemRef

      public String getNewItemRef()
      Reference to the id (productId) of the item to upgrade or downgrade to.
    • isAutoRenewalEnabled

      public boolean isAutoRenewalEnabled()
      The value to change Subscription.isAutoRenewalEnabled() to.
    • getAdditionalAttributes

      public Map<String,Object> getAdditionalAttributes()
      Miscellaneous attributes that can be set to this request in order to inform business logic
    • getSubscriptionWithItems

      public SubscriptionWithItems getSubscriptionWithItems()
      Holds the SubscriptionWithItems referenced by subscriptionId. This should be hydrated in the service-layer, not on the REST API request.
    • getRootItem

      public SubscriptionReferencedItem getRootItem()
      The hydrated original root item of the subscription to be modified.
    • getNextRootItem

      public SubscriptionReferencedItem getNextRootItem()
      The hydrated item identified by newItemRefType and newItemRef which the subscription will be upgraded or downgraded to.
    • getCancellationPolicy

      public CancellationPolicy 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

      public CancellationPolicyDetail getCancellationPolicyDetail()
      Describes details of the applicable cancellation policy for this subscription. It should not be serialized.
    • getProduct

      @Nullable public Product getProduct()
      The Product of the root SubscriptionItem. Used in the edit flow.
    • getItemChoiceByChoiceKey

      public Map<String,ItemChoice> getItemChoiceByChoiceKey()
      Mapping of add-on choice keys to add-ons. Used in the edit flow.
    • setSubscriptionId

      public void setSubscriptionId(String subscriptionId)
      The id of the subscription to modify.
    • setUserRef

      public void setUserRef(String userRef)
      The reference to the user requesting to perform the modification.
    • setUserRefType

      public void setUserRefType(String userRefType)
      The type of user requesting to preform the modification.
      See Also:
    • setAction

      public void setAction(SubscriptionAction action)
      The action to be performed on the specified Subscription.
    • setReason

      public void setReason(String reason)
      The reason for modifying the subscription.
    • setImmediateCancellation

      public void setImmediateCancellation(boolean immediateCancellation)
      Should this subscription be cancelled immediately?
    • setNewItemRefType

      public void setNewItemRefType(String newItemRefType)
      Type of newItemRef that this item is to be upgraded or downgraded to. e.g. BLC_PRODUCT.
      See Also:
    • setNewItemRef

      public void setNewItemRef(String newItemRef)
      Reference to the id (productId) of the item to upgrade or downgrade to.
    • setAutoRenewalEnabled

      public void setAutoRenewalEnabled(boolean autoRenewalEnabled)
      The value to change Subscription.isAutoRenewalEnabled() to.
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<String,Object> additionalAttributes)
      Miscellaneous attributes that can be set to this request in order to inform business logic
    • setSubscriptionWithItems

      public void setSubscriptionWithItems(SubscriptionWithItems subscriptionWithItems)
      Holds the SubscriptionWithItems referenced by subscriptionId. This should be hydrated in the service-layer, not on the REST API request.
    • setRootItem

      public void setRootItem(SubscriptionReferencedItem rootItem)
      The hydrated original root item of the subscription to be modified.
    • setNextRootItem

      public void setNextRootItem(SubscriptionReferencedItem nextRootItem)
      The hydrated item identified by newItemRefType and newItemRef which the subscription will be upgraded or downgraded to.
    • setCancellationPolicy

      public void setCancellationPolicy(CancellationPolicy cancellationPolicy)
      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

      public void setCancellationPolicyDetail(CancellationPolicyDetail cancellationPolicyDetail)
      Describes details of the applicable cancellation policy for this subscription. It should not be serialized.
    • setProduct

      public void setProduct(@Nullable Product product)
      The Product of the root SubscriptionItem. Used in the edit flow.
    • setItemChoiceByChoiceKey

      public void setItemChoiceByChoiceKey(Map<String,ItemChoice> itemChoiceByChoiceKey)
      Mapping of add-on choice keys to add-ons. Used in the edit flow.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object