22
33from __future__ import annotations
44
5- from typing import Optional
5+ from typing import Union , Optional
6+ from datetime import date
67
78import httpx
89
@@ -90,6 +91,9 @@ def apply(
9091 * ,
9192 description : Optional [str ] | Omit = omit ,
9293 mark_as_paid : Optional [bool ] | Omit = omit ,
94+ payment_external_id : Optional [str ] | Omit = omit ,
95+ payment_notes : Optional [str ] | Omit = omit ,
96+ payment_received_date : Union [str , date , None ] | Omit = omit ,
9397 previously_collected_amount : Optional [str ] | Omit = omit ,
9498 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9599 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -111,6 +115,14 @@ def apply(
111115 mark_as_paid: Mark all pending invoices that are payable as paid. If amount is also provided,
112116 mark as paid and credit the difference to the customer's balance.
113117
118+ payment_external_id: An optional external ID to associate with the payment. Only applicable when
119+ mark_as_paid is true.
120+
121+ payment_notes: Optional notes about the payment. Only applicable when mark_as_paid is true.
122+
123+ payment_received_date: A date string to specify the date the payment was received. Only applicable when
124+ mark_as_paid is true. If not provided, defaults to the current date.
125+
114126 previously_collected_amount: Amount already collected to apply to the customer's balance. If mark_as_paid is
115127 also provided, credit the difference to the customer's balance.
116128
@@ -134,6 +146,9 @@ def apply(
134146 {
135147 "description" : description ,
136148 "mark_as_paid" : mark_as_paid ,
149+ "payment_external_id" : payment_external_id ,
150+ "payment_notes" : payment_notes ,
151+ "payment_received_date" : payment_received_date ,
137152 "previously_collected_amount" : previously_collected_amount ,
138153 },
139154 subscription_change_apply_params .SubscriptionChangeApplyParams ,
@@ -263,6 +278,9 @@ async def apply(
263278 * ,
264279 description : Optional [str ] | Omit = omit ,
265280 mark_as_paid : Optional [bool ] | Omit = omit ,
281+ payment_external_id : Optional [str ] | Omit = omit ,
282+ payment_notes : Optional [str ] | Omit = omit ,
283+ payment_received_date : Union [str , date , None ] | Omit = omit ,
266284 previously_collected_amount : Optional [str ] | Omit = omit ,
267285 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
268286 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -284,6 +302,14 @@ async def apply(
284302 mark_as_paid: Mark all pending invoices that are payable as paid. If amount is also provided,
285303 mark as paid and credit the difference to the customer's balance.
286304
305+ payment_external_id: An optional external ID to associate with the payment. Only applicable when
306+ mark_as_paid is true.
307+
308+ payment_notes: Optional notes about the payment. Only applicable when mark_as_paid is true.
309+
310+ payment_received_date: A date string to specify the date the payment was received. Only applicable when
311+ mark_as_paid is true. If not provided, defaults to the current date.
312+
287313 previously_collected_amount: Amount already collected to apply to the customer's balance. If mark_as_paid is
288314 also provided, credit the difference to the customer's balance.
289315
@@ -307,6 +333,9 @@ async def apply(
307333 {
308334 "description" : description ,
309335 "mark_as_paid" : mark_as_paid ,
336+ "payment_external_id" : payment_external_id ,
337+ "payment_notes" : payment_notes ,
338+ "payment_received_date" : payment_received_date ,
310339 "previously_collected_amount" : previously_collected_amount ,
311340 },
312341 subscription_change_apply_params .SubscriptionChangeApplyParams ,
0 commit comments