export interface AddOnBaseInput {
    /**
     * The name of the add-on.
     * @example "Setup Fee"
     */
    name?: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
     * @example "Setup Fee (SF1)"
     */
    invoice_display_name?: string;
    /**
     * Unique code used to identify the add-on.
     * @example "setup_fee"
     */
    code?: string;
    /**
     * The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value.
     * @example 50000
     */
    amount_cents?: number;
    /**
     * The currency of the add-on.
     * @example "USD"
     */
    amount_currency?: Currency;
    /**
     * The description of the add-on.
     * @example "Implementation fee for new customers."
     */
    description?: string | null;
    /**
     * List of unique code used to identify the taxes.
     * @example ["french_standard_vat"]
     */
    tax_codes?: string[];
}
export interface AddOnCreateInput {
    add_on: AddOnBaseInput;
}
export interface AddOnObject {
    /**
     * Unique identifier of the add-on, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The name of the add-on.
     * @example "Setup Fee"
     */
    name: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
     * @example "Setup Fee (SF1)"
     */
    invoice_display_name?: string;
    /**
     * Unique code used to identify the add-on.
     * @example "setup_fee"
     */
    code: string;
    /**
     * The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The currency of the add-on.
     * @example "USD"
     */
    amount_currency: Currency;
    /**
     * The description of the add-on.
     * @example "Implementation fee for new customers."
     */
    description?: string | null;
    /**
     * The date and time when the add-on was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the add-on was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /** All taxes applied to the add-on. */
    taxes?: TaxObject[];
}
export interface AddOn {
    add_on: AddOnObject;
}
export interface AddOnsPaginated {
    add_ons: AddOnObject[];
    meta: PaginationMeta;
}
export interface AddOnUpdateInput {
    add_on: AddOnBaseInput;
}
export interface ApiErrorBadRequest {
    /**
     * @format int32
     * @example 400
     */
    status: number;
    /** @example "Bad request" */
    error: string;
}
export interface ApiErrorForbidden {
    /**
     * @format int32
     * @example 403
     */
    status: number;
    /** @example "Forbidden" */
    error: string;
    /** @example "feature_unavailable" */
    code: string;
}
export interface ApiErrorUnauthorized {
    /**
     * @format int32
     * @example 401
     */
    status: number;
    /** @example "Unauthorized" */
    error: string;
}
export interface ApiErrorUnprocessableEntity {
    /**
     * @format int32
     * @example 422
     */
    status: number;
    /** @example "Unprocessable entity" */
    error: string;
    /** @example "validation_errors" */
    code: string;
    error_details: object;
}
export interface ApiErrorNotAllowed {
    /**
     * @format int32
     * @example 405
     */
    status: number;
    /** @example "Method Not Allowed" */
    error: string;
    /** @example "not_allowed" */
    code: string;
}
export interface ApiErrorNotFound {
    /**
     * @format int32
     * @example 404
     */
    status: number;
    /** @example "Not Found" */
    error: string;
    /** @example "object_not_found" */
    code: string;
}
export interface AppliedCoupon {
    applied_coupon: AppliedCouponObject;
}
export interface AppliedCouponInput {
    applied_coupon: {
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
         */
        external_customer_id: string;
        /**
         * Unique code used to identify the coupon.
         * @example "startup_deal"
         */
        coupon_code: string;
        /**
         * The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.
         *
         * - If set to `once`, the coupon is applicable only for a single use.
         * - If set to `recurring`, the coupon can be used multiple times for recurring billing periods.
         * - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.
         * @example "recurring"
         */
        frequency?: "once" | "recurring" | "forever" | null;
        /**
         * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
         * @example 3
         */
        frequency_duration?: number | null;
        /**
         * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
         * @example 2000
         */
        amount_cents?: number | null;
        /**
         * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
         * @example "EUR"
         */
        amount_currency?: Currency | null;
        /**
         * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example null
         */
        percentage_rate?: string | null;
    };
}
export interface AppliedCouponObject {
    /**
     * Unique identifier of the applied coupon, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the coupon, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_coupon_id: string;
    /**
     * Unique code used to identify the coupon.
     * @example "startup_deal"
     */
    coupon_code: string;
    /**
     * The name of the coupon.
     * @example "Startup Deal"
     */
    coupon_name: string;
    /**
     * Unique identifier of the customer, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The status of the coupon. Can be either `active` or `terminated`.
     * @example "active"
     */
    status: "active" | "terminated";
    /**
     * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
     * @example 2000
     */
    amount_cents?: number | null;
    /**
     * The remaining amount in cents for a `fixed_amount` coupon with a frequency set to `once`. This field indicates the remaining balance or value that can still be utilized from the coupon.
     * @example 50
     */
    amount_cents_remaining?: number | null;
    /**
     * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
     * @example "EUR"
     */
    amount_currency?: Currency | null;
    /**
     * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example null
     */
    percentage_rate?: string | null;
    /**
     * The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.
     *
     * - If set to `once`, the coupon is applicable only for a single use.
     * - If set to `recurring`, the coupon can be used multiple times for recurring billing periods.
     * - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.
     * @example "recurring"
     */
    frequency: "once" | "recurring" | "forever";
    /**
     * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
     * @example 3
     */
    frequency_duration?: number | null;
    /**
     * The remaining number of billing periods to which the coupon is applicable. This field determines the remaining usage or availability of the coupon based on the remaining billing periods.
     * @example 1
     */
    frequency_duration_remaining?: number | null;
    /**
     * The date and time after which the coupon will stop applying to customer's invoices. Once the expiration date is reached, the coupon will no longer be applicable, and any further invoices generated for the customer will not include the coupon discount.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    expiration_at?: string | null;
    /**
     * The date and time when the coupon was assigned to a customer. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * This field indicates the specific moment when the coupon amount is fully utilized or when the coupon is removed from the customer's coupon list. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    terminated_at?: string | null;
}
export type AppliedCouponObjectExtended = AppliedCouponObject & {
    credits: CreditObject[];
};
export interface AppliedCouponsPaginated {
    applied_coupons: AppliedCouponObjectExtended[];
    meta: PaginationMeta;
}
export interface AppliedUsageThresholdObject {
    /**
     * The amount of usage in cents that has been accumulated over the lifetime of the subscription.
     * @example 2000
     */
    lifetime_usage_amount_cents: number;
    /**
     * The date and time when the lifetime usage was computed. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     */
    created_at: string;
    usage_threshold: UsageThresholdObject;
}
export interface BaseAppliedTax {
    /**
     * Unique identifier of the applied tax, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id?: string;
    /**
     * Unique identifier of the tax, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_tax_id?: string;
    /**
     * Name of the tax.
     * @example "TVA"
     */
    tax_name?: string;
    /**
     * Unique code used to identify the tax associated with the API request.
     * @example "french_standard_vat"
     */
    tax_code?: string;
    /**
     * The percentage rate of the tax
     * @example 20
     */
    tax_rate?: number;
    /**
     * Internal description of the taxe
     * @example "French standard VAT"
     */
    tax_description?: string;
    /**
     * Amount of the tax
     * @example 2000
     */
    amount_cents?: number;
    /**
     * Currency of the tax
     * @example "USD"
     */
    amount_currency?: Currency;
    /**
     * The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    created_at?: string;
}
export interface BillableMetric {
    billable_metric: BillableMetricObject;
}
export interface BillableMetricObject {
    /**
     * Unique identifier of the billable metric created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Name of the billable metric.
     * @example "Storage"
     */
    name: string;
    /**
     * Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric.
     * @example "storage"
     */
    code: string;
    /**
     * Internal description of the billable metric.
     * @example "GB of storage used in my application"
     */
    description?: string | null;
    /**
     * Defines if the billable metric is persisted billing period over billing period.
     *
     * - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.
     * - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.
     * - If not defined in the request, default value is `false`.
     * @example false
     */
    recurring: boolean;
    /**
     * Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.
     * @example "round"
     */
    rounding_function?: "ceil" | "floor" | "round" | null;
    /**
     * Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value.
     * @example 2
     */
    rounding_precision?: number | null;
    /**
     * Creation date of the billable metric.
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    created_at: string;
    /**
     * Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
     * @example "round((ended_at - started_at) * units)"
     */
    expression?: string;
    /**
     * Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
     * @example "gb"
     */
    field_name?: string | null;
    /**
     * Aggregation method used to compute usage for this billable metric.
     * @example "sum_agg"
     */
    aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
    /**
     * Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.
     * @example "seconds"
     */
    weighted_interval?: "seconds" | null;
    filters?: BillableMetricFilterObject[];
}
export interface BillableMetricBaseInput {
    /**
     * Name of the billable metric.
     * @example "Storage"
     */
    name?: string;
    /**
     * Unique code used to identify the billable metric associated with the API request. This code associates each event with the correct metric.
     * @example "storage"
     */
    code?: string;
    /**
     * Internal description of the billable metric.
     * @example "GB of storage used in my application"
     */
    description?: string | null;
    /**
     * Defines if the billable metric is persisted billing period over billing period.
     *
     * - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.
     * - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.
     * - If not defined in the request, default value is `false`.
     * @example false
     */
    recurring?: boolean;
    /**
     * Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
     * Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
     * Round is accepting an optional second parameter to specify the number of decimal.
     * @example "round((ended_at - started_at) * units)"
     */
    expression?: string | null;
    /**
     * Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.
     * @example "round"
     */
    rounding_function?: "ceil" | "floor" | "round" | null;
    /**
     * Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value.
     * @example 2
     */
    rounding_precision?: number | null;
    /**
     * Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
     * @example "gb"
     */
    field_name?: string | null;
    /**
     * Aggregation method used to compute usage for this billable metric.
     * @example "sum_agg"
     */
    aggregation_type?: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
    /**
     * Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`.
     * @example "seconds"
     */
    weighted_interval?: "seconds" | null;
    filters?: BillableMetricFilterInput[];
}
export interface BillableMetricCreateInput {
    billable_metric: BillableMetricBaseInput;
}
export interface BillableMetricEvaluateExpressionInput {
    /**
     * Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
     * Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
     * Round is accepting an optional second parameter to specify the number of decimal.
     * @example "round((ended_at - started_at) * units)"
     */
    expression: string;
    event: {
        /**
         * The code that identifies a targeted billable metric.
         * @example "storage"
         */
        code: string;
        /**
         * This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).
         * If this timestamp is not provided, the API will automatically set it to the time of event reception.
         * @example "1651240791"
         */
        timestamp?: number | string;
        /**
         * This field represents additional properties associated with the event. They can be used when evaluating the expression.
         * @example {"gb":10}
         */
        properties: Record<string, string | number>;
    };
}
export interface BillableMetricEvaluateExpressionResult {
    expression_result: {
        /**
         * Result of evaluating the expression
         * @example 1
         */
        value: string | number;
    };
}
/** Values used to apply differentiated pricing based on additional event properties. */
export interface BillableMetricFilterInput {
    /**
     * Filter key to add to the event properties payload
     * @example "region"
     */
    key: string;
    /** List of possible filter values */
    values: string[];
}
/** Values used to apply differentiated pricing based on additional event properties. */
export interface BillableMetricFilterObject {
    /**
     * Filter key to add to the event properties payload
     * @example "region"
     */
    key: string;
    /** List of possible filter values */
    values: string[];
}
export interface BillableMetricUpdateInput {
    billable_metric: BillableMetricBaseInput;
}
export interface BillableMetricsPaginated {
    billable_metrics: BillableMetricObject[];
    meta: PaginationMeta;
}
/** Values used to apply differentiated pricing based on additional event properties. */
export interface ChargeFilterInput {
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
     * @example "AWS"
     */
    invoice_display_name?: string | null;
    /** List of all thresholds utilized for calculating the charge. */
    properties?: ChargeProperties;
    /**
     * List of possible filter values. The key and values must match one of the billable metric filters.
     * @example {"region":["us-east-1"]}
     */
    values?: Record<string, string[]>;
}
/** Values used to apply differentiated pricing based on additional event properties. */
export interface ChargeFilterObject {
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
     * @example "AWS"
     */
    invoice_display_name: string | null;
    /** List of all thresholds utilized for calculating the charge. */
    properties: ChargeProperties;
    /**
     * List of possible filter values. The key and values must match one of the billable metric filters.
     * @example {"region":["us-east-1"]}
     */
    values: Record<string, string[]>;
}
export interface ChargeObject {
    /**
     * Unique identifier of charge, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier of the billable metric created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_billable_metric_id: string;
    /**
     * Unique code identifying a billable metric.
     * @example "requests"
     */
    billable_metric_code: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
     * @example "Setup"
     */
    invoice_display_name?: string;
    /**
     * The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    created_at: string;
    /** Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `graduated_percentage`, `package`, `percentage`, `volume` or `dynamic`. */
    charge_model: "standard" | "graduated" | "graduated_percentage" | "package" | "percentage" | "volume" | "dynamic";
    /**
     * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to `false`, the charge is due and invoiced at the end of each billing period.
     * @example true
     */
    pay_in_advance?: boolean;
    /**
     * This field specifies whether the charge should be included in a proper invoice. If set to `false`, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.
     * @example true
     */
    invoiceable?: boolean;
    /**
     * This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
     * This field determines whether and when the charge fee should be included in
     * the invoice. If `null`, no invoice will be issued for this charge fee.
     * If `invoice`, an invoice will be generated at the end of the period,
     * consolidating all charge fees with a succeeded payment status.
     * @example "invoice"
     */
    regroup_paid_fees?: "invoice" | null;
    /**
     * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
     *
     * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
     * - If set to `false`, the charge is billed in full.
     * - If not defined in the request, default value is `false`.
     * @example false
     */
    prorated?: boolean;
    /**
     * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
     * @example 1200
     */
    min_amount_cents?: number;
    /** List of all thresholds utilized for calculating the charge. */
    properties?: ChargeProperties;
    /** List of filters used to apply differentiated pricing based on additional event properties. */
    filters?: ChargeFilterObject[];
    /** All taxes applied to the charge. */
    taxes?: TaxObject[];
}
export interface ChargeProperties {
    /** Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model. */
    graduated_ranges?: {
        /**
         * Specifies the lower value of a tier for a `graduated` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
         * @example 0
         */
        from_value: number;
        /**
         * Specifies the highest value of a tier for a `graduated` charge model.
         * - This value must be higher than the from_value of the same tier.
         * - This value must be null for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * The flat amount for a whole tier, excluding tax, for a `graduated` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10"
         */
        flat_amount: string;
        /**
         * The unit price, excluding tax, for a specific tier of a `graduated` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "0.5"
         */
        per_unit_amount: string;
    }[];
    /** Graduated percentage ranges, sorted from bottom to top tiers, used for a `graduated_percentage` charge model. */
    graduated_percentage_ranges?: {
        /**
         * Specifies the lower value of a tier for a `graduated_percentage` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
         * @example 0
         */
        from_value: number;
        /**
         * Specifies the highest value of a tier for a `graduated_percentage` charge model.
         * - This value must be higher than the from_value of the same tier.
         * - This value must be null for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * The percentage rate that is applied to the amount of each transaction in the tier for a `graduated_percentage` charge model. It is expressed as a decimal value.
         * @format ^[0-9]+.?[0-9]*$
         * @example "1"
         */
        rate: string;
        /**
         * The flat amount for a whole tier, excluding tax, for a `graduated_percentage` charge model. It is expressed as a decimal value.
         * @format ^[0-9]+.?[0-9]*$
         * @example "10"
         */
        flat_amount: string;
    }[];
    /**
     * - The unit price, excluding tax, for a `standard` charge model. It is expressed as a decimal value.
     * - The amount, excluding tax, for a complete set of units in a `package` charge model. It is expressed as a decimal value.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "30"
     */
    amount?: string;
    /**
     * The quantity of units that are provided free of charge for each billing period in a `package` charge model. This field specifies the number of units that customers can use without incurring any additional cost during each billing cycle.
     * @example 100
     */
    free_units?: number;
    /**
     * The quantity of units included in each pack or set for a `package` charge model. It indicates the number of units that are bundled together as a single package or set within the pricing structure.
     * @example 1000
     */
    package_size?: number;
    /**
     * The percentage rate that is applied to the amount of each transaction for a `percentage` charge model. It is expressed as a decimal value.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1"
     */
    rate?: string;
    /**
     * The fixed fee that is applied to each transaction for a `percentage` charge model. It is expressed as a decimal value.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "0.5"
     */
    fixed_amount?: string;
    /**
     * The count of transactions that are not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the number of transactions that are exempt from the calculation of charges based on the specified percentage rate and fixed fee.
     * @example 5
     */
    free_units_per_events?: number | null;
    /**
     * The transaction amount that is not impacted by the `percentage` rate and fixed fee in a percentage charge model. This field indicates the portion of the transaction amount that is exempt from the calculation of charges based on the specified percentage rate and fixed fee.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "500"
     */
    free_units_per_total_aggregation?: string | null;
    /**
     * Specifies the maximum allowable spending for a single transaction. Working as a transaction cap.
     * @format ^[0-9]+.?[0-9]*$
     * @example "3.75"
     */
    per_transaction_max_amount?: string | null;
    /**
     * Specifies the minimum allowable spending for a single transaction. Working as a transaction floor.
     * @format ^[0-9]+.?[0-9]*$
     * @example "1.75"
     */
    per_transaction_min_amount?: string | null;
    /**
     * The list of event properties that are used to group the events on the invoice for a `standard` charge model.
     * @example ["agent_name"]
     */
    grouped_by?: string[];
    /** Volume ranges, sorted from bottom to top tiers, used for a `volume` charge model. */
    volume_ranges?: {
        /**
         * Specifies the lower value of a tier for a `volume` charge model. It must be either 0 or the previous range's `to_value + 1` to maintain the proper sequence of values.
         * @example 0
         */
        from_value: number;
        /**
         * Specifies the highest value of a tier for a `volume` charge model.
         * - This value must be higher than the `from_value` of the same tier.
         * - This value must be `null` for the last tier.
         * @example 10
         */
        to_value: number | null;
        /**
         * The unit price, excluding tax, for a specific tier of a `volume` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10"
         */
        flat_amount: string;
        /**
         * The flat amount for a whole tier, excluding tax, for a `volume` charge model. It is expressed as a decimal value.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "0.5"
         */
        per_unit_amount: string;
    }[];
}
/** @example "US" */
export type Country = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
export interface Coupon {
    coupon: CouponObject;
}
export interface CouponBaseInput {
    /**
     * The name of the coupon.
     * @example "Startup Deal"
     */
    name?: string;
    /**
     * Unique code used to identify the coupon.
     * @example "startup_deal"
     */
    code?: string;
    /**
     * Description of the coupon.
     * @example "I am a coupon description"
     */
    description?: string | null;
    /**
     * The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.
     *
     * - If set to `fixed_amount`, the coupon represents a fixed amount discount.
     * - If set to `percentage`, the coupon represents a percentage-based discount.
     * @example "fixed_amount"
     */
    coupon_type?: "fixed_amount" | "percentage";
    /**
     * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
     * @example 5000
     */
    amount_cents?: number | null;
    /**
     * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
     * @example "USD"
     */
    amount_currency?: Currency | null;
    /**
     * Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.
     * @example false
     */
    reusable?: boolean;
    /**
     * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example null
     */
    percentage_rate?: string | null;
    /**
     * The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`.
     *
     * - If set to `once`, the coupon is applicable only for a single use.
     * - If set to `recurring`, the coupon can be used multiple times for recurring billing periods.
     * - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.
     * @example "recurring"
     */
    frequency?: "once" | "recurring" | "forever";
    /**
     * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
     * @example 6
     */
    frequency_duration?: number | null;
    /**
     * Specifies the type of expiration for the coupon. It can have two possible values: `time_limit` or `no_expiration`.
     *
     * - If set to `time_limit`, the coupon has an expiration based on a specified time limit.
     * - If set to `no_expiration`, the coupon does not have an expiration date and remains valid indefinitely.
     * @example "time_limit"
     */
    expiration?: "no_expiration" | "time_limit";
    /**
     * The expiration date and time of the coupon. This field is required only for coupons with `expiration` set to `time_limit`. The expiration date and time should be specified in UTC format according to the ISO 8601 datetime standard. It indicates the exact moment when the coupon will expire and is no longer valid.
     * @format date-time
     * @example "2022-08-08T23:59:59Z"
     */
    expiration_at?: string | null;
    /** Set coupon limitations to plans or specific metrics. */
    applies_to?: {
        /**
         * An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only.
         * @example ["startup_plan"]
         */
        plan_codes?: string[] | null;
        /**
         * An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only.
         * @example []
         */
        billable_metric_codes?: string[] | null;
    };
}
export interface CouponCreateInput {
    coupon: CouponBaseInput;
}
export interface CouponObject {
    /**
     * Unique identifier of the coupon, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The name of the coupon.
     * @example "Startup Deal"
     */
    name: string;
    /**
     * Unique code used to identify the coupon.
     * @example "startup_deal"
     */
    code: string;
    /**
     * Description of the coupon.
     * @example "I am a coupon description"
     */
    description?: string | null;
    /**
     * The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.
     *
     * - If set to `fixed_amount`, the coupon represents a fixed amount discount.
     * - If set to `percentage`, the coupon represents a percentage-based discount.
     * @example "fixed_amount"
     */
    coupon_type: "fixed_amount" | "percentage";
    /**
     * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
     * @example 5000
     */
    amount_cents?: number | null;
    /**
     * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
     * @example "USD"
     */
    amount_currency?: Currency | null;
    /**
     * Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.
     * @example true
     */
    reusable: boolean;
    /**
     * The coupon is limited to specific plans. The possible values can be `true` or `false`.
     * @example true
     */
    limited_plans: boolean;
    /**
     * An array of plan codes to which the coupon is applicable. By specifying the plan codes in this field, you can restrict the coupon's usage to specific plans only.
     * @example ["startup_plan"]
     */
    plan_codes?: string[];
    /**
     * The coupon is limited to specific billable metrics. The possible values can be `true` or `false`.
     * @example false
     */
    limited_billable_metrics: boolean;
    /**
     * An array of billable metric codes to which the coupon is applicable. By specifying the billable metric codes in this field, you can restrict the coupon's usage to specific metrics only.
     * @example []
     */
    billable_metric_codes?: string[];
    /**
     * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example null
     */
    percentage_rate?: string | null;
    /**
     * The type of frequency for the coupon. It can have three possible values: `once`, `recurring`, or `forever`.
     *
     * - If set to `once`, the coupon is applicable only for a single use.
     * - If set to `recurring`, the coupon can be used multiple times for recurring billing periods.
     * - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.
     * @example "recurring"
     */
    frequency: "once" | "recurring" | "forever";
    /**
     * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
     * @example 6
     */
    frequency_duration?: number | null;
    /**
     * Specifies the type of expiration for the coupon. It can have two possible values: `time_limit` or `no_expiration`.
     *
     * - If set to `time_limit`, the coupon has an expiration based on a specified time limit.
     * - If set to `no_expiration`, the coupon does not have an expiration date and remains valid indefinitely.
     * @example "time_limit"
     */
    expiration: "no_expiration" | "time_limit";
    /**
     * The expiration date and time of the coupon. This field is required only for coupons with `expiration` set to `time_limit`. The expiration date and time should be specified in UTC format according to the ISO 8601 datetime standard. It indicates the exact moment when the coupon will expire and is no longer valid.
     * @format date-time
     * @example "2022-08-08T23:59:59Z"
     */
    expiration_at?: string | null;
    /**
     * The date and time when the coupon was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the coupon was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * This field indicates if the coupon has been terminated and is no longer usable. If it's not null, it won't be removed for existing customers using it, but it prevents the coupon from being applied in the future.
     * @format date-time
     * @example "2022-08-08T23:59:59Z"
     */
    terminated_at?: string | null;
}
export interface CouponsPaginated {
    coupons: CouponObject[];
    meta: PaginationMeta;
}
export interface CouponUpdateInput {
    coupon: CouponBaseInput;
}
export interface CreditNoteEstimateInput {
    credit_note: {
        /**
         * The invoice unique identifier, created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        invoice_id: string;
        /**
         * The list of credit note's items.
         * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
         */
        items: {
            /**
             * The fee unique identifier, created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            fee_id: string;
            /**
             * The amount of the credit note item, expressed in cents.
             * @example 10
             */
            amount_cents: number;
        }[];
    };
}
export interface CreditNoteEstimated {
    estimated_credit_note: {
        /**
         * Unique identifier assigned to the invoice that the credit note belongs to
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_invoice_id: string;
        /**
         * The invoice unique number, related to the credit note.
         * @example "LAG-1234"
         */
        invoice_number: string;
        /**
         * The currency of the credit note.
         * @example "EUR"
         */
        currency: Currency;
        /**
         * The tax amount of the credit note, expressed in cents.
         * @example 20
         */
        taxes_amount_cents: number;
        /**
         * The tax rate associated with this specific credit note.
         * @example 20
         */
        taxes_rate: number;
        /**
         * The subtotal of the credit note excluding any applicable taxes, expressed in cents.
         * @example 100
         */
        sub_total_excluding_taxes_amount_cents: number;
        /**
         * The credited amount of the credit note, expressed in cents.
         * @example 100
         */
        max_creditable_amount_cents: number;
        /**
         * The refunded amount of the credit note, expressed in cents.
         * @example 0
         */
        max_refundable_amount_cents: number;
        /**
         * The pro-rated amount of the coupons applied to the source invoice.
         * @example 20
         */
        coupons_adjustment_amount_cents: number;
        /** Array of credit note's items. */
        items: {
            /**
             * The credit note's item amount, expressed in cents.
             * @example 100
             */
            amount_cents: number;
            /**
             * 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.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            lago_fee_id: string | null;
        }[];
        applied_taxes?: {
            /**
             * Unique identifier of the tax, created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            lago_tax_id?: string;
            /**
             * Name of the tax.
             * @example "TVA"
             */
            tax_name?: string;
            /**
             * Unique code used to identify the tax associated with the API request.
             * @example "french_standard_vat"
             */
            tax_code?: string;
            /**
             * The percentage rate of the tax
             * @example 20
             */
            tax_rate?: number;
            /**
             * Internal description of the taxe
             * @example "French standard VAT"
             */
            tax_description?: string;
            /** @example 100 */
            base_amount_cents?: number;
            /**
             * Amount of the tax
             * @example 2000
             */
            amount_cents?: number;
            /**
             * Currency of the tax
             * @example "USD"
             */
            amount_currency?: Currency;
        }[];
    };
}
export interface CreditObject {
    /**
     * Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit's item record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The amount of credit associated with the invoice, expressed in cents.
     * @example 1200
     */
    amount_cents: number;
    /**
     * The currency of the credit.
     * @example "EUR"
     */
    amount_currency: Currency;
    /**
     * Indicates whether the credit is applied on the amount before taxes (coupons) or after taxes (credit notes). This flag helps determine the order in which credits are applied to the invoice calculation
     * @example false
     */
    before_taxes: boolean;
    /** The item attached to the credit. */
    item: {
        /**
         * Unique identifier assigned to the credit item within the Lago application.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_item_id: string;
        /**
         * The type of credit applied. Possible values are `coupon`, `credit_note` or `invoice` (for `progressive_billing` invoice).
         * @example "coupon"
         */
        type: "coupon" | "credit_note" | "invoice";
        /**
         * The code of the credit applied. It can be the code of the coupon attached to the credit, the credit note's number or the `progressive_billing` invoice number.
         * @example "startup_deal"
         */
        code: string;
        /**
         * The name of the credit applied. It can be the name of the coupon attached to the credit, the initial invoice's number linked to the credit note or the `progressive_billing` invoice number.
         * @example "Startup Deal"
         */
        name: string;
    };
    invoice: {
        /**
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_id: string;
        /** @example "succeeded" */
        payment_status: "pending" | "succeeded" | "failed";
    };
}
export interface CreditNote {
    credit_note: CreditNoteObject;
}
export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
    /**
     * Unique identifier of the credit note, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_credit_note_id?: string;
    /** @example 100 */
    base_amount_cents?: number;
};
export interface CreditNoteItemObject {
    /**
     * The credit note's item unique identifier, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The credit note's item amount, expressed in cents.
     * @example 100
     */
    amount_cents: number;
    /**
     * The credit note's item currency.
     * @example "EUR"
     */
    amount_currency: Currency;
    /** The fee object related to the credit note item. */
    fee: FeeObject;
}
export interface CreditNoteObject {
    /**
     * The credit note unique identifier, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The sequential identifier of the credit note, specifically scoped on the associated invoice. It provides a unique numerical identifier for the credit note within the context of the invoice.
     * @example 2
     */
    sequential_id: number;
    /**
     * The credit note unique number.
     * @example "LAG-1234-CN2"
     */
    number: string;
    /**
     * Unique identifier assigned to the invoice that the credit note belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id: string;
    /**
     * The invoice unique number, related to the credit note.
     * @example "LAG-1234"
     */
    invoice_number: string;
    /**
     * The date of creation of the credit note. It follows the ISO 8601 date format and provides the specific date when the credit note was created.
     * @format date
     * @example "2022-12-06"
     */
    issuing_date: string;
    /**
     * The status of the credit portion of the credit note. It indicates the current state or condition of the credit amount associated with the credit note. The possible values for this field are:
     *
     * - `available`: this status indicates that an amount remains available for future usage. The credit can be applied towards future transactions or invoices.
     * - `consumed`: this status indicates that the credit amount has been fully consumed. The remaining amount is 0, indicating that the credit has been utilized in its entirety.
     * - `voided`: this status indicates that the remaining amount of the credit cannot be used any further. The credit has been voided and is no longer available for application or redemption.
     * @example "available"
     */
    credit_status?: "available" | "consumed" | "voided" | null;
    /**
     * The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
     *
     * - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
     * - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
     * - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
     * @example "pending"
     */
    refund_status?: "pending" | "succeeded" | "failed" | null;
    /**
     * The reason of the credit note creation.
     * Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
     * @example "other"
     */
    reason: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
    /**
     * The description of the credit note.
     * @example "Free text"
     */
    description?: string | null;
    /**
     * The currency of the credit note.
     * @example "EUR"
     */
    currency: Currency;
    /**
     * The total amount of the credit note, expressed in cents.
     * @example 120
     */
    total_amount_cents: number;
    /**
     * The tax amount of the credit note, expressed in cents.
     * @example 20
     */
    taxes_amount_cents: number;
    /**
     * The tax rate associated with this specific credit note.
     * @example 20
     */
    taxes_rate: number;
    /**
     * The subtotal of the credit note excluding any applicable taxes, expressed in cents.
     * @example 100
     */
    sub_total_excluding_taxes_amount_cents: number;
    /**
     * The remaining credit note amount, expressed in cents.
     * @example 100
     */
    balance_amount_cents: number;
    /**
     * The credited amount of the credit note, expressed in cents.
     * @example 100
     */
    credit_amount_cents: number;
    /**
     * The refunded amount of the credit note, expressed in cents.
     * @example 0
     */
    refund_amount_cents: number;
    /**
     * The pro-rated amount of the coupons applied to the source invoice.
     * @example 20
     */
    coupons_adjustment_amount_cents: number;
    /**
     * The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    created_at: string;
    /**
     * The date when the credit note was last updated. It is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    updated_at: string;
    /**
     * The PDF file of the credit note.
     * @example "https://getlago.com/credit_note/file"
     */
    file_url?: string | null;
    /** Array of credit note's items. */
    items?: CreditNoteItemObject[];
    applied_taxes?: CreditNoteAppliedTaxObject[];
    /**
     * Indicates if the credit note belongs to self-billed invoice. Self-billing is a process where an organization creates the invoice on behalf of the partner.
     * @example false
     */
    self_billed?: boolean;
}
export interface CreditNotes {
    credit_notes: CreditNoteObject[];
}
export interface CreditNoteCreateInput {
    credit_note: {
        /**
         * The invoice unique identifier, created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        invoice_id: string;
        /**
         * The reason of the credit note creation.
         * Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
         * @example "duplicated_charge"
         */
        reason?: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other" | null;
        /**
         * The description of the credit note.
         * @example "description"
         */
        description?: string;
        /**
         * The total amount to be credited on the customer balance.
         * @example 10
         */
        credit_amount_cents?: number | null;
        /**
         * The total amount to be refunded to the customer.
         * @example 5
         */
        refund_amount_cents?: number | null;
        /**
         * The list of credit note's items.
         * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
         */
        items: {
            /**
             * The fee unique identifier, created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            fee_id: string;
            /**
             * The amount of the credit note item, expressed in cents.
             * @example 10
             */
            amount_cents: number;
        }[];
    };
}
export interface CreditNoteUpdateInput {
    credit_note: {
        /**
         * The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
         *
         * - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
         * - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
         * - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
         * @example "succeeded"
         */
        refund_status: "pending" | "succeeded" | "failed";
    };
}
export type CreditNoteExtendedObject = CreditNoteObject & {
    customer?: any;
};
export interface CreditNotePaymentProviderRefundError {
    /**
     * Unique identifier assigned to the credit note within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit note record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_credit_note_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_customer_id?: string;
    /**
     * The type of payment provider code
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    provider_error?: string | Record<string, any>;
}
/** @example "USD" */
export type Currency = "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "STD" | "SZL" | "THB" | "TJS" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "YER" | "ZAR" | "ZMW";
export interface Customer {
    customer: CustomerObjectExtended;
}
/** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
export interface Address {
    /**
     * The first line of the billing address
     * @example "5230 Penfield Ave"
     */
    address_line1?: string | null;
    /**
     * The second line of the billing address
     * @example null
     */
    address_line2?: string | null;
    /**
     * The city of the customer's billing address
     * @example "Woodland Hills"
     */
    city?: string | null;
    /**
     * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
     * @example "US"
     */
    country?: Country | null;
    /**
     * The state of the customer's billing address
     * @example "CA"
     */
    state?: string | null;
    /**
     * The zipcode of the customer's billing address
     * @example "91364"
     */
    zipcode?: string | null;
}
/** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
export interface CustomerBillingConfiguration {
    /**
     * The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items
     * @example 3
     */
    invoice_grace_period?: number;
    /**
     * The payment provider utilized to initiate payments for invoices issued by Lago.
     * Accepted values: `stripe`, `adyen`, `gocardless` or null. This field is required if you intend to assign a `provider_customer_id`.
     * @example "stripe"
     */
    payment_provider?: "stripe" | "adyen" | "gocardless";
    /**
     * Unique code used to identify a payment provider connection.
     * @example "stripe-eu-1"
     */
    payment_provider_code?: string;
    /**
     * The customer ID within the payment provider's system. If this field is not provided, Lago has the option to create a new customer record within the payment provider's system on behalf of the customer
     * @example "cus_12345"
     */
    provider_customer_id?: string;
    /**
     * Set this field to `true` if you want to create the customer in the payment provider synchronously with the customer creation process in Lago. This option is applicable only when the `provider_customer_id` is `null` and the customer is automatically created in the payment provider through Lago. By default, the value is set to `false`
     * @example true
     */
    sync?: boolean;
    /**
     * Set this field to `true` if you want to create a customer record in the payment provider's system. This option is applicable only when the `provider_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
     * @example true
     */
    sync_with_provider?: boolean;
    /**
     * The document locale, specified in the ISO 639-1 format. This field represents the language or locale used for the documents issued by Lago
     * @example "fr"
     */
    document_locale?: string;
    /**
     * Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, the payment methods will be set to `card`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit`, `boleto`, `link`, `crypto` and `customer_balance`. Note that when `link` is selected, `card` should also be provided in the array. When `customer_balance` is selected, no other payment can be selected.
     * @example ["card","sepa_debit","us_bank_account","bacs_debit","link","boleto","crypto","customer_balance"]
     */
    provider_payment_methods?: string[] | null;
}
/** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
export interface IntegrationCustomer {
    /**
     * A unique identifier for the integration customer object in the Lago application.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id?: string;
    /**
     * The integration type used for accounting and tax syncs.
     * Accepted values: `netsuite, anrok`.
     * @example "netsuite"
     */
    type?: "netsuite" | "anrok";
    /**
     * Unique code used to identify an integration connection.
     * @example "netsuite-eu-1"
     */
    integration_code?: string;
    /**
     * The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
     * @example "cus_12345"
     */
    external_customer_id?: string;
    /**
     * Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
     * @example true
     */
    sync_with_provider?: boolean;
    /**
     * This optional field is needed only when working with `netsuite` connection.
     * @example "2"
     */
    subsidiary_id?: string;
}
export interface IntegrationProviderErrorObject {
    /**
     * Unique identifier assigned to the integration within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the integration's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_integration_id: string;
    /**
     * The type of integration provider
     * @example "netsuite"
     */
    provider: string;
    /**
     * Unique code used to identify an integration connection.
     * @example "netsuite-eu-1"
     */
    provider_code: string;
    provider_error: string | Record<string, any>;
}
/** Array of filter object, representing multiple dimensions for a charge item. */
export type CustomerChargeFiltersUsageObject = {
    /**
     * The number of units consumed for a specific charge filter related to a charge item.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "0.9"
     */
    units?: string;
    /**
     * The amount in cents, tax excluded, consumed for a specific charge filter related to a charge item.
     * @example 1000
     */
    amount_cents?: number;
    /**
     * The quantity of usage events that have been recorded for a particular charge filter during the specified time period. These events may also be referred to as the number of transactions in some contexts.
     * @example 10
     */
    events_count?: number;
    /**
     * Specifies the name that will be displayed on an invoice.
     * @example "AWS eu-east-1"
     */
    invoice_display_name?: string;
    /**
     * List of filter values applied to the usage.
     * @example {"region":"us-east-1"}
     */
    values?: Record<string, string>;
}[];
/** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
export type CustomerChargeGroupedUsageObject = {
    /**
     * The amount in cents, tax excluded, consumed for a specific group related to a charge item.
     * @example 1000
     */
    amount_cents?: number;
    /**
     * The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
     * @example 10
     */
    events_count?: number;
    /**
     * The number of units consumed for a specific group related to a charge item.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "0.9"
     */
    units?: string;
    /** Key value list of event properties aggregated by the charge model */
    grouped_by?: Record<string, string>;
    /** Array of filter object, representing multiple dimensions for a charge item. */
    filters?: CustomerChargeFiltersUsageObject;
}[];
export interface CustomerChargeUsageObject {
    /**
     * The number of units consumed by the customer for a specific charge item.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1.0"
     */
    units: string;
    /**
     * The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
     * @example 10
     */
    events_count: number;
    /**
     * The amount in cents, tax excluded, consumed by the customer for a specific charge item.
     * @example 123
     */
    amount_cents: number;
    /**
     * The currency of a usage item consumed by the customer.
     * @example "EUR"
     */
    amount_currency: Currency;
    /** Object listing all the properties for a specific charge item. */
    charge: {
        /**
         * Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge's record within the Lago system.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_id: string;
        /**
         * The pricing model applied to this charge. Possible values are standard, `graduated`, `percentage`, `package` or `volume`.
         * @example "graduated"
         */
        charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
         * @example "Setup"
         */
        invoice_display_name?: string;
    };
    /** The related billable metric object. */
    billable_metric: {
        /**
         * Unique identifier assigned to the billable metric within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the billable metric's record within the Lago system.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_id: string;
        /**
         * The name of the billable metric used for this charge.
         * @example "Storage"
         */
        name: string;
        /**
         * The code of the billable metric used for this charge.
         * @example "storage"
         */
        code: string;
        /**
         * The aggregation type of the billable metric used for this charge. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
         * @example "sum_agg"
         */
        aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
    };
    /** Array of filter object, representing multiple dimensions for a charge item. */
    filters?: CustomerChargeFiltersUsageObject;
    /** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
    grouped_usage?: CustomerChargeGroupedUsageObject;
}
export interface CustomerCreateInput {
    customer: {
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
         */
        external_id: string;
        /**
         * The first line of the billing address
         * @example "5230 Penfield Ave"
         */
        address_line1?: string | null;
        /**
         * The second line of the billing address
         * @example ""
         */
        address_line2?: string | null;
        /**
         * The city of the customer's billing address
         * @example "Woodland Hills"
         */
        city?: string | null;
        /**
         * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
         * @example "US"
         */
        country?: Country | null;
        /** Currency of the customer. Format must be ISO 4217 */
        currency?: Currency | null;
        /**
         * The email of the customer
         * @format email
         * @example "dinesh@piedpiper.test"
         */
        email?: string | null;
        /**
         * The legal company name of the customer
         * @example "Coleman-Blair"
         */
        legal_name?: string | null;
        /**
         * The legal company number of the customer
         * @example "49-008-2965"
         */
        legal_number?: string | null;
        /**
         * The logo URL of the customer
         * @example "http://hooli.com/logo.png"
         */
        logo_url?: string | null;
        /**
         * The full name of the customer
         * @example "Gavin Belson"
         */
        name?: string | null;
        /**
         * First name of the customer
         * @example "Gavin"
         */
        firstname?: string | null;
        /**
         * Last name of the customer
         * @example "Belson"
         */
        lastname?: string | null;
        /**
         * The type of the account. It can have one of the following values:
         * - `customer`: the account is a customer, default value.
         * - `partner`: the account is a partner.
         * @example "customer"
         */
        account_type?: "customer" | "partner" | null;
        /**
         * The type of the customer. It can have one of the following values:
         * - `company`: the customer is a company.
         * - `individual`: the customer is an individual.
         */
        customer_type?: "company" | "individual" | null;
        /**
         * The phone number of the customer
         * @example "1-171-883-3711 x245"
         */
        phone?: string | null;
        /**
         * The state of the customer's billing address
         * @example "CA"
         */
        state?: string | null;
        /**
         * List of unique code used to identify the taxes.
         * @example ["french_standard_vat"]
         */
        tax_codes?: string[];
        /**
         * The tax identification number of the customer
         * @example "EU123456789"
         */
        tax_identification_number?: string | null;
        /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
        timezone?: Timezone | null;
        /**
         * The custom website URL of the customer
         * @example "http://hooli.com"
         */
        url?: string | null;
        /**
         * The zipcode of the customer's billing address
         * @example "91364"
         */
        zipcode?: string | null;
        /**
         * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
         * @example 30
         */
        net_payment_term?: number | null;
        /**
         * Specifies how invoices with a zero total amount should be handled:
         * - `inherit`: (Default) Follows the organization-level configuration.
         * - `finalize`: Invoices are issued and finalized even if the total amount is zero.
         * - `skip`: Invoices with a total amount of zero are not finalized.
         * @example "inherit"
         */
        finalize_zero_amount_invoice?: "inherit" | "skip" | "finalize";
        /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
        billing_configuration?: CustomerBillingConfiguration;
        /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
        shipping_address?: Address;
        integration_customers?: {
            /**
             * A unique identifier for the integration customer object in the Lago application.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            id?: string;
            /**
             * The integration type used for accounting and tax syncs.
             * Accepted values: `netsuite, anrok, xero`.
             * @example "netsuite"
             */
            integration_type?: "netsuite" | "anrok" | "xero";
            /**
             * Unique code used to identify an integration connection.
             * @example "netsuite-eu-1"
             */
            integration_code?: string;
            /**
             * The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
             * @example "cus_12345"
             */
            external_customer_id?: string;
            /**
             * Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
             * @example true
             */
            sync_with_provider?: boolean;
            /**
             * This optional field is needed only when working with `netsuite` connection.
             * @example "2"
             */
            subsidiary_id?: string;
        }[];
        /** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
        metadata?: {
            /**
             * Identifier for the metadata object, only required when updating a key-value pair
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            id?: string;
            /**
             * The metadata object key
             * @example "Purchase Order"
             */
            key: string;
            /**
             * The metadata object value
             * @example "123456789"
             */
            value: string;
            /**
             * Determines whether the item or information should be displayed in the invoice. If set to true, the item or information will be included and visible in the generated invoice. If set to false, the item or information will be excluded and not displayed in the invoice.
             * @example true
             */
            display_in_invoice: boolean;
        }[];
        /**
         * Set to `true` to exclude all invoice custom sections from PDF generation for this customer only. False by default
         * @example false
         */
        skip_invoice_custom_sections?: boolean;
        /**
         * List of unique codes identifying the invoice custom sections.
         * @example ["eu_bank_details"]
         */
        invoice_custom_section_codes?: string[];
    };
}
export interface CustomerIntegratrionErrorObject {
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The type of accounting provider code
     * @example "anrok"
     */
    accounting_provider: "anrok" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
    /**
     * Code of the accounting provider
     * @example "Netsuite Prod"
     */
    accounting_provider_code: string;
    provider_error: string | Record<string, any>;
}
/** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
export interface CustomerMetadata {
    /**
     * A unique identifier for the customer metadata object in the Lago application. Can be used to update a key-value pair
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The metadata object key
     * @example "Purchase Order"
     */
    key: string;
    /**
     * The metadata object value
     * @example "123456789"
     */
    value: string;
    /**
     * Determines whether the item or information should be displayed in the invoice. If set to true, the item or information will be included and visible in the generated invoice. If set to false, the item or information will be excluded and not displayed in the invoice.
     * @example true
     */
    display_in_invoice: boolean;
    /**
     * The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
}
export type CustomerObject = {
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The unique identifier assigned to the customer within the organization's scope. This identifier is used to track and reference the customer's order of creation within the organization's system. It ensures that each customer has a distinct `sequential_id`` associated with them, allowing for easy identification and sorting based on the order of creation
     * @example 1
     */
    sequential_id: number;
    /**
     * A concise and unique identifier for the customer, formed by combining the Organization's `name`, `id`, and customer's `sequential_id`
     * @example "LAG-1234-001"
     */
    slug: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_id: string;
    /**
     * The first line of the billing address
     * @example "5230 Penfield Ave"
     */
    address_line1?: string | null;
    /**
     * The second line of the billing address
     * @example null
     */
    address_line2?: string | null;
    /** The customer's applicable timezone, used for billing purposes in their local time. */
    applicable_timezone: Timezone;
    /**
     * The city of the customer's billing address
     * @example "Woodland Hills"
     */
    city?: string | null;
    /**
     * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
     * @example "US"
     */
    country?: Country | null;
    /**
     * Currency of the customer. Format must be ISO 4217
     * @example "USD"
     */
    currency?: Currency | null;
    /**
     * The email of the customer
     * @format email
     * @example "dinesh@piedpiper.test"
     */
    email?: string | null;
    /**
     * The legal company name of the customer
     * @example "Coleman-Blair"
     */
    legal_name?: string | null;
    /**
     * The legal company number of the customer
     * @example "49-008-2965"
     */
    legal_number?: string | null;
    /**
     * The logo URL of the customer
     * @example "http://hooli.com/logo.png"
     */
    logo_url?: string | null;
    /**
     * The full name of the customer
     * @example "Gavin Belson"
     */
    name?: string | null;
    /**
     * First name of the customer
     * @example "Gavin"
     */
    firstname?: string | null;
    /**
     * Last name of the customer
     * @example "Belson"
     */
    lastname?: string | null;
    /**
     * The type of the account. It can have one of the following values:
     * - `customer`: the account is a customer.
     * - `partner`: the account is a partner.
     * @example "customer"
     */
    account_type?: "customer" | "partner";
    /**
     * The type of the customer. It can have one of the following values:
     * - `company`: the customer is a company.
     * - `individual`: the customer is an individual.
     */
    customer_type?: "company" | "individual" | null;
    /**
     * The phone number of the customer
     * @example "1-171-883-3711 x245"
     */
    phone?: string | null;
    /**
     * The state of the customer's billing address
     * @example "CA"
     */
    state?: string | null;
    /**
     * The tax identification number of the customer
     * @example "EU123456789"
     */
    tax_identification_number?: string | null;
    /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
    timezone?: Timezone | null;
    /**
     * The custom website URL of the customer
     * @example "http://hooli.com"
     */
    url?: string | null;
    /**
     * The zipcode of the customer's billing address
     * @example "91364"
     */
    zipcode?: string | null;
    /**
     * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
     * @example 30
     */
    net_payment_term?: number | null;
    /**
     * The date of the customer creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the customer object was created
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The date of the customer update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the customer object was updated
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    updated_at?: string;
    /**
     * Specifies how invoices with a zero total amount should be handled:
     * - `inherit`: (Default) Follows the organization-level configuration.
     * - `finalize`: Invoices are issued and finalized even if the total amount is zero.
     * - `skip`: Invoices with a total amount of zero are not finalized.
     * @example "inherit"
     */
    finalize_zero_amount_invoice?: "inherit" | "skip" | "finalize";
    /**
     * Set to true to exclude all invoice custom sections from PDF generation for this customer only.
     * @example false
     */
    skip_invoice_custom_sections?: boolean;
    /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
    billing_configuration?: CustomerBillingConfiguration;
    /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
    shipping_address?: Address;
    metadata?: CustomerMetadata[];
} & {
    integration_customers?: IntegrationCustomer[];
};
export type CustomerObjectExtended = CustomerObject & {
    metadata?: CustomerMetadata[];
    /** List of customer taxes */
    taxes?: TaxObject[];
    /** The customer’s invoice custom section used for generating invoices. */
    applicable_invoice_custom_sections?: {
        /**
         * Unique identifier for the invoice custom section in the Lago application, generated by Lago to ensure record uniqueness within the system.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_id: string;
        /**
         * Name of the invoice custom section.
         * @example "EU Bank Details"
         */
        name: string;
        /**
         * Unique code identifying the invoice custom section for the API request.
         * @example "eu_bank_details"
         */
        code: string;
        /**
         * Internal description of the invoice custom section.
         * @example "This section contains the bank details for EU customers."
         */
        description?: string;
        /**
         * The value shown on the invoice PDF.
         * @example "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143"
         */
        details?: string;
        /**
         * The name of the invoice custom section displayed on the invoice.
         * @example "Bank Details:"
         */
        display_name?: string;
        /**
         * Set to true if the invoice custom section is a default for the organization.
         * @example true
         */
        applied_to_organization?: boolean;
        /**
         * Unique identifier for the organization associated with the invoice custom section.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        organization_id?: string;
        /**
         * Creation date of the tax.
         * @format date-time
         * @example "2023-07-06T14:35:58Z"
         */
        created_at?: string;
    }[];
};
export interface CustomerPastUsage {
    usage_periods: CustomerUsage[];
    meta: PaginationMeta;
}
export interface CustomerPaymentProvidernErrorObject {
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The type of payment provider
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code: string;
    provider_error: string | Record<string, any>;
}
export interface CustomersPaginated {
    customers: CustomerObjectExtended[];
    meta: PaginationMeta;
}
export interface CustomerTaxProviderErrorObject {
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The type of tax provider
     * @example "anrock"
     */
    tax_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
    /**
     * Code of the tax provider
     * @example "Stripe Prod"
     */
    tax_provider_code: string;
    provider_error: string | Record<string, any>;
}
export interface CustomerUsage {
    customer_usage: CustomerUsageObject;
}
export interface CustomerUsageObject {
    /**
     * The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-07-01T00:00:00Z"
     */
    from_datetime: string;
    /**
     * The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-07-31T23:59:59Z"
     */
    to_datetime: string;
    /**
     * The date of creation of the invoice.
     * @format date
     * @example "2022-08-01"
     */
    issuing_date: string;
    /**
     * A unique identifier associated with the invoice related to this particular usage record.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id?: string | null;
    /**
     * The currency of the customer's current usage.
     * @example "EUR"
     */
    currency?: Currency;
    /**
     * The amount in cents, tax excluded.
     * @example 123
     */
    amount_cents: number;
    /**
     * The tax amount in cents.
     * @example 200
     */
    taxes_amount_cents: number;
    /**
     * The total amount in cents, tax included.
     * @example 123
     */
    total_amount_cents: number;
    /** Array of charges that comprise the current usage. It contains detailed information about individual charge items associated with the usage. */
    charges_usage: CustomerChargeUsageObject[];
}
export type CustomerViesCheckObject = {
    vies_check?: {
        /**
         * Whether the VIES check was successful
         * @example true
         */
        valid?: boolean;
    };
};
export interface Event {
    event: EventObject;
}
export interface EventBatchInput {
    events: any[];
}
export interface EventEstimateFeesInput {
    event: {
        /**
         * The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
         * @example "storage"
         */
        code: string;
        /**
         * The unique identifier of the subscription within your application.
         * @example "sub_1234567890"
         */
        external_subscription_id: string;
        /** This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. */
        properties?: object;
    };
}
export interface EventInput {
    event: {
        /**
         * This field represents a unique identifier for the event. It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.
         * @example "transaction_1234567890"
         */
        transaction_id: string;
        /**
         * The unique identifier of the subscription in your application. This field is mandatory in order to link events to the correct customer subscription.
         * @example "sub_1234567890"
         */
        external_subscription_id: string;
        /**
         * The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
         * @example "storage"
         */
        code: string;
        /**
         * This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).
         * If this timestamp is not provided, the API will automatically set it to the time of event reception.
         * You can also provide miliseconds precision by appending decimals to the timestamp.
         * @example "1651240791.123"
         */
        timestamp?: number | string;
        /**
         * The precise total amount in cents with precision used by the `dynamic` pricing model to compute the usage amount.
         * @example "1234.56"
         */
        precise_total_amount_cents?: string | null;
        /**
         * This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
         * @example {"gb":10}
         */
        properties?: Record<string, string | number>;
    };
}
export interface EventObject {
    /**
     * Unique identifier assigned to the event within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the event's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * This field represents a unique identifier for the event. It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.
     * @example "transaction_1234567890"
     */
    transaction_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string | null;
    /**
     * The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
     * @example "storage"
     */
    code: string;
    /**
     * This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC). If this timestamp is not provided, the API will automatically set it to the time of event reception.
     * @format date-time
     * @example "2022-04-29T08:59:51.123Z"
     */
    timestamp: string;
    /**
     * The precise total amount that was sent in the event payload. This filed is used by the `dynamic` pricing model.
     * @example "1234.56"
     */
    precise_total_amount_cents?: string | null;
    /**
     * This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
     * @example {"gb":10}
     */
    properties?: {
        /** The `operation_type` field is only necessary when adding or removing a specific unit when the targeted billable metric adopts a `unique_count_agg` aggregation method. In other cases, the `operation_type` field is not required. The valid values for the `operation_type` field are `add` or `remove`, which indicate whether the unit is being added or removed from the unique count aggregation, respectively. */
        operation_type?: "add" | "remove";
        [key: string]: any;
    };
    /**
     * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_subscription_id: string | null;
    /**
     * The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided.
     * @example "sub_1234567890"
     */
    external_subscription_id: string;
    /**
     * The creation date of the event's record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
}
export interface EventErrorsObject {
    /**
     * HTTP status code. It will always be 422
     * @example 422
     */
    status: number;
    /**
     * HTTP error description. It will always be "Unprocessable Entity"
     * @example "Unprocessable Entity"
     */
    error: string;
    message: string | Record<string, any>;
    event: EventObject;
}
export interface EventsErrorsObject {
    /**
     * List of event transaction_id with an invalid code
     * @example ["transaction_1234567890"]
     */
    invalid_code: string[];
    /**
     * List of event transaction_id with a missing aggregation property
     * @example ["transaction_1234567890"]
     */
    missing_aggregation_property: string[];
    /**
     * List of event transaction_id with invalid filter values
     * @example ["transaction_1234567890"]
     */
    invalid_filter_values: string[];
}
export interface Fee {
    fee: FeeObject;
}
export type FeeAppliedTaxObject = BaseAppliedTax & {
    /**
     * Unique identifier of the fee, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_fee_id?: string;
};
export interface FeeObject {
    /**
     * 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.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id?: string | null;
    /**
     * Unique identifier assigned to the charge that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_charge_id?: string | null;
    /**
     * Unique identifier assigned to the charge filter that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_charge_filter_id?: string | null;
    /**
     * Unique identifier assigned to the invoice that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id?: string | null;
    /**
     * Unique identifier assigned to the true-up fee when a minimum has been set to the charge. This identifier helps to distinguish and manage the true-up fee associated with the charge, which may be applicable when a minimum threshold or limit is set for the charge amount.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_true_up_fee_id?: string | null;
    /**
     * Unique identifier assigned to the parent fee on which the true-up fee is assigned. This identifier establishes the relationship between the parent fee and the associated true-up fee.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_true_up_parent_fee_id?: string | null;
    /**
     * Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_subscription_id?: string | null;
    /**
     * Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id?: string | null;
    /**
     * Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
     * @example "external_id"
     */
    external_customer_id?: string | null;
    /**
     * Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription.
     * @example "external_id"
     */
    external_subscription_id?: string | null;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
     * @example "Setup Fee (SF1)"
     */
    invoice_display_name?: string;
    /**
     * The cost of this specific fee, excluding any applicable taxes.
     * @example 100
     */
    amount_cents: number;
    /**
     * The cost of this specific fee, excluding any applicable taxes, with precision.
     * @example "1.0001"
     */
    precise_amount?: string;
    /**
     * The cost of this specific fee, including any applicable taxes, with precision.
     * @example "1.0212"
     */
    precise_total_amount?: string;
    /**
     * The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed.
     * @example "EUR"
     */
    amount_currency: Currency;
    /**
     * The cost of the tax associated with this specific fee.
     * @example 20
     */
    taxes_amount_cents: number;
    /**
     * The cost of the tax associated with this specific fee, with precision.
     * @example "0.20123"
     */
    taxes_precise_amount?: string;
    /**
     * The tax rate associated with this specific fee.
     * @example 20
     */
    taxes_rate: number;
    /**
     * The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer.
     * @example "0.32"
     */
    units: string;
    /**
     * The unit amount of the fee per unit, with precision.
     * @example "312.5"
     */
    precise_unit_amount: string;
    /**
     * The cost of this specific fee, including any applicable taxes.
     * @example 120
     */
    total_amount_cents: number;
    /**
     * The currency of this specific fee, including any applicable taxes.
     * @example "EUR"
     */
    total_amount_currency: Currency;
    /**
     * The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process.
     * @example 23
     */
    events_count?: number;
    /**
     * Flag that indicates whether the fee was paid in advance. It serves as a boolean value, where `true` represents that the fee was paid in advance (straightaway), and `false` indicates that the fee was not paid in arrears (at the end of the period).
     * @example true
     */
    pay_in_advance: boolean;
    /**
     * Flag that indicates whether the fee was included on the invoice. It serves as a boolean value, where `true` represents that the fee was included on the invoice, and `false` indicates that the fee was not included on the invoice.
     * @example true
     */
    invoiceable: boolean;
    /**
     * The beginning date of the period that the fee covers. It is applicable only to `subscription` and `charge` fees. This field indicates the start date of the billing period or subscription period associated with the fee.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    from_date?: string | null;
    /**
     * The ending date of the period that the fee covers. It is applicable only to `subscription` and `charge` fees. This field indicates the end date of the billing period or subscription period associated with the fee.
     * @format date-time
     * @example "2022-05-29T08:59:51Z"
     */
    to_date?: string | null;
    /**
     * Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are `pending`, `succeeded`, `failed` and `refunded`.
     * @example "pending"
     */
    payment_status: "pending" | "succeeded" | "failed" | "refunded";
    /**
     * The date and time when the fee was created. It is provided in Coordinated Universal Time (UTC) format.
     * @format date-time
     * @example "2022-08-24T14:58:59Z"
     */
    created_at?: string | null;
    /**
     * The date and time when the payment for the fee was successfully processed. It is provided in Coordinated Universal Time (UTC) format.
     * @format date-time
     * @example "2022-08-24T14:58:59Z"
     */
    succeeded_at?: string | null;
    /**
     * The date and time when the payment for the fee failed to process. It is provided in Coordinated Universal Time (UTC) format.
     * @format date-time
     * @example "2022-08-24T14:58:59Z"
     */
    failed_at?: string | null;
    /**
     * The date and time when the payment for the fee was refunded. It is provided in Coordinated Universal Time (UTC) format
     * @format date-time
     * @example "2022-08-24T14:58:59Z"
     */
    refunded_at?: string | null;
    /**
     * Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge` and the payment for the fee is made in advance (`pay_in_advance` is set to `true`).
     * @example "transaction_1234567890"
     */
    event_transaction_id?: string | null;
    /** List of all unit amount details for calculating the fee. */
    amount_details?: {
        /** Graduated ranges, used for a `graduated` charge model. */
        graduated_ranges?: {
            /**
             * Total units received in Lago.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "10.0"
             */
            units: string;
            /**
             * Lower value of a tier. It is either 0 or the previous range's `to_value + 1`.
             * @example 0
             */
            from_value: number;
            /**
             * Highest value of a tier.
             * - This value is higher than the from_value of the same tier.
             * - This value is null for the last tier.
             * @example 10
             */
            to_value: number | null;
            /**
             * Flat unit amount within a specified tier.
             * @example "1.0"
             */
            flat_unit_amount: string;
            /**
             * Amount per unit within a specified tier.
             * @example "1.0"
             */
            per_unit_amount: string;
            /**
             * Total amount of received units to be charged within a specified tier.
             * @example "10.0"
             */
            per_unit_total_amount: string;
            /**
             * Total amount to be charged for a specific tier, taking into account the flat_unit_amount and the per_unit_total_amount.
             * @example "11.0"
             */
            total_with_flat_amount: string;
        }[];
        /** Graduated percentage ranges, used for a `graduated_percentage` charge model. */
        graduated_percentage_ranges?: {
            /**
             * Total units received in Lago.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "10.0"
             */
            units: string;
            /**
             * Lower value of a tier. It is either 0 or the previous range's `to_value + 1`.
             * @example 0
             */
            from_value: number;
            /**
             * Highest value of a tier.
             * - This value is higher than the from_value of the same tier.
             * - This value is null for the last tier.
             * @example 10
             */
            to_value: number | null;
            /**
             * Flat unit amount within a specified tier.
             * @example "1.0"
             */
            flat_unit_amount: string;
            /**
             * Percentage rate applied within a specified tier.
             * @format ^[0-9]+.?[0-9]*$
             * @example "1.0"
             */
            rate: string;
            /**
             * Total amount of received units to be charged within a specified tier.
             * @example "10.0"
             */
            per_unit_total_amount: string;
            /**
             * Total amount to be charged for a specific tier, taking into account the flat_unit_amount and the per_unit_total_amount.
             * @example "11.0"
             */
            total_with_flat_amount: string;
        }[];
        /**
         * The quantity of units that are provided free of charge for each billing period in a `package` charge model.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10.0"
         */
        free_units?: string;
        /**
         * The quantity of units that are not provided free of charge for each billing period in a `package` charge model.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "40.0"
         */
        paid_units?: string;
        /**
         * The quantity of units included, defined for Package or Percentage charge model.
         * @example 1000
         */
        per_package_size?: number;
        /**
         * Total amount to charge for received paid_units, defined for Package or Percentage charge model.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "0.5"
         */
        per_package_unit_amount?: string;
        /**
         * The total units received in Lago for the Percentage charge model.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "20.0"
         */
        units?: string;
        /**
         * Total number of free events allowed for the Percentage charge model.
         * @example 10
         */
        free_events?: number;
        /**
         * Percentage rate applied for the Percentage charge model.
         * @format ^[0-9]+.?[0-9]*$
         * @example "1.0"
         */
        rate?: string;
        /**
         * Total amount of received units to be charged for the Percentage charge model.
         * @example "10.0"
         */
        per_unit_total_amount?: string;
        /**
         * Total number of paid events for the Percentage charge model.
         * @example 20
         */
        paid_events?: number;
        /**
         * Fixed fee unit price per received paid_event for the Percentage charge model.
         * @example "1.0"
         */
        fixed_fee_unit_amount?: string;
        /**
         * Total amount to charge for received paid_events for the Percentage charge model.
         * @example "20.0"
         */
        fixed_fee_total_amount?: string;
        /**
         * Total adjustment amount linked to minimum and maximum spending per transaction for the Percentage charge model.
         * @example "20.0"
         */
        min_max_adjustment_total_amount?: string;
        /** Volume ranges, used for a `volume` charge model. */
        volume_ranges?: {
            /**
             * The flat amount for a whole tier, excluding tax, for a `volume` charge model.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "0.5"
             */
            per_unit_amount: string;
            /**
             * The unit price, excluding tax, for a specific tier of a `volume` charge model.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "10.0"
             */
            flat_unit_amount: string;
            /**
             * Total amount of received units to be charged.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "10.0"
             */
            per_unit_total_amount: string;
        }[];
    };
    /**
     * Indicates if the fee belongs to self-billed invoice. Self-billing is a process where an organization creates the invoice on behalf of the partner.
     * @example false
     */
    self_billed?: boolean;
    /** Item attached to the fee */
    item: {
        /**
         * The fee type. Possible values are `add-on`, `charge`, `credit`, `subscription` or `commitment`.
         * @example "subscription"
         */
        type: "charge" | "add_on" | "subscription" | "credit";
        /**
         * The code of the fee item. It can be the code of the `add-on`, the code of the `charge`, the code of the `credit` or the code of the `subscription`.
         * @example "startup"
         */
        code: string;
        /**
         * The name of the fee item. It can be the name of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
         * @example "Startup"
         */
        name: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
         * @example "Setup Fee (SF1)"
         */
        invoice_display_name?: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the actual charge filter values will be used as the default display name.
         * @example "AWS eu-east-1"
         */
        filter_invoice_display_name?: string;
        /** Key value list of event properties */
        filters?: Record<string, string[]>;
        /**
         * Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_item_id: string;
        /**
         * The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction`, `Subscription` or `Commitment`.
         * @example "Subscription"
         */
        item_type: "AddOn" | "BillableMetric" | "Subscription" | "WalletTransaction";
        /** Key value list of event properties aggregated by the charge model */
        grouped_by?: Record<string, string>;
    };
    /** List of fee applied taxes */
    applied_taxes?: FeeAppliedTaxObject[];
}
export interface Fees {
    fees: FeeObject[];
}
export type FeesPaginated = Fees & {
    meta: PaginationMeta;
};
export interface FeeTaxProviderErrorObject {
    /**
     * Code of the tax provider
     * @example "Stripe Prod"
     */
    tax_provider_code: string;
    /**
     * Unique identifier assigned to the charge that the fee belongs to
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_charge_id: string | null;
    /**
     * Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge`.
     * @example "transaction_1234567890"
     */
    event_transaction_id: string | null;
    provider_error: string | Record<string, any>;
}
export interface FeeUpdateInput {
    fee: {
        /**
         * The payment status of the fee. Possible values are `pending`, `succeeded`, `failed` or `refunded`.
         * @example "succeeded"
         */
        payment_status: "pending" | "succeeded" | "failed" | "refunded";
    };
}
export interface GrossRevenueObject {
    /**
     * Identifies the month to analyze revenue.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The total amount of revenue for a period, expressed in cents.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The currency of revenue analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency: Currency;
    /**
     * Contains invoices count.
     * @example 10
     */
    invoices_count: number;
}
export interface GrossRevenues {
    gross_revenues: GrossRevenueObject[];
}
export interface LifetimeUsage {
    lifetime_usage: LifetimeUsageObject;
}
export interface LifetimeUsageInput {
    lifetime_usage: {
        /**
         * The historical usage amount in cents for the subscription (provided by your own application).
         * @example 100
         */
        external_historical_usage_amount_cents: number;
    };
}
export interface LifetimeUsageObject {
    /**
     * Unique identifier assigned to the lifetime usage record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the lifetime usage record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier assigned to the subscription record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_subscription_id: string;
    /**
     * The subscription external unique identifier (provided by your own application).
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_subscription_id: string;
    /**
     * The historical usage amount in cents for the subscription (provided by your own application).
     * @example 100
     */
    external_historical_usage_amount_cents: number;
    /**
     * The total invoiced usage amount in cents for the subscription.
     * @example 100
     */
    invoiced_usage_amount_cents: number;
    /**
     * The current usage amount in cents for the subscription on the current billing period.
     * @example 100
     */
    current_usage_amount_cents: number;
    /**
     * The recording start date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
     * @format date-time
     * @example "2024-01-01T00:00:00Z"
     */
    from_datetime: string;
    /**
     * The recording end date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
     * @format date-time
     * @example "2024-12-31T23:59:59Z"
     */
    to_datetime: string;
    /** Array of usage thresholds attached to the subscription's plan. */
    usage_thresholds?: LifetimeUsageThresholdObject[];
}
export interface LifetimeUsageThresholdObject {
    /**
     * The usage threshold amount in cents.
     * @example 100
     */
    amount_cents: number;
    /**
     * The completion ratio of the usage threshold.
     * @example 0.5
     */
    completion_ratio: number;
    /**
     * The date and time when the usage threshold was reached. The date and time must be in ISO 8601 format.
     * @format date-time
     * @example "2024-01-01T00:00:00Z"
     */
    reached_at: string | null;
}
/** Minimum commitment for this plan. */
export type MinimumCommitmentInput = {
    /**
     * The amount of the minimum commitment in cents.
     * @example 100000
     */
    amount_cents: number;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.
     * @example "Minimum Commitment (C1)"
     */
    invoice_display_name?: string;
    /**
     * List of unique code used to identify the taxes.
     * @example ["french_standard_vat"]
     */
    tax_codes?: string[];
} | null;
export type MinimumCommitmentObject = {
    /**
     * Unique identifier of the minimum commitment, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The unique code representing the plan to be attached to the customer.
     * @example "premium"
     */
    plan_code?: string;
    /**
     * The amount of the minimum commitment in cents.
     * @example 100000
     */
    amount_cents: number;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.
     * @example "Minimum Commitment (C1)"
     */
    invoice_display_name?: string;
    /**
     * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `quarterly`, `monthly` or `weekly`.
     * @example "monthly"
     */
    interval?: "weekly" | "monthly" | "quarterly" | "yearly";
    /**
     * The date and time when the minimum commitment was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the minimum commitment was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The date and time when the minimum commitment was updated. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the minimum commitment was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    updated_at?: string;
    /** All taxes applied to the minimum commitment. */
    taxes?: TaxObject[];
} | null;
export interface MrrObject {
    /**
     * Identifies the month to analyze MRR.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The total amount of MRR, expressed in cents.
     * @example 50000
     */
    amount_cents?: number;
    /**
     * The currency of MRR analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency?: Currency;
}
export interface Mrrs {
    mrrs: MrrObject[];
}
export interface Invoice {
    invoice: InvoiceObjectExtended;
}
export type InvoiceAppliedTaxObject = BaseAppliedTax & {
    /**
     * Unique identifier of the invoice, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id?: string;
    /**
     * Fees total amount on which the tax is applied
     * @example 20000
     */
    fees_amount_cents?: number;
};
export interface InvoiceCollectionObject {
    /**
     * Identifies the month to analyze revenue.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The payment status of the invoices.
     * @example "succeeded"
     */
    payment_status?: "pending" | "succeeded" | "failed";
    /**
     * Contains invoices count.
     * @example 10
     */
    invoices_count: number;
    /**
     * The total amount of revenue for a period, expressed in cents.
     * @example 50000
     */
    amount_cents?: number;
    /**
     * The currency of revenue analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency?: Currency;
}
export interface InvoiceCollections {
    invoice_collections: InvoiceCollectionObject[];
}
export interface InvoicedUsageObject {
    /**
     * Identifies the month to analyze revenue.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The code of the usage-based billable metrics.
     * @example "code1"
     */
    code?: string;
    /**
     * The total amount of revenue for a period, expressed in cents.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The currency of revenue analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency: Currency;
}
export interface InvoicedUsages {
    invoiced_usages: InvoicedUsageObject[];
}
export interface InvoiceMetadataObject {
    /**
     * Unique identifier assigned to the invoice metadata within the Lago application.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id?: string;
    /**
     * Represents the key of the metadata's key-value pair.
     * @example "digital_ref_id"
     */
    key?: string;
    /**
     * Represents the value of the metadata's key-value pair.
     * @example "INV-0123456-98765"
     */
    value?: string;
    /**
     * The date and time when the metadata object was created. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at?: string;
}
export type InvoiceObject = {
    /**
     * 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.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * This ID helps in uniquely identifying and organizing the invoices associated with a specific customer. It provides a sequential numbering system specific to the customer, allowing for easy tracking and management of invoices within the customer's context.
     * @example 2
     */
    sequential_id?: number;
    /**
     * The unique number assigned to the invoice. This number serves as a distinct identifier for the invoice and helps in differentiating it from other invoices in the system.
     * @example "LAG-1234-001-002"
     */
    number: string;
    /**
     * The date when the invoice was issued. It is provided in the ISO 8601 date format.
     * @format date
     * @example "2022-04-30"
     */
    issuing_date: string;
    /**
     * The date when the payment dispute was lost. It is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    payment_dispute_lost_at?: string;
    /**
     * The payment due date for the invoice, specified in the ISO 8601 date format.
     * @format date
     * @example "2022-04-30"
     */
    payment_due_date?: string;
    /**
     * Specifies if the payment is considered as overdue.
     * @example true
     */
    payment_overdue?: boolean;
    /**
     * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
     * @example 30
     */
    net_payment_term?: number;
    /**
     * The type of invoice issued. Possible values are `subscription`, `one-off`, `credit` or `progressive_billing`.
     * @example "subscription"
     */
    invoice_type: "subscription" | "add_on" | "credit" | "one_off" | "progressive_billing";
    /**
     * The status of the invoice. It indicates the current state of the invoice and can have following values:
     * - `draft`: the invoice is in the draft state, waiting for the end of the grace period to be finalized. During this period, events can still be ingested and added to the invoice.
     * - `finalized`: the invoice has been issued and finalized. In this state, events cannot be ingested or added to the invoice anymore.
     * - `voided`: the invoice has been issued and subsequently voided. In this state, events cannot be ingested or added to the invoice anymore.
     * - `pending`: the invoice remains pending until the taxes are fetched from the external provider.
     * - `failed`: during an attempt of finalization of the invoice, an error happened. This invoice will have an array of error_details, explaining, in which part of the system an error happened and how it's possible to fix it. This invoice can't be edited or updated, only retried. This action will discard current error_details and will create new ones if the finalization failed again.
     * @example "finalized"
     */
    status: "draft" | "finalized" | "voided" | "failed" | "pending";
    /**
     * The status of the payment associated with the invoice. It can have one of the following values:
     * - `pending`: the payment is pending, waiting for payment processing in Stripe or when the invoice is emitted but users have not updated the payment status through the endpoint.
     * - `succeeded`: the payment of the invoice has been successfully processed.
     * - `failed`: the payment of the invoice has failed or encountered an error during processing.
     * @example "succeeded"
     */
    payment_status: "pending" | "succeeded" | "failed";
    /**
     * The currency of the invoice issued.
     * @example "EUR"
     */
    currency: Currency;
    /**
     * The total sum of fees amount in cents. It calculates the cumulative amount of all the fees associated with the invoice, providing a consolidated value.
     * @example 100
     */
    fees_amount_cents: number;
    /**
     * The total sum of all coupons discounted on the invoice. It calculates the cumulative discount amount applied by coupons, expressed in cents.
     * @example 10
     */
    coupons_amount_cents: number;
    /**
     * The total sum of all credit notes discounted on the invoice. It calculates the cumulative discount amount applied by credit notes, expressed in cents.
     * @example 10
     */
    credit_notes_amount_cents: number;
    /**
     * Subtotal amount, excluding taxes, expressed in cents.
     * This field depends on the version number. Here are the definitions based on the version:
     * - Version 1: is equal to the sum of `fees_amount_cents`, minus `coupons_amount_cents`, and minus `prepaid_credit_amount_cents`.
     * - Version 2: is equal to the `fees_amount_cents`.
     * - Version 3 & 4: is equal to the `fees_amount_cents`, minus `coupons_amount_cents`
     * @example 100
     */
    sub_total_excluding_taxes_amount_cents: number;
    /**
     * The sum of tax amount associated with the invoice, expressed in cents.
     * @example 20
     */
    taxes_amount_cents: number;
    /**
     * Subtotal amount, including taxes, expressed in cents.
     * This field depends on the version number. Here are the definitions based on the version:
     * - Version 1: is equal to the `total_amount_cents`.
     * - Version 2: is equal to the sum of `fees_amount_cents` and `taxes_amount_cents`.
     * - Version 3 & 4: is equal to the sum `sub_total_excluding_taxes_amount_cents` and `taxes_amount_cents`
     * @example 120
     */
    sub_total_including_taxes_amount_cents: number;
    /**
     * The total sum of all prepaid credits discounted on the invoice. It calculates the cumulative discount amount applied by prepaid credits, expressed in cents.
     * @example 0
     */
    prepaid_credit_amount_cents: number;
    /**
     * The usage already billed in previous invoices. Only apply to `progressive_billing` and `subscription` invoices.
     * @example 0
     */
    progressive_billing_credit_amount_cents: number;
    /**
     * The sum of the amount and taxes amount on the invoice, expressed in cents. It calculates the total financial value of the invoice, including both the original amount and any applicable taxes.
     * @example 100
     */
    total_amount_cents: number;
    /** @example 3 */
    version_number: number;
    /**
     * Indicates if the invoice is self-billed. Self-billing is a process where an organization creates the invoice on behalf of the partner. This field specifies whether the invoice is self-billed or not.
     * @example false
     */
    self_billed?: boolean;
    /**
     * Contains the URL that provides direct access to the invoice PDF file. You can use this URL to download or view the PDF document of the invoice
     * @format uri
     * @example "https://getlago.com/invoice/file"
     */
    file_url?: string;
    /**
     * The date of the invoice creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the invoice object was created
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The date of the invoice update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the invoice object was updated
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    updated_at: string;
} & {
    /** The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice. */
    customer?: CustomerObject;
    billing_period?: {
        /**
         * Unique identifier assigned to the subscription, created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_subscription_id: string;
        /**
         * Unique identifier assigned to the subscription in your application.
         * @example "external_id"
         */
        external_subscription_id: string;
        /**
         * Unique identifier assigned to the plan, created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_plan_id?: string;
        /**
         * The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
         * @format date-time
         * @example "2022-04-29T08:59:51Z"
         */
        subscription_from_datetime: string;
        /**
         * The ending date of the subscription billing period. This field indicates the end date of the billing period associated with the subscription fee.
         * @format date-time
         * @example "2022-05-29T08:59:51Z"
         */
        subscription_to_datetime: string;
        /**
         * The beginning date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the start date of the billing period or subscription period associated with the fees.
         * @format date-time
         * @example "2022-04-29T08:59:51Z"
         */
        charges_from_datetime: string;
        /**
         * The ending date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the end date of the billing period or subscription period associated with the fees.
         * @format date-time
         * @example "2022-05-29T08:59:51Z"
         */
        charges_to_datetime: string;
        /**
         * The reason explaining why this subscription appears on the invoice.
         * @example "subscription_starting"
         */
        invoicing_reason: "subscription_starting" | "subscription_periodic" | "subscription_terminating" | "in_advance_charge" | "in_advance_charge_periodic" | "progressive_billing";
    }[];
    metadata?: InvoiceMetadataObject[];
    applied_taxes?: InvoiceAppliedTaxObject[];
    applied_usage_thresholds?: AppliedUsageThresholdObject[] | null;
};
export type InvoiceObjectExtended = InvoiceObject & {
    credits?: CreditObject[];
    fees?: FeeObject[];
    subscriptions?: SubscriptionObject[];
    error_details?: {
        /**
         * Unique identifier assigned to the error_detail within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the error's record within the Lago system.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_id: string | null;
        /**
         * Code that specifies part of the application / connection, where the error originally happened
         * @example "tax_error"
         */
        error_code: string;
        /**
         * Key value list of more elaborated error detail, where by the key of error_code an external service error details are stored
         * @example {"tax_error":"taxDateTooFarInFuture"}
         */
        details: object;
    }[];
};
export interface InvoiceOneOffCreateInput {
    invoice: {
        /**
         * Unique identifier assigned to the customer in your application.
         * @example "hooli_1234"
         */
        external_customer_id: string;
        /**
         * The currency of the invoice.
         * @example "EUR"
         */
        currency?: Currency;
        fees: {
            /**
             * The code of the add-on used as invoice item.
             * @example "setup_fee"
             */
            add_on_code: string;
            /**
             * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
             * @example "Setup Fee (SF1)"
             */
            invoice_display_name?: string;
            /**
             * The amount of the fee per unit, expressed in cents. By default, the amount of the add-on is used.
             * @example 12000
             */
            unit_amount_cents?: number | null;
            /**
             * The quantity of units associated with the fee. By default, only 1 unit is added to the invoice.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "2.5"
             */
            units?: string | null;
            /**
             * This is a description
             * @example "The description of the fee line item in the invoice. By default, the description of the add-on is used."
             */
            description?: string | null;
            /**
             * List of unique code used to identify the taxes.
             * @example ["french_standard_vat"]
             */
            tax_codes?: string[];
        }[];
    };
}
export interface InvoicePaymentFailureObject {
    /**
     * 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.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_invoice_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_customer_id?: string;
    /**
     * The type of payment provider code
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    provider_error?: string | Record<string, any>;
}
export interface InvoicesPaginated {
    invoices: InvoiceObject[];
    meta: PaginationMeta;
}
export interface InvoiceUpdateInput {
    invoice: {
        /**
         * The payment status of the invoice. Possible values are `pending`, `failed` or `succeeded`.
         * @example "succeeded"
         */
        payment_status?: "pending" | "succeeded" | "failed";
        metadata?: {
            /**
             * The metadata object identifier. Only required when updating existing metadata.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            id?: string;
            /**
             * The key in the key-value pair of the metadata.
             * @example "digital_ref_id"
             */
            key?: string;
            /**
             * The value in the key-value pair of the metadata.
             * @example "INV-0123456-98765"
             */
            value?: string;
        }[];
    };
}
export interface Organization {
    organization: OrganizationObject;
}
/** The custom billing settings for your organization. */
export interface OrganizationBillingConfiguration {
    /**
     * The customer invoice message that appears at the bottom of each billing documents.
     * @example "This is my customer footer"
     */
    invoice_footer?: string | null;
    /**
     * The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period.
     * @example 3
     */
    invoice_grace_period?: number;
    /**
     * The locale of the billing documents, expressed in the ISO 639-1 format. This field indicates the language or regional variant used for the documents content issued or the embeddable customer portal.
     * @example "en"
     */
    document_locale?: string;
}
export interface OrganizationObject {
    /**
     * Unique identifier assigned to the organization within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The name of your organization.
     * @example "Name1"
     */
    name: string;
    /**
     * The date of creation of your organization, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-05-02T13:04:09Z"
     */
    created_at: string | null;
    /**
     * The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner.
     * @example "https://webhook.brex.com"
     */
    webhook_url?: string | null;
    /**
     * The array containing your webhooks URLs.
     * @example ["https://webhook.brex.com","https://webhook2.brex.com"]
     */
    webhook_urls?: string[] | null;
    /**
     * The country of your organization.
     * @example "US"
     */
    country?: Country | null;
    /**
     * The default currency of an organization.
     * @example "USD"
     */
    default_currency?: Currency;
    /**
     * The first line of your organization's billing address.
     * @example "100 Brex Street"
     */
    address_line1?: string | null;
    /**
     * The second line of your organization's billing address.
     * @example null
     */
    address_line2?: string | null;
    /**
     * The state of your organization's billing address.
     * @example "NYC"
     */
    state?: string | null;
    /**
     * The zipcode of your organization's billing address.
     * @example "10000"
     */
    zipcode?: string | null;
    /**
     * The email address of your organization used to bill your customers.
     * @format email
     * @example "brex@brex.com"
     */
    email?: string | null;
    /**
     * The city of your organization's billing address.
     * @example "New York"
     */
    city?: string | null;
    /**
     * The legal name of your organization.
     * @example null
     */
    legal_name?: string | null;
    /**
     * The legal number of your organization.
     * @example null
     */
    legal_number?: string | null;
    /**
     * This parameter configures the method of incrementing invoice numbers for your customers.
     *
     * - `per_customer`: Invoice numbers are incremented individually for each customer. This means every customer will have their own unique sequence of invoice numbers, separate from other customers. It ensures that each customer's invoice numbers follow a distinct and isolated numbering pattern.
     * - `per_organization`: Invoice number incrementation is made across your entire organization. Rather than individual sequences for each customer, all invoices within the organization follow a single, unified numbering system. This creates a continuous and organization-wide sequence for all invoice numbers. Invoices are incremented per month (dynamic value used is YYYYMM), and invoice numbers are reset at the end of each month.
     *
     * The default value for `document_numbering` is set to `per_customer`, meaning that, unless changed, invoice numbers will increment uniquely for each customer.
     * @example "per_customer"
     */
    document_numbering: "per_customer" | "per_organization";
    /**
     * Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago.
     * @example "ORG-1234"
     */
    document_number_prefix: string;
    /**
     * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
     * @example 30
     */
    net_payment_term?: number;
    /**
     * The tax identification number of your organization.
     * @example "US123456789"
     */
    tax_identification_number?: string | null;
    /**
     * Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
     * @example "America/New_York"
     */
    timezone?: Timezone;
    /** The custom billing settings for your organization. */
    billing_configuration: OrganizationBillingConfiguration;
    /** List of default organization taxes */
    taxes?: TaxObject[];
    /**
     * Indicates whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized.
     * @example false
     */
    finalize_zero_amount_invoice?: boolean;
}
export interface OrganizationUpdateInput {
    organization: {
        /**
         * The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner.
         * @example "https://webhook.brex.com"
         */
        webhook_url?: string | null;
        /**
         * The country of your organization.
         * @example "US"
         */
        country?: Country | null;
        /**
         * The default currency of an organization.
         * @example "USD"
         */
        default_currency?: Currency;
        /**
         * The first line of your organization's billing address.
         * @example "100 Brex Street"
         */
        address_line1?: string | null;
        /**
         * The second line of your organization's billing address.
         * @example null
         */
        address_line2?: string | null;
        /**
         * The state of your organization's billing address.
         * @example "NYC"
         */
        state?: string | null;
        /**
         * The zipcode of your organization's billing address.
         * @example "10000"
         */
        zipcode?: string | null;
        /**
         * The email address of your organization used to bill your customers.
         * @format email
         * @example "brex@brex.com"
         */
        email?: string | null;
        /**
         * The city of your organization's billing address.
         * @example "New York"
         */
        city?: string | null;
        /**
         * The legal name of your organization.
         * @example null
         */
        legal_name?: string | null;
        /**
         * The legal number of your organization.
         * @example null
         */
        legal_number?: string | null;
        /**
         * This parameter configures the method of incrementing invoice numbers for your customers.
         *
         * - `per_customer`: Invoice numbers are incremented individually for each customer. This means every customer will have their own unique sequence of invoice numbers, separate from other customers. It ensures that each customer's invoice numbers follow a distinct and isolated numbering pattern.
         * - `per_organization`: Invoice number incrementation is made across your entire organization. Rather than individual sequences for each customer, all invoices within the organization follow a single, unified numbering system. This creates a continuous and organization-wide sequence for all invoice numbers. Invoices are incremented per month (dynamic value used is YYYYMM), and invoice numbers are reset at the end of each month.
         *
         * The default value for `document_numbering` is set to `per_customer`, meaning that, unless changed, invoice numbers will increment uniquely for each customer.
         * @example "per_customer"
         */
        document_numbering?: "per_customer" | "per_organization";
        /**
         * Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago.
         * @example "ORG-1234"
         */
        document_number_prefix?: string;
        /**
         * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
         * @example 30
         */
        net_payment_term?: number;
        /**
         * The tax identification number of your organization.
         * @example "US123456789"
         */
        tax_identification_number?: string | null;
        /**
         * Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
         * @example "America/New_York"
         */
        timezone?: Timezone;
        /**
         * Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values for are `invoice.finalized` and `credit_note.created`. By configuring this field, you can specify whether invoices, credit notes, or both should be sent to recipients via email.
         * @example ["invoice.finalized","credit_note.created"]
         */
        email_settings?: ("invoice.finalized" | "credit_note.created")[];
        /** The custom billing settings for your organization. */
        billing_configuration?: OrganizationBillingConfiguration;
        /**
         * Determines whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized.
         * @example false
         */
        finalize_zero_amount_invoice?: boolean;
    };
}
export interface OverdueBalanceObject {
    /**
     * Identifies the month to analyze revenue.
     * @example "2023-11-01T00:00:00.000Z"
     */
    month: string;
    /**
     * The total amount of revenue for a period, expressed in cents.
     * @example 50000
     */
    amount_cents: number;
    /**
     * The currency of revenue analytics. Format must be ISO 4217.
     * @example "USD"
     */
    currency: Currency;
    /**
     * The Lago invoice IDs associated with the revenue.
     * @example ["5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"]
     */
    lago_invoice_ids: string[];
}
export interface OverdueBalances {
    overdue_balances: OverdueBalanceObject[];
}
export interface PaginationMeta {
    /**
     * Current page.
     * @example 2
     */
    current_page: number;
    /**
     * Next page.
     * @example 3
     */
    next_page?: number | null;
    /**
     * Previous page.
     * @example 1
     */
    prev_page?: number | null;
    /**
     * Total number of pages.
     * @example 4
     */
    total_pages: number;
    /**
     * Total number of records.
     * @example 70
     */
    total_count: number;
}
export interface PaymentObject {
    /**
     * The unique identifier of the paid resource, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_payable_id: string;
    /**
     * Unique identifier of the customer, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The status of the payment within the payment provider
     * @example "processing"
     */
    status: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_id: string;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_customer_id: string;
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    /**
     * The type of payment provider
     * @example "stripe"
     */
    payment_provider_type: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Unique identifier of the payment within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_payment_id: string;
    next_action: Record<string, any>;
}
export interface PaymentProviderErrorObject {
    /**
     * Unique identifier assigned to the payment provider within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment provider's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_payment_provider_id: string;
    /**
     * The name of payment provider
     * @example "Stripe Prod"
     */
    payment_provider_name: string;
    /**
     * Code of the payment provider
     * @example "stripe"
     */
    payment_provider_code: string;
    /**
     * The source of the error
     * @example "stripe"
     */
    source: "stripe";
    /**
     * The action that was being performed when the error occurred
     * @example "payment_provider.register_webhook"
     */
    action?: "payment_provider.register_webhook";
    provider_error: string | Record<string, any>;
}
export interface PaymentRequestObject {
    /**
     * Unique identifier of the payment request, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The customer's email address used for sending dunning notifications
     * @format email
     * @example "dinesh@piedpiper.test"
     */
    email: string;
    /**
     * The sum of the total amounts of all the invoices included in the payment request, expressed in cents.
     * @example 100
     */
    amount_cents: number;
    /**
     * The currency of the payment request.
     * @example "EUR"
     */
    amount_currency: Currency;
    /**
     * The status of the payment associated with the payment request. It can have one of the following values:
     * - `pending`: the payment is pending, waiting for payment processing in the payment provider or when the invoice is emitted but users have not updated the payment status through the endpoint.
     * - `succeeded`: the payment of the payment request has been successfully processed.
     * - `failed`: the payment of the payment request has failed or encountered an error during processing.
     * @example "succeeded"
     */
    payment_status: "pending" | "succeeded" | "failed";
    /**
     * The date and time when the payment request was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the payment request was initially created.
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /** The customer on which the payment request applies. It refers to the customer account or entity associated with the payment request. */
    customer: any;
    invoices: any[];
}
export interface PaymentRequestPaymentFailureObject {
    /**
     * Unique identifier assigned to the payment request within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment request record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_payment_request_id: string;
    /**
     * List of unique identifiers assigned to the invoices within the Lago application. These IDs are exclusively created by Lago and serve as unique identifiers for the invoices records within the Lago system.
     * @example ["1a901a90-1a90-1a90-1a90-1a901a901a90"]
     */
    lago_invoice_ids: string[];
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_customer_id?: string;
    /**
     * The type of payment provider code
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    provider_error?: string | Record<string, any>;
}
export interface PaymentRequestsPaginated {
    payment_requests: PaymentRequestObject[];
    meta: PaginationMeta;
}
export interface Plan {
    plan: PlanObject;
}
export interface PlanCreateInput {
    plan: {
        /**
         * The name of the plan.
         * @example "Startup"
         */
        name?: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
         * @example "Startup plan"
         */
        invoice_display_name?: string;
        /**
         * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
         * @example "startup"
         */
        code?: string;
        /**
         * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `quarterly`, `monthly`, or `weekly`.
         * @example "monthly"
         */
        interval?: "weekly" | "monthly" | "quarterly" | "yearly";
        /**
         * The description on the plan.
         * @example "Plan for early stage startups."
         */
        description?: string;
        /**
         * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
         * @example 10000
         */
        amount_cents?: number;
        /**
         * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
         * @example "USD"
         */
        amount_currency?: Currency;
        /**
         * The duration in days during which the base cost of the plan is offered for free.
         * @example 5
         */
        trial_period?: number;
        /**
         * This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
         * @example true
         */
        pay_in_advance?: boolean;
        /**
         * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly`.
         * @example null
         */
        bill_charges_monthly?: boolean | null;
        /**
         * List of unique code used to identify the taxes.
         * @example ["french_standard_vat"]
         */
        tax_codes?: string[];
        /** Minimum commitment for this plan. */
        minimum_commitment?: MinimumCommitmentInput;
        /**
         * Additional usage-based charges for this plan.
         * @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
         */
        charges?: {
            /**
             * Unique identifier of the billable metric created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            billable_metric_id?: string;
            /**
             * Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `graduated_percentage` `package`, `percentage`, `volume` or `dynamic`.
             * @example "standard"
             */
            charge_model?: "standard" | "graduated" | "graduated_percentage" | "package" | "percentage" | "volume" | "dynamic";
            /**
             * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
             * @example false
             */
            pay_in_advance?: boolean;
            /**
             * This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.
             * @example true
             */
            invoiceable?: boolean;
            /**
             * This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
             * This field determines whether and when the charge fee should be included in
             * the invoice. If `null`, no invoice will be issued for this charge fee.
             * If `invoice`, an invoice will be generated at the end of the period,
             * consolidating all charge fees with a succeeded payment status.
             * @example "invoice"
             */
            regroup_paid_fees?: "invoice" | null;
            /**
             * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
             * @example "Setup"
             */
            invoice_display_name?: string;
            /**
             * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
             *
             * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
             * - If set to `false`, the charge is billed in full.
             * - If not defined in the request, default value is `false`.
             * @example false
             */
            prorated?: boolean;
            /**
             * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
             * @example 0
             */
            min_amount_cents?: number;
            /** List of all thresholds utilized for calculating the charge. */
            properties?: ChargeProperties;
            /** List of filters used to apply differentiated pricing based on additional event properties. */
            filters?: ChargeFilterInput[];
            /**
             * List of unique code used to identify the taxes.
             * @example ["french_standard_vat"]
             */
            tax_codes?: string[];
        }[];
        /** List of usage thresholds to apply to the plan. */
        usage_thresholds?: UsageThresholdInput[];
    };
}
/** Based plan overrides. */
export interface PlanOverridesObject {
    /**
     * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
     * @example 10000
     */
    amount_cents?: number;
    /**
     * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
     * @example "USD"
     */
    amount_currency?: Currency;
    /**
     * The description on the plan.
     * @example "Plan for early stage startups."
     */
    description?: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
     * @example "Startup plan"
     */
    invoice_display_name?: string;
    /**
     * The name of the plan.
     * @example "Startup"
     */
    name?: string;
    /**
     * List of unique code used to identify the taxes.
     * @example ["french_standard_vat"]
     */
    tax_codes?: string[];
    /**
     * The duration in days during which the base cost of the plan is offered for free.
     * @example 5
     */
    trial_period?: number;
    minimum_commitment?: MinimumCommitmentObject;
    /** Additional usage-based charges for this plan. */
    charges?: {
        /**
         * Unique identifier of the charge created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        id?: string;
        /**
         * Unique identifier of the billable metric created by Lago.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        billable_metric_id?: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
         * @example "Setup"
         */
        invoice_display_name?: string;
        /**
         * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
         * @example 0
         */
        min_amount_cents?: number;
        /** List of all thresholds utilized for calculating the charge. */
        properties?: ChargeProperties;
        /** List of filters used to apply differentiated pricing based on additional event properties. */
        filters?: ChargeFilterInput[];
        /**
         * List of unique code used to identify the taxes.
         * @example ["french_standard_vat"]
         */
        tax_codes?: string[];
    }[];
    /** List of usage thresholds applied to the subscription. */
    usage_thresholds?: UsageThresholdObject[];
}
export interface PlanUpdateInput {
    plan: {
        /**
         * The name of the plan.
         * @example "Startup"
         */
        name?: string;
        /**
         * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
         * @example "Startup plan"
         */
        invoice_display_name?: string;
        /**
         * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
         * @example "startup"
         */
        code?: string;
        /**
         * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `quarterly`, `monthly`, or `weekly`.
         * @example "monthly"
         */
        interval?: "weekly" | "monthly" | "quarterly" | "yearly";
        /**
         * The description on the plan.
         * @example "Plan for early stage startups."
         */
        description?: string;
        /**
         * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
         * @example 10000
         */
        amount_cents?: number;
        /**
         * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
         * @example "USD"
         */
        amount_currency?: Currency;
        /**
         * The duration in days during which the base cost of the plan is offered for free.
         * @example 5
         */
        trial_period?: number;
        /**
         * This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
         * @example true
         */
        pay_in_advance?: boolean;
        /**
         * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly`.
         * @example null
         */
        bill_charges_monthly?: boolean | null;
        /**
         * List of unique code used to identify the taxes.
         * @example ["french_standard_vat"]
         */
        tax_codes?: string[];
        /** Minimum commitment for this plan. */
        minimum_commitment?: MinimumCommitmentInput;
        /**
         * Additional usage-based charges for this plan.
         * @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"}}]
         */
        charges?: {
            /**
             * Unique identifier of the charge created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            id?: string;
            /**
             * Unique identifier of the billable metric created by Lago.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            billable_metric_id?: string;
            /**
             * Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `graduated_percentage`, `package`, `percentage`, `volume` or `dynamic`.
             * @example "standard"
             */
            charge_model?: "standard" | "graduated" | "graduated_percentage" | "package" | "percentage" | "volume" | "dynamic";
            /**
             * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
             * @example false
             */
            pay_in_advance?: boolean;
            /**
             * This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.
             * @example true
             */
            invoiceable?: boolean;
            /**
             * This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
             * This field determines whether and when the charge fee should be included in
             * the invoice. If `null`, no invoice will be issued for this charge fee.
             * If `invoice`, an invoice will be generated at the end of the period,
             * consolidating all charge fees with a succeeded payment status.
             * @example "invoice"
             */
            regroup_paid_fees?: "invoice" | null;
            /**
             * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
             * @example "Setup"
             */
            invoice_display_name?: string;
            /**
             * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
             *
             * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
             * - If set to `false`, the charge is billed in full.
             * - If not defined in the request, default value is `false`.
             * @example false
             */
            prorated?: boolean;
            /**
             * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
             * @example 0
             */
            min_amount_cents?: number;
            /** List of all thresholds utilized for calculating the charge. */
            properties?: ChargeProperties;
            /** List of filters used to apply differentiated pricing based on additional event properties. */
            filters?: ChargeFilterInput[];
            /**
             * List of unique code used to identify the taxes.
             * @example ["french_standard_vat"]
             */
            tax_codes?: string[];
        }[];
        /** List of usage thresholds to apply to the plan. */
        usage_thresholds?: UsageThresholdInput[];
        /**
         * This field determines whether the changes made to the plan should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
         * @example true
         */
        cascade_updates?: boolean;
    };
}
export interface PlanObject {
    /**
     * Unique identifier of the plan created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The name of the plan.
     * @example "Startup"
     */
    name: string;
    /**
     * Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
     * @example "Startup plan"
     */
    invoice_display_name?: string;
    /**
     * The date and time when the plan was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the plan was initially created.
     * @format date-time
     * @example "2023-06-27T19:43:42Z"
     */
    created_at: string;
    /**
     * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
     * @example "startup"
     */
    code: string;
    /**
     * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `quarterly`, `monthly` or `weekly`.
     * @example "monthly"
     */
    interval: "weekly" | "monthly" | "quarterly" | "yearly";
    /**
     * The description on the plan.
     * @example ""
     */
    description?: string;
    /**
     * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
     * @example 10000
     */
    amount_cents: number;
    /**
     * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
     * @example "USD"
     */
    amount_currency: Currency;
    /**
     * The duration in days during which the base cost of the plan is offered for free.
     * @example 5
     */
    trial_period?: number;
    /**
     * This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
     * @example true
     */
    pay_in_advance?: boolean;
    /**
     * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is `yearly`.
     * @example null
     */
    bill_charges_monthly?: boolean | null;
    minimum_commitment?: MinimumCommitmentObject;
    /**
     * Additional usage-based charges for this plan.
     * @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"filters":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}]
     */
    charges?: ChargeObject[];
    /** All taxes applied to the plan. */
    taxes?: TaxObject[];
    /** List of usage thresholds applied to the plan. */
    usage_thresholds?: UsageThresholdObject[];
}
export interface PlansPaginated {
    plans: PlanObject[];
    meta: PaginationMeta;
}
export interface Subscription {
    subscription: SubscriptionObjectExtended;
}
export interface SubscriptionCreateInput {
    subscription: {
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
         */
        external_customer_id: string;
        /**
         * The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans.
         * @example "premium"
         */
        plan_code: string;
        /**
         * The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.
         * @example "Repository A"
         */
        name?: string;
        /**
         * The unique external identifier for the subscription. This identifier serves as an idempotency key, ensuring that each subscription is unique.
         * @example "my_sub_1234567890"
         */
        external_id: string;
        /**
         * The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
         * @example "anniversary"
         */
        billing_time?: "calendar" | "anniversary";
        /**
         * The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-10-08T00:00:00Z"
         */
        ending_at?: string;
        /**
         * The start date for the subscription, allowing for the creation of subscriptions that can begin in the past or future. Please note that it cannot be used to update the start date of a pending subscription or schedule an upgrade/downgrade. The start_date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-08-08T00:00:00Z"
         */
        subscription_at?: string;
        /** Based plan overrides. */
        plan_overrides?: PlanOverridesObject;
    };
}
export interface SubscriptionUpdateInput {
    /**
     * If the field is not defined and multiple `active` and `pending` subscriptions exists, Lago will update the `active` subscription. However, if you wish to update a `pending` subscription, please ensure that you include the `status` attribute with the `pending` value in your request body.
     * @example "active"
     */
    status?: "active" | "pending";
    subscription: {
        /**
         * The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.
         * @example "Repository B"
         */
        name?: string | null;
        /**
         * The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-10-08T00:00:00Z"
         */
        ending_at: string | null;
        /**
         * The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-08-08T00:00:00Z"
         */
        subscription_at?: string;
        /** Based plan overrides. */
        plan_overrides?: PlanOverridesObject;
    };
}
export type SubscriptionWithCustomerObject = SubscriptionObject & {
    plan?: PlanObject;
    customer?: CustomerObject;
};
export type SubscriptionWithThresholdObject = SubscriptionObject & {
    plan?: PlanObject;
    customer?: CustomerObject;
    usage_threshold?: UsageThresholdObject;
};
export interface SubscriptionObject {
    /**
     * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The subscription external unique identifier (provided by your own application).
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application).
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
     * @example "anniversary"
     */
    billing_time: "calendar" | "anniversary";
    /**
     * The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.
     * @example "Repository A"
     */
    name?: string | null;
    /**
     * The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans.
     * @example "premium"
     */
    plan_code: string;
    /**
     * The status of the subscription, which can have the following values:
     * - `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period.
     * - `active`: the subscription is currently active and applied to the customer.
     * - `terminated`: the subscription is no longer active.
     * - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer or when a subscription with a pending status is terminated.
     * @example "active"
     */
    status: "active" | "pending" | "terminated" | "canceled";
    /**
     * The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created.
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    created_at: string;
    /**
     * The cancellation date of the subscription. This field is not null when the subscription is `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    canceled_at?: string | null;
    /**
     * The effective start date of the subscription. This field can be null if the subscription is `pending` or `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    started_at?: string | null;
    /**
     * The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-10-08T00:00:00Z"
     */
    ending_at?: string | null;
    /**
     * The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    subscription_at: string;
    /**
     * The termination date of the subscription. This field is not null when the subscription is `terminated`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC)
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    terminated_at?: string | null;
    /**
     * The code identifying the previous plan associated with this subscription.
     * @example null
     */
    previous_plan_code?: string | null;
    /**
     * The code identifying the next plan in the case of a downgrade.
     * @example null
     */
    next_plan_code?: string | null;
    /**
     * The date when the plan will be downgraded, represented in ISO 8601 date format.
     * @format date
     * @example "2022-04-30"
     */
    downgrade_plan_date?: string | null;
    /**
     * The date when the free trial is ended, represented in ISO 8601 date format.
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    trial_ended_at?: string | null;
    /**
     * The date and time when the current billing period started, represented in ISO 8601 date format.
     * @format date-time
     * @example "2022-08-08T00:00:00Z"
     */
    current_billing_period_started_at?: string | null;
    /**
     * The date and time when the current billing period ends, represented in ISO 8601 date format.
     * @format date-time
     * @example "2022-09-08T00:00:00Z"
     */
    current_billing_period_ending_at?: string | null;
}
export type SubscriptionObjectExtended = SubscriptionObject & {
    plan?: PlanObject;
};
export interface SubscriptionsPaginated {
    subscriptions: SubscriptionObject[];
    meta: PaginationMeta;
}
export interface Tax {
    tax: TaxObject;
}
export interface TaxBaseInput {
    /**
     * Name of the tax.
     * @example "TVA"
     */
    name?: string;
    /**
     * Unique code used to identify the tax associated with the API request.
     * @example "french_standard_vat"
     */
    code?: string;
    /**
     * The percentage rate of the tax
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "20.0"
     */
    rate?: string;
    /**
     * Internal description of the taxe
     * @example "French standard VAT"
     */
    description?: string | null;
    /**
     * Set to `true` if the tax is used as one of the organization's default
     * @example true
     */
    applied_to_organization?: boolean;
}
export interface TaxCreateInput {
    tax: TaxBaseInput;
}
export interface TaxesPaginated {
    taxes: TaxObject[];
    meta: PaginationMeta;
}
export interface TaxObject {
    /**
     * Unique identifier of the tax, created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Name of the tax.
     * @example "TVA"
     */
    name: string;
    /**
     * Unique code used to identify the tax associated with the API request.
     * @example "french_standard_vat"
     */
    code: string;
    /**
     * Internal description of the taxe
     * @example "French standard VAT"
     */
    description?: string;
    /**
     * The percentage rate of the tax
     * @example 20
     */
    rate: number;
    /**
     * Set to `true` if the tax is used as one of the organization's default
     * @example true
     */
    applied_to_organization: boolean;
    /**
     * Creation date of the tax.
     * @format date-time
     * @example "2023-07-06T14:35:58Z"
     */
    created_at: string;
}
export interface TaxUpdateInput {
    tax: TaxBaseInput;
}
/** @example "America/Los_Angeles" */
export type Timezone = "UTC" | "Africa/Algiers" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Monrovia" | "Africa/Nairobi" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/Chihuahua" | "America/Denver" | "America/Godthab" | "America/Guatemala" | "America/Guyana" | "America/Halifax" | "America/Indiana/Indianapolis" | "America/Juneau" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Mazatlan" | "America/Mexico_City" | "America/Monterrey" | "America/Montevideo" | "America/New_York" | "America/Phoenix" | "America/Puerto_Rico" | "America/Regina" | "America/Santiago" | "America/Sao_Paulo" | "America/St_Johns" | "America/Tijuana" | "Asia/Almaty" | "Asia/Baghdad" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dhaka" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuwait" | "Asia/Magadan" | "Asia/Muscat" | "Asia/Novosibirsk" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Atlantic/South_Georgia" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Darwin" | "Australia/Hobart" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Madrid" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Paris" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT+12" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Majuro" | "Pacific/Midway" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Port_Moresby" | "Pacific/Tongatapu";
export interface UsageThresholdInput {
    /**
     * Unique identifier of the usage threshold created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    id?: string | null;
    /**
     * The display name of the usage threshold.
     * @example "Threshold 1"
     */
    threshold_display_name?: string | null;
    /**
     * The amount to reach to trigger a `progressive_billing` invoice.
     * @example 10000
     */
    amount_cents: number;
    /**
     * This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
     * @example true
     */
    recurring: boolean;
}
export interface UsageThresholdObject {
    /**
     * Unique identifier of the usage threshold created by Lago.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * The display name of the usage threshold.
     * @example "Threshold 1"
     */
    threshold_display_name?: string | null;
    /**
     * The amount to reach to trigger a `progressive_billing` invoice.
     * @example 10000
     */
    amount_cents: number;
    /**
     * This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
     * @example true
     */
    recurring: boolean;
    /**
     * The date and time when the usage threshold was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2023-06-27T19:43:42Z"
     */
    created_at: string;
    /**
     * The date and time when the usage threshold was last updated. It is expressed in UTC format according to the ISO 8601 datetime standard.
     * @format date-time
     * @example "2023-06-27T19:43:42Z"
     */
    updated_at: string;
}
export interface Wallet {
    wallet: WalletObject;
}
export interface WalletCreateInput {
    wallet?: {
        /**
         * The name of the wallet.
         * @example "Prepaid"
         */
        name?: string;
        /**
         * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "1.5"
         */
        rate_amount: string;
        /**
         * The currency of the wallet.
         * @example "USD"
         */
        currency: Currency;
        /**
         * The number of paid credits. Required only if there is no granted credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "20.0"
         */
        paid_credits?: string | null;
        /**
         * The number of free granted credits. Required only if there is no paid credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10.0"
         */
        granted_credits?: string | null;
        /**
         * The customer external unique identifier (provided by your own application)
         * @example "hooli_1234"
         */
        external_customer_id: string;
        /**
         * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-07-07T23:59:59Z"
         */
        expiration_at?: string | null;
        /**
         * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
         * @example false
         */
        invoice_requires_successful_payment?: boolean;
        /**
         * This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process.
         * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
         */
        transaction_metadata?: {
            /** The unique identifier for the attribute. */
            key?: string;
            /** The corresponding value for the key. */
            value?: string;
        }[];
        /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
        recurring_transaction_rules?: {
            /**
             * The number of paid credits used for recurring top-up.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "20.0"
             */
            paid_credits?: string | null;
            /**
             * The number of free granted credits used for recurring top-up.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "10.0"
             */
            granted_credits?: string | null;
            /**
             * The method used for recurring top-up. Possible values are `fixed` or `target`.
             * @example "target"
             */
            method?: "fixed" | "target";
            /**
             * The trigger. Possible values are `interval` or `threshold`.
             * @example "interval"
             */
            trigger: "interval" | "threshold";
            /**
             * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when trigger is `interval`.
             * @example "monthly"
             */
            interval?: "weekly" | "monthly" | "quarterly" | "yearly";
            /**
             * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            started_at?: string;
            /**
             * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "20.0"
             */
            threshold_credits?: string;
            /**
             * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "200.0"
             */
            target_ongoing_balance?: string;
            /**
             * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
             * @example false
             */
            invoice_requires_successful_payment?: boolean;
            /**
             * This optional field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
             * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
             */
            transaction_metadata?: {
                /** The unique identifier for the attribute. */
                key?: string;
                /** The value associated with the key. */
                value?: string;
            }[];
        }[];
    };
}
export interface WalletObject {
    /**
     * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "hooli_1234"
     */
    external_customer_id: string;
    /**
     * The status of the wallet. Possible values are `active` or `terminated`.
     * @example "active"
     */
    status: "active" | "terminated";
    /**
     * The currency of the wallet.
     * @example "USD"
     */
    currency: Currency;
    /**
     * The name of the wallet.
     * @example "Prepaid"
     */
    name?: string;
    /**
     * The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "1.5"
     */
    rate_amount: string;
    /**
     * The current wallet balance expressed in credits. This reflects the available balance after all transactions are settled.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "28.0"
     */
    credits_balance: string;
    /**
     * The current wallet balance expressed in cents. This reflects the available balance after all transactions are settled.
     * @example 1000
     */
    balance_cents: number;
    /**
     * The number of consumed credits.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "2.0"
     */
    consumed_credits: string;
    /**
     * The date of the wallet creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
    /**
     * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example null
     */
    expiration_at?: string | null;
    /**
     * The date and time of the last balance top-up. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    last_balance_sync_at?: string | null;
    /**
     * The date and time of the last credits consumption. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    last_consumed_credit_at?: string | null;
    /**
     * The date of terminaison of the wallet. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-09-14T16:35:31Z"
     */
    terminated_at?: string | null;
    /**
     * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
     * @example false
     */
    invoice_requires_successful_payment?: boolean;
    /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
    recurring_transaction_rules?: {
        /**
         * A unique identifier for the recurring transaction rule in the Lago application. Can be used to update a recurring transaction rule.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        lago_id: string;
        /**
         * The trigger. Possible values are `interval` or `threshold`.
         * @example "interval"
         */
        trigger: "interval" | "threshold";
        /**
         * The method used for recurring top-up. Possible values are `fixed` or `target`.
         * @example "target"
         */
        method: "fixed" | "target";
        /**
         * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only if trigger is set to `interval`.
         * @example "monthly"
         */
        interval: "weekly" | "monthly" | "quarterly" | "yearly";
        /**
         * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "20.0"
         */
        threshold_credits: string;
        /**
         * The number of paid credits. Required only if there is no granted credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "20.0"
         */
        paid_credits: string;
        /**
         * The number of free granted credits. Required only if there is no paid credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10.0"
         */
        granted_credits: string;
        /**
         * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-08-08T00:00:00Z"
         */
        started_at?: string;
        /**
         * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "200.0"
         */
        target_ongoing_balance: string;
        /**
         * The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
         * @format date-time
         * @example "2022-04-29T08:59:51Z"
         */
        created_at: string;
        /**
         * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
         * @example false
         */
        invoice_requires_successful_payment?: boolean;
        /**
         * This field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
         * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
         */
        transaction_metadata?: {
            /** The unique identifier for the attribute. */
            key?: string;
            /** The value associated with the key. */
            value?: string;
        }[];
    }[];
    /**
     * The ongoing wallet balance expressed in cents. This represents the `balance_cents` minus the `ongoing_usage_balance_cents`, showing the real time balance after accounting for current usage including taxes.
     * @example 800
     */
    ongoing_balance_cents: number;
    /**
     * The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage and draft invoices including taxes.
     * @example 200
     */
    ongoing_usage_balance_cents: number;
    /**
     * The ongoing wallet balance expressed in credits. This represents the `credits_balance` minus the `credits_ongoing_usage_balance`, showing the real time balance after accounting for current usage including taxes.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "8.0"
     */
    credits_ongoing_balance: string;
    /**
     * The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage and draft invoices including taxes.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "2.0"
     */
    credits_ongoing_usage_balance: string;
}
export interface WalletsPaginated {
    wallets: WalletObject[];
    meta: PaginationMeta;
}
export interface WalletTransactionCreateInput {
    wallet_transaction: {
        /**
         * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.
         * @format uuid
         * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
         */
        wallet_id: string;
        /**
         * The number of paid credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "20.0"
         */
        paid_credits?: string;
        /**
         * The number of free granted credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "10.0"
         */
        granted_credits?: string;
        /**
         * The number of voided credits.
         * @pattern ^[0-9]+.?[0-9]*$
         * @example "5.0"
         */
        voided_credits?: string;
        /**
         * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
         * @example false
         */
        invoice_requires_successful_payment?: boolean;
        /**
         * This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
         * @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
         */
        metadata?: {
            /** The unique identifier for the attribute. */
            key?: string;
            /** The value associated with the key. */
            value?: string;
        }[];
    };
}
export interface WalletTransactionObject {
    /**
     * Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_wallet_id: string;
    /**
     * The status of the wallet transaction. Possible values are `pending` or `settled`.
     * @example "settled"
     */
    status: "pending" | "settled";
    /**
     * The source field represents the origin or trigger of the wallet transaction. Possible values are `manual`, `interval`. `threshold`
     * @example "manual"
     */
    source?: "manual" | "interval" | "threshold";
    /**
     * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
     * @example "purchased"
     */
    transaction_status: "purchased" | "granted" | "voided" | "invoiced";
    /**
     * The type of transaction. Possible values are `inbound` (increasing the balance) or `outbound` (decreasing the balance).
     * @example "inbound"
     */
    transaction_type: "inbound" | "outbound";
    /**
     * The amount of credits based on the rate and the currency.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "10.0"
     */
    amount: string;
    /**
     * The number of credits used in the wallet transaction.
     * @pattern ^[0-9]+.?[0-9]*$
     * @example "100.0"
     */
    credit_amount: string;
    /**
     * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
     * @example false
     */
    invoice_requires_successful_payment?: boolean;
    /**
     * This field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
     * @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
     */
    metadata?: {
        /** The unique identifier for the attribute. */
        key?: string;
        /** The value associated with the key. */
        value?: string;
    }[];
    /**
     * The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    settled_at?: string;
    /**
     * The date of the wallet transaction creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
}
export interface WalletTransactionPaymentFailureObject {
    /**
     * Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_wallet_transaction_id: string;
    /**
     * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_customer_id: string;
    /**
     * The customer external unique identifier (provided by your own application)
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    external_customer_id: string;
    /**
     * Unique identifier of the customer within the payment provider
     * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
     */
    provider_customer_id?: string;
    /**
     * The type of payment provider code
     * @example "stripe"
     */
    payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
    /**
     * Code of the payment provider
     * @example "Stripe Prod"
     */
    payment_provider_code?: string;
    provider_error?: string | Record<string, any>;
}
export interface WalletTransactions {
    wallet_transactions: WalletTransactionObject[];
}
export type WalletTransactionsPaginated = WalletTransactions & {
    meta: PaginationMeta;
};
export interface WalletUpdateInput {
    wallet: {
        /**
         * The name of the wallet.
         * @example "new_name"
         */
        name?: string | null;
        /**
         * The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
         * @format date-time
         * @example "2022-07-07T23:59:59Z"
         */
        expiration_at?: string | null;
        /**
         * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
         * @example false
         */
        invoice_requires_successful_payment?: boolean;
        /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
        recurring_transaction_rules?: {
            /**
             * A unique identifier for the recurring transaction rule in the Lago application. Can be used to update a recurring transaction rule.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            lago_id?: string;
            /**
             * The trigger. Possible values are `interval` or `threshold`.
             * @example "interval"
             */
            trigger?: "interval" | "threshold";
            /**
             * The method used for recurring top-up. Possible values are `fixed` or `target`.
             * @example "target"
             */
            method?: "fixed" | "target";
            /**
             * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when trigger is set to `interval`.
             * @example "monthly"
             */
            interval?: "weekly" | "monthly" | "quarterly" | "yearly";
            /**
             * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "20.0"
             */
            threshold_credits?: string;
            /**
             * The number of paid credits. Required only if there is no granted credits.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "20.0"
             */
            paid_credits?: string;
            /**
             * The number of free granted credits. Required only if there is no paid credits.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "10.0"
             */
            granted_credits?: string;
            /**
             * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            started_at?: string;
            /**
             * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
             * @pattern ^[0-9]+.?[0-9]*$
             * @example "200.0"
             */
            target_ongoing_balance?: string;
            /**
             * A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
             * @example false
             */
            invoice_requires_successful_payment?: boolean;
            /**
             * This optional field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
             * @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
             */
            transaction_metadata?: {
                /** The unique identifier for the attribute. */
                key?: string;
                /** The value associated with the key. */
                value?: string;
            }[];
        }[];
    };
}
export interface WebhookEndpoint {
    webhook_endpoint: WebhookEndpointObject;
}
export interface WebhookEndpointCreateInput {
    webhook_endpoint?: {
        /**
         * The URL of the webhook endpoint.
         * @example "https://foo.bar"
         */
        webhook_url: string;
        /**
         * The signature used for the webhook. If no value is passed,
         * @example "hmac"
         */
        signature_algo?: "jwt" | "hmac" | null;
    };
}
export interface WebhookEndpointObject {
    /**
     * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_id: string;
    /**
     * Unique identifier assigned to the organization attached to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization's record within the Lago system.
     * @format uuid
     * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
     */
    lago_organization_id: string;
    /**
     * The name of the wallet.
     * @example "Prepaid"
     */
    webhook_url: string;
    /**
     * The signature algo for the webhook.
     * @example "hmac"
     */
    signature_algo?: "jwt" | "hmac";
    /**
     * The date of the webhook endpoint creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
     * @format date-time
     * @example "2022-04-29T08:59:51Z"
     */
    created_at: string;
}
export interface WebhookEndpointsPaginated {
    webhook_endpoints: WebhookEndpointObject[];
    meta: PaginationMeta;
}
export interface WebhookEndpointUpdateInput {
    webhook_endpoint?: {
        /**
         * The URL of the webhook endpoint.
         * @example "https://foo.bar"
         */
        webhook_url: string;
        /**
         * The signature used for the webhook. If no value is passed,
         * @example "hmac"
         */
        signature_algo?: "jwt" | "hmac" | null;
    };
}
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
    /** set parameter to `true` for call `securityWorker` for this request */
    secure?: boolean;
    /** request path */
    path: string;
    /** content type of request body */
    type?: ContentType;
    /** query params */
    query?: QueryParamsType;
    /** format of response (i.e. response.json() -> format: "json") */
    format?: ResponseFormat;
    /** request body */
    body?: unknown;
    /** base url */
    baseUrl?: string;
    /** request cancellation token */
    cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
    baseUrl?: string;
    baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
    securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
    customFetch?: typeof fetch;
}
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
    data: D;
    error: E;
}
type CancelToken = Symbol | string | number;
export declare enum ContentType {
    Json = "application/json",
    FormData = "multipart/form-data",
    UrlEncoded = "application/x-www-form-urlencoded",
    Text = "text/plain"
}
export declare class HttpClient<SecurityDataType = unknown> {
    baseUrl: string;
    private securityData;
    private securityWorker?;
    private abortControllers;
    private customFetch;
    private baseApiParams;
    constructor(apiConfig?: ApiConfig<SecurityDataType>);
    setSecurityData: (data: SecurityDataType | null) => void;
    protected encodeQueryParam(key: string, value: any): string;
    protected addQueryParam(query: QueryParamsType, key: string): string;
    protected addArrayQueryParam(query: QueryParamsType, key: string): any;
    protected toQueryString(rawQuery?: QueryParamsType): string;
    protected addQueryParams(rawQuery?: QueryParamsType): string;
    private contentFormatters;
    protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
    protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
    abortRequest: (cancelToken: CancelToken) => void;
    request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
}
/**
 * @title Lago API documentation
 * @version 1.22.0
 * @license AGPLv3
 * @baseUrl https://api.getlago.com/api/v1
 * @externalDocs https://github.com/getlago
 * @contact <tech@getlago.com>
 *
 * Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
 */
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
    addOns: {
        /**
         * @description This endpoint is used to create an add-on that can be then attached to a one-off invoice.
         *
         * @tags add_ons
         * @name CreateAddOn
         * @summary Create an add-on
         * @request POST:/add_ons
         * @secure
         */
        createAddOn: (data: AddOnCreateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used to list all existing add-ons.
         *
         * @tags add_ons
         * @name FindAllAddOns
         * @summary List all add-ons
         * @request GET:/add_ons
         * @secure
         */
        findAllAddOns: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<AddOnsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used to update an existing add-on.
         *
         * @tags add_ons
         * @name UpdateAddOn
         * @summary Update an add-on
         * @request PUT:/add_ons/{code}
         * @secure
         */
        updateAddOn: (code: string, data: AddOnUpdateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to retrieve a specific add-on.
         *
         * @tags add_ons
         * @name FindAddOn
         * @summary Retrieve an add-on
         * @request GET:/add_ons/{code}
         * @secure
         */
        findAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete an existing add-on.
         *
         * @tags add_ons
         * @name DestroyAddOn
         * @summary Delete an add-on
         * @request DELETE:/add_ons/{code}
         * @secure
         */
        destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    analytics: {
        /**
         * @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.
         *
         * @tags analytics
         * @name FindAllGrossRevenues
         * @summary List gross revenue
         * @request GET:/analytics/gross_revenue
         * @secure
         */
        findAllGrossRevenues: (query?: {
            /** Currency of revenue analytics. Format must be ISO 4217. */
            currency?: Currency;
            /**
             * The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<GrossRevenues, ApiErrorUnauthorized>>;
        /**
         * @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`.
         *
         * @tags analytics
         * @name FindAllInvoiceCollections
         * @summary List of finalized invoices
         * @request GET:/analytics/invoice_collection
         * @secure
         */
        findAllInvoiceCollections: (query?: {
            /** The currency of revenue analytics. Format must be ISO 4217. */
            currency?: Currency;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<InvoiceCollections, ApiErrorUnauthorized>>;
        /**
         * @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.
         *
         * @tags analytics
         * @name FindAllInvoicedUsages
         * @summary List usage revenue
         * @request GET:/analytics/invoiced_usage
         * @secure
         */
        findAllInvoicedUsages: (query?: {
            /** The currency of invoiced usage analytics. Format must be ISO 4217. */
            currency?: Currency;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<InvoicedUsages, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used to list MRR.
         *
         * @tags analytics
         * @name FindAllMrrs
         * @summary List MRR
         * @request GET:/analytics/mrr
         * @secure
         */
        findAllMrrs: (query?: {
            /**
             * Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle:
             *
             * - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued.
             * - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing).
             * - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next  remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).
             * - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.
             */
            currency?: Currency;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<Mrrs, ApiErrorUnauthorized>>;
        /**
         * @description Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates).
         *
         * @tags analytics
         * @name FindAllOverdueBalances
         * @summary List overdue balance
         * @request GET:/analytics/overdue_balance
         * @secure
         */
        findAllOverdueBalances: (query?: {
            /** Currency of revenue analytics. Format must be ISO 4217. */
            currency?: Currency;
            /**
             * The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Show data only for given number of months.
             * @example 12
             */
            months?: number;
        }, params?: RequestParams) => Promise<HttpResponse<OverdueBalances, ApiErrorUnauthorized>>;
    };
    appliedCoupons: {
        /**
         * @description This endpoint is used to apply a specific coupon to a customer, before or during a subscription.
         *
         * @tags coupons
         * @name ApplyCoupon
         * @summary Apply a coupon to a customer
         * @request POST:/applied_coupons
         * @secure
         */
        applyCoupon: (data: AppliedCouponInput, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to list all applied coupons. You can filter by coupon status and by customer.
         *
         * @tags coupons
         * @name FindAllAppliedCoupons
         * @summary List all applied coupons
         * @request GET:/applied_coupons
         * @secure
         */
        findAllAppliedCoupons: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The status of the coupon. Can be either `active` or `terminated`.
             * @example "active"
             */
            status?: "active" | "terminated";
            /**
             * The customer external unique identifier (provided by your own application)
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
        }, params?: RequestParams) => Promise<HttpResponse<AppliedCouponsPaginated, ApiErrorUnauthorized>>;
    };
    billableMetrics: {
        /**
         * @description This endpoint creates a new billable metric representing a pricing component of your application.
         *
         * @tags billable_metrics
         * @name CreateBillableMetric
         * @summary Create a billable metric
         * @request POST:/billable_metrics
         * @secure
         */
        createBillableMetric: (data: BillableMetricCreateInput, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint retrieves all existing billable metrics that represent pricing components of your application.
         *
         * @tags billable_metrics
         * @name FindAllBillableMetrics
         * @summary List all billable metrics
         * @request GET:/billable_metrics
         * @secure
         */
        findAllBillableMetrics: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<BillableMetricsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description Evaluate an expression for a billable metric creation by providing the expression and test data
         *
         * @tags billable_metrics
         * @name EvaluateBillableMetricExpression
         * @summary Evaluate an expression for a billable metric
         * @request POST:/billable_metrics/evaluate_expression
         * @secure
         */
        evaluateBillableMetricExpression: (data: BillableMetricEvaluateExpressionInput, params?: RequestParams) => Promise<HttpResponse<BillableMetricEvaluateExpressionResult, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint updates an existing billable metric representing a pricing component of your application.
         *
         * @tags billable_metrics
         * @name UpdateBillableMetric
         * @summary Update a billable metric
         * @request PUT:/billable_metrics/{code}
         * @secure
         */
        updateBillableMetric: (code: string, data: BillableMetricUpdateInput, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes an existing billable metric representing a pricing component of your application.
         *
         * @tags billable_metrics
         * @name DestroyBillableMetric
         * @summary Delete a billable metric
         * @request DELETE:/billable_metrics/{code}
         * @secure
         */
        destroyBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @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.
         *
         * @tags billable_metrics
         * @name FindBillableMetric
         * @summary Retrieve a billable metric
         * @request GET:/billable_metrics/{code}
         * @secure
         */
        findBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    coupons: {
        /**
         * @description This endpoint is used to create a coupon that can be then attached to a customer to create a discount.
         *
         * @tags coupons
         * @name CreateCoupon
         * @summary Create a coupon
         * @request POST:/coupons
         * @secure
         */
        createCoupon: (data: CouponCreateInput, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used to list all existing coupons.
         *
         * @tags coupons
         * @name FindAllCoupons
         * @summary List all coupons
         * @request GET:/coupons
         * @secure
         */
        findAllCoupons: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<CouponsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used to update a coupon that can be then attached to a customer to create a discount.
         *
         * @tags coupons
         * @name UpdateCoupon
         * @summary Update a coupon
         * @request PUT:/coupons/{code}
         * @secure
         */
        updateCoupon: (code: string, data: CouponUpdateInput, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to retrieve a specific coupon.
         *
         * @tags coupons
         * @name FindCoupon
         * @summary Retrieve a coupon
         * @request GET:/coupons/{code}
         * @secure
         */
        findCoupon: (code: string, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete a coupon.
         *
         * @tags coupons
         * @name DestroyCoupon
         * @summary Delete a coupon
         * @request DELETE:/coupons/{code}
         * @secure
         */
        destroyCoupon: (code: string, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    creditNotes: {
        /**
         * @description This endpoint creates a new credit note.
         *
         * @tags credit_notes
         * @name CreateCreditNote
         * @summary Create a credit note
         * @request POST:/credit_notes
         * @secure
         */
        createCreditNote: (data: CreditNoteCreateInput, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint list all existing credit notes.
         *
         * @tags credit_notes
         * @name FindAllCreditNotes
         * @summary List all credit notes
         * @request GET:/credit_notes
         * @secure
         */
        findAllCreditNotes: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Filter credit notes starting from a specific date.
             * @format date
             * @example "2022-07-08"
             */
            issuing_date_from?: string;
            /**
             * Filter credit notes up to a specific date.
             * @format date
             * @example "2022-08-09"
             */
            issuing_date_to?: string;
            /**
             * Search credit notes by id, number, customer name, customer external_id or customer email.
             * @example "Jane"
             */
            search_term?: string;
            /**
             * Filter credit notes by currency. Possible values ISO 4217 currency codes.
             * @example "EUR"
             */
            currency?: string;
            /** Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`. */
            reason?: "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "duplicated_charge" | "other";
            /** Filter credit notes by credit status. Possible values are `available`, `consumed`  or `voided`. */
            credit_status?: "available" | "consumed" | "voided";
            /** Filter credit notes by refund status. Possible values are `pending`, `succeeded`  or `failed`. */
            refund_status?: "pending" | "succeeded" | "failed";
            /**
             * Filter credit notes by their related invoice number.
             * @example "INV-001-002"
             */
            invoice_number?: string;
            /**
             * Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 9000
             */
            amount_from?: number;
            /**
             * Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 100000
             */
            amount_to?: number;
            /**
             * Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`.
             * @example true
             */
            self_billed?: boolean;
        }, params?: RequestParams) => Promise<HttpResponse<CreditNotes, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint updates an existing credit note.
         *
         * @tags credit_notes
         * @name UpdateCreditNote
         * @summary Update a credit note
         * @request PUT:/credit_notes/{lago_id}
         * @secure
         */
        updateCreditNote: (lagoId: string, data: CreditNoteUpdateInput, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves an existing credit note.
         *
         * @tags credit_notes
         * @name FindCreditNote
         * @summary Retrieve a credit note
         * @request GET:/credit_notes/{lago_id}
         * @secure
         */
        findCreditNote: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint downloads the PDF of an existing credit note.
         *
         * @tags credit_notes
         * @name DownloadCreditNote
         * @summary Download a credit note PDF
         * @request POST:/credit_notes/{lago_id}/download
         * @secure
         */
        downloadCreditNote: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to retrieve amounts for a new credit note creation.
         *
         * @tags credit_notes
         * @name EstimateCreditNote
         * @summary Estimate amounts for a new credit note
         * @request POST:/credit_notes/estimate
         * @secure
         */
        estimateCreditNote: (data: CreditNoteEstimateInput, params?: RequestParams) => Promise<HttpResponse<CreditNoteEstimated, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint voids the available credit linked to a specific credit note.
         *
         * @tags credit_notes
         * @name VoidCreditNote
         * @summary Void available credit
         * @request PUT:/credit_notes/{lago_id}/void
         * @secure
         */
        voidCreditNote: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
    };
    customers: {
        /**
         * @description This endpoint creates a new customer.
         *
         * @tags customers
         * @name CreateCustomer
         * @summary Create a customer
         * @request POST:/customers
         * @secure
         */
        createCustomer: (data: CustomerCreateInput, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint retrieves all existing customers.
         *
         * @tags customers
         * @name FindAllCustomers
         * @summary List all customers
         * @request GET:/customers
         * @secure
         */
        findAllCustomers: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Filter customers by account type.
             * @example ["customer","partner"]
             */
            account_type?: ("customer" | "partner")[];
        }, params?: RequestParams) => Promise<HttpResponse<CustomersPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint retrieves an existing customer.
         *
         * @tags customers
         * @name FindCustomer
         * @summary Retrieve a customer
         * @request GET:/customers/{external_customer_id}
         * @secure
         */
        findCustomer: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes an existing customer.
         *
         * @tags customers
         * @name DestroyCustomer
         * @summary Delete a customer
         * @request DELETE:/customers/{external_customer_id}
         * @secure
         */
        destroyCustomer: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete a specific coupon that has been applied to a customer.
         *
         * @tags coupons, customers
         * @name DeleteAppliedCoupon
         * @summary Delete an applied coupon
         * @request DELETE:/customers/{external_customer_id}/applied_coupons/{applied_coupon_id}
         * @secure
         */
        deleteAppliedCoupon: (externalCustomerId: string, appliedCouponId: string, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @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
         *
         * @tags customers
         * @name GetCustomerPortalUrl
         * @summary Get a customer portal URL
         * @request GET:/customers/{external_customer_id}/portal_url
         * @secure
         */
        getCustomerPortalUrl: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<{
            customer: {
                /**
                 * An embeddable link for displaying a customer portal
                 * @example "https://app.lago.com/customer-portal/1234567890"
                 */
                portal_url: string;
            };
        }, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
         *
         * @tags customers
         * @name FindCustomerCurrentUsage
         * @summary Retrieve customer current usage
         * @request GET:/customers/{external_customer_id}/current_usage
         * @secure
         */
        findCustomerCurrentUsage: (externalCustomerId: string, query: {
            /**
             * The unique identifier of the subscription within your application.
             * @example "sub_1234567890"
             */
            external_subscription_id: string;
            /**
             * Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.
             * @default true
             * @example true
             */
            apply_taxes?: boolean;
        }, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.
         *
         * @tags customers
         * @name FindAllCustomerPastUsage
         * @summary Retrieve customer past usage
         * @request GET:/customers/{external_customer_id}/past_usage
         * @secure
         */
        findAllCustomerPastUsage: (externalCustomerId: string, query: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The unique identifier of the subscription within your application.
             * @example "sub_1234567890"
             */
            external_subscription_id: string;
            /**
             * Billable metric code filter to apply to the charge usage
             * @example "cpu"
             */
            billable_metric_code?: string;
            /**
             * Number of past billing period to returns in the result
             * @example 5
             */
            periods_count?: number;
        }, params?: RequestParams) => Promise<HttpResponse<CustomerPastUsage, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint regenerates the Payment Provider Checkout URL of a Customer.
         *
         * @tags customers
         * @name GenerateCustomerCheckoutUrl
         * @summary Generate a Customer Payment Provider Checkout URL
         * @request POST:/customers/{external_customer_id}/checkout_url
         * @secure
         */
        generateCustomerCheckoutUrl: (externalCustomerId: string, params?: RequestParams) => Promise<HttpResponse<{
            customer?: {
                /**
                 * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
                 * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
                 */
                lago_customer_id: string;
                /**
                 * The customer external unique identifier (provided by your own application)
                 * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
                 */
                external_customer_id: string;
                /**
                 * The Payment Provider name linked to the Customer.
                 * @example "stripe"
                 */
                payment_provider: string;
                /**
                 * Code of the payment provider
                 * @example "Stripe Prod"
                 */
                payment_provider_code?: string | undefined;
                /**
                 * The new generated Payment Provider Checkout URL for the Customer.
                 * @example "https://foo.bar"
                 */
                checkout_url?: string | undefined;
            } | undefined;
        }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
    };
    events: {
        /**
         * @description This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription.
         *
         * @tags events
         * @name CreateEvent
         * @summary Send usage events
         * @request POST:/events
         * @secure
         */
        createEvent: (data: EventInput, params?: RequestParams) => Promise<HttpResponse<Event, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used for retrieving all events.
         *
         * @tags events
         * @name FindAllEvents
         * @summary List all events
         * @request GET:/events
         * @secure
         */
        findAllEvents: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * External subscription ID
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_subscription_id?: string;
            /**
             * Filter events by its code.
             * @example "event-123"
             */
            code?: string;
            /**
             * Filter events by timestamp starting from a specific date.
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            timestamp_from?: string;
            /**
             * Filter events by timestamp up to a specific date.
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            timestamp_to?: string;
        }, params?: RequestParams) => Promise<HttpResponse<{
            events: EventObject[];
            meta: PaginationMeta;
        }, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint can be used to send a batch of usage records. Each request may include up to 100 events.
         *
         * @tags events
         * @name CreateBatchEvents
         * @summary Batch multiple events
         * @request POST:/events/batch
         * @secure
         */
        createBatchEvents: (data: EventBatchInput, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @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
         *
         * @tags events
         * @name EventEstimateFees
         * @summary Estimate fees for a pay in advance charge
         * @request POST:/events/estimate_fees
         * @secure
         */
        eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
         *
         * @tags events
         * @name FindEvent
         * @summary Retrieve a specific event
         * @request GET:/events/{transaction_id}
         * @secure
         */
        findEvent: (transactionId: string, params?: RequestParams) => Promise<HttpResponse<Event, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    fees: {
        /**
         * @description This endpoint is used for retrieving all fees that has been issued.
         *
         * @tags fees
         * @name FindAllFees
         * @summary List all fees
         * @request GET:/fees
         * @secure
         */
        findAllFees: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * External subscription ID
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_subscription_id?: string;
            /**
             * Filter results by event transaction ID
             * @example "et_12345678"
             */
            event_transaction_id?: string;
            /** Filter results by fee's currency. */
            currency?: Currency;
            /**
             * The fee type. Possible values are `add-on`, `charge`, `credit` or `subscription`.
             * @example "charge"
             */
            fee_type?: "charge" | "add_on" | "subscription" | "credit" | "instant_charge";
            /**
             * Filter results by the `code` of the billable metric attached to the fee. Only applies to `charge` types.
             * @example "bm_code"
             */
            billable_metric_code?: string;
            /**
             * Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are `pending`, `succeeded`, `failed` and refunded`.
             * @example "succeeded"
             */
            payment_status?: "pending" | "succeeded" | "failed" | "refunded";
            /**
             * Filter results created after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            created_at_from?: string;
            /**
             * Filter results created before creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            created_at_to?: string;
            /**
             * Filter results with payment success after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            succeeded_at_from?: string;
            /**
             * Filter results with payment success after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            succeeded_at_to?: string;
            /**
             * Filter results with payment failure after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            failed_at_from?: string;
            /**
             * Filter results with payment failure after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            failed_at_to?: string;
            /**
             * Filter results with payment refund after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            refunded_at_from?: string;
            /**
             * Filter results with payment refund after creation date and time in UTC.
             * @format date-time
             * @example "2023-03-28T12:21:51Z"
             */
            refunded_at_to?: string;
        }, params?: RequestParams) => Promise<HttpResponse<FeesPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used for retrieving a specific fee that has been issued.
         *
         * @tags fees
         * @name FindFee
         * @summary Retrieve a specific fee
         * @request GET:/fees/{lago_id}
         * @secure
         */
        findFee: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for updating a specific fee that has been issued.
         *
         * @tags fees
         * @name UpdateFee
         * @summary Update a fee
         * @request PUT:/fees/{lago_id}
         * @secure
         */
        updateFee: (lagoId: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotAllowed | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for deleting a specific fee that has not yet been invoiced
         *
         * @tags fees
         * @name DeleteFee
         * @summary Delete a fee
         * @request DELETE:/fees/{lago_id}
         * @secure
         */
        deleteFee: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
    };
    invoices: {
        /**
         * @description This endpoint is used for issuing a one-off invoice.
         *
         * @tags invoices
         * @name CreateInvoice
         * @summary Create a one-off invoice
         * @request POST:/invoices
         * @secure
         */
        createInvoice: (data: InvoiceOneOffCreateInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used for retrieving all invoices.
         *
         * @tags invoices
         * @name FindAllInvoices
         * @summary List all invoices
         * @request GET:/invoices
         * @secure
         */
        findAllInvoices: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 9000
             */
            amount_from?: number;
            /**
             * Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
             * @example 100000
             */
            amount_to?: number;
            /**
             * Filter invoices starting from a specific date.
             * @format date
             * @example "2022-07-08"
             */
            issuing_date_from?: string;
            /**
             * Filter invoices up to a specific date.
             * @format date
             * @example "2022-08-09"
             */
            issuing_date_to?: string;
            /** Filter invoices by status. Possible values are `draft` or `finalized`. */
            status?: "draft" | "finalized";
            /** Filter invoices by payment status. Possible values are `pending`, `failed` or `succeeded`. */
            payment_status?: "pending" | "failed" | "succeeded";
            /**
             * Filter invoices by payment_overdue. Possible values are `true` or `false`.
             * @example true
             */
            payment_overdue?: boolean;
            /**
             * Search invoices by id, number, customer name, customer external_id or customer email.
             * @example "Jane"
             */
            search_term?: string;
            /**
             * Filter invoices by currency. Possible values ISO 4217 currency codes.
             * @example "EUR"
             */
            currency?: string;
            /**
             * Filter invoices with a payment dispute lost. Possible values are `true` or `false`.
             * @example true
             */
            payment_dispute_lost?: boolean;
            /** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`. */
            invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges" | "progressive_billing";
            /**
             * Filter invoices by self billed. Possible values are `true` or `false`.
             * @example true
             */
            self_billed?: boolean;
            /**
             * Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`.
             * @example "someValue"
             */
            "metadata[key]"?: string;
        }, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used for updating an existing invoice.
         *
         * @tags invoices
         * @name UpdateInvoice
         * @summary Update an invoice
         * @request PUT:/invoices/{lago_id}
         * @secure
         */
        updateInvoice: (lagoId: string, data: InvoiceUpdateInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for retrieving a specific invoice that has been issued.
         *
         * @tags invoices
         * @name FindInvoice
         * @summary Retrieve an invoice
         * @request GET:/invoices/{lago_id}
         * @secure
         */
        findInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for downloading a specific invoice PDF document.
         *
         * @tags invoices
         * @name DownloadInvoice
         * @summary Download an invoice PDF
         * @request POST:/invoices/{lago_id}/download
         * @secure
         */
        downloadInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for finalizing a draft invoice.
         *
         * @tags invoices
         * @name FinalizeInvoice
         * @summary Finalize a draft invoice
         * @request PUT:/invoices/{lago_id}/finalize
         * @secure
         */
        finalizeInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for setting invoice's payment dispute as lost.
         *
         * @tags invoices
         * @name LoseDisputeInvoice
         * @summary Mark an invoice payment dispute as lost
         * @request POST:/invoices/{lago_id}/lose_dispute
         * @secure
         */
        loseDisputeInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for refreshing a draft invoice.
         *
         * @tags invoices
         * @name RefreshInvoice
         * @summary Refresh a draft invoice
         * @request PUT:/invoices/{lago_id}/refresh
         * @secure
         */
        refreshInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for retrying to generate a failed invoice.
         *
         * @tags invoices
         * @name RetryInvoice
         * @summary Retry generation of a failed invoice
         * @request POST:/invoices/{lago_id}/retry
         * @secure
         */
        retryInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint generates a checkout link for a specific invoice.
         *
         * @tags invoices
         * @name InvoicePaymentUrl
         * @summary Generate a payment URL
         * @request POST:/invoices/{lago_id}/payment_url
         * @secure
         */
        invoicePaymentUrl: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<{
            invoice_payment_details?: {
                /**
                 * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
                 * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
                 */
                lago_customer_id?: string | undefined;
                /**
                 * 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
                 * @example "1e501a90-1a90-1a90-1a90-1a901a901a80"
                 */
                lago_invoice_id?: string | undefined;
                /**
                 * The customer external unique identifier (provided by your own application)
                 * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
                 */
                external_customer_id?: string | undefined;
                /**
                 * The Payment Provider name linked to the Customer.
                 * @example "stripe"
                 */
                payment_provider?: string | undefined;
                /**
                 * The generated Payment URL for the Invoice.
                 * @example "https://foo.bar"
                 */
                payment_url?: string | undefined;
            } | undefined;
        }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for generating invoice preview.
         *
         * @tags invoices
         * @name InvoicePreview
         * @summary Create an invoice preview
         * @request POST:/invoices/preview
         * @secure
         */
        invoicePreview: (data: {
            customer: {
                /**
                 * The first line of the billing address
                 * @example "5230 Penfield Ave"
                 */
                address_line1?: string;
                /**
                 * The second line of the billing address
                 * @example null
                 */
                address_line2?: string | null;
                /**
                 * The city of the customer's billing address
                 * @example "Woodland Hills"
                 */
                city?: string;
                /**
                 * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
                 * @example "US"
                 */
                country?: Country;
                /**
                 * Unique identifier assigned to the customer in your application.
                 * @example "hooli_1234"
                 */
                external_id?: string;
                integration_customers?: {
                    /**
                     * The integration type used for accounting and tax syncs.
                     * Accepted values: `anrok`.
                     * @example "anrok"
                     */
                    integration_type: "anrok";
                    /**
                     * Unique code used to identify an integration connection.
                     * @example "anrok1"
                     */
                    integration_code: string;
                }[];
                /**
                 * The full name of the customer
                 * @example "Gavin Belson"
                 */
                name?: string;
                /**
                 * The currency of the invoice.
                 * @example "EUR"
                 */
                currency?: Currency;
                /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
                shipping_address?: Address;
                /**
                 * The state of the customer's billing address
                 * @example "CA"
                 */
                state?: string;
                /**
                 * The tax identification number of the customer
                 * @example "EU123456789"
                 */
                tax_identification_number?: string;
                /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
                timezone?: Timezone;
            };
            /**
             * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
             * @example "startup"
             */
            plan_code?: string;
            /**
             * The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
             * @format date-time
             * @example "2022-08-08T00:00:00Z"
             */
            subscription_at?: string;
            /**
             * The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration).
             * @example "anniversary"
             */
            billing_time?: "calendar" | "anniversary";
            coupons?: {
                /**
                 * The name of the coupon.
                 * @example "Startup Deal"
                 */
                name?: string;
                /**
                 * Unique code used to identify the coupon.
                 * @example "startup_deal"
                 */
                code: string;
                /**
                 * The type of the coupon. It can have two possible values: `fixed_amount` or `percentage`.
                 *
                 * - If set to `fixed_amount`, the coupon represents a fixed amount discount.
                 * - If set to `percentage`, the coupon represents a percentage-based discount.
                 * @example "fixed_amount"
                 */
                coupon_type?: "fixed_amount" | "percentage";
                /**
                 * The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type.
                 * @example 5000
                 */
                amount_cents?: number | null;
                /**
                 * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
                 * @example "USD"
                 */
                amount_currency?: Currency | null;
                /**
                 * The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
                 * @pattern ^[0-9]+.?[0-9]*$
                 * @example null
                 */
                percentage_rate?: string | null;
                /**
                 * Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type
                 * @example 6
                 */
                frequency_duration?: number | null;
            }[];
            subscriptions?: {
                external_ids: string[];
            };
        }, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint resends an invoice for collection and retry a payment.
         *
         * @tags invoices
         * @name RetryPayment
         * @summary Retry an invoice payment
         * @request POST:/invoices/{lago_id}/retry_payment
         * @secure
         */
        retryPayment: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used for voiding an invoice. You can void an invoice only when it's in a `finalized` status, and the payment status is not `succeeded`.
         *
         * @tags invoices
         * @name VoidInvoice
         * @summary Void an invoice
         * @request POST:/invoices/{lago_id}/void
         * @secure
         */
        voidInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    organizations: {
        /**
         * @description This endpoint is used to update your own organization's settings.
         *
         * @tags organizations
         * @name UpdateOrganization
         * @summary Update your organization
         * @request PUT:/organizations
         * @secure
         */
        updateOrganization: (data: OrganizationUpdateInput, params?: RequestParams) => Promise<HttpResponse<Organization, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
    };
    paymentRequests: {
        /**
         * @description This endpoint is used to create a payment request to collect payments of overdue invoices of a given customer
         *
         * @tags payment_requests
         * @name CreatePaymentRequest
         * @summary Create a payment request
         * @request POST:/payment_requests
         * @secure
         */
        createPaymentRequest: (data: {
            payment_request: {
                /**
                 * The customer external unique identifier (provided by your own application)
                 * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
                 */
                external_customer_id: string;
                /**
                 * The customer's email address used for sending dunning notifications
                 * @format email
                 * @example "dinesh@piedpiper.test"
                 */
                email: string;
                /** A list of Lago IDs for the customer's overdue invoices to start the dunning process */
                lago_invoice_ids: string[];
            };
        }, params?: RequestParams) => Promise<HttpResponse<{
            payment_request: PaymentRequestObject;
        }, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used to list all existing payment requests.
         *
         * @tags payment_requests
         * @name FindAllPaymentRequests
         * @summary List all payment requests
         * @request GET:/payment_requests
         * @secure
         */
        findAllPaymentRequests: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
        }, params?: RequestParams) => Promise<HttpResponse<PaymentRequestsPaginated, ApiErrorUnauthorized>>;
    };
    payments: {
        /**
         * @description This endpoint is used to create a manual payment
         *
         * @tags payments
         * @name CreatePayment
         * @summary Create a payment
         * @request POST:/payments
         * @secure
         */
        createPayment: (data: {
            payment: {
                /**
                 * Unique identifier assigned to the invoice
                 * @example "486b147a-02a1-4ccf-8603-f3541fc25e7a"
                 */
                invoice_id: string;
                /**
                 * The payment amount in cents
                 * @example 100
                 */
                amount_cents: number;
                /**
                 * Reference for the payment
                 * @example "ref1"
                 */
                reference: string;
                /**
                 * The date the payment was made
                 * @format date
                 * @example "2025-02-20"
                 */
                paid_at?: string;
            };
        }, params?: RequestParams) => Promise<HttpResponse<{
            payment: {
                /**
                 * The unique identifier of the payment, created by Lago.
                 * @format uuid
                 * @example "4cf085a7-c196-4f07-a543-97c50ec6e8b2"
                 */
                lago_id?: string;
                /** List of invoice IDs associated with the payment. */
                invoice_ids?: string[];
                /**
                 * The amount of the payment in cents.
                 * @example 100
                 */
                amount_cents?: number;
                /**
                 * The currency of the payment amount.
                 * @example "USD"
                 */
                amount_currency?: string;
                /**
                 * The current status of the payment.
                 * @example "succeeded"
                 */
                payment_status?: string;
                /**
                 * The type of payment.
                 * @example "manual"
                 */
                type?: string;
                /**
                 * Reference for the payment.
                 * @example "ref1"
                 */
                reference?: string;
                /**
                 * External identifier for the payment (if applicable).
                 * @example null
                 */
                external_payment_id?: string | null;
                /**
                 * Timestamp when the payment was created.
                 * @format date-time
                 * @example "2025-02-20T00:00:00Z"
                 */
                created_at?: string;
            };
        }, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used to list all payments
         *
         * @tags payments
         * @name FindAllPayments
         * @summary List all payments
         * @request GET:/payments
         * @secure
         */
        findAllPayments: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * Unique identifier assigned to the customer in your application.
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * 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.
             * @format uuid
             * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
             */
            lago_invoice_id?: string;
        }, params?: RequestParams) => Promise<HttpResponse<{
            payments: any[];
            meta: PaginationMeta;
        }, ApiErrorUnauthorized>>;
    };
    plans: {
        /**
         * @description This endpoint creates a plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.
         *
         * @tags plans
         * @name CreatePlan
         * @summary Create a plan
         * @request POST:/plans
         * @secure
         */
        createPlan: (data: PlanCreateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all existing plans.
         *
         * @tags plans
         * @name FindAllPlans
         * @summary List all plans
         * @request GET:/plans
         * @secure
         */
        findAllPlans: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<PlansPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint updates a specific plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.
         *
         * @tags plans
         * @name UpdatePlan
         * @summary Update a plan
         * @request PUT:/plans/{code}
         * @secure
         */
        updatePlan: (code: string, data: PlanUpdateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific plan.
         *
         * @tags plans
         * @name FindPlan
         * @summary Retrieve a plan
         * @request GET:/plans/{code}
         * @secure
         */
        findPlan: (code: string, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint deletes a specific plan. Note that this plan could be associated with active subscriptions.
         *
         * @tags plans
         * @name DestroyPlan
         * @summary Delete a plan
         * @request DELETE:/plans/{code}
         * @secure
         */
        destroyPlan: (code: string, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    subscriptions: {
        /**
         * @description This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades).
         *
         * @tags subscriptions
         * @name CreateSubscription
         * @summary Assign a plan to a customer
         * @request POST:/subscriptions
         * @secure
         */
        createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves all active subscriptions.
         *
         * @tags subscriptions
         * @name FindAllSubscriptions
         * @summary List all subscriptions
         * @request GET:/subscriptions
         * @secure
         */
        findAllSubscriptions: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The customer external unique identifier (provided by your own application)
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id?: string;
            /**
             * The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans.
             * @example "premium"
             */
            plan_code?: string;
            /**
             * If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.
             * @example ["active","pending"]
             */
            "status[]"?: ("pending" | "canceled" | "terminated" | "active")[];
        }, params?: RequestParams) => Promise<HttpResponse<SubscriptionsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves a specific subscription.
         *
         * @tags subscriptions
         * @name FindSubscription
         * @summary Retrieve a subscription
         * @request GET:/subscriptions/{external_id}
         * @secure
         */
        findSubscription: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to update a subscription.
         *
         * @tags subscriptions
         * @name UpdateSubscription
         * @summary Update a subscription
         * @request PUT:/subscriptions/{external_id}
         * @secure
         */
        updateSubscription: (externalId: string, data: SubscriptionUpdateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to terminate a subscription.
         *
         * @tags subscriptions
         * @name DestroySubscription
         * @summary Terminate a subscription
         * @request DELETE:/subscriptions/{external_id}
         * @secure
         */
        destroySubscription: (externalId: string, query?: {
            /**
             * If the field is not defined, Lago will terminate only `active` subscriptions. However, if you wish to cancel a `pending` subscription, please ensure that you include `status=pending` in your request.
             * @example "pending"
             */
            status?: string;
        }, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
        /**
         * @description This endpoint enables the retrieval of the lifetime usage of a subscription.
         *
         * @tags subscriptions
         * @name GetSubscriptionLifetimeUsage
         * @summary Retrive subscription lifetime usage
         * @request GET:/subscriptions/{external_id}/lifetime_usage
         * @secure
         */
        getSubscriptionLifetimeUsage: (externalId: string, params?: RequestParams) => Promise<HttpResponse<LifetimeUsage, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint allows you to update the lifetime usage of a subscription.
         *
         * @tags subscriptions
         * @name UpdateSubscriptionLifetimeUsage
         * @summary Update a subscription lifetime usage
         * @request PUT:/subscriptions/{external_id}/lifetime_usage
         * @secure
         */
        updateSubscriptionLifetimeUsage: (externalId: string, data: LifetimeUsageInput, params?: RequestParams) => Promise<HttpResponse<LifetimeUsage, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
    };
    taxes: {
        /**
         * @description This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer.
         *
         * @tags taxes
         * @name CreateTax
         * @summary Create a tax
         * @request POST:/taxes
         * @secure
         */
        createTax: (data: TaxCreateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer.
         *
         * @tags taxes
         * @name FindAllTaxes
         * @summary List all taxes
         * @request GET:/taxes
         * @secure
         */
        findAllTaxes: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<TaxesPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer.
         *
         * @tags taxes
         * @name UpdateTax
         * @summary Update a tax
         * @request PUT:/taxes/{code}
         * @secure
         */
        updateTax: (code: string, data: TaxUpdateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint retrieves an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. The tax is identified by its unique code.
         *
         * @tags taxes
         * @name FindTax
         * @summary Retrieve a Tax
         * @request GET:/taxes/{code}
         * @secure
         */
        findTax: (code: string, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete a tax.
         *
         * @tags taxes
         * @name DestroyTax
         * @summary Delete a tax
         * @request DELETE:/taxes/{code}
         * @secure
         */
        destroyTax: (code: string, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    wallets: {
        /**
         * @description This endpoint is used to create a wallet with prepaid credits.
         *
         * @tags wallets
         * @name CreateWallet
         * @summary Create a wallet
         * @request POST:/wallets
         * @secure
         */
        createWallet: (data: WalletCreateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used to list all wallets with prepaid credits.
         *
         * @tags wallets
         * @name FindAllWallets
         * @summary List all wallets
         * @request GET:/wallets
         * @secure
         */
        findAllWallets: (query: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The customer external unique identifier (provided by your own application).
             * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
             */
            external_customer_id: string;
        }, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used to update an existing wallet with prepaid credits.
         *
         * @tags wallets
         * @name UpdateWallet
         * @summary Update a wallet
         * @request PUT:/wallets/{lago_id}
         * @secure
         */
        updateWallet: (lagoId: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to retrieve an existing wallet with prepaid credits.
         *
         * @tags wallets
         * @name FindWallet
         * @summary Retrieve a wallet
         * @request GET:/wallets/{lago_id}
         * @secure
         */
        findWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to terminate an existing wallet with prepaid credits.
         *
         * @tags wallets
         * @name DestroyWallet
         * @summary Terminate a wallet
         * @request DELETE:/wallets/{lago_id}
         * @secure
         */
        destroyWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to list all wallet transactions.
         *
         * @tags wallets
         * @name FindAllWalletTransactions
         * @summary List all wallet transactions
         * @request GET:/wallets/{lago_id}/wallet_transactions
         * @secure
         */
        findAllWalletTransactions: (lagoId: string, query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
            /**
             * The status of the wallet transaction. Possible values are `pending` or `settled`.
             * @example "pending"
             */
            status?: string;
            /**
             * The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
             * @example "purchased"
             */
            transaction_status?: string;
            /**
             * The transaction type of the wallet transaction. Possible values are `inbound` (increasing the wallet balance) or `outbound` (decreasing the wallet balance).
             * @example "inbound"
             */
            transaction_type?: string;
        }, params?: RequestParams) => Promise<HttpResponse<WalletTransactionsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    walletTransactions: {
        /**
         * @description This endpoint is used to top-up an active wallet.
         *
         * @tags wallets
         * @name CreateWalletTransaction
         * @summary Top up a wallet
         * @request POST:/wallet_transactions
         * @secure
         */
        createWalletTransaction: (data: WalletTransactionCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletTransactions, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used to retrieve a specific wallet transactions.
         *
         * @tags wallets
         * @name FindWalletTransaction
         * @summary Retrieve a wallet transaction
         * @request GET:/wallet_transactions/{lago_id}
         * @secure
         */
        findWalletTransaction: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionObject, ApiErrorUnauthorized | ApiErrorNotFound>>;
    };
    webhooks: {
        /**
         * @description This endpoint is used to retrieve the public key used to verify the webhooks signature
         *
         * @tags webhooks
         * @name FetchPublicKey
         * @summary Retrieve webhook public key
         * @request GET:/webhooks/public_key
         * @secure
         */
        fetchPublicKey: (params?: RequestParams) => Promise<HttpResponse<string, ApiErrorUnauthorized>>;
    };
    webhookEndpoints: {
        /**
         * @description This endpoint is used to create a webhook endpoint.
         *
         * @tags webhook_endpoints
         * @name CreateWebhookEndpoint
         * @summary Create a webhook_endpoint
         * @request POST:/webhook_endpoints
         * @secure
         */
        createWebhookEndpoint: (data: WebhookEndpointCreateInput, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
        /**
         * @description This endpoint is used to list all webhook endpoints.
         *
         * @tags webhook_endpoints
         * @name FindAllWebhookEndpoints
         * @summary List all webhook endpoints
         * @request GET:/webhook_endpoints
         * @secure
         */
        findAllWebhookEndpoints: (query?: {
            /**
             * Page number.
             * @example 1
             */
            page?: number;
            /**
             * Number of records per page.
             * @example 20
             */
            per_page?: number;
        }, params?: RequestParams) => Promise<HttpResponse<WebhookEndpointsPaginated, ApiErrorUnauthorized>>;
        /**
         * @description This endpoint is used to update an existing webhook endpoint.
         *
         * @tags webhook_endpoints
         * @name UpdateWebhookEndpoint
         * @summary Update a webhook endpoint
         * @request PUT:/webhook_endpoints/{lago_id}
         * @secure
         */
        updateWebhookEndpoint: (lagoId: string, data: WebhookEndpointUpdateInput, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to retrieve an existing webhook endpoint.
         *
         * @tags webhook_endpoints
         * @name FindWebhookEndpoint
         * @summary Retrieve a webhook endpoint
         * @request GET:/webhook_endpoints/{lago_id}
         * @secure
         */
        findWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorNotFound>>;
        /**
         * @description This endpoint is used to delete an existing webhook endpoint.
         *
         * @tags webhook_endpoints
         * @name DestroyWebhookEndpoint
         * @summary Delete a webhook endpoint
         * @request DELETE:/webhook_endpoints/{lago_id}
         * @secure
         */
        destroyWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
    };
}
export {};
