UNPKG

lago-javascript-client

Version:
1,527 lines (1,526 loc) 961 kB
/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { "/billing_entities": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all billing entities * @description This endpoint returns a list of all billing entities in the organization */ get: operations["listBillingEntities"]; put?: never; /** * Create a billing entity * @description This endpoint is used to create a new billing entity */ post: operations["createBillingEntity"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/billing_entities/{code}": { parameters: { query?: never; header?: never; path: { /** @description The ID of the billing entity */ code: string; }; cookie?: never; }; /** * Retrieve a billing entity * @description This endpoint returns a specific billing entity by its code */ get: operations["getBillingEntity"]; /** * Update a billing entity * @description This endpoint is used to update an existing billing entity */ put: operations["updateBillingEntity"]; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/activity_logs": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all activity logs * @description This endpoint retrieves all existing activity logs that represent actions performed on application resources. */ get: operations["findAllActivityLogs"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/activity_logs/{activity_id}": { parameters: { query?: never; header?: never; path: { /** @description The Activity Id of the existing activity log. */ activity_id: string; }; cookie?: never; }; /** * Retrieve an activity log * @description This endpoint retrieves an existing activity log that represents an action performed on some resource. The activity log is identified by its unique activity_id. */ get: operations["findActivityLog"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/add_ons": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all add-ons * @description This endpoint is used to list all existing add-ons. */ get: operations["findAllAddOns"]; put?: never; /** * Create an add-on * @description This endpoint is used to create an add-on that can be then attached to a one-off invoice. */ post: operations["createAddOn"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/add_ons/{code}": { parameters: { query?: never; header?: never; path: { /** @description Unique code used to identify the add-on. */ code: string; }; cookie?: never; }; /** * Retrieve an add-on * @description This endpoint is used to retrieve a specific add-on. */ get: operations["findAddOn"]; /** * Update an add-on * @description This endpoint is used to update an existing add-on. */ put: operations["updateAddOn"]; post?: never; /** * Delete an add-on * @description This endpoint is used to delete an existing add-on. */ delete: operations["destroyAddOn"]; options?: never; head?: never; patch?: never; trace?: never; }; "/api_logs": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all api logs * @description This endpoint retrieves all existing api logs that represent requests performed to Lago's API. */ get: operations["findAllApiLogs"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/api_logs/{request_id}": { parameters: { query?: never; header?: never; path: { /** @description The Request Id of the existing api log. */ request_id: string; }; cookie?: never; }; /** * Retrieve an api log * @description This endpoint retrieves an existing api log that represents a request made to the API. The api log is identified by its unique request_id. */ get: operations["findApiLog"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/analytics/gross_revenue": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List gross revenue * @description Gross revenue is the sum of monthly `finalized` invoice payments and fees paid in advance that are not invoiceable. This total is calculated after deducting taxes and discounts. */ get: operations["findAllGrossRevenues"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/analytics/invoice_collection": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List of finalized invoices * @description Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`. */ get: operations["findAllInvoiceCollections"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/analytics/invoiced_usage": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List usage revenue * @description Reports a monthly analysis focused on the revenue generated from all usage-based fees. It exclusively accounts for revenue that has been formally invoiced. Importantly, this report does not include revenue related to the usage in the current billing period, limiting its scope to previously invoiced amounts. */ get: operations["findAllInvoicedUsages"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/analytics/mrr": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List MRR * @description This endpoint is used to list MRR. */ get: operations["findAllMrrs"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/analytics/overdue_balance": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List overdue balance * @description Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates). */ get: operations["findAllOverdueBalances"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/analytics/usage": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List usage * @description Returns usages. */ get: operations["findAllUsages"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/applied_coupons": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all applied coupons * @description This endpoint is used to list all applied coupons. You can filter by coupon status and by customer. */ get: operations["findAllAppliedCoupons"]; put?: never; /** * Apply a coupon to a customer * @description This endpoint is used to apply a specific coupon to a customer, before or during a subscription. */ post: operations["applyCoupon"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/billable_metrics": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all billable metrics * @description This endpoint retrieves all existing billable metrics that represent pricing components of your application. */ get: operations["findAllBillableMetrics"]; put?: never; /** * Create a billable metric * @description This endpoint creates a new billable metric representing a pricing component of your application. */ post: operations["createBillableMetric"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/billable_metrics/evaluate_expression": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Evaluate an expression for a billable metric * @description Evaluate an expression for a billable metric creation by providing the expression and test data */ post: operations["evaluateBillableMetricExpression"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/billable_metrics/{code}": { parameters: { query?: never; header?: never; path: { /** @description Code of the existing billable metric. */ code: string; }; cookie?: never; }; /** * Retrieve a billable metric * @description This endpoint retrieves an existing billable metric that represents a pricing component of your application. The billable metric is identified by its unique code. */ get: operations["findBillableMetric"]; /** * Update a billable metric * @description This endpoint updates an existing billable metric representing a pricing component of your application. */ put: operations["updateBillableMetric"]; post?: never; /** * Delete a billable metric * @description This endpoint deletes an existing billable metric representing a pricing component of your application. */ delete: operations["destroyBillableMetric"]; options?: never; head?: never; patch?: never; trace?: never; }; "/features": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all features * @description This endpoint retrieves all existing features that represent entitlement components of your application. */ get: operations["findAllFeatures"]; put?: never; /** * Create a feature * @description This endpoint creates a new feature representing an entitlement component of your application. */ post: operations["createFeature"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/features/{code}": { parameters: { query?: never; header?: never; path: { /** @description Code of the existing feature. */ code: string; }; cookie?: never; }; /** * Retrieve a feature * @description This endpoint retrieves an existing feature that represents an entitlement component of your application. The feature is identified by its unique code. */ get: operations["findFeature"]; /** * Update a feature * @description This endpoint updates an existing feature representing an entitlement component of your application. */ put: operations["updateFeature"]; post?: never; /** * Delete a feature * @description This endpoint deletes an existing feature representing an entitlement component of your application. Deleting a feature will remove it from all plans and subscriptions. */ delete: operations["destroyFeature"]; options?: never; head?: never; patch?: never; trace?: never; }; "/features/{code}/privileges/{privilege_code}": { parameters: { query?: never; header?: never; path: { /** @description Code of the existing feature. */ code: string; /** @description Code of the existing privilege. */ privilege_code: string; }; cookie?: never; }; get?: never; put?: never; post?: never; /** * Delete a privilege. Deleting a privilege removes it from all plans and subscriptions. * @description Delete privilege from feature. Deleting a privilege removes it from all plans and subscriptions. */ delete: operations["deleteFeaturePrivilege"]; options?: never; head?: never; patch?: never; trace?: never; }; "/coupons": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all coupons * @description This endpoint is used to list all existing coupons. */ get: operations["findAllCoupons"]; put?: never; /** * Create a coupon * @description This endpoint is used to create a coupon that can be then attached to a customer to create a discount. */ post: operations["createCoupon"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/coupons/{code}": { parameters: { query?: never; header?: never; path: { /** @description Unique code used to identify the coupon. */ code: string; }; cookie?: never; }; /** * Retrieve a coupon * @description This endpoint is used to retrieve a specific coupon. */ get: operations["findCoupon"]; /** * Update a coupon * @description This endpoint is used to update a coupon that can be then attached to a customer to create a discount. */ put: operations["updateCoupon"]; post?: never; /** * Delete a coupon * @description This endpoint is used to delete a coupon. */ delete: operations["destroyCoupon"]; options?: never; head?: never; patch?: never; trace?: never; }; "/credit_notes": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all credit notes * @description This endpoint list all existing credit notes. */ get: operations["findAllCreditNotes"]; put?: never; /** * Create a credit note * @description This endpoint creates a new credit note. */ post: operations["createCreditNote"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/credit_notes/{lago_id}": { parameters: { query?: never; header?: never; path: { /** @description The credit note unique identifier, created by Lago. */ lago_id: string; }; cookie?: never; }; /** * Retrieve a credit note * @description This endpoint retrieves an existing credit note. */ get: operations["findCreditNote"]; /** * Update a credit note * @description This endpoint updates an existing credit note. */ put: operations["updateCreditNote"]; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/credit_notes/{lago_id}/download": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Download a credit note PDF * @description This endpoint downloads the PDF of an existing credit note. */ post: operations["downloadCreditNote"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/credit_notes/estimate": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Estimate amounts for a new credit note * @description This endpoint allows you to retrieve amounts for a new credit note creation. */ post: operations["estimateCreditNote"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/credit_notes/{lago_id}/void": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** * Void available credit * @description This endpoint voids the available credit linked to a specific credit note. */ put: operations["voidCreditNote"]; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/credit_notes/{lago_id}/metadata": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Replace credit note metadata * @description This endpoint replaces all existing metadata on a credit note with the provided key-value pairs. * Any existing metadata keys not included in the request will be removed. */ post: operations["replaceCreditNoteMetadata"]; /** * Delete all credit note metadata * @description This endpoint removes all metadata from a credit note. */ delete: operations["deleteAllCreditNoteMetadata"]; options?: never; head?: never; /** * Merge credit note metadata * @description This endpoint merges the provided metadata with existing metadata on the credit note. * Existing keys not in the request are preserved. New keys are added, existing keys are updated. */ patch: operations["mergeCreditNoteMetadata"]; trace?: never; }; "/credit_notes/{lago_id}/metadata/{key}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Delete a metadata key * @description This endpoint removes a single metadata key from a credit note. */ delete: operations["deleteCreditNoteMetadataKey"]; options?: never; head?: never; patch?: never; trace?: never; }; "/customers": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all customers * @description This endpoint retrieves all existing customers. */ get: operations["findAllCustomers"]; put?: never; /** * Create a customer * @description This endpoint creates a new customer. */ post: operations["createCustomer"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}": { parameters: { query?: never; header?: never; path: { /** @description The customer external unique identifier (provided by your own application) */ external_customer_id: string; }; cookie?: never; }; /** * Retrieve a customer * @description This endpoint retrieves an existing customer. */ get: operations["findCustomer"]; put?: never; post?: never; /** * Delete a customer * @description This endpoint deletes an existing customer. */ delete: operations["destroyCustomer"]; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/applied_coupons": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all customer's applied coupons * @description This endpoint is used to list all applied coupons for a customer. */ get: operations["findAllCustomerAppliedCoupons"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/applied_coupons/{applied_coupon_id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Delete an applied coupon * @description This endpoint is used to delete a specific coupon that has been applied to a customer. */ delete: operations["deleteAppliedCoupon"]; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/credit_notes": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all customer's credit notes * @description This endpoint list all existing credit notes for a customer. */ get: operations["findAllCustomerCreditNotes"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/invoices": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all customer's invoices * @description This endpoint is used for retrieving all invoices of a customer. */ get: operations["findAllCustomerInvoices"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/payments": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all customer's payments * @description This endpoint is used to list all payments of a customer */ get: operations["findAllCustomerPayments"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/payment_requests": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all customer's payment requests * @description This endpoint is used to list all existing payment requests of a customer. */ get: operations["findAllCustomerPaymentRequests"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/portal_url": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Get a customer portal URL * @description Retrieves an embeddable link for displaying a customer portal. * * This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal */ get: operations["getCustomerPortalUrl"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/subscriptions": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all customer's subscriptions * @description This endpoint retrieves all active subscriptions for a customer. */ get: operations["findAllCustomerSubscriptions"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/wallets": { parameters: { query?: never; header?: never; path: { /** @description The customer external unique identifier (provided by your own application) */ external_customer_id: components["parameters"]["external_customer_id_path"]; }; cookie?: never; }; /** * List all customer's wallets * @description This endpoint is used to list all wallets with prepaid credits of a customer */ get: operations["findAllCustomerWallets"]; put?: never; /** * Create a wallet * @description This endpoint is used to create a wallet with prepaid credits. */ post: operations["createCustomerWallet"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/wallets/{code}": { parameters: { query?: never; header?: never; path: { /** @description The customer external unique identifier (provided by your own application) */ external_customer_id: components["parameters"]["external_customer_id_path"]; /** @description A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided. */ code: string; }; cookie?: never; }; /** * Retrieve a wallet * @description This endpoint is used to retrieve an existing wallet with prepaid credits. */ get: operations["findCustomerWallet"]; /** * Update a wallet * @description This endpoint is used to update an existing wallet with prepaid credits. */ put: operations["updateCustomerWallet"]; post?: never; /** * Terminate a wallet * @description This endpoint is used to terminate an existing wallet with prepaid credits. */ delete: operations["destroyCustomerWallet"]; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/wallets/{wallet_code}/metadata": { parameters: { query?: never; header?: never; path: { /** @description The customer external unique identifier (provided by your own application) */ external_customer_id: components["parameters"]["external_customer_id_path"]; /** @description A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided. */ wallet_code: components["parameters"]["wallet_code"]; }; cookie?: never; }; get?: never; put?: never; /** * Replace wallet metadata * @description This endpoint replaces all existing metadata on a wallet with the provided key-value pairs. * Any existing metadata keys not included in the request will be removed. */ post: operations["replaceCustomerWalletMetadata"]; /** * Delete all wallet metadata * @description This endpoint removes all metadata from a wallet. */ delete: operations["deleteAllCustomerWalletMetadata"]; options?: never; head?: never; /** * Merge wallet metadata * @description This endpoint merges the provided metadata with existing metadata on the wallet. * Existing keys not in the request are preserved. New keys are added, existing keys are updated. */ patch: operations["mergeCustomerWalletMetadata"]; trace?: never; }; "/customers/{external_customer_id}/wallets/{wallet_code}/metadata/{key}": { parameters: { query?: never; header?: never; path: { /** @description The customer external unique identifier (provided by your own application) */ external_customer_id: components["parameters"]["external_customer_id_path"]; /** @description A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided. */ wallet_code: components["parameters"]["wallet_code"]; }; cookie?: never; }; get?: never; put?: never; post?: never; /** * Delete a metadata key * @description This endpoint removes a single metadata key from a wallet. */ delete: operations["deleteCustomerWalletMetadataKey"]; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/wallets/{wallet_code}/alerts": { parameters: { query?: never; header?: never; path: { /** @description The customer external unique identifier (provided by your own application) */ external_customer_id: components["parameters"]["external_customer_id_path"]; /** @description A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided. */ wallet_code: components["parameters"]["wallet_code"]; }; cookie?: never; }; /** * List wallet alerts * @description This endpoint enables the retrieval of all alerts for a wallet. */ get: operations["getCustomerWalletAlerts"]; put?: never; /** * Create wallet alert(s) * @description This endpoint allows you to create new alerts for a wallet. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically. */ post: operations["createCustomerWalletAlert"]; /** * Delete all wallet alerts * @description This endpoint allows you to delete all alerts for a wallet. */ delete: operations["deleteAllCustomerWalletAlerts"]; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}": { parameters: { query?: never; header?: never; path: { /** @description The customer external unique identifier (provided by your own application) */ external_customer_id: components["parameters"]["external_customer_id_path"]; /** @description A unique wallet identifier within a customer. It is either set by the user at creation or auto-generated by Lago if not provided. */ wallet_code: components["parameters"]["wallet_code"]; /** @description Unique code of the alert */ code: string; }; cookie?: never; }; /** * Retrieve a wallet alert * @description This endpoint enables the retrieval of a specific alert for a wallet. */ get: operations["getCustomerWalletAlert"]; /** * Update a wallet alert * @description This endpoint allows you to update an existing alert for a wallet. */ put: operations["updateCustomerWalletAlert"]; post?: never; /** * Delete a wallet alert * @description This endpoint allows you to delete an existing alert for a wallet. */ delete: operations["deleteCustomerWalletAlert"]; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/current_usage": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Retrieve customer current usage * @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period. */ get: operations["findCustomerCurrentUsage"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/projected_usage": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Retrieve customer current and projected usage * @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period. It also returns the projected usage for the current period based on the current usage. */ get: operations["findCustomerProjectedUsage"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/past_usage": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Retrieve customer past usage * @description This endpoint enables the retrieval of the usage-based billing data for a customer within past periods. */ get: operations["findAllCustomerPastUsage"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/checkout_url": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Generate a Customer Payment Provider Checkout URL * @description This endpoint regenerates the Payment Provider Checkout URL of a Customer. */ post: operations["generateCustomerCheckoutURL"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/payment_methods": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all customer payment methods * @description This endpoint retrieves all payment methods of a Customer. */ get: operations["findAllCustomersPaymentMethods"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default": { parameters: { query?: never; header?: never; path: { /** @description The payment method unique identifier, created by Lago. */ lago_id: string; /** @description The customer external unique identifier (provided by your own application) */ external_customer_id: components["parameters"]["external_customer_id_path"]; }; cookie?: never; }; get?: never; /** * Set the payment method as default * @description Use the payment method as default when not selected a payment method */ put: operations["paymentMethodSetAsDefault"]; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/customers/{external_customer_id}/payment_methods/{lago_id}": { parameters: { query?: never; header?: never; path: { /** @description The payment method unique identifier, created by Lago. */ lago_id: string; /** @description The customer external unique identifier (provided by your own application) */ external_customer_id: components["parameters"]["external_customer_id_path"]; }; cookie?: never; }; get?: never; put?: never; post?: never; /** * Delete a payment method * @description This endpoint deletes a specific payment method for a customer. */ delete: operations["destroyPaymentMethod"]; options?: never; head?: never; patch?: never; trace?: never; }; "/events": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all events * @description This endpoint is used for retrieving all events. */ get: operations["findAllEvents"]; put?: never; /** * Send usage events * @description This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription. */ post: operations["createEvent"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/events/batch": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Batch multiple events * @description This endpoint can be used to send a batch of usage records. Each request may include up to 100 events. */ post: operations["createBatchEvents"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/events/estimate_fees": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Estimate fees for a pay in advance charge * @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance charges */ post: operations["eventEstimateFees"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/events/estimate_instant_fees": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Estimate instant fees for a pay in advance charge * @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges */ post: operations["eventEstimateInstantFees"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/events/batch_estimate_instant_fees": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Batch estimate instant fees for a pay in advance charge * @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges */ post: operations["eventBatchEstimateInstantFees"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/events/{transaction_id}": { parameters: { query?: never; header?: never; path: { /** @description This field represents the unique identifier sent for this specific event (must be URL encoded). */ transaction_id: string; }; cookie?: never; }; /** * Retrieve a specific event * @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription. * * Note that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id. * * WARNING: If your Lago organization is configured to use the Clickhouse-based event pipeline, multiple events can share the same `transaction_id` (with different timestamps). This endpoint will only return the first event found. */ get: operations["findEvent"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/fees": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all fees * @description This endpoint is used for retrieving all fees that has been issued. */ get: operations["findAllFees"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/fees/{lago_id}": { parameters: { query?: never; header?: never; path: { /** @description Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system. */ lago_id: string; }; cookie?: never; }; /** * Retrieve a specific fee * @description This endpoint is used for retrieving a specific fee that has been issued. */ get: operations["findFee"]; /** * Update a fee * @description This endpoint is used for updating a specific fee that has been issued. */ put: operations["updateFee"]; post?: never; /** * Delete a fee * @description This endpoint is used for deleting a specific fee that has not yet been invoiced */ delete: operations["deleteFee"]; options?: never; head?: never; patch?: never; trace?: never; }; "/invoices": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List all invoices * @description This endpoint is used for retrieving all invoices. */ get: operations["findAllInvoices"]; put?: never; /** * Create a one-off invoice * @description This endpoint is used for issuing a one-off invoice. */ post: operations["createInvoice"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/invoices/{lago_id}": { parameters: { query?: never; header?: never; path: { /** @description Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system. */ lago_id: components["parameters"]["lago_invoice_id"]; }; cookie?: never; }; /** * Retrieve an invoice * @description This endpoint is used for retrieving a specific invoice that has been issued. */ get: operations["findInvoice"]; /** * Update an invoice * @description This endpoint is used for updating an existing invoice. */ put: operations["updateInvoice"]; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/invoices/{lago_id}/download": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Download an invoice PDF * @description This endpoint is used for downloading a specific invoice PDF document. */ post: operations["downloadInvoice"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/invoices/{lago_id}/finalize": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; /** * Finalize a draft invoice