1import type {
2 GetCustomerTaxIdsByIdError,
3 GetCustomerTaxIdsByIdRequest,
4 TaxId as StripeTaxId,
5} from "@distilled.cloud/stripe/stripe";
6import type * as Effect from "effect/Effect";
7import * as Binding from "../Binding.ts";
8import type { RuntimeContext } from "../RuntimeContext.ts";
9import type { CustomerTaxId } from "./CustomerTaxId.ts";
10
11export interface RetrieveCustomerTaxIdRequest extends Omit<
12 GetCustomerTaxIdsByIdRequest,
13 "id" | "customer"
14> {}
15
16/**
17 * Retrieve a bound Stripe Customer Tax ID over HTTP.
18 *
19 * ### Reading a Customer Tax ID
20 * **Example:** Bind and retrieve
21 * ```typescript
22 * const retrieve = yield* Stripe.RetrieveCustomerTaxId(vat);
23 * const live = yield* retrieve();
24 * ```
25 *
26 * @binding
27 * @product Customer
28 */
29export interface RetrieveCustomerTaxId extends Binding.Service<
30 RetrieveCustomerTaxId,
31 "Stripe.RetrieveCustomerTaxId",
32 (
33 taxId: CustomerTaxId,
34 ) => Effect.Effect<
35 (
36 request?: RetrieveCustomerTaxIdRequest,
37 ) => Effect.Effect<StripeTaxId, GetCustomerTaxIdsByIdError, RuntimeContext>
38 >
39> {}
40
41export const RetrieveCustomerTaxId = Binding.Service<RetrieveCustomerTaxId>(
42 "Stripe.RetrieveCustomerTaxId",
43);