Skip to main content
Glama

Dodo Payments

Official
by dodopayments
brands.test.ts2.67 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import DodoPayments from 'dodopayments'; const client = new DodoPayments({ bearerToken: 'My Bearer Token', baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource brands', () => { test('create', async () => { const responsePromise = client.brands.create({}); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; expect(response).not.toBeInstanceOf(Response); const dataAndResponse = await responsePromise.withResponse(); expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); test('retrieve', async () => { const responsePromise = client.brands.retrieve('id'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; expect(response).not.toBeInstanceOf(Response); const dataAndResponse = await responsePromise.withResponse(); expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); test('update', async () => { const responsePromise = client.brands.update('id', {}); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; expect(response).not.toBeInstanceOf(Response); const dataAndResponse = await responsePromise.withResponse(); expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); test('list', async () => { const responsePromise = client.brands.list(); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; expect(response).not.toBeInstanceOf(Response); const dataAndResponse = await responsePromise.withResponse(); expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); test('updateImages', async () => { const responsePromise = client.brands.updateImages('id'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; expect(response).not.toBeInstanceOf(Response); const dataAndResponse = await responsePromise.withResponse(); expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dodopayments/dodopayments-node'

If you have feedback or need assistance with the MCP directory API, please join our Discord server