@puppi/adapter-square 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +35 -2
- package/dist/define.d.ts +18 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +12 -0
- package/dist/define.js.map +1 -0
- package/dist/index.d.ts +155 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +118 -0
- package/dist/index.js.map +1 -0
- package/dist/openapi.d.ts +4583 -0
- package/dist/openapi.d.ts.map +1 -0
- package/dist/openapi.js +6 -0
- package/dist/openapi.js.map +1 -0
- package/dist/operations.d.ts +17 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +57 -0
- package/dist/operations.js.map +1 -0
- package/package.json +47 -3
|
@@ -0,0 +1,4583 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export type paths = {
|
|
6
|
+
"/v2/customers": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* ListCustomers
|
|
15
|
+
* @description Lists customer profiles associated with a Square account.
|
|
16
|
+
*
|
|
17
|
+
* Under normal operating conditions, newly created or updated customer profiles become available
|
|
18
|
+
* for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated
|
|
19
|
+
* profiles can take closer to one minute or longer, especially during network incidents and outages.
|
|
20
|
+
*/
|
|
21
|
+
get: operations["ListCustomers"];
|
|
22
|
+
put?: never;
|
|
23
|
+
post?: never;
|
|
24
|
+
delete?: never;
|
|
25
|
+
options?: never;
|
|
26
|
+
head?: never;
|
|
27
|
+
patch?: never;
|
|
28
|
+
trace?: never;
|
|
29
|
+
};
|
|
30
|
+
"/v2/locations": {
|
|
31
|
+
parameters: {
|
|
32
|
+
query?: never;
|
|
33
|
+
header?: never;
|
|
34
|
+
path?: never;
|
|
35
|
+
cookie?: never;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* ListLocations
|
|
39
|
+
* @description Provides details about all of the seller's [locations](https://developer.squareup.com/docs/locations-api),
|
|
40
|
+
* including those with an inactive status. Locations are listed alphabetically by `name`.
|
|
41
|
+
*/
|
|
42
|
+
get: operations["ListLocations"];
|
|
43
|
+
put?: never;
|
|
44
|
+
post?: never;
|
|
45
|
+
delete?: never;
|
|
46
|
+
options?: never;
|
|
47
|
+
head?: never;
|
|
48
|
+
patch?: never;
|
|
49
|
+
trace?: never;
|
|
50
|
+
};
|
|
51
|
+
"/v2/orders/search": {
|
|
52
|
+
parameters: {
|
|
53
|
+
query?: never;
|
|
54
|
+
header?: never;
|
|
55
|
+
path?: never;
|
|
56
|
+
cookie?: never;
|
|
57
|
+
};
|
|
58
|
+
get?: never;
|
|
59
|
+
put?: never;
|
|
60
|
+
/**
|
|
61
|
+
* SearchOrders
|
|
62
|
+
* @description Search all orders for one or more locations. Orders include all sales,
|
|
63
|
+
* returns, and exchanges regardless of how or when they entered the Square
|
|
64
|
+
* ecosystem (such as Point of Sale, Invoices, and Connect APIs).
|
|
65
|
+
*
|
|
66
|
+
* `SearchOrders` requests need to specify which locations to search and define a
|
|
67
|
+
* [SearchOrdersQuery](entity:SearchOrdersQuery) object that controls
|
|
68
|
+
* how to sort or filter the results. Your `SearchOrdersQuery` can:
|
|
69
|
+
*
|
|
70
|
+
* Set filter criteria.
|
|
71
|
+
* Set the sort order.
|
|
72
|
+
* Determine whether to return results as complete `Order` objects or as
|
|
73
|
+
* [OrderEntry](entity:OrderEntry) objects.
|
|
74
|
+
*
|
|
75
|
+
* Note that details for orders processed with Square Point of Sale while in
|
|
76
|
+
* offline mode might not be transmitted to Square for up to 72 hours. Offline
|
|
77
|
+
* orders have a `created_at` value that reflects the time the order was
|
|
78
|
+
* transmitted to Square and created server-side, not the time the order was
|
|
79
|
+
* created on the Point of Sale device.
|
|
80
|
+
*/
|
|
81
|
+
post: operations["SearchOrders"];
|
|
82
|
+
delete?: never;
|
|
83
|
+
options?: never;
|
|
84
|
+
head?: never;
|
|
85
|
+
patch?: never;
|
|
86
|
+
trace?: never;
|
|
87
|
+
};
|
|
88
|
+
"/v2/payments": {
|
|
89
|
+
parameters: {
|
|
90
|
+
query?: never;
|
|
91
|
+
header?: never;
|
|
92
|
+
path?: never;
|
|
93
|
+
cookie?: never;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* ListPayments
|
|
97
|
+
* @description Retrieves a list of payments taken by the account making the request.
|
|
98
|
+
*
|
|
99
|
+
* Results are eventually consistent, and new payments or changes to payments might take several
|
|
100
|
+
* seconds to appear.
|
|
101
|
+
*
|
|
102
|
+
* The maximum results per page is 100.
|
|
103
|
+
*/
|
|
104
|
+
get: operations["ListPayments"];
|
|
105
|
+
put?: never;
|
|
106
|
+
post?: never;
|
|
107
|
+
delete?: never;
|
|
108
|
+
options?: never;
|
|
109
|
+
head?: never;
|
|
110
|
+
patch?: never;
|
|
111
|
+
trace?: never;
|
|
112
|
+
};
|
|
113
|
+
"/v2/refunds": {
|
|
114
|
+
parameters: {
|
|
115
|
+
query?: never;
|
|
116
|
+
header?: never;
|
|
117
|
+
path?: never;
|
|
118
|
+
cookie?: never;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* ListPaymentRefunds
|
|
122
|
+
* @description Retrieves a list of refunds for the account making the request.
|
|
123
|
+
*
|
|
124
|
+
* Results are eventually consistent, and new refunds or changes to refunds might take several
|
|
125
|
+
* seconds to appear.
|
|
126
|
+
*
|
|
127
|
+
* The maximum results per page is 100.
|
|
128
|
+
*/
|
|
129
|
+
get: operations["ListPaymentRefunds"];
|
|
130
|
+
put?: never;
|
|
131
|
+
post?: never;
|
|
132
|
+
delete?: never;
|
|
133
|
+
options?: never;
|
|
134
|
+
head?: never;
|
|
135
|
+
patch?: never;
|
|
136
|
+
trace?: never;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export type webhooks = Record<string, never>;
|
|
140
|
+
export type components = {
|
|
141
|
+
schemas: {
|
|
142
|
+
/** @description ACH-specific details about `BANK_ACCOUNT` type payments with the `transfer_type` of `ACH`. */
|
|
143
|
+
ACHDetails: {
|
|
144
|
+
/** @description The routing number for the bank account. */
|
|
145
|
+
routing_number?: string | null;
|
|
146
|
+
/** @description The last few digits of the bank account number. */
|
|
147
|
+
account_number_suffix?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* @description The type of the bank account performing the transfer. The account type can be `CHECKING`,
|
|
150
|
+
* `SAVINGS`, or `UNKNOWN`.
|
|
151
|
+
*/
|
|
152
|
+
account_type?: string | null;
|
|
153
|
+
};
|
|
154
|
+
/** @description Represents an additional recipient (other than the merchant) receiving a portion of this tender. */
|
|
155
|
+
AdditionalRecipient: {
|
|
156
|
+
/** @description The location ID for a recipient (other than the merchant) receiving a portion of this tender. */
|
|
157
|
+
location_id: string;
|
|
158
|
+
/** @description The description of the additional recipient. */
|
|
159
|
+
description?: string | null;
|
|
160
|
+
/** @description The amount of money distributed to the recipient. */
|
|
161
|
+
amount_money: components["schemas"]["Money"];
|
|
162
|
+
/** @description The unique ID for the RETIRED `AdditionalRecipientReceivable` object. This field should be empty for any `AdditionalRecipient` objects created after the retirement. */
|
|
163
|
+
receivable_id?: string | null;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* @description Represents a postal address in a country.
|
|
167
|
+
* For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses).
|
|
168
|
+
*/
|
|
169
|
+
Address: {
|
|
170
|
+
/**
|
|
171
|
+
* @description The first line of the address.
|
|
172
|
+
*
|
|
173
|
+
* Fields that start with `address_line` provide the address's most specific
|
|
174
|
+
* details, like street number, street name, and building name. They do *not*
|
|
175
|
+
* provide less specific details like city, state/province, or country (these
|
|
176
|
+
* details are provided in other fields).
|
|
177
|
+
*/
|
|
178
|
+
address_line_1?: string | null;
|
|
179
|
+
/** @description The second line of the address, if any. */
|
|
180
|
+
address_line_2?: string | null;
|
|
181
|
+
/** @description The third line of the address, if any. */
|
|
182
|
+
address_line_3?: string | null;
|
|
183
|
+
/** @description The city or town of the address. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). */
|
|
184
|
+
locality?: string | null;
|
|
185
|
+
/** @description A civil region within the address's `locality`, if any. */
|
|
186
|
+
sublocality?: string | null;
|
|
187
|
+
/** @description A civil region within the address's `sublocality`, if any. */
|
|
188
|
+
sublocality_2?: string | null;
|
|
189
|
+
/** @description A civil region within the address's `sublocality_2`, if any. */
|
|
190
|
+
sublocality_3?: string | null;
|
|
191
|
+
/**
|
|
192
|
+
* @description A civil entity within the address's country. In the US, this
|
|
193
|
+
* is the state. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses).
|
|
194
|
+
*/
|
|
195
|
+
administrative_district_level_1?: string | null;
|
|
196
|
+
/**
|
|
197
|
+
* @description A civil entity within the address's `administrative_district_level_1`.
|
|
198
|
+
* In the US, this is the county.
|
|
199
|
+
*/
|
|
200
|
+
administrative_district_level_2?: string | null;
|
|
201
|
+
/**
|
|
202
|
+
* @description A civil entity within the address's `administrative_district_level_2`,
|
|
203
|
+
* if any.
|
|
204
|
+
*/
|
|
205
|
+
administrative_district_level_3?: string | null;
|
|
206
|
+
/** @description The address's postal code. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). */
|
|
207
|
+
postal_code?: string | null;
|
|
208
|
+
/**
|
|
209
|
+
* @description The address's country, in the two-letter format of ISO 3166. For example, `US` or `FR`.
|
|
210
|
+
* See [Country](#type-country) for possible values
|
|
211
|
+
*/
|
|
212
|
+
country?: components["schemas"]["Country"];
|
|
213
|
+
/** @description Optional first name when it's representing recipient. */
|
|
214
|
+
first_name?: string | null;
|
|
215
|
+
/** @description Optional last name when it's representing recipient. */
|
|
216
|
+
last_name?: string | null;
|
|
217
|
+
};
|
|
218
|
+
/** @description Additional details about Afterpay payments. */
|
|
219
|
+
AfterpayDetails: {
|
|
220
|
+
/** @description Email address on the buyer's Afterpay account. */
|
|
221
|
+
email_address?: string | null;
|
|
222
|
+
};
|
|
223
|
+
/** @description Details about the application that took the payment. */
|
|
224
|
+
ApplicationDetails: {
|
|
225
|
+
/**
|
|
226
|
+
* @description The Square product, such as Square Point of Sale (POS),
|
|
227
|
+
* Square Invoices, or Square Virtual Terminal.
|
|
228
|
+
* See [ExternalSquareProduct](#type-externalsquareproduct) for possible values
|
|
229
|
+
*/
|
|
230
|
+
square_product?: components["schemas"]["ApplicationDetailsExternalSquareProduct"];
|
|
231
|
+
/**
|
|
232
|
+
* @description The Square ID assigned to the application used to take the payment.
|
|
233
|
+
* Application developers can use this information to identify payments that
|
|
234
|
+
* their application processed.
|
|
235
|
+
* For example, if a developer uses a custom application to process payments,
|
|
236
|
+
* this field contains the application ID from the Developer Dashboard.
|
|
237
|
+
* If a seller uses a [Square App Marketplace](https://developer.squareup.com/docs/app-marketplace)
|
|
238
|
+
* application to process payments, the field contains the corresponding application ID.
|
|
239
|
+
*/
|
|
240
|
+
application_id?: string | null;
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* @description A list of products to return to external callers.
|
|
244
|
+
* @enum {string}
|
|
245
|
+
*/
|
|
246
|
+
ApplicationDetailsExternalSquareProduct: "APPOINTMENTS" | "ECOMMERCE_API" | "INVOICES" | "ONLINE_STORE" | "OTHER" | "RESTAURANTS" | "RETAIL" | "SQUARE_POS" | "TERMINAL_API" | "VIRTUAL_TERMINAL";
|
|
247
|
+
/** @description Additional details about BANK_ACCOUNT type payments. */
|
|
248
|
+
BankAccountPaymentDetails: {
|
|
249
|
+
/** @description The name of the bank associated with the bank account. */
|
|
250
|
+
bank_name?: string | null;
|
|
251
|
+
/** @description The type of the bank transfer. The type can be `ACH` or `UNKNOWN`. */
|
|
252
|
+
transfer_type?: string | null;
|
|
253
|
+
/**
|
|
254
|
+
* @description The ownership type of the bank account performing the transfer.
|
|
255
|
+
* The type can be `INDIVIDUAL`, `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`.
|
|
256
|
+
*/
|
|
257
|
+
account_ownership_type?: string | null;
|
|
258
|
+
/**
|
|
259
|
+
* @description Uniquely identifies the bank account for this seller and can be used
|
|
260
|
+
* to determine if payments are from the same bank account.
|
|
261
|
+
*/
|
|
262
|
+
fingerprint?: string | null;
|
|
263
|
+
/** @description The two-letter ISO code representing the country the bank account is located in. */
|
|
264
|
+
country?: string | null;
|
|
265
|
+
/** @description The statement description as sent to the bank. */
|
|
266
|
+
statement_description?: string | null;
|
|
267
|
+
/**
|
|
268
|
+
* @description ACH-specific information about the transfer. The information is only populated
|
|
269
|
+
* if the `transfer_type` is `ACH`.
|
|
270
|
+
*/
|
|
271
|
+
ach_details?: components["schemas"]["ACHDetails"];
|
|
272
|
+
/** @description Information about errors encountered during the request. */
|
|
273
|
+
errors?: components["schemas"]["Error"][] | null;
|
|
274
|
+
};
|
|
275
|
+
/** @description The hours of operation for a location. */
|
|
276
|
+
BusinessHours: {
|
|
277
|
+
/** @description The list of time periods during which the business is open. There can be at most 10 periods per day. */
|
|
278
|
+
periods?: components["schemas"]["BusinessHoursPeriod"][] | null;
|
|
279
|
+
};
|
|
280
|
+
/** @description Represents a period of time during which a business location is open. */
|
|
281
|
+
BusinessHoursPeriod: {
|
|
282
|
+
/**
|
|
283
|
+
* @description The day of the week for this time period.
|
|
284
|
+
* See [DayOfWeek](#type-dayofweek) for possible values
|
|
285
|
+
*/
|
|
286
|
+
day_of_week?: components["schemas"]["DayOfWeek"];
|
|
287
|
+
/**
|
|
288
|
+
* @description The start time of a business hours period, specified in local time using partial-time
|
|
289
|
+
* RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.
|
|
290
|
+
* Note that the seconds value is always :00, but it is appended for conformance to the RFC.
|
|
291
|
+
*/
|
|
292
|
+
start_local_time?: string | null;
|
|
293
|
+
/**
|
|
294
|
+
* @description The end time of a business hours period, specified in local time using partial-time
|
|
295
|
+
* RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.
|
|
296
|
+
* Note that the seconds value is always :00, but it is appended for conformance to the RFC.
|
|
297
|
+
*/
|
|
298
|
+
end_local_time?: string | null;
|
|
299
|
+
};
|
|
300
|
+
/** @description Additional details about a Buy Now Pay Later payment type. */
|
|
301
|
+
BuyNowPayLaterDetails: {
|
|
302
|
+
/**
|
|
303
|
+
* @description The brand used for the Buy Now Pay Later payment.
|
|
304
|
+
* The brand can be `AFTERPAY`, `CLEARPAY` or `UNKNOWN`.
|
|
305
|
+
*/
|
|
306
|
+
brand?: string | null;
|
|
307
|
+
/**
|
|
308
|
+
* @description Details about an Afterpay payment. These details are only populated if the `brand` is
|
|
309
|
+
* `AFTERPAY`.
|
|
310
|
+
*/
|
|
311
|
+
afterpay_details?: components["schemas"]["AfterpayDetails"];
|
|
312
|
+
/**
|
|
313
|
+
* @description Details about a Clearpay payment. These details are only populated if the `brand` is
|
|
314
|
+
* `CLEARPAY`.
|
|
315
|
+
*/
|
|
316
|
+
clearpay_details?: components["schemas"]["ClearpayDetails"];
|
|
317
|
+
/** @description Information about errors encountered during the payment. */
|
|
318
|
+
readonly errors?: components["schemas"]["Error"][];
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* @description Represents the payment details of a card to be used for payments. These
|
|
322
|
+
* details are determined by the payment token generated by Web Payments SDK.
|
|
323
|
+
*/
|
|
324
|
+
Card: {
|
|
325
|
+
/** @description Unique ID for this card. Generated by Square. */
|
|
326
|
+
readonly id?: string;
|
|
327
|
+
/**
|
|
328
|
+
* @description The card's brand.
|
|
329
|
+
* See [CardBrand](#type-cardbrand) for possible values
|
|
330
|
+
*/
|
|
331
|
+
readonly card_brand?: components["schemas"]["CardBrand"];
|
|
332
|
+
/** @description The last 4 digits of the card number. */
|
|
333
|
+
readonly last_4?: string;
|
|
334
|
+
/**
|
|
335
|
+
* Format: int64
|
|
336
|
+
* @description The expiration month of the associated card as an integer between 1 and 12.
|
|
337
|
+
*/
|
|
338
|
+
exp_month?: number | null;
|
|
339
|
+
/**
|
|
340
|
+
* Format: int64
|
|
341
|
+
* @description The four-digit year of the card's expiration date.
|
|
342
|
+
*/
|
|
343
|
+
exp_year?: number | null;
|
|
344
|
+
/** @description The name of the cardholder. */
|
|
345
|
+
cardholder_name?: string | null;
|
|
346
|
+
/**
|
|
347
|
+
* @description The billing address for this card. `US` postal codes can be provided as a 5-digit zip code
|
|
348
|
+
* or 9-digit ZIP+4 (example: `12345-6789`). For a full list of field meanings by country, see
|
|
349
|
+
* [Working with Addresses](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-addresses).
|
|
350
|
+
*/
|
|
351
|
+
billing_address?: components["schemas"]["Address"];
|
|
352
|
+
/**
|
|
353
|
+
* @description Intended as a Square-assigned identifier, based
|
|
354
|
+
* on the card number, to identify the card across multiple locations within a
|
|
355
|
+
* single application.
|
|
356
|
+
*/
|
|
357
|
+
readonly fingerprint?: string;
|
|
358
|
+
/** @description **Required** The ID of a [customer](entity:Customer) to be associated with the card. */
|
|
359
|
+
customer_id?: string | null;
|
|
360
|
+
/** @description The ID of the merchant associated with the card. */
|
|
361
|
+
readonly merchant_id?: string;
|
|
362
|
+
/**
|
|
363
|
+
* @description An optional user-defined reference ID that associates this card with
|
|
364
|
+
* another entity in an external system. For example, a customer ID from an
|
|
365
|
+
* external customer management system.
|
|
366
|
+
*/
|
|
367
|
+
reference_id?: string | null;
|
|
368
|
+
/** @description Indicates whether or not a card can be used for payments. */
|
|
369
|
+
readonly enabled?: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* @description The type of the card.
|
|
372
|
+
* The Card object includes this field only in response to Payments API calls.
|
|
373
|
+
* See [CardType](#type-cardtype) for possible values
|
|
374
|
+
*/
|
|
375
|
+
readonly card_type?: components["schemas"]["CardType"];
|
|
376
|
+
/**
|
|
377
|
+
* @description Indicates whether the card is prepaid or not.
|
|
378
|
+
* See [CardPrepaidType](#type-cardprepaidtype) for possible values
|
|
379
|
+
*/
|
|
380
|
+
readonly prepaid_type?: components["schemas"]["CardPrepaidType"];
|
|
381
|
+
/**
|
|
382
|
+
* @description The first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API
|
|
383
|
+
* returns this field.
|
|
384
|
+
*/
|
|
385
|
+
readonly bin?: string;
|
|
386
|
+
/** @description Timestamp for when the card object was created on Square’s servers. In RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z". */
|
|
387
|
+
readonly created_at?: string;
|
|
388
|
+
/** @description Timestamp for when the card object was disabled on Square’s servers. In RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z". */
|
|
389
|
+
readonly disabled_at?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Format: int64
|
|
392
|
+
* @description Current version number of the card. Increments with each card update. Requests to update an
|
|
393
|
+
* existing Card object will be rejected unless the version in the request matches the current
|
|
394
|
+
* version for the Card.
|
|
395
|
+
*/
|
|
396
|
+
version?: number;
|
|
397
|
+
/**
|
|
398
|
+
* @description The card's co-brand if available. For example, an Afterpay virtual card would have a
|
|
399
|
+
* co-brand of AFTERPAY.
|
|
400
|
+
* See [CardCoBrand](#type-cardcobrand) for possible values
|
|
401
|
+
*/
|
|
402
|
+
readonly card_co_brand?: components["schemas"]["CardCoBrand"];
|
|
403
|
+
/**
|
|
404
|
+
* @description An alert from the issuing bank about the card status. Alerts can indicate whether
|
|
405
|
+
* future charges to the card are likely to fail. For more information, see
|
|
406
|
+
* [Manage Card on File Declines](https://developer.squareup.com/docs/cards-api/manage-card-on-file-declines).
|
|
407
|
+
*
|
|
408
|
+
* This field is present only if there's an active issuer alert.
|
|
409
|
+
* See [IssuerAlert](#type-issueralert) for possible values
|
|
410
|
+
*/
|
|
411
|
+
readonly issuer_alert?: components["schemas"]["CardIssuerAlert"];
|
|
412
|
+
/**
|
|
413
|
+
* @description The timestamp of when the current issuer alert was received and processed, in
|
|
414
|
+
* RFC 3339 format.
|
|
415
|
+
*
|
|
416
|
+
* This field is present only if there's an active issuer alert.
|
|
417
|
+
*/
|
|
418
|
+
readonly issuer_alert_at?: string;
|
|
419
|
+
/**
|
|
420
|
+
* @description Indicates whether the card is linked to a Health Savings Account (HSA) or Flexible
|
|
421
|
+
* Spending Account (FSA), based on the card BIN.
|
|
422
|
+
*/
|
|
423
|
+
readonly hsa_fsa?: boolean;
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* @description Indicates a card's brand, such as `VISA` or `MASTERCARD`.
|
|
427
|
+
* @enum {string}
|
|
428
|
+
*/
|
|
429
|
+
CardBrand: "OTHER_BRAND" | "VISA" | "MASTERCARD" | "AMERICAN_EXPRESS" | "DISCOVER" | "DISCOVER_DINERS" | "JCB" | "CHINA_UNIONPAY" | "SQUARE_GIFT_CARD" | "SQUARE_CAPITAL_CARD" | "INTERAC" | "EFTPOS" | "FELICA" | "EBT" | "QUICPAY" | "ID" | "TRANSPORTATION_IC" | "CARNET";
|
|
430
|
+
/**
|
|
431
|
+
* @description Indicates the brand for a co-branded card.
|
|
432
|
+
* @enum {string}
|
|
433
|
+
*/
|
|
434
|
+
CardCoBrand: "UNKNOWN" | "AFTERPAY" | "CLEARPAY";
|
|
435
|
+
/**
|
|
436
|
+
* @description Indicates the type of issuer alert for a [card on file](entity:Card).
|
|
437
|
+
* @enum {string}
|
|
438
|
+
*/
|
|
439
|
+
CardIssuerAlert: "ISSUER_ALERT_CARD_CLOSED";
|
|
440
|
+
/** @description Reflects the current status of a card payment. Contains only non-confidential information. */
|
|
441
|
+
CardPaymentDetails: {
|
|
442
|
+
/**
|
|
443
|
+
* @description The card payment's current state. The state can be AUTHORIZED, CAPTURED, VOIDED, or
|
|
444
|
+
* FAILED.
|
|
445
|
+
*/
|
|
446
|
+
readonly status?: string;
|
|
447
|
+
/** @description The credit card's non-confidential details. */
|
|
448
|
+
readonly card?: components["schemas"]["Card"];
|
|
449
|
+
/**
|
|
450
|
+
* @description The method used to enter the card's details for the payment. The method can be
|
|
451
|
+
* `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
|
|
452
|
+
*/
|
|
453
|
+
readonly entry_method?: string;
|
|
454
|
+
/**
|
|
455
|
+
* @description The status code returned from the Card Verification Value (CVV) check. The code can be
|
|
456
|
+
* `CVV_ACCEPTED`, `CVV_REJECTED`, or `CVV_NOT_CHECKED`.
|
|
457
|
+
*/
|
|
458
|
+
readonly cvv_status?: string;
|
|
459
|
+
/**
|
|
460
|
+
* @description The status code returned from the Address Verification System (AVS) check. The code can be
|
|
461
|
+
* `AVS_ACCEPTED`, `AVS_REJECTED`, or `AVS_NOT_CHECKED`.
|
|
462
|
+
*/
|
|
463
|
+
readonly avs_status?: string;
|
|
464
|
+
/**
|
|
465
|
+
* @description The status code returned by the card issuer that describes the payment's
|
|
466
|
+
* authorization status.
|
|
467
|
+
*/
|
|
468
|
+
readonly auth_result_code?: string;
|
|
469
|
+
/** @description For EMV payments, the application ID identifies the EMV application used for the payment. */
|
|
470
|
+
readonly application_identifier?: string;
|
|
471
|
+
/** @description For EMV payments, the human-readable name of the EMV application used for the payment. */
|
|
472
|
+
readonly application_name?: string;
|
|
473
|
+
/** @description For EMV payments, the cryptogram generated for the payment. */
|
|
474
|
+
readonly application_cryptogram?: string;
|
|
475
|
+
/**
|
|
476
|
+
* @description For EMV payments, the method used to verify the cardholder's identity. The method can be
|
|
477
|
+
* `PIN`, `SIGNATURE`, `PIN_AND_SIGNATURE`, `ON_DEVICE`, or `NONE`.
|
|
478
|
+
*/
|
|
479
|
+
readonly verification_method?: string;
|
|
480
|
+
/**
|
|
481
|
+
* @description For EMV payments, the results of the cardholder verification. The result can be
|
|
482
|
+
* `SUCCESS`, `FAILURE`, or `UNKNOWN`.
|
|
483
|
+
*/
|
|
484
|
+
readonly verification_results?: string;
|
|
485
|
+
/**
|
|
486
|
+
* @description The statement description sent to the card networks.
|
|
487
|
+
*
|
|
488
|
+
* Note: The actual statement description varies and is likely to be truncated and appended with
|
|
489
|
+
* additional information on a per issuer basis.
|
|
490
|
+
*/
|
|
491
|
+
readonly statement_description?: string;
|
|
492
|
+
/**
|
|
493
|
+
* @description __Deprecated__: Use `Payment.device_details` instead.
|
|
494
|
+
*
|
|
495
|
+
* Details about the device that took the payment.
|
|
496
|
+
*/
|
|
497
|
+
device_details?: components["schemas"]["DeviceDetails"];
|
|
498
|
+
/** @description The timeline for card payments. */
|
|
499
|
+
readonly card_payment_timeline?: components["schemas"]["CardPaymentTimeline"];
|
|
500
|
+
/**
|
|
501
|
+
* @description Whether the card must be physically present for the payment to
|
|
502
|
+
* be refunded. If set to `true`, the card must be present.
|
|
503
|
+
*/
|
|
504
|
+
readonly refund_requires_card_presence?: boolean;
|
|
505
|
+
/** @description Information about errors encountered during the request. */
|
|
506
|
+
readonly errors?: components["schemas"]["Error"][];
|
|
507
|
+
/** @description Additional information about a card_surcharge on the payment. */
|
|
508
|
+
readonly applied_card_surcharge_details?: components["schemas"]["CardSurchargeDetails"];
|
|
509
|
+
/**
|
|
510
|
+
* @description The type of digital wallet used for this card payment, if applicable.
|
|
511
|
+
* Currently only populated for in-person Apple Pay payments. Detection has no false
|
|
512
|
+
* positives but may have false negatives (some Apple Pay payments may not be detected).
|
|
513
|
+
*
|
|
514
|
+
* For payments with `source_type` of `WALLET`, see `DigitalWalletDetails` instead.
|
|
515
|
+
*
|
|
516
|
+
* Values: `APPLE_PAY`
|
|
517
|
+
*/
|
|
518
|
+
readonly wallet_type?: string;
|
|
519
|
+
};
|
|
520
|
+
/** @description The timeline for card payments. */
|
|
521
|
+
CardPaymentTimeline: {
|
|
522
|
+
/** @description The timestamp when the payment was authorized, in RFC 3339 format. */
|
|
523
|
+
authorized_at?: string | null;
|
|
524
|
+
/** @description The timestamp when the payment was captured, in RFC 3339 format. */
|
|
525
|
+
captured_at?: string | null;
|
|
526
|
+
/** @description The timestamp when the payment was voided, in RFC 3339 format. */
|
|
527
|
+
voided_at?: string | null;
|
|
528
|
+
};
|
|
529
|
+
/**
|
|
530
|
+
* @description Indicates a card's prepaid type, such as `NOT_PREPAID` or `PREPAID`.
|
|
531
|
+
* @enum {string}
|
|
532
|
+
*/
|
|
533
|
+
CardPrepaidType: "UNKNOWN_PREPAID_TYPE" | "NOT_PREPAID" | "PREPAID";
|
|
534
|
+
/**
|
|
535
|
+
* @description Details related to an attempt to apply a card surcharge to this payment. When surcharge
|
|
536
|
+
* eligibility is not known in advance, such as when the card type (debit or credit) is required
|
|
537
|
+
* to make the eligibility determination, proposed_card_surcharge_money and
|
|
538
|
+
* proposed_additional_amount_money will match the values in the request, while card_surcharge_money
|
|
539
|
+
* and additional_amount_money are present only when the payment has a surcharge applied.
|
|
540
|
+
*/
|
|
541
|
+
CardSurchargeDetails: {
|
|
542
|
+
/**
|
|
543
|
+
* @description A specific surcharge levied by the merchant, if a card payment is used, instead of cash or
|
|
544
|
+
* some other payment type. Should only include the base surcharge amount. Any additional fees related
|
|
545
|
+
* to the surcharge (e.g. taxes on the surcharge) should only be included in the additional_amount_money.
|
|
546
|
+
* This amount is specified in the smallest denomination of the applicable currency (for example,
|
|
547
|
+
* US dollar amounts are specified in cents). For more information, see
|
|
548
|
+
* [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
|
|
549
|
+
* The currency code must match the currency associated with the business that is accepting the
|
|
550
|
+
* payment.
|
|
551
|
+
*/
|
|
552
|
+
card_surcharge_money?: components["schemas"]["Money"];
|
|
553
|
+
};
|
|
554
|
+
/**
|
|
555
|
+
* @description Indicates a card's type, such as `CREDIT` or `DEBIT`.
|
|
556
|
+
* @enum {string}
|
|
557
|
+
*/
|
|
558
|
+
CardType: "UNKNOWN_CARD_TYPE" | "CREDIT" | "DEBIT";
|
|
559
|
+
/** @description Additional details about `WALLET` type payments with the `brand` of `CASH_APP`. */
|
|
560
|
+
CashAppDetails: {
|
|
561
|
+
/** @description The name of the Cash App account holder. */
|
|
562
|
+
buyer_full_name?: string | null;
|
|
563
|
+
/**
|
|
564
|
+
* @description The country of the Cash App account holder, in ISO 3166-1-alpha-2 format.
|
|
565
|
+
*
|
|
566
|
+
* For possible values, see [Country](entity:Country).
|
|
567
|
+
*/
|
|
568
|
+
buyer_country_code?: string | null;
|
|
569
|
+
/** @description $Cashtag of the Cash App account holder. */
|
|
570
|
+
readonly buyer_cashtag?: string;
|
|
571
|
+
};
|
|
572
|
+
/**
|
|
573
|
+
* @description Stores details about a cash payment. Contains only non-confidential information. For more information, see
|
|
574
|
+
* [Take Cash Payments](https://developer.squareup.com/docs/payments-api/take-payments/cash-payments).
|
|
575
|
+
*/
|
|
576
|
+
CashPaymentDetails: {
|
|
577
|
+
/** @description The amount and currency of the money supplied by the buyer. */
|
|
578
|
+
buyer_supplied_money: components["schemas"]["Money"];
|
|
579
|
+
/**
|
|
580
|
+
* @description The amount of change due back to the buyer.
|
|
581
|
+
* This read-only field is calculated
|
|
582
|
+
* from the `amount_money` and `buyer_supplied_money` fields.
|
|
583
|
+
*/
|
|
584
|
+
readonly change_back_money?: components["schemas"]["Money"];
|
|
585
|
+
};
|
|
586
|
+
/** @description Additional details about Clearpay payments. */
|
|
587
|
+
ClearpayDetails: {
|
|
588
|
+
/** @description Email address on the buyer's Clearpay account. */
|
|
589
|
+
email_address?: string | null;
|
|
590
|
+
};
|
|
591
|
+
/** @description Latitude and longitude coordinates. */
|
|
592
|
+
Coordinates: {
|
|
593
|
+
/** @description The latitude of the coordinate expressed in degrees. */
|
|
594
|
+
latitude?: number | null;
|
|
595
|
+
/** @description The longitude of the coordinate expressed in degrees. */
|
|
596
|
+
longitude?: number | null;
|
|
597
|
+
};
|
|
598
|
+
/**
|
|
599
|
+
* @description Indicates the country associated with another entity, such as a business.
|
|
600
|
+
* Values are in [ISO 3166-1-alpha-2 format](http://www.iso.org/iso/home/standards/country_codes.htm).
|
|
601
|
+
* @enum {string}
|
|
602
|
+
*/
|
|
603
|
+
Country: "ZZ" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
|
604
|
+
/**
|
|
605
|
+
* @description Indicates the associated currency for an amount of money. Values correspond
|
|
606
|
+
* to [ISO 4217](https://wikipedia.org/wiki/ISO_4217).
|
|
607
|
+
* @enum {string}
|
|
608
|
+
*/
|
|
609
|
+
Currency: "UNKNOWN_CURRENCY" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYR" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LVL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SLE" | "SOS" | "SRD" | "SSP" | "STD" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "USS" | "UYI" | "UYU" | "UZS" | "VEF" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XTS" | "XXX" | "YER" | "ZAR" | "ZMK" | "ZMW" | "BTC" | "XUS";
|
|
610
|
+
/** @description Represents a Square customer profile in the Customer Directory of a Square seller. */
|
|
611
|
+
Customer: {
|
|
612
|
+
/**
|
|
613
|
+
* @description A unique Square-assigned ID for the customer profile.
|
|
614
|
+
*
|
|
615
|
+
* If you need this ID for an API request, use the ID returned when you created the customer profile or call the [SearchCustomers](api-endpoint:Customers-SearchCustomers)
|
|
616
|
+
* or [ListCustomers](api-endpoint:Customers-ListCustomers) endpoint.
|
|
617
|
+
*/
|
|
618
|
+
id?: string;
|
|
619
|
+
/** @description The timestamp when the customer profile was created, in RFC 3339 format. */
|
|
620
|
+
readonly created_at?: string;
|
|
621
|
+
/** @description The timestamp when the customer profile was last updated, in RFC 3339 format. */
|
|
622
|
+
readonly updated_at?: string;
|
|
623
|
+
/** @description The given name (that is, the first name) associated with the customer profile. */
|
|
624
|
+
given_name?: string | null;
|
|
625
|
+
/** @description The family name (that is, the last name) associated with the customer profile. */
|
|
626
|
+
family_name?: string | null;
|
|
627
|
+
/** @description A nickname for the customer profile. */
|
|
628
|
+
nickname?: string | null;
|
|
629
|
+
/** @description A business name associated with the customer profile. */
|
|
630
|
+
company_name?: string | null;
|
|
631
|
+
/** @description The email address associated with the customer profile. */
|
|
632
|
+
email_address?: string | null;
|
|
633
|
+
/** @description The physical address associated with the customer profile. */
|
|
634
|
+
address?: components["schemas"]["Address"];
|
|
635
|
+
/** @description The phone number associated with the customer profile. */
|
|
636
|
+
phone_number?: string | null;
|
|
637
|
+
/**
|
|
638
|
+
* @description The birthday associated with the customer profile, in `YYYY-MM-DD` format. For example, `1998-09-21`
|
|
639
|
+
* represents September 21, 1998, and `0000-09-21` represents September 21 (without a birth year).
|
|
640
|
+
*/
|
|
641
|
+
birthday?: string | null;
|
|
642
|
+
/**
|
|
643
|
+
* @description An optional second ID used to associate the customer profile with an
|
|
644
|
+
* entity in another system.
|
|
645
|
+
*/
|
|
646
|
+
reference_id?: string | null;
|
|
647
|
+
/** @description A custom note associated with the customer profile. */
|
|
648
|
+
note?: string | null;
|
|
649
|
+
/** @description Represents general customer preferences. */
|
|
650
|
+
preferences?: components["schemas"]["CustomerPreferences"];
|
|
651
|
+
/**
|
|
652
|
+
* @description The method used to create the customer profile.
|
|
653
|
+
* See [CustomerCreationSource](#type-customercreationsource) for possible values
|
|
654
|
+
*/
|
|
655
|
+
creation_source?: components["schemas"]["CustomerCreationSource"];
|
|
656
|
+
/** @description The IDs of [customer groups](entity:CustomerGroup) the customer belongs to. */
|
|
657
|
+
group_ids?: string[] | null;
|
|
658
|
+
/** @description The IDs of [customer segments](entity:CustomerSegment) the customer belongs to. */
|
|
659
|
+
segment_ids?: string[] | null;
|
|
660
|
+
/**
|
|
661
|
+
* Format: int64
|
|
662
|
+
* @description The Square-assigned version number of the customer profile. The version number is incremented each time an update is committed to the customer profile, except for changes to customer segment membership.
|
|
663
|
+
*/
|
|
664
|
+
version?: number;
|
|
665
|
+
/**
|
|
666
|
+
* @description The tax ID associated with the customer profile. This field is present only for customers of sellers in EU countries or the United Kingdom.
|
|
667
|
+
* For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).
|
|
668
|
+
*/
|
|
669
|
+
tax_ids?: components["schemas"]["CustomerTaxIds"];
|
|
670
|
+
};
|
|
671
|
+
/**
|
|
672
|
+
* @description Indicates the method used to create the customer profile.
|
|
673
|
+
* @enum {string}
|
|
674
|
+
*/
|
|
675
|
+
CustomerCreationSource: "OTHER" | "APPOINTMENTS" | "COUPON" | "DELETION_RECOVERY" | "DIRECTORY" | "EGIFTING" | "EMAIL_COLLECTION" | "FEEDBACK" | "IMPORT" | "INVOICES" | "LOYALTY" | "MARKETING" | "MERGE" | "ONLINE_STORE" | "INSTANT_PROFILE" | "TERMINAL" | "THIRD_PARTY" | "THIRD_PARTY_IMPORT" | "UNMERGE_RECOVERY";
|
|
676
|
+
/** @description Represents communication preferences for the customer profile. */
|
|
677
|
+
CustomerPreferences: {
|
|
678
|
+
/** @description Indicates whether the customer has unsubscribed from marketing campaign emails. A value of `true` means that the customer chose to opt out of email marketing from the current Square seller or from all Square sellers. This value is read-only from the Customers API. */
|
|
679
|
+
email_unsubscribed?: boolean | null;
|
|
680
|
+
};
|
|
681
|
+
/**
|
|
682
|
+
* @description Specifies customer attributes as the sort key to customer profiles returned from a search.
|
|
683
|
+
* @enum {string}
|
|
684
|
+
*/
|
|
685
|
+
CustomerSortField: "DEFAULT" | "CREATED_AT";
|
|
686
|
+
/**
|
|
687
|
+
* @description Represents the tax ID associated with a [customer profile](entity:Customer). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom.
|
|
688
|
+
* For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).
|
|
689
|
+
*/
|
|
690
|
+
CustomerTaxIds: {
|
|
691
|
+
/** @description The EU VAT identification number for the customer. For example, `IE3426675K`. The ID can contain alphanumeric characters only. */
|
|
692
|
+
eu_vat?: string | null;
|
|
693
|
+
};
|
|
694
|
+
/**
|
|
695
|
+
* @description Indicates the specific day of the week.
|
|
696
|
+
* @enum {string}
|
|
697
|
+
*/
|
|
698
|
+
DayOfWeek: "SUN" | "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT";
|
|
699
|
+
/** @description Details about a refund's destination. */
|
|
700
|
+
DestinationDetails: {
|
|
701
|
+
/** @description Details about a card refund. Only populated if the destination_type is `CARD`. */
|
|
702
|
+
card_details?: components["schemas"]["DestinationDetailsCardRefundDetails"];
|
|
703
|
+
/** @description Details about a cash refund. Only populated if the destination_type is `CASH`. */
|
|
704
|
+
cash_details?: components["schemas"]["DestinationDetailsCashRefundDetails"];
|
|
705
|
+
/** @description Details about an external refund. Only populated if the destination_type is `EXTERNAL`. */
|
|
706
|
+
external_details?: components["schemas"]["DestinationDetailsExternalRefundDetails"];
|
|
707
|
+
};
|
|
708
|
+
DestinationDetailsCardRefundDetails: {
|
|
709
|
+
/** @description The card's non-confidential details. */
|
|
710
|
+
card?: components["schemas"]["Card"];
|
|
711
|
+
/**
|
|
712
|
+
* @description The method used to enter the card's details for the refund. The method can be
|
|
713
|
+
* `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
|
|
714
|
+
*/
|
|
715
|
+
entry_method?: string | null;
|
|
716
|
+
/** @description The authorization code provided by the issuer when a refund is approved. */
|
|
717
|
+
auth_result_code?: string | null;
|
|
718
|
+
};
|
|
719
|
+
/** @description Stores details about a cash refund. Contains only non-confidential information. */
|
|
720
|
+
DestinationDetailsCashRefundDetails: {
|
|
721
|
+
/** @description The amount and currency of the money supplied by the seller. */
|
|
722
|
+
seller_supplied_money: components["schemas"]["Money"];
|
|
723
|
+
/**
|
|
724
|
+
* @description The amount of change due back to the seller.
|
|
725
|
+
* This read-only field is calculated
|
|
726
|
+
* from the `amount_money` and `seller_supplied_money` fields.
|
|
727
|
+
*/
|
|
728
|
+
readonly change_back_money?: components["schemas"]["Money"];
|
|
729
|
+
};
|
|
730
|
+
/** @description Stores details about an external refund. Contains only non-confidential information. */
|
|
731
|
+
DestinationDetailsExternalRefundDetails: {
|
|
732
|
+
/**
|
|
733
|
+
* @description The type of external refund the seller paid to the buyer. It can be one of the
|
|
734
|
+
* following:
|
|
735
|
+
* - CHECK - Refunded using a physical check.
|
|
736
|
+
* - BANK_TRANSFER - Refunded using external bank transfer.
|
|
737
|
+
* - OTHER\_GIFT\_CARD - Refunded using a non-Square gift card.
|
|
738
|
+
* - CRYPTO - Refunded using a crypto currency.
|
|
739
|
+
* - SQUARE_CASH - Refunded using Square Cash App.
|
|
740
|
+
* - SOCIAL - Refunded using peer-to-peer payment applications.
|
|
741
|
+
* - EXTERNAL - A third-party application gathered this refund outside of Square.
|
|
742
|
+
* - EMONEY - Refunded using an E-money provider.
|
|
743
|
+
* - CARD - A credit or debit card that Square does not support.
|
|
744
|
+
* - STORED_BALANCE - Use for house accounts, store credit, and so forth.
|
|
745
|
+
* - FOOD_VOUCHER - Restaurant voucher provided by employers to employees to pay for meals
|
|
746
|
+
* - OTHER - A type not listed here.
|
|
747
|
+
*/
|
|
748
|
+
type: string;
|
|
749
|
+
/**
|
|
750
|
+
* @description A description of the external refund source. For example,
|
|
751
|
+
* "Food Delivery Service".
|
|
752
|
+
*/
|
|
753
|
+
source: string;
|
|
754
|
+
/** @description An ID to associate the refund to its originating source. */
|
|
755
|
+
source_id?: string | null;
|
|
756
|
+
};
|
|
757
|
+
/** @description Details about the device that took the payment. */
|
|
758
|
+
DeviceDetails: {
|
|
759
|
+
/** @description The Square-issued ID of the device. */
|
|
760
|
+
device_id?: string | null;
|
|
761
|
+
/** @description The Square-issued installation ID for the device. */
|
|
762
|
+
device_installation_id?: string | null;
|
|
763
|
+
/** @description The name of the device set by the seller. */
|
|
764
|
+
device_name?: string | null;
|
|
765
|
+
};
|
|
766
|
+
/** @description Additional details about `WALLET` type payments. Contains only non-confidential information. */
|
|
767
|
+
DigitalWalletDetails: {
|
|
768
|
+
/**
|
|
769
|
+
* @description The status of the `WALLET` payment. The status can be `AUTHORIZED`, `CAPTURED`, `VOIDED`, or
|
|
770
|
+
* `FAILED`.
|
|
771
|
+
*/
|
|
772
|
+
status?: string | null;
|
|
773
|
+
/**
|
|
774
|
+
* @description The brand used for the `WALLET` payment. The brand can be `CASH_APP`, `PAYPAY`, `ALIPAY`,
|
|
775
|
+
* `RAKUTEN_PAY`, `AU_PAY`, `D_BARAI`, `MERPAY`, `WECHAT_PAY`, `LIGHTNING` or `UNKNOWN`.
|
|
776
|
+
*/
|
|
777
|
+
brand?: string | null;
|
|
778
|
+
/** @description Brand-specific details for payments with the `brand` of `CASH_APP`. */
|
|
779
|
+
cash_app_details?: components["schemas"]["CashAppDetails"];
|
|
780
|
+
/** @description Brand-specific details for payments with the `brand` of `LIGHTNING`. */
|
|
781
|
+
lightning_details?: components["schemas"]["LightningDetails"];
|
|
782
|
+
/** @description Information about errors encountered during the payment. */
|
|
783
|
+
readonly errors?: components["schemas"]["Error"][];
|
|
784
|
+
};
|
|
785
|
+
/** @description Details specific to electronic money payments. */
|
|
786
|
+
ElectronicMoneyDetails: {
|
|
787
|
+
/** @description Details specific to FeliCa payments. */
|
|
788
|
+
felica_details?: components["schemas"]["FelicaDetails"];
|
|
789
|
+
};
|
|
790
|
+
/**
|
|
791
|
+
* @description Represents an error encountered during a request to the Connect API.
|
|
792
|
+
*
|
|
793
|
+
* See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information.
|
|
794
|
+
*/
|
|
795
|
+
Error: {
|
|
796
|
+
/**
|
|
797
|
+
* @description The high-level category for the error.
|
|
798
|
+
* See [ErrorCategory](#type-errorcategory) for possible values
|
|
799
|
+
*/
|
|
800
|
+
category: components["schemas"]["ErrorCategory"];
|
|
801
|
+
/**
|
|
802
|
+
* @description The specific code of the error.
|
|
803
|
+
* See [ErrorCode](#type-errorcode) for possible values
|
|
804
|
+
*/
|
|
805
|
+
code: components["schemas"]["ErrorCode"];
|
|
806
|
+
/** @description A human-readable description of the error for debugging purposes. */
|
|
807
|
+
detail?: string;
|
|
808
|
+
/**
|
|
809
|
+
* @description The name of the field provided in the original request (if any) that
|
|
810
|
+
* the error pertains to.
|
|
811
|
+
*/
|
|
812
|
+
field?: string;
|
|
813
|
+
};
|
|
814
|
+
/**
|
|
815
|
+
* @description Indicates which high-level category of error has occurred during a
|
|
816
|
+
* request to the Connect API.
|
|
817
|
+
* @enum {string}
|
|
818
|
+
*/
|
|
819
|
+
ErrorCategory: "API_ERROR" | "AUTHENTICATION_ERROR" | "INVALID_REQUEST_ERROR" | "RATE_LIMIT_ERROR" | "PAYMENT_METHOD_ERROR" | "REFUND_ERROR" | "MERCHANT_SUBSCRIPTION_ERROR" | "EXTERNAL_VENDOR_ERROR";
|
|
820
|
+
/**
|
|
821
|
+
* @description Indicates the specific error that occurred during a request to a
|
|
822
|
+
* Square API.
|
|
823
|
+
* @enum {string}
|
|
824
|
+
*/
|
|
825
|
+
ErrorCode: "INTERNAL_SERVER_ERROR" | "UNAUTHORIZED" | "ACCESS_TOKEN_EXPIRED" | "ACCESS_TOKEN_REVOKED" | "CLIENT_DISABLED" | "FORBIDDEN" | "INSUFFICIENT_SCOPES" | "APPLICATION_DISABLED" | "V1_APPLICATION" | "V1_ACCESS_TOKEN" | "CARD_PROCESSING_NOT_ENABLED" | "MERCHANT_SUBSCRIPTION_NOT_FOUND" | "BAD_REQUEST" | "MISSING_REQUIRED_PARAMETER" | "INCORRECT_TYPE" | "INVALID_TIME" | "INVALID_TIME_RANGE" | "INVALID_VALUE" | "INVALID_CURSOR" | "UNKNOWN_QUERY_PARAMETER" | "CONFLICTING_PARAMETERS" | "EXPECTED_JSON_BODY" | "INVALID_SORT_ORDER" | "VALUE_REGEX_MISMATCH" | "VALUE_TOO_SHORT" | "VALUE_TOO_LONG" | "VALUE_TOO_LOW" | "VALUE_TOO_HIGH" | "VALUE_EMPTY" | "ARRAY_LENGTH_TOO_LONG" | "ARRAY_LENGTH_TOO_SHORT" | "ARRAY_EMPTY" | "EXPECTED_BOOLEAN" | "EXPECTED_INTEGER" | "EXPECTED_FLOAT" | "EXPECTED_STRING" | "EXPECTED_OBJECT" | "EXPECTED_ARRAY" | "EXPECTED_MAP" | "EXPECTED_BASE64_ENCODED_BYTE_ARRAY" | "INVALID_ARRAY_VALUE" | "INVALID_ENUM_VALUE" | "INVALID_CONTENT_TYPE" | "INVALID_FORM_VALUE" | "CUSTOMER_NOT_FOUND" | "ONE_INSTRUMENT_EXPECTED" | "NO_FIELDS_SET" | "TOO_MANY_MAP_ENTRIES" | "MAP_KEY_LENGTH_TOO_SHORT" | "MAP_KEY_LENGTH_TOO_LONG" | "CUSTOMER_MISSING_NAME" | "CUSTOMER_MISSING_EMAIL" | "INVALID_PAUSE_LENGTH" | "INVALID_DATE" | "UNSUPPORTED_COUNTRY" | "UNSUPPORTED_CURRENCY" | "APPLE_TTP_PIN_TOKEN" | "CARD_EXPIRED" | "INVALID_EXPIRATION" | "INVALID_EXPIRATION_YEAR" | "INVALID_EXPIRATION_DATE" | "UNSUPPORTED_CARD_BRAND" | "UNSUPPORTED_ENTRY_METHOD" | "INVALID_ENCRYPTED_CARD" | "INVALID_CARD" | "PAYMENT_AMOUNT_MISMATCH" | "GENERIC_DECLINE" | "CVV_FAILURE" | "ADDRESS_VERIFICATION_FAILURE" | "INVALID_ACCOUNT" | "CURRENCY_MISMATCH" | "INSUFFICIENT_FUNDS" | "INSUFFICIENT_PERMISSIONS" | "CARDHOLDER_INSUFFICIENT_PERMISSIONS" | "INVALID_LOCATION" | "TRANSACTION_LIMIT" | "VOICE_FAILURE" | "PAN_FAILURE" | "EXPIRATION_FAILURE" | "CARD_NOT_SUPPORTED" | "READER_DECLINED" | "INVALID_PIN" | "MISSING_PIN" | "MISSING_ACCOUNT_TYPE" | "INVALID_POSTAL_CODE" | "INVALID_FEES" | "MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED" | "PAYMENT_LIMIT_EXCEEDED" | "GIFT_CARD_AVAILABLE_AMOUNT" | "ACCOUNT_UNUSABLE" | "BUYER_REFUSED_PAYMENT" | "DELAYED_TRANSACTION_EXPIRED" | "DELAYED_TRANSACTION_CANCELED" | "DELAYED_TRANSACTION_CAPTURED" | "DELAYED_TRANSACTION_FAILED" | "CARD_TOKEN_EXPIRED" | "CARD_TOKEN_USED" | "AMOUNT_TOO_HIGH" | "AMOUNT_TOO_LOW" | "UNSUPPORTED_INSTRUMENT_TYPE" | "REFUND_AMOUNT_INVALID" | "REFUND_ALREADY_PENDING" | "PAYMENT_NOT_REFUNDABLE" | "PAYMENT_NOT_REFUNDABLE_DUE_TO_DISPUTE" | "REFUND_ERROR_PAYMENT_NEEDS_COMPLETION" | "REFUND_DECLINED" | "INSUFFICIENT_PERMISSIONS_FOR_REFUND" | "INVALID_CARD_DATA" | "SOURCE_USED" | "SOURCE_EXPIRED" | "UNSUPPORTED_LOYALTY_REWARD_TIER" | "LOCATION_MISMATCH" | "ORDER_UNPAID_NOT_RETURNABLE" | "PARTIAL_PAYMENT_DELAY_CAPTURE_NOT_SUPPORTED" | "IDEMPOTENCY_KEY_REUSED" | "UNEXPECTED_VALUE" | "SANDBOX_NOT_SUPPORTED" | "INVALID_EMAIL_ADDRESS" | "INVALID_PHONE_NUMBER" | "CHECKOUT_EXPIRED" | "BAD_CERTIFICATE" | "INVALID_SQUARE_VERSION_FORMAT" | "API_VERSION_INCOMPATIBLE" | "CARD_PRESENCE_REQUIRED" | "UNSUPPORTED_SOURCE_TYPE" | "CARD_MISMATCH" | "PLAID_ERROR" | "PLAID_ERROR_ITEM_LOGIN_REQUIRED" | "PLAID_ERROR_RATE_LIMIT" | "PLAID_ERROR_INVALID_ACCESS_TOKEN" | "PLAID_ERROR_INVALID_ACCOUNT_ID" | "PLAID_ERROR_NO_ACCOUNTS" | "PLAID_ERROR_ITEM_NOT_FOUND" | "PLAID_ERROR_INSUFFICIENT_CREDENTIALS" | "PLAID_ERROR_ITEM_NOT_SUPPORTED" | "PLAID_ERROR_PRODUCT_NOT_READY" | "PAYMENT_SOURCE_NOT_ENABLED_FOR_TARGET" | "CARD_DECLINED" | "VERIFY_CVV_FAILURE" | "VERIFY_AVS_FAILURE" | "CARD_DECLINED_CALL_ISSUER" | "CARD_DECLINED_VERIFICATION_REQUIRED" | "BAD_EXPIRATION" | "CHIP_INSERTION_REQUIRED" | "ALLOWABLE_PIN_TRIES_EXCEEDED" | "RESERVATION_DECLINED" | "UNKNOWN_BODY_PARAMETER" | "CART_INELIGIBLE_FOR_EBT" | "NOT_FOUND" | "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "REQUEST_ENTITY_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_ENTITY" | "RATE_LIMITED" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "TEMPORARY_ERROR" | "GATEWAY_TIMEOUT";
|
|
826
|
+
/**
|
|
827
|
+
* @description Stores details about an external payment. Contains only non-confidential information.
|
|
828
|
+
* For more information, see
|
|
829
|
+
* [Take External Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments).
|
|
830
|
+
*/
|
|
831
|
+
ExternalPaymentDetails: {
|
|
832
|
+
/**
|
|
833
|
+
* @description The type of external payment the seller received. It can be one of the following:
|
|
834
|
+
* - CHECK - Paid using a physical check.
|
|
835
|
+
* - BANK_TRANSFER - Paid using external bank transfer.
|
|
836
|
+
* - OTHER\_GIFT\_CARD - Paid using a non-Square gift card.
|
|
837
|
+
* - CRYPTO - Paid using a crypto currency.
|
|
838
|
+
* - SQUARE_CASH - Paid using Square Cash App.
|
|
839
|
+
* - SOCIAL - Paid using peer-to-peer payment applications.
|
|
840
|
+
* - EXTERNAL - A third-party application gathered this payment outside of Square.
|
|
841
|
+
* - EMONEY - Paid using an E-money provider.
|
|
842
|
+
* - CARD - A credit or debit card that Square does not support.
|
|
843
|
+
* - STORED_BALANCE - Use for house accounts, store credit, and so forth.
|
|
844
|
+
* - FOOD_VOUCHER - Restaurant voucher provided by employers to employees to pay for meals
|
|
845
|
+
* - OTHER - A type not listed here.
|
|
846
|
+
*/
|
|
847
|
+
type: string;
|
|
848
|
+
/**
|
|
849
|
+
* @description A description of the external payment source. For example,
|
|
850
|
+
* "Food Delivery Service".
|
|
851
|
+
*/
|
|
852
|
+
source: string;
|
|
853
|
+
/** @description An ID to associate the payment to its originating source. */
|
|
854
|
+
source_id?: string | null;
|
|
855
|
+
/**
|
|
856
|
+
* @description The fees paid to the source. The `amount_money` minus this field is
|
|
857
|
+
* the net amount seller receives.
|
|
858
|
+
*/
|
|
859
|
+
source_fee_money?: components["schemas"]["Money"];
|
|
860
|
+
};
|
|
861
|
+
/** @description Details for Felica payments. */
|
|
862
|
+
FelicaDetails: {
|
|
863
|
+
/** @description The terminal id for a Felica payment. */
|
|
864
|
+
terminal_id?: string | null;
|
|
865
|
+
/** @description The masked card number for a Felica payment. */
|
|
866
|
+
felica_masked_card_number?: string | null;
|
|
867
|
+
/**
|
|
868
|
+
* @description The Felica sub-brand of the payment.
|
|
869
|
+
* See [FelicaBrand](#type-felicabrand) for possible values
|
|
870
|
+
*/
|
|
871
|
+
felica_brand?: components["schemas"]["FelicaDetailsFelicaBrand"];
|
|
872
|
+
};
|
|
873
|
+
/**
|
|
874
|
+
* @description A Felica card's "sub-brand"--the actual brand on the Felica card
|
|
875
|
+
* @enum {string}
|
|
876
|
+
*/
|
|
877
|
+
FelicaDetailsFelicaBrand: "UNKNOWN" | "FELICA_ID" | "FELICA_TRANSPORTATION" | "FELICA_QP";
|
|
878
|
+
/**
|
|
879
|
+
* @description Contains details about how to fulfill this order.
|
|
880
|
+
* Orders can only be created with at most one fulfillment using the API.
|
|
881
|
+
* However, orders returned by the Orders API might contain multiple fulfillments because sellers can create multiple fulfillments using Square products such as Square Online.
|
|
882
|
+
*/
|
|
883
|
+
Fulfillment: {
|
|
884
|
+
/** @description A unique ID that identifies the fulfillment only within this order. */
|
|
885
|
+
uid?: string | null;
|
|
886
|
+
/**
|
|
887
|
+
* @description The type of the fulfillment.
|
|
888
|
+
* See [FulfillmentType](#type-fulfillmenttype) for possible values
|
|
889
|
+
*/
|
|
890
|
+
type?: components["schemas"]["FulfillmentType"];
|
|
891
|
+
/**
|
|
892
|
+
* @description The state of the fulfillment.
|
|
893
|
+
* See [FulfillmentState](#type-fulfillmentstate) for possible values
|
|
894
|
+
*/
|
|
895
|
+
state?: components["schemas"]["FulfillmentState"];
|
|
896
|
+
/**
|
|
897
|
+
* @description Describes what order line items this fulfillment applies to.
|
|
898
|
+
* It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.
|
|
899
|
+
* See [FulfillmentFulfillmentLineItemApplication](#type-fulfillmentfulfillmentlineitemapplication) for possible values
|
|
900
|
+
*/
|
|
901
|
+
readonly line_item_application?: components["schemas"]["FulfillmentFulfillmentLineItemApplication"];
|
|
902
|
+
/**
|
|
903
|
+
* @description A list of entries pertaining to the fulfillment of an order. Each entry must reference
|
|
904
|
+
* a valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to
|
|
905
|
+
* fulfill.
|
|
906
|
+
*
|
|
907
|
+
* Multiple entries can reference the same line item `uid`, as long as the total quantity among
|
|
908
|
+
* all fulfillment entries referencing a single line item does not exceed the quantity of the
|
|
909
|
+
* order's line item itself.
|
|
910
|
+
*
|
|
911
|
+
* An order cannot be marked as `COMPLETED` before all fulfillments are `COMPLETED`,
|
|
912
|
+
* `CANCELED`, or `FAILED`. Fulfillments can be created and completed independently
|
|
913
|
+
* before order completion.
|
|
914
|
+
*/
|
|
915
|
+
readonly entries?: components["schemas"]["FulfillmentFulfillmentEntry"][];
|
|
916
|
+
/**
|
|
917
|
+
* @description Application-defined data attached to this fulfillment. Metadata fields are intended
|
|
918
|
+
* to store descriptive references or associations with an entity in another system or store brief
|
|
919
|
+
* information about the object. Square does not process this field; it only stores and returns it
|
|
920
|
+
* in relevant API calls. Do not use metadata to store any sensitive information (such as personally
|
|
921
|
+
* identifiable information or card details).
|
|
922
|
+
*
|
|
923
|
+
* Keys written by applications must be 60 characters or less and must be in the character set
|
|
924
|
+
* `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
|
|
925
|
+
* with a namespace, separated from the key with a ':' character.
|
|
926
|
+
*
|
|
927
|
+
* Values have a maximum length of 255 characters.
|
|
928
|
+
*
|
|
929
|
+
* An application can have up to 10 entries per metadata field.
|
|
930
|
+
*
|
|
931
|
+
* Entries written by applications are private and can only be read or modified by the same
|
|
932
|
+
* application.
|
|
933
|
+
*
|
|
934
|
+
* For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
|
|
935
|
+
*/
|
|
936
|
+
metadata?: {
|
|
937
|
+
[key: string]: string;
|
|
938
|
+
} | null;
|
|
939
|
+
/**
|
|
940
|
+
* @description Contains details for a pickup fulfillment. These details are required when the fulfillment
|
|
941
|
+
* type is `PICKUP`.
|
|
942
|
+
*/
|
|
943
|
+
pickup_details?: components["schemas"]["FulfillmentPickupDetails"];
|
|
944
|
+
/**
|
|
945
|
+
* @description Contains details for a shipment fulfillment. These details are required when the fulfillment type
|
|
946
|
+
* is `SHIPMENT`.
|
|
947
|
+
*
|
|
948
|
+
* A shipment fulfillment's relationship to fulfillment `state`:
|
|
949
|
+
* `PROPOSED`: A shipment is requested.
|
|
950
|
+
* `RESERVED`: Fulfillment in progress. Shipment processing.
|
|
951
|
+
* `PREPARED`: Shipment packaged. Shipping label created.
|
|
952
|
+
* `COMPLETED`: Package has been shipped.
|
|
953
|
+
* `CANCELED`: Shipment has been canceled.
|
|
954
|
+
* `FAILED`: Shipment has failed.
|
|
955
|
+
*/
|
|
956
|
+
shipment_details?: components["schemas"]["FulfillmentShipmentDetails"];
|
|
957
|
+
/** @description Describes delivery details of an order fulfillment. */
|
|
958
|
+
delivery_details?: components["schemas"]["FulfillmentDeliveryDetails"];
|
|
959
|
+
/**
|
|
960
|
+
* @description Contains details for an in-store fulfillment. These details are required when the fulfillment
|
|
961
|
+
* type is `IN_STORE`.
|
|
962
|
+
*/
|
|
963
|
+
in_store_details?: components["schemas"]["FulfillmentInStoreDetails"];
|
|
964
|
+
};
|
|
965
|
+
/** @description Describes delivery details of an order fulfillment. */
|
|
966
|
+
FulfillmentDeliveryDetails: {
|
|
967
|
+
/** @description The contact information for the person to receive the fulfillment. */
|
|
968
|
+
recipient?: components["schemas"]["FulfillmentRecipient"];
|
|
969
|
+
/**
|
|
970
|
+
* @description Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then
|
|
971
|
+
* `deliver_at` is required. The default is `SCHEDULED`.
|
|
972
|
+
* See [OrderFulfillmentDeliveryDetailsScheduleType](#type-orderfulfillmentdeliverydetailsscheduletype) for possible values
|
|
973
|
+
*/
|
|
974
|
+
schedule_type?: components["schemas"]["FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType"];
|
|
975
|
+
/**
|
|
976
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
977
|
+
* indicating when the fulfillment was placed.
|
|
978
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
979
|
+
*
|
|
980
|
+
* Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
|
|
981
|
+
*/
|
|
982
|
+
readonly placed_at?: string;
|
|
983
|
+
/**
|
|
984
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
985
|
+
* that represents the start of the delivery period.
|
|
986
|
+
* The application can set this field while the fulfillment `state` is
|
|
987
|
+
* `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the
|
|
988
|
+
* terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`).
|
|
989
|
+
*
|
|
990
|
+
* The timestamp must be in RFC 3339 format
|
|
991
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
992
|
+
*
|
|
993
|
+
* For fulfillments with the schedule type `ASAP`, this is automatically set
|
|
994
|
+
* to the current time plus `prep_time_duration`, if available.
|
|
995
|
+
*/
|
|
996
|
+
deliver_at?: string | null;
|
|
997
|
+
/**
|
|
998
|
+
* @description The [duration](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
999
|
+
* needed to prepare and deliver this fulfillment.
|
|
1000
|
+
* The duration must be in RFC 3339 format (for example, "PT30M" for 30 minutes). Don't confuse
|
|
1001
|
+
* "M" for months with "M" for minutes. "P5M" means 5 months, while "PT5M" means 5 minutes.
|
|
1002
|
+
*/
|
|
1003
|
+
prep_time_duration?: string | null;
|
|
1004
|
+
/**
|
|
1005
|
+
* @description The [duration](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1006
|
+
* after `deliver_at` in which to deliver the order.
|
|
1007
|
+
* Applications can set this field when the fulfillment `state` is
|
|
1008
|
+
* `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state
|
|
1009
|
+
* such as `COMPLETED`, `CANCELED`, and `FAILED`).
|
|
1010
|
+
*
|
|
1011
|
+
* The duration must be in RFC 3339 format (for example, "PT30M" for 30 minutes). Don't confuse
|
|
1012
|
+
* "M" for months with "M" for minutes. "P5M" means 5 months, while "PT5M" means 5 minutes.
|
|
1013
|
+
*/
|
|
1014
|
+
delivery_window_duration?: string | null;
|
|
1015
|
+
/**
|
|
1016
|
+
* @description Provides additional instructions about the delivery fulfillment.
|
|
1017
|
+
* It is displayed in the Square Point of Sale application and set by the API.
|
|
1018
|
+
*/
|
|
1019
|
+
note?: string | null;
|
|
1020
|
+
/**
|
|
1021
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1022
|
+
* indicates when the seller completed the fulfillment.
|
|
1023
|
+
* This field is automatically set when fulfillment `state` changes to `COMPLETED`.
|
|
1024
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1025
|
+
*/
|
|
1026
|
+
completed_at?: string | null;
|
|
1027
|
+
/**
|
|
1028
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1029
|
+
* indicates when the seller started processing the fulfillment.
|
|
1030
|
+
* This field is automatically set when the fulfillment `state` changes to `RESERVED`.
|
|
1031
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1032
|
+
*/
|
|
1033
|
+
readonly in_progress_at?: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1036
|
+
* indicating when the fulfillment was rejected. This field is
|
|
1037
|
+
* automatically set when the fulfillment `state` changes to `FAILED`.
|
|
1038
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1039
|
+
*/
|
|
1040
|
+
readonly rejected_at?: string;
|
|
1041
|
+
/**
|
|
1042
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1043
|
+
* indicating when the seller marked the fulfillment as ready for
|
|
1044
|
+
* courier pickup. This field is automatically set when the fulfillment `state` changes
|
|
1045
|
+
* to PREPARED.
|
|
1046
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1047
|
+
*/
|
|
1048
|
+
readonly ready_at?: string;
|
|
1049
|
+
/**
|
|
1050
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1051
|
+
* indicating when the fulfillment was delivered to the recipient.
|
|
1052
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1053
|
+
*/
|
|
1054
|
+
readonly delivered_at?: string;
|
|
1055
|
+
/**
|
|
1056
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1057
|
+
* indicating when the fulfillment was canceled. This field is automatically
|
|
1058
|
+
* set when the fulfillment `state` changes to `CANCELED`.
|
|
1059
|
+
*
|
|
1060
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1061
|
+
*/
|
|
1062
|
+
readonly canceled_at?: string;
|
|
1063
|
+
/** @description The delivery cancellation reason. Max length: 100 characters. */
|
|
1064
|
+
cancel_reason?: string | null;
|
|
1065
|
+
/**
|
|
1066
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1067
|
+
* indicating when an order can be picked up by the courier for delivery.
|
|
1068
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1069
|
+
*/
|
|
1070
|
+
courier_pickup_at?: string | null;
|
|
1071
|
+
/**
|
|
1072
|
+
* @description The [duration](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1073
|
+
* after `courier_pickup_at` in which the courier should pick up the order.
|
|
1074
|
+
* The duration must be in RFC 3339 format (for example, "PT30M" for 30 minutes). Don't confuse
|
|
1075
|
+
* "M" for months with "M" for minutes. "P5M" means 5 months, while "PT5M" means 5 minutes.
|
|
1076
|
+
*/
|
|
1077
|
+
courier_pickup_window_duration?: string | null;
|
|
1078
|
+
/** @description Whether the delivery is preferred to be no contact. */
|
|
1079
|
+
is_no_contact_delivery?: boolean | null;
|
|
1080
|
+
/** @description A note to provide additional instructions about how to deliver the order. */
|
|
1081
|
+
dropoff_notes?: string | null;
|
|
1082
|
+
/** @description The name of the courier provider. */
|
|
1083
|
+
courier_provider_name?: string | null;
|
|
1084
|
+
/** @description The support phone number of the courier. */
|
|
1085
|
+
courier_support_phone_number?: string | null;
|
|
1086
|
+
/** @description The identifier for the delivery created by Square. */
|
|
1087
|
+
square_delivery_id?: string | null;
|
|
1088
|
+
/** @description The identifier for the delivery created by the third-party courier service. */
|
|
1089
|
+
external_delivery_id?: string | null;
|
|
1090
|
+
/**
|
|
1091
|
+
* @description The flag to indicate the delivery is managed by a third party (ie DoorDash), which means
|
|
1092
|
+
* we may not receive all recipient information for PII purposes.
|
|
1093
|
+
*/
|
|
1094
|
+
managed_delivery?: boolean | null;
|
|
1095
|
+
};
|
|
1096
|
+
/**
|
|
1097
|
+
* @description The schedule type of the delivery fulfillment.
|
|
1098
|
+
* @enum {string}
|
|
1099
|
+
*/
|
|
1100
|
+
FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType: "SCHEDULED" | "ASAP";
|
|
1101
|
+
/**
|
|
1102
|
+
* @description Links an order line item to a fulfillment. Each entry must reference
|
|
1103
|
+
* a valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to
|
|
1104
|
+
* fulfill.
|
|
1105
|
+
*/
|
|
1106
|
+
FulfillmentFulfillmentEntry: {
|
|
1107
|
+
/** @description A unique ID that identifies the fulfillment entry only within this order. */
|
|
1108
|
+
uid?: string | null;
|
|
1109
|
+
/** @description The `uid` from the order line item. */
|
|
1110
|
+
line_item_uid: string;
|
|
1111
|
+
/**
|
|
1112
|
+
* @description The quantity of the line item being fulfilled, formatted as a decimal number.
|
|
1113
|
+
* For example, `"3"`.
|
|
1114
|
+
*
|
|
1115
|
+
* Fulfillments for line items with a `quantity_unit` can have non-integer quantities.
|
|
1116
|
+
* For example, `"1.70000"`.
|
|
1117
|
+
*/
|
|
1118
|
+
quantity: string;
|
|
1119
|
+
/**
|
|
1120
|
+
* @description Application-defined data attached to this fulfillment entry. Metadata fields are intended
|
|
1121
|
+
* to store descriptive references or associations with an entity in another system or store brief
|
|
1122
|
+
* information about the object. Square does not process this field; it only stores and returns it
|
|
1123
|
+
* in relevant API calls. Do not use metadata to store any sensitive information (such as personally
|
|
1124
|
+
* identifiable information or card details).
|
|
1125
|
+
*
|
|
1126
|
+
* Keys written by applications must be 60 characters or less and must be in the character set
|
|
1127
|
+
* `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
|
|
1128
|
+
* with a namespace, separated from the key with a ':' character.
|
|
1129
|
+
*
|
|
1130
|
+
* Values have a maximum length of 255 characters.
|
|
1131
|
+
*
|
|
1132
|
+
* An application can have up to 10 entries per metadata field.
|
|
1133
|
+
*
|
|
1134
|
+
* Entries written by applications are private and can only be read or modified by the same
|
|
1135
|
+
* application.
|
|
1136
|
+
*
|
|
1137
|
+
* For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
|
|
1138
|
+
*/
|
|
1139
|
+
metadata?: {
|
|
1140
|
+
[key: string]: string;
|
|
1141
|
+
} | null;
|
|
1142
|
+
};
|
|
1143
|
+
/**
|
|
1144
|
+
* @description The `line_item_application` describes what order line items this fulfillment applies
|
|
1145
|
+
* to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.
|
|
1146
|
+
* @enum {string}
|
|
1147
|
+
*/
|
|
1148
|
+
FulfillmentFulfillmentLineItemApplication: "ALL" | "ENTRY_LIST";
|
|
1149
|
+
/** @description Contains the details necessary to fulfill an in-store order. */
|
|
1150
|
+
FulfillmentInStoreDetails: {
|
|
1151
|
+
/**
|
|
1152
|
+
* @description A note to provide additional instructions about the in-store fulfillment
|
|
1153
|
+
* displayed in the Square Point of Sale application and set by the API.
|
|
1154
|
+
*/
|
|
1155
|
+
note?: string | null;
|
|
1156
|
+
/** @description Information about the person to receive this in-store fulfillment. */
|
|
1157
|
+
recipient?: components["schemas"]["FulfillmentRecipient"];
|
|
1158
|
+
/**
|
|
1159
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1160
|
+
* indicating when the fulfillment was placed. The timestamp must be in RFC 3339 format
|
|
1161
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1162
|
+
*/
|
|
1163
|
+
placed_at?: string | null;
|
|
1164
|
+
/**
|
|
1165
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1166
|
+
* indicating when the fulfillment was completed. This field is automatically set when the
|
|
1167
|
+
* fulfillment `state` changes to `COMPLETED`. The timestamp must be in RFC 3339 format
|
|
1168
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1169
|
+
*/
|
|
1170
|
+
readonly completed_at?: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1173
|
+
* indicates when the seller started processing the fulfillment.
|
|
1174
|
+
* This field is automatically set when the fulfillment `state` changes to `RESERVED`.
|
|
1175
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1176
|
+
*/
|
|
1177
|
+
readonly in_progress_at?: string;
|
|
1178
|
+
/**
|
|
1179
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1180
|
+
* indicating when the fulfillment was moved to the `PREPARED` state, which indicates that the
|
|
1181
|
+
* fulfillment is ready. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1182
|
+
*/
|
|
1183
|
+
readonly prepared_at?: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1186
|
+
* indicating when the fulfillment was canceled. This field is automatically set when the
|
|
1187
|
+
* fulfillment `state` changes to `CANCELED`. The timestamp must be in RFC 3339 format
|
|
1188
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1189
|
+
*/
|
|
1190
|
+
readonly canceled_at?: string;
|
|
1191
|
+
};
|
|
1192
|
+
/** @description Contains details necessary to fulfill a pickup order. */
|
|
1193
|
+
FulfillmentPickupDetails: {
|
|
1194
|
+
/**
|
|
1195
|
+
* @description Information about the person to pick up this fulfillment from a physical
|
|
1196
|
+
* location.
|
|
1197
|
+
*/
|
|
1198
|
+
recipient?: components["schemas"]["FulfillmentRecipient"];
|
|
1199
|
+
/**
|
|
1200
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1201
|
+
* indicating when this fulfillment expires if it is not marked in progress. The timestamp must be
|
|
1202
|
+
* in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). The expiration time can only be set
|
|
1203
|
+
* up to 7 days in the future. If `expires_at` is not set, any new payments attached to the order
|
|
1204
|
+
* are automatically completed.
|
|
1205
|
+
*/
|
|
1206
|
+
expires_at?: string | null;
|
|
1207
|
+
/**
|
|
1208
|
+
* @description The [duration](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1209
|
+
* after which an in-progress pickup fulfillment is automatically moved
|
|
1210
|
+
* to the `COMPLETED` state. The duration must be in RFC 3339 format (for example, "PT4H" for 4 hours).
|
|
1211
|
+
*
|
|
1212
|
+
* If not set, this pickup fulfillment remains in progress until it is canceled or completed.
|
|
1213
|
+
*/
|
|
1214
|
+
auto_complete_duration?: string | null;
|
|
1215
|
+
/**
|
|
1216
|
+
* @description The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`.
|
|
1217
|
+
* See [FulfillmentPickupDetailsScheduleType](#type-fulfillmentpickupdetailsscheduletype) for possible values
|
|
1218
|
+
*/
|
|
1219
|
+
schedule_type?: components["schemas"]["FulfillmentPickupDetailsScheduleType"];
|
|
1220
|
+
/**
|
|
1221
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1222
|
+
* that represents the start of the pickup window. Must be in RFC 3339 timestamp format, e.g.,
|
|
1223
|
+
* "2016-09-04T23:59:33.123Z".
|
|
1224
|
+
*
|
|
1225
|
+
* For fulfillments with the schedule type `ASAP`, this is automatically set
|
|
1226
|
+
* to the current time plus `prep_time_duration`, if available.
|
|
1227
|
+
*/
|
|
1228
|
+
pickup_at?: string | null;
|
|
1229
|
+
/**
|
|
1230
|
+
* @description The [duration](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1231
|
+
* in which the order should be picked up after the `pickup_at` timestamp.
|
|
1232
|
+
* The duration must be in RFC 3339 format (for example, "PT30M" for 30 minutes). Don't confuse
|
|
1233
|
+
* "M" for months with "M" for minutes. "P5M" means 5 months, while "PT5M" means 5 minutes.
|
|
1234
|
+
*
|
|
1235
|
+
* Can be used as an informational guideline for merchants.
|
|
1236
|
+
*/
|
|
1237
|
+
pickup_window_duration?: string | null;
|
|
1238
|
+
/**
|
|
1239
|
+
* @description The [duration](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1240
|
+
* needed to prepare this fulfillment.
|
|
1241
|
+
* The duration must be in RFC 3339 format (for example, "PT30M" for 30 minutes). Don't confuse
|
|
1242
|
+
* "M" for months with "M" for minutes. "P5M" means 5 months, while "PT5M" means 5 minutes.
|
|
1243
|
+
*/
|
|
1244
|
+
prep_time_duration?: string | null;
|
|
1245
|
+
/**
|
|
1246
|
+
* @description A note to provide additional instructions about the pickup
|
|
1247
|
+
* fulfillment displayed in the Square Point of Sale application and set by the API.
|
|
1248
|
+
*/
|
|
1249
|
+
note?: string | null;
|
|
1250
|
+
/**
|
|
1251
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1252
|
+
* indicating when the fulfillment was placed. The timestamp must be in RFC 3339 format
|
|
1253
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1254
|
+
*/
|
|
1255
|
+
readonly placed_at?: string;
|
|
1256
|
+
/**
|
|
1257
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1258
|
+
* indicating when the fulfillment was marked in progress. The timestamp must be in RFC 3339 format
|
|
1259
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1260
|
+
*/
|
|
1261
|
+
readonly accepted_at?: string;
|
|
1262
|
+
/**
|
|
1263
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1264
|
+
* indicating when the fulfillment was rejected. The timestamp must be in RFC 3339 format
|
|
1265
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1266
|
+
*/
|
|
1267
|
+
readonly rejected_at?: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1270
|
+
* indicating when the fulfillment is marked as ready for pickup. The timestamp must be in RFC 3339 format
|
|
1271
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1272
|
+
*/
|
|
1273
|
+
readonly ready_at?: string;
|
|
1274
|
+
/**
|
|
1275
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1276
|
+
* indicating when the fulfillment expired. The timestamp must be in RFC 3339 format
|
|
1277
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1278
|
+
*/
|
|
1279
|
+
readonly expired_at?: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1282
|
+
* indicating when the fulfillment was picked up by the recipient. The timestamp must be in RFC 3339 format
|
|
1283
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1284
|
+
*/
|
|
1285
|
+
readonly picked_up_at?: string;
|
|
1286
|
+
/**
|
|
1287
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1288
|
+
* indicating when the fulfillment was canceled. The timestamp must be in RFC 3339 format
|
|
1289
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1290
|
+
*/
|
|
1291
|
+
readonly canceled_at?: string;
|
|
1292
|
+
/** @description A description of why the pickup was canceled. The maximum length: 100 characters. */
|
|
1293
|
+
cancel_reason?: string | null;
|
|
1294
|
+
/** @description If set to `true`, indicates that this pickup order is for curbside pickup, not in-store pickup. */
|
|
1295
|
+
is_curbside_pickup?: boolean | null;
|
|
1296
|
+
/** @description Specific details for curbside pickup. These details can only be populated if `is_curbside_pickup` is set to `true`. */
|
|
1297
|
+
curbside_pickup_details?: components["schemas"]["FulfillmentPickupDetailsCurbsidePickupDetails"];
|
|
1298
|
+
};
|
|
1299
|
+
/** @description Specific details for curbside pickup. */
|
|
1300
|
+
FulfillmentPickupDetailsCurbsidePickupDetails: {
|
|
1301
|
+
/** @description Specific details for curbside pickup, such as parking number and vehicle model. */
|
|
1302
|
+
curbside_details?: string | null;
|
|
1303
|
+
/**
|
|
1304
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1305
|
+
* indicating when the buyer arrived and is waiting for pickup. The timestamp must be in RFC 3339 format
|
|
1306
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1307
|
+
*/
|
|
1308
|
+
buyer_arrived_at?: string | null;
|
|
1309
|
+
};
|
|
1310
|
+
/**
|
|
1311
|
+
* @description The schedule type of the pickup fulfillment.
|
|
1312
|
+
* @enum {string}
|
|
1313
|
+
*/
|
|
1314
|
+
FulfillmentPickupDetailsScheduleType: "SCHEDULED" | "ASAP";
|
|
1315
|
+
/** @description Information about the fulfillment recipient. */
|
|
1316
|
+
FulfillmentRecipient: {
|
|
1317
|
+
/**
|
|
1318
|
+
* @description The ID of the customer associated with the fulfillment.
|
|
1319
|
+
*
|
|
1320
|
+
* If `customer_id` is provided, the fulfillment recipient's `display_name`,
|
|
1321
|
+
* `email_address`, and `phone_number` are automatically populated from the
|
|
1322
|
+
* targeted customer profile. If these fields are set in the request, the request
|
|
1323
|
+
* values override the information from the customer profile. If the
|
|
1324
|
+
* targeted customer profile does not contain the necessary information and
|
|
1325
|
+
* these fields are left unset, the request results in an error.
|
|
1326
|
+
*/
|
|
1327
|
+
customer_id?: string | null;
|
|
1328
|
+
/**
|
|
1329
|
+
* @description The display name of the fulfillment recipient. This field is required.
|
|
1330
|
+
*
|
|
1331
|
+
* If provided, the display name overrides the corresponding customer profile value
|
|
1332
|
+
* indicated by `customer_id`.
|
|
1333
|
+
*/
|
|
1334
|
+
display_name?: string | null;
|
|
1335
|
+
/**
|
|
1336
|
+
* @description The email address of the fulfillment recipient.
|
|
1337
|
+
*
|
|
1338
|
+
* If provided, the email address overrides the corresponding customer profile value
|
|
1339
|
+
* indicated by `customer_id`.
|
|
1340
|
+
*/
|
|
1341
|
+
email_address?: string | null;
|
|
1342
|
+
/**
|
|
1343
|
+
* @description The phone number of the fulfillment recipient. This field is required.
|
|
1344
|
+
*
|
|
1345
|
+
* If provided, the phone number overrides the corresponding customer profile value
|
|
1346
|
+
* indicated by `customer_id`.
|
|
1347
|
+
*/
|
|
1348
|
+
phone_number?: string | null;
|
|
1349
|
+
/**
|
|
1350
|
+
* @description The address of the fulfillment recipient. This field is required.
|
|
1351
|
+
*
|
|
1352
|
+
* If provided, the address overrides the corresponding customer profile value
|
|
1353
|
+
* indicated by `customer_id`.
|
|
1354
|
+
*/
|
|
1355
|
+
address?: components["schemas"]["Address"];
|
|
1356
|
+
};
|
|
1357
|
+
/** @description Contains the details necessary to fulfill a shipment order. */
|
|
1358
|
+
FulfillmentShipmentDetails: {
|
|
1359
|
+
/** @description Information about the person to receive this shipment fulfillment. */
|
|
1360
|
+
recipient?: components["schemas"]["FulfillmentRecipient"];
|
|
1361
|
+
/** @description The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS). */
|
|
1362
|
+
carrier?: string | null;
|
|
1363
|
+
/** @description A note with additional information for the shipping carrier. */
|
|
1364
|
+
shipping_note?: string | null;
|
|
1365
|
+
/**
|
|
1366
|
+
* @description A description of the type of shipping product purchased from the carrier
|
|
1367
|
+
* (such as First Class, Priority, or Express).
|
|
1368
|
+
*/
|
|
1369
|
+
shipping_type?: string | null;
|
|
1370
|
+
/** @description The reference number provided by the carrier to track the shipment's progress. */
|
|
1371
|
+
tracking_number?: string | null;
|
|
1372
|
+
/** @description A link to the tracking webpage on the carrier's website. */
|
|
1373
|
+
tracking_url?: string | null;
|
|
1374
|
+
/**
|
|
1375
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1376
|
+
* indicating when the shipment was requested. The timestamp must be in RFC 3339 format
|
|
1377
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1378
|
+
*/
|
|
1379
|
+
readonly placed_at?: string;
|
|
1380
|
+
/**
|
|
1381
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1382
|
+
* indicating when this fulfillment was moved to the `RESERVED` state, which indicates that preparation
|
|
1383
|
+
* of this shipment has begun. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1384
|
+
*/
|
|
1385
|
+
readonly in_progress_at?: string;
|
|
1386
|
+
/**
|
|
1387
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1388
|
+
* indicating when this fulfillment was moved to the `PREPARED` state, which indicates that the
|
|
1389
|
+
* fulfillment is packaged. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1390
|
+
*/
|
|
1391
|
+
readonly packaged_at?: string;
|
|
1392
|
+
/**
|
|
1393
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1394
|
+
* indicating when the shipment is expected to be delivered to the shipping carrier.
|
|
1395
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1396
|
+
*/
|
|
1397
|
+
expected_shipped_at?: string | null;
|
|
1398
|
+
/**
|
|
1399
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1400
|
+
* indicating when this fulfillment was moved to the `COMPLETED` state, which indicates that
|
|
1401
|
+
* the fulfillment has been given to the shipping carrier. The timestamp must be in RFC 3339 format
|
|
1402
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1403
|
+
*/
|
|
1404
|
+
readonly shipped_at?: string;
|
|
1405
|
+
/**
|
|
1406
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1407
|
+
* indicating the shipment was canceled.
|
|
1408
|
+
* The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
|
|
1409
|
+
*/
|
|
1410
|
+
canceled_at?: string | null;
|
|
1411
|
+
/** @description A description of why the shipment was canceled. */
|
|
1412
|
+
cancel_reason?: string | null;
|
|
1413
|
+
/**
|
|
1414
|
+
* @description The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
|
|
1415
|
+
* indicating when the shipment failed to be completed. The timestamp must be in RFC 3339 format
|
|
1416
|
+
* (for example, "2016-09-04T23:59:33.123Z").
|
|
1417
|
+
*/
|
|
1418
|
+
readonly failed_at?: string;
|
|
1419
|
+
/** @description A description of why the shipment failed to be completed. */
|
|
1420
|
+
failure_reason?: string | null;
|
|
1421
|
+
};
|
|
1422
|
+
/**
|
|
1423
|
+
* @description The current state of this fulfillment.
|
|
1424
|
+
* @enum {string}
|
|
1425
|
+
*/
|
|
1426
|
+
FulfillmentState: "PROPOSED" | "RESERVED" | "PREPARED" | "COMPLETED" | "CANCELED" | "FAILED";
|
|
1427
|
+
/**
|
|
1428
|
+
* @description The type of fulfillment.
|
|
1429
|
+
* @enum {string}
|
|
1430
|
+
*/
|
|
1431
|
+
FulfillmentType: "PICKUP" | "SHIPMENT" | "DELIVERY" | "IN_STORE";
|
|
1432
|
+
/** @description Additional details about `WALLET` type payments with the `brand` of `LIGHTNING`. */
|
|
1433
|
+
LightningDetails: {
|
|
1434
|
+
/** @description Payment URL for the lightning payment, a.k.a. the invoice. */
|
|
1435
|
+
payment_url?: string | null;
|
|
1436
|
+
};
|
|
1437
|
+
/**
|
|
1438
|
+
* @description Defines the fields that are included in the response body of
|
|
1439
|
+
* a request to the `ListCustomers` endpoint.
|
|
1440
|
+
*
|
|
1441
|
+
* Either `errors` or `customers` is present in a given response (never both).
|
|
1442
|
+
* @example {
|
|
1443
|
+
* "customers": [
|
|
1444
|
+
* {
|
|
1445
|
+
* "address": {
|
|
1446
|
+
* "address_line_1": "500 Electric Ave",
|
|
1447
|
+
* "address_line_2": "Suite 600",
|
|
1448
|
+
* "administrative_district_level_1": "NY",
|
|
1449
|
+
* "country": "US",
|
|
1450
|
+
* "locality": "New York",
|
|
1451
|
+
* "postal_code": "10003"
|
|
1452
|
+
* },
|
|
1453
|
+
* "created_at": "2016-03-23T20:21:54.859Z",
|
|
1454
|
+
* "creation_source": "THIRD_PARTY",
|
|
1455
|
+
* "email_address": "Amelia.Earhart@example.com",
|
|
1456
|
+
* "family_name": "Earhart",
|
|
1457
|
+
* "given_name": "Amelia",
|
|
1458
|
+
* "group_ids": [
|
|
1459
|
+
* "545AXB44B4XXWMVQ4W8SBT3HHF"
|
|
1460
|
+
* ],
|
|
1461
|
+
* "id": "JDKYHBWT1D4F8MFH63DBMEN8Y4",
|
|
1462
|
+
* "note": "a customer",
|
|
1463
|
+
* "phone_number": "+1-212-555-4240",
|
|
1464
|
+
* "preferences": {
|
|
1465
|
+
* "email_unsubscribed": false
|
|
1466
|
+
* },
|
|
1467
|
+
* "reference_id": "YOUR_REFERENCE_ID",
|
|
1468
|
+
* "segment_ids": [
|
|
1469
|
+
* "1KB9JE5EGJXCW.REACHABLE"
|
|
1470
|
+
* ],
|
|
1471
|
+
* "updated_at": "2016-03-23T20:21:55Z",
|
|
1472
|
+
* "version": 1
|
|
1473
|
+
* }
|
|
1474
|
+
* ]
|
|
1475
|
+
* }
|
|
1476
|
+
*/
|
|
1477
|
+
ListCustomersResponse: {
|
|
1478
|
+
/** @description Any errors that occurred during the request. */
|
|
1479
|
+
errors?: components["schemas"]["Error"][];
|
|
1480
|
+
/**
|
|
1481
|
+
* @description The customer profiles associated with the Square account or an empty object (`{}`) if none are found.
|
|
1482
|
+
* Only customer profiles with public information (`given_name`, `family_name`, `company_name`, `email_address`, or
|
|
1483
|
+
* `phone_number`) are included in the response.
|
|
1484
|
+
*/
|
|
1485
|
+
customers?: components["schemas"]["Customer"][];
|
|
1486
|
+
/**
|
|
1487
|
+
* @description A pagination cursor to retrieve the next set of results for the
|
|
1488
|
+
* original query. A cursor is only present if the request succeeded and additional results
|
|
1489
|
+
* are available.
|
|
1490
|
+
*
|
|
1491
|
+
* For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
|
|
1492
|
+
*/
|
|
1493
|
+
cursor?: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* Format: int64
|
|
1496
|
+
* @description The total count of customers associated with the Square account. Only customer profiles with public information
|
|
1497
|
+
* (`given_name`, `family_name`, `company_name`, `email_address`, or `phone_number`) are counted. This field is present
|
|
1498
|
+
* only if `count` is set to `true` in the request.
|
|
1499
|
+
*/
|
|
1500
|
+
count?: number;
|
|
1501
|
+
};
|
|
1502
|
+
/**
|
|
1503
|
+
* @description Defines the fields that are included in the response body of a request
|
|
1504
|
+
* to the [ListLocations](api-endpoint:Locations-ListLocations) endpoint.
|
|
1505
|
+
*
|
|
1506
|
+
* Either `errors` or `locations` is present in a given response (never both).
|
|
1507
|
+
* @example {
|
|
1508
|
+
* "locations": [
|
|
1509
|
+
* {
|
|
1510
|
+
* "address": {
|
|
1511
|
+
* "address_line_1": "123 Main St",
|
|
1512
|
+
* "administrative_district_level_1": "CA",
|
|
1513
|
+
* "country": "US",
|
|
1514
|
+
* "locality": "San Francisco",
|
|
1515
|
+
* "postal_code": "94114"
|
|
1516
|
+
* },
|
|
1517
|
+
* "business_name": "Jet Fuel Coffee",
|
|
1518
|
+
* "capabilities": [
|
|
1519
|
+
* "CREDIT_CARD_PROCESSING"
|
|
1520
|
+
* ],
|
|
1521
|
+
* "country": "US",
|
|
1522
|
+
* "created_at": "2016-09-19T17:33:12Z",
|
|
1523
|
+
* "currency": "USD",
|
|
1524
|
+
* "id": "18YC4JDH91E1H",
|
|
1525
|
+
* "language_code": "en-US",
|
|
1526
|
+
* "merchant_id": "3MYCJG5GVYQ8Q",
|
|
1527
|
+
* "name": "Grant Park",
|
|
1528
|
+
* "phone_number": "+1 650-354-7217",
|
|
1529
|
+
* "status": "ACTIVE",
|
|
1530
|
+
* "timezone": "America/Los_Angeles"
|
|
1531
|
+
* },
|
|
1532
|
+
* {
|
|
1533
|
+
* "address": {
|
|
1534
|
+
* "address_line_1": "1234 Peachtree St. NE",
|
|
1535
|
+
* "administrative_district_level_1": "GA",
|
|
1536
|
+
* "locality": "Atlanta",
|
|
1537
|
+
* "postal_code": "30309"
|
|
1538
|
+
* },
|
|
1539
|
+
* "business_name": "Jet Fuel Coffee",
|
|
1540
|
+
* "capabilities": [
|
|
1541
|
+
* "CREDIT_CARD_PROCESSING"
|
|
1542
|
+
* ],
|
|
1543
|
+
* "coordinates": {
|
|
1544
|
+
* "latitude": 33.7889,
|
|
1545
|
+
* "longitude": -84.3841
|
|
1546
|
+
* },
|
|
1547
|
+
* "country": "US",
|
|
1548
|
+
* "created_at": "2022-02-19T17:58:25Z",
|
|
1549
|
+
* "currency": "USD",
|
|
1550
|
+
* "description": "Midtown Atlanta store",
|
|
1551
|
+
* "id": "3Z4V4WHQK64X9",
|
|
1552
|
+
* "language_code": "en-US",
|
|
1553
|
+
* "mcc": "7299",
|
|
1554
|
+
* "merchant_id": "3MYCJG5GVYQ8Q",
|
|
1555
|
+
* "name": "Midtown",
|
|
1556
|
+
* "status": "ACTIVE",
|
|
1557
|
+
* "timezone": "America/New_York",
|
|
1558
|
+
* "type": "PHYSICAL"
|
|
1559
|
+
* }
|
|
1560
|
+
* ]
|
|
1561
|
+
* }
|
|
1562
|
+
*/
|
|
1563
|
+
ListLocationsResponse: {
|
|
1564
|
+
/** @description Any errors that occurred during the request. */
|
|
1565
|
+
errors?: components["schemas"]["Error"][];
|
|
1566
|
+
/** @description The business locations. */
|
|
1567
|
+
locations?: components["schemas"]["Location"][];
|
|
1568
|
+
};
|
|
1569
|
+
/** @enum {string} */
|
|
1570
|
+
ListPaymentRefundsRequestSortField: "CREATED_AT" | "UPDATED_AT";
|
|
1571
|
+
/**
|
|
1572
|
+
* @description Defines the response returned by [ListPaymentRefunds](api-endpoint:Refunds-ListPaymentRefunds).
|
|
1573
|
+
*
|
|
1574
|
+
* Either `errors` or `refunds` is present in a given response (never both).
|
|
1575
|
+
* @example {
|
|
1576
|
+
* "cursor": "5evquW1YswHoT4EoyUhzMmTsCnsSXBU9U0WJ4FU4623nrMQcocH0RGU6Up1YkwfiMcF59ood58EBTEGgzMTGHQJpocic7ExOL0NtrTXCeWcv0UJIJNk8eXb",
|
|
1577
|
+
* "refunds": [
|
|
1578
|
+
* {
|
|
1579
|
+
* "amount_money": {
|
|
1580
|
+
* "amount": 555,
|
|
1581
|
+
* "currency": "USD"
|
|
1582
|
+
* },
|
|
1583
|
+
* "created_at": "2021-10-13T19:59:05.342Z",
|
|
1584
|
+
* "id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY_69MmgHubkLqx9wGhnmenRUHOaKitE6llfZuxcWYjGxd",
|
|
1585
|
+
* "location_id": "L88917AVBK2S5",
|
|
1586
|
+
* "order_id": "9ltv0bx5PuvGXUYHYHxYSKEqC3IZY",
|
|
1587
|
+
* "payment_id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY",
|
|
1588
|
+
* "processing_fee": [
|
|
1589
|
+
* {
|
|
1590
|
+
* "amount_money": {
|
|
1591
|
+
* "amount": -34,
|
|
1592
|
+
* "currency": "USD"
|
|
1593
|
+
* },
|
|
1594
|
+
* "effective_at": "2021-10-13T21:34:35.000Z",
|
|
1595
|
+
* "type": "INITIAL"
|
|
1596
|
+
* }
|
|
1597
|
+
* ],
|
|
1598
|
+
* "reason": "Example Refund",
|
|
1599
|
+
* "status": "COMPLETED",
|
|
1600
|
+
* "updated_at": "2021-10-13T20:00:03.497Z"
|
|
1601
|
+
* }
|
|
1602
|
+
* ]
|
|
1603
|
+
* }
|
|
1604
|
+
*/
|
|
1605
|
+
ListPaymentRefundsResponse: {
|
|
1606
|
+
/** @description Information about errors encountered during the request. */
|
|
1607
|
+
errors?: components["schemas"]["Error"][];
|
|
1608
|
+
/** @description The list of requested refunds. */
|
|
1609
|
+
refunds?: components["schemas"]["PaymentRefund"][];
|
|
1610
|
+
/**
|
|
1611
|
+
* @description The pagination cursor to be used in a subsequent request. If empty,
|
|
1612
|
+
* this is the final response.
|
|
1613
|
+
*
|
|
1614
|
+
* For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
|
|
1615
|
+
*/
|
|
1616
|
+
cursor?: string;
|
|
1617
|
+
};
|
|
1618
|
+
/** @enum {string} */
|
|
1619
|
+
ListPaymentsRequestSortField: "CREATED_AT" | "OFFLINE_CREATED_AT" | "UPDATED_AT";
|
|
1620
|
+
/**
|
|
1621
|
+
* @description Defines the response returned by [ListPayments](api-endpoint:Payments-ListPayments).
|
|
1622
|
+
* @example {
|
|
1623
|
+
* "payments": [
|
|
1624
|
+
* {
|
|
1625
|
+
* "amount_money": {
|
|
1626
|
+
* "amount": 555,
|
|
1627
|
+
* "currency": "USD"
|
|
1628
|
+
* },
|
|
1629
|
+
* "application_details": {
|
|
1630
|
+
* "application_id": "sq0ids-Pw67AZAlLVB7hsRmwlJPuA",
|
|
1631
|
+
* "square_product": "VIRTUAL_TERMINAL"
|
|
1632
|
+
* },
|
|
1633
|
+
* "approved_money": {
|
|
1634
|
+
* "amount": 555,
|
|
1635
|
+
* "currency": "USD"
|
|
1636
|
+
* },
|
|
1637
|
+
* "card_details": {
|
|
1638
|
+
* "auth_result_code": "2Nkw7q",
|
|
1639
|
+
* "avs_status": "AVS_ACCEPTED",
|
|
1640
|
+
* "card": {
|
|
1641
|
+
* "bin": "411111",
|
|
1642
|
+
* "card_brand": "VISA",
|
|
1643
|
+
* "card_type": "DEBIT",
|
|
1644
|
+
* "exp_month": 11,
|
|
1645
|
+
* "exp_year": 2022,
|
|
1646
|
+
* "fingerprint": "sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ",
|
|
1647
|
+
* "last_4": "1111",
|
|
1648
|
+
* "prepaid_type": "NOT_PREPAID"
|
|
1649
|
+
* },
|
|
1650
|
+
* "card_payment_timeline": {
|
|
1651
|
+
* "authorized_at": "2021-10-13T19:34:33.680Z",
|
|
1652
|
+
* "captured_at": "2021-10-13T19:34:34.340Z"
|
|
1653
|
+
* },
|
|
1654
|
+
* "cvv_status": "CVV_ACCEPTED",
|
|
1655
|
+
* "entry_method": "KEYED",
|
|
1656
|
+
* "statement_description": "SQ *EXAMPLE TEST GOSQ.C",
|
|
1657
|
+
* "status": "CAPTURED"
|
|
1658
|
+
* },
|
|
1659
|
+
* "created_at": "2021-10-13T19:34:33.524Z",
|
|
1660
|
+
* "delay_action": "CANCEL",
|
|
1661
|
+
* "delay_duration": "PT168H",
|
|
1662
|
+
* "delayed_until": "2021-10-20T19:34:33.524Z",
|
|
1663
|
+
* "employee_id": "TMoK_ogh6rH1o4dV",
|
|
1664
|
+
* "id": "bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY",
|
|
1665
|
+
* "location_id": "L88917AVBK2S5",
|
|
1666
|
+
* "note": "Test Note",
|
|
1667
|
+
* "order_id": "d7eKah653Z579f3gVtjlxpSlmUcZY",
|
|
1668
|
+
* "processing_fee": [
|
|
1669
|
+
* {
|
|
1670
|
+
* "amount_money": {
|
|
1671
|
+
* "amount": 34,
|
|
1672
|
+
* "currency": "USD"
|
|
1673
|
+
* },
|
|
1674
|
+
* "effective_at": "2021-10-13T21:34:35.000Z",
|
|
1675
|
+
* "type": "INITIAL"
|
|
1676
|
+
* }
|
|
1677
|
+
* ],
|
|
1678
|
+
* "receipt_number": "bP9m",
|
|
1679
|
+
* "receipt_url": "https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY",
|
|
1680
|
+
* "source_type": "CARD",
|
|
1681
|
+
* "status": "COMPLETED",
|
|
1682
|
+
* "team_member_id": "TMoK_ogh6rH1o4dV",
|
|
1683
|
+
* "total_money": {
|
|
1684
|
+
* "amount": 555,
|
|
1685
|
+
* "currency": "USD"
|
|
1686
|
+
* },
|
|
1687
|
+
* "updated_at": "2021-10-13T19:34:37.261Z",
|
|
1688
|
+
* "version_token": "vguW2km0KpVCdAXZcNTZ438qg5LlVPTP4HO5OpiHNfa6o"
|
|
1689
|
+
* }
|
|
1690
|
+
* ]
|
|
1691
|
+
* }
|
|
1692
|
+
*/
|
|
1693
|
+
ListPaymentsResponse: {
|
|
1694
|
+
/** @description Information about errors encountered during the request. */
|
|
1695
|
+
errors?: components["schemas"]["Error"][];
|
|
1696
|
+
/** @description The requested list of payments. */
|
|
1697
|
+
payments?: components["schemas"]["Payment"][];
|
|
1698
|
+
/**
|
|
1699
|
+
* @description The pagination cursor to be used in a subsequent request. If empty,
|
|
1700
|
+
* this is the final response.
|
|
1701
|
+
*
|
|
1702
|
+
* For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
|
|
1703
|
+
*/
|
|
1704
|
+
cursor?: string;
|
|
1705
|
+
};
|
|
1706
|
+
/** @description Represents one of a business' [locations](https://developer.squareup.com/docs/locations-api). */
|
|
1707
|
+
Location: {
|
|
1708
|
+
/** @description A short generated string of letters and numbers that uniquely identifies this location instance. */
|
|
1709
|
+
readonly id?: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* @description The name of the location.
|
|
1712
|
+
* This information appears in the Seller Dashboard as the nickname.
|
|
1713
|
+
* A location name must be unique within a seller account.
|
|
1714
|
+
*/
|
|
1715
|
+
name?: string | null;
|
|
1716
|
+
/** @description The physical address of the location. */
|
|
1717
|
+
address?: components["schemas"]["Address"];
|
|
1718
|
+
/**
|
|
1719
|
+
* @description The [IANA time zone](https://www.iana.org/time-zones) identifier for
|
|
1720
|
+
* the time zone of the location. For example, `America/Los_Angeles`.
|
|
1721
|
+
*/
|
|
1722
|
+
timezone?: string | null;
|
|
1723
|
+
/**
|
|
1724
|
+
* @description The Square features that are enabled for the location.
|
|
1725
|
+
* See [LocationCapability](entity:LocationCapability) for possible values.
|
|
1726
|
+
* See [LocationCapability](#type-locationcapability) for possible values
|
|
1727
|
+
*/
|
|
1728
|
+
readonly capabilities?: components["schemas"]["LocationCapability"][];
|
|
1729
|
+
/**
|
|
1730
|
+
* @description The status of the location.
|
|
1731
|
+
* See [LocationStatus](#type-locationstatus) for possible values
|
|
1732
|
+
*/
|
|
1733
|
+
status?: components["schemas"]["LocationStatus"];
|
|
1734
|
+
/**
|
|
1735
|
+
* @description The time when the location was created, in RFC 3339 format.
|
|
1736
|
+
* For more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates).
|
|
1737
|
+
*/
|
|
1738
|
+
readonly created_at?: string;
|
|
1739
|
+
/** @description The ID of the merchant that owns the location. */
|
|
1740
|
+
readonly merchant_id?: string;
|
|
1741
|
+
/**
|
|
1742
|
+
* @description The country of the location, in the two-letter format of ISO 3166. For example, `US` or `JP`.
|
|
1743
|
+
*
|
|
1744
|
+
* See [Country](entity:Country) for possible values.
|
|
1745
|
+
* See [Country](#type-country) for possible values
|
|
1746
|
+
*/
|
|
1747
|
+
readonly country?: components["schemas"]["Country"];
|
|
1748
|
+
/**
|
|
1749
|
+
* @description The language associated with the location, in
|
|
1750
|
+
* [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).
|
|
1751
|
+
* For more information, see [Language Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences).
|
|
1752
|
+
*/
|
|
1753
|
+
language_code?: string | null;
|
|
1754
|
+
/**
|
|
1755
|
+
* @description The currency used for all transactions at this location,
|
|
1756
|
+
* in ISO 4217 format. For example, the currency code for US dollars is `USD`.
|
|
1757
|
+
* See [Currency](entity:Currency) for possible values.
|
|
1758
|
+
* See [Currency](#type-currency) for possible values
|
|
1759
|
+
*/
|
|
1760
|
+
readonly currency?: components["schemas"]["Currency"];
|
|
1761
|
+
/** @description The phone number of the location. For example, `+1 855-700-6000`. */
|
|
1762
|
+
phone_number?: string | null;
|
|
1763
|
+
/** @description The name of the location's overall business. This name is present on receipts and other customer-facing branding, and can be changed no more than three times in a twelve-month period. */
|
|
1764
|
+
business_name?: string | null;
|
|
1765
|
+
/**
|
|
1766
|
+
* @description The type of the location.
|
|
1767
|
+
* See [LocationType](#type-locationtype) for possible values
|
|
1768
|
+
*/
|
|
1769
|
+
type?: components["schemas"]["LocationType"];
|
|
1770
|
+
/** @description The website URL of the location. For example, `https://squareup.com`. */
|
|
1771
|
+
website_url?: string | null;
|
|
1772
|
+
/** @description The hours of operation for the location. */
|
|
1773
|
+
business_hours?: components["schemas"]["BusinessHours"];
|
|
1774
|
+
/** @description The email address of the location. This can be unique to the location and is not always the email address for the business owner or administrator. */
|
|
1775
|
+
business_email?: string | null;
|
|
1776
|
+
/** @description The description of the location. For example, `Main Street location`. */
|
|
1777
|
+
description?: string | null;
|
|
1778
|
+
/** @description The Twitter username of the location without the '@' symbol. For example, `Square`. */
|
|
1779
|
+
twitter_username?: string | null;
|
|
1780
|
+
/** @description The Instagram username of the location without the '@' symbol. For example, `square`. */
|
|
1781
|
+
instagram_username?: string | null;
|
|
1782
|
+
/** @description The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. For example, `https://www.facebook.com/square`. */
|
|
1783
|
+
facebook_url?: string | null;
|
|
1784
|
+
/** @description The physical coordinates (latitude and longitude) of the location. */
|
|
1785
|
+
coordinates?: components["schemas"]["Coordinates"];
|
|
1786
|
+
/**
|
|
1787
|
+
* @description The URL of the logo image for the location. When configured in the Seller
|
|
1788
|
+
* Dashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.
|
|
1789
|
+
* This image should have a roughly square (1:1) aspect ratio and should be at least 200x200 pixels.
|
|
1790
|
+
*/
|
|
1791
|
+
readonly logo_url?: string;
|
|
1792
|
+
/** @description The URL of the Point of Sale background image for the location. */
|
|
1793
|
+
readonly pos_background_url?: string;
|
|
1794
|
+
/**
|
|
1795
|
+
* @description A four-digit number that describes the kind of goods or services sold at the location.
|
|
1796
|
+
* The [merchant category code (MCC)](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) of the location as standardized by ISO 18245.
|
|
1797
|
+
* For example, `5045`, for a location that sells computer goods and software.
|
|
1798
|
+
*/
|
|
1799
|
+
mcc?: string | null;
|
|
1800
|
+
/**
|
|
1801
|
+
* @description The URL of a full-format logo image for the location. When configured in the Seller
|
|
1802
|
+
* Dashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.
|
|
1803
|
+
* This image can be wider than it is tall and should be at least 1280x648 pixels.
|
|
1804
|
+
*/
|
|
1805
|
+
readonly full_format_logo_url?: string;
|
|
1806
|
+
/** @description The tax IDs for this location. */
|
|
1807
|
+
readonly tax_ids?: components["schemas"]["TaxIds"];
|
|
1808
|
+
/**
|
|
1809
|
+
* @description The custom text that appears on receipts issued for this location.
|
|
1810
|
+
* This text can also be configured in the Seller Dashboard (Receipts section).
|
|
1811
|
+
*/
|
|
1812
|
+
custom_receipt_text?: string | null;
|
|
1813
|
+
/**
|
|
1814
|
+
* @description The return policy that appears on receipts issued for this location.
|
|
1815
|
+
* This text can also be configured in the Seller Dashboard (Receipts section).
|
|
1816
|
+
*/
|
|
1817
|
+
return_policy?: string | null;
|
|
1818
|
+
};
|
|
1819
|
+
/**
|
|
1820
|
+
* @description The capabilities a location might have.
|
|
1821
|
+
* @enum {string}
|
|
1822
|
+
*/
|
|
1823
|
+
LocationCapability: "CREDIT_CARD_PROCESSING" | "AUTOMATIC_TRANSFERS" | "UNLINKED_REFUNDS";
|
|
1824
|
+
/**
|
|
1825
|
+
* @description A location's status.
|
|
1826
|
+
* @enum {string}
|
|
1827
|
+
*/
|
|
1828
|
+
LocationStatus: "ACTIVE" | "INACTIVE";
|
|
1829
|
+
/**
|
|
1830
|
+
* @description A location's type.
|
|
1831
|
+
* @enum {string}
|
|
1832
|
+
*/
|
|
1833
|
+
LocationType: "PHYSICAL" | "MOBILE";
|
|
1834
|
+
/**
|
|
1835
|
+
* @description Represents a unit of measurement to use with a quantity, such as ounces
|
|
1836
|
+
* or inches. Exactly one of the following fields are required: `custom_unit`,
|
|
1837
|
+
* `area_unit`, `length_unit`, `volume_unit`, and `weight_unit`.
|
|
1838
|
+
*/
|
|
1839
|
+
MeasurementUnit: {
|
|
1840
|
+
/**
|
|
1841
|
+
* @description A custom unit of measurement defined by the seller using the Point of Sale
|
|
1842
|
+
* app or ad-hoc as an order line item.
|
|
1843
|
+
*/
|
|
1844
|
+
custom_unit?: components["schemas"]["MeasurementUnitCustom"];
|
|
1845
|
+
/**
|
|
1846
|
+
* @description Represents a standard area unit.
|
|
1847
|
+
* See [MeasurementUnitArea](#type-measurementunitarea) for possible values
|
|
1848
|
+
*/
|
|
1849
|
+
area_unit?: components["schemas"]["MeasurementUnitArea"];
|
|
1850
|
+
/**
|
|
1851
|
+
* @description Represents a standard length unit.
|
|
1852
|
+
* See [MeasurementUnitLength](#type-measurementunitlength) for possible values
|
|
1853
|
+
*/
|
|
1854
|
+
length_unit?: components["schemas"]["MeasurementUnitLength"];
|
|
1855
|
+
/**
|
|
1856
|
+
* @description Represents a standard volume unit.
|
|
1857
|
+
* See [MeasurementUnitVolume](#type-measurementunitvolume) for possible values
|
|
1858
|
+
*/
|
|
1859
|
+
volume_unit?: components["schemas"]["MeasurementUnitVolume"];
|
|
1860
|
+
/**
|
|
1861
|
+
* @description Represents a standard unit of weight or mass.
|
|
1862
|
+
* See [MeasurementUnitWeight](#type-measurementunitweight) for possible values
|
|
1863
|
+
*/
|
|
1864
|
+
weight_unit?: components["schemas"]["MeasurementUnitWeight"];
|
|
1865
|
+
/**
|
|
1866
|
+
* @description Reserved for API integrations that lack the ability to specify a real measurement unit
|
|
1867
|
+
* See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values
|
|
1868
|
+
*/
|
|
1869
|
+
generic_unit?: components["schemas"]["MeasurementUnitGeneric"];
|
|
1870
|
+
/**
|
|
1871
|
+
* @description Represents a standard unit of time.
|
|
1872
|
+
* See [MeasurementUnitTime](#type-measurementunittime) for possible values
|
|
1873
|
+
*/
|
|
1874
|
+
time_unit?: components["schemas"]["MeasurementUnitTime"];
|
|
1875
|
+
/**
|
|
1876
|
+
* @description Represents the type of the measurement unit.
|
|
1877
|
+
* See [MeasurementUnitUnitType](#type-measurementunitunittype) for possible values
|
|
1878
|
+
*/
|
|
1879
|
+
type?: components["schemas"]["MeasurementUnitUnitType"];
|
|
1880
|
+
};
|
|
1881
|
+
/**
|
|
1882
|
+
* @description Unit of area used to measure a quantity.
|
|
1883
|
+
* @enum {string}
|
|
1884
|
+
*/
|
|
1885
|
+
MeasurementUnitArea: "IMPERIAL_ACRE" | "IMPERIAL_SQUARE_INCH" | "IMPERIAL_SQUARE_FOOT" | "IMPERIAL_SQUARE_YARD" | "IMPERIAL_SQUARE_MILE" | "METRIC_SQUARE_CENTIMETER" | "METRIC_SQUARE_METER" | "METRIC_SQUARE_KILOMETER";
|
|
1886
|
+
/** @description The information needed to define a custom unit, provided by the seller. */
|
|
1887
|
+
MeasurementUnitCustom: {
|
|
1888
|
+
/** @description The name of the custom unit, for example "bushel". */
|
|
1889
|
+
name: string;
|
|
1890
|
+
/**
|
|
1891
|
+
* @description The abbreviation of the custom unit, such as "bsh" (bushel). This appears
|
|
1892
|
+
* in the cart for the Point of Sale app, and in reports.
|
|
1893
|
+
*/
|
|
1894
|
+
abbreviation: string;
|
|
1895
|
+
};
|
|
1896
|
+
/** @enum {string} */
|
|
1897
|
+
MeasurementUnitGeneric: "UNIT";
|
|
1898
|
+
/**
|
|
1899
|
+
* @description The unit of length used to measure a quantity.
|
|
1900
|
+
* @enum {string}
|
|
1901
|
+
*/
|
|
1902
|
+
MeasurementUnitLength: "IMPERIAL_INCH" | "IMPERIAL_FOOT" | "IMPERIAL_YARD" | "IMPERIAL_MILE" | "METRIC_MILLIMETER" | "METRIC_CENTIMETER" | "METRIC_METER" | "METRIC_KILOMETER";
|
|
1903
|
+
/**
|
|
1904
|
+
* @description Unit of time used to measure a quantity (a duration).
|
|
1905
|
+
* @enum {string}
|
|
1906
|
+
*/
|
|
1907
|
+
MeasurementUnitTime: "GENERIC_MILLISECOND" | "GENERIC_SECOND" | "GENERIC_MINUTE" | "GENERIC_HOUR" | "GENERIC_DAY";
|
|
1908
|
+
/**
|
|
1909
|
+
* @description Describes the type of this unit and indicates which field contains the unit information. This is an ‘open’ enum.
|
|
1910
|
+
* @enum {string}
|
|
1911
|
+
*/
|
|
1912
|
+
MeasurementUnitUnitType: "TYPE_CUSTOM" | "TYPE_AREA" | "TYPE_LENGTH" | "TYPE_VOLUME" | "TYPE_WEIGHT" | "TYPE_GENERIC";
|
|
1913
|
+
/**
|
|
1914
|
+
* @description The unit of volume used to measure a quantity.
|
|
1915
|
+
* @enum {string}
|
|
1916
|
+
*/
|
|
1917
|
+
MeasurementUnitVolume: "GENERIC_FLUID_OUNCE" | "GENERIC_SHOT" | "GENERIC_CUP" | "GENERIC_PINT" | "GENERIC_QUART" | "GENERIC_GALLON" | "IMPERIAL_CUBIC_INCH" | "IMPERIAL_CUBIC_FOOT" | "IMPERIAL_CUBIC_YARD" | "METRIC_MILLILITER" | "METRIC_LITER";
|
|
1918
|
+
/**
|
|
1919
|
+
* @description Unit of weight used to measure a quantity.
|
|
1920
|
+
* @enum {string}
|
|
1921
|
+
*/
|
|
1922
|
+
MeasurementUnitWeight: "IMPERIAL_WEIGHT_OUNCE" | "IMPERIAL_POUND" | "IMPERIAL_STONE" | "METRIC_MILLIGRAM" | "METRIC_GRAM" | "METRIC_KILOGRAM";
|
|
1923
|
+
/**
|
|
1924
|
+
* @description Represents an amount of money. `Money` fields can be signed or unsigned.
|
|
1925
|
+
* Fields that do not explicitly define whether they are signed or unsigned are
|
|
1926
|
+
* considered unsigned and can only hold positive amounts. For signed fields, the
|
|
1927
|
+
* sign of the value indicates the purpose of the money transfer. See
|
|
1928
|
+
* [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)
|
|
1929
|
+
* for more information.
|
|
1930
|
+
*/
|
|
1931
|
+
Money: {
|
|
1932
|
+
/**
|
|
1933
|
+
* Format: int64
|
|
1934
|
+
* @description The amount of money, in the smallest denomination of the currency
|
|
1935
|
+
* indicated by `currency`. For example, when `currency` is `USD`, `amount` is
|
|
1936
|
+
* in cents. Monetary amounts can be positive or negative. See the specific
|
|
1937
|
+
* field description to determine the meaning of the sign in a particular case.
|
|
1938
|
+
*/
|
|
1939
|
+
amount?: number | null;
|
|
1940
|
+
/**
|
|
1941
|
+
* @description The type of currency, in __ISO 4217 format__. For example, the currency
|
|
1942
|
+
* code for US dollars is `USD`.
|
|
1943
|
+
*
|
|
1944
|
+
* See [Currency](entity:Currency) for possible values.
|
|
1945
|
+
* See [Currency](#type-currency) for possible values
|
|
1946
|
+
*/
|
|
1947
|
+
currency?: components["schemas"]["Currency"];
|
|
1948
|
+
};
|
|
1949
|
+
/** @description Details specific to offline payments. */
|
|
1950
|
+
OfflinePaymentDetails: {
|
|
1951
|
+
/** @description The client-side timestamp of when the offline payment was created, in RFC 3339 format. */
|
|
1952
|
+
readonly client_created_at?: string;
|
|
1953
|
+
};
|
|
1954
|
+
/**
|
|
1955
|
+
* @description Contains all information related to a single order to process with Square,
|
|
1956
|
+
* including line items that specify the products to purchase. `Order` objects also
|
|
1957
|
+
* include information about any associated tenders, refunds, and returns.
|
|
1958
|
+
*
|
|
1959
|
+
* All Connect V2 Transactions have all been converted to Orders including all associated
|
|
1960
|
+
* itemization data.
|
|
1961
|
+
*/
|
|
1962
|
+
Order: {
|
|
1963
|
+
/** @description The order's unique ID. */
|
|
1964
|
+
readonly id?: string;
|
|
1965
|
+
/** @description The ID of the seller location that this order is associated with. */
|
|
1966
|
+
location_id: string;
|
|
1967
|
+
/**
|
|
1968
|
+
* @description A client-specified ID to associate an entity in another system
|
|
1969
|
+
* with this order.
|
|
1970
|
+
*/
|
|
1971
|
+
reference_id?: string | null;
|
|
1972
|
+
/**
|
|
1973
|
+
* @description The latest source details of the order.
|
|
1974
|
+
*
|
|
1975
|
+
* This field reflects the most recent source that interacted with or modified the order,
|
|
1976
|
+
* and may change during the order lifecycle. For example:
|
|
1977
|
+
* - An order created via API (source.name = "MyPOS") paid with Square Terminal may have
|
|
1978
|
+
* source updated to reflect the Terminal application (which uses REGISTER, like POS)
|
|
1979
|
+
* - An order updated or completed by a different application may have source updated
|
|
1980
|
+
* to reflect that application.
|
|
1981
|
+
*
|
|
1982
|
+
* To preserve the original source from order creation regardless of subsequent updates,
|
|
1983
|
+
* use the `creation_source` field instead.
|
|
1984
|
+
*/
|
|
1985
|
+
source?: components["schemas"]["OrderSource"];
|
|
1986
|
+
/**
|
|
1987
|
+
* @description The ID of the [customer](entity:Customer) associated with the order.
|
|
1988
|
+
*
|
|
1989
|
+
* You should specify a `customer_id` on the order (or the payment) to ensure that transactions
|
|
1990
|
+
* are reliably linked to customers. Omitting this field might result in the creation of new
|
|
1991
|
+
* [instant profiles](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles).
|
|
1992
|
+
*/
|
|
1993
|
+
customer_id?: string | null;
|
|
1994
|
+
/** @description The line items included in the order. */
|
|
1995
|
+
line_items?: components["schemas"]["OrderLineItem"][] | null;
|
|
1996
|
+
/**
|
|
1997
|
+
* @description The list of all taxes associated with the order.
|
|
1998
|
+
*
|
|
1999
|
+
* Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an
|
|
2000
|
+
* `OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes
|
|
2001
|
+
* with `ORDER` scope, the server generates an `OrderLineItemAppliedTax` for every line item.
|
|
2002
|
+
*
|
|
2003
|
+
* On reads, each tax in the list includes the total amount of that tax applied to the order.
|
|
2004
|
+
*
|
|
2005
|
+
* __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, using the deprecated
|
|
2006
|
+
* `line_items.taxes` field results in an error. Use `line_items.applied_taxes`
|
|
2007
|
+
* instead.
|
|
2008
|
+
*/
|
|
2009
|
+
taxes?: components["schemas"]["OrderLineItemTax"][] | null;
|
|
2010
|
+
/**
|
|
2011
|
+
* @description The list of all discounts associated with the order.
|
|
2012
|
+
*
|
|
2013
|
+
* Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`,
|
|
2014
|
+
* an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to.
|
|
2015
|
+
* For discounts with `ORDER` scope, the server generates an `OrderLineItemAppliedDiscount`
|
|
2016
|
+
* for every line item.
|
|
2017
|
+
*
|
|
2018
|
+
* __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, using the deprecated
|
|
2019
|
+
* `line_items.discounts` field results in an error. Use `line_items.applied_discounts`
|
|
2020
|
+
* instead.
|
|
2021
|
+
*/
|
|
2022
|
+
discounts?: components["schemas"]["OrderLineItemDiscount"][] | null;
|
|
2023
|
+
/** @description A list of service charges applied to the order. */
|
|
2024
|
+
service_charges?: components["schemas"]["OrderServiceCharge"][] | null;
|
|
2025
|
+
/**
|
|
2026
|
+
* @description Details about order fulfillment.
|
|
2027
|
+
*
|
|
2028
|
+
* Orders can only be created with at most one fulfillment. However, orders returned
|
|
2029
|
+
* by the API might contain multiple fulfillments.
|
|
2030
|
+
*/
|
|
2031
|
+
fulfillments?: components["schemas"]["Fulfillment"][] | null;
|
|
2032
|
+
/**
|
|
2033
|
+
* @description A collection of items from sale orders being returned in this one. Normally part of an
|
|
2034
|
+
* itemized return or exchange. There is exactly one `Return` object per sale `Order` being
|
|
2035
|
+
* referenced.
|
|
2036
|
+
*/
|
|
2037
|
+
readonly returns?: components["schemas"]["OrderReturn"][];
|
|
2038
|
+
/** @description The rollup of the returned money amounts. */
|
|
2039
|
+
readonly return_amounts?: components["schemas"]["OrderMoneyAmounts"];
|
|
2040
|
+
/** @description The net money amounts (sale money - return money). */
|
|
2041
|
+
readonly net_amounts?: components["schemas"]["OrderMoneyAmounts"];
|
|
2042
|
+
/**
|
|
2043
|
+
* @description A positive rounding adjustment to the total of the order. This adjustment is commonly
|
|
2044
|
+
* used to apply cash rounding when the minimum unit of account is smaller than the lowest physical
|
|
2045
|
+
* denomination of the currency.
|
|
2046
|
+
*/
|
|
2047
|
+
readonly rounding_adjustment?: components["schemas"]["OrderRoundingAdjustment"];
|
|
2048
|
+
/** @description The tenders that were used to pay for the order. */
|
|
2049
|
+
readonly tenders?: components["schemas"]["Tender"][];
|
|
2050
|
+
/** @description The refunds that are part of this order. */
|
|
2051
|
+
readonly refunds?: components["schemas"]["Refund"][];
|
|
2052
|
+
/**
|
|
2053
|
+
* @description Application-defined data attached to this order. Metadata fields are intended
|
|
2054
|
+
* to store descriptive references or associations with an entity in another system or store brief
|
|
2055
|
+
* information about the object. Square does not process this field; it only stores and returns it
|
|
2056
|
+
* in relevant API calls. Do not use metadata to store any sensitive information (such as personally
|
|
2057
|
+
* identifiable information or card details).
|
|
2058
|
+
*
|
|
2059
|
+
* Keys written by applications must be 60 characters or less and must be in the character set
|
|
2060
|
+
* `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
|
|
2061
|
+
* with a namespace, separated from the key with a ':' character.
|
|
2062
|
+
*
|
|
2063
|
+
* Values have a maximum length of 255 characters.
|
|
2064
|
+
*
|
|
2065
|
+
* An application can have up to 10 entries per metadata field.
|
|
2066
|
+
*
|
|
2067
|
+
* Entries written by applications are private and can only be read or modified by the same
|
|
2068
|
+
* application.
|
|
2069
|
+
*
|
|
2070
|
+
* For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
|
|
2071
|
+
*/
|
|
2072
|
+
metadata?: {
|
|
2073
|
+
[key: string]: string;
|
|
2074
|
+
} | null;
|
|
2075
|
+
/** @description The timestamp for when the order was created, at server side, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). */
|
|
2076
|
+
readonly created_at?: string;
|
|
2077
|
+
/** @description The timestamp for when the order was last updated, at server side, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). */
|
|
2078
|
+
readonly updated_at?: string;
|
|
2079
|
+
/** @description The timestamp for when the order reached a terminal [state](entity:OrderState), in RFC 3339 format (for example "2016-09-04T23:59:33.123Z"). */
|
|
2080
|
+
readonly closed_at?: string;
|
|
2081
|
+
/**
|
|
2082
|
+
* @description The current state of the order.
|
|
2083
|
+
* See [OrderState](#type-orderstate) for possible values
|
|
2084
|
+
*/
|
|
2085
|
+
state?: components["schemas"]["OrderState"];
|
|
2086
|
+
/**
|
|
2087
|
+
* @description The version number, which is incremented each time an update is committed to the order.
|
|
2088
|
+
* Orders not created through the API do not include a version number and
|
|
2089
|
+
* therefore cannot be updated.
|
|
2090
|
+
*
|
|
2091
|
+
* [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders).
|
|
2092
|
+
*/
|
|
2093
|
+
version?: number;
|
|
2094
|
+
/** @description The total amount of money to collect for the order. */
|
|
2095
|
+
readonly total_money?: components["schemas"]["Money"];
|
|
2096
|
+
/** @description The total amount of tax money to collect for the order. */
|
|
2097
|
+
readonly total_tax_money?: components["schemas"]["Money"];
|
|
2098
|
+
/** @description The total amount of discount money to collect for the order. */
|
|
2099
|
+
readonly total_discount_money?: components["schemas"]["Money"];
|
|
2100
|
+
/** @description The total amount of tip money to collect for the order. */
|
|
2101
|
+
readonly total_tip_money?: components["schemas"]["Money"];
|
|
2102
|
+
/**
|
|
2103
|
+
* @description The total amount of money collected in service charges for the order.
|
|
2104
|
+
*
|
|
2105
|
+
* Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual
|
|
2106
|
+
* service charge. Therefore, `total_service_charge_money` only includes inclusive tax amounts,
|
|
2107
|
+
* not additive tax amounts.
|
|
2108
|
+
*/
|
|
2109
|
+
readonly total_service_charge_money?: components["schemas"]["Money"];
|
|
2110
|
+
/**
|
|
2111
|
+
* @description A short-term identifier for the order (such as a customer first name,
|
|
2112
|
+
* table number, or auto-generated order number that resets daily).
|
|
2113
|
+
*/
|
|
2114
|
+
ticket_name?: string | null;
|
|
2115
|
+
/**
|
|
2116
|
+
* @description Pricing options for an order. The options affect how the order's price is calculated.
|
|
2117
|
+
* They can be used, for example, to apply automatic price adjustments that are based on
|
|
2118
|
+
* preconfigured [pricing rules](entity:CatalogPricingRule).
|
|
2119
|
+
*/
|
|
2120
|
+
pricing_options?: components["schemas"]["OrderPricingOptions"];
|
|
2121
|
+
/** @description A set-like list of Rewards that have been added to the Order. */
|
|
2122
|
+
readonly rewards?: components["schemas"]["OrderReward"][];
|
|
2123
|
+
/** @description The net amount of money due on the order. */
|
|
2124
|
+
readonly net_amount_due_money?: components["schemas"]["Money"];
|
|
2125
|
+
};
|
|
2126
|
+
/**
|
|
2127
|
+
* @description A lightweight description of an [order](entity:Order) that is returned when
|
|
2128
|
+
* `returned_entries` is `true` on a [SearchOrdersRequest](api-endpoint:Orders-SearchOrders).
|
|
2129
|
+
*/
|
|
2130
|
+
OrderEntry: {
|
|
2131
|
+
/** @description The ID of the order. */
|
|
2132
|
+
order_id?: string | null;
|
|
2133
|
+
/**
|
|
2134
|
+
* @description The version number, which is incremented each time an update is committed to the order.
|
|
2135
|
+
* Orders that were not created through the API do not include a version number and
|
|
2136
|
+
* therefore cannot be updated.
|
|
2137
|
+
*
|
|
2138
|
+
* [Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders)
|
|
2139
|
+
*/
|
|
2140
|
+
readonly version?: number;
|
|
2141
|
+
/** @description The location ID the order belongs to. */
|
|
2142
|
+
location_id?: string | null;
|
|
2143
|
+
};
|
|
2144
|
+
/**
|
|
2145
|
+
* @description Represents a line item in an order. Each line item describes a different
|
|
2146
|
+
* product to purchase, with its own quantity and price details.
|
|
2147
|
+
*/
|
|
2148
|
+
OrderLineItem: {
|
|
2149
|
+
/** @description A unique ID that identifies the line item only within this order. */
|
|
2150
|
+
uid?: string | null;
|
|
2151
|
+
/** @description The name of the line item. */
|
|
2152
|
+
name?: string | null;
|
|
2153
|
+
/**
|
|
2154
|
+
* @description The count, or measurement, of a line item being purchased:
|
|
2155
|
+
*
|
|
2156
|
+
* If `quantity` is a whole number, and `quantity_unit` is not specified, then `quantity` denotes an item count. For example: `3` apples.
|
|
2157
|
+
*
|
|
2158
|
+
* If `quantity` is a whole or decimal number, and `quantity_unit` is also specified, then `quantity` denotes a measurement. For example: `2.25` pounds of broccoli.
|
|
2159
|
+
*
|
|
2160
|
+
* For more information, see [Specify item quantity and measurement unit](https://developer.squareup.com/docs/orders-api/create-orders#specify-item-quantity-and-measurement-unit).
|
|
2161
|
+
*
|
|
2162
|
+
* Line items with a quantity of `0` are automatically removed
|
|
2163
|
+
* when paying for or otherwise completing the order.
|
|
2164
|
+
*/
|
|
2165
|
+
quantity: string;
|
|
2166
|
+
/** @description The measurement unit and decimal precision that this line item's quantity is measured in. */
|
|
2167
|
+
quantity_unit?: components["schemas"]["OrderQuantityUnit"];
|
|
2168
|
+
/** @description An optional note associated with the line item. */
|
|
2169
|
+
note?: string | null;
|
|
2170
|
+
/** @description The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to this line item. */
|
|
2171
|
+
catalog_object_id?: string | null;
|
|
2172
|
+
/**
|
|
2173
|
+
* Format: int64
|
|
2174
|
+
* @description The version of the catalog object that this line item references.
|
|
2175
|
+
*/
|
|
2176
|
+
catalog_version?: number | null;
|
|
2177
|
+
/** @description The name of the variation applied to this line item. */
|
|
2178
|
+
variation_name?: string | null;
|
|
2179
|
+
/**
|
|
2180
|
+
* @description The type of line item: an itemized sale, a non-itemized sale (custom amount), or the
|
|
2181
|
+
* activation or reloading of a gift card.
|
|
2182
|
+
* See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible values
|
|
2183
|
+
*/
|
|
2184
|
+
item_type?: components["schemas"]["OrderLineItemItemType"];
|
|
2185
|
+
/**
|
|
2186
|
+
* @description Application-defined data attached to this line item. Metadata fields are intended
|
|
2187
|
+
* to store descriptive references or associations with an entity in another system or store brief
|
|
2188
|
+
* information about the object. Square does not process this field; it only stores and returns it
|
|
2189
|
+
* in relevant API calls. Do not use metadata to store any sensitive information (such as personally
|
|
2190
|
+
* identifiable information or card details).
|
|
2191
|
+
*
|
|
2192
|
+
* Keys written by applications must be 60 characters or less and must be in the character set
|
|
2193
|
+
* `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
|
|
2194
|
+
* with a namespace, separated from the key with a ':' character.
|
|
2195
|
+
*
|
|
2196
|
+
* Values have a maximum length of 255 characters.
|
|
2197
|
+
*
|
|
2198
|
+
* An application can have up to 10 entries per metadata field.
|
|
2199
|
+
*
|
|
2200
|
+
* Entries written by applications are private and can only be read or modified by the same
|
|
2201
|
+
* application.
|
|
2202
|
+
*
|
|
2203
|
+
* For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
|
|
2204
|
+
*/
|
|
2205
|
+
metadata?: {
|
|
2206
|
+
[key: string]: string;
|
|
2207
|
+
} | null;
|
|
2208
|
+
/** @description The [CatalogModifier](entity:CatalogModifier)s applied to this line item. */
|
|
2209
|
+
modifiers?: components["schemas"]["OrderLineItemModifier"][] | null;
|
|
2210
|
+
/**
|
|
2211
|
+
* @description The list of references to taxes applied to this line item. Each
|
|
2212
|
+
* `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a
|
|
2213
|
+
* top-level `OrderLineItemTax` applied to the line item. On reads, the
|
|
2214
|
+
* amount applied is populated.
|
|
2215
|
+
*
|
|
2216
|
+
* An `OrderLineItemAppliedTax` is automatically created on every line
|
|
2217
|
+
* item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax`
|
|
2218
|
+
* records for `LINE_ITEM` scoped taxes must be added in requests for the tax
|
|
2219
|
+
* to apply to any line items.
|
|
2220
|
+
*
|
|
2221
|
+
* To change the amount of a tax, modify the referenced top-level tax.
|
|
2222
|
+
*/
|
|
2223
|
+
applied_taxes?: components["schemas"]["OrderLineItemAppliedTax"][] | null;
|
|
2224
|
+
/**
|
|
2225
|
+
* @description The list of references to discounts applied to this line item. Each
|
|
2226
|
+
* `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level
|
|
2227
|
+
* `OrderLineItemDiscounts` applied to the line item. On reads, the amount
|
|
2228
|
+
* applied is populated.
|
|
2229
|
+
*
|
|
2230
|
+
* An `OrderLineItemAppliedDiscount` is automatically created on every line item for all
|
|
2231
|
+
* `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records
|
|
2232
|
+
* for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any
|
|
2233
|
+
* line items.
|
|
2234
|
+
*
|
|
2235
|
+
* To change the amount of a discount, modify the referenced top-level discount.
|
|
2236
|
+
*/
|
|
2237
|
+
applied_discounts?: components["schemas"]["OrderLineItemAppliedDiscount"][] | null;
|
|
2238
|
+
/**
|
|
2239
|
+
* @description The list of references to service charges applied to this line item. Each
|
|
2240
|
+
* `OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a
|
|
2241
|
+
* top-level `OrderServiceCharge` applied to the line item. On reads, the amount applied is
|
|
2242
|
+
* populated.
|
|
2243
|
+
*
|
|
2244
|
+
* To change the amount of a service charge, modify the referenced top-level service charge.
|
|
2245
|
+
*/
|
|
2246
|
+
applied_service_charges?: components["schemas"]["OrderLineItemAppliedServiceCharge"][] | null;
|
|
2247
|
+
/**
|
|
2248
|
+
* @description The base price for a single unit of the line item. Note - If inclusive tax is set on
|
|
2249
|
+
* this item it will be included in this value.
|
|
2250
|
+
*/
|
|
2251
|
+
base_price_money?: components["schemas"]["Money"];
|
|
2252
|
+
/**
|
|
2253
|
+
* @description The total price of all item variations sold in this line item.
|
|
2254
|
+
* The price is calculated as `base_price_money` multiplied by `quantity`.
|
|
2255
|
+
* It does not include modifiers. Note - If inclusive tax is set on
|
|
2256
|
+
* this item it will be included in this value.
|
|
2257
|
+
*/
|
|
2258
|
+
readonly variation_total_price_money?: components["schemas"]["Money"];
|
|
2259
|
+
/**
|
|
2260
|
+
* @description The amount of money made in gross sales for this line item.
|
|
2261
|
+
* The amount is calculated as the sum of the variation's total price and each modifier's total price.
|
|
2262
|
+
* For inclusive tax items in the US, Canada, and Japan, tax is deducted from `gross_sales_money`. For Europe and
|
|
2263
|
+
* Australia, inclusive tax remains as part of the gross sale calculation.
|
|
2264
|
+
*/
|
|
2265
|
+
readonly gross_sales_money?: components["schemas"]["Money"];
|
|
2266
|
+
/** @description The total amount of tax money to collect for the line item. */
|
|
2267
|
+
readonly total_tax_money?: components["schemas"]["Money"];
|
|
2268
|
+
/** @description The total amount of discount money to collect for the line item. */
|
|
2269
|
+
readonly total_discount_money?: components["schemas"]["Money"];
|
|
2270
|
+
/** @description The total amount of money to collect for this line item. */
|
|
2271
|
+
readonly total_money?: components["schemas"]["Money"];
|
|
2272
|
+
/**
|
|
2273
|
+
* @description Describes pricing adjustments that are blocked from automatic
|
|
2274
|
+
* application to a line item. For more information, see
|
|
2275
|
+
* [Apply Taxes and Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts).
|
|
2276
|
+
*/
|
|
2277
|
+
pricing_blocklists?: components["schemas"]["OrderLineItemPricingBlocklists"];
|
|
2278
|
+
/** @description The total amount of apportioned service charge money to collect for the line item. */
|
|
2279
|
+
readonly total_service_charge_money?: components["schemas"]["Money"];
|
|
2280
|
+
};
|
|
2281
|
+
/**
|
|
2282
|
+
* @description Represents an applied portion of a discount to a line item in an order.
|
|
2283
|
+
*
|
|
2284
|
+
* Order scoped discounts have automatically applied discounts present for each line item.
|
|
2285
|
+
* Line-item scoped discounts must have applied discounts added manually for any applicable line
|
|
2286
|
+
* items. The corresponding applied money is automatically computed based on participating
|
|
2287
|
+
* line items.
|
|
2288
|
+
*/
|
|
2289
|
+
OrderLineItemAppliedDiscount: {
|
|
2290
|
+
/** @description A unique ID that identifies the applied discount only within this order. */
|
|
2291
|
+
uid?: string | null;
|
|
2292
|
+
/**
|
|
2293
|
+
* @description The `uid` of the discount that the applied discount represents. It must
|
|
2294
|
+
* reference a discount present in the `order.discounts` field.
|
|
2295
|
+
*
|
|
2296
|
+
* This field is immutable. To change which discounts apply to a line item,
|
|
2297
|
+
* you must delete the discount and re-add it as a new `OrderLineItemAppliedDiscount`.
|
|
2298
|
+
*/
|
|
2299
|
+
discount_uid: string;
|
|
2300
|
+
/** @description The amount of money applied by the discount to the line item. */
|
|
2301
|
+
readonly applied_money?: components["schemas"]["Money"];
|
|
2302
|
+
};
|
|
2303
|
+
OrderLineItemAppliedServiceCharge: {
|
|
2304
|
+
/** @description A unique ID that identifies the applied service charge only within this order. */
|
|
2305
|
+
uid?: string | null;
|
|
2306
|
+
/**
|
|
2307
|
+
* @description The `uid` of the service charge that the applied service charge represents. It must
|
|
2308
|
+
* reference a service charge present in the `order.service_charges` field.
|
|
2309
|
+
*
|
|
2310
|
+
* This field is immutable. To change which service charges apply to a line item,
|
|
2311
|
+
* delete and add a new `OrderLineItemAppliedServiceCharge`.
|
|
2312
|
+
*/
|
|
2313
|
+
service_charge_uid: string;
|
|
2314
|
+
/** @description The amount of money applied by the service charge to the line item. */
|
|
2315
|
+
readonly applied_money?: components["schemas"]["Money"];
|
|
2316
|
+
};
|
|
2317
|
+
/**
|
|
2318
|
+
* @description Represents an applied portion of a tax to a line item in an order.
|
|
2319
|
+
*
|
|
2320
|
+
* Order-scoped taxes automatically include the applied taxes in each line item.
|
|
2321
|
+
* Line item taxes must be referenced from any applicable line items.
|
|
2322
|
+
* The corresponding applied money is automatically computed, based on the
|
|
2323
|
+
* set of participating line items.
|
|
2324
|
+
*/
|
|
2325
|
+
OrderLineItemAppliedTax: {
|
|
2326
|
+
/** @description A unique ID that identifies the applied tax only within this order. */
|
|
2327
|
+
uid?: string | null;
|
|
2328
|
+
/**
|
|
2329
|
+
* @description The `uid` of the tax for which this applied tax represents. It must reference
|
|
2330
|
+
* a tax present in the `order.taxes` field.
|
|
2331
|
+
*
|
|
2332
|
+
* This field is immutable. To change which taxes apply to a line item, delete and add a new
|
|
2333
|
+
* `OrderLineItemAppliedTax`.
|
|
2334
|
+
*/
|
|
2335
|
+
tax_uid: string;
|
|
2336
|
+
/** @description The amount of money applied by the tax to the line item. */
|
|
2337
|
+
readonly applied_money?: components["schemas"]["Money"];
|
|
2338
|
+
/**
|
|
2339
|
+
* @description Indicates whether the tax was automatically applied to the order based on
|
|
2340
|
+
* the catalog configuration. For an example, see
|
|
2341
|
+
* [Automatically Apply Taxes to an Order](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes).
|
|
2342
|
+
*/
|
|
2343
|
+
readonly auto_applied?: boolean;
|
|
2344
|
+
};
|
|
2345
|
+
/**
|
|
2346
|
+
* @description Represents a discount that applies to one or more line items in an
|
|
2347
|
+
* order.
|
|
2348
|
+
*
|
|
2349
|
+
* Fixed-amount, order-scoped discounts are distributed across all non-zero line item totals.
|
|
2350
|
+
* The amount distributed to each line item is relative to the
|
|
2351
|
+
* amount contributed by the item to the order subtotal.
|
|
2352
|
+
*/
|
|
2353
|
+
OrderLineItemDiscount: {
|
|
2354
|
+
/** @description A unique ID that identifies the discount only within this order. */
|
|
2355
|
+
uid?: string | null;
|
|
2356
|
+
/** @description The catalog object ID referencing [CatalogDiscount](entity:CatalogDiscount). */
|
|
2357
|
+
catalog_object_id?: string | null;
|
|
2358
|
+
/**
|
|
2359
|
+
* Format: int64
|
|
2360
|
+
* @description The version of the catalog object that this discount references.
|
|
2361
|
+
*/
|
|
2362
|
+
catalog_version?: number | null;
|
|
2363
|
+
/** @description The discount's name. */
|
|
2364
|
+
name?: string | null;
|
|
2365
|
+
/**
|
|
2366
|
+
* @description The type of the discount.
|
|
2367
|
+
*
|
|
2368
|
+
* Discounts that do not reference a catalog object ID must have a type of
|
|
2369
|
+
* `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.
|
|
2370
|
+
* See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values
|
|
2371
|
+
*/
|
|
2372
|
+
type?: components["schemas"]["OrderLineItemDiscountType"];
|
|
2373
|
+
/**
|
|
2374
|
+
* @description The percentage of the discount, as a string representation of a decimal number.
|
|
2375
|
+
* A value of `7.25` corresponds to a percentage of 7.25%.
|
|
2376
|
+
*
|
|
2377
|
+
* `percentage` is not set for amount-based discounts.
|
|
2378
|
+
*/
|
|
2379
|
+
percentage?: string | null;
|
|
2380
|
+
/**
|
|
2381
|
+
* @description The total declared monetary amount of the discount.
|
|
2382
|
+
*
|
|
2383
|
+
* `amount_money` is not set for percentage-based discounts.
|
|
2384
|
+
*/
|
|
2385
|
+
amount_money?: components["schemas"]["Money"];
|
|
2386
|
+
/**
|
|
2387
|
+
* @description The amount of discount actually applied to the line item.
|
|
2388
|
+
*
|
|
2389
|
+
* The amount represents the amount of money applied as a line-item scoped discount.
|
|
2390
|
+
* When an amount-based discount is scoped to the entire order, the value
|
|
2391
|
+
* of `applied_money` is different than `amount_money` because the total
|
|
2392
|
+
* amount of the discount is distributed across all line items.
|
|
2393
|
+
*/
|
|
2394
|
+
applied_money?: components["schemas"]["Money"];
|
|
2395
|
+
/**
|
|
2396
|
+
* @description Application-defined data attached to this discount. Metadata fields are intended
|
|
2397
|
+
* to store descriptive references or associations with an entity in another system or store brief
|
|
2398
|
+
* information about the object. Square does not process this field; it only stores and returns it
|
|
2399
|
+
* in relevant API calls. Do not use metadata to store any sensitive information (such as personally
|
|
2400
|
+
* identifiable information or card details).
|
|
2401
|
+
*
|
|
2402
|
+
* Keys written by applications must be 60 characters or less and must be in the character set
|
|
2403
|
+
* `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
|
|
2404
|
+
* with a namespace, separated from the key with a ':' character.
|
|
2405
|
+
*
|
|
2406
|
+
* Values have a maximum length of 255 characters.
|
|
2407
|
+
*
|
|
2408
|
+
* An application can have up to 10 entries per metadata field.
|
|
2409
|
+
*
|
|
2410
|
+
* Entries written by applications are private and can only be read or modified by the same
|
|
2411
|
+
* application.
|
|
2412
|
+
*
|
|
2413
|
+
* For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
|
|
2414
|
+
*/
|
|
2415
|
+
metadata?: {
|
|
2416
|
+
[key: string]: string;
|
|
2417
|
+
} | null;
|
|
2418
|
+
/**
|
|
2419
|
+
* @description Indicates the level at which the discount applies. For `ORDER` scoped discounts,
|
|
2420
|
+
* Square generates references in `applied_discounts` on all order line items that do
|
|
2421
|
+
* not have them. For `LINE_ITEM` scoped discounts, the discount only applies to line items
|
|
2422
|
+
* with a discount reference in their `applied_discounts` field.
|
|
2423
|
+
*
|
|
2424
|
+
* This field is immutable. To change the scope of a discount, you must delete
|
|
2425
|
+
* the discount and re-add it as a new discount.
|
|
2426
|
+
* See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
|
|
2427
|
+
*/
|
|
2428
|
+
scope?: components["schemas"]["OrderLineItemDiscountScope"];
|
|
2429
|
+
/**
|
|
2430
|
+
* @description The reward IDs corresponding to this discount. The application and
|
|
2431
|
+
* specification of discounts that have `reward_ids` are completely controlled by the backing
|
|
2432
|
+
* criteria corresponding to the reward tiers of the rewards that are added to the order
|
|
2433
|
+
* through the Loyalty API. To manually unapply discounts that are the result of added rewards,
|
|
2434
|
+
* the rewards must be removed from the order through the Loyalty API.
|
|
2435
|
+
*/
|
|
2436
|
+
readonly reward_ids?: string[];
|
|
2437
|
+
/**
|
|
2438
|
+
* @description The object ID of a [pricing rule](entity:CatalogPricingRule) to be applied
|
|
2439
|
+
* automatically to this discount. The specification and application of the discounts, to
|
|
2440
|
+
* which a `pricing_rule_id` is assigned, are completely controlled by the corresponding
|
|
2441
|
+
* pricing rule.
|
|
2442
|
+
*/
|
|
2443
|
+
readonly pricing_rule_id?: string;
|
|
2444
|
+
};
|
|
2445
|
+
/**
|
|
2446
|
+
* @description Indicates whether this is a line-item or order-level discount.
|
|
2447
|
+
* @enum {string}
|
|
2448
|
+
*/
|
|
2449
|
+
OrderLineItemDiscountScope: "OTHER_DISCOUNT_SCOPE" | "LINE_ITEM" | "ORDER";
|
|
2450
|
+
/**
|
|
2451
|
+
* @description Indicates how the discount is applied to the associated line item or order.
|
|
2452
|
+
* @enum {string}
|
|
2453
|
+
*/
|
|
2454
|
+
OrderLineItemDiscountType: "UNKNOWN_DISCOUNT" | "FIXED_PERCENTAGE" | "FIXED_AMOUNT" | "VARIABLE_PERCENTAGE" | "VARIABLE_AMOUNT";
|
|
2455
|
+
/**
|
|
2456
|
+
* @description Represents the line item type.
|
|
2457
|
+
* @enum {string}
|
|
2458
|
+
*/
|
|
2459
|
+
OrderLineItemItemType: "ITEM" | "CUSTOM_AMOUNT" | "GIFT_CARD";
|
|
2460
|
+
/** @description A [CatalogModifier](entity:CatalogModifier). */
|
|
2461
|
+
OrderLineItemModifier: {
|
|
2462
|
+
/** @description A unique ID that identifies the modifier only within this order. */
|
|
2463
|
+
uid?: string | null;
|
|
2464
|
+
/** @description The catalog object ID referencing [CatalogModifier](entity:CatalogModifier). */
|
|
2465
|
+
catalog_object_id?: string | null;
|
|
2466
|
+
/**
|
|
2467
|
+
* Format: int64
|
|
2468
|
+
* @description The version of the catalog object that this modifier references.
|
|
2469
|
+
*/
|
|
2470
|
+
catalog_version?: number | null;
|
|
2471
|
+
/** @description The name of the item modifier. */
|
|
2472
|
+
name?: string | null;
|
|
2473
|
+
/**
|
|
2474
|
+
* @description The quantity of the line item modifier. The modifier quantity can be 0 or more.
|
|
2475
|
+
* For example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders
|
|
2476
|
+
* this item, the restaurant records the purchase by creating an `Order` object with a line item
|
|
2477
|
+
* for a burger. The line item includes a line item modifier: the name is cheese and the quantity
|
|
2478
|
+
* is 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses
|
|
2479
|
+
* the extra cheese option, the modifier quantity increases to 2. If the buyer does not want
|
|
2480
|
+
* any cheese, the modifier quantity is set to 0.
|
|
2481
|
+
*/
|
|
2482
|
+
quantity?: string | null;
|
|
2483
|
+
/**
|
|
2484
|
+
* @description The base price for the modifier.
|
|
2485
|
+
*
|
|
2486
|
+
* `base_price_money` is required for ad hoc modifiers.
|
|
2487
|
+
* If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will
|
|
2488
|
+
* override the predefined [CatalogModifier](entity:CatalogModifier) price.
|
|
2489
|
+
*/
|
|
2490
|
+
base_price_money?: components["schemas"]["Money"];
|
|
2491
|
+
/**
|
|
2492
|
+
* @description The total price of the item modifier for its line item.
|
|
2493
|
+
* This is the modifier's `base_price_money` multiplied by the line item's quantity.
|
|
2494
|
+
*/
|
|
2495
|
+
readonly total_price_money?: components["schemas"]["Money"];
|
|
2496
|
+
/**
|
|
2497
|
+
* @description Application-defined data attached to this order. Metadata fields are intended
|
|
2498
|
+
* to store descriptive references or associations with an entity in another system or store brief
|
|
2499
|
+
* information about the object. Square does not process this field; it only stores and returns it
|
|
2500
|
+
* in relevant API calls. Do not use metadata to store any sensitive information (such as personally
|
|
2501
|
+
* identifiable information or card details).
|
|
2502
|
+
*
|
|
2503
|
+
* Keys written by applications must be 60 characters or less and must be in the character set
|
|
2504
|
+
* `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
|
|
2505
|
+
* with a namespace, separated from the key with a ':' character.
|
|
2506
|
+
*
|
|
2507
|
+
* Values have a maximum length of 255 characters.
|
|
2508
|
+
*
|
|
2509
|
+
* An application can have up to 10 entries per metadata field.
|
|
2510
|
+
*
|
|
2511
|
+
* Entries written by applications are private and can only be read or modified by the same
|
|
2512
|
+
* application.
|
|
2513
|
+
*
|
|
2514
|
+
* For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
|
|
2515
|
+
*/
|
|
2516
|
+
metadata?: {
|
|
2517
|
+
[key: string]: string;
|
|
2518
|
+
} | null;
|
|
2519
|
+
/** @description The `uid` of the parent modifier, if this modifier is nested under another modifier. */
|
|
2520
|
+
parent_modifier_uid?: string | null;
|
|
2521
|
+
};
|
|
2522
|
+
/**
|
|
2523
|
+
* @description Describes pricing adjustments that are blocked from automatic
|
|
2524
|
+
* application to a line item. For more information, see
|
|
2525
|
+
* [Apply Taxes and Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts).
|
|
2526
|
+
*/
|
|
2527
|
+
OrderLineItemPricingBlocklists: {
|
|
2528
|
+
/**
|
|
2529
|
+
* @description A list of discounts blocked from applying to the line item.
|
|
2530
|
+
* Discounts can be blocked by the `discount_uid` (for ad hoc discounts) or
|
|
2531
|
+
* the `discount_catalog_object_id` (for catalog discounts).
|
|
2532
|
+
*/
|
|
2533
|
+
blocked_discounts?: components["schemas"]["OrderLineItemPricingBlocklistsBlockedDiscount"][] | null;
|
|
2534
|
+
/**
|
|
2535
|
+
* @description A list of taxes blocked from applying to the line item.
|
|
2536
|
+
* Taxes can be blocked by the `tax_uid` (for ad hoc taxes) or
|
|
2537
|
+
* the `tax_catalog_object_id` (for catalog taxes).
|
|
2538
|
+
*/
|
|
2539
|
+
blocked_taxes?: components["schemas"]["OrderLineItemPricingBlocklistsBlockedTax"][] | null;
|
|
2540
|
+
/**
|
|
2541
|
+
* @description A list of service charges blocked from applying to the line item.
|
|
2542
|
+
* Service charges can be blocked by the `service_charge_uid` (for ad hoc
|
|
2543
|
+
* service charges) or the `service_charge_catalog_object_id` (for catalog
|
|
2544
|
+
* service charges).
|
|
2545
|
+
*/
|
|
2546
|
+
blocked_service_charges?: components["schemas"]["OrderLineItemPricingBlocklistsBlockedServiceCharge"][] | null;
|
|
2547
|
+
};
|
|
2548
|
+
/**
|
|
2549
|
+
* @description A discount to block from applying to a line item. The discount must be
|
|
2550
|
+
* identified by either `discount_uid` or `discount_catalog_object_id`, but not both.
|
|
2551
|
+
*/
|
|
2552
|
+
OrderLineItemPricingBlocklistsBlockedDiscount: {
|
|
2553
|
+
/** @description A unique ID of the `BlockedDiscount` within the order. */
|
|
2554
|
+
uid?: string | null;
|
|
2555
|
+
/**
|
|
2556
|
+
* @description The `uid` of the discount that should be blocked. Use this field to block
|
|
2557
|
+
* ad hoc discounts. For catalog discounts, use the `discount_catalog_object_id` field.
|
|
2558
|
+
*/
|
|
2559
|
+
discount_uid?: string | null;
|
|
2560
|
+
/**
|
|
2561
|
+
* @description The `catalog_object_id` of the discount that should be blocked.
|
|
2562
|
+
* Use this field to block catalog discounts. For ad hoc discounts, use the
|
|
2563
|
+
* `discount_uid` field.
|
|
2564
|
+
*/
|
|
2565
|
+
discount_catalog_object_id?: string | null;
|
|
2566
|
+
};
|
|
2567
|
+
/**
|
|
2568
|
+
* @description A service charge to block from applying to a line item. The service charge
|
|
2569
|
+
* must be identified by either `service_charge_uid` or
|
|
2570
|
+
* `service_charge_catalog_object_id`, but not both.
|
|
2571
|
+
*/
|
|
2572
|
+
OrderLineItemPricingBlocklistsBlockedServiceCharge: {
|
|
2573
|
+
/** @description A unique ID of the `BlockedServiceCharge` within the order. */
|
|
2574
|
+
uid?: string | null;
|
|
2575
|
+
/**
|
|
2576
|
+
* @description The `uid` of the service charge that should be blocked. Use this field to
|
|
2577
|
+
* block ad hoc service charges. For catalog service charges, use the
|
|
2578
|
+
* `service_charge_catalog_object_id` field.
|
|
2579
|
+
*/
|
|
2580
|
+
service_charge_uid?: string | null;
|
|
2581
|
+
/**
|
|
2582
|
+
* @description The `catalog_object_id` of the service charge that should be blocked.
|
|
2583
|
+
* Use this field to block catalog service charges. For ad hoc service charges,
|
|
2584
|
+
* use the `service_charge_uid` field.
|
|
2585
|
+
*/
|
|
2586
|
+
service_charge_catalog_object_id?: string | null;
|
|
2587
|
+
};
|
|
2588
|
+
/**
|
|
2589
|
+
* @description A tax to block from applying to a line item. The tax must be
|
|
2590
|
+
* identified by either `tax_uid` or `tax_catalog_object_id`, but not both.
|
|
2591
|
+
*/
|
|
2592
|
+
OrderLineItemPricingBlocklistsBlockedTax: {
|
|
2593
|
+
/** @description A unique ID of the `BlockedTax` within the order. */
|
|
2594
|
+
uid?: string | null;
|
|
2595
|
+
/**
|
|
2596
|
+
* @description The `uid` of the tax that should be blocked. Use this field to block
|
|
2597
|
+
* ad hoc taxes. For catalog, taxes use the `tax_catalog_object_id` field.
|
|
2598
|
+
*/
|
|
2599
|
+
tax_uid?: string | null;
|
|
2600
|
+
/**
|
|
2601
|
+
* @description The `catalog_object_id` of the tax that should be blocked.
|
|
2602
|
+
* Use this field to block catalog taxes. For ad hoc taxes, use the
|
|
2603
|
+
* `tax_uid` field.
|
|
2604
|
+
*/
|
|
2605
|
+
tax_catalog_object_id?: string | null;
|
|
2606
|
+
};
|
|
2607
|
+
/**
|
|
2608
|
+
* @description Represents a tax that applies to one or more line item in the order.
|
|
2609
|
+
*
|
|
2610
|
+
* Fixed-amount, order-scoped taxes are distributed across all non-zero line item totals.
|
|
2611
|
+
* The amount distributed to each line item is relative to the amount the item
|
|
2612
|
+
* contributes to the order subtotal.
|
|
2613
|
+
*/
|
|
2614
|
+
OrderLineItemTax: {
|
|
2615
|
+
/** @description A unique ID that identifies the tax only within this order. */
|
|
2616
|
+
uid?: string | null;
|
|
2617
|
+
/** @description The catalog object ID referencing [CatalogTax](entity:CatalogTax). */
|
|
2618
|
+
catalog_object_id?: string | null;
|
|
2619
|
+
/**
|
|
2620
|
+
* Format: int64
|
|
2621
|
+
* @description The version of the catalog object that this tax references.
|
|
2622
|
+
*/
|
|
2623
|
+
catalog_version?: number | null;
|
|
2624
|
+
/** @description The tax's name. */
|
|
2625
|
+
name?: string | null;
|
|
2626
|
+
/**
|
|
2627
|
+
* @description Indicates the calculation method used to apply the tax.
|
|
2628
|
+
* See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values
|
|
2629
|
+
*/
|
|
2630
|
+
type?: components["schemas"]["OrderLineItemTaxType"];
|
|
2631
|
+
/**
|
|
2632
|
+
* @description The percentage of the tax, as a string representation of a decimal
|
|
2633
|
+
* number. For example, a value of `"7.25"` corresponds to a percentage of
|
|
2634
|
+
* 7.25%.
|
|
2635
|
+
*/
|
|
2636
|
+
percentage?: string | null;
|
|
2637
|
+
/**
|
|
2638
|
+
* @description Application-defined data attached to this tax. Metadata fields are intended
|
|
2639
|
+
* to store descriptive references or associations with an entity in another system or store brief
|
|
2640
|
+
* information about the object. Square does not process this field; it only stores and returns it
|
|
2641
|
+
* in relevant API calls. Do not use metadata to store any sensitive information (such as personally
|
|
2642
|
+
* identifiable information or card details).
|
|
2643
|
+
*
|
|
2644
|
+
* Keys written by applications must be 60 characters or less and must be in the character set
|
|
2645
|
+
* `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
|
|
2646
|
+
* with a namespace, separated from the key with a ':' character.
|
|
2647
|
+
*
|
|
2648
|
+
* Values have a maximum length of 255 characters.
|
|
2649
|
+
*
|
|
2650
|
+
* An application can have up to 10 entries per metadata field.
|
|
2651
|
+
*
|
|
2652
|
+
* Entries written by applications are private and can only be read or modified by the same
|
|
2653
|
+
* application.
|
|
2654
|
+
*
|
|
2655
|
+
* For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
|
|
2656
|
+
*/
|
|
2657
|
+
metadata?: {
|
|
2658
|
+
[key: string]: string;
|
|
2659
|
+
} | null;
|
|
2660
|
+
/**
|
|
2661
|
+
* @description The amount of money applied to the order by the tax.
|
|
2662
|
+
*
|
|
2663
|
+
* - For percentage-based taxes, `applied_money` is the money
|
|
2664
|
+
* calculated using the percentage.
|
|
2665
|
+
*/
|
|
2666
|
+
applied_money?: components["schemas"]["Money"];
|
|
2667
|
+
/**
|
|
2668
|
+
* @description Indicates the level at which the tax applies. For `ORDER` scoped taxes,
|
|
2669
|
+
* Square generates references in `applied_taxes` on all order line items that do
|
|
2670
|
+
* not have them. For `LINE_ITEM` scoped taxes, the tax only applies to line items
|
|
2671
|
+
* with references in their `applied_taxes` field.
|
|
2672
|
+
*
|
|
2673
|
+
* This field is immutable. To change the scope, you must delete the tax and
|
|
2674
|
+
* re-add it as a new tax.
|
|
2675
|
+
* See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
|
|
2676
|
+
*/
|
|
2677
|
+
scope?: components["schemas"]["OrderLineItemTaxScope"];
|
|
2678
|
+
/**
|
|
2679
|
+
* @description Determines whether the tax was automatically applied to the order based on
|
|
2680
|
+
* the catalog configuration. For an example, see
|
|
2681
|
+
* [Automatically Apply Taxes to an Order](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes).
|
|
2682
|
+
*/
|
|
2683
|
+
readonly auto_applied?: boolean;
|
|
2684
|
+
};
|
|
2685
|
+
/**
|
|
2686
|
+
* @description Indicates whether this is a line-item or order-level tax.
|
|
2687
|
+
* @enum {string}
|
|
2688
|
+
*/
|
|
2689
|
+
OrderLineItemTaxScope: "OTHER_TAX_SCOPE" | "LINE_ITEM" | "ORDER";
|
|
2690
|
+
/**
|
|
2691
|
+
* @description Indicates how the tax is applied to the associated line item or order.
|
|
2692
|
+
* @enum {string}
|
|
2693
|
+
*/
|
|
2694
|
+
OrderLineItemTaxType: "UNKNOWN_TAX" | "ADDITIVE" | "INCLUSIVE";
|
|
2695
|
+
/** @description A collection of various money amounts. */
|
|
2696
|
+
OrderMoneyAmounts: {
|
|
2697
|
+
/** @description The total money. */
|
|
2698
|
+
total_money?: components["schemas"]["Money"];
|
|
2699
|
+
/** @description The money associated with taxes. */
|
|
2700
|
+
tax_money?: components["schemas"]["Money"];
|
|
2701
|
+
/** @description The money associated with discounts. */
|
|
2702
|
+
discount_money?: components["schemas"]["Money"];
|
|
2703
|
+
/** @description The money associated with tips. */
|
|
2704
|
+
tip_money?: components["schemas"]["Money"];
|
|
2705
|
+
/** @description The money associated with service charges. */
|
|
2706
|
+
service_charge_money?: components["schemas"]["Money"];
|
|
2707
|
+
};
|
|
2708
|
+
/**
|
|
2709
|
+
* @description Pricing options for an order. The options affect how the order's price is calculated.
|
|
2710
|
+
* They can be used, for example, to apply automatic price adjustments that are based on preconfigured
|
|
2711
|
+
* [pricing rules](entity:CatalogPricingRule).
|
|
2712
|
+
*/
|
|
2713
|
+
OrderPricingOptions: {
|
|
2714
|
+
/**
|
|
2715
|
+
* @description The option to determine whether pricing rule-based
|
|
2716
|
+
* discounts are automatically applied to an order.
|
|
2717
|
+
*/
|
|
2718
|
+
auto_apply_discounts?: boolean | null;
|
|
2719
|
+
/**
|
|
2720
|
+
* @description The option to determine whether rule-based taxes are automatically
|
|
2721
|
+
* applied to an order when the criteria of the corresponding rules are met.
|
|
2722
|
+
*/
|
|
2723
|
+
auto_apply_taxes?: boolean | null;
|
|
2724
|
+
};
|
|
2725
|
+
/**
|
|
2726
|
+
* @description Contains the measurement unit for a quantity and a precision that
|
|
2727
|
+
* specifies the number of digits after the decimal point for decimal quantities.
|
|
2728
|
+
*/
|
|
2729
|
+
OrderQuantityUnit: {
|
|
2730
|
+
/**
|
|
2731
|
+
* @description A [MeasurementUnit](entity:MeasurementUnit) that represents the
|
|
2732
|
+
* unit of measure for the quantity.
|
|
2733
|
+
*/
|
|
2734
|
+
measurement_unit?: components["schemas"]["MeasurementUnit"];
|
|
2735
|
+
/**
|
|
2736
|
+
* @description For non-integer quantities, represents the number of digits after the decimal point that are
|
|
2737
|
+
* recorded for this quantity.
|
|
2738
|
+
*
|
|
2739
|
+
* For example, a precision of 1 allows quantities such as `"1.0"` and `"1.1"`, but not `"1.01"`.
|
|
2740
|
+
*
|
|
2741
|
+
* Min: 0. Max: 5.
|
|
2742
|
+
*/
|
|
2743
|
+
precision?: number | null;
|
|
2744
|
+
/**
|
|
2745
|
+
* @description The catalog object ID referencing the
|
|
2746
|
+
* [CatalogMeasurementUnit](entity:CatalogMeasurementUnit).
|
|
2747
|
+
*
|
|
2748
|
+
* This field is set when this is a catalog-backed measurement unit.
|
|
2749
|
+
*/
|
|
2750
|
+
catalog_object_id?: string | null;
|
|
2751
|
+
/**
|
|
2752
|
+
* Format: int64
|
|
2753
|
+
* @description The version of the catalog object that this measurement unit references.
|
|
2754
|
+
*
|
|
2755
|
+
* This field is set when this is a catalog-backed measurement unit.
|
|
2756
|
+
*/
|
|
2757
|
+
catalog_version?: number | null;
|
|
2758
|
+
};
|
|
2759
|
+
/** @description The set of line items, service charges, taxes, discounts, tips, and other items being returned in an order. */
|
|
2760
|
+
OrderReturn: {
|
|
2761
|
+
/** @description A unique ID that identifies the return only within this order. */
|
|
2762
|
+
uid?: string | null;
|
|
2763
|
+
/**
|
|
2764
|
+
* @description An order that contains the original sale of these return line items. This is unset
|
|
2765
|
+
* for unlinked returns.
|
|
2766
|
+
*/
|
|
2767
|
+
source_order_id?: string | null;
|
|
2768
|
+
/** @description A collection of line items that are being returned. */
|
|
2769
|
+
return_line_items?: components["schemas"]["OrderReturnLineItem"][] | null;
|
|
2770
|
+
/** @description A collection of service charges that are being returned. */
|
|
2771
|
+
return_service_charges?: components["schemas"]["OrderReturnServiceCharge"][] | null;
|
|
2772
|
+
/**
|
|
2773
|
+
* @description A collection of references to taxes being returned for an order, including the total
|
|
2774
|
+
* applied tax amount to be returned. The taxes must reference a top-level tax ID from the source
|
|
2775
|
+
* order.
|
|
2776
|
+
*/
|
|
2777
|
+
return_taxes?: components["schemas"]["OrderReturnTax"][] | null;
|
|
2778
|
+
/**
|
|
2779
|
+
* @description A collection of references to discounts being returned for an order, including the total
|
|
2780
|
+
* applied discount amount to be returned. The discounts must reference a top-level discount ID
|
|
2781
|
+
* from the source order.
|
|
2782
|
+
*/
|
|
2783
|
+
return_discounts?: components["schemas"]["OrderReturnDiscount"][] | null;
|
|
2784
|
+
/** @description A collection of references to tips being returned for an order. */
|
|
2785
|
+
return_tips?: components["schemas"]["OrderReturnTip"][] | null;
|
|
2786
|
+
/**
|
|
2787
|
+
* @description A positive or negative rounding adjustment to the total value being returned. Adjustments are commonly
|
|
2788
|
+
* used to apply cash rounding when the minimum unit of the account is smaller than the lowest
|
|
2789
|
+
* physical denomination of the currency.
|
|
2790
|
+
*/
|
|
2791
|
+
rounding_adjustment?: components["schemas"]["OrderRoundingAdjustment"];
|
|
2792
|
+
/** @description An aggregate monetary value being returned by this return entry. */
|
|
2793
|
+
return_amounts?: components["schemas"]["OrderMoneyAmounts"];
|
|
2794
|
+
};
|
|
2795
|
+
/**
|
|
2796
|
+
* @description Represents a discount being returned that applies to one or more return line items in an
|
|
2797
|
+
* order.
|
|
2798
|
+
*
|
|
2799
|
+
* Fixed-amount, order-scoped discounts are distributed across all non-zero return line item totals.
|
|
2800
|
+
* The amount distributed to each return line item is relative to that item’s contribution to the
|
|
2801
|
+
* order subtotal.
|
|
2802
|
+
*/
|
|
2803
|
+
OrderReturnDiscount: {
|
|
2804
|
+
/** @description A unique ID that identifies the returned discount only within this order. */
|
|
2805
|
+
uid?: string | null;
|
|
2806
|
+
/** @description The discount `uid` from the order that contains the original application of this discount. */
|
|
2807
|
+
source_discount_uid?: string | null;
|
|
2808
|
+
/** @description The catalog object ID referencing [CatalogDiscount](entity:CatalogDiscount). */
|
|
2809
|
+
catalog_object_id?: string | null;
|
|
2810
|
+
/**
|
|
2811
|
+
* Format: int64
|
|
2812
|
+
* @description The version of the catalog object that this discount references.
|
|
2813
|
+
*/
|
|
2814
|
+
catalog_version?: number | null;
|
|
2815
|
+
/** @description The discount's name. */
|
|
2816
|
+
name?: string | null;
|
|
2817
|
+
/**
|
|
2818
|
+
* @description The type of the discount. If it is created by the API, it is `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.
|
|
2819
|
+
*
|
|
2820
|
+
* Discounts that do not reference a catalog object ID must have a type of
|
|
2821
|
+
* `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.
|
|
2822
|
+
* See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values
|
|
2823
|
+
*/
|
|
2824
|
+
type?: components["schemas"]["OrderLineItemDiscountType"];
|
|
2825
|
+
/**
|
|
2826
|
+
* @description The percentage of the tax, as a string representation of a decimal number.
|
|
2827
|
+
* A value of `"7.25"` corresponds to a percentage of 7.25%.
|
|
2828
|
+
*
|
|
2829
|
+
* `percentage` is not set for amount-based discounts.
|
|
2830
|
+
*/
|
|
2831
|
+
percentage?: string | null;
|
|
2832
|
+
/**
|
|
2833
|
+
* @description The total declared monetary amount of the discount.
|
|
2834
|
+
*
|
|
2835
|
+
* `amount_money` is not set for percentage-based discounts.
|
|
2836
|
+
*/
|
|
2837
|
+
amount_money?: components["schemas"]["Money"];
|
|
2838
|
+
/**
|
|
2839
|
+
* @description The amount of discount actually applied to this line item. When an amount-based
|
|
2840
|
+
* discount is at the order level, this value is different from `amount_money` because the discount
|
|
2841
|
+
* is distributed across the line items.
|
|
2842
|
+
*/
|
|
2843
|
+
readonly applied_money?: components["schemas"]["Money"];
|
|
2844
|
+
/**
|
|
2845
|
+
* @description Indicates the level at which the `OrderReturnDiscount` applies. For `ORDER` scoped
|
|
2846
|
+
* discounts, the server generates references in `applied_discounts` on all
|
|
2847
|
+
* `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount is only applied to
|
|
2848
|
+
* `OrderReturnLineItem`s with references in their `applied_discounts` field.
|
|
2849
|
+
* See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
|
|
2850
|
+
*/
|
|
2851
|
+
scope?: components["schemas"]["OrderLineItemDiscountScope"];
|
|
2852
|
+
};
|
|
2853
|
+
/** @description The line item being returned in an order. */
|
|
2854
|
+
OrderReturnLineItem: {
|
|
2855
|
+
/** @description A unique ID for this return line-item entry. */
|
|
2856
|
+
uid?: string | null;
|
|
2857
|
+
/** @description The `uid` of the line item in the original sale order. */
|
|
2858
|
+
source_line_item_uid?: string | null;
|
|
2859
|
+
/** @description The name of the line item. */
|
|
2860
|
+
name?: string | null;
|
|
2861
|
+
/**
|
|
2862
|
+
* @description The quantity returned, formatted as a decimal number.
|
|
2863
|
+
* For example, `"3"`.
|
|
2864
|
+
*
|
|
2865
|
+
* Line items with a `quantity_unit` can have non-integer quantities.
|
|
2866
|
+
* For example, `"1.70000"`.
|
|
2867
|
+
*/
|
|
2868
|
+
quantity: string;
|
|
2869
|
+
/** @description The unit and precision that this return line item's quantity is measured in. */
|
|
2870
|
+
quantity_unit?: components["schemas"]["OrderQuantityUnit"];
|
|
2871
|
+
/** @description The note of the return line item. */
|
|
2872
|
+
note?: string | null;
|
|
2873
|
+
/** @description The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to this return line item. */
|
|
2874
|
+
catalog_object_id?: string | null;
|
|
2875
|
+
/**
|
|
2876
|
+
* Format: int64
|
|
2877
|
+
* @description The version of the catalog object that this line item references.
|
|
2878
|
+
*/
|
|
2879
|
+
catalog_version?: number | null;
|
|
2880
|
+
/** @description The name of the variation applied to this return line item. */
|
|
2881
|
+
variation_name?: string | null;
|
|
2882
|
+
/**
|
|
2883
|
+
* @description The type of line item: an itemized return, a non-itemized return (custom amount),
|
|
2884
|
+
* or the return of an unactivated gift card sale.
|
|
2885
|
+
* See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible values
|
|
2886
|
+
*/
|
|
2887
|
+
item_type?: components["schemas"]["OrderLineItemItemType"];
|
|
2888
|
+
/** @description The [CatalogModifier](entity:CatalogModifier)s applied to this line item. */
|
|
2889
|
+
return_modifiers?: components["schemas"]["OrderReturnLineItemModifier"][] | null;
|
|
2890
|
+
/**
|
|
2891
|
+
* @description The list of references to `OrderReturnTax` entities applied to the return line item. Each
|
|
2892
|
+
* `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level
|
|
2893
|
+
* `OrderReturnTax` applied to the return line item. On reads, the applied amount
|
|
2894
|
+
* is populated.
|
|
2895
|
+
*/
|
|
2896
|
+
applied_taxes?: components["schemas"]["OrderLineItemAppliedTax"][] | null;
|
|
2897
|
+
/**
|
|
2898
|
+
* @description The list of references to `OrderReturnDiscount` entities applied to the return line item. Each
|
|
2899
|
+
* `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level
|
|
2900
|
+
* `OrderReturnDiscount` applied to the return line item. On reads, the applied amount
|
|
2901
|
+
* is populated.
|
|
2902
|
+
*/
|
|
2903
|
+
applied_discounts?: components["schemas"]["OrderLineItemAppliedDiscount"][] | null;
|
|
2904
|
+
/** @description The base price for a single unit of the line item. */
|
|
2905
|
+
base_price_money?: components["schemas"]["Money"];
|
|
2906
|
+
/**
|
|
2907
|
+
* @description The total price of all item variations returned in this line item.
|
|
2908
|
+
* The price is calculated as `base_price_money` multiplied by `quantity` and
|
|
2909
|
+
* does not include modifiers.
|
|
2910
|
+
*/
|
|
2911
|
+
readonly variation_total_price_money?: components["schemas"]["Money"];
|
|
2912
|
+
/** @description The gross return amount of money calculated as (item base price + modifiers price) * quantity. */
|
|
2913
|
+
readonly gross_return_money?: components["schemas"]["Money"];
|
|
2914
|
+
/** @description The total amount of tax money to return for the line item. */
|
|
2915
|
+
readonly total_tax_money?: components["schemas"]["Money"];
|
|
2916
|
+
/** @description The total amount of discount money to return for the line item. */
|
|
2917
|
+
readonly total_discount_money?: components["schemas"]["Money"];
|
|
2918
|
+
/** @description The total amount of money to return for this line item. */
|
|
2919
|
+
readonly total_money?: components["schemas"]["Money"];
|
|
2920
|
+
/**
|
|
2921
|
+
* @description The list of references to `OrderReturnServiceCharge` entities applied to the return
|
|
2922
|
+
* line item. Each `OrderLineItemAppliedServiceCharge` has a `service_charge_uid` that
|
|
2923
|
+
* references the `uid` of a top-level `OrderReturnServiceCharge` applied to the return line
|
|
2924
|
+
* item. On reads, the applied amount is populated.
|
|
2925
|
+
*/
|
|
2926
|
+
applied_service_charges?: components["schemas"]["OrderLineItemAppliedServiceCharge"][] | null;
|
|
2927
|
+
/** @description The total amount of apportioned service charge money to return for the line item. */
|
|
2928
|
+
readonly total_service_charge_money?: components["schemas"]["Money"];
|
|
2929
|
+
};
|
|
2930
|
+
/** @description A line item modifier being returned. */
|
|
2931
|
+
OrderReturnLineItemModifier: {
|
|
2932
|
+
/** @description A unique ID that identifies the return modifier only within this order. */
|
|
2933
|
+
uid?: string | null;
|
|
2934
|
+
/**
|
|
2935
|
+
* @description The modifier `uid` from the order's line item that contains the
|
|
2936
|
+
* original sale of this line item modifier.
|
|
2937
|
+
*/
|
|
2938
|
+
source_modifier_uid?: string | null;
|
|
2939
|
+
/** @description The catalog object ID referencing [CatalogModifier](entity:CatalogModifier). */
|
|
2940
|
+
catalog_object_id?: string | null;
|
|
2941
|
+
/**
|
|
2942
|
+
* Format: int64
|
|
2943
|
+
* @description The version of the catalog object that this line item modifier references.
|
|
2944
|
+
*/
|
|
2945
|
+
catalog_version?: number | null;
|
|
2946
|
+
/** @description The name of the item modifier. */
|
|
2947
|
+
name?: string | null;
|
|
2948
|
+
/**
|
|
2949
|
+
* @description The base price for the modifier.
|
|
2950
|
+
*
|
|
2951
|
+
* `base_price_money` is required for ad hoc modifiers.
|
|
2952
|
+
* If both `catalog_object_id` and `base_price_money` are set, `base_price_money` overrides the predefined [CatalogModifier](entity:CatalogModifier) price.
|
|
2953
|
+
*/
|
|
2954
|
+
base_price_money?: components["schemas"]["Money"];
|
|
2955
|
+
/**
|
|
2956
|
+
* @description The total price of the item modifier for its line item.
|
|
2957
|
+
* This is the modifier's `base_price_money` multiplied by the line item's quantity.
|
|
2958
|
+
*/
|
|
2959
|
+
readonly total_price_money?: components["schemas"]["Money"];
|
|
2960
|
+
/**
|
|
2961
|
+
* @description The quantity of the line item modifier. The modifier quantity can be 0 or more.
|
|
2962
|
+
* For example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders
|
|
2963
|
+
* this item, the restaurant records the purchase by creating an `Order` object with a line item
|
|
2964
|
+
* for a burger. The line item includes a line item modifier: the name is cheese and the quantity
|
|
2965
|
+
* is 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses
|
|
2966
|
+
* the extra cheese option, the modifier quantity increases to 2. If the buyer does not want
|
|
2967
|
+
* any cheese, the modifier quantity is set to 0.
|
|
2968
|
+
*/
|
|
2969
|
+
quantity?: string | null;
|
|
2970
|
+
};
|
|
2971
|
+
/** @description Represents the service charge applied to the original order. */
|
|
2972
|
+
OrderReturnServiceCharge: {
|
|
2973
|
+
/** @description A unique ID that identifies the return service charge only within this order. */
|
|
2974
|
+
uid?: string | null;
|
|
2975
|
+
/**
|
|
2976
|
+
* @description The service charge `uid` from the order containing the original
|
|
2977
|
+
* service charge. `source_service_charge_uid` is `null` for
|
|
2978
|
+
* unlinked returns.
|
|
2979
|
+
*/
|
|
2980
|
+
source_service_charge_uid?: string | null;
|
|
2981
|
+
/** @description The name of the service charge. */
|
|
2982
|
+
name?: string | null;
|
|
2983
|
+
/** @description The catalog object ID of the associated [OrderServiceCharge](entity:OrderServiceCharge). */
|
|
2984
|
+
catalog_object_id?: string | null;
|
|
2985
|
+
/**
|
|
2986
|
+
* Format: int64
|
|
2987
|
+
* @description The version of the catalog object that this service charge references.
|
|
2988
|
+
*/
|
|
2989
|
+
catalog_version?: number | null;
|
|
2990
|
+
/**
|
|
2991
|
+
* @description The percentage of the service charge, as a string representation of
|
|
2992
|
+
* a decimal number. For example, a value of `"7.25"` corresponds to a
|
|
2993
|
+
* percentage of 7.25%.
|
|
2994
|
+
*
|
|
2995
|
+
* Either `percentage` or `amount_money` should be set, but not both.
|
|
2996
|
+
*/
|
|
2997
|
+
percentage?: string | null;
|
|
2998
|
+
/**
|
|
2999
|
+
* @description The amount of a non-percentage-based service charge.
|
|
3000
|
+
*
|
|
3001
|
+
* Either `percentage` or `amount_money` should be set, but not both.
|
|
3002
|
+
*/
|
|
3003
|
+
amount_money?: components["schemas"]["Money"];
|
|
3004
|
+
/**
|
|
3005
|
+
* @description The amount of money applied to the order by the service charge, including
|
|
3006
|
+
* any inclusive tax amounts, as calculated by Square.
|
|
3007
|
+
*
|
|
3008
|
+
* - For fixed-amount service charges, `applied_money` is equal to `amount_money`.
|
|
3009
|
+
* - For percentage-based service charges, `applied_money` is the money calculated using the percentage.
|
|
3010
|
+
*/
|
|
3011
|
+
readonly applied_money?: components["schemas"]["Money"];
|
|
3012
|
+
/**
|
|
3013
|
+
* @description The total amount of money to collect for the service charge.
|
|
3014
|
+
*
|
|
3015
|
+
* __NOTE__: If an inclusive tax is applied to the service charge, `total_money`
|
|
3016
|
+
* does not equal `applied_money` plus `total_tax_money` because the inclusive
|
|
3017
|
+
* tax amount is already included in both `applied_money` and `total_tax_money`.
|
|
3018
|
+
*/
|
|
3019
|
+
readonly total_money?: components["schemas"]["Money"];
|
|
3020
|
+
/** @description The total amount of tax money to collect for the service charge. */
|
|
3021
|
+
readonly total_tax_money?: components["schemas"]["Money"];
|
|
3022
|
+
/**
|
|
3023
|
+
* @description The calculation phase after which to apply the service charge.
|
|
3024
|
+
* See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
|
|
3025
|
+
*/
|
|
3026
|
+
readonly calculation_phase?: components["schemas"]["OrderServiceChargeCalculationPhase"];
|
|
3027
|
+
/**
|
|
3028
|
+
* @description Indicates whether the surcharge can be taxed. Service charges
|
|
3029
|
+
* calculated in the `TOTAL_PHASE` cannot be marked as taxable.
|
|
3030
|
+
*/
|
|
3031
|
+
taxable?: boolean | null;
|
|
3032
|
+
/**
|
|
3033
|
+
* @description The list of references to `OrderReturnTax` entities applied to the
|
|
3034
|
+
* `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid`
|
|
3035
|
+
* that references the `uid` of a top-level `OrderReturnTax` that is being
|
|
3036
|
+
* applied to the `OrderReturnServiceCharge`. On reads, the applied amount is
|
|
3037
|
+
* populated.
|
|
3038
|
+
*/
|
|
3039
|
+
applied_taxes?: components["schemas"]["OrderLineItemAppliedTax"][] | null;
|
|
3040
|
+
/**
|
|
3041
|
+
* @description Indicates whether the service charge will be treated as a value-holding line item or apportioned toward a line item.
|
|
3042
|
+
* See [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) for possible values
|
|
3043
|
+
*/
|
|
3044
|
+
treatment_type?: components["schemas"]["OrderServiceChargeTreatmentType"];
|
|
3045
|
+
/**
|
|
3046
|
+
* @description Indicates the level at which the apportioned service charge applies. For `ORDER`
|
|
3047
|
+
* scoped service charges, Square generates references in `applied_service_charges` on
|
|
3048
|
+
* all order line items that do not have them. For `LINE_ITEM` scoped service charges,
|
|
3049
|
+
* the service charge only applies to line items with a service charge reference in their
|
|
3050
|
+
* `applied_service_charges` field.
|
|
3051
|
+
*
|
|
3052
|
+
* This field is immutable. To change the scope of an apportioned service charge, you must delete
|
|
3053
|
+
* the apportioned service charge and re-add it as a new apportioned service charge.
|
|
3054
|
+
* See [OrderServiceChargeScope](#type-orderservicechargescope) for possible values
|
|
3055
|
+
*/
|
|
3056
|
+
scope?: components["schemas"]["OrderServiceChargeScope"];
|
|
3057
|
+
/**
|
|
3058
|
+
* @description The type of the service charge.
|
|
3059
|
+
* See [OrderServiceChargeType](#type-orderservicechargetype) for possible values
|
|
3060
|
+
*/
|
|
3061
|
+
readonly type?: components["schemas"]["OrderServiceChargeType"];
|
|
3062
|
+
};
|
|
3063
|
+
/**
|
|
3064
|
+
* @description Represents a tax being returned that applies to one or more return line items in an order.
|
|
3065
|
+
*
|
|
3066
|
+
* Fixed-amount, order-scoped taxes are distributed across all non-zero return line item totals.
|
|
3067
|
+
* The amount distributed to each return line item is relative to that item’s contribution to the
|
|
3068
|
+
* order subtotal.
|
|
3069
|
+
*/
|
|
3070
|
+
OrderReturnTax: {
|
|
3071
|
+
/** @description A unique ID that identifies the returned tax only within this order. */
|
|
3072
|
+
uid?: string | null;
|
|
3073
|
+
/** @description The tax `uid` from the order that contains the original tax charge. */
|
|
3074
|
+
source_tax_uid?: string | null;
|
|
3075
|
+
/** @description The catalog object ID referencing [CatalogTax](entity:CatalogTax). */
|
|
3076
|
+
catalog_object_id?: string | null;
|
|
3077
|
+
/**
|
|
3078
|
+
* Format: int64
|
|
3079
|
+
* @description The version of the catalog object that this tax references.
|
|
3080
|
+
*/
|
|
3081
|
+
catalog_version?: number | null;
|
|
3082
|
+
/** @description The tax's name. */
|
|
3083
|
+
name?: string | null;
|
|
3084
|
+
/**
|
|
3085
|
+
* @description Indicates the calculation method used to apply the tax.
|
|
3086
|
+
* See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values
|
|
3087
|
+
*/
|
|
3088
|
+
type?: components["schemas"]["OrderLineItemTaxType"];
|
|
3089
|
+
/**
|
|
3090
|
+
* @description The percentage of the tax, as a string representation of a decimal number.
|
|
3091
|
+
* For example, a value of `"7.25"` corresponds to a percentage of 7.25%.
|
|
3092
|
+
*/
|
|
3093
|
+
percentage?: string | null;
|
|
3094
|
+
/** @description The amount of money applied by the tax in an order. */
|
|
3095
|
+
readonly applied_money?: components["schemas"]["Money"];
|
|
3096
|
+
/**
|
|
3097
|
+
* @description Indicates the level at which the `OrderReturnTax` applies. For `ORDER` scoped
|
|
3098
|
+
* taxes, Square generates references in `applied_taxes` on all
|
|
3099
|
+
* `OrderReturnLineItem`s. For `LINE_ITEM` scoped taxes, the tax is only applied to
|
|
3100
|
+
* `OrderReturnLineItem`s with references in their `applied_discounts` field.
|
|
3101
|
+
* See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
|
|
3102
|
+
*/
|
|
3103
|
+
scope?: components["schemas"]["OrderLineItemTaxScope"];
|
|
3104
|
+
};
|
|
3105
|
+
/** @description A tip being returned. */
|
|
3106
|
+
OrderReturnTip: {
|
|
3107
|
+
/** @description A unique ID that identifies the tip only within this order. */
|
|
3108
|
+
uid?: string | null;
|
|
3109
|
+
/**
|
|
3110
|
+
* @description The amount of tip being returned
|
|
3111
|
+
* --
|
|
3112
|
+
*/
|
|
3113
|
+
readonly applied_money?: components["schemas"]["Money"];
|
|
3114
|
+
/** @description The tender `uid` from the order that contains the original application of this tip. */
|
|
3115
|
+
source_tender_uid?: string | null;
|
|
3116
|
+
/** @description The tender `id` from the order that contains the original application of this tip. */
|
|
3117
|
+
source_tender_id?: string | null;
|
|
3118
|
+
};
|
|
3119
|
+
/**
|
|
3120
|
+
* @description Represents a reward that can be applied to an order if the necessary
|
|
3121
|
+
* reward tier criteria are met. Rewards are created through the Loyalty API.
|
|
3122
|
+
*/
|
|
3123
|
+
OrderReward: {
|
|
3124
|
+
/** @description The identifier of the reward. */
|
|
3125
|
+
id: string;
|
|
3126
|
+
/** @description The identifier of the reward tier corresponding to this reward. */
|
|
3127
|
+
reward_tier_id: string;
|
|
3128
|
+
};
|
|
3129
|
+
/**
|
|
3130
|
+
* @description A rounding adjustment of the money being returned. Commonly used to apply cash rounding
|
|
3131
|
+
* when the minimum unit of the account is smaller than the lowest physical denomination of the currency.
|
|
3132
|
+
*/
|
|
3133
|
+
OrderRoundingAdjustment: {
|
|
3134
|
+
/** @description A unique ID that identifies the rounding adjustment only within this order. */
|
|
3135
|
+
uid?: string | null;
|
|
3136
|
+
/** @description The name of the rounding adjustment from the original sale order. */
|
|
3137
|
+
name?: string | null;
|
|
3138
|
+
/** @description The actual rounding adjustment amount. */
|
|
3139
|
+
amount_money?: components["schemas"]["Money"];
|
|
3140
|
+
};
|
|
3141
|
+
/** @description Represents a service charge applied to an order. */
|
|
3142
|
+
OrderServiceCharge: {
|
|
3143
|
+
/** @description A unique ID that identifies the service charge only within this order. */
|
|
3144
|
+
uid?: string | null;
|
|
3145
|
+
/** @description The name of the service charge. This is unused and null for AUTO_GRATUITY to match the behavior on Bills. */
|
|
3146
|
+
name?: string | null;
|
|
3147
|
+
/** @description The catalog object ID referencing the service charge [CatalogObject](entity:CatalogObject). */
|
|
3148
|
+
catalog_object_id?: string | null;
|
|
3149
|
+
/**
|
|
3150
|
+
* Format: int64
|
|
3151
|
+
* @description The version of the catalog object that this service charge references.
|
|
3152
|
+
*/
|
|
3153
|
+
catalog_version?: number | null;
|
|
3154
|
+
/**
|
|
3155
|
+
* @description The service charge percentage as a string representation of a
|
|
3156
|
+
* decimal number. For example, `"7.25"` indicates a service charge of 7.25%.
|
|
3157
|
+
*
|
|
3158
|
+
* Exactly 1 of `percentage` or `amount_money` should be set.
|
|
3159
|
+
*/
|
|
3160
|
+
percentage?: string | null;
|
|
3161
|
+
/**
|
|
3162
|
+
* @description The amount of a non-percentage-based service charge.
|
|
3163
|
+
*
|
|
3164
|
+
* Exactly one of `percentage` or `amount_money` should be set.
|
|
3165
|
+
*/
|
|
3166
|
+
amount_money?: components["schemas"]["Money"];
|
|
3167
|
+
/**
|
|
3168
|
+
* @description The amount of money applied to the order by the service charge,
|
|
3169
|
+
* including any inclusive tax amounts, as calculated by Square.
|
|
3170
|
+
*
|
|
3171
|
+
* - For fixed-amount service charges, `applied_money` is equal to `amount_money`.
|
|
3172
|
+
* - For percentage-based service charges, `applied_money` is the money
|
|
3173
|
+
* calculated using the percentage.
|
|
3174
|
+
*/
|
|
3175
|
+
readonly applied_money?: components["schemas"]["Money"];
|
|
3176
|
+
/**
|
|
3177
|
+
* @description The total amount of money to collect for the service charge.
|
|
3178
|
+
*
|
|
3179
|
+
* __Note__: If an inclusive tax is applied to the service charge,
|
|
3180
|
+
* `total_money` does not equal `applied_money` plus `total_tax_money`
|
|
3181
|
+
* because the inclusive tax amount is already included in both
|
|
3182
|
+
* `applied_money` and `total_tax_money`.
|
|
3183
|
+
*/
|
|
3184
|
+
readonly total_money?: components["schemas"]["Money"];
|
|
3185
|
+
/** @description The total amount of tax money to collect for the service charge. */
|
|
3186
|
+
readonly total_tax_money?: components["schemas"]["Money"];
|
|
3187
|
+
/**
|
|
3188
|
+
* @description The calculation phase at which to apply the service charge.
|
|
3189
|
+
* See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
|
|
3190
|
+
*/
|
|
3191
|
+
calculation_phase?: components["schemas"]["OrderServiceChargeCalculationPhase"];
|
|
3192
|
+
/**
|
|
3193
|
+
* @description Indicates whether the service charge can be taxed. If set to `true`,
|
|
3194
|
+
* order-level taxes automatically apply to the service charge. Note that
|
|
3195
|
+
* service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable.
|
|
3196
|
+
*/
|
|
3197
|
+
taxable?: boolean | null;
|
|
3198
|
+
/**
|
|
3199
|
+
* @description The list of references to the taxes applied to this service charge. Each
|
|
3200
|
+
* `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level
|
|
3201
|
+
* `OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied
|
|
3202
|
+
* is populated.
|
|
3203
|
+
*
|
|
3204
|
+
* An `OrderLineItemAppliedTax` is automatically created on every taxable service charge
|
|
3205
|
+
* for all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records
|
|
3206
|
+
* for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable
|
|
3207
|
+
* service charge. Taxable service charges have the `taxable` field set to `true` and calculated
|
|
3208
|
+
* in the `SUBTOTAL_PHASE`.
|
|
3209
|
+
*
|
|
3210
|
+
* To change the amount of a tax, modify the referenced top-level tax.
|
|
3211
|
+
*/
|
|
3212
|
+
applied_taxes?: components["schemas"]["OrderLineItemAppliedTax"][] | null;
|
|
3213
|
+
/**
|
|
3214
|
+
* @description Application-defined data attached to this service charge. Metadata fields are intended
|
|
3215
|
+
* to store descriptive references or associations with an entity in another system or store brief
|
|
3216
|
+
* information about the object. Square does not process this field; it only stores and returns it
|
|
3217
|
+
* in relevant API calls. Do not use metadata to store any sensitive information (such as personally
|
|
3218
|
+
* identifiable information or card details).
|
|
3219
|
+
*
|
|
3220
|
+
* Keys written by applications must be 60 characters or less and must be in the character set
|
|
3221
|
+
* `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
|
|
3222
|
+
* with a namespace, separated from the key with a ':' character.
|
|
3223
|
+
*
|
|
3224
|
+
* Values have a maximum length of 255 characters.
|
|
3225
|
+
*
|
|
3226
|
+
* An application can have up to 10 entries per metadata field.
|
|
3227
|
+
*
|
|
3228
|
+
* Entries written by applications are private and can only be read or modified by the same
|
|
3229
|
+
* application.
|
|
3230
|
+
*
|
|
3231
|
+
* For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
|
|
3232
|
+
*/
|
|
3233
|
+
metadata?: {
|
|
3234
|
+
[key: string]: string;
|
|
3235
|
+
} | null;
|
|
3236
|
+
/**
|
|
3237
|
+
* @description The type of the service charge.
|
|
3238
|
+
* See [OrderServiceChargeType](#type-orderservicechargetype) for possible values
|
|
3239
|
+
*/
|
|
3240
|
+
readonly type?: components["schemas"]["OrderServiceChargeType"];
|
|
3241
|
+
/**
|
|
3242
|
+
* @description Indicates whether the service charge will be treated as a value-holding line item or apportioned toward a line item.
|
|
3243
|
+
* See [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) for possible values
|
|
3244
|
+
*/
|
|
3245
|
+
treatment_type?: components["schemas"]["OrderServiceChargeTreatmentType"];
|
|
3246
|
+
/**
|
|
3247
|
+
* @description Indicates the level at which the apportioned service charge applies. For `ORDER`
|
|
3248
|
+
* scoped service charges, Square generates references in `applied_service_charges` on
|
|
3249
|
+
* all order line items that do not have them. For `LINE_ITEM` scoped service charges,
|
|
3250
|
+
* the service charge only applies to line items with a service charge reference in their
|
|
3251
|
+
* `applied_service_charges` field.
|
|
3252
|
+
*
|
|
3253
|
+
* This field is immutable. To change the scope of an apportioned service charge, you must delete
|
|
3254
|
+
* the apportioned service charge and re-add it as a new apportioned service charge.
|
|
3255
|
+
* See [OrderServiceChargeScope](#type-orderservicechargescope) for possible values
|
|
3256
|
+
*/
|
|
3257
|
+
scope?: components["schemas"]["OrderServiceChargeScope"];
|
|
3258
|
+
};
|
|
3259
|
+
/**
|
|
3260
|
+
* @description Represents a phase in the process of calculating order totals.
|
|
3261
|
+
* Service charges are applied after the indicated phase.
|
|
3262
|
+
*
|
|
3263
|
+
* [Read more about how order totals are calculated.](https://developer.squareup.com/docs/orders-api/how-it-works#how-totals-are-calculated)
|
|
3264
|
+
* @enum {string}
|
|
3265
|
+
*/
|
|
3266
|
+
OrderServiceChargeCalculationPhase: "SUBTOTAL_PHASE" | "TOTAL_PHASE" | "APPORTIONED_PERCENTAGE_PHASE" | "APPORTIONED_AMOUNT_PHASE";
|
|
3267
|
+
/**
|
|
3268
|
+
* @description Indicates whether this is a line-item or order-level apportioned
|
|
3269
|
+
* service charge.
|
|
3270
|
+
* @enum {string}
|
|
3271
|
+
*/
|
|
3272
|
+
OrderServiceChargeScope: "OTHER_SERVICE_CHARGE_SCOPE" | "LINE_ITEM" | "ORDER";
|
|
3273
|
+
/**
|
|
3274
|
+
* @description Indicates whether the service charge will be treated as a value-holding line item or
|
|
3275
|
+
* apportioned toward a line item.
|
|
3276
|
+
* @enum {string}
|
|
3277
|
+
*/
|
|
3278
|
+
OrderServiceChargeTreatmentType: "LINE_ITEM_TREATMENT" | "APPORTIONED_TREATMENT";
|
|
3279
|
+
/** @enum {string} */
|
|
3280
|
+
OrderServiceChargeType: "AUTO_GRATUITY" | "CUSTOM";
|
|
3281
|
+
/** @description Represents the origination details of an order. */
|
|
3282
|
+
OrderSource: {
|
|
3283
|
+
/**
|
|
3284
|
+
* @description The name used to identify the place (physical or digital) that an order originates.
|
|
3285
|
+
* If unset, the name defaults to the name of the application that created the order.
|
|
3286
|
+
*/
|
|
3287
|
+
name?: string | null;
|
|
3288
|
+
};
|
|
3289
|
+
/**
|
|
3290
|
+
* @description The state of the order.
|
|
3291
|
+
* @enum {string}
|
|
3292
|
+
*/
|
|
3293
|
+
OrderState: "OPEN" | "COMPLETED" | "CANCELED" | "DRAFT";
|
|
3294
|
+
/** @description Represents a payment processed by the Square API. */
|
|
3295
|
+
Payment: {
|
|
3296
|
+
/** @description A unique ID for the payment. */
|
|
3297
|
+
readonly id?: string;
|
|
3298
|
+
/** @description The timestamp of when the payment was created, in RFC 3339 format. */
|
|
3299
|
+
readonly created_at?: string;
|
|
3300
|
+
/** @description The timestamp of when the payment was last updated, in RFC 3339 format. */
|
|
3301
|
+
readonly updated_at?: string;
|
|
3302
|
+
/**
|
|
3303
|
+
* @description The amount processed for this payment, not including `tip_money`.
|
|
3304
|
+
*
|
|
3305
|
+
* The amount is specified in the smallest denomination of the applicable currency (for example,
|
|
3306
|
+
* US dollar amounts are specified in cents). For more information, see
|
|
3307
|
+
* [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
|
|
3308
|
+
*/
|
|
3309
|
+
amount_money?: components["schemas"]["Money"];
|
|
3310
|
+
/**
|
|
3311
|
+
* @description The amount designated as a tip for the seller's staff.
|
|
3312
|
+
*
|
|
3313
|
+
* Tips for external vendors such as a 3rd party delivery courier must be recorded using Order.service_charges.
|
|
3314
|
+
*
|
|
3315
|
+
* This amount is specified in the smallest denomination of the applicable currency (for example,
|
|
3316
|
+
* US dollar amounts are specified in cents). For more information, see
|
|
3317
|
+
* [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
|
|
3318
|
+
*/
|
|
3319
|
+
tip_money?: components["schemas"]["Money"];
|
|
3320
|
+
/**
|
|
3321
|
+
* @description The total amount for the payment, including `amount_money` and `tip_money`.
|
|
3322
|
+
* This amount is specified in the smallest denomination of the applicable currency (for example,
|
|
3323
|
+
* US dollar amounts are specified in cents). For more information, see
|
|
3324
|
+
* [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
|
|
3325
|
+
*/
|
|
3326
|
+
readonly total_money?: components["schemas"]["Money"];
|
|
3327
|
+
/**
|
|
3328
|
+
* @description The amount the developer is taking as a fee for facilitating the payment on behalf
|
|
3329
|
+
* of the seller. This amount is specified in the smallest denomination of the applicable currency
|
|
3330
|
+
* (for example, US dollar amounts are specified in cents). For more information,
|
|
3331
|
+
* see [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees).
|
|
3332
|
+
*
|
|
3333
|
+
* The amount cannot be more than 90% of the `total_money` value.
|
|
3334
|
+
*
|
|
3335
|
+
* To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required.
|
|
3336
|
+
* For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions).
|
|
3337
|
+
*/
|
|
3338
|
+
app_fee_money?: components["schemas"]["Money"];
|
|
3339
|
+
/**
|
|
3340
|
+
* @description The amount of money approved for this payment. This value may change if Square chooses to
|
|
3341
|
+
* obtain reauthorization as part of a call to [UpdatePayment](api-endpoint:Payments-UpdatePayment).
|
|
3342
|
+
*/
|
|
3343
|
+
approved_money?: components["schemas"]["Money"];
|
|
3344
|
+
/** @description The processing fees and fee adjustments assessed by Square for this payment. */
|
|
3345
|
+
readonly processing_fee?: components["schemas"]["ProcessingFee"][];
|
|
3346
|
+
/**
|
|
3347
|
+
* @description The total amount of the payment refunded to date.
|
|
3348
|
+
*
|
|
3349
|
+
* This amount is specified in the smallest denomination of the applicable currency (for example,
|
|
3350
|
+
* US dollar amounts are specified in cents).
|
|
3351
|
+
*/
|
|
3352
|
+
readonly refunded_money?: components["schemas"]["Money"];
|
|
3353
|
+
/** @description Indicates whether the payment is APPROVED, PENDING, COMPLETED, CANCELED, or FAILED. */
|
|
3354
|
+
readonly status?: string;
|
|
3355
|
+
/**
|
|
3356
|
+
* @description The duration of time after the payment's creation when Square automatically applies the
|
|
3357
|
+
* `delay_action` to the payment. This automatic `delay_action` applies only to payments that
|
|
3358
|
+
* do not reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration`
|
|
3359
|
+
* time period.
|
|
3360
|
+
*
|
|
3361
|
+
* This field is specified as a time duration, in RFC 3339 format.
|
|
3362
|
+
*
|
|
3363
|
+
* Notes:
|
|
3364
|
+
* This feature is only supported for card payments.
|
|
3365
|
+
*
|
|
3366
|
+
* Default:
|
|
3367
|
+
*
|
|
3368
|
+
* - Card-present payments: "PT36H" (36 hours) from the creation time.
|
|
3369
|
+
* - Card-not-present payments: "P7D" (7 days) from the creation time.
|
|
3370
|
+
*/
|
|
3371
|
+
readonly delay_duration?: string;
|
|
3372
|
+
/**
|
|
3373
|
+
* @description The action to be applied to the payment when the `delay_duration` has elapsed.
|
|
3374
|
+
*
|
|
3375
|
+
* Current values include `CANCEL` and `COMPLETE`.
|
|
3376
|
+
*/
|
|
3377
|
+
delay_action?: string | null;
|
|
3378
|
+
/**
|
|
3379
|
+
* @description The read-only timestamp of when the `delay_action` is automatically applied,
|
|
3380
|
+
* in RFC 3339 format.
|
|
3381
|
+
*
|
|
3382
|
+
* Note that this field is calculated by summing the payment's `delay_duration` and `created_at`
|
|
3383
|
+
* fields. The `created_at` field is generated by Square and might not exactly match the
|
|
3384
|
+
* time on your local machine.
|
|
3385
|
+
*/
|
|
3386
|
+
readonly delayed_until?: string;
|
|
3387
|
+
/**
|
|
3388
|
+
* @description The source type for this payment.
|
|
3389
|
+
*
|
|
3390
|
+
* Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `SQUARE_ACCOUNT`,
|
|
3391
|
+
* `CASH` and `EXTERNAL`. For information about these payment source types,
|
|
3392
|
+
* see [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).
|
|
3393
|
+
*/
|
|
3394
|
+
readonly source_type?: string;
|
|
3395
|
+
/** @description Details about a card payment. These details are only populated if the source_type is `CARD`. */
|
|
3396
|
+
card_details?: components["schemas"]["CardPaymentDetails"];
|
|
3397
|
+
/** @description Details about a cash payment. These details are only populated if the source_type is `CASH`. */
|
|
3398
|
+
cash_details?: components["schemas"]["CashPaymentDetails"];
|
|
3399
|
+
/** @description Details about a bank account payment. These details are only populated if the source_type is `BANK_ACCOUNT`. */
|
|
3400
|
+
readonly bank_account_details?: components["schemas"]["BankAccountPaymentDetails"];
|
|
3401
|
+
/** @description Details specific to electronic money payments. */
|
|
3402
|
+
electronic_money_details?: components["schemas"]["ElectronicMoneyDetails"];
|
|
3403
|
+
/**
|
|
3404
|
+
* @description Details about an external payment. The details are only populated
|
|
3405
|
+
* if the `source_type` is `EXTERNAL`.
|
|
3406
|
+
*/
|
|
3407
|
+
readonly external_details?: components["schemas"]["ExternalPaymentDetails"];
|
|
3408
|
+
/**
|
|
3409
|
+
* @description Details about an wallet payment. The details are only populated
|
|
3410
|
+
* if the `source_type` is `WALLET`.
|
|
3411
|
+
*/
|
|
3412
|
+
readonly wallet_details?: components["schemas"]["DigitalWalletDetails"];
|
|
3413
|
+
/**
|
|
3414
|
+
* @description Details about a Buy Now Pay Later payment. The details are only populated
|
|
3415
|
+
* if the `source_type` is `BUY_NOW_PAY_LATER`. For more information, see
|
|
3416
|
+
* [Afterpay Payments](https://developer.squareup.com/docs/payments-api/take-payments/afterpay-payments).
|
|
3417
|
+
*/
|
|
3418
|
+
readonly buy_now_pay_later_details?: components["schemas"]["BuyNowPayLaterDetails"];
|
|
3419
|
+
/**
|
|
3420
|
+
* @description Details about a Square Account payment. The details are only populated
|
|
3421
|
+
* if the `source_type` is `SQUARE_ACCOUNT`.
|
|
3422
|
+
*/
|
|
3423
|
+
readonly square_account_details?: components["schemas"]["SquareAccountDetails"];
|
|
3424
|
+
/** @description The ID of the location associated with the payment. */
|
|
3425
|
+
readonly location_id?: string;
|
|
3426
|
+
/** @description The ID of the order associated with the payment. */
|
|
3427
|
+
readonly order_id?: string;
|
|
3428
|
+
/**
|
|
3429
|
+
* @description An optional ID that associates the payment with an entity in
|
|
3430
|
+
* another system.
|
|
3431
|
+
*/
|
|
3432
|
+
readonly reference_id?: string;
|
|
3433
|
+
/**
|
|
3434
|
+
* @description The ID of the customer associated with the payment. If the ID is
|
|
3435
|
+
* not provided in the `CreatePayment` request that was used to create the `Payment`,
|
|
3436
|
+
* Square may use information in the request
|
|
3437
|
+
* (such as the billing and shipping address, email address, and payment source)
|
|
3438
|
+
* to identify a matching customer profile in the Customer Directory.
|
|
3439
|
+
* If found, the profile ID is used. If a profile is not found, the
|
|
3440
|
+
* API attempts to create an
|
|
3441
|
+
* [instant profile](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles).
|
|
3442
|
+
* If the API cannot create an
|
|
3443
|
+
* instant profile (either because the seller has disabled it or the
|
|
3444
|
+
* seller's region prevents creating it), this field remains unset. Note that
|
|
3445
|
+
* this process is asynchronous and it may take some time before a
|
|
3446
|
+
* customer ID is added to the payment.
|
|
3447
|
+
*/
|
|
3448
|
+
readonly customer_id?: string;
|
|
3449
|
+
/**
|
|
3450
|
+
* @description __Deprecated__: Use `Payment.team_member_id` instead.
|
|
3451
|
+
*
|
|
3452
|
+
* An optional ID of the employee associated with taking the payment.
|
|
3453
|
+
*/
|
|
3454
|
+
readonly employee_id?: string;
|
|
3455
|
+
/** @description An optional ID of the [TeamMember](entity:TeamMember) associated with taking the payment. */
|
|
3456
|
+
team_member_id?: string | null;
|
|
3457
|
+
/** @description A list of `refund_id`s identifying refunds for the payment. */
|
|
3458
|
+
readonly refund_ids?: string[];
|
|
3459
|
+
/**
|
|
3460
|
+
* @description Provides information about the risk associated with the payment, as determined by Square.
|
|
3461
|
+
* This field is present for payments to sellers that have opted in to receive risk
|
|
3462
|
+
* evaluations.
|
|
3463
|
+
*/
|
|
3464
|
+
readonly risk_evaluation?: components["schemas"]["RiskEvaluation"];
|
|
3465
|
+
/** @description An optional ID for a Terminal checkout that is associated with the payment. */
|
|
3466
|
+
readonly terminal_checkout_id?: string;
|
|
3467
|
+
/** @description The buyer's email address. */
|
|
3468
|
+
readonly buyer_email_address?: string;
|
|
3469
|
+
/** @description The buyer's billing address. */
|
|
3470
|
+
readonly billing_address?: components["schemas"]["Address"];
|
|
3471
|
+
/** @description The buyer's shipping address. */
|
|
3472
|
+
readonly shipping_address?: components["schemas"]["Address"];
|
|
3473
|
+
/** @description An optional note to include when creating a payment. */
|
|
3474
|
+
readonly note?: string;
|
|
3475
|
+
/**
|
|
3476
|
+
* @description Additional payment information that gets added to the customer's card statement
|
|
3477
|
+
* as part of the statement description.
|
|
3478
|
+
*
|
|
3479
|
+
* Note that the `statement_description_identifier` might get truncated on the statement description
|
|
3480
|
+
* to fit the required information including the Square identifier (SQ *) and the name of the
|
|
3481
|
+
* seller taking the payment.
|
|
3482
|
+
*/
|
|
3483
|
+
readonly statement_description_identifier?: string;
|
|
3484
|
+
/**
|
|
3485
|
+
* @description Actions that can be performed on this payment:
|
|
3486
|
+
* - `EDIT_AMOUNT_UP` - The payment amount can be edited up.
|
|
3487
|
+
* - `EDIT_AMOUNT_DOWN` - The payment amount can be edited down.
|
|
3488
|
+
* - `EDIT_TIP_AMOUNT_UP` - The tip amount can be edited up.
|
|
3489
|
+
* - `EDIT_TIP_AMOUNT_DOWN` - The tip amount can be edited down.
|
|
3490
|
+
* - `EDIT_DELAY_ACTION` - The delay_action can be edited.
|
|
3491
|
+
*/
|
|
3492
|
+
readonly capabilities?: string[];
|
|
3493
|
+
/**
|
|
3494
|
+
* @description The payment's receipt number.
|
|
3495
|
+
* The field is missing if a payment is canceled.
|
|
3496
|
+
*/
|
|
3497
|
+
readonly receipt_number?: string;
|
|
3498
|
+
/**
|
|
3499
|
+
* @description The URL for the payment's receipt.
|
|
3500
|
+
* The field is only populated for COMPLETED payments.
|
|
3501
|
+
*/
|
|
3502
|
+
readonly receipt_url?: string;
|
|
3503
|
+
/** @description Details about the device that took the payment. */
|
|
3504
|
+
readonly device_details?: components["schemas"]["DeviceDetails"];
|
|
3505
|
+
/** @description Details about the application that took the payment. */
|
|
3506
|
+
readonly application_details?: components["schemas"]["ApplicationDetails"];
|
|
3507
|
+
/** @description Whether or not this payment was taken offline. */
|
|
3508
|
+
readonly is_offline_payment?: boolean;
|
|
3509
|
+
/** @description Additional information about the payment if it was taken offline. */
|
|
3510
|
+
readonly offline_payment_details?: components["schemas"]["OfflinePaymentDetails"];
|
|
3511
|
+
/**
|
|
3512
|
+
* @description Used for optimistic concurrency. This opaque token identifies a specific version of the
|
|
3513
|
+
* `Payment` object.
|
|
3514
|
+
*/
|
|
3515
|
+
version_token?: string | null;
|
|
3516
|
+
};
|
|
3517
|
+
/**
|
|
3518
|
+
* @description Represents a refund of a payment made using Square. Contains information about
|
|
3519
|
+
* the original payment and the amount of money refunded.
|
|
3520
|
+
*/
|
|
3521
|
+
PaymentRefund: {
|
|
3522
|
+
/** @description The unique ID for this refund, generated by Square. */
|
|
3523
|
+
id: string;
|
|
3524
|
+
/**
|
|
3525
|
+
* @description The refund's status:
|
|
3526
|
+
* - `PENDING` - Awaiting approval.
|
|
3527
|
+
* - `COMPLETED` - Successfully completed.
|
|
3528
|
+
* - `REJECTED` - The refund was rejected.
|
|
3529
|
+
* - `FAILED` - An error occurred.
|
|
3530
|
+
*/
|
|
3531
|
+
status?: string | null;
|
|
3532
|
+
/** @description The location ID associated with the payment this refund is attached to. */
|
|
3533
|
+
location_id?: string | null;
|
|
3534
|
+
/** @description Flag indicating whether or not the refund is linked to an existing payment in Square. */
|
|
3535
|
+
readonly unlinked?: boolean;
|
|
3536
|
+
/**
|
|
3537
|
+
* @description The destination type for this refund.
|
|
3538
|
+
*
|
|
3539
|
+
* Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `CASH`,
|
|
3540
|
+
* `EXTERNAL`, and `SQUARE_ACCOUNT`.
|
|
3541
|
+
*/
|
|
3542
|
+
destination_type?: string | null;
|
|
3543
|
+
/**
|
|
3544
|
+
* @description Contains information about the refund destination. This field is populated only if
|
|
3545
|
+
* `destination_id` is defined in the `RefundPayment` request.
|
|
3546
|
+
*/
|
|
3547
|
+
readonly destination_details?: components["schemas"]["DestinationDetails"];
|
|
3548
|
+
/**
|
|
3549
|
+
* @description The amount of money refunded. This amount is specified in the smallest denomination
|
|
3550
|
+
* of the applicable currency (for example, US dollar amounts are specified in cents).
|
|
3551
|
+
*/
|
|
3552
|
+
amount_money: components["schemas"]["Money"];
|
|
3553
|
+
/**
|
|
3554
|
+
* @description The amount of money the application developer contributed to help cover the refunded amount.
|
|
3555
|
+
* This amount is specified in the smallest denomination of the applicable currency (for example,
|
|
3556
|
+
* US dollar amounts are specified in cents). For more information, see
|
|
3557
|
+
* [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
|
|
3558
|
+
*/
|
|
3559
|
+
app_fee_money?: components["schemas"]["Money"];
|
|
3560
|
+
/** @description Processing fees and fee adjustments assessed by Square for this refund. */
|
|
3561
|
+
processing_fee?: components["schemas"]["ProcessingFee"][] | null;
|
|
3562
|
+
/** @description The ID of the payment associated with this refund. */
|
|
3563
|
+
payment_id?: string | null;
|
|
3564
|
+
/** @description The ID of the order associated with the refund. */
|
|
3565
|
+
order_id?: string | null;
|
|
3566
|
+
/** @description The reason for the refund. */
|
|
3567
|
+
reason?: string | null;
|
|
3568
|
+
/** @description The timestamp of when the refund was created, in RFC 3339 format. */
|
|
3569
|
+
readonly created_at?: string;
|
|
3570
|
+
/** @description The timestamp of when the refund was last updated, in RFC 3339 format. */
|
|
3571
|
+
readonly updated_at?: string;
|
|
3572
|
+
/** @description An optional ID of the team member associated with taking the payment. */
|
|
3573
|
+
readonly team_member_id?: string;
|
|
3574
|
+
/** @description An optional ID for a Terminal refund. */
|
|
3575
|
+
readonly terminal_refund_id?: string;
|
|
3576
|
+
};
|
|
3577
|
+
/** @description Represents the Square processing fee. */
|
|
3578
|
+
ProcessingFee: {
|
|
3579
|
+
/** @description The timestamp of when the fee takes effect, in RFC 3339 format. */
|
|
3580
|
+
effective_at?: string | null;
|
|
3581
|
+
/** @description The type of fee assessed or adjusted. The fee type can be `INITIAL` or `ADJUSTMENT`. */
|
|
3582
|
+
type?: string | null;
|
|
3583
|
+
/**
|
|
3584
|
+
* @description The fee amount, which might be negative, that is assessed or adjusted by Square.
|
|
3585
|
+
*
|
|
3586
|
+
* Positive values represent funds being assessed, while negative values represent
|
|
3587
|
+
* funds being returned.
|
|
3588
|
+
*/
|
|
3589
|
+
amount_money?: components["schemas"]["Money"];
|
|
3590
|
+
};
|
|
3591
|
+
/** @description Represents a refund processed for a Square transaction. */
|
|
3592
|
+
Refund: {
|
|
3593
|
+
/** @description The refund's unique ID. */
|
|
3594
|
+
id: string;
|
|
3595
|
+
/** @description The ID of the refund's associated location. */
|
|
3596
|
+
location_id: string;
|
|
3597
|
+
/** @description The ID of the transaction that the refunded tender is part of. */
|
|
3598
|
+
transaction_id?: string | null;
|
|
3599
|
+
/** @description The ID of the refunded tender. */
|
|
3600
|
+
tender_id?: string | null;
|
|
3601
|
+
/** @description The timestamp for when the refund was created, in RFC 3339 format. */
|
|
3602
|
+
readonly created_at?: string;
|
|
3603
|
+
/** @description The reason for the refund being issued. */
|
|
3604
|
+
reason: string;
|
|
3605
|
+
/** @description The amount of money refunded to the buyer. */
|
|
3606
|
+
amount_money: components["schemas"]["Money"];
|
|
3607
|
+
/**
|
|
3608
|
+
* @description The current status of the refund (`PENDING`, `APPROVED`, `REJECTED`,
|
|
3609
|
+
* or `FAILED`).
|
|
3610
|
+
* See [RefundStatus](#type-refundstatus) for possible values
|
|
3611
|
+
*/
|
|
3612
|
+
status: components["schemas"]["RefundStatus"];
|
|
3613
|
+
/** @description The amount of Square processing fee money refunded to the *merchant*. */
|
|
3614
|
+
processing_fee_money?: components["schemas"]["Money"];
|
|
3615
|
+
/**
|
|
3616
|
+
* @description Additional recipients (other than the merchant) receiving a portion of this refund.
|
|
3617
|
+
* For example, fees assessed on a refund of a purchase by a third party integration.
|
|
3618
|
+
*/
|
|
3619
|
+
additional_recipients?: components["schemas"]["AdditionalRecipient"][] | null;
|
|
3620
|
+
};
|
|
3621
|
+
/**
|
|
3622
|
+
* @description Indicates a refund's current status.
|
|
3623
|
+
* @enum {string}
|
|
3624
|
+
*/
|
|
3625
|
+
RefundStatus: "PENDING" | "APPROVED" | "REJECTED" | "FAILED";
|
|
3626
|
+
/**
|
|
3627
|
+
* @description Represents fraud risk information for the associated payment.
|
|
3628
|
+
*
|
|
3629
|
+
* When you take a payment through Square's Payments API (using the `CreatePayment`
|
|
3630
|
+
* endpoint), Square evaluates it and assigns a risk level to the payment. Sellers
|
|
3631
|
+
* can use this information to determine the course of action (for example,
|
|
3632
|
+
* provide the goods/services or refund the payment).
|
|
3633
|
+
*/
|
|
3634
|
+
RiskEvaluation: {
|
|
3635
|
+
/** @description The timestamp when payment risk was evaluated, in RFC 3339 format. */
|
|
3636
|
+
readonly created_at?: string;
|
|
3637
|
+
/**
|
|
3638
|
+
* @description The risk level associated with the payment
|
|
3639
|
+
* See [RiskEvaluationRiskLevel](#type-riskevaluationrisklevel) for possible values
|
|
3640
|
+
*/
|
|
3641
|
+
risk_level?: components["schemas"]["RiskEvaluationRiskLevel"];
|
|
3642
|
+
};
|
|
3643
|
+
/** @enum {string} */
|
|
3644
|
+
RiskEvaluationRiskLevel: "PENDING" | "NORMAL" | "MODERATE" | "HIGH";
|
|
3645
|
+
/**
|
|
3646
|
+
* @description A filter based on the order `customer_id` and any tender `customer_id`
|
|
3647
|
+
* associated with the order. It does not filter based on the
|
|
3648
|
+
* [FulfillmentRecipient](entity:FulfillmentRecipient) `customer_id`.
|
|
3649
|
+
*/
|
|
3650
|
+
SearchOrdersCustomerFilter: {
|
|
3651
|
+
/**
|
|
3652
|
+
* @description A list of customer IDs to filter by.
|
|
3653
|
+
*
|
|
3654
|
+
* Max: 10 customer ids.
|
|
3655
|
+
*/
|
|
3656
|
+
customer_ids?: string[] | null;
|
|
3657
|
+
};
|
|
3658
|
+
/**
|
|
3659
|
+
* @description Filter for `Order` objects based on whether their `CREATED_AT`,
|
|
3660
|
+
* `CLOSED_AT`, or `UPDATED_AT` timestamps fall within a specified time range.
|
|
3661
|
+
* You can specify the time range and which timestamp to filter for. You can filter
|
|
3662
|
+
* for only one time range at a time.
|
|
3663
|
+
*
|
|
3664
|
+
* For each time range, the start time and end time are inclusive. If the end time
|
|
3665
|
+
* is absent, it defaults to the time of the first request for the cursor.
|
|
3666
|
+
*
|
|
3667
|
+
* __Important:__ If you use the `DateTimeFilter` in a `SearchOrders` query,
|
|
3668
|
+
* you must set the `sort_field` in [OrdersSort](entity:SearchOrdersSort)
|
|
3669
|
+
* to the same field you filter for. For example, if you set the `CLOSED_AT` field
|
|
3670
|
+
* in `DateTimeFilter`, you must set the `sort_field` in `SearchOrdersSort` to
|
|
3671
|
+
* `CLOSED_AT`. Otherwise, `SearchOrders` throws an error.
|
|
3672
|
+
* [Learn more about filtering orders by time range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range)
|
|
3673
|
+
*/
|
|
3674
|
+
SearchOrdersDateTimeFilter: {
|
|
3675
|
+
/**
|
|
3676
|
+
* @description The time range for filtering on the `created_at` timestamp. If you use this
|
|
3677
|
+
* value, you must set the `sort_field` in the `OrdersSearchSort` object to
|
|
3678
|
+
* `CREATED_AT`.
|
|
3679
|
+
*/
|
|
3680
|
+
created_at?: components["schemas"]["TimeRange"];
|
|
3681
|
+
/**
|
|
3682
|
+
* @description The time range for filtering on the `updated_at` timestamp. If you use this
|
|
3683
|
+
* value, you must set the `sort_field` in the `OrdersSearchSort` object to
|
|
3684
|
+
* `UPDATED_AT`.
|
|
3685
|
+
*/
|
|
3686
|
+
updated_at?: components["schemas"]["TimeRange"];
|
|
3687
|
+
/**
|
|
3688
|
+
* @description The time range for filtering on the `closed_at` timestamp. If you use this
|
|
3689
|
+
* value, you must set the `sort_field` in the `OrdersSearchSort` object to
|
|
3690
|
+
* `CLOSED_AT`.
|
|
3691
|
+
*/
|
|
3692
|
+
closed_at?: components["schemas"]["TimeRange"];
|
|
3693
|
+
};
|
|
3694
|
+
/**
|
|
3695
|
+
* @description Filtering criteria to use for a `SearchOrders` request. Multiple filters
|
|
3696
|
+
* are ANDed together.
|
|
3697
|
+
*/
|
|
3698
|
+
SearchOrdersFilter: {
|
|
3699
|
+
/** @description Filter by [OrderState](entity:OrderState). */
|
|
3700
|
+
state_filter?: components["schemas"]["SearchOrdersStateFilter"];
|
|
3701
|
+
/**
|
|
3702
|
+
* @description Filter for results within a time range.
|
|
3703
|
+
*
|
|
3704
|
+
* __Important:__ If you filter for orders by time range, you must set `SearchOrdersSort`
|
|
3705
|
+
* to sort by the same field.
|
|
3706
|
+
* [Learn more about filtering orders by time range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range)
|
|
3707
|
+
*/
|
|
3708
|
+
date_time_filter?: components["schemas"]["SearchOrdersDateTimeFilter"];
|
|
3709
|
+
/** @description Filter by the fulfillment type or state. */
|
|
3710
|
+
fulfillment_filter?: components["schemas"]["SearchOrdersFulfillmentFilter"];
|
|
3711
|
+
/** @description Filter by the source of the order. */
|
|
3712
|
+
source_filter?: components["schemas"]["SearchOrdersSourceFilter"];
|
|
3713
|
+
/** @description Filter by customers associated with the order. */
|
|
3714
|
+
customer_filter?: components["schemas"]["SearchOrdersCustomerFilter"];
|
|
3715
|
+
};
|
|
3716
|
+
/** @description Filter based on [order fulfillment](entity:Fulfillment) information. */
|
|
3717
|
+
SearchOrdersFulfillmentFilter: {
|
|
3718
|
+
/**
|
|
3719
|
+
* @description A list of [fulfillment types](entity:FulfillmentType) to filter
|
|
3720
|
+
* for. The list returns orders if any of its fulfillments match any of the fulfillment types
|
|
3721
|
+
* listed in this field.
|
|
3722
|
+
* See [FulfillmentType](#type-fulfillmenttype) for possible values
|
|
3723
|
+
*/
|
|
3724
|
+
fulfillment_types?: components["schemas"]["FulfillmentType"][] | null;
|
|
3725
|
+
/**
|
|
3726
|
+
* @description A list of [fulfillment states](entity:FulfillmentState) to filter
|
|
3727
|
+
* for. The list returns orders if any of its fulfillments match any of the
|
|
3728
|
+
* fulfillment states listed in this field.
|
|
3729
|
+
* See [FulfillmentState](#type-fulfillmentstate) for possible values
|
|
3730
|
+
*/
|
|
3731
|
+
fulfillment_states?: components["schemas"]["FulfillmentState"][] | null;
|
|
3732
|
+
};
|
|
3733
|
+
/** @description Contains query criteria for the search. */
|
|
3734
|
+
SearchOrdersQuery: {
|
|
3735
|
+
/** @description Criteria to filter results by. */
|
|
3736
|
+
filter?: components["schemas"]["SearchOrdersFilter"];
|
|
3737
|
+
/** @description Criteria to sort results by. */
|
|
3738
|
+
sort?: components["schemas"]["SearchOrdersSort"];
|
|
3739
|
+
};
|
|
3740
|
+
/**
|
|
3741
|
+
* @example {
|
|
3742
|
+
* "limit": 3,
|
|
3743
|
+
* "location_ids": [
|
|
3744
|
+
* "057P5VYJ4A5X1",
|
|
3745
|
+
* "18YC4JDH91E1H"
|
|
3746
|
+
* ],
|
|
3747
|
+
* "query": {
|
|
3748
|
+
* "filter": {
|
|
3749
|
+
* "date_time_filter": {
|
|
3750
|
+
* "closed_at": {
|
|
3751
|
+
* "end_at": "2019-03-04T21:54:45+00:00",
|
|
3752
|
+
* "start_at": "2018-03-03T20:00:00+00:00"
|
|
3753
|
+
* }
|
|
3754
|
+
* },
|
|
3755
|
+
* "state_filter": {
|
|
3756
|
+
* "states": [
|
|
3757
|
+
* "COMPLETED"
|
|
3758
|
+
* ]
|
|
3759
|
+
* }
|
|
3760
|
+
* },
|
|
3761
|
+
* "sort": {
|
|
3762
|
+
* "sort_field": "CLOSED_AT",
|
|
3763
|
+
* "sort_order": "DESC"
|
|
3764
|
+
* }
|
|
3765
|
+
* },
|
|
3766
|
+
* "return_entries": true
|
|
3767
|
+
* }
|
|
3768
|
+
*/
|
|
3769
|
+
SearchOrdersRequest: {
|
|
3770
|
+
/**
|
|
3771
|
+
* @description The location IDs for the orders to query. All locations must belong to
|
|
3772
|
+
* the same merchant.
|
|
3773
|
+
*
|
|
3774
|
+
* Max: 10 location IDs.
|
|
3775
|
+
*/
|
|
3776
|
+
location_ids?: string[];
|
|
3777
|
+
/**
|
|
3778
|
+
* @description A pagination cursor returned by a previous call to this endpoint.
|
|
3779
|
+
* Provide this cursor to retrieve the next set of results for your original query.
|
|
3780
|
+
* For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
|
|
3781
|
+
*/
|
|
3782
|
+
cursor?: string;
|
|
3783
|
+
/**
|
|
3784
|
+
* @description Query conditions used to filter or sort the results. Note that when
|
|
3785
|
+
* retrieving additional pages using a cursor, you must use the original query.
|
|
3786
|
+
*/
|
|
3787
|
+
query?: components["schemas"]["SearchOrdersQuery"];
|
|
3788
|
+
/**
|
|
3789
|
+
* @description The maximum number of results to be returned in a single page.
|
|
3790
|
+
*
|
|
3791
|
+
* Default: `500`
|
|
3792
|
+
* Max: `1000`
|
|
3793
|
+
*/
|
|
3794
|
+
limit?: number;
|
|
3795
|
+
/**
|
|
3796
|
+
* @description A Boolean that controls the format of the search results. If `true`,
|
|
3797
|
+
* `SearchOrders` returns [OrderEntry](entity:OrderEntry) objects. If `false`, `SearchOrders`
|
|
3798
|
+
* returns complete order objects.
|
|
3799
|
+
*
|
|
3800
|
+
* Default: `false`.
|
|
3801
|
+
*/
|
|
3802
|
+
return_entries?: boolean;
|
|
3803
|
+
};
|
|
3804
|
+
/**
|
|
3805
|
+
* @description Either the `order_entries` or `orders` field is set, depending on whether
|
|
3806
|
+
* `return_entries` is set on the [SearchOrdersRequest](api-endpoint:Orders-SearchOrders).
|
|
3807
|
+
* @example {
|
|
3808
|
+
* "cursor": "123",
|
|
3809
|
+
* "order_entries": [
|
|
3810
|
+
* {
|
|
3811
|
+
* "location_id": "057P5VYJ4A5X1",
|
|
3812
|
+
* "order_id": "CAISEM82RcpmcFBM0TfOyiHV3es",
|
|
3813
|
+
* "version": 1
|
|
3814
|
+
* },
|
|
3815
|
+
* {
|
|
3816
|
+
* "location_id": "18YC4JDH91E1H",
|
|
3817
|
+
* "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY"
|
|
3818
|
+
* },
|
|
3819
|
+
* {
|
|
3820
|
+
* "location_id": "057P5VYJ4A5X1",
|
|
3821
|
+
* "order_id": "CAISEM52YcpmcWAzERDOyiWS3ty"
|
|
3822
|
+
* }
|
|
3823
|
+
* ]
|
|
3824
|
+
* }
|
|
3825
|
+
*/
|
|
3826
|
+
SearchOrdersResponse: {
|
|
3827
|
+
/**
|
|
3828
|
+
* @description A list of [OrderEntries](entity:OrderEntry) that fit the query
|
|
3829
|
+
* conditions. The list is populated only if `return_entries` is set to `true` in the request.
|
|
3830
|
+
*/
|
|
3831
|
+
order_entries?: components["schemas"]["OrderEntry"][];
|
|
3832
|
+
/**
|
|
3833
|
+
* @description A list of
|
|
3834
|
+
* [Order](entity:Order) objects that match the query conditions. The list is populated only if
|
|
3835
|
+
* `return_entries` is set to `false` in the request.
|
|
3836
|
+
*/
|
|
3837
|
+
orders?: components["schemas"]["Order"][];
|
|
3838
|
+
/**
|
|
3839
|
+
* @description The pagination cursor to be used in a subsequent request. If unset,
|
|
3840
|
+
* this is the final response.
|
|
3841
|
+
* For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
|
|
3842
|
+
*/
|
|
3843
|
+
cursor?: string;
|
|
3844
|
+
/** @description [Errors](entity:Error) encountered during the search. */
|
|
3845
|
+
errors?: components["schemas"]["Error"][];
|
|
3846
|
+
};
|
|
3847
|
+
/**
|
|
3848
|
+
* @description Sorting criteria for a `SearchOrders` request. Results can only be sorted
|
|
3849
|
+
* by a timestamp field.
|
|
3850
|
+
*/
|
|
3851
|
+
SearchOrdersSort: {
|
|
3852
|
+
/**
|
|
3853
|
+
* @description The field to sort by.
|
|
3854
|
+
*
|
|
3855
|
+
* __Important:__ When using a [DateTimeFilter](entity:SearchOrdersFilter),
|
|
3856
|
+
* `sort_field` must match the timestamp field that the `DateTimeFilter` uses to
|
|
3857
|
+
* filter. For example, if you set your `sort_field` to `CLOSED_AT` and you use a
|
|
3858
|
+
* `DateTimeFilter`, your `DateTimeFilter` must filter for orders by their `CLOSED_AT` date.
|
|
3859
|
+
* If this field does not match the timestamp field in `DateTimeFilter`,
|
|
3860
|
+
* `SearchOrders` returns an error.
|
|
3861
|
+
*
|
|
3862
|
+
* Default: `CREATED_AT`.
|
|
3863
|
+
* See [SearchOrdersSortField](#type-searchorderssortfield) for possible values
|
|
3864
|
+
*/
|
|
3865
|
+
sort_field: components["schemas"]["SearchOrdersSortField"];
|
|
3866
|
+
/**
|
|
3867
|
+
* @description The chronological order in which results are returned. Defaults to `DESC`.
|
|
3868
|
+
* See [SortOrder](#type-sortorder) for possible values
|
|
3869
|
+
*/
|
|
3870
|
+
sort_order?: components["schemas"]["SortOrder"];
|
|
3871
|
+
};
|
|
3872
|
+
/**
|
|
3873
|
+
* @description Specifies which timestamp to use to sort `SearchOrder` results.
|
|
3874
|
+
* @enum {string}
|
|
3875
|
+
*/
|
|
3876
|
+
SearchOrdersSortField: "CREATED_AT" | "UPDATED_AT" | "CLOSED_AT";
|
|
3877
|
+
/** @description A filter based on order `source` information. */
|
|
3878
|
+
SearchOrdersSourceFilter: {
|
|
3879
|
+
/**
|
|
3880
|
+
* @description Filters by the [Source](entity:OrderSource) `name`. The filter returns any orders
|
|
3881
|
+
* with a `source.name` that matches any of the listed source names.
|
|
3882
|
+
*
|
|
3883
|
+
* Max: 10 source names.
|
|
3884
|
+
*/
|
|
3885
|
+
source_names?: string[] | null;
|
|
3886
|
+
};
|
|
3887
|
+
/** @description Filter by the current order `state`. */
|
|
3888
|
+
SearchOrdersStateFilter: {
|
|
3889
|
+
/**
|
|
3890
|
+
* @description States to filter for.
|
|
3891
|
+
* See [OrderState](#type-orderstate) for possible values
|
|
3892
|
+
*/
|
|
3893
|
+
states: components["schemas"]["OrderState"][];
|
|
3894
|
+
};
|
|
3895
|
+
/**
|
|
3896
|
+
* @description The order (e.g., chronological or alphabetical) in which results from a request are returned.
|
|
3897
|
+
* @enum {string}
|
|
3898
|
+
*/
|
|
3899
|
+
SortOrder: "DESC" | "ASC";
|
|
3900
|
+
/** @description Additional details about Square Account payments. */
|
|
3901
|
+
SquareAccountDetails: {
|
|
3902
|
+
/** @description Unique identifier for the payment source used for this payment. */
|
|
3903
|
+
payment_source_token?: string | null;
|
|
3904
|
+
/** @description Information about errors encountered during the request. */
|
|
3905
|
+
errors?: components["schemas"]["Error"][] | null;
|
|
3906
|
+
};
|
|
3907
|
+
/** @description Identifiers for the location used by various governments for tax purposes. */
|
|
3908
|
+
TaxIds: {
|
|
3909
|
+
/**
|
|
3910
|
+
* @description The EU VAT number for this location. For example, `IE3426675K`.
|
|
3911
|
+
* If the EU VAT number is present, it is well-formed and has been
|
|
3912
|
+
* validated with VIES, the VAT Information Exchange System.
|
|
3913
|
+
*/
|
|
3914
|
+
readonly eu_vat?: string;
|
|
3915
|
+
/**
|
|
3916
|
+
* @description The SIRET (Système d'Identification du Répertoire des Entreprises et de leurs Etablissements)
|
|
3917
|
+
* number is a 14-digit code issued by the French INSEE. For example, `39922799000021`.
|
|
3918
|
+
*/
|
|
3919
|
+
readonly fr_siret?: string;
|
|
3920
|
+
/**
|
|
3921
|
+
* @description The French government uses the NAF (Nomenclature des Activités Françaises) to display and
|
|
3922
|
+
* track economic statistical data. This is also called the APE (Activite Principale de l’Entreprise) code.
|
|
3923
|
+
* For example, `6910Z`.
|
|
3924
|
+
*/
|
|
3925
|
+
readonly fr_naf?: string;
|
|
3926
|
+
/**
|
|
3927
|
+
* @description The NIF (Numero de Identificacion Fiscal) number is a nine-character tax identifier used in Spain.
|
|
3928
|
+
* If it is present, it has been validated. For example, `73628495A`.
|
|
3929
|
+
*/
|
|
3930
|
+
readonly es_nif?: string;
|
|
3931
|
+
/**
|
|
3932
|
+
* @description The QII (Qualified Invoice Issuer) number is a 14-character tax identifier used in Japan.
|
|
3933
|
+
* For example, `T1234567890123`.
|
|
3934
|
+
*/
|
|
3935
|
+
readonly jp_qii?: string;
|
|
3936
|
+
};
|
|
3937
|
+
/** @description Represents a tender (i.e., a method of payment) used in a Square transaction. */
|
|
3938
|
+
Tender: {
|
|
3939
|
+
/** @description The tender's unique ID. It is the associated payment ID. */
|
|
3940
|
+
id?: string;
|
|
3941
|
+
/** @description The ID of the transaction's associated location. */
|
|
3942
|
+
location_id?: string | null;
|
|
3943
|
+
/** @description The ID of the tender's associated transaction. */
|
|
3944
|
+
transaction_id?: string | null;
|
|
3945
|
+
/** @description The timestamp for when the tender was created, in RFC 3339 format. */
|
|
3946
|
+
readonly created_at?: string;
|
|
3947
|
+
/** @description An optional note associated with the tender at the time of payment. */
|
|
3948
|
+
note?: string | null;
|
|
3949
|
+
/**
|
|
3950
|
+
* @description The total amount of the tender, including `tip_money`. If the tender has a `payment_id`,
|
|
3951
|
+
* the `total_money` of the corresponding [Payment](entity:Payment) will be equal to the
|
|
3952
|
+
* `amount_money` of the tender.
|
|
3953
|
+
*/
|
|
3954
|
+
amount_money?: components["schemas"]["Money"];
|
|
3955
|
+
/** @description The tip's amount of the tender. */
|
|
3956
|
+
tip_money?: components["schemas"]["Money"];
|
|
3957
|
+
/**
|
|
3958
|
+
* @description The amount of any Square processing fees applied to the tender.
|
|
3959
|
+
*
|
|
3960
|
+
* This field is not immediately populated when a new transaction is created.
|
|
3961
|
+
* It is usually available after about ten seconds.
|
|
3962
|
+
*/
|
|
3963
|
+
processing_fee_money?: components["schemas"]["Money"];
|
|
3964
|
+
/**
|
|
3965
|
+
* @description If the tender is associated with a customer or represents a customer's card on file,
|
|
3966
|
+
* this is the ID of the associated customer.
|
|
3967
|
+
*/
|
|
3968
|
+
customer_id?: string | null;
|
|
3969
|
+
/**
|
|
3970
|
+
* @description The type of tender, such as `CARD` or `CASH`.
|
|
3971
|
+
* See [TenderType](#type-tendertype) for possible values
|
|
3972
|
+
*/
|
|
3973
|
+
type: components["schemas"]["TenderType"];
|
|
3974
|
+
/**
|
|
3975
|
+
* @description The details of the card tender.
|
|
3976
|
+
*
|
|
3977
|
+
* This value is present only if the value of `type` is `CARD`.
|
|
3978
|
+
*/
|
|
3979
|
+
card_details?: components["schemas"]["TenderCardDetails"];
|
|
3980
|
+
/**
|
|
3981
|
+
* @description The details of the cash tender.
|
|
3982
|
+
*
|
|
3983
|
+
* This value is present only if the value of `type` is `CASH`.
|
|
3984
|
+
*/
|
|
3985
|
+
cash_details?: components["schemas"]["TenderCashDetails"];
|
|
3986
|
+
/**
|
|
3987
|
+
* @description The details of the bank account tender.
|
|
3988
|
+
*
|
|
3989
|
+
* This value is present only if the value of `type` is `BANK_ACCOUNT`.
|
|
3990
|
+
*/
|
|
3991
|
+
bank_account_details?: components["schemas"]["TenderBankAccountDetails"];
|
|
3992
|
+
/**
|
|
3993
|
+
* @description The details of a Buy Now Pay Later tender.
|
|
3994
|
+
*
|
|
3995
|
+
* This value is present only if the value of `type` is `BUY_NOW_PAY_LATER`.
|
|
3996
|
+
*/
|
|
3997
|
+
buy_now_pay_later_details?: components["schemas"]["TenderBuyNowPayLaterDetails"];
|
|
3998
|
+
/**
|
|
3999
|
+
* @description The details of a Square Account tender.
|
|
4000
|
+
*
|
|
4001
|
+
* This value is present only if the value of `type` is `SQUARE_ACCOUNT`.
|
|
4002
|
+
*/
|
|
4003
|
+
square_account_details?: components["schemas"]["TenderSquareAccountDetails"];
|
|
4004
|
+
/**
|
|
4005
|
+
* @description Additional recipients (other than the merchant) receiving a portion of this tender.
|
|
4006
|
+
* For example, fees assessed on the purchase by a third party integration.
|
|
4007
|
+
*/
|
|
4008
|
+
additional_recipients?: components["schemas"]["AdditionalRecipient"][] | null;
|
|
4009
|
+
/**
|
|
4010
|
+
* @description The ID of the [Payment](entity:Payment) that corresponds to this tender.
|
|
4011
|
+
* This value is only present for payments created with the v2 Payments API.
|
|
4012
|
+
*/
|
|
4013
|
+
payment_id?: string | null;
|
|
4014
|
+
};
|
|
4015
|
+
/**
|
|
4016
|
+
* @description Represents the details of a tender with `type` `BANK_ACCOUNT`.
|
|
4017
|
+
*
|
|
4018
|
+
* See [BankAccountPaymentDetails](entity:BankAccountPaymentDetails)
|
|
4019
|
+
* for more exposed details of a bank account payment.
|
|
4020
|
+
*/
|
|
4021
|
+
TenderBankAccountDetails: {
|
|
4022
|
+
/**
|
|
4023
|
+
* @description The bank account payment's current state.
|
|
4024
|
+
*
|
|
4025
|
+
* See [TenderBankAccountPaymentDetailsStatus](entity:TenderBankAccountDetailsStatus) for possible values.
|
|
4026
|
+
* See [TenderBankAccountDetailsStatus](#type-tenderbankaccountdetailsstatus) for possible values
|
|
4027
|
+
*/
|
|
4028
|
+
status?: components["schemas"]["TenderBankAccountDetailsStatus"];
|
|
4029
|
+
};
|
|
4030
|
+
/**
|
|
4031
|
+
* @description Indicates the bank account payment's current status.
|
|
4032
|
+
* @enum {string}
|
|
4033
|
+
*/
|
|
4034
|
+
TenderBankAccountDetailsStatus: "PENDING" | "COMPLETED" | "FAILED";
|
|
4035
|
+
/** @description Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`. */
|
|
4036
|
+
TenderBuyNowPayLaterDetails: {
|
|
4037
|
+
/**
|
|
4038
|
+
* @description The Buy Now Pay Later brand.
|
|
4039
|
+
* See [Brand](#type-brand) for possible values
|
|
4040
|
+
*/
|
|
4041
|
+
readonly buy_now_pay_later_brand?: components["schemas"]["TenderBuyNowPayLaterDetailsBrand"];
|
|
4042
|
+
/**
|
|
4043
|
+
* @description The buy now pay later payment's current state (such as `AUTHORIZED` or
|
|
4044
|
+
* `CAPTURED`). See [TenderBuyNowPayLaterDetailsStatus](entity:TenderBuyNowPayLaterDetailsStatus)
|
|
4045
|
+
* for possible values.
|
|
4046
|
+
* See [Status](#type-status) for possible values
|
|
4047
|
+
*/
|
|
4048
|
+
status?: components["schemas"]["TenderBuyNowPayLaterDetailsStatus"];
|
|
4049
|
+
};
|
|
4050
|
+
/** @enum {string} */
|
|
4051
|
+
TenderBuyNowPayLaterDetailsBrand: "OTHER_BRAND" | "AFTERPAY";
|
|
4052
|
+
/** @enum {string} */
|
|
4053
|
+
TenderBuyNowPayLaterDetailsStatus: "AUTHORIZED" | "CAPTURED" | "VOIDED" | "FAILED";
|
|
4054
|
+
/** @description Represents additional details of a tender with `type` `CARD` or `SQUARE_GIFT_CARD` */
|
|
4055
|
+
TenderCardDetails: {
|
|
4056
|
+
/**
|
|
4057
|
+
* @description The credit card payment's current state (such as `AUTHORIZED` or
|
|
4058
|
+
* `CAPTURED`). See [TenderCardDetailsStatus](entity:TenderCardDetailsStatus)
|
|
4059
|
+
* for possible values.
|
|
4060
|
+
* See [TenderCardDetailsStatus](#type-tendercarddetailsstatus) for possible values
|
|
4061
|
+
*/
|
|
4062
|
+
status?: components["schemas"]["TenderCardDetailsStatus"];
|
|
4063
|
+
/** @description The credit card's non-confidential details. */
|
|
4064
|
+
card?: components["schemas"]["Card"];
|
|
4065
|
+
/**
|
|
4066
|
+
* @description The method used to enter the card's details for the transaction.
|
|
4067
|
+
* See [TenderCardDetailsEntryMethod](#type-tendercarddetailsentrymethod) for possible values
|
|
4068
|
+
*/
|
|
4069
|
+
entry_method?: components["schemas"]["TenderCardDetailsEntryMethod"];
|
|
4070
|
+
};
|
|
4071
|
+
/**
|
|
4072
|
+
* @description Indicates the method used to enter the card's details.
|
|
4073
|
+
* @enum {string}
|
|
4074
|
+
*/
|
|
4075
|
+
TenderCardDetailsEntryMethod: "SWIPED" | "KEYED" | "EMV" | "ON_FILE" | "CONTACTLESS";
|
|
4076
|
+
/**
|
|
4077
|
+
* @description Indicates the card transaction's current status.
|
|
4078
|
+
* @enum {string}
|
|
4079
|
+
*/
|
|
4080
|
+
TenderCardDetailsStatus: "AUTHORIZED" | "CAPTURED" | "VOIDED" | "FAILED";
|
|
4081
|
+
/** @description Represents the details of a tender with `type` `CASH`. */
|
|
4082
|
+
TenderCashDetails: {
|
|
4083
|
+
/** @description The total amount of cash provided by the buyer, before change is given. */
|
|
4084
|
+
buyer_tendered_money?: components["schemas"]["Money"];
|
|
4085
|
+
/** @description The amount of change returned to the buyer. */
|
|
4086
|
+
change_back_money?: components["schemas"]["Money"];
|
|
4087
|
+
};
|
|
4088
|
+
/** @description Represents the details of a tender with `type` `SQUARE_ACCOUNT`. */
|
|
4089
|
+
TenderSquareAccountDetails: {
|
|
4090
|
+
/**
|
|
4091
|
+
* @description The Square Account payment's current state (such as `AUTHORIZED` or
|
|
4092
|
+
* `CAPTURED`). See [TenderSquareAccountDetailsStatus](entity:TenderSquareAccountDetailsStatus)
|
|
4093
|
+
* for possible values.
|
|
4094
|
+
* See [Status](#type-status) for possible values
|
|
4095
|
+
*/
|
|
4096
|
+
status?: components["schemas"]["TenderSquareAccountDetailsStatus"];
|
|
4097
|
+
};
|
|
4098
|
+
/** @enum {string} */
|
|
4099
|
+
TenderSquareAccountDetailsStatus: "AUTHORIZED" | "CAPTURED" | "VOIDED" | "FAILED";
|
|
4100
|
+
/**
|
|
4101
|
+
* @description Indicates a tender's type.
|
|
4102
|
+
* @enum {string}
|
|
4103
|
+
*/
|
|
4104
|
+
TenderType: "CARD" | "CASH" | "THIRD_PARTY_CARD" | "SQUARE_GIFT_CARD" | "NO_SALE" | "BANK_ACCOUNT" | "WALLET" | "BUY_NOW_PAY_LATER" | "SQUARE_ACCOUNT" | "OTHER";
|
|
4105
|
+
/**
|
|
4106
|
+
* @description Represents a generic time range. The start and end values are
|
|
4107
|
+
* represented in RFC 3339 format. Time ranges are customized to be
|
|
4108
|
+
* inclusive or exclusive based on the needs of a particular endpoint.
|
|
4109
|
+
* Refer to the relevant endpoint-specific documentation to determine
|
|
4110
|
+
* how time ranges are handled.
|
|
4111
|
+
*/
|
|
4112
|
+
TimeRange: {
|
|
4113
|
+
/**
|
|
4114
|
+
* @description A datetime value in RFC 3339 format indicating when the time range
|
|
4115
|
+
* starts.
|
|
4116
|
+
*/
|
|
4117
|
+
start_at?: string | null;
|
|
4118
|
+
/**
|
|
4119
|
+
* @description A datetime value in RFC 3339 format indicating when the time range
|
|
4120
|
+
* ends.
|
|
4121
|
+
*/
|
|
4122
|
+
end_at?: string | null;
|
|
4123
|
+
};
|
|
4124
|
+
};
|
|
4125
|
+
responses: never;
|
|
4126
|
+
parameters: never;
|
|
4127
|
+
requestBodies: never;
|
|
4128
|
+
headers: never;
|
|
4129
|
+
pathItems: never;
|
|
4130
|
+
};
|
|
4131
|
+
export type SchemaAchDetails = components["schemas"]["ACHDetails"];
|
|
4132
|
+
export type SchemaAdditionalRecipient = components["schemas"]["AdditionalRecipient"];
|
|
4133
|
+
export type SchemaAddress = components["schemas"]["Address"];
|
|
4134
|
+
export type SchemaAfterpayDetails = components["schemas"]["AfterpayDetails"];
|
|
4135
|
+
export type SchemaApplicationDetails = components["schemas"]["ApplicationDetails"];
|
|
4136
|
+
export type SchemaApplicationDetailsExternalSquareProduct = components["schemas"]["ApplicationDetailsExternalSquareProduct"];
|
|
4137
|
+
export type SchemaBankAccountPaymentDetails = components["schemas"]["BankAccountPaymentDetails"];
|
|
4138
|
+
export type SchemaBusinessHours = components["schemas"]["BusinessHours"];
|
|
4139
|
+
export type SchemaBusinessHoursPeriod = components["schemas"]["BusinessHoursPeriod"];
|
|
4140
|
+
export type SchemaBuyNowPayLaterDetails = components["schemas"]["BuyNowPayLaterDetails"];
|
|
4141
|
+
export type SchemaCard = components["schemas"]["Card"];
|
|
4142
|
+
export type SchemaCardBrand = components["schemas"]["CardBrand"];
|
|
4143
|
+
export type SchemaCardCoBrand = components["schemas"]["CardCoBrand"];
|
|
4144
|
+
export type SchemaCardIssuerAlert = components["schemas"]["CardIssuerAlert"];
|
|
4145
|
+
export type SchemaCardPaymentDetails = components["schemas"]["CardPaymentDetails"];
|
|
4146
|
+
export type SchemaCardPaymentTimeline = components["schemas"]["CardPaymentTimeline"];
|
|
4147
|
+
export type SchemaCardPrepaidType = components["schemas"]["CardPrepaidType"];
|
|
4148
|
+
export type SchemaCardSurchargeDetails = components["schemas"]["CardSurchargeDetails"];
|
|
4149
|
+
export type SchemaCardType = components["schemas"]["CardType"];
|
|
4150
|
+
export type SchemaCashAppDetails = components["schemas"]["CashAppDetails"];
|
|
4151
|
+
export type SchemaCashPaymentDetails = components["schemas"]["CashPaymentDetails"];
|
|
4152
|
+
export type SchemaClearpayDetails = components["schemas"]["ClearpayDetails"];
|
|
4153
|
+
export type SchemaCoordinates = components["schemas"]["Coordinates"];
|
|
4154
|
+
export type SchemaCountry = components["schemas"]["Country"];
|
|
4155
|
+
export type SchemaCurrency = components["schemas"]["Currency"];
|
|
4156
|
+
export type SchemaCustomer = components["schemas"]["Customer"];
|
|
4157
|
+
export type SchemaCustomerCreationSource = components["schemas"]["CustomerCreationSource"];
|
|
4158
|
+
export type SchemaCustomerPreferences = components["schemas"]["CustomerPreferences"];
|
|
4159
|
+
export type SchemaCustomerSortField = components["schemas"]["CustomerSortField"];
|
|
4160
|
+
export type SchemaCustomerTaxIds = components["schemas"]["CustomerTaxIds"];
|
|
4161
|
+
export type SchemaDayOfWeek = components["schemas"]["DayOfWeek"];
|
|
4162
|
+
export type SchemaDestinationDetails = components["schemas"]["DestinationDetails"];
|
|
4163
|
+
export type SchemaDestinationDetailsCardRefundDetails = components["schemas"]["DestinationDetailsCardRefundDetails"];
|
|
4164
|
+
export type SchemaDestinationDetailsCashRefundDetails = components["schemas"]["DestinationDetailsCashRefundDetails"];
|
|
4165
|
+
export type SchemaDestinationDetailsExternalRefundDetails = components["schemas"]["DestinationDetailsExternalRefundDetails"];
|
|
4166
|
+
export type SchemaDeviceDetails = components["schemas"]["DeviceDetails"];
|
|
4167
|
+
export type SchemaDigitalWalletDetails = components["schemas"]["DigitalWalletDetails"];
|
|
4168
|
+
export type SchemaElectronicMoneyDetails = components["schemas"]["ElectronicMoneyDetails"];
|
|
4169
|
+
export type SchemaError = components["schemas"]["Error"];
|
|
4170
|
+
export type SchemaErrorCategory = components["schemas"]["ErrorCategory"];
|
|
4171
|
+
export type SchemaErrorCode = components["schemas"]["ErrorCode"];
|
|
4172
|
+
export type SchemaExternalPaymentDetails = components["schemas"]["ExternalPaymentDetails"];
|
|
4173
|
+
export type SchemaFelicaDetails = components["schemas"]["FelicaDetails"];
|
|
4174
|
+
export type SchemaFelicaDetailsFelicaBrand = components["schemas"]["FelicaDetailsFelicaBrand"];
|
|
4175
|
+
export type SchemaFulfillment = components["schemas"]["Fulfillment"];
|
|
4176
|
+
export type SchemaFulfillmentDeliveryDetails = components["schemas"]["FulfillmentDeliveryDetails"];
|
|
4177
|
+
export type SchemaFulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType = components["schemas"]["FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType"];
|
|
4178
|
+
export type SchemaFulfillmentFulfillmentEntry = components["schemas"]["FulfillmentFulfillmentEntry"];
|
|
4179
|
+
export type SchemaFulfillmentFulfillmentLineItemApplication = components["schemas"]["FulfillmentFulfillmentLineItemApplication"];
|
|
4180
|
+
export type SchemaFulfillmentInStoreDetails = components["schemas"]["FulfillmentInStoreDetails"];
|
|
4181
|
+
export type SchemaFulfillmentPickupDetails = components["schemas"]["FulfillmentPickupDetails"];
|
|
4182
|
+
export type SchemaFulfillmentPickupDetailsCurbsidePickupDetails = components["schemas"]["FulfillmentPickupDetailsCurbsidePickupDetails"];
|
|
4183
|
+
export type SchemaFulfillmentPickupDetailsScheduleType = components["schemas"]["FulfillmentPickupDetailsScheduleType"];
|
|
4184
|
+
export type SchemaFulfillmentRecipient = components["schemas"]["FulfillmentRecipient"];
|
|
4185
|
+
export type SchemaFulfillmentShipmentDetails = components["schemas"]["FulfillmentShipmentDetails"];
|
|
4186
|
+
export type SchemaFulfillmentState = components["schemas"]["FulfillmentState"];
|
|
4187
|
+
export type SchemaFulfillmentType = components["schemas"]["FulfillmentType"];
|
|
4188
|
+
export type SchemaLightningDetails = components["schemas"]["LightningDetails"];
|
|
4189
|
+
export type SchemaListCustomersResponse = components["schemas"]["ListCustomersResponse"];
|
|
4190
|
+
export type SchemaListLocationsResponse = components["schemas"]["ListLocationsResponse"];
|
|
4191
|
+
export type SchemaListPaymentRefundsRequestSortField = components["schemas"]["ListPaymentRefundsRequestSortField"];
|
|
4192
|
+
export type SchemaListPaymentRefundsResponse = components["schemas"]["ListPaymentRefundsResponse"];
|
|
4193
|
+
export type SchemaListPaymentsRequestSortField = components["schemas"]["ListPaymentsRequestSortField"];
|
|
4194
|
+
export type SchemaListPaymentsResponse = components["schemas"]["ListPaymentsResponse"];
|
|
4195
|
+
export type SchemaLocation = components["schemas"]["Location"];
|
|
4196
|
+
export type SchemaLocationCapability = components["schemas"]["LocationCapability"];
|
|
4197
|
+
export type SchemaLocationStatus = components["schemas"]["LocationStatus"];
|
|
4198
|
+
export type SchemaLocationType = components["schemas"]["LocationType"];
|
|
4199
|
+
export type SchemaMeasurementUnit = components["schemas"]["MeasurementUnit"];
|
|
4200
|
+
export type SchemaMeasurementUnitArea = components["schemas"]["MeasurementUnitArea"];
|
|
4201
|
+
export type SchemaMeasurementUnitCustom = components["schemas"]["MeasurementUnitCustom"];
|
|
4202
|
+
export type SchemaMeasurementUnitGeneric = components["schemas"]["MeasurementUnitGeneric"];
|
|
4203
|
+
export type SchemaMeasurementUnitLength = components["schemas"]["MeasurementUnitLength"];
|
|
4204
|
+
export type SchemaMeasurementUnitTime = components["schemas"]["MeasurementUnitTime"];
|
|
4205
|
+
export type SchemaMeasurementUnitUnitType = components["schemas"]["MeasurementUnitUnitType"];
|
|
4206
|
+
export type SchemaMeasurementUnitVolume = components["schemas"]["MeasurementUnitVolume"];
|
|
4207
|
+
export type SchemaMeasurementUnitWeight = components["schemas"]["MeasurementUnitWeight"];
|
|
4208
|
+
export type SchemaMoney = components["schemas"]["Money"];
|
|
4209
|
+
export type SchemaOfflinePaymentDetails = components["schemas"]["OfflinePaymentDetails"];
|
|
4210
|
+
export type SchemaOrder = components["schemas"]["Order"];
|
|
4211
|
+
export type SchemaOrderEntry = components["schemas"]["OrderEntry"];
|
|
4212
|
+
export type SchemaOrderLineItem = components["schemas"]["OrderLineItem"];
|
|
4213
|
+
export type SchemaOrderLineItemAppliedDiscount = components["schemas"]["OrderLineItemAppliedDiscount"];
|
|
4214
|
+
export type SchemaOrderLineItemAppliedServiceCharge = components["schemas"]["OrderLineItemAppliedServiceCharge"];
|
|
4215
|
+
export type SchemaOrderLineItemAppliedTax = components["schemas"]["OrderLineItemAppliedTax"];
|
|
4216
|
+
export type SchemaOrderLineItemDiscount = components["schemas"]["OrderLineItemDiscount"];
|
|
4217
|
+
export type SchemaOrderLineItemDiscountScope = components["schemas"]["OrderLineItemDiscountScope"];
|
|
4218
|
+
export type SchemaOrderLineItemDiscountType = components["schemas"]["OrderLineItemDiscountType"];
|
|
4219
|
+
export type SchemaOrderLineItemItemType = components["schemas"]["OrderLineItemItemType"];
|
|
4220
|
+
export type SchemaOrderLineItemModifier = components["schemas"]["OrderLineItemModifier"];
|
|
4221
|
+
export type SchemaOrderLineItemPricingBlocklists = components["schemas"]["OrderLineItemPricingBlocklists"];
|
|
4222
|
+
export type SchemaOrderLineItemPricingBlocklistsBlockedDiscount = components["schemas"]["OrderLineItemPricingBlocklistsBlockedDiscount"];
|
|
4223
|
+
export type SchemaOrderLineItemPricingBlocklistsBlockedServiceCharge = components["schemas"]["OrderLineItemPricingBlocklistsBlockedServiceCharge"];
|
|
4224
|
+
export type SchemaOrderLineItemPricingBlocklistsBlockedTax = components["schemas"]["OrderLineItemPricingBlocklistsBlockedTax"];
|
|
4225
|
+
export type SchemaOrderLineItemTax = components["schemas"]["OrderLineItemTax"];
|
|
4226
|
+
export type SchemaOrderLineItemTaxScope = components["schemas"]["OrderLineItemTaxScope"];
|
|
4227
|
+
export type SchemaOrderLineItemTaxType = components["schemas"]["OrderLineItemTaxType"];
|
|
4228
|
+
export type SchemaOrderMoneyAmounts = components["schemas"]["OrderMoneyAmounts"];
|
|
4229
|
+
export type SchemaOrderPricingOptions = components["schemas"]["OrderPricingOptions"];
|
|
4230
|
+
export type SchemaOrderQuantityUnit = components["schemas"]["OrderQuantityUnit"];
|
|
4231
|
+
export type SchemaOrderReturn = components["schemas"]["OrderReturn"];
|
|
4232
|
+
export type SchemaOrderReturnDiscount = components["schemas"]["OrderReturnDiscount"];
|
|
4233
|
+
export type SchemaOrderReturnLineItem = components["schemas"]["OrderReturnLineItem"];
|
|
4234
|
+
export type SchemaOrderReturnLineItemModifier = components["schemas"]["OrderReturnLineItemModifier"];
|
|
4235
|
+
export type SchemaOrderReturnServiceCharge = components["schemas"]["OrderReturnServiceCharge"];
|
|
4236
|
+
export type SchemaOrderReturnTax = components["schemas"]["OrderReturnTax"];
|
|
4237
|
+
export type SchemaOrderReturnTip = components["schemas"]["OrderReturnTip"];
|
|
4238
|
+
export type SchemaOrderReward = components["schemas"]["OrderReward"];
|
|
4239
|
+
export type SchemaOrderRoundingAdjustment = components["schemas"]["OrderRoundingAdjustment"];
|
|
4240
|
+
export type SchemaOrderServiceCharge = components["schemas"]["OrderServiceCharge"];
|
|
4241
|
+
export type SchemaOrderServiceChargeCalculationPhase = components["schemas"]["OrderServiceChargeCalculationPhase"];
|
|
4242
|
+
export type SchemaOrderServiceChargeScope = components["schemas"]["OrderServiceChargeScope"];
|
|
4243
|
+
export type SchemaOrderServiceChargeTreatmentType = components["schemas"]["OrderServiceChargeTreatmentType"];
|
|
4244
|
+
export type SchemaOrderServiceChargeType = components["schemas"]["OrderServiceChargeType"];
|
|
4245
|
+
export type SchemaOrderSource = components["schemas"]["OrderSource"];
|
|
4246
|
+
export type SchemaOrderState = components["schemas"]["OrderState"];
|
|
4247
|
+
export type SchemaPayment = components["schemas"]["Payment"];
|
|
4248
|
+
export type SchemaPaymentRefund = components["schemas"]["PaymentRefund"];
|
|
4249
|
+
export type SchemaProcessingFee = components["schemas"]["ProcessingFee"];
|
|
4250
|
+
export type SchemaRefund = components["schemas"]["Refund"];
|
|
4251
|
+
export type SchemaRefundStatus = components["schemas"]["RefundStatus"];
|
|
4252
|
+
export type SchemaRiskEvaluation = components["schemas"]["RiskEvaluation"];
|
|
4253
|
+
export type SchemaRiskEvaluationRiskLevel = components["schemas"]["RiskEvaluationRiskLevel"];
|
|
4254
|
+
export type SchemaSearchOrdersCustomerFilter = components["schemas"]["SearchOrdersCustomerFilter"];
|
|
4255
|
+
export type SchemaSearchOrdersDateTimeFilter = components["schemas"]["SearchOrdersDateTimeFilter"];
|
|
4256
|
+
export type SchemaSearchOrdersFilter = components["schemas"]["SearchOrdersFilter"];
|
|
4257
|
+
export type SchemaSearchOrdersFulfillmentFilter = components["schemas"]["SearchOrdersFulfillmentFilter"];
|
|
4258
|
+
export type SchemaSearchOrdersQuery = components["schemas"]["SearchOrdersQuery"];
|
|
4259
|
+
export type SchemaSearchOrdersRequest = components["schemas"]["SearchOrdersRequest"];
|
|
4260
|
+
export type SchemaSearchOrdersResponse = components["schemas"]["SearchOrdersResponse"];
|
|
4261
|
+
export type SchemaSearchOrdersSort = components["schemas"]["SearchOrdersSort"];
|
|
4262
|
+
export type SchemaSearchOrdersSortField = components["schemas"]["SearchOrdersSortField"];
|
|
4263
|
+
export type SchemaSearchOrdersSourceFilter = components["schemas"]["SearchOrdersSourceFilter"];
|
|
4264
|
+
export type SchemaSearchOrdersStateFilter = components["schemas"]["SearchOrdersStateFilter"];
|
|
4265
|
+
export type SchemaSortOrder = components["schemas"]["SortOrder"];
|
|
4266
|
+
export type SchemaSquareAccountDetails = components["schemas"]["SquareAccountDetails"];
|
|
4267
|
+
export type SchemaTaxIds = components["schemas"]["TaxIds"];
|
|
4268
|
+
export type SchemaTender = components["schemas"]["Tender"];
|
|
4269
|
+
export type SchemaTenderBankAccountDetails = components["schemas"]["TenderBankAccountDetails"];
|
|
4270
|
+
export type SchemaTenderBankAccountDetailsStatus = components["schemas"]["TenderBankAccountDetailsStatus"];
|
|
4271
|
+
export type SchemaTenderBuyNowPayLaterDetails = components["schemas"]["TenderBuyNowPayLaterDetails"];
|
|
4272
|
+
export type SchemaTenderBuyNowPayLaterDetailsBrand = components["schemas"]["TenderBuyNowPayLaterDetailsBrand"];
|
|
4273
|
+
export type SchemaTenderBuyNowPayLaterDetailsStatus = components["schemas"]["TenderBuyNowPayLaterDetailsStatus"];
|
|
4274
|
+
export type SchemaTenderCardDetails = components["schemas"]["TenderCardDetails"];
|
|
4275
|
+
export type SchemaTenderCardDetailsEntryMethod = components["schemas"]["TenderCardDetailsEntryMethod"];
|
|
4276
|
+
export type SchemaTenderCardDetailsStatus = components["schemas"]["TenderCardDetailsStatus"];
|
|
4277
|
+
export type SchemaTenderCashDetails = components["schemas"]["TenderCashDetails"];
|
|
4278
|
+
export type SchemaTenderSquareAccountDetails = components["schemas"]["TenderSquareAccountDetails"];
|
|
4279
|
+
export type SchemaTenderSquareAccountDetailsStatus = components["schemas"]["TenderSquareAccountDetailsStatus"];
|
|
4280
|
+
export type SchemaTenderType = components["schemas"]["TenderType"];
|
|
4281
|
+
export type SchemaTimeRange = components["schemas"]["TimeRange"];
|
|
4282
|
+
export type $defs = Record<string, never>;
|
|
4283
|
+
export interface operations {
|
|
4284
|
+
ListCustomers: {
|
|
4285
|
+
parameters: {
|
|
4286
|
+
query?: {
|
|
4287
|
+
/**
|
|
4288
|
+
* @description A pagination cursor returned by a previous call to this endpoint.
|
|
4289
|
+
* Provide this cursor to retrieve the next set of results for your original query.
|
|
4290
|
+
*
|
|
4291
|
+
* For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
|
|
4292
|
+
*/
|
|
4293
|
+
cursor?: string;
|
|
4294
|
+
/**
|
|
4295
|
+
* @description The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.
|
|
4296
|
+
* If the specified limit is less than 1 or greater than 100, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 100.
|
|
4297
|
+
*
|
|
4298
|
+
* For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
|
|
4299
|
+
*/
|
|
4300
|
+
limit?: number;
|
|
4301
|
+
/**
|
|
4302
|
+
* @description Indicates how customers should be sorted.
|
|
4303
|
+
*
|
|
4304
|
+
* The default value is `DEFAULT`.
|
|
4305
|
+
*/
|
|
4306
|
+
sort_field?: components["schemas"]["CustomerSortField"];
|
|
4307
|
+
/**
|
|
4308
|
+
* @description Indicates whether customers should be sorted in ascending (`ASC`) or
|
|
4309
|
+
* descending (`DESC`) order.
|
|
4310
|
+
*
|
|
4311
|
+
* The default value is `ASC`.
|
|
4312
|
+
*/
|
|
4313
|
+
sort_order?: components["schemas"]["SortOrder"];
|
|
4314
|
+
/**
|
|
4315
|
+
* @description Indicates whether to return the total count of customers in the `count` field of the response.
|
|
4316
|
+
*
|
|
4317
|
+
* The default value is `false`.
|
|
4318
|
+
*/
|
|
4319
|
+
count?: boolean;
|
|
4320
|
+
};
|
|
4321
|
+
header?: never;
|
|
4322
|
+
path?: never;
|
|
4323
|
+
cookie?: never;
|
|
4324
|
+
};
|
|
4325
|
+
requestBody?: never;
|
|
4326
|
+
responses: {
|
|
4327
|
+
/** @description Success */
|
|
4328
|
+
200: {
|
|
4329
|
+
headers: {
|
|
4330
|
+
[name: string]: unknown;
|
|
4331
|
+
};
|
|
4332
|
+
content: {
|
|
4333
|
+
"application/json": components["schemas"]["ListCustomersResponse"];
|
|
4334
|
+
};
|
|
4335
|
+
};
|
|
4336
|
+
};
|
|
4337
|
+
};
|
|
4338
|
+
ListLocations: {
|
|
4339
|
+
parameters: {
|
|
4340
|
+
query?: never;
|
|
4341
|
+
header?: never;
|
|
4342
|
+
path?: never;
|
|
4343
|
+
cookie?: never;
|
|
4344
|
+
};
|
|
4345
|
+
requestBody?: never;
|
|
4346
|
+
responses: {
|
|
4347
|
+
/** @description Success */
|
|
4348
|
+
200: {
|
|
4349
|
+
headers: {
|
|
4350
|
+
[name: string]: unknown;
|
|
4351
|
+
};
|
|
4352
|
+
content: {
|
|
4353
|
+
"application/json": components["schemas"]["ListLocationsResponse"];
|
|
4354
|
+
};
|
|
4355
|
+
};
|
|
4356
|
+
};
|
|
4357
|
+
};
|
|
4358
|
+
SearchOrders: {
|
|
4359
|
+
parameters: {
|
|
4360
|
+
query?: never;
|
|
4361
|
+
header?: never;
|
|
4362
|
+
path?: never;
|
|
4363
|
+
cookie?: never;
|
|
4364
|
+
};
|
|
4365
|
+
/**
|
|
4366
|
+
* @description An object containing the fields to POST for the request.
|
|
4367
|
+
*
|
|
4368
|
+
* See the corresponding object definition for field details.
|
|
4369
|
+
*/
|
|
4370
|
+
requestBody: {
|
|
4371
|
+
content: {
|
|
4372
|
+
"application/json": components["schemas"]["SearchOrdersRequest"];
|
|
4373
|
+
};
|
|
4374
|
+
};
|
|
4375
|
+
responses: {
|
|
4376
|
+
/** @description Success */
|
|
4377
|
+
200: {
|
|
4378
|
+
headers: {
|
|
4379
|
+
[name: string]: unknown;
|
|
4380
|
+
};
|
|
4381
|
+
content: {
|
|
4382
|
+
"application/json": components["schemas"]["SearchOrdersResponse"];
|
|
4383
|
+
};
|
|
4384
|
+
};
|
|
4385
|
+
};
|
|
4386
|
+
};
|
|
4387
|
+
ListPayments: {
|
|
4388
|
+
parameters: {
|
|
4389
|
+
query?: {
|
|
4390
|
+
/**
|
|
4391
|
+
* @description Indicates the start of the time range to retrieve payments for, in RFC 3339 format.
|
|
4392
|
+
* The range is determined using the `created_at` field for each Payment.
|
|
4393
|
+
* Inclusive. Default: The current time minus one year.
|
|
4394
|
+
*/
|
|
4395
|
+
begin_time?: string;
|
|
4396
|
+
/**
|
|
4397
|
+
* @description Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The
|
|
4398
|
+
* range is determined using the `created_at` field for each Payment.
|
|
4399
|
+
*
|
|
4400
|
+
* Default: The current time.
|
|
4401
|
+
*/
|
|
4402
|
+
end_time?: string;
|
|
4403
|
+
/**
|
|
4404
|
+
* @description The order in which results are listed by `ListPaymentsRequest.sort_field`:
|
|
4405
|
+
* - `ASC` - Oldest to newest.
|
|
4406
|
+
* - `DESC` - Newest to oldest (default).
|
|
4407
|
+
*/
|
|
4408
|
+
sort_order?: string;
|
|
4409
|
+
/**
|
|
4410
|
+
* @description A pagination cursor returned by a previous call to this endpoint.
|
|
4411
|
+
* Provide this cursor to retrieve the next set of results for the original query.
|
|
4412
|
+
*
|
|
4413
|
+
* For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
|
|
4414
|
+
*/
|
|
4415
|
+
cursor?: string;
|
|
4416
|
+
/**
|
|
4417
|
+
* @description Limit results to the location supplied. By default, results are returned
|
|
4418
|
+
* for the default (main) location associated with the seller.
|
|
4419
|
+
*/
|
|
4420
|
+
location_id?: string;
|
|
4421
|
+
/** @description The exact amount in the `total_money` for a payment. */
|
|
4422
|
+
total?: number;
|
|
4423
|
+
/** @description The last four digits of a payment card. */
|
|
4424
|
+
last_4?: string;
|
|
4425
|
+
/** @description The brand of the payment card (for example, VISA). */
|
|
4426
|
+
card_brand?: string;
|
|
4427
|
+
/**
|
|
4428
|
+
* @description The maximum number of results to be returned in a single page.
|
|
4429
|
+
* It is possible to receive fewer results than the specified limit on a given page.
|
|
4430
|
+
*
|
|
4431
|
+
* The default value of 100 is also the maximum allowed value. If the provided value is
|
|
4432
|
+
* greater than 100, it is ignored and the default value is used instead.
|
|
4433
|
+
*
|
|
4434
|
+
* Default: `100`
|
|
4435
|
+
*/
|
|
4436
|
+
limit?: number;
|
|
4437
|
+
/** @description Whether the payment was taken offline or not. */
|
|
4438
|
+
is_offline_payment?: boolean;
|
|
4439
|
+
/**
|
|
4440
|
+
* @description Indicates the start of the time range for which to retrieve offline payments, in RFC 3339
|
|
4441
|
+
* format for timestamps. The range is determined using the
|
|
4442
|
+
* `offline_payment_details.client_created_at` field for each Payment. If set, payments without a
|
|
4443
|
+
* value set in `offline_payment_details.client_created_at` will not be returned.
|
|
4444
|
+
*
|
|
4445
|
+
* Default: The current time.
|
|
4446
|
+
*/
|
|
4447
|
+
offline_begin_time?: string;
|
|
4448
|
+
/**
|
|
4449
|
+
* @description Indicates the end of the time range for which to retrieve offline payments, in RFC 3339
|
|
4450
|
+
* format for timestamps. The range is determined using the
|
|
4451
|
+
* `offline_payment_details.client_created_at` field for each Payment. If set, payments without a
|
|
4452
|
+
* value set in `offline_payment_details.client_created_at` will not be returned.
|
|
4453
|
+
*
|
|
4454
|
+
* Default: The current time.
|
|
4455
|
+
*/
|
|
4456
|
+
offline_end_time?: string;
|
|
4457
|
+
/**
|
|
4458
|
+
* @description Indicates the start of the time range to retrieve payments for, in RFC 3339 format. The
|
|
4459
|
+
* range is determined using the `updated_at` field for each Payment.
|
|
4460
|
+
*/
|
|
4461
|
+
updated_at_begin_time?: string;
|
|
4462
|
+
/**
|
|
4463
|
+
* @description Indicates the end of the time range to retrieve payments for, in RFC 3339 format. The
|
|
4464
|
+
* range is determined using the `updated_at` field for each Payment.
|
|
4465
|
+
*/
|
|
4466
|
+
updated_at_end_time?: string;
|
|
4467
|
+
/** @description The field used to sort results by. The default is `CREATED_AT`. */
|
|
4468
|
+
sort_field?: components["schemas"]["ListPaymentsRequestSortField"];
|
|
4469
|
+
};
|
|
4470
|
+
header?: never;
|
|
4471
|
+
path?: never;
|
|
4472
|
+
cookie?: never;
|
|
4473
|
+
};
|
|
4474
|
+
requestBody?: never;
|
|
4475
|
+
responses: {
|
|
4476
|
+
/** @description Success */
|
|
4477
|
+
200: {
|
|
4478
|
+
headers: {
|
|
4479
|
+
[name: string]: unknown;
|
|
4480
|
+
};
|
|
4481
|
+
content: {
|
|
4482
|
+
"application/json": components["schemas"]["ListPaymentsResponse"];
|
|
4483
|
+
};
|
|
4484
|
+
};
|
|
4485
|
+
};
|
|
4486
|
+
};
|
|
4487
|
+
ListPaymentRefunds: {
|
|
4488
|
+
parameters: {
|
|
4489
|
+
query?: {
|
|
4490
|
+
/**
|
|
4491
|
+
* @description Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339
|
|
4492
|
+
* format. The range is determined using the `created_at` field for each `PaymentRefund`.
|
|
4493
|
+
*
|
|
4494
|
+
* Default: The current time minus one year.
|
|
4495
|
+
*/
|
|
4496
|
+
begin_time?: string;
|
|
4497
|
+
/**
|
|
4498
|
+
* @description Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339
|
|
4499
|
+
* format. The range is determined using the `created_at` field for each `PaymentRefund`.
|
|
4500
|
+
*
|
|
4501
|
+
* Default: The current time.
|
|
4502
|
+
*/
|
|
4503
|
+
end_time?: string;
|
|
4504
|
+
/**
|
|
4505
|
+
* @description The order in which results are listed by `PaymentRefund.created_at`:
|
|
4506
|
+
* - `ASC` - Oldest to newest.
|
|
4507
|
+
* - `DESC` - Newest to oldest (default).
|
|
4508
|
+
*/
|
|
4509
|
+
sort_order?: string;
|
|
4510
|
+
/**
|
|
4511
|
+
* @description A pagination cursor returned by a previous call to this endpoint.
|
|
4512
|
+
* Provide this cursor to retrieve the next set of results for the original query.
|
|
4513
|
+
*
|
|
4514
|
+
* For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
|
|
4515
|
+
*/
|
|
4516
|
+
cursor?: string;
|
|
4517
|
+
/**
|
|
4518
|
+
* @description Limit results to the location supplied. By default, results are returned
|
|
4519
|
+
* for all locations associated with the seller.
|
|
4520
|
+
*/
|
|
4521
|
+
location_id?: string;
|
|
4522
|
+
/**
|
|
4523
|
+
* @description If provided, only refunds with the given status are returned.
|
|
4524
|
+
* For a list of refund status values, see [PaymentRefund](entity:PaymentRefund).
|
|
4525
|
+
*
|
|
4526
|
+
* Default: If omitted, refunds are returned regardless of their status.
|
|
4527
|
+
*/
|
|
4528
|
+
status?: string;
|
|
4529
|
+
/**
|
|
4530
|
+
* @description If provided, only returns refunds whose payments have the indicated source type.
|
|
4531
|
+
* Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `CASH`, and `EXTERNAL`.
|
|
4532
|
+
* For information about these payment source types, see
|
|
4533
|
+
* [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).
|
|
4534
|
+
*
|
|
4535
|
+
* Default: If omitted, refunds are returned regardless of the source type.
|
|
4536
|
+
*/
|
|
4537
|
+
source_type?: string;
|
|
4538
|
+
/**
|
|
4539
|
+
* @description The maximum number of results to be returned in a single page.
|
|
4540
|
+
*
|
|
4541
|
+
* It is possible to receive fewer results than the specified limit on a given page.
|
|
4542
|
+
*
|
|
4543
|
+
* If the supplied value is greater than 100, no more than 100 results are returned.
|
|
4544
|
+
*
|
|
4545
|
+
* Default: 100
|
|
4546
|
+
*/
|
|
4547
|
+
limit?: number;
|
|
4548
|
+
/**
|
|
4549
|
+
* @description Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339
|
|
4550
|
+
* format. The range is determined using the `updated_at` field for each `PaymentRefund`.
|
|
4551
|
+
*
|
|
4552
|
+
* Default: If omitted, the time range starts at `begin_time`.
|
|
4553
|
+
*/
|
|
4554
|
+
updated_at_begin_time?: string;
|
|
4555
|
+
/**
|
|
4556
|
+
* @description Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339
|
|
4557
|
+
* format. The range is determined using the `updated_at` field for each `PaymentRefund`.
|
|
4558
|
+
*
|
|
4559
|
+
* Default: The current time.
|
|
4560
|
+
*/
|
|
4561
|
+
updated_at_end_time?: string;
|
|
4562
|
+
/** @description The field used to sort results by. The default is `CREATED_AT`. */
|
|
4563
|
+
sort_field?: components["schemas"]["ListPaymentRefundsRequestSortField"];
|
|
4564
|
+
};
|
|
4565
|
+
header?: never;
|
|
4566
|
+
path?: never;
|
|
4567
|
+
cookie?: never;
|
|
4568
|
+
};
|
|
4569
|
+
requestBody?: never;
|
|
4570
|
+
responses: {
|
|
4571
|
+
/** @description Success */
|
|
4572
|
+
200: {
|
|
4573
|
+
headers: {
|
|
4574
|
+
[name: string]: unknown;
|
|
4575
|
+
};
|
|
4576
|
+
content: {
|
|
4577
|
+
"application/json": components["schemas"]["ListPaymentRefundsResponse"];
|
|
4578
|
+
};
|
|
4579
|
+
};
|
|
4580
|
+
};
|
|
4581
|
+
};
|
|
4582
|
+
}
|
|
4583
|
+
//# sourceMappingURL=openapi.d.ts.map
|