Class SubscriptionItem
- All Implemented Interfaces:
HasId,MetadataStore<SubscriptionItem>,StripeActiveObject,StripeObjectInterface
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about BillingThresholds, please refer to the API Reference.static classFor more details about Trial, 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 SubscriptionItemcreate(SubscriptionItemCreateParams params) Adds a new item to an existing subscription.static SubscriptionItemcreate(SubscriptionItemCreateParams params, RequestOptions options) Adds a new item to an existing subscription.static SubscriptionItemAdds a new item to an existing subscription.static SubscriptionItemcreate(Map<String, Object> params, RequestOptions options) Adds a new item to an existing subscription.delete()Deletes an item from the subscription.delete(RequestOptions options) Deletes an item from the subscription.delete(SubscriptionItemDeleteParams params) Deletes an item from the subscription.delete(SubscriptionItemDeleteParams params, RequestOptions options) Deletes an item from the subscription.Deletes an item from the subscription.delete(Map<String, Object> params, RequestOptions options) Deletes an item from the subscription.booleanThe time period the subscription item has been billed for.Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period.Time at which the object was created.The end time of this subscription item's current billing period.The start time of this subscription item's current billing period.Always true for a deleted object.Get expandeddiscounts.Get IDs of expandablediscountsobject list.getId()Unique identifier for the object.Set of key-value pairs that you can attach to an object.String representing the object's type.getPlan()You can now model subscriptions more flexibly using the Prices API.getPrice()Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.The quantity of the plan to which the customer should be subscribed.Thesubscriptionthissubscription_itembelongs to.The tax rates which apply to thissubscription_item.getTrial()Options that configure the trial on the subscription item.inthashCode()static SubscriptionItemCollectionlist(SubscriptionItemListParams params) Returns a list of your subscription items for a given subscription.static SubscriptionItemCollectionlist(SubscriptionItemListParams params, RequestOptions options) Returns a list of your subscription items for a given subscription.static SubscriptionItemCollectionReturns a list of your subscription items for a given subscription.static SubscriptionItemCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of your subscription items for a given subscription.static SubscriptionItemRetrieves the subscription item with the given ID.static SubscriptionItemretrieve(String item, RequestOptions options) Retrieves the subscription item with the given ID.static SubscriptionItemretrieve(String item, SubscriptionItemRetrieveParams params, RequestOptions options) Retrieves the subscription item with the given ID.static SubscriptionItemRetrieves the subscription item with the given ID.voidsetBilledUntil(Long billedUntil) The time period the subscription item has been billed for.voidsetBillingThresholds(SubscriptionItem.BillingThresholds billingThresholds) Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period.voidsetCreated(Long created) Time at which the object was created.voidsetCurrentPeriodEnd(Long currentPeriodEnd) The end time of this subscription item's current billing period.voidsetCurrentPeriodStart(Long currentPeriodStart) The start time of this subscription item's current billing period.voidsetDeleted(Boolean deleted) Always true for a deleted object.voidsetDiscountObjects(List<Discount> objs) voidsetDiscounts(List<String> ids) voidUnique identifier for the object.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidString representing the object's type.voidYou can now model subscriptions more flexibly using the Prices API.voidPrices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.voidsetQuantity(Long quantity) The quantity of the plan to which the customer should be subscribed.voidsetResponseGetter(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.voidsetSubscription(String subscription) Thesubscriptionthissubscription_itembelongs to.voidsetTaxRates(List<TaxRate> taxRates) The tax rates which apply to thissubscription_item.voidsetTrial(SubscriptionItem.Trial trial) Options that configure the trial on the subscription item.update(SubscriptionItemUpdateParams params) Updates the plan or quantity of an item on a current subscription.update(SubscriptionItemUpdateParams params, RequestOptions options) Updates the plan or quantity of an item on a current subscription.Updates the plan or quantity of an item on a current subscription.update(Map<String, Object> params, RequestOptions options) Updates the plan or quantity of an item on a current subscription.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
-
SubscriptionItem
public SubscriptionItem()
-
-
Method Details
-
getDiscounts
Get IDs of expandablediscountsobject list. -
setDiscounts
-
getDiscountObjects
Get expandeddiscounts. -
setDiscountObjects
-
create
Adds a new item to an existing subscription. No existing items will be changed or replaced.- Throws:
StripeException
-
create
public static SubscriptionItem create(Map<String, Object> params, RequestOptions options) throws StripeExceptionAdds a new item to an existing subscription. No existing items will be changed or replaced.- Throws:
StripeException
-
create
Adds a new item to an existing subscription. No existing items will be changed or replaced.- Throws:
StripeException
-
create
public static SubscriptionItem create(SubscriptionItemCreateParams params, RequestOptions options) throws StripeException Adds a new item to an existing subscription. No existing items will be changed or replaced.- Throws:
StripeException
-
delete
Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.- Throws:
StripeException
-
delete
Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.- Throws:
StripeException
-
delete
Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.- Throws:
StripeException
-
delete
public SubscriptionItem delete(Map<String, Object> params, RequestOptions options) throws StripeExceptionDeletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.- Throws:
StripeException
-
delete
Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.- Throws:
StripeException
-
delete
public SubscriptionItem delete(SubscriptionItemDeleteParams params, RequestOptions options) throws StripeException Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.- Throws:
StripeException
-
list
Returns a list of your subscription items for a given subscription.- Throws:
StripeException
-
list
public static SubscriptionItemCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your subscription items for a given subscription.- Throws:
StripeException
-
list
public static SubscriptionItemCollection list(SubscriptionItemListParams params) throws StripeException Returns a list of your subscription items for a given subscription.- Throws:
StripeException
-
list
public static SubscriptionItemCollection list(SubscriptionItemListParams params, RequestOptions options) throws StripeException Returns a list of your subscription items for a given subscription.- Throws:
StripeException
-
retrieve
Retrieves the subscription item with the given ID.- Throws:
StripeException
-
retrieve
Retrieves the subscription item with the given ID.- Throws:
StripeException
-
retrieve
public static SubscriptionItem retrieve(String item, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the subscription item with the given ID.- Throws:
StripeException
-
retrieve
public static SubscriptionItem retrieve(String item, SubscriptionItemRetrieveParams params, RequestOptions options) throws StripeException Retrieves the subscription item with the given ID.- Throws:
StripeException
-
update
Updates the plan or quantity of an item on a current subscription.- Specified by:
updatein interfaceMetadataStore<SubscriptionItem>- Throws:
StripeException
-
update
public SubscriptionItem update(Map<String, Object> params, RequestOptions options) throws StripeExceptionUpdates the plan or quantity of an item on a current subscription.- Specified by:
updatein interfaceMetadataStore<SubscriptionItem>- Throws:
StripeException
-
update
Updates the plan or quantity of an item on a current subscription.- Throws:
StripeException
-
update
public SubscriptionItem update(SubscriptionItemUpdateParams params, RequestOptions options) throws StripeException Updates the plan or quantity of an item on a current subscription.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getBilledUntil
The time period the subscription item has been billed for. -
getBillingThresholds
Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrentPeriodEnd
The end time of this subscription item's current billing period. -
getCurrentPeriodStart
The start time of this subscription item's current billing period. -
getDeleted
Always true for a deleted object. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
subscription_item. -
getPlan
You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
Related guides: Set up a subscription and more about products and prices.
-
getPrice
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
Related guides: Set up a subscription, create an invoice, and more about products and prices.
-
getQuantity
The quantity of the plan to which the customer should be subscribed. -
getSubscription
Thesubscriptionthissubscription_itembelongs to. -
getTaxRates
The tax rates which apply to thissubscription_item. When set, thedefault_tax_rateson the subscription do not apply to thissubscription_item. -
getTrial
Options that configure the trial on the subscription item. -
setBilledUntil
The time period the subscription item has been billed for. -
setBillingThresholds
Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrentPeriodEnd
The end time of this subscription item's current billing period. -
setCurrentPeriodStart
The start time of this subscription item's current billing period. -
setDeleted
Always true for a deleted object. -
setId
Unique identifier for the object. -
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. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
subscription_item. -
setPlan
You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
Related guides: Set up a subscription and more about products and prices.
-
setPrice
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
Related guides: Set up a subscription, create an invoice, and more about products and prices.
-
setQuantity
The quantity of the plan to which the customer should be subscribed. -
setSubscription
Thesubscriptionthissubscription_itembelongs to. -
setTaxRates
The tax rates which apply to thissubscription_item. When set, thedefault_tax_rateson the subscription do not apply to thissubscription_item. -
setTrial
Options that configure the trial on the subscription item. -
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:
getMetadatain interfaceMetadataStore<SubscriptionItem>
-