Skip to content

Commit ef2def4

Browse files
authored
Merge pull request #2988 from Shopify/compliance/add-lineItemsRemoved-to-reprint
Add refunds data to reprint receipt input data
2 parents f66ae59 + 97adec9 commit ef2def4

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

.changeset/nervous-forks-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/ui-extensions': patch
3+
---
4+
5+
Add `refunds` and `currentQuantity` fields to Receipt Reprint LineItems

packages/ui-extensions/src/surfaces/point-of-sale/api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ export type {
9797
Address,
9898
} from './types/cart';
9999

100+
export type {OrderLineItem, LineItemRefund} from './types/order';
101+
100102
export type {DirectApiRequestBody} from './types/direct-api-request-body';
101103

102104
export type {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {BaseTransactionComplete} from '../../types/base-transaction-complete';
2-
import {LineItem} from '../../types/cart';
2+
import {OrderLineItem} from '../../types/order';
33

44
export interface ReprintReceiptData extends BaseTransactionComplete {
55
transactionType: 'Reprint';
6-
lineItems: LineItem[];
6+
lineItems: OrderLineItem[];
77
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import {LineItem} from './cart';
2+
3+
export interface LineItemRefund {
4+
createdAt: string;
5+
quantity: number;
6+
}
7+
8+
export interface OrderLineItem extends LineItem {
9+
// Number of remaining goods
10+
currentQuantity: number;
11+
refunds?: LineItemRefund[];
12+
}

0 commit comments

Comments
 (0)