diff --git a/.stats.yml b/.stats.yml index 4749834c..3f5becfd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb-75733a914692b0abe72ba99d622fc55b20da1c7fa7f73e2bfee30dfe32b66a51.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb-3c64831407a4e2d742e93f5ebf78391c83a2ec833e3026518c91515240294e0b.yml diff --git a/src/orb/resources/plans/plans.py b/src/orb/resources/plans/plans.py index 63be744c..b741983d 100644 --- a/src/orb/resources/plans/plans.py +++ b/src/orb/resources/plans/plans.py @@ -59,6 +59,7 @@ def create( external_plan_id: Optional[str] | NotGiven = NOT_GIVEN, metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, net_terms: Optional[int] | NotGiven = NOT_GIVEN, + status: Literal["active", "draft"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -87,6 +88,9 @@ def create( date for the invoice. If you intend the invoice to be due on issue, set this to 0. + status: The status of the plan to create (either active or draft). If not specified, + this defaults to active. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -108,6 +112,7 @@ def create( "external_plan_id": external_plan_id, "metadata": metadata, "net_terms": net_terms, + "status": status, }, plan_create_params.PlanCreateParams, ), @@ -318,6 +323,7 @@ async def create( external_plan_id: Optional[str] | NotGiven = NOT_GIVEN, metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, net_terms: Optional[int] | NotGiven = NOT_GIVEN, + status: Literal["active", "draft"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -346,6 +352,9 @@ async def create( date for the invoice. If you intend the invoice to be due on issue, set this to 0. + status: The status of the plan to create (either active or draft). If not specified, + this defaults to active. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -367,6 +376,7 @@ async def create( "external_plan_id": external_plan_id, "metadata": metadata, "net_terms": net_terms, + "status": status, }, plan_create_params.PlanCreateParams, ), diff --git a/src/orb/types/plan_create_params.py b/src/orb/types/plan_create_params.py index bdcbc685..d37a3db0 100644 --- a/src/orb/types/plan_create_params.py +++ b/src/orb/types/plan_create_params.py @@ -75,6 +75,12 @@ class PlanCreateParams(TypedDict, total=False): to 0. """ + status: Literal["active", "draft"] + """The status of the plan to create (either active or draft). + + If not specified, this defaults to active. + """ + class PriceNewPlanUnitPriceUnitConfig(TypedDict, total=False): unit_amount: Required[str] diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 06948dde..7134af1a 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -61,6 +61,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: external_plan_id="string", metadata={"foo": "string"}, net_terms=0, + status="active", ) assert_matches_type(Plan, plan, path=["response"]) @@ -277,6 +278,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No external_plan_id="string", metadata={"foo": "string"}, net_terms=0, + status="active", ) assert_matches_type(Plan, plan, path=["response"])