Class SubscriptionBuilder


  • public class SubscriptionBuilder
    extends Object
    • Constructor Detail

      • SubscriptionBuilder

        public SubscriptionBuilder()
        Default constructor to initialize the instance
    • Method Detail

      • subscriptionId

        public SubscriptionBuilder subscriptionId​(String subscriptionId)
        Subscription Id
        Parameters:
        subscriptionId - the field to set
        Returns:
        itself
      • companyId

        public SubscriptionBuilder companyId​(String companyId)
        User's company_id string
        Parameters:
        companyId - the field to set
        Returns:
        itself
      • currentPeriodStart

        public SubscriptionBuilder currentPeriodStart​(Date currentPeriodStart)
        Start date of the current subscription period
        Parameters:
        currentPeriodStart - the field to set
        Returns:
        itself
      • currentPeriodEnd

        public SubscriptionBuilder currentPeriodEnd​(Date currentPeriodEnd)
        End date of the current subscription period
        Parameters:
        currentPeriodEnd - the field to set
        Returns:
        itself
      • status

        public SubscriptionBuilder status​(String status)
        Subscription status
        Parameters:
        status - the field to set
        Returns:
        itself
      • metadata

        public SubscriptionBuilder metadata​(Object metadata)
        Custom user metadata as a JSON object
        Parameters:
        metadata - the field to set
        Returns:
        itself
      • build

        public SubscriptionModel build()
        Build the instance with the given values
        Returns:
        The built UserModel