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