Skip to content

SelectedOfferTerms

Proposed selected terms retain template identity and verify the exact total against the original unit price and bounds.

const SelectedOfferTerms: Schema.Struct<{
definition: Schema.brand<Schema.Struct<{
key: Schema.brand<Schema.String, "OfferKey">;
revision: Schema.brand<Schema.Int, "DefinitionRevision">;
purchase: Schema.Struct<{
key: Schema.brand<Schema.String, "PurchaseKey">;
revision: Schema.brand<Schema.Int, "DefinitionRevision">;
provides: Schema.$Array<Schema.toTaggedUnion<"type", readonly [..., ..., ..., ..., ..., ..., ..., ...]>>;
}>;
billing: Schema.Union<readonly [Schema.Struct<{
family: ...;
interval: ...;
meter: ...;
rate: ...;
collection: ...;
roundingScope: ...;
lateUsage: ...;
accessPolicy: ...;
type: ...;
}>, Schema.Struct<{
price: ...;
minimumQuantity: ...;
maximumQuantity: ...;
type: ...;
}>, Schema.Struct<{
family: ...;
price: ...;
minimumQuantity: ...;
maximumQuantity: ...;
interval: ...;
renewal: ...;
type: ...;
}>, Schema.Struct<{
price: ...;
type: ...;
}>, Schema.Struct<{
family: ...;
price: ...;
interval: ...;
renewal: ...;
type: ...;
}>]> & {
discriminants: readonly ["metered_subscription", "per_seat_one_time", "per_seat_subscription", "one_time", "subscription"];
cases: {
metered_subscription: Schema.Struct<{
family: Schema.brand<..., ...>;
interval: Schema.Literals<...>;
meter: Schema.Struct<...>;
rate: Schema.Struct<...>;
collection: Schema.Literal<...>;
roundingScope: Schema.Literal<...>;
lateUsage: Schema.Literal<...>;
accessPolicy: Schema.Struct<...>;
type: Schema.tag<...>;
}>;
one_time: Schema.Struct<{
price: Schema.Struct<...>;
type: Schema.tag<...>;
}>;
per_seat_one_time: Schema.Struct<{
price: Schema.Struct<...>;
minimumQuantity: Schema.brand<..., ...>;
maximumQuantity: Schema.brand<..., ...>;
type: Schema.tag<...>;
}>;
per_seat_subscription: Schema.Struct<{
family: Schema.brand<..., ...>;
price: Schema.Struct<...>;
minimumQuantity: Schema.brand<..., ...>;
maximumQuantity: Schema.brand<..., ...>;
interval: Schema.Literals<...>;
renewal: Schema.Literal<...>;
type: Schema.tag<...>;
}>;
subscription: Schema.Struct<{
family: Schema.brand<..., ...>;
price: Schema.Struct<...>;
interval: Schema.Literals<...>;
renewal: Schema.Literal<...>;
type: Schema.tag<...>;
}>;
};
isAnyOf: <Keys>(keys) => (value) => value is (...) | (...) | (...) | (...) | (...);
guards: {
metered_subscription: (u) => u is { family: ...; interval: ...; meter: ...; rate: ...; collection: ...; roundingScope: ...; lateUsage: ...; accessPolicy: ...; type: ... };
one_time: (u) => u is { price: ...; type: ... };
per_seat_one_time: (u) => u is { price: ...; minimumQuantity: ...; maximumQuantity: ...; type: ... };
per_seat_subscription: (u) => u is { family: ...; price: ...; minimumQuantity: ...; maximumQuantity: ...; interval: ...; renewal: ...; type: ... };
subscription: (u) => u is { family: ...; price: ...; interval: ...; renewal: ...; type: ... };
};
match: {
<Cases> (value, cases): Cases[keyof ...] extends (value) => R ? any : never;
<Cases> (cases): (value) => ...[...] extends (value) => ... ? any : never;
};
} & {
oneTime: (input) => Effect.Effect<typeof BillingSchema.cases.one_time.Type, Schema.SchemaError>;
subscription: (input) => Effect.Effect<typeof BillingSchema.cases.subscription.Type, Schema.SchemaError>;
perSeatOneTime: (input) => Effect.Effect<typeof BillingSchema.cases.per_seat_one_time.Type, Schema.SchemaError>;
perSeatSubscription: (input) => Effect.Effect<typeof BillingSchema.cases.per_seat_subscription.Type, Schema.SchemaError>;
meteredSubscription: (input) => Effect.Effect<typeof BillingSchema.cases.metered_subscription.Type, Schema.SchemaError>;
};
}>, "OfferTerms">;
quantity: Schema.brand<Schema.Int, "SeatCapacityQuantity">;
totalAmount: Schema.brand<Schema.BigInt, "MinorCurrencyUnits">;
}>;