@@ -154,6 +154,7 @@ def update(
154154 invoice_id : str ,
155155 * ,
156156 due_date : Union [Union [str , date ], Union [str , datetime ], None ] | Omit = omit ,
157+ invoice_date : Union [Union [str , date ], Union [str , datetime ], None ] | Omit = omit ,
157158 metadata : Optional [Dict [str , Optional [str ]]] | Omit = omit ,
158159 net_terms : Optional [int ] | Omit = omit ,
159160 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -165,17 +166,20 @@ def update(
165166 idempotency_key : str | None = None ,
166167 ) -> Invoice :
167168 """
168- This endpoint allows you to update the `metadata`, `net_terms`, and `due_date`
169- properties on an invoice. If you pass null for the metadata value, it will clear
170- any existing metadata for that invoice.
169+ This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, and
170+ `invoice_date` properties on an invoice. If you pass null for the metadata
171+ value, it will clear any existing metadata for that invoice.
171172
172- `metadata` can be modified regardless of invoice state. `net_terms` and
173- `due_date` can only be modified if the invoice is in a `draft` state.
173+ `metadata` can be modified regardless of invoice state. `net_terms`, `due_date`,
174+ and `invoice_date` can only be modified if the invoice is in a `draft` state.
175+ `invoice_date` can only be modified for non-subscription invoices.
174176
175177 Args:
176178 due_date: An optional custom due date for the invoice. If not set, the due date will be
177179 calculated based on the `net_terms` value.
178180
181+ invoice_date: The date of the invoice. Can only be modified for one-off draft invoices.
182+
179183 metadata: User-specified key/value pairs for the resource. Individual keys can be removed
180184 by setting the value to `null`, and the entire metadata mapping can be cleared
181185 by setting `metadata` to `null`.
@@ -203,6 +207,7 @@ def update(
203207 body = maybe_transform (
204208 {
205209 "due_date" : due_date ,
210+ "invoice_date" : invoice_date ,
206211 "metadata" : metadata ,
207212 "net_terms" : net_terms ,
208213 },
@@ -719,6 +724,7 @@ async def update(
719724 invoice_id : str ,
720725 * ,
721726 due_date : Union [Union [str , date ], Union [str , datetime ], None ] | Omit = omit ,
727+ invoice_date : Union [Union [str , date ], Union [str , datetime ], None ] | Omit = omit ,
722728 metadata : Optional [Dict [str , Optional [str ]]] | Omit = omit ,
723729 net_terms : Optional [int ] | Omit = omit ,
724730 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -730,17 +736,20 @@ async def update(
730736 idempotency_key : str | None = None ,
731737 ) -> Invoice :
732738 """
733- This endpoint allows you to update the `metadata`, `net_terms`, and `due_date`
734- properties on an invoice. If you pass null for the metadata value, it will clear
735- any existing metadata for that invoice.
739+ This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, and
740+ `invoice_date` properties on an invoice. If you pass null for the metadata
741+ value, it will clear any existing metadata for that invoice.
736742
737- `metadata` can be modified regardless of invoice state. `net_terms` and
738- `due_date` can only be modified if the invoice is in a `draft` state.
743+ `metadata` can be modified regardless of invoice state. `net_terms`, `due_date`,
744+ and `invoice_date` can only be modified if the invoice is in a `draft` state.
745+ `invoice_date` can only be modified for non-subscription invoices.
739746
740747 Args:
741748 due_date: An optional custom due date for the invoice. If not set, the due date will be
742749 calculated based on the `net_terms` value.
743750
751+ invoice_date: The date of the invoice. Can only be modified for one-off draft invoices.
752+
744753 metadata: User-specified key/value pairs for the resource. Individual keys can be removed
745754 by setting the value to `null`, and the entire metadata mapping can be cleared
746755 by setting `metadata` to `null`.
@@ -768,6 +777,7 @@ async def update(
768777 body = await async_maybe_transform (
769778 {
770779 "due_date" : due_date ,
780+ "invoice_date" : invoice_date ,
771781 "metadata" : metadata ,
772782 "net_terms" : net_terms ,
773783 },
0 commit comments