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>
,StripeObjectInterface
public class ShippingRate extends ApiResource implements HasId, MetadataStore<ShippingRate>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ShippingRate.DeliveryEstimate
static class
ShippingRate.FixedAmount
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
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description ShippingRate()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
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
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new shipping rate object.static ShippingRate
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Creates a new shipping rate object.boolean
equals(java.lang.Object o)
java.lang.Boolean
getActive()
Whether the shipping rate can be used for new purchases.java.lang.Long
getCreated()
Time at which the object was created.ShippingRate.DeliveryEstimate
getDeliveryEstimate()
The estimated range for how long shipping will take, meant to be displayable to the customer.java.lang.String
getDisplayName()
The name of the shipping rate, meant to be displayable to the customer.ShippingRate.FixedAmount
getFixedAmount()
java.lang.String
getId()
Unique identifier for the object.java.lang.Boolean
getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.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.java.lang.String
getTaxBehavior()
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes.java.lang.String
getTaxCode()
Get ID of expandabletaxCode
object.TaxCode
getTaxCodeObject()
Get expandedtaxCode
.java.lang.String
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
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your shipping rates.static ShippingRateCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Returns a list of your shipping rates.static ShippingRate
retrieve(java.lang.String shippingRateToken)
Returns the shipping rate object with the given ID.static ShippingRate
retrieve(java.lang.String shippingRateToken, RequestOptions options)
Returns the shipping rate object with the given ID.static ShippingRate
retrieve(java.lang.String shippingRateToken, ShippingRateRetrieveParams params, RequestOptions options)
Returns the shipping rate object with the given ID.static ShippingRate
retrieve(java.lang.String shippingRateToken, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Returns the shipping rate object with the given ID.void
setActive(java.lang.Boolean active)
Whether the shipping rate can be used for new purchases.void
setCreated(java.lang.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(java.lang.String displayName)
The name of the shipping rate, meant to be displayable to the customer.void
setFixedAmount(ShippingRate.FixedAmount fixedAmount)
void
setId(java.lang.String id)
Unique identifier for the object.void
setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.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
setTaxBehavior(java.lang.String taxBehavior)
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes.void
setTaxCode(java.lang.String id)
void
setTaxCodeObject(TaxCode expandableObject)
void
setType(java.lang.String type)
The type of calculation to use on the shipping rate.ShippingRate
update(ShippingRateUpdateParams params)
Updates an existing shipping rate object.ShippingRate
update(ShippingRateUpdateParams params, RequestOptions options)
Updates an existing shipping rate object.ShippingRate
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates an existing shipping rate object.ShippingRate
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Updates an existing shipping rate object.-
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, urlEncodeId
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
getTaxCode
public java.lang.String getTaxCode()
Get ID of expandabletaxCode
object.
-
setTaxCode
public void setTaxCode(java.lang.String id)
-
getTaxCodeObject
public TaxCode getTaxCodeObject()
Get expandedtaxCode
.
-
setTaxCodeObject
public void setTaxCodeObject(TaxCode expandableObject)
-
list
public static ShippingRateCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Returns a list of your shipping rates.- Throws:
StripeException
-
list
public static ShippingRateCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Returns a list of your shipping rates.- Throws:
StripeException
-
list
public static ShippingRateCollection list(ShippingRateListParams params) throws StripeException
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
public static ShippingRate retrieve(java.lang.String shippingRateToken) throws StripeException
Returns the shipping rate object with the given ID.- Throws:
StripeException
-
retrieve
public static ShippingRate retrieve(java.lang.String shippingRateToken, RequestOptions options) throws StripeException
Returns the shipping rate object with the given ID.- Throws:
StripeException
-
retrieve
public static ShippingRate retrieve(java.lang.String shippingRateToken, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Returns the shipping rate object with the given ID.- Throws:
StripeException
-
retrieve
public static ShippingRate retrieve(java.lang.String shippingRateToken, ShippingRateRetrieveParams params, RequestOptions options) throws StripeException
Returns the shipping rate object with the given ID.- Throws:
StripeException
-
create
public static ShippingRate create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Creates a new shipping rate object.- Throws:
StripeException
-
create
public static ShippingRate create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Creates a new shipping rate object.- Throws:
StripeException
-
create
public static ShippingRate create(ShippingRateCreateParams params) throws StripeException
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
-
update
public ShippingRate update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates an existing shipping rate object.- Specified by:
update
in interfaceMetadataStore<ShippingRate>
- Throws:
StripeException
-
update
public ShippingRate update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Updates an existing shipping rate object.- Specified by:
update
in interfaceMetadataStore<ShippingRate>
- Throws:
StripeException
-
update
public ShippingRate update(ShippingRateUpdateParams params) throws StripeException
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
-
getActive
public java.lang.Boolean getActive()
Whether the shipping rate can be used for new purchases. Defaults totrue
.
-
getCreated
public java.lang.Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getDeliveryEstimate
public ShippingRate.DeliveryEstimate getDeliveryEstimate()
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
-
getDisplayName
public java.lang.String getDisplayName()
The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
-
getFixedAmount
public ShippingRate.FixedAmount getFixedAmount()
-
getLivemode
public java.lang.Boolean getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
shipping_rate
.
-
getTaxBehavior
public java.lang.String getTaxBehavior()
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One ofinclusive
,exclusive
, orunspecified
.
-
getType
public java.lang.String getType()
The type of calculation to use on the shipping rate. Can only befixed_amount
for now.Equal to
fixed_amount
.
-
setActive
public void setActive(java.lang.Boolean active)
Whether the shipping rate can be used for new purchases. Defaults totrue
.
-
setCreated
public void setCreated(java.lang.Long created)
Time at which the object was created. Measured in seconds since the Unix epoch.
-
setDeliveryEstimate
public void setDeliveryEstimate(ShippingRate.DeliveryEstimate deliveryEstimate)
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
-
setDisplayName
public void setDisplayName(java.lang.String displayName)
The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
-
setFixedAmount
public void setFixedAmount(ShippingRate.FixedAmount fixedAmount)
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.
-
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.
-
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
shipping_rate
.
-
setTaxBehavior
public void setTaxBehavior(java.lang.String taxBehavior)
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One ofinclusive
,exclusive
, orunspecified
.
-
setType
public void setType(java.lang.String type)
The type of calculation to use on the shipping rate. Can only befixed_amount
for now.Equal to
fixed_amount
.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getId
public java.lang.String getId()
Unique identifier for the object.
-
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 interfaceMetadataStore<ShippingRate>
-
-