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