Skip to content

Commit 4768860

Browse files
committed
Manage the Discount Properly
1 parent 8b089b9 commit 4768860

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@crystallize/js-api-client",
33
"license": "MIT",
4-
"version": "1.0.2",
4+
"version": "1.0.3",
55
"author": "Crystallize <[email protected]> (https://crystallize.com)",
66
"contributors": [
77
"Sébastien Morel <[email protected]>"

src/types/order.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ export const priceInputRequest = z
4141
gross: z.number().optional(),
4242
net: z.number().optional(),
4343
currency: z.string(),
44-
discount: z
45-
.object({
46-
percent: z.number().optional(),
47-
})
44+
discounts: z
45+
.array(
46+
z.object({
47+
percent: z.number().optional(),
48+
}),
49+
)
4850
.optional(),
4951
tax: z.object({
5052
name: z.string().optional(),

0 commit comments

Comments
 (0)