Class TrialOffer

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class TrialOffer extends ApiResource implements HasId
Resource for the TrialOffer API, used to describe a subscription item's trial period settings. Renders a TrialOffer object that describes the price, duration, end_behavior of a trial offer.
  • Constructor Details

    • TrialOffer

      public TrialOffer()
  • Method Details

    • getPrice

      public String getPrice()
      Get ID of expandable price object.
    • setPrice

      public void setPrice(String id)
    • getPriceObject

      public Price getPriceObject()
      Get expanded price.
    • setPriceObject

      public void setPriceObject(Price expandableObject)
    • create

      public static TrialOffer create(Map<String,Object> params) throws StripeException
      Creates a trial offer.
      Throws:
      StripeException
    • create

      public static TrialOffer create(Map<String,Object> params, RequestOptions options) throws StripeException
      Creates a trial offer.
      Throws:
      StripeException
    • create

      public static TrialOffer create(TrialOfferCreateParams params) throws StripeException
      Creates a trial offer.
      Throws:
      StripeException
    • create

      public static TrialOffer create(TrialOfferCreateParams params, RequestOptions options) throws StripeException
      Creates a trial offer.
      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      The new price to use at the end of the trial offer period.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getDuration

      public TrialOffer.Duration getDuration()
    • getEndBehavior

      public TrialOffer.EndBehavior getEndBehavior()
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getName

      public String getName()
      A brief, user-friendly name for the trial offer-for identification purposes.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to product_catalog.trial_offer.

    • setDuration

      public void setDuration(TrialOffer.Duration duration)
    • setEndBehavior

      public void setEndBehavior(TrialOffer.EndBehavior endBehavior)
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setLivemode

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setName

      public void setName(String name)
      A brief, user-friendly name for the trial offer-for identification purposes.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to product_catalog.trial_offer.

    • 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
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId