UNPKG

@lomi./sdk

Version:

Official TypeScript SDK for the lomi. API

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