Class SubscriptionCreationRequest
java.lang.Object
com.broadleafcommerce.subscriptionoperation.web.domain.SubscriptionCreationRequest
- All Implemented Interfaces:
Serializable
A request DTO that stores fields necessary for creating a
Subscription and its
items. Adjustments may also be created
with this request- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSubscriptionCreationRequest(String name, String subscriptionStatus, String subscriptionNextStatus, Date nextStatusChangeDate, String nextStatusChangeReason, String userRefType, String userRef, String alternateUserRefType, String alternateUserRef, String subscriptionSource, String subscriptionSourceRef, String secondarySourceType, String secondarySourceRef, String billingFrequency, Integer periodFrequency, String periodType, String paymentStrategy, Date nextBillDate, String preferredPaymentAccountId, String rootItemRefType, String rootItemRef, List<SubscriptionItemCreationRequest> itemCreationRequests, List<SubscriptionAdjustment> subscriptionAdjustments, javax.money.CurrencyUnit currency, boolean needGrantEntitlements, boolean autoRenewalEnabled, Instant endOfTermDate, Integer termDurationLength, String termDurationType, Map<String, Object> additionalAttributes) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanMiscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscription.Alternate reference to the user.Type of the alternative user referenceDeprecated.in favor ofperiodType&periodFrequencyjavax.money.CurrencyUnitCurrency of this subscriptionThe end of term date for this subscription.getName()Name of this subscriptionNext date this subscription will be billedDate when the next status should beginReason for the update to the next statusDeclares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period.The frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.The period type for the price, e.g.References an identifier of a BillingServices PaymentAccount that is considered preferred for this subscription.Reference to the item id for which this subscription was provisionType of the item for which this subscription was provisionedThe secondary source to reference, e.g, an Order Item on an Order.The type of the secondary source to reference, e.g, an Order Item on an Order.Adjustments for this subscription.Next status for this subscriptionThis field shows from which process or user action this subscription originated.This field shows the identifier of the process or user action this subscription originated.Current status of this subscriptionThe length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.The term duration type, e.g.Reference to the user to whom this subscription belongsType of user owning this subscriptioninthashCode()booleanWhether this subscription automatically renews at the end of the current subscription term.booleanWhether the system has outstanding entitlements to grant for this subscriptionvoidsetAdditionalAttributes(Map<String, Object> additionalAttributes) Miscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscription.voidsetAlternateUserRef(String alternateUserRef) Alternate reference to the user.voidsetAlternateUserRefType(String alternateUserRefType) Type of the alternative user referencevoidsetAutoRenewalEnabled(boolean autoRenewalEnabled) Whether this subscription automatically renews at the end of the current subscription term.voidsetBillingFrequency(String billingFrequency) Deprecated.in favor ofperiodType&periodFrequencyvoidsetCurrency(javax.money.CurrencyUnit currency) Currency of this subscriptionvoidsetEndOfTermDate(Instant endOfTermDate) The end of term date for this subscription.voidsetItemCreationRequests(List<SubscriptionItemCreationRequest> itemCreationRequests) voidName of this subscriptionvoidsetNeedGrantEntitlements(boolean needGrantEntitlements) Whether the system has outstanding entitlements to grant for this subscriptionvoidsetNextBillDate(Date nextBillDate) Next date this subscription will be billedvoidsetNextStatusChangeDate(Date nextStatusChangeDate) Date when the next status should beginvoidsetNextStatusChangeReason(String nextStatusChangeReason) Reason for the update to the next statusvoidsetPaymentStrategy(String paymentStrategy) Declares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period.voidsetPeriodFrequency(Integer periodFrequency) The frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.voidsetPeriodType(String periodType) The period type for the price, e.g.voidsetPreferredPaymentAccountId(String preferredPaymentAccountId) References an identifier of a BillingServices PaymentAccount that is considered preferred for this subscription.voidsetRootItemRef(String rootItemRef) Reference to the item id for which this subscription was provisionvoidsetRootItemRefType(String rootItemRefType) Type of the item for which this subscription was provisionedvoidsetSecondarySourceRef(String secondarySourceRef) The secondary source to reference, e.g, an Order Item on an Order.voidsetSecondarySourceType(String secondarySourceType) The type of the secondary source to reference, e.g, an Order Item on an Order.voidsetSubscriptionAdjustments(List<SubscriptionAdjustment> subscriptionAdjustments) Adjustments for this subscription.voidsetSubscriptionNextStatus(String subscriptionNextStatus) Next status for this subscriptionvoidsetSubscriptionSource(String subscriptionSource) This field shows from which process or user action this subscription originated.voidsetSubscriptionSourceRef(String subscriptionSourceRef) This field shows the identifier of the process or user action this subscription originated.voidsetSubscriptionStatus(String subscriptionStatus) Current status of this subscriptionvoidsetTermDurationLength(Integer termDurationLength) The length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.voidsetTermDurationType(String termDurationType) The term duration type, e.g.voidsetUserRef(String userRef) Reference to the user to whom this subscription belongsvoidsetUserRefType(String userRefType) Type of user owning this subscriptiontoString()
-
Constructor Details
-
SubscriptionCreationRequest
public SubscriptionCreationRequest(String name, String subscriptionStatus, String subscriptionNextStatus, Date nextStatusChangeDate, String nextStatusChangeReason, String userRefType, String userRef, String alternateUserRefType, String alternateUserRef, String subscriptionSource, String subscriptionSourceRef, String secondarySourceType, String secondarySourceRef, String billingFrequency, Integer periodFrequency, String periodType, String paymentStrategy, Date nextBillDate, String preferredPaymentAccountId, String rootItemRefType, String rootItemRef, List<SubscriptionItemCreationRequest> itemCreationRequests, List<SubscriptionAdjustment> subscriptionAdjustments, javax.money.CurrencyUnit currency, boolean needGrantEntitlements, boolean autoRenewalEnabled, Instant endOfTermDate, Integer termDurationLength, String termDurationType, Map<String, Object> additionalAttributes) Deprecated.in favor ofperiodType&periodFrequencyCreates a newSubscriptionCreationRequestinstance.- Parameters:
name- Name of this subscriptionsubscriptionStatus- Current status of this subscriptionsubscriptionNextStatus- Next status for this subscriptionnextStatusChangeDate- Date when the next status should beginnextStatusChangeReason- Reason for the update to the next statususerRefType- Type of user owning this subscriptionuserRef- Reference to the user to whom this subscription belongsalternateUserRefType- Type of the alternative user referencealternateUserRef- Alternate reference to the user. Useful for third-party authentication system identifierssubscriptionSource- This field shows from which process or user action this subscription originated.subscriptionSourceRef- This field shows the identifier of the process or user action this subscription originated.secondarySourceType- The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.secondarySourceRef- The secondary source to reference, e.g, an Order Item on an Order. Optional.billingFrequency- Frequency of billing for this subscriptionperiodFrequency- The frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.periodType- The period type for the price, e.g. MONTHLY, QUARTERLY, ANNUALLYpaymentStrategy- Declares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period.nextBillDate- Next date this subscription will be billedpreferredPaymentAccountId- References an identifier of a BillingServices PaymentAccount that is considered preferred for this subscription.rootItemRefType- Type of the item for which this subscription was provisionedrootItemRef- Reference to the item id for which this subscription was provisionitemCreationRequests-subscriptionAdjustments- Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the objectcurrency- Currency of this subscriptionneedGrantEntitlements- Whether the system has outstanding entitlements to grant for this subscriptionautoRenewalEnabled- Whether this subscription automatically renews at the end of the current subscription term.endOfTermDate- The end of term date for this subscription.termDurationLength- The length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.termDurationType- The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.additionalAttributes- Miscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscription.- See Also:
-
SubscriptionStatusesSubscriptionStatusessubscriptionNextStatussubscriptionNextStatusDefaultUserRefTypesDefaultUserRefTypessubscriptionSourceRefDefaultSubscriptionSourceTypesubscriptionSourcesecondarySourceRefDefaultSubscriptionSourceTypesecondarySourceTypeperiodTypeperiodFrequencytermDurationTypetermDurationLength
-
SubscriptionCreationRequest
public SubscriptionCreationRequest()
-
-
Method Details
-
getName
Name of this subscription -
getSubscriptionStatus
Current status of this subscription- See Also:
-
getSubscriptionNextStatus
Next status for this subscription- See Also:
-
getNextStatusChangeDate
Date when the next status should begin- See Also:
-
subscriptionNextStatus
-
getNextStatusChangeReason
Reason for the update to the next status- See Also:
-
subscriptionNextStatus
-
getUserRefType
Type of user owning this subscription- See Also:
-
getUserRef
Reference to the user to whom this subscription belongs -
getAlternateUserRefType
Type of the alternative user reference- See Also:
-
getAlternateUserRef
Alternate reference to the user. Useful for third-party authentication system identifiers -
getSubscriptionSource
This field shows from which process or user action this subscription originated.- See Also:
-
subscriptionSourceRefDefaultSubscriptionSourceType
-
getSubscriptionSourceRef
This field shows the identifier of the process or user action this subscription originated.- See Also:
-
subscriptionSource
-
getSecondarySourceType
The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceRefDefaultSubscriptionSourceType
-
getSecondarySourceRef
The secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceType
-
getBillingFrequency
Deprecated.in favor ofperiodType&periodFrequencyFrequency of billing for this subscription -
getPeriodFrequency
The frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.- See Also:
-
periodType
-
getPeriodType
The period type for the price, e.g. MONTHLY, QUARTERLY, ANNUALLY- See Also:
-
periodFrequency
-
getPaymentStrategy
Declares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period. -
getNextBillDate
Next date this subscription will be billed -
getPreferredPaymentAccountId
References an identifier of a BillingServices PaymentAccount that is considered preferred for this subscription. -
getRootItemRefType
Type of the item for which this subscription was provisioned -
getRootItemRef
Reference to the item id for which this subscription was provision -
getItemCreationRequests
-
getSubscriptionAdjustments
Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the object -
getCurrency
public javax.money.CurrencyUnit getCurrency()Currency of this subscription -
isNeedGrantEntitlements
public boolean isNeedGrantEntitlements()Whether the system has outstanding entitlements to grant for this subscription -
isAutoRenewalEnabled
public boolean isAutoRenewalEnabled()Whether this subscription automatically renews at the end of the current subscription term. -
getEndOfTermDate
The end of term date for this subscription. -
getTermDurationLength
The length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.- See Also:
-
termDurationType
-
getTermDurationType
The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.- See Also:
-
termDurationLength
-
getAdditionalAttributes
Miscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscription. -
setName
Name of this subscription -
setSubscriptionStatus
Current status of this subscription- See Also:
-
setSubscriptionNextStatus
Next status for this subscription- See Also:
-
setNextStatusChangeDate
Date when the next status should begin- See Also:
-
subscriptionNextStatus
-
setNextStatusChangeReason
Reason for the update to the next status- See Also:
-
subscriptionNextStatus
-
setUserRefType
Type of user owning this subscription- See Also:
-
setUserRef
Reference to the user to whom this subscription belongs -
setAlternateUserRefType
Type of the alternative user reference- See Also:
-
setAlternateUserRef
Alternate reference to the user. Useful for third-party authentication system identifiers -
setSubscriptionSource
This field shows from which process or user action this subscription originated.- See Also:
-
subscriptionSourceRefDefaultSubscriptionSourceType
-
setSubscriptionSourceRef
This field shows the identifier of the process or user action this subscription originated.- See Also:
-
subscriptionSource
-
setSecondarySourceType
The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceRefDefaultSubscriptionSourceType
-
setSecondarySourceRef
The secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceType
-
setBillingFrequency
Deprecated.in favor ofperiodType&periodFrequencyFrequency of billing for this subscription -
setPeriodFrequency
The frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.- See Also:
-
periodType
-
setPeriodType
The period type for the price, e.g. MONTHLY, QUARTERLY, ANNUALLY- See Also:
-
periodFrequency
-
setPaymentStrategy
Declares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period. -
setNextBillDate
Next date this subscription will be billed -
setPreferredPaymentAccountId
References an identifier of a BillingServices PaymentAccount that is considered preferred for this subscription. -
setRootItemRefType
Type of the item for which this subscription was provisioned -
setRootItemRef
Reference to the item id for which this subscription was provision -
setItemCreationRequests
-
setSubscriptionAdjustments
Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the object -
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) Currency of this subscription -
setNeedGrantEntitlements
public void setNeedGrantEntitlements(boolean needGrantEntitlements) Whether the system has outstanding entitlements to grant for this subscription -
setAutoRenewalEnabled
public void setAutoRenewalEnabled(boolean autoRenewalEnabled) Whether this subscription automatically renews at the end of the current subscription term. -
setEndOfTermDate
The end of term date for this subscription. -
setTermDurationLength
The length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.- See Also:
-
termDurationType
-
setTermDurationType
The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.- See Also:
-
termDurationLength
-
setAdditionalAttributes
Miscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscription. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
periodType&periodFrequency