From e18336b6524ce159c33bb2e08f45a33006d6acb0 Mon Sep 17 00:00:00 2001 From: Antoine Payre Date: Wed, 1 Apr 2026 00:39:58 +0200 Subject: [PATCH 1/3] fix(credit-note): include integration_customers in customer object ## Context The lago-api standardized credit note detail endpoints (create, show, update, void) to consistently include integration_customers in the customer object. ## Description Update CreditNoteExtendedObject to reference CustomerObject instead of CustomerBaseObject, so the customer field includes integration_customers across all credit note detail responses. --- src/schemas/CreditNoteExtendedObject.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/CreditNoteExtendedObject.yaml b/src/schemas/CreditNoteExtendedObject.yaml index ebee2de0..85da6a42 100644 --- a/src/schemas/CreditNoteExtendedObject.yaml +++ b/src/schemas/CreditNoteExtendedObject.yaml @@ -3,4 +3,4 @@ allOf: - type: object properties: customer: - $ref: "./CustomerBaseObject.yaml" + $ref: "./CustomerObject.yaml" From d8ecb8f2f29950192ca3ede157de69922e8df562 Mon Sep 17 00:00:00 2001 From: Antoine Payre Date: Wed, 1 Apr 2026 00:43:40 +0200 Subject: [PATCH 2/3] misc: rebuild openapi.yaml bundle --- openapi.yaml | 132 +++++++++++++++++++++++++-------------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index ffc60738..a3fab37d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -14208,13 +14208,78 @@ components: amount_cents: 200 metadata: $ref: '#/components/schemas/MetadataInput' + IntegrationCustomer: + type: object + required: + - lago_id + - type + - external_customer_id + - integration_code + description: Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. + properties: + lago_id: + type: string + format: uuid + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + description: A unique identifier for the integration customer object in the Lago application. + type: + type: string + example: netsuite + description: |- + The integration type used for accounting and tax syncs. + Accepted values: `netsuite, anrok`. + enum: + - netsuite + - anrok + - xero + - hubspot + - salesforce + integration_code: + type: string + example: netsuite-eu-1 + description: Unique code used to identify an integration connection. + external_customer_id: + type: string + example: cus_12345 + description: 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. + sync_with_provider: + type: + - boolean + - 'null' + example: true + description: 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` + subsidiary_id: + type: string + example: '2' + description: This optional field is needed only when working with `netsuite` connection. + targeted_object: + type: + - string + - 'null' + example: contacts + description: This optional field is present only when working with `hubspot` connection. + email: + type: + - string + - 'null' + example: dinesh@piedpiper.test + description: This optional field is present only when working with `hubspot` connection. + CustomerObject: + allOf: + - $ref: '#/components/schemas/CustomerBaseObject' + - type: object + properties: + integration_customers: + type: array + items: + $ref: '#/components/schemas/IntegrationCustomer' CreditNoteExtendedObject: allOf: - $ref: '#/components/schemas/CreditNoteObject' - type: object properties: customer: - $ref: '#/components/schemas/CustomerBaseObject' + $ref: '#/components/schemas/CustomerObject' CreditNoteExtended: type: object required: @@ -14445,71 +14510,6 @@ components: properties: metadata: $ref: '#/components/schemas/MetadataObject' - IntegrationCustomer: - type: object - required: - - lago_id - - type - - external_customer_id - - integration_code - description: Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. - properties: - lago_id: - type: string - format: uuid - example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - description: A unique identifier for the integration customer object in the Lago application. - type: - type: string - example: netsuite - description: |- - The integration type used for accounting and tax syncs. - Accepted values: `netsuite, anrok`. - enum: - - netsuite - - anrok - - xero - - hubspot - - salesforce - integration_code: - type: string - example: netsuite-eu-1 - description: Unique code used to identify an integration connection. - external_customer_id: - type: string - example: cus_12345 - description: 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. - sync_with_provider: - type: - - boolean - - 'null' - example: true - description: 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` - subsidiary_id: - type: string - example: '2' - description: This optional field is needed only when working with `netsuite` connection. - targeted_object: - type: - - string - - 'null' - example: contacts - description: This optional field is present only when working with `hubspot` connection. - email: - type: - - string - - 'null' - example: dinesh@piedpiper.test - description: This optional field is present only when working with `hubspot` connection. - CustomerObject: - allOf: - - $ref: '#/components/schemas/CustomerBaseObject' - - type: object - properties: - integration_customers: - type: array - items: - $ref: '#/components/schemas/IntegrationCustomer' ErrorDetailObject: type: object required: From 60135f06e5e3e445245378e3a38bbf69f4c8f4a8 Mon Sep 17 00:00:00 2001 From: Antoine Payre Date: Sun, 16 Aug 2026 17:37:15 +0200 Subject: [PATCH 3/3] fix(credit-note): include integration_customers on list endpoint too The lago-api change (fe4e758) added integration_customers to the credit note list endpoint as well, not only the detail responses, so CreditNoteObject must reference CustomerObject. Co-Authored-By: Claude Opus 5 --- openapi.yaml | 132 +++++++++++++++--------------- src/schemas/CreditNoteObject.yaml | 2 +- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index a3fab37d..0595ee58 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -13875,6 +13875,71 @@ components: type: array items: $ref: '#/components/schemas/CustomerMetadata' + IntegrationCustomer: + type: object + required: + - lago_id + - type + - external_customer_id + - integration_code + description: Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. + properties: + lago_id: + type: string + format: uuid + example: 1a901a90-1a90-1a90-1a90-1a901a901a90 + description: A unique identifier for the integration customer object in the Lago application. + type: + type: string + example: netsuite + description: |- + The integration type used for accounting and tax syncs. + Accepted values: `netsuite, anrok`. + enum: + - netsuite + - anrok + - xero + - hubspot + - salesforce + integration_code: + type: string + example: netsuite-eu-1 + description: Unique code used to identify an integration connection. + external_customer_id: + type: string + example: cus_12345 + description: 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. + sync_with_provider: + type: + - boolean + - 'null' + example: true + description: 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` + subsidiary_id: + type: string + example: '2' + description: This optional field is needed only when working with `netsuite` connection. + targeted_object: + type: + - string + - 'null' + example: contacts + description: This optional field is present only when working with `hubspot` connection. + email: + type: + - string + - 'null' + example: dinesh@piedpiper.test + description: This optional field is present only when working with `hubspot` connection. + CustomerObject: + allOf: + - $ref: '#/components/schemas/CustomerBaseObject' + - type: object + properties: + integration_customers: + type: array + items: + $ref: '#/components/schemas/IntegrationCustomer' MetadataObject: type: - object @@ -14096,7 +14161,7 @@ components: example: false description: 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. customer: - $ref: '#/components/schemas/CustomerBaseObject' + $ref: '#/components/schemas/CustomerObject' metadata: $ref: '#/components/schemas/MetadataObject' error_details: @@ -14208,71 +14273,6 @@ components: amount_cents: 200 metadata: $ref: '#/components/schemas/MetadataInput' - IntegrationCustomer: - type: object - required: - - lago_id - - type - - external_customer_id - - integration_code - description: Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. - properties: - lago_id: - type: string - format: uuid - example: 1a901a90-1a90-1a90-1a90-1a901a901a90 - description: A unique identifier for the integration customer object in the Lago application. - type: - type: string - example: netsuite - description: |- - The integration type used for accounting and tax syncs. - Accepted values: `netsuite, anrok`. - enum: - - netsuite - - anrok - - xero - - hubspot - - salesforce - integration_code: - type: string - example: netsuite-eu-1 - description: Unique code used to identify an integration connection. - external_customer_id: - type: string - example: cus_12345 - description: 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. - sync_with_provider: - type: - - boolean - - 'null' - example: true - description: 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` - subsidiary_id: - type: string - example: '2' - description: This optional field is needed only when working with `netsuite` connection. - targeted_object: - type: - - string - - 'null' - example: contacts - description: This optional field is present only when working with `hubspot` connection. - email: - type: - - string - - 'null' - example: dinesh@piedpiper.test - description: This optional field is present only when working with `hubspot` connection. - CustomerObject: - allOf: - - $ref: '#/components/schemas/CustomerBaseObject' - - type: object - properties: - integration_customers: - type: array - items: - $ref: '#/components/schemas/IntegrationCustomer' CreditNoteExtendedObject: allOf: - $ref: '#/components/schemas/CreditNoteObject' diff --git a/src/schemas/CreditNoteObject.yaml b/src/schemas/CreditNoteObject.yaml index 321b9f93..a1d0dc58 100644 --- a/src/schemas/CreditNoteObject.yaml +++ b/src/schemas/CreditNoteObject.yaml @@ -179,7 +179,7 @@ properties: example: false description: 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. customer: - $ref: "../schemas/CustomerBaseObject.yaml" + $ref: "../schemas/CustomerObject.yaml" metadata: $ref: "./CreditNoteMetadataObject.yaml" error_details: