new Order()
- Source:
Methods
(static) Order#getAuthorizations() → {Array.<payments.Authorization>}
Get the field value
Card authorizations associated with this order
- Source:
Returns:
An array of
- Type
- Array.<payments.Authorization>
(static) Order#getClientCreatedTime() → {Number}
Get the field value
The time at which the client created this order
- Source:
Returns:
must be a long integer
- Type
- Number
(static) Order#getCreatedTime() → {Number}
Get the field value
Creation timestamp
- Source:
Returns:
must be a long integer
- Type
- Number
(static) Order#getCredits() → {Array.<payments.Credit>}
Get the field value
Credits associated with this order.
- Source:
Returns:
An array of
- Type
- Array.<payments.Credit>
(static) Order#getCurrency() → {String}
Get the field value
Currency of this order. For example, "USD"
- Source:
Returns:
- Type
- String
(static) Order#getCustomerId() → {Number}
Get the field value
- Source:
Returns:
must be a long integer
- Type
- Number
(static) Order#getCustomers() → {Array.<customers.Customer>}
Get the field value
List of customers associated with this order.
- Source:
Returns:
An array of
- Type
- Array.<customers.Customer>
(static) Order#getCustomerUuid() → {String}
Get the field value
- Source:
Returns:
- Type
- String
(static) Order#getDeletedTimestamp() → {Number}
Get the field value
- Source:
Returns:
must be a long integer
- Type
- Number
(static) Order#getDevice() → {base.Reference|Null}
Get the field value
Device which created the order, a 128-bit UUID, not a normal base-13 Clover ID.
- Source:
Returns:
- Type
- base.Reference | Null
(static) Order#getDiscounts() → {Array.<order.Discount>}
Get the field value
Amount or percentage discounts applied to the order subtotal. To retrieve discounts applied to individual items, use the Get all line items for an order endpoint with the discounts field expanded (v3/merchants/{mId}/orders/{orderId}/line_items?expand=discounts).
- Source:
Returns:
An array of
- Type
- Array.<order.Discount>
(static) Order#getEmployee() → {Null|base.Reference}
Get the field value
The employee who took this order
- Source:
Returns:
- Type
- Null | base.Reference
(static) Order#getExternalReferenceId() → {Null|String}
Get the field value
External reference id if present in the order
- Source:
Returns:
- Type
- Null | String
(static) Order#getGroupLineItems() → {Boolean}
Get the field value
Whether similar line items should be grouped together on the receipt that this order generates. Item "similarity" is based on items having matching values for a set of properties including price, modifiers, and discounts.
- Source:
Returns:
- Type
- Boolean
(static) Order#getId() → {String}
Get the field value
Unique identifier
- Source:
Returns:
- Type
- String
(static) Order#getIsVat() → {Boolean}
Get the field value
This order was created by merchant with VAT enabled.
- Source:
Returns:
- Type
- Boolean
(static) Order#getLineItems() → {Array.<order.LineItem>}
Get the field value
Line items associated with this order
- Source:
Returns:
An array of
- Type
- Array.<order.LineItem>
(static) Order#getManualTransaction() → {Boolean}
Get the field value
Whether this order represents a manual transaction. A manual transaction is a transaction that has an arbitrary amount defined and is not associated with any inventory items. For example, the Clover Sale App and Clover Manual Transaction App create manual transactions. A manual transactions will have a single associated line item to hold the sale amount, but the generated receipt will display this differently to indicate that it is not considered a typical order with inventory items.
- Source:
Returns:
- Type
- Boolean
(static) Order#getMerchant() → {base.Reference}
Get the field value
- Source:
Returns:
- Type
- base.Reference
(static) Order#getModifiedTime() → {Number}
Get the field value
Last modified time of the order
- Source:
Returns:
must be a long integer
- Type
- Number
(static) Order#getNote() → {Null|String}
Get the field value
An arbitrary string with information about this order, may be printed on the order receipt and displayed in apps
- Source:
Returns:
- Type
- Null | String
(static) Order#getOnlineOrder() → {Null|onlineorder.OnlineOrder}
Get the field value
- Source:
Returns:
- Type
- Null | onlineorder.OnlineOrder
(static) Order#getOrderType() → {Null|order.OrderType}
Get the field value
- Source:
Returns:
- Type
- Null | order.OrderType
(static) Order#getOrderTypeId() → {Number}
Get the field value
- Source:
Returns:
must be a long integer
- Type
- Number
(static) Order#getPayments() → {Array.<payments.Payment>}
Get the field value
Payments that were made for this order. If multiple payments were made, then the payType field should reflect the method used to split the total amount.
- Source:
Returns:
An array of
- Type
- Array.<payments.Payment>
(static) Order#getPaymentState() → {Null|order.PaymentState}
Get the field value
Is this order paid or not?
- Source:
Returns:
- Type
- Null | order.PaymentState
(static) Order#getPayType() → {order.PayType}
Get the field value
Possible values: SPLIT_GUEST, SPLIT_ITEM, SPLIT_CUSTOM, FULL. During the payment flow, if the user chooses to split the payment for this order, this field will be set to one of the SPLIT_* values to indicate how the full amount should be split. If the user chooses to pay for the order in full with one payment, then this field will be FULL.
- Source:
Returns:
- Type
- order.PayType
(static) Order#getPreAuths() → {Array.<payments.Payment>}
Get the field value
Pre-authorizations associated with this order
- Source:
Returns:
An array of
- Type
- Array.<payments.Payment>
(static) Order#getPrintGroups() → {Array.<order.PrintGroup>}
Get the field value
Print groups for line items of this order.
- Source:
Returns:
An array of
- Type
- Array.<order.PrintGroup>
(static) Order#getRefunds() → {Array.<payments.Refund>}
Get the field value
Refunds that were made for this order
- Source:
Returns:
An array of
- Type
- Array.<payments.Refund>
(static) Order#getServiceCharge() → {Null|base.ServiceCharge}
Get the field value
Optional service charge (gratuity) applied to this order
- Source:
Returns:
- Type
- Null | base.ServiceCharge
(static) Order#getState() → {Null|String}
Get the field value
A String generally describing the state of the Order. When creating an Order, the value must be manually set to "open". If no value is set, the state defaults to null, which indicates an unfinished Order. An unfinished order is not displayed in user interfaces and can only be retrieved by its id. Non-null values such as "open" and "locked" are not checked or enforced by the server. Therefore, these values should not be used to make any logical decisions about the Order.
- Source:
Returns:
- Type
- Null | String
(static) Order#getTaxRemoved() → {Boolean}
Get the field value
If true then this order should not have taxes applied to it
- Source:
Returns:
- Type
- Boolean
(static) Order#getTestMode() → {Boolean}
Get the field value
Whether this order was created in test mode. Payments made against test orders are not processed. Test mode orders can be deleted from the Orders App on the merchant's device or web dashboard (https://www.clover.com/orders/m/{mId}/orders). They will also be deleted when the device sends a POST to the /v2/merchant/{mId}/orders/delete_all_tests endpoint.
- Source:
Returns:
- Type
- Boolean
(static) Order#getTitle() → {Null|String}
Get the field value
- Source:
Returns:
- Type
- Null | String
(static) Order#getTotal() → {Null|Number}
Get the field value
Total price of the order in cents
- Source:
Returns:
must be a long integer
- Type
- Null | Number
(static) Order#getUnpaidBalance() → {Null|Number}
Get the field value
The net of orders with payment minus the amount collected. Includes refunds, manual refunds, tax, tip, service charge, non-revenue items, paid gift card activations and loads and discounts
- Source:
Returns:
must be a long integer
- Type
- Null | Number
(static) Order#getVoids() → {Array.<payments.Payment>}
Get the field value
Voided payments associated with this order
- Source:
Returns:
An array of
- Type
- Array.<payments.Payment>
(static) Order#setAuthorizations(authorizations)
Set the field value
Card authorizations associated with this order
Parameters:
Name | Type | Description |
---|---|---|
authorizations |
Array.<payments.Authorization> | An array of |
- Source:
(static) Order#setClientCreatedTime(clientCreatedTime)
Set the field value
The time at which the client created this order
Parameters:
Name | Type | Description |
---|---|---|
clientCreatedTime |
Number | must be a long integer |
- Source:
(static) Order#setCreatedTime(createdTime)
Set the field value
Creation timestamp
Parameters:
Name | Type | Description |
---|---|---|
createdTime |
Number | must be a long integer |
- Source:
(static) Order#setCredits(credits)
Set the field value
Credits associated with this order.
Parameters:
Name | Type | Description |
---|---|---|
credits |
Array.<payments.Credit> | An array of |
- Source:
(static) Order#setCurrency(currency)
Set the field value
Currency of this order. For example, "USD"
Parameters:
Name | Type | Description |
---|---|---|
currency |
String |
- Source:
(static) Order#setCustomerId(customerId)
Set the field value
Parameters:
Name | Type | Description |
---|---|---|
customerId |
Number | must be a long integer |
- Source:
(static) Order#setCustomers(customers)
Set the field value
List of customers associated with this order.
Parameters:
Name | Type | Description |
---|---|---|
customers |
Array.<customers.Customer> | An array of |
- Source:
(static) Order#setCustomerUuid(customerUuid)
Set the field value
Parameters:
Name | Type | Description |
---|---|---|
customerUuid |
String |
- Source:
(static) Order#setDeletedTimestamp(deletedTimestamp)
Set the field value
Parameters:
Name | Type | Description |
---|---|---|
deletedTimestamp |
Number | must be a long integer |
- Source:
(static) Order#setDevice(device)
Set the field value
Device which created the order, a 128-bit UUID, not a normal base-13 Clover ID.
Parameters:
Name | Type | Description |
---|---|---|
device |
base.Reference | Null |
- Source:
(static) Order#setDiscounts(discounts)
Set the field value
Amount or percentage discounts applied to the order subtotal. To retrieve discounts applied to individual items, use the Get all line items for an order endpoint with the discounts field expanded (v3/merchants/{mId}/orders/{orderId}/line_items?expand=discounts).
Parameters:
Name | Type | Description |
---|---|---|
discounts |
Array.<order.Discount> | An array of |
- Source:
(static) Order#setEmployee(employee)
Set the field value
The employee who took this order
Parameters:
Name | Type | Description |
---|---|---|
employee |
Null | base.Reference |
- Source:
(static) Order#setExternalReferenceId(externalReferenceId)
Set the field value
External reference id if present in the order
Parameters:
Name | Type | Description |
---|---|---|
externalReferenceId |
Null | String |
- Source:
(static) Order#setGroupLineItems(groupLineItems)
Set the field value
Whether similar line items should be grouped together on the receipt that this order generates. Item "similarity" is based on items having matching values for a set of properties including price, modifiers, and discounts.
Parameters:
Name | Type | Description |
---|---|---|
groupLineItems |
Boolean |
- Source:
(static) Order#setId(id)
Set the field value
Unique identifier
Parameters:
Name | Type | Description |
---|---|---|
id |
String |
- Source:
(static) Order#setIsVat(isVat)
Set the field value
This order was created by merchant with VAT enabled.
Parameters:
Name | Type | Description |
---|---|---|
isVat |
Boolean |
- Source:
(static) Order#setLineItems(lineItems)
Set the field value
Line items associated with this order
Parameters:
Name | Type | Description |
---|---|---|
lineItems |
Array.<order.LineItem> | An array of |
- Source:
(static) Order#setManualTransaction(manualTransaction)
Set the field value
Whether this order represents a manual transaction. A manual transaction is a transaction that has an arbitrary amount defined and is not associated with any inventory items. For example, the Clover Sale App and Clover Manual Transaction App create manual transactions. A manual transactions will have a single associated line item to hold the sale amount, but the generated receipt will display this differently to indicate that it is not considered a typical order with inventory items.
Parameters:
Name | Type | Description |
---|---|---|
manualTransaction |
Boolean |
- Source:
(static) Order#setMerchant(merchant)
Set the field value
Parameters:
Name | Type | Description |
---|---|---|
merchant |
base.Reference |
- Source:
(static) Order#setModifiedTime(modifiedTime)
Set the field value
Last modified time of the order
Parameters:
Name | Type | Description |
---|---|---|
modifiedTime |
Number | must be a long integer |
- Source:
(static) Order#setNote(note)
Set the field value
An arbitrary string with information about this order, may be printed on the order receipt and displayed in apps
Parameters:
Name | Type | Description |
---|---|---|
note |
Null | String |
- Source:
(static) Order#setOnlineOrder(onlineOrder)
Set the field value
Parameters:
Name | Type | Description |
---|---|---|
onlineOrder |
Null | onlineorder.OnlineOrder |
- Source:
(static) Order#setOrderType(orderType)
Set the field value
Parameters:
Name | Type | Description |
---|---|---|
orderType |
Null | order.OrderType |
- Source:
(static) Order#setOrderTypeId(orderTypeId)
Set the field value
Parameters:
Name | Type | Description |
---|---|---|
orderTypeId |
Number | must be a long integer |
- Source:
(static) Order#setPayments(payments)
Set the field value
Payments that were made for this order. If multiple payments were made, then the payType field should reflect the method used to split the total amount.
Parameters:
Name | Type | Description |
---|---|---|
payments |
Array.<payments.Payment> | An array of |
- Source:
(static) Order#setPaymentState(paymentState)
Set the field value
Is this order paid or not?
Parameters:
Name | Type | Description |
---|---|---|
paymentState |
Null | order.PaymentState |
- Source:
(static) Order#setPayType(payType)
Set the field value
Possible values: SPLIT_GUEST, SPLIT_ITEM, SPLIT_CUSTOM, FULL. During the payment flow, if the user chooses to split the payment for this order, this field will be set to one of the SPLIT_* values to indicate how the full amount should be split. If the user chooses to pay for the order in full with one payment, then this field will be FULL.
Parameters:
Name | Type | Description |
---|---|---|
payType |
order.PayType |
- Source:
(static) Order#setPreAuths(preAuths)
Set the field value
Pre-authorizations associated with this order
Parameters:
Name | Type | Description |
---|---|---|
preAuths |
Array.<payments.Payment> | An array of |
- Source:
(static) Order#setPrintGroups(printGroups)
Set the field value
Print groups for line items of this order.
Parameters:
Name | Type | Description |
---|---|---|
printGroups |
Array.<order.PrintGroup> | An array of |
- Source:
(static) Order#setRefunds(refunds)
Set the field value
Refunds that were made for this order
Parameters:
Name | Type | Description |
---|---|---|
refunds |
Array.<payments.Refund> | An array of |
- Source:
(static) Order#setServiceCharge(serviceCharge)
Set the field value
Optional service charge (gratuity) applied to this order
Parameters:
Name | Type | Description |
---|---|---|
serviceCharge |
Null | base.ServiceCharge |
- Source:
(static) Order#setState(state)
Set the field value
A String generally describing the state of the Order. When creating an Order, the value must be manually set to "open". If no value is set, the state defaults to null, which indicates an unfinished Order. An unfinished order is not displayed in user interfaces and can only be retrieved by its id. Non-null values such as "open" and "locked" are not checked or enforced by the server. Therefore, these values should not be used to make any logical decisions about the Order.
Parameters:
Name | Type | Description |
---|---|---|
state |
Null | String |
- Source:
(static) Order#setTaxRemoved(taxRemoved)
Set the field value
If true then this order should not have taxes applied to it
Parameters:
Name | Type | Description |
---|---|---|
taxRemoved |
Boolean |
- Source:
(static) Order#setTestMode(testMode)
Set the field value
Whether this order was created in test mode. Payments made against test orders are not processed. Test mode orders can be deleted from the Orders App on the merchant's device or web dashboard (https://www.clover.com/orders/m/{mId}/orders). They will also be deleted when the device sends a POST to the /v2/merchant/{mId}/orders/delete_all_tests endpoint.
Parameters:
Name | Type | Description |
---|---|---|
testMode |
Boolean |
- Source:
(static) Order#setTitle(title)
Set the field value
Parameters:
Name | Type | Description |
---|---|---|
title |
Null | String |
- Source:
(static) Order#setTotal(total)
Set the field value
Total price of the order in cents
Parameters:
Name | Type | Description |
---|---|---|
total |
Null | Number | must be a long integer |
- Source:
(static) Order#setUnpaidBalance(unpaidBalance)
Set the field value
The net of orders with payment minus the amount collected. Includes refunds, manual refunds, tax, tip, service charge, non-revenue items, paid gift card activations and loads and discounts
Parameters:
Name | Type | Description |
---|---|---|
unpaidBalance |
Null | Number | must be a long integer |
- Source:
(static) Order#setVoids(voids)
Set the field value
Voided payments associated with this order
Parameters:
Name | Type | Description |
---|---|---|
voids |
Array.<payments.Payment> | An array of |
- Source: