Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / CouponOutcomeSchema

Variable: CouponOutcomeSchema

const CouponOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ applied: z.ZodLiteral<true>; code: z.ZodString; discount: z.ZodNumber; freeShipping: z.ZodBoolean; }, z.core.$strip>, z.ZodObject<{ applied: z.ZodLiteral<false>; code: z.ZodString; reason: z.ZodString; shortBy: z.ZodOptional<z.ZodNumber>; startsAt: z.ZodOptional<z.ZodString>; }, z.core.$strip>], "applied">

What the code the quote was asked with did: applied, or refused with the reason the order would be refused for. reason is an open string — a reason this SDK has not seen yet still validates — and shortBy / startsAt come with the reasons that have them.