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