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