Package com.stripe.model.entitlements
Class Feature
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.entitlements.Feature
- All Implemented Interfaces:
HasId
,MetadataStore<Feature>
,StripeActiveObject
,StripeObjectInterface
A feature represents a monetizable ability or functionality in your system. Features can be
assigned to products, and when those products are purchased, Stripe will create an entitlement to
the feature for the purchasing customer.
-
Nested Class Summary
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_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static Feature
create
(FeatureCreateParams params) Creates a feature.static Feature
create
(FeatureCreateParams params, RequestOptions options) Creates a feature.static Feature
Creates a feature.static Feature
create
(Map<String, Object> params, RequestOptions options) Creates a feature.boolean
Inactive features cannot be attached to new products and will not be returned from the features list endpoint.getId()
Unique identifier for the object.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.A unique key you provide as your own system identifier.Set of key-value pairs that you can attach to an object.getName()
The feature's name, for your own purpose, not meant to be displayable to the customer.String representing the object's type.int
hashCode()
static FeatureCollection
list
(FeatureListParams params) Retrieve a list of features.static FeatureCollection
list
(FeatureListParams params, RequestOptions options) Retrieve a list of features.static FeatureCollection
Retrieve a list of features.static FeatureCollection
list
(Map<String, Object> params, RequestOptions options) Retrieve a list of features.static Feature
Retrieves a feature.static Feature
retrieve
(String id, RequestOptions options) Retrieves a feature.static Feature
retrieve
(String id, FeatureRetrieveParams params, RequestOptions options) Retrieves a feature.static Feature
Retrieves a feature.void
Inactive features cannot be attached to new products and will not be returned from the features list endpoint.void
Unique identifier for the object.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setLookupKey
(String lookupKey) A unique key you provide as your own system identifier.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
The feature's name, for your own purpose, not meant to be displayable to the customer.void
String representing the object's type.update
(FeatureUpdateParams params) Update a feature’s metadata or permanently deactivate it.update
(FeatureUpdateParams params, RequestOptions options) Update a feature’s metadata or permanently deactivate it.Update a feature’s metadata or permanently deactivate it.update
(Map<String, Object> params, RequestOptions options) Update a feature’s metadata or permanently deactivate it.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setResponseGetter, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
Feature
public Feature()
-
-
Method Details
-
create
Creates a feature.- Throws:
StripeException
-
create
public static Feature create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a feature.- Throws:
StripeException
-
create
Creates a feature.- Throws:
StripeException
-
create
public static Feature create(FeatureCreateParams params, RequestOptions options) throws StripeException Creates a feature.- Throws:
StripeException
-
list
Retrieve a list of features.- Throws:
StripeException
-
list
public static FeatureCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieve a list of features.- Throws:
StripeException
-
list
Retrieve a list of features.- Throws:
StripeException
-
list
public static FeatureCollection list(FeatureListParams params, RequestOptions options) throws StripeException Retrieve a list of features.- Throws:
StripeException
-
retrieve
Retrieves a feature.- Throws:
StripeException
-
retrieve
Retrieves a feature.- Throws:
StripeException
-
retrieve
public static Feature retrieve(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves a feature.- Throws:
StripeException
-
retrieve
public static Feature retrieve(String id, FeatureRetrieveParams params, RequestOptions options) throws StripeException Retrieves a feature.- Throws:
StripeException
-
update
Update a feature’s metadata or permanently deactivate it.- Specified by:
update
in interfaceMetadataStore<Feature>
- Throws:
StripeException
-
update
Update a feature’s metadata or permanently deactivate it.- Specified by:
update
in interfaceMetadataStore<Feature>
- Throws:
StripeException
-
update
Update a feature’s metadata or permanently deactivate it.- Throws:
StripeException
-
update
Update a feature’s metadata or permanently deactivate it.- Throws:
StripeException
-
getActive
Inactive features cannot be attached to new products and will not be returned from the features list endpoint. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getLookupKey
A unique key you provide as your own system identifier. This may be up to 80 characters. -
getName
The feature's name, for your own purpose, not meant to be displayable to the customer. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
entitlements.feature
. -
setActive
Inactive features cannot be attached to new products and will not be returned from the features list endpoint. -
setId
Unique identifier for the object. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setLookupKey
A unique key you provide as your own system identifier. This may be up to 80 characters. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. -
setName
The feature's name, for your own purpose, not meant to be displayable to the customer. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
entitlements.feature
. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
getMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.- Specified by:
getMetadata
in interfaceMetadataStore<Feature>
-