Kaizen
Browse modulesPricingpricing/sharedTypes

Type Alias: OrderContext

type OrderContext = {
[key: string]: unknown;
  discount_codes?: string[];
};

Defined in: shared/pricing/types/context.ts:14

Minimal order contract the pricing engine knows about. The built-in DiscountCodeConfig resolves order.discount_codes.* by default, so orders that want to participate in discount-code matching expose the codes here.

discount_codes is optional because not every order carries one (and not every consumer surfaces them). The trailing index signature lets consumers extend order with any additional fields they need (e.g. payment_method, pass_processing_fee) without TypeScript's weak-type detection flagging the lack of overlap; the engine ignores anything not referenced by the scope mapping or a condition path.

Indexable

[key: string]: unknown

Properties

discount_codes?

optional discount_codes?: string[];

Defined in: shared/pricing/types/context.ts:15

On this page