Package com.stripe.model
Class ShippingRate
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.ShippingRate
- All Implemented Interfaces:
HasId
,MetadataStore<ShippingRate>
,StripeActiveObject
,StripeObjectInterface
Shipping rates describe the price of shipping presented to your customers and applied to a
purchase. For more information, see Charge for shipping.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Must be greater than 0.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 ShippingRate
create
(ShippingRateCreateParams params) Creates a new shipping rate object.static ShippingRate
create
(ShippingRateCreateParams params, RequestOptions options) Creates a new shipping rate object.static ShippingRate
Creates a new shipping rate object.static ShippingRate
create
(Map<String, Object> params, RequestOptions options) Creates a new shipping rate object.boolean
Whether the shipping rate can be used for new purchases.Time at which the object was created.The estimated range for how long shipping will take, meant to be displayable to the customer.The name of the shipping rate, meant to be displayable to the customer.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.Set of key-value pairs that you can attach to an object.String representing the object's type.Specifies whether the rate is considered inclusive of taxes or exclusive of taxes.Get ID of expandabletaxCode
object.Get expandedtaxCode
.getType()
The type of calculation to use on the shipping rate.int
hashCode()
static ShippingRateCollection
list
(ShippingRateListParams params) Returns a list of your shipping rates.static ShippingRateCollection
list
(ShippingRateListParams params, RequestOptions options) Returns a list of your shipping rates.static ShippingRateCollection
Returns a list of your shipping rates.static ShippingRateCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of your shipping rates.static ShippingRate
Returns the shipping rate object with the given ID.static ShippingRate
retrieve
(String shippingRateToken, RequestOptions options) Returns the shipping rate object with the given ID.static ShippingRate
retrieve
(String shippingRateToken, ShippingRateRetrieveParams params, RequestOptions options) Returns the shipping rate object with the given ID.static ShippingRate
Returns the shipping rate object with the given ID.void
Whether the shipping rate can be used for new purchases.void
setCreated
(Long created) Time at which the object was created.void
setDeliveryEstimate
(ShippingRate.DeliveryEstimate deliveryEstimate) The estimated range for how long shipping will take, meant to be displayable to the customer.void
setDisplayName
(String displayName) The name of the shipping rate, meant to be displayable to the customer.void
setFixedAmount
(ShippingRate.FixedAmount fixedAmount) 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
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
String representing the object's type.void
setResponseGetter
(StripeResponseGetter responseGetter) Specifies whether the rate is considered inclusive of taxes or exclusive of taxes.void
setTaxBehavior
(String taxBehavior) Specifies whether the rate is considered inclusive of taxes or exclusive of taxes.void
setTaxCode
(String id) void
setTaxCodeObject
(TaxCode expandableObject) void
The type of calculation to use on the shipping rate.update
(ShippingRateUpdateParams params) Updates an existing shipping rate object.update
(ShippingRateUpdateParams params, RequestOptions options) Updates an existing shipping rate object.Updates an existing shipping rate object.update
(Map<String, Object> params, RequestOptions options) Updates an existing shipping rate object.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, 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
-
ShippingRate
public ShippingRate()
-
-
Method Details
-
getTaxCode
Get ID of expandabletaxCode
object. -
setTaxCode
-
getTaxCodeObject
Get expandedtaxCode
. -
setTaxCodeObject
-
create
Creates a new shipping rate object.- Throws:
StripeException
-
create
public static ShippingRate create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a new shipping rate object.- Throws:
StripeException
-
create
Creates a new shipping rate object.- Throws:
StripeException
-
create
public static ShippingRate create(ShippingRateCreateParams params, RequestOptions options) throws StripeException Creates a new shipping rate object.- Throws:
StripeException
-
list
Returns a list of your shipping rates.- Throws:
StripeException
-
list
public static ShippingRateCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your shipping rates.- Throws:
StripeException
-
list
Returns a list of your shipping rates.- Throws:
StripeException
-
list
public static ShippingRateCollection list(ShippingRateListParams params, RequestOptions options) throws StripeException Returns a list of your shipping rates.- Throws:
StripeException
-
retrieve
Returns the shipping rate object with the given ID.- Throws:
StripeException
-
retrieve
public static ShippingRate retrieve(String shippingRateToken, RequestOptions options) throws StripeException Returns the shipping rate object with the given ID.- Throws:
StripeException
-
retrieve
public static ShippingRate retrieve(String shippingRateToken, Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns the shipping rate object with the given ID.- Throws:
StripeException
-
retrieve
public static ShippingRate retrieve(String shippingRateToken, ShippingRateRetrieveParams params, RequestOptions options) throws StripeException Returns the shipping rate object with the given ID.- Throws:
StripeException
-
update
Updates an existing shipping rate object.- Specified by:
update
in interfaceMetadataStore<ShippingRate>
- Throws:
StripeException
-
update
public ShippingRate update(Map<String, Object> params, RequestOptions options) throws StripeExceptionUpdates an existing shipping rate object.- Specified by:
update
in interfaceMetadataStore<ShippingRate>
- Throws:
StripeException
-
update
Updates an existing shipping rate object.- Throws:
StripeException
-
update
public ShippingRate update(ShippingRateUpdateParams params, RequestOptions options) throws StripeException Updates an existing shipping rate object.- Throws:
StripeException
-
setResponseGetter
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One ofinclusive
,exclusive
, orunspecified
.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getActive
Whether the shipping rate can be used for new purchases. Defaults totrue
. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getDeliveryEstimate
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. -
getDisplayName
The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. -
getFixedAmount
-
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
shipping_rate
. -
getTaxBehavior
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One ofinclusive
,exclusive
, orunspecified
. -
getType
The type of calculation to use on the shipping rate.Equal to
fixed_amount
. -
setActive
Whether the shipping rate can be used for new purchases. Defaults totrue
. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setDeliveryEstimate
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. -
setDisplayName
The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. -
setFixedAmount
-
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. -
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
shipping_rate
. -
setTaxBehavior
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One ofinclusive
,exclusive
, orunspecified
. -
setType
The type of calculation to use on the shipping rate.Equal to
fixed_amount
. -
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<ShippingRate>
-