Class Subscription<T>

java.lang.Object
com.broadleafcommerce.paymentgateway.domain.Subscription<T>

public class Subscription<T> extends Object
Author:
Chad Harchar (charchar) Many payment solutions allow you to set up subscriptions (recurring payments) with payment transactions. The following DTO represent the usual parameters that you may wish to pass: recurringAmount: the amount that you charge for every recurring payment frequency: the frequency of the recurring payment numberOfInstallments: the number of payments for this subscription startDate: the start date for this subscription
  • Field Details

    • parent

      protected T parent
    • recurringAmount

      protected javax.money.MonetaryAmount recurringAmount
      The amount that must be paid for each billing cycle
    • frequency

      protected String frequency
      How often the customer will be charged
    • numberOfInstallments

      protected String numberOfInstallments
      The number of times that the customer will be charged
    • startDate

      protected Instant startDate
      Start of when this subscription should be active. Unset indicates that this should always be active.
    • additionalFields

      protected Map<String,Object> additionalFields
      Any extra properties needed to define the subscription
  • Constructor Details

    • Subscription

      public Subscription()
    • Subscription

      public Subscription(T parent)
  • Method Details

    • done

      public T done()
    • additionalFields

      public Subscription<T> additionalFields(String key, Object value)
    • recurringAmount

      public Subscription<T> recurringAmount(javax.money.MonetaryAmount recurringAmount)
    • frequency

      public Subscription<T> frequency(String frequency)
    • numberOfInstallments

      public Subscription<T> numberOfInstallments(String numberOfInstallments)
    • startDate

      public Subscription<T> startDate(Instant startDate)
    • subscriptionPopulated

      public boolean subscriptionPopulated()
    • getParent

      public T getParent()
    • getRecurringAmount

      public javax.money.MonetaryAmount getRecurringAmount()
      The amount that must be paid for each billing cycle
      Returns:
      the amount that must be paid for each billing cycle
    • getFrequency

      public String getFrequency()
      How often the customer will be charged
      Returns:
      how often the customer will be charged
    • getNumberOfInstallments

      public String getNumberOfInstallments()
      The number of times that the customer will be charged
      Returns:
      the number of times that the customer will be charged
    • getStartDate

      public Instant getStartDate()
      Start of when this subscription should be active. Unset indicates that this should always be active.
      Returns:
      the date when this subscription should start being active
    • getAdditionalFields

      public Map<String,Object> getAdditionalFields()
      Any extra properties needed to define the subscription
      Returns:
      any extra properties needed to define the subscription