| 1 | import type { |
| 2 | GetTerminalLocationError, |
| 3 | GetTerminalLocationRequest, |
| 4 | GetTerminalLocationResponse, |
| 5 | } from "@distilled.cloud/stripe/stripe"; |
| 6 | import type * as Effect from "effect/Effect"; |
| 7 | import * as Binding from "../Binding.ts"; |
| 8 | import type { RuntimeContext } from "../RuntimeContext.ts"; |
| 9 | import type { TerminalLocation } from "./TerminalLocation.ts"; |
| 10 | |
| 11 | export interface RetrieveTerminalLocationRequest extends Omit< |
| 12 | GetTerminalLocationRequest, |
| 13 | "location" |
| 14 | > {} |
| 15 | |
| 16 | /** |
| 17 | * Retrieve a bound Stripe Terminal Location over HTTP. |
| 18 | * |
| 19 | * ### Reading a Terminal Location |
| 20 | * **Example:** Bind and retrieve |
| 21 | * ```typescript |
| 22 | * const retrieve = yield* Stripe.RetrieveTerminalLocation(store); |
| 23 | * const live = yield* retrieve(); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | * @product Terminal |
| 28 | */ |
| 29 | export interface RetrieveTerminalLocation extends Binding.Service< |
| 30 | RetrieveTerminalLocation, |
| 31 | "Stripe.RetrieveTerminalLocation", |
| 32 | ( |
| 33 | location: TerminalLocation, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request?: RetrieveTerminalLocationRequest, |
| 37 | ) => Effect.Effect< |
| 38 | GetTerminalLocationResponse, |
| 39 | GetTerminalLocationError, |
| 40 | RuntimeContext |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | |
| 45 | export const RetrieveTerminalLocation = |
| 46 | Binding.Service<RetrieveTerminalLocation>("Stripe.RetrieveTerminalLocation"); |