22
33from __future__ import annotations
44
5- from typing import Optional
5+ from typing import Union , Optional
6+ from datetime import datetime
67from typing_extensions import Literal
78
89import httpx
@@ -61,6 +62,7 @@ def create(
6162 invoice_settings : top_up_create_params .InvoiceSettings ,
6263 per_unit_cost_basis : str ,
6364 threshold : str ,
65+ active_from : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
6466 expires_after : Optional [int ] | NotGiven = NOT_GIVEN ,
6567 expires_after_unit : Optional [Literal ["day" , "month" ]] | NotGiven = NOT_GIVEN ,
6668 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -93,6 +95,9 @@ def create(
9395 threshold: The threshold at which to trigger the top-up. If the balance is at or below this
9496 threshold, the top-up will be triggered.
9597
98+ active_from: The date from which the top-up is active. If unspecified, the top-up is active
99+ immediately.
100+
96101 expires_after: The number of days or months after which the top-up expires. If unspecified, it
97102 does not expire.
98103
@@ -119,6 +124,7 @@ def create(
119124 "invoice_settings" : invoice_settings ,
120125 "per_unit_cost_basis" : per_unit_cost_basis ,
121126 "threshold" : threshold ,
127+ "active_from" : active_from ,
122128 "expires_after" : expires_after ,
123129 "expires_after_unit" : expires_after_unit ,
124130 },
@@ -239,6 +245,7 @@ def create_by_external_id(
239245 invoice_settings : top_up_create_by_external_id_params .InvoiceSettings ,
240246 per_unit_cost_basis : str ,
241247 threshold : str ,
248+ active_from : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
242249 expires_after : Optional [int ] | NotGiven = NOT_GIVEN ,
243250 expires_after_unit : Optional [Literal ["day" , "month" ]] | NotGiven = NOT_GIVEN ,
244251 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -271,6 +278,9 @@ def create_by_external_id(
271278 threshold: The threshold at which to trigger the top-up. If the balance is at or below this
272279 threshold, the top-up will be triggered.
273280
281+ active_from: The date from which the top-up is active. If unspecified, the top-up is active
282+ immediately.
283+
274284 expires_after: The number of days or months after which the top-up expires. If unspecified, it
275285 does not expire.
276286
@@ -299,6 +309,7 @@ def create_by_external_id(
299309 "invoice_settings" : invoice_settings ,
300310 "per_unit_cost_basis" : per_unit_cost_basis ,
301311 "threshold" : threshold ,
312+ "active_from" : active_from ,
302313 "expires_after" : expires_after ,
303314 "expires_after_unit" : expires_after_unit ,
304315 },
@@ -444,6 +455,7 @@ async def create(
444455 invoice_settings : top_up_create_params .InvoiceSettings ,
445456 per_unit_cost_basis : str ,
446457 threshold : str ,
458+ active_from : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
447459 expires_after : Optional [int ] | NotGiven = NOT_GIVEN ,
448460 expires_after_unit : Optional [Literal ["day" , "month" ]] | NotGiven = NOT_GIVEN ,
449461 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -476,6 +488,9 @@ async def create(
476488 threshold: The threshold at which to trigger the top-up. If the balance is at or below this
477489 threshold, the top-up will be triggered.
478490
491+ active_from: The date from which the top-up is active. If unspecified, the top-up is active
492+ immediately.
493+
479494 expires_after: The number of days or months after which the top-up expires. If unspecified, it
480495 does not expire.
481496
@@ -502,6 +517,7 @@ async def create(
502517 "invoice_settings" : invoice_settings ,
503518 "per_unit_cost_basis" : per_unit_cost_basis ,
504519 "threshold" : threshold ,
520+ "active_from" : active_from ,
505521 "expires_after" : expires_after ,
506522 "expires_after_unit" : expires_after_unit ,
507523 },
@@ -622,6 +638,7 @@ async def create_by_external_id(
622638 invoice_settings : top_up_create_by_external_id_params .InvoiceSettings ,
623639 per_unit_cost_basis : str ,
624640 threshold : str ,
641+ active_from : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
625642 expires_after : Optional [int ] | NotGiven = NOT_GIVEN ,
626643 expires_after_unit : Optional [Literal ["day" , "month" ]] | NotGiven = NOT_GIVEN ,
627644 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -654,6 +671,9 @@ async def create_by_external_id(
654671 threshold: The threshold at which to trigger the top-up. If the balance is at or below this
655672 threshold, the top-up will be triggered.
656673
674+ active_from: The date from which the top-up is active. If unspecified, the top-up is active
675+ immediately.
676+
657677 expires_after: The number of days or months after which the top-up expires. If unspecified, it
658678 does not expire.
659679
@@ -682,6 +702,7 @@ async def create_by_external_id(
682702 "invoice_settings" : invoice_settings ,
683703 "per_unit_cost_basis" : per_unit_cost_basis ,
684704 "threshold" : threshold ,
705+ "active_from" : active_from ,
685706 "expires_after" : expires_after ,
686707 "expires_after_unit" : expires_after_unit ,
687708 },
0 commit comments