public class SubscriptionItem extends ApiResource implements HasId, MetadataStore<SubscriptionItem>
| Modifier and Type | Class and Description |
|---|---|
static class |
SubscriptionItem.BillingThresholds |
ApiResource.RequestMethodCHARSET, GSONPRETTY_PRINT_GSON| Constructor and Description |
|---|
SubscriptionItem() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
static SubscriptionItem |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Adds a new item to an existing subscription.
|
static SubscriptionItem |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Adds a new item to an existing subscription.
|
static SubscriptionItem |
create(SubscriptionItemCreateParams params)
Adds a new item to an existing subscription.
|
static SubscriptionItem |
create(SubscriptionItemCreateParams params,
RequestOptions options)
Adds a new item to an existing subscription.
|
SubscriptionItem |
delete()
Deletes an item from the subscription.
|
SubscriptionItem |
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Deletes an item from the subscription.
|
SubscriptionItem |
delete(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Deletes an item from the subscription.
|
SubscriptionItem |
delete(RequestOptions options)
Deletes an item from the subscription.
|
SubscriptionItem |
delete(SubscriptionItemDeleteParams params)
Deletes an item from the subscription.
|
SubscriptionItem |
delete(SubscriptionItemDeleteParams params,
RequestOptions options)
Deletes an item from the subscription.
|
boolean |
equals(java.lang.Object o) |
SubscriptionItem.BillingThresholds |
getBillingThresholds()
Define thresholds at which an invoice will be sent, and the related subscription advanced to a
new billing period.
|
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.Boolean |
getDeleted()
Always true for a deleted object.
|
java.lang.String |
getId()
Unique identifier for the object.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Set of key-value pairs that you can attach
to an object.
|
java.lang.String |
getObject()
String representing the object's type.
|
Plan |
getPlan()
You can now model subscriptions more flexibly using the Prices API.
|
Price |
getPrice()
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and
one-time purchases of products.
|
java.lang.Long |
getQuantity()
The quantity of the plan to
which the customer should be subscribed.
|
java.lang.String |
getSubscription()
The
subscription this subscription_item belongs to. |
java.util.List<TaxRate> |
getTaxRates()
The tax rates which apply to this
subscription_item. |
int |
hashCode() |
static SubscriptionItemCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your subscription items for a given subscription.
|
static SubscriptionItemCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of your subscription items for a given subscription.
|
static SubscriptionItemCollection |
list(SubscriptionItemListParams params)
Returns a list of your subscription items for a given subscription.
|
static SubscriptionItemCollection |
list(SubscriptionItemListParams params,
RequestOptions options)
Returns a list of your subscription items for a given subscription.
|
static SubscriptionItem |
retrieve(java.lang.String item)
Retrieves the subscription item with the given ID.
|
static SubscriptionItem |
retrieve(java.lang.String item,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the subscription item with the given ID.
|
static SubscriptionItem |
retrieve(java.lang.String item,
RequestOptions options)
Retrieves the subscription item with the given ID.
|
static SubscriptionItem |
retrieve(java.lang.String item,
SubscriptionItemRetrieveParams params,
RequestOptions options)
Retrieves the subscription item with the given ID.
|
void |
setBillingThresholds(SubscriptionItem.BillingThresholds billingThresholds)
Define thresholds at which an invoice will be sent, and the related subscription advanced to a
new billing period.
|
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.
|
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach
to an object.
|
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setPlan(Plan plan)
You can now model subscriptions more flexibly using the Prices API.
|
void |
setPrice(Price price)
Prices define the unit cost, currency, and (optional) billing cycle for both recurring and
one-time purchases of products.
|
void |
setQuantity(java.lang.Long quantity)
The quantity of the plan to
which the customer should be subscribed.
|
void |
setSubscription(java.lang.String subscription)
The
subscription this subscription_item belongs to. |
void |
setTaxRates(java.util.List<TaxRate> taxRates)
The tax rates which apply to this
subscription_item. |
SubscriptionItem |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the plan or quantity of an item on a current subscription.
|
SubscriptionItem |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates the plan or quantity of an item on a current subscription.
|
SubscriptionItem |
update(SubscriptionItemUpdateParams params)
Updates the plan or quantity of an item on a current subscription.
|
SubscriptionItem |
update(SubscriptionItemUpdateParams params,
RequestOptions options)
Updates the plan or quantity of an item on a current subscription.
|
UsageRecordSummaryCollection |
usageRecordSummaries()
For the specified subscription item, returns a list of summary objects.
|
UsageRecordSummaryCollection |
usageRecordSummaries(java.util.Map<java.lang.String,java.lang.Object> params)
For the specified subscription item, returns a list of summary objects.
|
UsageRecordSummaryCollection |
usageRecordSummaries(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
For the specified subscription item, returns a list of summary objects.
|
UsageRecordSummaryCollection |
usageRecordSummaries(SubscriptionItemUsageRecordSummariesParams params)
For the specified subscription item, returns a list of summary objects.
|
UsageRecordSummaryCollection |
usageRecordSummaries(SubscriptionItemUsageRecordSummariesParams params,
RequestOptions options)
For the specified subscription item, returns a list of summary objects.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeIdequals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringpublic static SubscriptionItemCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static SubscriptionItemCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static SubscriptionItemCollection list(SubscriptionItemListParams params) throws StripeException
StripeExceptionpublic static SubscriptionItemCollection list(SubscriptionItemListParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static SubscriptionItem retrieve(java.lang.String item) throws StripeException
StripeExceptionpublic static SubscriptionItem retrieve(java.lang.String item, RequestOptions options) throws StripeException
StripeExceptionpublic static SubscriptionItem retrieve(java.lang.String item, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static SubscriptionItem retrieve(java.lang.String item, SubscriptionItemRetrieveParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static SubscriptionItem create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static SubscriptionItem create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static SubscriptionItem create(SubscriptionItemCreateParams params) throws StripeException
StripeExceptionpublic static SubscriptionItem create(SubscriptionItemCreateParams params, RequestOptions options) throws StripeException
StripeExceptionpublic SubscriptionItem update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update in interface MetadataStore<SubscriptionItem>StripeExceptionpublic SubscriptionItem update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update in interface MetadataStore<SubscriptionItem>StripeExceptionpublic SubscriptionItem update(SubscriptionItemUpdateParams params) throws StripeException
StripeExceptionpublic SubscriptionItem update(SubscriptionItemUpdateParams params, RequestOptions options) throws StripeException
StripeExceptionpublic SubscriptionItem delete() throws StripeException
StripeExceptionpublic SubscriptionItem delete(RequestOptions options) throws StripeException
StripeExceptionpublic SubscriptionItem delete(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic SubscriptionItem delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic SubscriptionItem delete(SubscriptionItemDeleteParams params) throws StripeException
StripeExceptionpublic SubscriptionItem delete(SubscriptionItemDeleteParams params, RequestOptions options) throws StripeException
StripeExceptionpublic UsageRecordSummaryCollection usageRecordSummaries() throws StripeException
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.
StripeExceptionpublic UsageRecordSummaryCollection usageRecordSummaries(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.
StripeExceptionpublic UsageRecordSummaryCollection usageRecordSummaries(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.
StripeExceptionpublic UsageRecordSummaryCollection usageRecordSummaries(SubscriptionItemUsageRecordSummariesParams params) throws StripeException
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.
StripeExceptionpublic UsageRecordSummaryCollection usageRecordSummaries(SubscriptionItemUsageRecordSummariesParams params, RequestOptions options) throws StripeException
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.
StripeExceptionpublic SubscriptionItem.BillingThresholds getBillingThresholds()
public java.lang.Long getCreated()
public java.lang.Boolean getDeleted()
public java.lang.String getObject()
Equal to subscription_item.
public Plan getPlan()
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.
public Price getPrice()
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.
public java.lang.Long getQuantity()
public java.lang.String getSubscription()
subscription this subscription_item belongs to.public java.util.List<TaxRate> getTaxRates()
subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item.public void setBillingThresholds(SubscriptionItem.BillingThresholds billingThresholds)
public void setCreated(java.lang.Long created)
public void setDeleted(java.lang.Boolean deleted)
public void setId(java.lang.String id)
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setObject(java.lang.String object)
Equal to subscription_item.
public void setPlan(Plan plan)
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.
public void setPrice(Price price)
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.
public void setQuantity(java.lang.Long quantity)
public void setSubscription(java.lang.String subscription)
subscription this subscription_item belongs to.public void setTaxRates(java.util.List<TaxRate> taxRates)
subscription_item. When set, the default_tax_rates on the subscription do not apply to this subscription_item.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata in interface MetadataStore<SubscriptionItem>