lago-javascript-client 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/openapi/client.d.ts +136 -74
- package/esm/openapi/client.js +1 -1
- package/package.json +1 -1
- package/script/openapi/client.d.ts +136 -74
- package/script/openapi/client.js +1 -1
package/esm/openapi/client.d.ts
CHANGED
|
@@ -373,7 +373,7 @@ export interface BaseAppliedTax {
|
|
|
373
373
|
created_at?: string;
|
|
374
374
|
}
|
|
375
375
|
export interface BillableMetric {
|
|
376
|
-
billable_metric:
|
|
376
|
+
billable_metric: BillableMetricObject;
|
|
377
377
|
}
|
|
378
378
|
export interface BillableMetricObject {
|
|
379
379
|
/**
|
|
@@ -443,42 +443,7 @@ export interface BillableMetricObject {
|
|
|
443
443
|
*/
|
|
444
444
|
weighted_interval?: "seconds" | null;
|
|
445
445
|
filters?: BillableMetricFilterObject[];
|
|
446
|
-
/**
|
|
447
|
-
* Number of active subscriptions using this billable metric.
|
|
448
|
-
* @deprecated
|
|
449
|
-
* @example 4
|
|
450
|
-
*/
|
|
451
|
-
active_subscriptions_count: number;
|
|
452
|
-
/**
|
|
453
|
-
* Number of draft invoices for which this billable metric is listed as an invoice item.
|
|
454
|
-
* @deprecated
|
|
455
|
-
* @example 10
|
|
456
|
-
*/
|
|
457
|
-
draft_invoices_count: number;
|
|
458
|
-
/**
|
|
459
|
-
* Number of plans using this billable metric.
|
|
460
|
-
* @deprecated
|
|
461
|
-
* @example 4
|
|
462
|
-
*/
|
|
463
|
-
plans_count: number;
|
|
464
446
|
}
|
|
465
|
-
export type BillableMetricObjectExtended = BillableMetricObject & {
|
|
466
|
-
/**
|
|
467
|
-
* Number of active subscriptions using this billable metric.
|
|
468
|
-
* @example 4
|
|
469
|
-
*/
|
|
470
|
-
active_subscriptions_count?: number;
|
|
471
|
-
/**
|
|
472
|
-
* Number of draft invoices for which this billable metric is listed as an invoice item.
|
|
473
|
-
* @example 10
|
|
474
|
-
*/
|
|
475
|
-
draft_invoices_count?: number;
|
|
476
|
-
/**
|
|
477
|
-
* Number of plans using this billable metric.
|
|
478
|
-
* @example 4
|
|
479
|
-
*/
|
|
480
|
-
plans_count?: number;
|
|
481
|
-
};
|
|
482
447
|
export interface BillableMetricBaseInput {
|
|
483
448
|
/**
|
|
484
449
|
* Name of the billable metric.
|
|
@@ -1050,7 +1015,7 @@ export interface CouponObject {
|
|
|
1050
1015
|
* @format date-time
|
|
1051
1016
|
* @example "2022-08-08T23:59:59Z"
|
|
1052
1017
|
*/
|
|
1053
|
-
terminated_at?: string;
|
|
1018
|
+
terminated_at?: string | null;
|
|
1054
1019
|
}
|
|
1055
1020
|
export interface CouponsPaginated {
|
|
1056
1021
|
coupons: CouponObject[];
|
|
@@ -1889,6 +1854,16 @@ export interface CustomerCreateInput {
|
|
|
1889
1854
|
*/
|
|
1890
1855
|
display_in_invoice: boolean;
|
|
1891
1856
|
}[];
|
|
1857
|
+
/**
|
|
1858
|
+
* Set to `true` to exclude all invoice custom sections from PDF generation for this customer only. False by default
|
|
1859
|
+
* @example false
|
|
1860
|
+
*/
|
|
1861
|
+
skip_invoice_custom_sections?: boolean;
|
|
1862
|
+
/**
|
|
1863
|
+
* List of unique codes identifying the invoice custom sections.
|
|
1864
|
+
* @example ["eu_bank_details"]
|
|
1865
|
+
*/
|
|
1866
|
+
invoice_custom_section_codes?: string[];
|
|
1892
1867
|
};
|
|
1893
1868
|
}
|
|
1894
1869
|
/** 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 */
|
|
@@ -2064,6 +2039,11 @@ export type CustomerObject = {
|
|
|
2064
2039
|
* @example "inherit"
|
|
2065
2040
|
*/
|
|
2066
2041
|
finalize_zero_amount_invoice?: "inherit" | "skip" | "finalize";
|
|
2042
|
+
/**
|
|
2043
|
+
* Set to true to exclude all invoice custom sections from PDF generation for this customer only.
|
|
2044
|
+
* @example false
|
|
2045
|
+
*/
|
|
2046
|
+
skip_invoice_custom_sections?: boolean;
|
|
2067
2047
|
/** 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. */
|
|
2068
2048
|
billing_configuration?: CustomerBillingConfiguration;
|
|
2069
2049
|
/** 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. */
|
|
@@ -2076,6 +2056,57 @@ export type CustomerObjectExtended = CustomerObject & {
|
|
|
2076
2056
|
metadata?: CustomerMetadata[];
|
|
2077
2057
|
/** List of customer taxes */
|
|
2078
2058
|
taxes?: TaxObject[];
|
|
2059
|
+
/** The customer’s invoice custom section used for generating invoices. */
|
|
2060
|
+
applicable_invoice_custom_sections?: {
|
|
2061
|
+
/**
|
|
2062
|
+
* Unique identifier for the invoice custom section in the Lago application, generated by Lago to ensure record uniqueness within the system.
|
|
2063
|
+
* @format uuid
|
|
2064
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2065
|
+
*/
|
|
2066
|
+
lago_id: string;
|
|
2067
|
+
/**
|
|
2068
|
+
* Name of the invoice custom section.
|
|
2069
|
+
* @example "EU Bank Details"
|
|
2070
|
+
*/
|
|
2071
|
+
name: string;
|
|
2072
|
+
/**
|
|
2073
|
+
* Unique code identifying the invoice custom section for the API request.
|
|
2074
|
+
* @example "eu_bank_details"
|
|
2075
|
+
*/
|
|
2076
|
+
code: string;
|
|
2077
|
+
/**
|
|
2078
|
+
* Internal description of the invoice custom section.
|
|
2079
|
+
* @example "This section contains the bank details for EU customers."
|
|
2080
|
+
*/
|
|
2081
|
+
description?: string;
|
|
2082
|
+
/**
|
|
2083
|
+
* The value shown on the invoice PDF.
|
|
2084
|
+
* @example "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143"
|
|
2085
|
+
*/
|
|
2086
|
+
details?: string;
|
|
2087
|
+
/**
|
|
2088
|
+
* The name of the invoice custom section displayed on the invoice.
|
|
2089
|
+
* @example "Bank Details:"
|
|
2090
|
+
*/
|
|
2091
|
+
display_name?: string;
|
|
2092
|
+
/**
|
|
2093
|
+
* Set to true if the invoice custom section is a default for the organization.
|
|
2094
|
+
* @example true
|
|
2095
|
+
*/
|
|
2096
|
+
applied_to_organization?: boolean;
|
|
2097
|
+
/**
|
|
2098
|
+
* Unique identifier for the organization associated with the invoice custom section.
|
|
2099
|
+
* @format uuid
|
|
2100
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2101
|
+
*/
|
|
2102
|
+
organization_id?: string;
|
|
2103
|
+
/**
|
|
2104
|
+
* Creation date of the tax.
|
|
2105
|
+
* @format date-time
|
|
2106
|
+
* @example "2023-07-06T14:35:58Z"
|
|
2107
|
+
*/
|
|
2108
|
+
created_at?: string;
|
|
2109
|
+
}[];
|
|
2079
2110
|
};
|
|
2080
2111
|
export interface CustomerPastUsage {
|
|
2081
2112
|
usage_periods: CustomerUsage[];
|
|
@@ -3008,14 +3039,15 @@ export type InvoiceObject = {
|
|
|
3008
3039
|
*/
|
|
3009
3040
|
invoice_type: "subscription" | "add_on" | "credit" | "one_off" | "progressive_billing";
|
|
3010
3041
|
/**
|
|
3011
|
-
* The status of the invoice. It indicates the current state of the invoice and can have
|
|
3042
|
+
* The status of the invoice. It indicates the current state of the invoice and can have following values:
|
|
3012
3043
|
* - `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.
|
|
3013
3044
|
* - `finalized`: the invoice has been issued and finalized. In this state, events cannot be ingested or added to the invoice anymore.
|
|
3014
3045
|
* - `voided`: the invoice has been issued and subsequently voided. In this state, events cannot be ingested or added to the invoice anymore.
|
|
3046
|
+
* - `pending`: the invoice remains pending until the taxes are fetched from the external provider.
|
|
3015
3047
|
* - `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.
|
|
3016
3048
|
* @example "finalized"
|
|
3017
3049
|
*/
|
|
3018
|
-
status: "draft" | "finalized" | "voided" | "failed";
|
|
3050
|
+
status: "draft" | "finalized" | "voided" | "failed" | "pending";
|
|
3019
3051
|
/**
|
|
3020
3052
|
* The status of the payment associated with the invoice. It can have one of the following values:
|
|
3021
3053
|
* - `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.
|
|
@@ -3090,6 +3122,18 @@ export type InvoiceObject = {
|
|
|
3090
3122
|
* @example "https://getlago.com/invoice/file"
|
|
3091
3123
|
*/
|
|
3092
3124
|
file_url?: string;
|
|
3125
|
+
/**
|
|
3126
|
+
* 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
|
|
3127
|
+
* @format date-time
|
|
3128
|
+
* @example "2022-04-29T08:59:51Z"
|
|
3129
|
+
*/
|
|
3130
|
+
created_at: string;
|
|
3131
|
+
/**
|
|
3132
|
+
* 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
|
|
3133
|
+
* @format date-time
|
|
3134
|
+
* @example "2022-04-29T08:59:51Z"
|
|
3135
|
+
*/
|
|
3136
|
+
updated_at: string;
|
|
3093
3137
|
} & {
|
|
3094
3138
|
/** The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice. */
|
|
3095
3139
|
customer?: CustomerObject;
|
|
@@ -3943,16 +3987,6 @@ export interface PlanObject {
|
|
|
3943
3987
|
* @example null
|
|
3944
3988
|
*/
|
|
3945
3989
|
bill_charges_monthly?: boolean | null;
|
|
3946
|
-
/**
|
|
3947
|
-
* The count of active subscriptions that are currently associated with the plan. This field provides valuable information regarding the impact of deleting the plan. By checking the value of this field, you can determine the number of subscriptions that will be affected if the plan is deleted.
|
|
3948
|
-
* @example 0
|
|
3949
|
-
*/
|
|
3950
|
-
active_subscriptions_count: number;
|
|
3951
|
-
/**
|
|
3952
|
-
* The number of draft invoices that include a subscription attached to the plan. This field provides valuable information about the impact of deleting the plan. By checking the value of this field, you can determine the number of draft invoices that will be affected if the plan is deleted.
|
|
3953
|
-
* @example 0
|
|
3954
|
-
*/
|
|
3955
|
-
draft_invoices_count: number;
|
|
3956
3990
|
minimum_commitment?: MinimumCommitmentObject;
|
|
3957
3991
|
/**
|
|
3958
3992
|
* Additional usage-based charges for this plan.
|
|
@@ -4112,7 +4146,7 @@ export interface SubscriptionObject {
|
|
|
4112
4146
|
* @format date-time
|
|
4113
4147
|
* @example "2022-10-08T00:00:00Z"
|
|
4114
4148
|
*/
|
|
4115
|
-
ending_at?: string;
|
|
4149
|
+
ending_at?: string | null;
|
|
4116
4150
|
/**
|
|
4117
4151
|
* 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).
|
|
4118
4152
|
* @format date-time
|
|
@@ -4237,26 +4271,6 @@ export interface TaxObject {
|
|
|
4237
4271
|
* @example true
|
|
4238
4272
|
*/
|
|
4239
4273
|
applied_to_organization: boolean;
|
|
4240
|
-
/**
|
|
4241
|
-
* Number of add-ons this tax is applied to.
|
|
4242
|
-
* @example 0
|
|
4243
|
-
*/
|
|
4244
|
-
add_ons_count?: number;
|
|
4245
|
-
/**
|
|
4246
|
-
* Number of charges this tax is applied to.
|
|
4247
|
-
* @example 0
|
|
4248
|
-
*/
|
|
4249
|
-
charges_count?: number;
|
|
4250
|
-
/**
|
|
4251
|
-
* Number of customers this tax is applied to (directly or via the organization's default).
|
|
4252
|
-
* @example 0
|
|
4253
|
-
*/
|
|
4254
|
-
customers_count: number;
|
|
4255
|
-
/**
|
|
4256
|
-
* Number of plans this tax is applied to.
|
|
4257
|
-
* @example 0
|
|
4258
|
-
*/
|
|
4259
|
-
plans_count?: number;
|
|
4260
4274
|
/**
|
|
4261
4275
|
* Creation date of the tax.
|
|
4262
4276
|
* @format date-time
|
|
@@ -4623,7 +4637,7 @@ export interface WalletObject {
|
|
|
4623
4637
|
*/
|
|
4624
4638
|
ongoing_balance_cents: number;
|
|
4625
4639
|
/**
|
|
4626
|
-
* The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage including taxes.
|
|
4640
|
+
* The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage and draft invoices including taxes.
|
|
4627
4641
|
* @example 200
|
|
4628
4642
|
*/
|
|
4629
4643
|
ongoing_usage_balance_cents: number;
|
|
@@ -4634,7 +4648,7 @@ export interface WalletObject {
|
|
|
4634
4648
|
*/
|
|
4635
4649
|
credits_ongoing_balance: string;
|
|
4636
4650
|
/**
|
|
4637
|
-
* The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage including taxes.
|
|
4651
|
+
* The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage and draft invoices including taxes.
|
|
4638
4652
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
4639
4653
|
* @example "2.0"
|
|
4640
4654
|
*/
|
|
@@ -4980,7 +4994,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
4980
4994
|
}
|
|
4981
4995
|
/**
|
|
4982
4996
|
* @title Lago API documentation
|
|
4983
|
-
* @version 1.
|
|
4997
|
+
* @version 1.18.0
|
|
4984
4998
|
* @license AGPLv3
|
|
4985
4999
|
* @baseUrl https://api.getlago.com/api/v1
|
|
4986
5000
|
* @externalDocs https://github.com/getlago
|
|
@@ -5376,6 +5390,49 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5376
5390
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
5377
5391
|
*/
|
|
5378
5392
|
external_customer_id?: string;
|
|
5393
|
+
/**
|
|
5394
|
+
* Filter credit notes starting from a specific date.
|
|
5395
|
+
* @format date
|
|
5396
|
+
* @example "2022-07-08"
|
|
5397
|
+
*/
|
|
5398
|
+
issuing_date_from?: string;
|
|
5399
|
+
/**
|
|
5400
|
+
* Filter credit notes up to a specific date.
|
|
5401
|
+
* @format date
|
|
5402
|
+
* @example "2022-08-09"
|
|
5403
|
+
*/
|
|
5404
|
+
issuing_date_to?: string;
|
|
5405
|
+
/**
|
|
5406
|
+
* Search credit notes by id, number, customer name, customer external_id or customer email.
|
|
5407
|
+
* @example "Jane"
|
|
5408
|
+
*/
|
|
5409
|
+
search_term?: string;
|
|
5410
|
+
/**
|
|
5411
|
+
* Filter credit notes by currency. Possible values ISO 4217 currency codes.
|
|
5412
|
+
* @example "EUR"
|
|
5413
|
+
*/
|
|
5414
|
+
currency?: string;
|
|
5415
|
+
/** Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`. */
|
|
5416
|
+
reason?: "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "duplicated_charge" | "other";
|
|
5417
|
+
/** Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`. */
|
|
5418
|
+
credit_status?: "available" | "consumed" | "voided";
|
|
5419
|
+
/** Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`. */
|
|
5420
|
+
refund_status?: "pending" | "succeeded" | "failed";
|
|
5421
|
+
/**
|
|
5422
|
+
* Filter credit notes by their related invoice number.
|
|
5423
|
+
* @example "INV-001-002"
|
|
5424
|
+
*/
|
|
5425
|
+
invoice_number?: string;
|
|
5426
|
+
/**
|
|
5427
|
+
* Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
|
|
5428
|
+
* @example 9000
|
|
5429
|
+
*/
|
|
5430
|
+
amount_from?: number;
|
|
5431
|
+
/**
|
|
5432
|
+
* Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
|
|
5433
|
+
* @example 100000
|
|
5434
|
+
*/
|
|
5435
|
+
amount_to?: number;
|
|
5379
5436
|
}, params?: RequestParams) => Promise<HttpResponse<CreditNotes, ApiErrorUnauthorized>>;
|
|
5380
5437
|
/**
|
|
5381
5438
|
* @description This endpoint updates an existing credit note.
|
|
@@ -5713,6 +5770,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5713
5770
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
5714
5771
|
*/
|
|
5715
5772
|
external_subscription_id?: string;
|
|
5773
|
+
/**
|
|
5774
|
+
* Filter results by event transaction ID
|
|
5775
|
+
* @example "et_12345678"
|
|
5776
|
+
*/
|
|
5777
|
+
event_transaction_id?: string;
|
|
5716
5778
|
/** Filter results by fee's currency. */
|
|
5717
5779
|
currency?: Currency;
|
|
5718
5780
|
/**
|
|
@@ -5873,7 +5935,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5873
5935
|
*/
|
|
5874
5936
|
search_term?: string;
|
|
5875
5937
|
/**
|
|
5876
|
-
* Filter invoices by currency
|
|
5938
|
+
* Filter invoices by currency. Possible values ISO 4217 currency codes.
|
|
5877
5939
|
* @example "EUR"
|
|
5878
5940
|
*/
|
|
5879
5941
|
currency?: string;
|
package/esm/openapi/client.js
CHANGED
package/package.json
CHANGED
|
@@ -373,7 +373,7 @@ export interface BaseAppliedTax {
|
|
|
373
373
|
created_at?: string;
|
|
374
374
|
}
|
|
375
375
|
export interface BillableMetric {
|
|
376
|
-
billable_metric:
|
|
376
|
+
billable_metric: BillableMetricObject;
|
|
377
377
|
}
|
|
378
378
|
export interface BillableMetricObject {
|
|
379
379
|
/**
|
|
@@ -443,42 +443,7 @@ export interface BillableMetricObject {
|
|
|
443
443
|
*/
|
|
444
444
|
weighted_interval?: "seconds" | null;
|
|
445
445
|
filters?: BillableMetricFilterObject[];
|
|
446
|
-
/**
|
|
447
|
-
* Number of active subscriptions using this billable metric.
|
|
448
|
-
* @deprecated
|
|
449
|
-
* @example 4
|
|
450
|
-
*/
|
|
451
|
-
active_subscriptions_count: number;
|
|
452
|
-
/**
|
|
453
|
-
* Number of draft invoices for which this billable metric is listed as an invoice item.
|
|
454
|
-
* @deprecated
|
|
455
|
-
* @example 10
|
|
456
|
-
*/
|
|
457
|
-
draft_invoices_count: number;
|
|
458
|
-
/**
|
|
459
|
-
* Number of plans using this billable metric.
|
|
460
|
-
* @deprecated
|
|
461
|
-
* @example 4
|
|
462
|
-
*/
|
|
463
|
-
plans_count: number;
|
|
464
446
|
}
|
|
465
|
-
export type BillableMetricObjectExtended = BillableMetricObject & {
|
|
466
|
-
/**
|
|
467
|
-
* Number of active subscriptions using this billable metric.
|
|
468
|
-
* @example 4
|
|
469
|
-
*/
|
|
470
|
-
active_subscriptions_count?: number;
|
|
471
|
-
/**
|
|
472
|
-
* Number of draft invoices for which this billable metric is listed as an invoice item.
|
|
473
|
-
* @example 10
|
|
474
|
-
*/
|
|
475
|
-
draft_invoices_count?: number;
|
|
476
|
-
/**
|
|
477
|
-
* Number of plans using this billable metric.
|
|
478
|
-
* @example 4
|
|
479
|
-
*/
|
|
480
|
-
plans_count?: number;
|
|
481
|
-
};
|
|
482
447
|
export interface BillableMetricBaseInput {
|
|
483
448
|
/**
|
|
484
449
|
* Name of the billable metric.
|
|
@@ -1050,7 +1015,7 @@ export interface CouponObject {
|
|
|
1050
1015
|
* @format date-time
|
|
1051
1016
|
* @example "2022-08-08T23:59:59Z"
|
|
1052
1017
|
*/
|
|
1053
|
-
terminated_at?: string;
|
|
1018
|
+
terminated_at?: string | null;
|
|
1054
1019
|
}
|
|
1055
1020
|
export interface CouponsPaginated {
|
|
1056
1021
|
coupons: CouponObject[];
|
|
@@ -1889,6 +1854,16 @@ export interface CustomerCreateInput {
|
|
|
1889
1854
|
*/
|
|
1890
1855
|
display_in_invoice: boolean;
|
|
1891
1856
|
}[];
|
|
1857
|
+
/**
|
|
1858
|
+
* Set to `true` to exclude all invoice custom sections from PDF generation for this customer only. False by default
|
|
1859
|
+
* @example false
|
|
1860
|
+
*/
|
|
1861
|
+
skip_invoice_custom_sections?: boolean;
|
|
1862
|
+
/**
|
|
1863
|
+
* List of unique codes identifying the invoice custom sections.
|
|
1864
|
+
* @example ["eu_bank_details"]
|
|
1865
|
+
*/
|
|
1866
|
+
invoice_custom_section_codes?: string[];
|
|
1892
1867
|
};
|
|
1893
1868
|
}
|
|
1894
1869
|
/** 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 */
|
|
@@ -2064,6 +2039,11 @@ export type CustomerObject = {
|
|
|
2064
2039
|
* @example "inherit"
|
|
2065
2040
|
*/
|
|
2066
2041
|
finalize_zero_amount_invoice?: "inherit" | "skip" | "finalize";
|
|
2042
|
+
/**
|
|
2043
|
+
* Set to true to exclude all invoice custom sections from PDF generation for this customer only.
|
|
2044
|
+
* @example false
|
|
2045
|
+
*/
|
|
2046
|
+
skip_invoice_custom_sections?: boolean;
|
|
2067
2047
|
/** 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. */
|
|
2068
2048
|
billing_configuration?: CustomerBillingConfiguration;
|
|
2069
2049
|
/** 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. */
|
|
@@ -2076,6 +2056,57 @@ export type CustomerObjectExtended = CustomerObject & {
|
|
|
2076
2056
|
metadata?: CustomerMetadata[];
|
|
2077
2057
|
/** List of customer taxes */
|
|
2078
2058
|
taxes?: TaxObject[];
|
|
2059
|
+
/** The customer’s invoice custom section used for generating invoices. */
|
|
2060
|
+
applicable_invoice_custom_sections?: {
|
|
2061
|
+
/**
|
|
2062
|
+
* Unique identifier for the invoice custom section in the Lago application, generated by Lago to ensure record uniqueness within the system.
|
|
2063
|
+
* @format uuid
|
|
2064
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2065
|
+
*/
|
|
2066
|
+
lago_id: string;
|
|
2067
|
+
/**
|
|
2068
|
+
* Name of the invoice custom section.
|
|
2069
|
+
* @example "EU Bank Details"
|
|
2070
|
+
*/
|
|
2071
|
+
name: string;
|
|
2072
|
+
/**
|
|
2073
|
+
* Unique code identifying the invoice custom section for the API request.
|
|
2074
|
+
* @example "eu_bank_details"
|
|
2075
|
+
*/
|
|
2076
|
+
code: string;
|
|
2077
|
+
/**
|
|
2078
|
+
* Internal description of the invoice custom section.
|
|
2079
|
+
* @example "This section contains the bank details for EU customers."
|
|
2080
|
+
*/
|
|
2081
|
+
description?: string;
|
|
2082
|
+
/**
|
|
2083
|
+
* The value shown on the invoice PDF.
|
|
2084
|
+
* @example "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143"
|
|
2085
|
+
*/
|
|
2086
|
+
details?: string;
|
|
2087
|
+
/**
|
|
2088
|
+
* The name of the invoice custom section displayed on the invoice.
|
|
2089
|
+
* @example "Bank Details:"
|
|
2090
|
+
*/
|
|
2091
|
+
display_name?: string;
|
|
2092
|
+
/**
|
|
2093
|
+
* Set to true if the invoice custom section is a default for the organization.
|
|
2094
|
+
* @example true
|
|
2095
|
+
*/
|
|
2096
|
+
applied_to_organization?: boolean;
|
|
2097
|
+
/**
|
|
2098
|
+
* Unique identifier for the organization associated with the invoice custom section.
|
|
2099
|
+
* @format uuid
|
|
2100
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2101
|
+
*/
|
|
2102
|
+
organization_id?: string;
|
|
2103
|
+
/**
|
|
2104
|
+
* Creation date of the tax.
|
|
2105
|
+
* @format date-time
|
|
2106
|
+
* @example "2023-07-06T14:35:58Z"
|
|
2107
|
+
*/
|
|
2108
|
+
created_at?: string;
|
|
2109
|
+
}[];
|
|
2079
2110
|
};
|
|
2080
2111
|
export interface CustomerPastUsage {
|
|
2081
2112
|
usage_periods: CustomerUsage[];
|
|
@@ -3008,14 +3039,15 @@ export type InvoiceObject = {
|
|
|
3008
3039
|
*/
|
|
3009
3040
|
invoice_type: "subscription" | "add_on" | "credit" | "one_off" | "progressive_billing";
|
|
3010
3041
|
/**
|
|
3011
|
-
* The status of the invoice. It indicates the current state of the invoice and can have
|
|
3042
|
+
* The status of the invoice. It indicates the current state of the invoice and can have following values:
|
|
3012
3043
|
* - `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.
|
|
3013
3044
|
* - `finalized`: the invoice has been issued and finalized. In this state, events cannot be ingested or added to the invoice anymore.
|
|
3014
3045
|
* - `voided`: the invoice has been issued and subsequently voided. In this state, events cannot be ingested or added to the invoice anymore.
|
|
3046
|
+
* - `pending`: the invoice remains pending until the taxes are fetched from the external provider.
|
|
3015
3047
|
* - `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.
|
|
3016
3048
|
* @example "finalized"
|
|
3017
3049
|
*/
|
|
3018
|
-
status: "draft" | "finalized" | "voided" | "failed";
|
|
3050
|
+
status: "draft" | "finalized" | "voided" | "failed" | "pending";
|
|
3019
3051
|
/**
|
|
3020
3052
|
* The status of the payment associated with the invoice. It can have one of the following values:
|
|
3021
3053
|
* - `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.
|
|
@@ -3090,6 +3122,18 @@ export type InvoiceObject = {
|
|
|
3090
3122
|
* @example "https://getlago.com/invoice/file"
|
|
3091
3123
|
*/
|
|
3092
3124
|
file_url?: string;
|
|
3125
|
+
/**
|
|
3126
|
+
* 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
|
|
3127
|
+
* @format date-time
|
|
3128
|
+
* @example "2022-04-29T08:59:51Z"
|
|
3129
|
+
*/
|
|
3130
|
+
created_at: string;
|
|
3131
|
+
/**
|
|
3132
|
+
* 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
|
|
3133
|
+
* @format date-time
|
|
3134
|
+
* @example "2022-04-29T08:59:51Z"
|
|
3135
|
+
*/
|
|
3136
|
+
updated_at: string;
|
|
3093
3137
|
} & {
|
|
3094
3138
|
/** The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice. */
|
|
3095
3139
|
customer?: CustomerObject;
|
|
@@ -3943,16 +3987,6 @@ export interface PlanObject {
|
|
|
3943
3987
|
* @example null
|
|
3944
3988
|
*/
|
|
3945
3989
|
bill_charges_monthly?: boolean | null;
|
|
3946
|
-
/**
|
|
3947
|
-
* The count of active subscriptions that are currently associated with the plan. This field provides valuable information regarding the impact of deleting the plan. By checking the value of this field, you can determine the number of subscriptions that will be affected if the plan is deleted.
|
|
3948
|
-
* @example 0
|
|
3949
|
-
*/
|
|
3950
|
-
active_subscriptions_count: number;
|
|
3951
|
-
/**
|
|
3952
|
-
* The number of draft invoices that include a subscription attached to the plan. This field provides valuable information about the impact of deleting the plan. By checking the value of this field, you can determine the number of draft invoices that will be affected if the plan is deleted.
|
|
3953
|
-
* @example 0
|
|
3954
|
-
*/
|
|
3955
|
-
draft_invoices_count: number;
|
|
3956
3990
|
minimum_commitment?: MinimumCommitmentObject;
|
|
3957
3991
|
/**
|
|
3958
3992
|
* Additional usage-based charges for this plan.
|
|
@@ -4112,7 +4146,7 @@ export interface SubscriptionObject {
|
|
|
4112
4146
|
* @format date-time
|
|
4113
4147
|
* @example "2022-10-08T00:00:00Z"
|
|
4114
4148
|
*/
|
|
4115
|
-
ending_at?: string;
|
|
4149
|
+
ending_at?: string | null;
|
|
4116
4150
|
/**
|
|
4117
4151
|
* 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).
|
|
4118
4152
|
* @format date-time
|
|
@@ -4237,26 +4271,6 @@ export interface TaxObject {
|
|
|
4237
4271
|
* @example true
|
|
4238
4272
|
*/
|
|
4239
4273
|
applied_to_organization: boolean;
|
|
4240
|
-
/**
|
|
4241
|
-
* Number of add-ons this tax is applied to.
|
|
4242
|
-
* @example 0
|
|
4243
|
-
*/
|
|
4244
|
-
add_ons_count?: number;
|
|
4245
|
-
/**
|
|
4246
|
-
* Number of charges this tax is applied to.
|
|
4247
|
-
* @example 0
|
|
4248
|
-
*/
|
|
4249
|
-
charges_count?: number;
|
|
4250
|
-
/**
|
|
4251
|
-
* Number of customers this tax is applied to (directly or via the organization's default).
|
|
4252
|
-
* @example 0
|
|
4253
|
-
*/
|
|
4254
|
-
customers_count: number;
|
|
4255
|
-
/**
|
|
4256
|
-
* Number of plans this tax is applied to.
|
|
4257
|
-
* @example 0
|
|
4258
|
-
*/
|
|
4259
|
-
plans_count?: number;
|
|
4260
4274
|
/**
|
|
4261
4275
|
* Creation date of the tax.
|
|
4262
4276
|
* @format date-time
|
|
@@ -4623,7 +4637,7 @@ export interface WalletObject {
|
|
|
4623
4637
|
*/
|
|
4624
4638
|
ongoing_balance_cents: number;
|
|
4625
4639
|
/**
|
|
4626
|
-
* The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage including taxes.
|
|
4640
|
+
* The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage and draft invoices including taxes.
|
|
4627
4641
|
* @example 200
|
|
4628
4642
|
*/
|
|
4629
4643
|
ongoing_usage_balance_cents: number;
|
|
@@ -4634,7 +4648,7 @@ export interface WalletObject {
|
|
|
4634
4648
|
*/
|
|
4635
4649
|
credits_ongoing_balance: string;
|
|
4636
4650
|
/**
|
|
4637
|
-
* The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage including taxes.
|
|
4651
|
+
* The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage and draft invoices including taxes.
|
|
4638
4652
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
4639
4653
|
* @example "2.0"
|
|
4640
4654
|
*/
|
|
@@ -4980,7 +4994,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
4980
4994
|
}
|
|
4981
4995
|
/**
|
|
4982
4996
|
* @title Lago API documentation
|
|
4983
|
-
* @version 1.
|
|
4997
|
+
* @version 1.18.0
|
|
4984
4998
|
* @license AGPLv3
|
|
4985
4999
|
* @baseUrl https://api.getlago.com/api/v1
|
|
4986
5000
|
* @externalDocs https://github.com/getlago
|
|
@@ -5376,6 +5390,49 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5376
5390
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
5377
5391
|
*/
|
|
5378
5392
|
external_customer_id?: string;
|
|
5393
|
+
/**
|
|
5394
|
+
* Filter credit notes starting from a specific date.
|
|
5395
|
+
* @format date
|
|
5396
|
+
* @example "2022-07-08"
|
|
5397
|
+
*/
|
|
5398
|
+
issuing_date_from?: string;
|
|
5399
|
+
/**
|
|
5400
|
+
* Filter credit notes up to a specific date.
|
|
5401
|
+
* @format date
|
|
5402
|
+
* @example "2022-08-09"
|
|
5403
|
+
*/
|
|
5404
|
+
issuing_date_to?: string;
|
|
5405
|
+
/**
|
|
5406
|
+
* Search credit notes by id, number, customer name, customer external_id or customer email.
|
|
5407
|
+
* @example "Jane"
|
|
5408
|
+
*/
|
|
5409
|
+
search_term?: string;
|
|
5410
|
+
/**
|
|
5411
|
+
* Filter credit notes by currency. Possible values ISO 4217 currency codes.
|
|
5412
|
+
* @example "EUR"
|
|
5413
|
+
*/
|
|
5414
|
+
currency?: string;
|
|
5415
|
+
/** Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`. */
|
|
5416
|
+
reason?: "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "duplicated_charge" | "other";
|
|
5417
|
+
/** Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`. */
|
|
5418
|
+
credit_status?: "available" | "consumed" | "voided";
|
|
5419
|
+
/** Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`. */
|
|
5420
|
+
refund_status?: "pending" | "succeeded" | "failed";
|
|
5421
|
+
/**
|
|
5422
|
+
* Filter credit notes by their related invoice number.
|
|
5423
|
+
* @example "INV-001-002"
|
|
5424
|
+
*/
|
|
5425
|
+
invoice_number?: string;
|
|
5426
|
+
/**
|
|
5427
|
+
* Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
|
|
5428
|
+
* @example 9000
|
|
5429
|
+
*/
|
|
5430
|
+
amount_from?: number;
|
|
5431
|
+
/**
|
|
5432
|
+
* Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
|
|
5433
|
+
* @example 100000
|
|
5434
|
+
*/
|
|
5435
|
+
amount_to?: number;
|
|
5379
5436
|
}, params?: RequestParams) => Promise<HttpResponse<CreditNotes, ApiErrorUnauthorized>>;
|
|
5380
5437
|
/**
|
|
5381
5438
|
* @description This endpoint updates an existing credit note.
|
|
@@ -5713,6 +5770,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5713
5770
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
5714
5771
|
*/
|
|
5715
5772
|
external_subscription_id?: string;
|
|
5773
|
+
/**
|
|
5774
|
+
* Filter results by event transaction ID
|
|
5775
|
+
* @example "et_12345678"
|
|
5776
|
+
*/
|
|
5777
|
+
event_transaction_id?: string;
|
|
5716
5778
|
/** Filter results by fee's currency. */
|
|
5717
5779
|
currency?: Currency;
|
|
5718
5780
|
/**
|
|
@@ -5873,7 +5935,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5873
5935
|
*/
|
|
5874
5936
|
search_term?: string;
|
|
5875
5937
|
/**
|
|
5876
|
-
* Filter invoices by currency
|
|
5938
|
+
* Filter invoices by currency. Possible values ISO 4217 currency codes.
|
|
5877
5939
|
* @example "EUR"
|
|
5878
5940
|
*/
|
|
5879
5941
|
currency?: string;
|
package/script/openapi/client.js
CHANGED
|
@@ -152,7 +152,7 @@ class HttpClient {
|
|
|
152
152
|
exports.HttpClient = HttpClient;
|
|
153
153
|
/**
|
|
154
154
|
* @title Lago API documentation
|
|
155
|
-
* @version 1.
|
|
155
|
+
* @version 1.18.0
|
|
156
156
|
* @license AGPLv3
|
|
157
157
|
* @baseUrl https://api.getlago.com/api/v1
|
|
158
158
|
* @externalDocs https://github.com/getlago
|