Commit c111620
committed
feat(multi-entity): expose billing_entity_code on subscription, wallet, invoice, and credit-note models
## Context
The Lago API lets callers pin a subscription, wallet, or one-off
invoice to a specific billing entity within a multi-entity
organization, and returns the resolved entity on every resource
response (subscription, wallet, invoice, credit note). The Python
client's models did not carry the field, so callers couldn't set
it on create/update or read it back from the parsed responses.
## Description
Adds `billing_entity_code: Optional[str]` to the `Subscription` and
`Wallet` request models (POST + PUT) and to their response models,
to the `OneOffInvoice` and `InvoicePreview` request models for
`POST /invoices` and `POST /invoices/preview`, and to
`CreditNoteResponse` so the field is parsed from credit-note
payloads. No changes are needed for the list endpoints: the
`find_all` mixin already takes a generic `options: QueryPairs`
dict that natively carries `billing_entity_codes[]` as a list
value.1 parent f943162 commit c111620
4 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
0 commit comments