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