public class Order extends ApiResource implements HasId, MetadataStore<Order>
Modifier and Type | Class and Description |
---|---|
static class |
Order.ShippingMethod |
static class |
Order.StatusTransitions
The type of estimate.
|
ApiResource.RequestMethod
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
Order() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(java.lang.Object other) |
static Order |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new order object.
|
static Order |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Creates a new order object.
|
static Order |
create(OrderCreateParams params)
Creates a new order object.
|
static Order |
create(OrderCreateParams params,
RequestOptions options)
Creates a new order object.
|
boolean |
equals(java.lang.Object o) |
java.lang.Long |
getAmount()
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1,
Japanese Yen being a zero-decimal currency) representing the total amount for the order.
|
java.lang.Long |
getAmountReturned()
The total amount that was returned to the customer.
|
java.lang.String |
getApplication()
ID of the Connect Application that created the order.
|
java.lang.Long |
getApplicationFee()
A fee in cents that will be applied to the order and transferred to the application owner’s
Stripe account.
|
java.lang.String |
getCharge()
Get ID of expandable
charge object. |
Charge |
getChargeObject()
Get expanded
charge . |
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.String |
getCurrency()
Three-letter ISO currency code,
in lowercase.
|
java.lang.String |
getCustomer()
Get ID of expandable
customer object. |
Customer |
getCustomerObject()
Get expanded
customer . |
java.lang.String |
getEmail()
The email address of the customer placing the order.
|
java.lang.String |
getExternalCouponCode()
External coupon code to load for this order.
|
java.lang.String |
getId()
Unique identifier for the object.
|
java.util.List<OrderItem> |
getItems()
List of items constituting the order.
|
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. |
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.
|
OrderReturnCollection |
getReturns()
A list of returns that have taken place for this order.
|
java.lang.String |
getSelectedShippingMethod()
The shipping method that is currently selected for this order, if any.
|
ShippingDetails |
getShipping()
The shipping address for the order.
|
java.util.List<Order.ShippingMethod> |
getShippingMethods()
A list of supported shipping methods for this order.
|
java.lang.String |
getStatus()
Current order status.
|
Order.StatusTransitions |
getStatusTransitions()
The timestamps at which the order status was updated.
|
java.lang.Long |
getUpdated()
Time at which the object was last updated.
|
java.lang.String |
getUpstreamId()
The user's order ID if it is different from the Stripe order ID.
|
int |
hashCode() |
static OrderCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your orders.
|
static OrderCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of your orders.
|
static OrderCollection |
list(OrderListParams params)
Returns a list of your orders.
|
static OrderCollection |
list(OrderListParams params,
RequestOptions options)
Returns a list of your orders.
|
Order |
pay()
Pay an order by providing a
source to create a payment. |
Order |
pay(java.util.Map<java.lang.String,java.lang.Object> params)
Pay an order by providing a
source to create a payment. |
Order |
pay(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Pay an order by providing a
source to create a payment. |
Order |
pay(OrderPayParams params)
Pay an order by providing a
source to create a payment. |
Order |
pay(OrderPayParams params,
RequestOptions options)
Pay an order by providing a
source to create a payment. |
Order |
pay(RequestOptions options)
Pay an order by providing a
source to create a payment. |
static Order |
retrieve(java.lang.String id)
Retrieves the details of an existing order.
|
static Order |
retrieve(java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the details of an existing order.
|
static Order |
retrieve(java.lang.String id,
OrderRetrieveParams params,
RequestOptions options)
Retrieves the details of an existing order.
|
static Order |
retrieve(java.lang.String id,
RequestOptions options)
Retrieves the details of an existing order.
|
OrderReturn |
returnOrder()
Return all or part of an order.
|
OrderReturn |
returnOrder(java.util.Map<java.lang.String,java.lang.Object> params)
Return all or part of an order.
|
OrderReturn |
returnOrder(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Return all or part of an order.
|
OrderReturn |
returnOrder(OrderReturnOrderParams params)
Return all or part of an order.
|
OrderReturn |
returnOrder(OrderReturnOrderParams params,
RequestOptions options)
Return all or part of an order.
|
OrderReturn |
returnOrder(RequestOptions options)
Return all or part of an order.
|
void |
setAmount(java.lang.Long amount)
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1,
Japanese Yen being a zero-decimal currency) representing the total amount for the order.
|
void |
setAmountReturned(java.lang.Long amountReturned)
The total amount that was returned to the customer.
|
void |
setApplication(java.lang.String application)
ID of the Connect Application that created the order.
|
void |
setApplicationFee(java.lang.Long applicationFee)
A fee in cents that will be applied to the order and transferred to the application owner’s
Stripe account.
|
void |
setCharge(java.lang.String id) |
void |
setChargeObject(Charge expandableObject) |
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setCurrency(java.lang.String currency)
Three-letter ISO currency code,
in lowercase.
|
void |
setCustomer(java.lang.String id) |
void |
setCustomerObject(Customer expandableObject) |
void |
setEmail(java.lang.String email)
The email address of the customer placing the order.
|
void |
setExternalCouponCode(java.lang.String externalCouponCode)
External coupon code to load for this order.
|
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setItems(java.util.List<OrderItem> items)
List of items constituting the order.
|
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. |
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 |
setReturns(OrderReturnCollection returns)
A list of returns that have taken place for this order.
|
void |
setSelectedShippingMethod(java.lang.String selectedShippingMethod)
The shipping method that is currently selected for this order, if any.
|
void |
setShipping(ShippingDetails shipping)
The shipping address for the order.
|
void |
setShippingMethods(java.util.List<Order.ShippingMethod> shippingMethods)
A list of supported shipping methods for this order.
|
void |
setStatus(java.lang.String status)
Current order status.
|
void |
setStatusTransitions(Order.StatusTransitions statusTransitions)
The timestamps at which the order status was updated.
|
void |
setUpdated(java.lang.Long updated)
Time at which the object was last updated.
|
void |
setUpstreamId(java.lang.String upstreamId)
The user's order ID if it is different from the Stripe order ID.
|
Order |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specific order by setting the values of the parameters passed.
|
Order |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates the specific order by setting the values of the parameters passed.
|
Order |
update(OrderUpdateParams params)
Updates the specific order by setting the values of the parameters passed.
|
Order |
update(OrderUpdateParams params,
RequestOptions options)
Updates the specific order by setting the values of the parameters passed.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public java.lang.String getCharge()
charge
object.public void setCharge(java.lang.String id)
public Charge getChargeObject()
charge
.public void setChargeObject(Charge expandableObject)
public java.lang.String getCustomer()
customer
object.public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
customer
.public void setCustomerObject(Customer expandableObject)
public static Order create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static Order create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Order create(OrderCreateParams params) throws StripeException
StripeException
public static Order create(OrderCreateParams params, RequestOptions options) throws StripeException
StripeException
public static OrderCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static OrderCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static OrderCollection list(OrderListParams params) throws StripeException
StripeException
public static OrderCollection list(OrderListParams params, RequestOptions options) throws StripeException
StripeException
public static Order retrieve(java.lang.String id) throws StripeException
StripeException
public static Order retrieve(java.lang.String id, RequestOptions options) throws StripeException
StripeException
public static Order retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Order retrieve(java.lang.String id, OrderRetrieveParams params, RequestOptions options) throws StripeException
StripeException
public Order update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update
in interface MetadataStore<Order>
StripeException
public Order update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update
in interface MetadataStore<Order>
StripeException
public Order update(OrderUpdateParams params) throws StripeException
StripeException
public Order update(OrderUpdateParams params, RequestOptions options) throws StripeException
StripeException
public Order pay() throws StripeException
source
to create a payment.StripeException
public Order pay(RequestOptions options) throws StripeException
source
to create a payment.StripeException
public Order pay(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
source
to create a payment.StripeException
public Order pay(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
source
to create a payment.StripeException
public Order pay(OrderPayParams params) throws StripeException
source
to create a payment.StripeException
public Order pay(OrderPayParams params, RequestOptions options) throws StripeException
source
to create a payment.StripeException
public OrderReturn returnOrder() throws StripeException
paid
or
fulfilled
before it can be returned. Once all items have been returned, the order will
become canceled
or returned
depending on which status the order
started in.StripeException
public OrderReturn returnOrder(RequestOptions options) throws StripeException
paid
or
fulfilled
before it can be returned. Once all items have been returned, the order will
become canceled
or returned
depending on which status the order
started in.StripeException
public OrderReturn returnOrder(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
paid
or
fulfilled
before it can be returned. Once all items have been returned, the order will
become canceled
or returned
depending on which status the order
started in.StripeException
public OrderReturn returnOrder(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
paid
or
fulfilled
before it can be returned. Once all items have been returned, the order will
become canceled
or returned
depending on which status the order
started in.StripeException
public OrderReturn returnOrder(OrderReturnOrderParams params) throws StripeException
paid
or
fulfilled
before it can be returned. Once all items have been returned, the order will
become canceled
or returned
depending on which status the order
started in.StripeException
public OrderReturn returnOrder(OrderReturnOrderParams params, RequestOptions options) throws StripeException
paid
or
fulfilled
before it can be returned. Once all items have been returned, the order will
become canceled
or returned
depending on which status the order
started in.StripeException
public java.lang.Long getAmount()
public java.lang.Long getAmountReturned()
public java.lang.String getApplication()
public java.lang.Long getApplicationFee()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.String getEmail()
public java.lang.String getExternalCouponCode()
public java.util.List<OrderItem> getItems()
public java.lang.Boolean getLivemode()
true
if the object exists in live mode or the value false
if the
object exists in test mode.public java.lang.String getObject()
Equal to order
.
public OrderReturnCollection getReturns()
public java.lang.String getSelectedShippingMethod()
id
s of shipping methods in the shipping_methods
array. At order
creation time, if there are multiple shipping methods, Stripe will automatically selected the
first method.public ShippingDetails getShipping()
public java.util.List<Order.ShippingMethod> getShippingMethods()
public java.lang.String getStatus()
created
, paid
, canceled
, fulfilled
, or returned
. More details in the Orders Guide.public Order.StatusTransitions getStatusTransitions()
public java.lang.Long getUpdated()
public java.lang.String getUpstreamId()
public void setAmount(java.lang.Long amount)
public void setAmountReturned(java.lang.Long amountReturned)
public void setApplication(java.lang.String application)
public void setApplicationFee(java.lang.Long applicationFee)
public void setCreated(java.lang.Long created)
public void setCurrency(java.lang.String currency)
public void setEmail(java.lang.String email)
public void setExternalCouponCode(java.lang.String externalCouponCode)
public void setId(java.lang.String id)
public void setItems(java.util.List<OrderItem> items)
public void setLivemode(java.lang.Boolean livemode)
true
if the object exists in live mode or the value false
if the
object exists in test mode.public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setObject(java.lang.String object)
Equal to order
.
public void setReturns(OrderReturnCollection returns)
public void setSelectedShippingMethod(java.lang.String selectedShippingMethod)
id
s of shipping methods in the shipping_methods
array. At order
creation time, if there are multiple shipping methods, Stripe will automatically selected the
first method.public void setShipping(ShippingDetails shipping)
public void setShippingMethods(java.util.List<Order.ShippingMethod> shippingMethods)
public void setStatus(java.lang.String status)
created
, paid
, canceled
, fulfilled
, or returned
. More details in the Orders Guide.public void setStatusTransitions(Order.StatusTransitions statusTransitions)
public void setUpdated(java.lang.Long updated)
public void setUpstreamId(java.lang.String upstreamId)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface MetadataStore<Order>