Package com.stripe.model
Class Price
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.Price
- All Implemented Interfaces:
HasId,MetadataStore<Price>,StripeObjectInterface
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic Pricecreate(PriceCreateParams params) Creates a new price for an existing product.static Pricecreate(PriceCreateParams params, RequestOptions options) Creates a new price for an existing product.static PriceCreates a new price for an existing product.static Pricecreate(Map<String, Object> params, RequestOptions options) Creates a new price for an existing product.booleanWhether the price can be used for new purchases.Describes how to compute the price per period.Time at which the object was created.Three-letter ISO currency code, in lowercase.Prices defined in each available currency option.When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.Always true for a deleted object.getId()Unique identifier for the object.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.A lookup key used to retrieve prices dynamically from a static string.Set of key-value pairs that you can attach to an object.A brief description of the price, hidden from customers.String representing the object's type.Get ID of expandableproductobject.Get expandedproduct.The recurring components of a price such asintervalandusage_type.Specifies whether the price is considered inclusive of taxes or exclusive of taxes.getTiers()Each element represents a pricing tier.Defines if the tiering price should begraduatedorvolumebased.Apply a transformation to the reported usage or set quantity before computing the amount billed.getType()One ofone_timeorrecurringdepending on whether the price is for a one-time purchase or a recurring (subscription) purchase.The unit amount in %s to be charged, represented as a whole integer if possible.The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places.inthashCode()static PriceCollectionlist(PriceListParams params) Returns a list of your prices.static PriceCollectionlist(PriceListParams params, RequestOptions options) Returns a list of your prices.static PriceCollectionReturns a list of your prices.static PriceCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of your prices.static PriceRetrieves the price with the given ID.static Priceretrieve(String price, RequestOptions options) Retrieves the price with the given ID.static Priceretrieve(String price, PriceRetrieveParams params, RequestOptions options) Retrieves the price with the given ID.static PriceRetrieves the price with the given ID.static PriceSearchResultsearch(PriceSearchParams params) Search for prices you’ve previously created using Stripe’s Search Query Language.static PriceSearchResultsearch(PriceSearchParams params, RequestOptions options) Search for prices you’ve previously created using Stripe’s Search Query Language.static PriceSearchResultSearch for prices you’ve previously created using Stripe’s Search Query Language.static PriceSearchResultsearch(Map<String, Object> params, RequestOptions options) Search for prices you’ve previously created using Stripe’s Search Query Language.voidWhether the price can be used for new purchases.voidsetBillingScheme(String billingScheme) Describes how to compute the price per period.voidsetCreated(Long created) Time at which the object was created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCurrencyOptions(Map<String, Price.CurrencyOption> currencyOptions) Prices defined in each available currency option.voidsetCustomUnitAmount(Price.CustomUnitAmount customUnitAmount) When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.voidsetDeleted(Boolean deleted) Always true for a deleted object.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.voidsetLookupKey(String lookupKey) A lookup key used to retrieve prices dynamically from a static string.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidsetNickname(String nickname) A brief description of the price, hidden from customers.voidString representing the object's type.voidsetProduct(String id) voidsetProductObject(Product expandableObject) voidsetRecurring(Price.Recurring recurring) The recurring components of a price such asintervalandusage_type.voidsetTaxBehavior(String taxBehavior) Specifies whether the price is considered inclusive of taxes or exclusive of taxes.voidsetTiers(List<Price.Tier> tiers) Each element represents a pricing tier.voidsetTiersMode(String tiersMode) Defines if the tiering price should begraduatedorvolumebased.voidsetTransformQuantity(Price.TransformQuantity transformQuantity) Apply a transformation to the reported usage or set quantity before computing the amount billed.voidOne ofone_timeorrecurringdepending on whether the price is for a one-time purchase or a recurring (subscription) purchase.voidsetUnitAmount(Long unitAmount) The unit amount in %s to be charged, represented as a whole integer if possible.voidsetUnitAmountDecimal(BigDecimal unitAmountDecimal) The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places.update(PriceUpdateParams params) Updates the specified price by setting the values of the parameters passed.update(PriceUpdateParams params, RequestOptions options) Updates the specified price by setting the values of the parameters passed.Updates the specified price by setting the values of the parameters passed.update(Map<String, Object> params, RequestOptions options) Updates the specified price by setting the values of the parameters passed.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, requestSearchResult, requestSearchResult, requestStream, requestStream, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Constructor Details
-
Price
public Price()
-
-
Method Details
-
getProduct
Get ID of expandableproductobject. -
setProduct
-
getProductObject
Get expandedproduct. -
setProductObject
-
search
Search for prices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static PriceSearchResult search(Map<String, Object> params, RequestOptions options) throws StripeExceptionSearch for prices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
Search for prices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static PriceSearchResult search(PriceSearchParams params, RequestOptions options) throws StripeException Search for prices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
list
Returns a list of your prices.- Throws:
StripeException
-
list
public static PriceCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your prices.- Throws:
StripeException
-
list
Returns a list of your prices.- Throws:
StripeException
-
list
public static PriceCollection list(PriceListParams params, RequestOptions options) throws StripeException Returns a list of your prices.- Throws:
StripeException
-
create
Creates a new price for an existing product. The price can be recurring or one-time.- Throws:
StripeException
-
create
public static Price create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a new price for an existing product. The price can be recurring or one-time.- Throws:
StripeException
-
create
Creates a new price for an existing product. The price can be recurring or one-time.- Throws:
StripeException
-
create
Creates a new price for an existing product. The price can be recurring or one-time.- Throws:
StripeException
-
retrieve
Retrieves the price with the given ID.- Throws:
StripeException
-
retrieve
Retrieves the price with the given ID.- Throws:
StripeException
-
retrieve
public static Price retrieve(String price, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the price with the given ID.- Throws:
StripeException
-
retrieve
public static Price retrieve(String price, PriceRetrieveParams params, RequestOptions options) throws StripeException Retrieves the price with the given ID.- Throws:
StripeException
-
update
Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.- Specified by:
updatein interfaceMetadataStore<Price>- Throws:
StripeException
-
update
Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.- Specified by:
updatein interfaceMetadataStore<Price>- Throws:
StripeException
-
update
Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.- Throws:
StripeException
-
update
Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.- Throws:
StripeException
-
getActive
Whether the price can be used for new purchases. -
getBillingScheme
Describes how to compute the price per period. Eitherper_unitortiered.per_unitindicates that the fixed amount (specified inunit_amountorunit_amount_decimal) will be charged per unit inquantity(for prices withusage_type=licensed), or per unit of total usage (for prices withusage_type=metered).tieredindicates that the unit pricing will be computed using a tiering strategy as defined using thetiersandtiers_modeattributes.One of
per_unit, ortiered. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getCurrencyOptions
Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency. -
getCustomUnitAmount
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. -
getDeleted
Always true for a deleted object. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getLookupKey
A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. -
getNickname
A brief description of the price, hidden from customers. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
price. -
getRecurring
The recurring components of a price such asintervalandusage_type. -
getTaxBehavior
Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One ofinclusive,exclusive, orunspecified. Once specified as eitherinclusiveorexclusive, it cannot be changed. -
getTiers
Each element represents a pricing tier. This parameter requiresbilling_schemeto be set totiered. See also the documentation forbilling_scheme. -
getTiersMode
Defines if the tiering price should begraduatedorvolumebased. Involume-based tiering, the maximum quantity within a period determines the per unit price. Ingraduatedtiering, pricing can change as the quantity grows.One of
graduated, orvolume. -
getTransformQuantity
Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined withtiers. -
getType
One ofone_timeorrecurringdepending on whether the price is for a one-time purchase or a recurring (subscription) purchase. -
getUnitAmount
The unit amount in %s to be charged, represented as a whole integer if possible. Only set ifbilling_scheme=per_unit. -
getUnitAmountDecimal
The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set ifbilling_scheme=per_unit. -
setActive
Whether the price can be used for new purchases. -
setBillingScheme
Describes how to compute the price per period. Eitherper_unitortiered.per_unitindicates that the fixed amount (specified inunit_amountorunit_amount_decimal) will be charged per unit inquantity(for prices withusage_type=licensed), or per unit of total usage (for prices withusage_type=metered).tieredindicates that the unit pricing will be computed using a tiering strategy as defined using thetiersandtiers_modeattributes.One of
per_unit, ortiered. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setCurrencyOptions
Prices defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency. -
setCustomUnitAmount
When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. -
setDeleted
Always true for a deleted object. -
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. -
setLookupKey
A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 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. -
setNickname
A brief description of the price, hidden from customers. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
price. -
setRecurring
The recurring components of a price such asintervalandusage_type. -
setTaxBehavior
Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One ofinclusive,exclusive, orunspecified. Once specified as eitherinclusiveorexclusive, it cannot be changed. -
setTiers
Each element represents a pricing tier. This parameter requiresbilling_schemeto be set totiered. See also the documentation forbilling_scheme. -
setTiersMode
Defines if the tiering price should begraduatedorvolumebased. Involume-based tiering, the maximum quantity within a period determines the per unit price. Ingraduatedtiering, pricing can change as the quantity grows.One of
graduated, orvolume. -
setTransformQuantity
Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined withtiers. -
setType
One ofone_timeorrecurringdepending on whether the price is for a one-time purchase or a recurring (subscription) purchase. -
setUnitAmount
The unit amount in %s to be charged, represented as a whole integer if possible. Only set ifbilling_scheme=per_unit. -
setUnitAmountDecimal
The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set ifbilling_scheme=per_unit. -
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<Price>
-