UNPKG

@lomi./sdk

Version:

Official TypeScript SDK for the lomi. API

108 lines 3.46 kB
import { OpenAPI } from '../core/OpenAPI.js'; import { request as __request } from '../core/request.js'; export class CheckoutSessionService { /** * List checkout_sessions * Retrieve a paginated list of checkout_sessions * @returns any Successful response * @throws ApiError */ static getCheckoutSessions({ limit = 20, offset, sort, }) { return __request(OpenAPI, { method: 'GET', url: '/checkout_sessions', query: { 'limit': limit, 'offset': offset, 'sort': sort, }, errors: { 401: `Unauthorized - Invalid or missing API key`, 500: `Internal server error`, }, }); } /** * Create checkout_session * Create a new checkout_session * @returns checkout_sessions Successfully created * @throws ApiError */ static postCheckoutSessions({ requestBody, }) { return __request(OpenAPI, { method: 'POST', url: '/checkout_sessions', body: requestBody, mediaType: 'application/json', errors: { 400: `Bad request - Invalid input`, 401: `Unauthorized - Invalid or missing API key`, 500: `Internal server error`, }, }); } /** * Get checkout_session * Retrieve a specific checkout_session by ID * @returns checkout_sessions Successful response * @throws ApiError */ static getCheckoutSessions1({ sessionId, }) { return __request(OpenAPI, { method: 'GET', url: '/checkout_sessions/{session_id}', path: { 'session_id': sessionId, }, errors: { 401: `Unauthorized - Invalid or missing API key`, 404: `Not found - Resource does not exist`, 500: `Internal server error`, }, }); } /** * Update checkout_session * Update a specific checkout_session * @returns checkout_sessions Successfully updated * @throws ApiError */ static patchCheckoutSessions({ sessionId, requestBody, }) { return __request(OpenAPI, { method: 'PATCH', url: '/checkout_sessions/{session_id}', path: { 'session_id': sessionId, }, 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 checkout_session * Delete a specific checkout_session * @returns void * @throws ApiError */ static deleteCheckoutSessions({ sessionId, }) { return __request(OpenAPI, { method: 'DELETE', url: '/checkout_sessions/{session_id}', path: { 'session_id': sessionId, }, errors: { 401: `Unauthorized - Invalid or missing API key`, 404: `Not found - Resource does not exist`, 500: `Internal server error`, }, }); } } //# sourceMappingURL=CheckoutSessionService.js.map