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