Package com.stripe.model.productcatalog
Class TrialOffer
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.productcatalog.TrialOffer
- All Implemented Interfaces:
HasId,StripeActiveObject,StripeObjectInterface
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about Duration, please refer to the API Reference.static classFor more details about EndBehavior, please refer to the API Reference.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic TrialOffercreate(TrialOfferCreateParams params) Creates a trial offer.static TrialOffercreate(TrialOfferCreateParams params, RequestOptions options) Creates a trial offer.static TrialOfferCreates a trial offer.static TrialOffercreate(Map<String, Object> params, RequestOptions options) Creates a trial offer.booleangetId()Unique identifier for the object.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.String representing the object's type.getPrice()Get ID of expandablepriceobject.Get expandedprice.inthashCode()voidsetDuration(TrialOffer.Duration duration) voidsetEndBehavior(TrialOffer.EndBehavior endBehavior) voidUnique identifier for the object.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidString representing the object's type.voidvoidsetPriceObject(Price expandableObject) voidsetResponseGetter(StripeResponseGetter responseGetter) The new price to use at the end of the trial offer period.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
TrialOffer
public TrialOffer()
-
-
Method Details
-
getPrice
Get ID of expandablepriceobject. -
setPrice
-
getPriceObject
Get expandedprice. -
setPriceObject
-
create
Creates a trial offer.- Throws:
StripeException
-
create
public static TrialOffer create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a trial offer.- Throws:
StripeException
-
create
Creates a trial offer.- Throws:
StripeException
-
create
public static TrialOffer create(TrialOfferCreateParams params, RequestOptions options) throws StripeException Creates a trial offer.- Throws:
StripeException
-
setResponseGetter
The new price to use at the end of the trial offer period.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getDuration
-
getEndBehavior
-
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
product_catalog.trial_offer. -
setDuration
-
setEndBehavior
-
setId
Unique identifier for the object. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
product_catalog.trial_offer. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object.
-