@lomi./sdk
Version:
Official TypeScript SDK for the lomi. API
108 lines • 3.21 kB
JavaScript
import { OpenAPI } from '../core/OpenAPI.js';
import { request as __request } from '../core/request.js';
export class PayoutService {
/**
* List payouts
* Retrieve a paginated list of payouts
* @returns any Successful response
* @throws ApiError
*/
static getPayouts({ limit = 20, offset, sort, }) {
return __request(OpenAPI, {
method: 'GET',
url: '/payouts',
query: {
'limit': limit,
'offset': offset,
'sort': sort,
},
errors: {
401: `Unauthorized - Invalid or missing API key`,
500: `Internal server error`,
},
});
}
/**
* Create payout
* Create a new payout
* @returns payouts Successfully created
* @throws ApiError
*/
static postPayouts({ requestBody, }) {
return __request(OpenAPI, {
method: 'POST',
url: '/payouts',
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Bad request - Invalid input`,
401: `Unauthorized - Invalid or missing API key`,
500: `Internal server error`,
},
});
}
/**
* Get payout
* Retrieve a specific payout by ID
* @returns payouts Successful response
* @throws ApiError
*/
static getPayouts1({ payoutId, }) {
return __request(OpenAPI, {
method: 'GET',
url: '/payouts/{payout_id}',
path: {
'payout_id': payoutId,
},
errors: {
401: `Unauthorized - Invalid or missing API key`,
404: `Not found - Resource does not exist`,
500: `Internal server error`,
},
});
}
/**
* Update payout
* Update a specific payout
* @returns payouts Successfully updated
* @throws ApiError
*/
static patchPayouts({ payoutId, requestBody, }) {
return __request(OpenAPI, {
method: 'PATCH',
url: '/payouts/{payout_id}',
path: {
'payout_id': payoutId,
},
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Bad request - Invalid input`,
401: `Unauthorized - Invalid or missing API key`,
404: `Not found - Resource does not exist`,
500: `Internal server error`,
},
});
}
/**
* Delete payout
* Delete a specific payout
* @returns void
* @throws ApiError
*/
static deletePayouts({ payoutId, }) {
return __request(OpenAPI, {
method: 'DELETE',
url: '/payouts/{payout_id}',
path: {
'payout_id': payoutId,
},
errors: {
401: `Unauthorized - Invalid or missing API key`,
404: `Not found - Resource does not exist`,
500: `Internal server error`,
},
});
}
}
//# sourceMappingURL=PayoutService.js.map