Package com.stripe.model
Class Order
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.Order
- All Implemented Interfaces:
HasId,MetadataStore<Order>,StripeObjectInterface
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classThe type of estimate.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic Ordercreate(OrderCreateParams params) Creates a new order object.static Ordercreate(OrderCreateParams params, RequestOptions options) Creates a new order object.static OrderCreates a new order object.static Ordercreate(Map<String, Object> params, RequestOptions options) Creates a new order object.booleanA 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.The total amount that was returned to the customer.ID of the Connect Application that created the order.A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account.Get ID of expandablechargeobject.Get expandedcharge.Time at which the object was created.Three-letter ISO currency code, in lowercase.Get ID of expandablecustomerobject.Get expandedcustomer.getEmail()The email address of the customer placing the order.External coupon code to load for this order.getId()Unique identifier for the object.getItems()List of items constituting the order.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.A list of returns that have taken place for this order.The shipping method that is currently selected for this order, if any.The shipping address for the order.A list of supported shipping methods for this order.Current order status.The timestamps at which the order status was updated.Time at which the object was last updated.The user's order ID if it is different from the Stripe order ID.inthashCode()static OrderCollectionlist(OrderListParams params) Returns a list of your orders.static OrderCollectionlist(OrderListParams params, RequestOptions options) Returns a list of your orders.static OrderCollectionReturns a list of your orders.static OrderCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of your orders.pay()Pay an order by providing asourceto create a payment.pay(RequestOptions options) Pay an order by providing asourceto create a payment.pay(OrderPayParams params) Pay an order by providing asourceto create a payment.pay(OrderPayParams params, RequestOptions options) Pay an order by providing asourceto create a payment.Pay an order by providing asourceto create a payment.pay(Map<String, Object> params, RequestOptions options) Pay an order by providing asourceto create a payment.static OrderRetrieves the details of an existing order.static Orderretrieve(String id, RequestOptions options) Retrieves the details of an existing order.static Orderretrieve(String id, OrderRetrieveParams params, RequestOptions options) Retrieves the details of an existing order.static OrderRetrieves the details of an existing order.Return all or part of an order.returnOrder(RequestOptions options) Return all or part of an order.returnOrder(OrderReturnOrderParams params) Return all or part of an order.returnOrder(OrderReturnOrderParams params, RequestOptions options) Return all or part of an order.returnOrder(Map<String, Object> params) Return all or part of an order.returnOrder(Map<String, Object> params, RequestOptions options) Return all or part of an order.voidA 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.voidsetAmountReturned(Long amountReturned) The total amount that was returned to the customer.voidsetApplication(String application) ID of the Connect Application that created the order.voidsetApplicationFee(Long applicationFee) A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account.voidvoidsetChargeObject(Charge expandableObject) voidsetCreated(Long created) Time at which the object was created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCustomer(String id) voidsetCustomerObject(Customer expandableObject) voidThe email address of the customer placing the order.voidsetExternalCouponCode(String externalCouponCode) External coupon code to load for this order.voidUnique identifier for the object.voidList of items constituting the order.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.voidsetReturns(OrderReturnCollection returns) A list of returns that have taken place for this order.voidsetSelectedShippingMethod(String selectedShippingMethod) The shipping method that is currently selected for this order, if any.voidsetShipping(ShippingDetails shipping) The shipping address for the order.voidsetShippingMethods(List<Order.ShippingMethod> shippingMethods) A list of supported shipping methods for this order.voidCurrent order status.voidsetStatusTransitions(Order.StatusTransitions statusTransitions) The timestamps at which the order status was updated.voidsetUpdated(Long updated) Time at which the object was last updated.voidsetUpstreamId(String upstreamId) The user's order ID if it is different from the Stripe order ID.update(OrderUpdateParams params) Updates the specific order by setting the values of the parameters passed.update(OrderUpdateParams params, RequestOptions options) Updates the specific order by setting the values of the parameters passed.Updates the specific order by setting the values of the parameters passed.update(Map<String, Object> params, RequestOptions options) Updates the specific order by setting the values of the parameters passed.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, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Constructor Details
-
Order
public Order()
-
-
Method Details
-
getCharge
Get ID of expandablechargeobject. -
setCharge
-
getChargeObject
Get expandedcharge. -
setChargeObject
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
create
Creates a new order object.- Throws:
StripeException
-
create
public static Order create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a new order object.- Throws:
StripeException
-
create
Creates a new order object.- Throws:
StripeException
-
create
Creates a new order object.- Throws:
StripeException
-
list
Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.- Throws:
StripeException
-
list
public static OrderCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.- Throws:
StripeException
-
list
Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.- Throws:
StripeException
-
list
public static OrderCollection list(OrderListParams params, RequestOptions options) throws StripeException Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.- Throws:
StripeException
-
retrieve
public static Order retrieve(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.- Throws:
StripeException
-
retrieve
public static Order retrieve(String id, OrderRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.- Throws:
StripeException
-
update
Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
updatein interfaceMetadataStore<Order>- Throws:
StripeException
-
update
Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
updatein interfaceMetadataStore<Order>- Throws:
StripeException
-
update
Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
update
Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
pay
Pay an order by providing asourceto create a payment.- Throws:
StripeException
-
pay
Pay an order by providing asourceto create a payment.- Throws:
StripeException
-
pay
Pay an order by providing asourceto create a payment.- Throws:
StripeException
-
pay
Pay an order by providing asourceto create a payment.- Throws:
StripeException
-
pay
Pay an order by providing asourceto create a payment.- Throws:
StripeException
-
pay
Pay an order by providing asourceto create a payment.- Throws:
StripeException
-
returnOrder
Return all or part of an order. The order must have a status ofpaidorfulfilledbefore it can be returned. Once all items have been returned, the order will becomecanceledorreturneddepending on which status the order started in.- Throws:
StripeException
-
returnOrder
Return all or part of an order. The order must have a status ofpaidorfulfilledbefore it can be returned. Once all items have been returned, the order will becomecanceledorreturneddepending on which status the order started in.- Throws:
StripeException
-
returnOrder
Return all or part of an order. The order must have a status ofpaidorfulfilledbefore it can be returned. Once all items have been returned, the order will becomecanceledorreturneddepending on which status the order started in.- Throws:
StripeException
-
returnOrder
public OrderReturn returnOrder(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturn all or part of an order. The order must have a status ofpaidorfulfilledbefore it can be returned. Once all items have been returned, the order will becomecanceledorreturneddepending on which status the order started in.- Throws:
StripeException
-
returnOrder
Return all or part of an order. The order must have a status ofpaidorfulfilledbefore it can be returned. Once all items have been returned, the order will becomecanceledorreturneddepending on which status the order started in.- Throws:
StripeException
-
returnOrder
public OrderReturn returnOrder(OrderReturnOrderParams params, RequestOptions options) throws StripeException Return all or part of an order. The order must have a status ofpaidorfulfilledbefore it can be returned. Once all items have been returned, the order will becomecanceledorreturneddepending on which status the order started in.- Throws:
StripeException
-
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. -
getAmountReturned
The total amount that was returned to the customer. -
getApplication
ID of the Connect Application that created the order. -
getApplicationFee
A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getEmail
The email address of the customer placing the order. -
getExternalCouponCode
External coupon code to load for this order. -
getItems
List of items constituting the order. An order can have up to 25 items. -
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
order. -
getReturns
A list of returns that have taken place for this order. -
getSelectedShippingMethod
The shipping method that is currently selected for this order, if any. If present, it is equal to one of theids of shipping methods in theshipping_methodsarray. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. -
getShipping
The shipping address for the order. Present if the order is for goods to be shipped. -
getShippingMethods
A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. -
getStatus
Current order status. One ofcreated,paid,canceled,fulfilled, orreturned. More details in the Orders Guide. -
getStatusTransitions
The timestamps at which the order status was updated. -
getUpdated
Time at which the object was last updated. Measured in seconds since the Unix epoch. -
getUpstreamId
The user's order ID if it is different from the Stripe order ID. -
setAmount
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. -
setAmountReturned
The total amount that was returned to the customer. -
setApplication
ID of the Connect Application that created the order. -
setApplicationFee
A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setEmail
The email address of the customer placing the order. -
setExternalCouponCode
External coupon code to load for this order. -
setId
Unique identifier for the object. -
setItems
List of items constituting the order. An order can have up to 25 items. -
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
order. -
setReturns
A list of returns that have taken place for this order. -
setSelectedShippingMethod
The shipping method that is currently selected for this order, if any. If present, it is equal to one of theids of shipping methods in theshipping_methodsarray. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. -
setShipping
The shipping address for the order. Present if the order is for goods to be shipped. -
setShippingMethods
A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. -
setStatus
Current order status. One ofcreated,paid,canceled,fulfilled, orreturned. More details in the Orders Guide. -
setStatusTransitions
The timestamps at which the order status was updated. -
setUpdated
Time at which the object was last updated. Measured in seconds since the Unix epoch. -
setUpstreamId
The user's order ID if it is different from the Stripe order ID. -
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<Order>
-