1import { GetPlan } from "@distilled.cloud/stripe/stripe";
2import * as Layer from "effect/Layer";
3import { RetrievePlan } from "./RetrievePlan.ts";
4import { makeHttpStripeIdBinding } from "./StripeHttp.ts";
5
6/**
7 * HTTP implementation of {@link RetrievePlan}. Provide it on the
8 * Function or Worker Effect.
9 *
10 * @layer
11 * @product Product
12 * @provides Stripe.RetrievePlan
13 */
14export const RetrievePlanHttp = Layer.effect(
15 RetrievePlan,
16 makeHttpStripeIdBinding({
17 tag: "Stripe.RetrievePlan",
18 operation: GetPlan,
19 idField: "plan",
20 permissions: ["plans_read"],
21 }),
22);