Class Price

    • Constructor Detail

      • Price

        public Price()
    • Method Detail

      • getProduct

        public java.lang.String getProduct()
        Get ID of expandable product object.
      • setProduct

        public void setProduct​(java.lang.String id)
      • getProductObject

        public Product getProductObject()
        Get expanded product.
      • setProductObject

        public void setProductObject​(Product expandableObject)
      • create

        public static Price create​(java.util.Map<java.lang.String,​java.lang.Object> params)
                            throws StripeException
        Creates a new price for an existing product. The price can be recurring or one-time.
        Throws:
        StripeException
      • create

        public static Price create​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                   RequestOptions options)
                            throws StripeException
        Creates a new price for an existing product. The price can be recurring or one-time.
        Throws:
        StripeException
      • update

        public Price update​(java.util.Map<java.lang.String,​java.lang.Object> params)
                     throws StripeException
        Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.
        Specified by:
        update in interface MetadataStore<Price>
        Throws:
        StripeException
      • getActive

        public java.lang.Boolean getActive()
        Whether the price can be used for new purchases.
      • getBillingScheme

        public java.lang.String getBillingScheme()
        Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.

        One of per_unit, or tiered.

      • getCreated

        public java.lang.Long getCreated()
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • getDeleted

        public java.lang.Boolean getDeleted()
        Always true for a deleted object.
      • getLivemode

        public java.lang.Boolean getLivemode()
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • getLookupKey

        public java.lang.String getLookupKey()
        A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
      • getNickname

        public java.lang.String getNickname()
        A brief description of the price, hidden from customers.
      • getObject

        public java.lang.String getObject()
        String representing the object's type. Objects of the same type share the same value.

        Equal to price.

      • getRecurring

        public Price.Recurring getRecurring()
        The recurring components of a price such as interval and usage_type.
      • getTaxBehavior

        public java.lang.String getTaxBehavior()
        Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.
      • getTiers

        public java.util.List<Price.Tier> getTiers()
        Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.
      • getTiersMode

        public java.lang.String getTiersMode()
        Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.

        One of graduated, or volume.

      • getTransformQuantity

        public Price.TransformQuantity getTransformQuantity()
        Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers.
      • getType

        public java.lang.String getType()
        One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
      • getUnitAmount

        public java.lang.Long getUnitAmount()
        The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
      • getUnitAmountDecimal

        public java.math.BigDecimal getUnitAmountDecimal()
        The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.
      • setActive

        public void setActive​(java.lang.Boolean active)
        Whether the price can be used for new purchases.
      • setBillingScheme

        public void setBillingScheme​(java.lang.String billingScheme)
        Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.

        One of per_unit, or tiered.

      • setCreated

        public void setCreated​(java.lang.Long created)
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • setDeleted

        public void setDeleted​(java.lang.Boolean deleted)
        Always true for a deleted object.
      • setId

        public void setId​(java.lang.String id)
        Unique identifier for the object.
      • setLivemode

        public void setLivemode​(java.lang.Boolean livemode)
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • setLookupKey

        public void setLookupKey​(java.lang.String lookupKey)
        A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
      • setMetadata

        public void setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
        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

        public void setNickname​(java.lang.String nickname)
        A brief description of the price, hidden from customers.
      • setObject

        public void setObject​(java.lang.String object)
        String representing the object's type. Objects of the same type share the same value.

        Equal to price.

      • setRecurring

        public void setRecurring​(Price.Recurring recurring)
        The recurring components of a price such as interval and usage_type.
      • setTaxBehavior

        public void setTaxBehavior​(java.lang.String taxBehavior)
        Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.
      • setTiers

        public void setTiers​(java.util.List<Price.Tier> tiers)
        Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme.
      • setTiersMode

        public void setTiersMode​(java.lang.String tiersMode)
        Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows.

        One of graduated, or volume.

      • setTransformQuantity

        public void setTransformQuantity​(Price.TransformQuantity transformQuantity)
        Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers.
      • setType

        public void setType​(java.lang.String type)
        One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
      • setUnitAmount

        public void setUnitAmount​(java.lang.Long unitAmount)
        The unit amount in %s to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
      • setUnitAmountDecimal

        public void setUnitAmountDecimal​(java.math.BigDecimal unitAmountDecimal)
        The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if billing_scheme=per_unit.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getId

        public java.lang.String getId()
        Unique identifier for the object.
        Specified by:
        getId in interface HasId
      • getMetadata

        public java.util.Map<java.lang.String,​java.lang.String> 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 interface MetadataStore<Price>