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
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about DeliveryEstimate, please refer to the API Reference.static classFor more details about FixedAmount, 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 ShippingRatecreate(ShippingRateCreateParams params) Creates a new shipping rate object.static ShippingRatecreate(ShippingRateCreateParams params, RequestOptions options) Creates a new shipping rate object.static ShippingRateCreates a new shipping rate object.static ShippingRatecreate(Map<String, Object> params, RequestOptions options) Creates a new shipping rate object.booleanWhether 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 valuetrueif the object exists in live mode or the valuefalseif 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 expandabletaxCodeobject.Get expandedtaxCode.getType()The type of calculation to use on the shipping rate.inthashCode()static ShippingRateCollectionlist(ShippingRateListParams params) Returns a list of your shipping rates.static ShippingRateCollectionlist(ShippingRateListParams params, RequestOptions options) Returns a list of your shipping rates.static ShippingRateCollectionReturns a list of your shipping rates.static ShippingRateCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of your shipping rates.static ShippingRateReturns the shipping rate object with the given ID.static ShippingRateretrieve(String shippingRateToken, RequestOptions options) Returns the shipping rate object with the given ID.static ShippingRateretrieve(String shippingRateToken, ShippingRateRetrieveParams params, RequestOptions options) Returns the shipping rate object with the given ID.static ShippingRateReturns the shipping rate object with the given ID.voidWhether the shipping rate can be used for new purchases.voidsetCreated(Long created) Time at which the object was created.voidsetDeliveryEstimate(ShippingRate.DeliveryEstimate deliveryEstimate) The estimated range for how long shipping will take, meant to be displayable to the customer.voidsetDisplayName(String displayName) The name of the shipping rate, meant to be displayable to the customer.voidsetFixedAmount(ShippingRate.FixedAmount fixedAmount) 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.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidString representing the object's type.voidsetResponseGetter(StripeResponseGetter responseGetter) Specifies whether the rate is considered inclusive of taxes or exclusive of taxes.voidsetTaxBehavior(String taxBehavior) Specifies whether the rate is considered inclusive of taxes or exclusive of taxes.voidsetTaxCode(String id) voidsetTaxCodeObject(TaxCode expandableObject) voidThe 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, 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
-
ShippingRate
public ShippingRate()
-
-
Method Details
-
getTaxCode
Get ID of expandabletaxCodeobject. -
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:
updatein interfaceMetadataStore<ShippingRate>- Throws:
StripeException
-
update
public ShippingRate update(Map<String, Object> params, RequestOptions options) throws StripeExceptionUpdates an existing shipping rate object.- Specified by:
updatein 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:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance 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 valuetrueif the object exists in live mode or the valuefalseif 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 valuetrueif the object exists in live mode or the valuefalseif 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:
getMetadatain interfaceMetadataStore<ShippingRate>
-