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