OrderService class

URL: https://developer.squareup.com/docs/orders-api/create-orders You can create Order objects by calling the CreateOrder endpoint. Order objects can be created with any combination of line items, fulfillment objects, taxes, and discounts. They can also be created empty and updated with elements over time.

Constructors

OrderService({required String baseUrl, required AuthenticationService authenticationService})

Properties

authenticationService AuthenticationService
final
baseUrl String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

batchOrderRead({required BatchOrderRequest request, String? authToken}) Future<List<Order>>
Retrieves a set of orders by their IDs. If a given order ID does not exist, the ID is ignored instead of generating an error.
calculateOrder({required CalculateOrderRequest request, String? authToken}) Future<Order>
Enables applications to preview order pricing without creating an order.
cloneOrder({required CloneOrderRequest request, String? authToken}) Future<Order>
Creates a new order, in the DRAFT state, by duplicating an existing order.
createOrder({required CreateOrderRequest request, String? authToken}) Future<Order>
Creates a Terminal checkout request and sends it to the specified device to take a payment for the requested amount.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
payOrder({required int orderId, required PayOrderRequest request, String? authToken}) Future<Order>
Pay for an order using one or more approved payments or settle an order with a total of 0.
readOrder({required String orderId, String? authToken}) Future<Order>
Retrieves an Order by ID.
searchOrder({required SearchOrderRequest request, String? authToken}) Future<OrderResponse>
Search all orders for one or more locations. Orders include all sales, returns, and exchanges regardless of how or when they entered the Square ecosystem (such as Point of Sale, Invoices, and Connect APIs).
toString() String
A string representation of this object.
inherited
updateOrder({required int orderId, required UpdateOrderRequest request, String? authToken}) Future<Order>
Updates an open order by adding, replacing, or deleting fields.

Operators

operator ==(Object other) bool
The equality operator.
inherited