//native
type Basistheory = {
apiKey: string;
};
/**
* Tenant Members Delete Member
* Tenant Members Delete Member
*/
export async function main(auth: Basistheory, memberId: string) {
const url = new URL(
`https://api.basistheory.com/tenants/self/members/${memberId}`,
);
const response = await fetch(url, {
method: "DELETE",
headers: {
"BT-API-KEY": auth.apiKey,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.text();
}
Submitted by hugo697 235 days ago