1import type {
2 CreateTaxSettingsError,
3 CreateTaxSettingsRequest,
4 TaxSettings as StripeTaxSettings,
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 { TaxSettings } from "./TaxSettings.ts";
10
11export interface UpdateTaxSettingsRequest extends CreateTaxSettingsRequest {}
12
13/**
14 * Update bound Stripe Tax Settings over HTTP. Tax Settings is an account
15 * singleton — the update op has no id field; the bound resource associates
16 * the API key with the host. Fields Stripe has already set cannot be
17 * removed.
18 *
19 * ### Updating Tax Settings
20 * **Example:** Bind and update
21 * ```typescript
22 * const update = yield* Stripe.UpdateTaxSettings(settings);
23 * const live = yield* update({
24 * defaults: { tax_behavior: "exclusive" },
25 * });
26 * ```
27 *
28 * @binding
29 * @product Tax
30 */
31export interface UpdateTaxSettings extends Binding.Service<
32 UpdateTaxSettings,
33 "Stripe.UpdateTaxSettings",
34 (
35 settings: TaxSettings,
36 ) => Effect.Effect<
37 (
38 request?: UpdateTaxSettingsRequest,
39 ) => Effect.Effect<
40 StripeTaxSettings,
41 CreateTaxSettingsError,
42 RuntimeContext
43 >
44 >
45> {}
46
47export const UpdateTaxSettings = Binding.Service<UpdateTaxSettings>(
48 "Stripe.UpdateTaxSettings",
49);