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