//native
type Basistheory = {
apiKey: string;
};
/**
* Tenants Update
* Tenants Update
*/
export async function main(
auth: Basistheory,
body: { name?: string; settings?: { ut_2?: string } },
) {
const url = new URL(`https://api.basistheory.com/tenants/self`);
const response = await fetch(url, {
method: "PUT",
headers: {
"Content-Type": "application/json",
"BT-API-KEY": auth.apiKey,
},
body: JSON.stringify(body),
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 235 days ago