Skip to content

Commit

Permalink
Feat(invoice_custom_section): add invoice custom section information …
Browse files Browse the repository at this point in the history
…to open_api (#317)

* add invoice custom section information to open_api

* build
  • Loading branch information
annvelents authored Jan 14, 2025
1 parent 680d202 commit a7f3e68
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 0 deletions.
64 changes: 64 additions & 0 deletions openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/schemas/CustomerBaseObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ properties:
- `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.
skip_invoice_custom_sections:
type: boolean
example: false
description: Set to true to exclude all invoice custom sections from PDF generation for this customer only.
billing_configuration:
$ref: './CustomerBillingConfiguration.yaml'
shipping_address:
Expand Down
11 changes: 11 additions & 0 deletions src/schemas/CustomerCreateInput.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,14 @@ properties:
type: boolean
example: true
description: 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.

skip_invoice_custom_sections:
type: boolean
example: false
description: Set to `true` to exclude all invoice custom sections from PDF generation for this customer only. False by default
invoice_custom_section_codes:
type: array
items:
type: string
description: List of unique codes identifying the invoice custom sections.
example: ['eu_bank_details']
5 changes: 5 additions & 0 deletions src/schemas/CustomerObjectExtended.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ allOf:
type: array
items:
$ref: './TaxObject.yaml'
applicable_invoice_custom_sections:
description: The customer’s invoice custom section used for generating invoices.
type: array
items:
$ref: './InvoiceCustomSectionObject.yaml'
45 changes: 45 additions & 0 deletions src/schemas/InvoiceCustomSectionObject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
type: object
required:
- lago_id
- name
- code
properties:
lago_id:
type: string
format: "uuid"
description: Unique identifier for the invoice custom section in the Lago application, generated by Lago to ensure record uniqueness within the system.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
name:
type: string
description: Name of the invoice custom section.
example: "EU Bank Details"
code:
type: string
description: Unique code identifying the invoice custom section for the API request.
example: "eu_bank_details"
description:
type: string
description: Internal description of the invoice custom section.
example: "This section contains the bank details for EU customers."
details:
type: string
description: The value shown on the invoice PDF.
example: "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143"
display_name:
type: string
description: The name of the invoice custom section displayed on the invoice.
example: "Bank Details:"
applied_to_organization:
type: boolean
description: Set to true if the invoice custom section is a default for the organization.
example: true
organization_id:
type: string
format: "uuid"
description: Unique identifier for the organization associated with the invoice custom section.
example: "1a901a90-1a90-1a90-1a90-1a901a901a90"
created_at:
type: string
format: "date-time"
description: Creation date of the tax.
example: "2023-07-06T14:35:58Z"

0 comments on commit a7f3e68

Please sign in to comment.