diff --git a/tests/api_resources/coupons/test_subscriptions.py b/tests/api_resources/coupons/test_subscriptions.py index 234271d4..4c190521 100644 --- a/tests/api_resources/coupons/test_subscriptions.py +++ b/tests/api_resources/coupons/test_subscriptions.py @@ -21,15 +21,15 @@ class TestSubscriptions: @parametrize def test_method_list(self, client: Orb) -> None: subscription = client.coupons.subscriptions.list( - "string", + coupon_id="coupon_id", ) assert_matches_type(SyncPage[Subscription], subscription, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: subscription = client.coupons.subscriptions.list( - "string", - cursor="string", + coupon_id="coupon_id", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[Subscription], subscription, path=["response"]) @@ -37,7 +37,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_list(self, client: Orb) -> None: response = client.coupons.subscriptions.with_raw_response.list( - "string", + coupon_id="coupon_id", ) assert response.is_closed is True @@ -48,7 +48,7 @@ def test_raw_response_list(self, client: Orb) -> None: @parametrize def test_streaming_response_list(self, client: Orb) -> None: with client.coupons.subscriptions.with_streaming_response.list( - "string", + coupon_id="coupon_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -62,7 +62,7 @@ def test_streaming_response_list(self, client: Orb) -> None: def test_path_params_list(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `coupon_id` but received ''"): client.coupons.subscriptions.with_raw_response.list( - "", + coupon_id="", ) @@ -72,15 +72,15 @@ class TestAsyncSubscriptions: @parametrize async def test_method_list(self, async_client: AsyncOrb) -> None: subscription = await async_client.coupons.subscriptions.list( - "string", + coupon_id="coupon_id", ) assert_matches_type(AsyncPage[Subscription], subscription, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.coupons.subscriptions.list( - "string", - cursor="string", + coupon_id="coupon_id", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[Subscription], subscription, path=["response"]) @@ -88,7 +88,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None @parametrize async def test_raw_response_list(self, async_client: AsyncOrb) -> None: response = await async_client.coupons.subscriptions.with_raw_response.list( - "string", + coupon_id="coupon_id", ) assert response.is_closed is True @@ -99,7 +99,7 @@ async def test_raw_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async with async_client.coupons.subscriptions.with_streaming_response.list( - "string", + coupon_id="coupon_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -113,5 +113,5 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async def test_path_params_list(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `coupon_id` but received ''"): await async_client.coupons.subscriptions.with_raw_response.list( - "", + coupon_id="", ) diff --git a/tests/api_resources/customers/credits/test_ledger.py b/tests/api_resources/customers/credits/test_ledger.py index d442ed7a..ff759955 100644 --- a/tests/api_resources/customers/credits/test_ledger.py +++ b/tests/api_resources/customers/credits/test_ledger.py @@ -27,31 +27,31 @@ class TestLedger: @parametrize def test_method_list(self, client: Orb) -> None: ledger = client.customers.credits.ledger.list( - "string", + customer_id="customer_id", ) assert_matches_type(SyncPage[LedgerListResponse], ledger, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: ledger = client.customers.credits.ledger.list( - "string", + customer_id="customer_id", created_at_gt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - currency="string", - cursor="string", + currency="currency", + cursor="cursor", entry_status="committed", entry_type="increment", limit=1, - minimum_amount="string", + minimum_amount="minimum_amount", ) assert_matches_type(SyncPage[LedgerListResponse], ledger, path=["response"]) @parametrize def test_raw_response_list(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -62,7 +62,7 @@ def test_raw_response_list(self, client: Orb) -> None: @parametrize def test_streaming_response_list(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -76,13 +76,13 @@ def test_streaming_response_list(self, client: Orb) -> None: def test_path_params_list(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.list( - "", + customer_id="", ) @parametrize def test_method_create_entry_overload_1(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="increment", ) @@ -91,28 +91,28 @@ def test_method_create_entry_overload_1(self, client: Orb) -> None: @parametrize def test_method_create_entry_with_all_params_overload_1(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="increment", - currency="string", - description="string", + currency="currency", + description="description", effective_date=parse_datetime("2019-12-27T18:11:19.117Z"), expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), invoice_settings={ "auto_collection": True, "net_terms": 0, - "memo": "string", + "memo": "memo", "require_successful_payment": True, }, metadata={"foo": "string"}, - per_unit_cost_basis="string", + per_unit_cost_basis="per_unit_cost_basis", ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @parametrize def test_raw_response_create_entry_overload_1(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="increment", ) @@ -125,7 +125,7 @@ def test_raw_response_create_entry_overload_1(self, client: Orb) -> None: @parametrize def test_streaming_response_create_entry_overload_1(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="increment", ) as response: @@ -141,7 +141,7 @@ def test_streaming_response_create_entry_overload_1(self, client: Orb) -> None: def test_path_params_create_entry_overload_1(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", amount=0, entry_type="increment", ) @@ -149,7 +149,7 @@ def test_path_params_create_entry_overload_1(self, client: Orb) -> None: @parametrize def test_method_create_entry_overload_2(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="decrement", ) @@ -158,11 +158,11 @@ def test_method_create_entry_overload_2(self, client: Orb) -> None: @parametrize def test_method_create_entry_with_all_params_overload_2(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="decrement", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -170,7 +170,7 @@ def test_method_create_entry_with_all_params_overload_2(self, client: Orb) -> No @parametrize def test_raw_response_create_entry_overload_2(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="decrement", ) @@ -183,7 +183,7 @@ def test_raw_response_create_entry_overload_2(self, client: Orb) -> None: @parametrize def test_streaming_response_create_entry_overload_2(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="decrement", ) as response: @@ -199,7 +199,7 @@ def test_streaming_response_create_entry_overload_2(self, client: Orb) -> None: def test_path_params_create_entry_overload_2(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", amount=0, entry_type="decrement", ) @@ -207,7 +207,7 @@ def test_path_params_create_entry_overload_2(self, client: Orb) -> None: @parametrize def test_method_create_entry_overload_3(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -217,14 +217,14 @@ def test_method_create_entry_overload_3(self, client: Orb) -> None: @parametrize def test_method_create_entry_with_all_params_overload_3(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), amount=0, - block_id="string", - currency="string", - description="string", + block_id="block_id", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -232,7 +232,7 @@ def test_method_create_entry_with_all_params_overload_3(self, client: Orb) -> No @parametrize def test_raw_response_create_entry_overload_3(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -246,7 +246,7 @@ def test_raw_response_create_entry_overload_3(self, client: Orb) -> None: @parametrize def test_streaming_response_create_entry_overload_3(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -263,7 +263,7 @@ def test_streaming_response_create_entry_overload_3(self, client: Orb) -> None: def test_path_params_create_entry_overload_3(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -272,9 +272,9 @@ def test_path_params_create_entry_overload_3(self, client: Orb) -> None: @parametrize def test_method_create_entry_overload_4(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -282,12 +282,12 @@ def test_method_create_entry_overload_4(self, client: Orb) -> None: @parametrize def test_method_create_entry_with_all_params_overload_4(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, void_reason="refund", ) @@ -296,9 +296,9 @@ def test_method_create_entry_with_all_params_overload_4(self, client: Orb) -> No @parametrize def test_raw_response_create_entry_overload_4(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) @@ -310,9 +310,9 @@ def test_raw_response_create_entry_overload_4(self, client: Orb) -> None: @parametrize def test_streaming_response_create_entry_overload_4(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) as response: assert not response.is_closed @@ -327,18 +327,18 @@ def test_streaming_response_create_entry_overload_4(self, client: Orb) -> None: def test_path_params_create_entry_overload_4(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) @parametrize def test_method_create_entry_overload_5(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -346,12 +346,12 @@ def test_method_create_entry_overload_5(self, client: Orb) -> None: @parametrize def test_method_create_entry_with_all_params_overload_5(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -359,9 +359,9 @@ def test_method_create_entry_with_all_params_overload_5(self, client: Orb) -> No @parametrize def test_raw_response_create_entry_overload_5(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) @@ -373,9 +373,9 @@ def test_raw_response_create_entry_overload_5(self, client: Orb) -> None: @parametrize def test_streaming_response_create_entry_overload_5(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) as response: assert not response.is_closed @@ -390,16 +390,16 @@ def test_streaming_response_create_entry_overload_5(self, client: Orb) -> None: def test_path_params_create_entry_overload_5(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) @parametrize def test_method_create_entry_by_external_id_overload_1(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="increment", ) @@ -408,28 +408,28 @@ def test_method_create_entry_by_external_id_overload_1(self, client: Orb) -> Non @parametrize def test_method_create_entry_by_external_id_with_all_params_overload_1(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="increment", - currency="string", - description="string", + currency="currency", + description="description", effective_date=parse_datetime("2019-12-27T18:11:19.117Z"), expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), invoice_settings={ "auto_collection": True, "net_terms": 0, - "memo": "string", + "memo": "memo", "require_successful_payment": True, }, metadata={"foo": "string"}, - per_unit_cost_basis="string", + per_unit_cost_basis="per_unit_cost_basis", ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @parametrize def test_raw_response_create_entry_by_external_id_overload_1(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="increment", ) @@ -442,7 +442,7 @@ def test_raw_response_create_entry_by_external_id_overload_1(self, client: Orb) @parametrize def test_streaming_response_create_entry_by_external_id_overload_1(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="increment", ) as response: @@ -458,7 +458,7 @@ def test_streaming_response_create_entry_by_external_id_overload_1(self, client: def test_path_params_create_entry_by_external_id_overload_1(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", amount=0, entry_type="increment", ) @@ -466,7 +466,7 @@ def test_path_params_create_entry_by_external_id_overload_1(self, client: Orb) - @parametrize def test_method_create_entry_by_external_id_overload_2(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="decrement", ) @@ -475,11 +475,11 @@ def test_method_create_entry_by_external_id_overload_2(self, client: Orb) -> Non @parametrize def test_method_create_entry_by_external_id_with_all_params_overload_2(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="decrement", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -487,7 +487,7 @@ def test_method_create_entry_by_external_id_with_all_params_overload_2(self, cli @parametrize def test_raw_response_create_entry_by_external_id_overload_2(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="decrement", ) @@ -500,7 +500,7 @@ def test_raw_response_create_entry_by_external_id_overload_2(self, client: Orb) @parametrize def test_streaming_response_create_entry_by_external_id_overload_2(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="decrement", ) as response: @@ -516,7 +516,7 @@ def test_streaming_response_create_entry_by_external_id_overload_2(self, client: def test_path_params_create_entry_by_external_id_overload_2(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", amount=0, entry_type="decrement", ) @@ -524,7 +524,7 @@ def test_path_params_create_entry_by_external_id_overload_2(self, client: Orb) - @parametrize def test_method_create_entry_by_external_id_overload_3(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -534,14 +534,14 @@ def test_method_create_entry_by_external_id_overload_3(self, client: Orb) -> Non @parametrize def test_method_create_entry_by_external_id_with_all_params_overload_3(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), amount=0, - block_id="string", - currency="string", - description="string", + block_id="block_id", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -549,7 +549,7 @@ def test_method_create_entry_by_external_id_with_all_params_overload_3(self, cli @parametrize def test_raw_response_create_entry_by_external_id_overload_3(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -563,7 +563,7 @@ def test_raw_response_create_entry_by_external_id_overload_3(self, client: Orb) @parametrize def test_streaming_response_create_entry_by_external_id_overload_3(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -580,7 +580,7 @@ def test_streaming_response_create_entry_by_external_id_overload_3(self, client: def test_path_params_create_entry_by_external_id_overload_3(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -589,9 +589,9 @@ def test_path_params_create_entry_by_external_id_overload_3(self, client: Orb) - @parametrize def test_method_create_entry_by_external_id_overload_4(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -599,12 +599,12 @@ def test_method_create_entry_by_external_id_overload_4(self, client: Orb) -> Non @parametrize def test_method_create_entry_by_external_id_with_all_params_overload_4(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, void_reason="refund", ) @@ -613,9 +613,9 @@ def test_method_create_entry_by_external_id_with_all_params_overload_4(self, cli @parametrize def test_raw_response_create_entry_by_external_id_overload_4(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) @@ -627,9 +627,9 @@ def test_raw_response_create_entry_by_external_id_overload_4(self, client: Orb) @parametrize def test_streaming_response_create_entry_by_external_id_overload_4(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) as response: assert not response.is_closed @@ -644,18 +644,18 @@ def test_streaming_response_create_entry_by_external_id_overload_4(self, client: def test_path_params_create_entry_by_external_id_overload_4(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) @parametrize def test_method_create_entry_by_external_id_overload_5(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -663,12 +663,12 @@ def test_method_create_entry_by_external_id_overload_5(self, client: Orb) -> Non @parametrize def test_method_create_entry_by_external_id_with_all_params_overload_5(self, client: Orb) -> None: ledger = client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -676,9 +676,9 @@ def test_method_create_entry_by_external_id_with_all_params_overload_5(self, cli @parametrize def test_raw_response_create_entry_by_external_id_overload_5(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) @@ -690,9 +690,9 @@ def test_raw_response_create_entry_by_external_id_overload_5(self, client: Orb) @parametrize def test_streaming_response_create_entry_by_external_id_overload_5(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) as response: assert not response.is_closed @@ -707,40 +707,40 @@ def test_streaming_response_create_entry_by_external_id_overload_5(self, client: def test_path_params_create_entry_by_external_id_overload_5(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) @parametrize def test_method_list_by_external_id(self, client: Orb) -> None: ledger = client.customers.credits.ledger.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert_matches_type(SyncPage[LedgerListByExternalIDResponse], ledger, path=["response"]) @parametrize def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None: ledger = client.customers.credits.ledger.list_by_external_id( - "string", + external_customer_id="external_customer_id", created_at_gt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - currency="string", - cursor="string", + currency="currency", + cursor="cursor", entry_status="committed", entry_type="increment", limit=1, - minimum_amount="string", + minimum_amount="minimum_amount", ) assert_matches_type(SyncPage[LedgerListByExternalIDResponse], ledger, path=["response"]) @parametrize def test_raw_response_list_by_external_id(self, client: Orb) -> None: response = client.customers.credits.ledger.with_raw_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -751,7 +751,7 @@ def test_raw_response_list_by_external_id(self, client: Orb) -> None: @parametrize def test_streaming_response_list_by_external_id(self, client: Orb) -> None: with client.customers.credits.ledger.with_streaming_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -765,7 +765,7 @@ def test_streaming_response_list_by_external_id(self, client: Orb) -> None: def test_path_params_list_by_external_id(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.ledger.with_raw_response.list_by_external_id( - "", + external_customer_id="", ) @@ -775,31 +775,31 @@ class TestAsyncLedger: @parametrize async def test_method_list(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.list( - "string", + customer_id="customer_id", ) assert_matches_type(AsyncPage[LedgerListResponse], ledger, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.list( - "string", + customer_id="customer_id", created_at_gt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - currency="string", - cursor="string", + currency="currency", + cursor="cursor", entry_status="committed", entry_type="increment", limit=1, - minimum_amount="string", + minimum_amount="minimum_amount", ) assert_matches_type(AsyncPage[LedgerListResponse], ledger, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -810,7 +810,7 @@ async def test_raw_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -824,13 +824,13 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async def test_path_params_list(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.list( - "", + customer_id="", ) @parametrize async def test_method_create_entry_overload_1(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="increment", ) @@ -839,28 +839,28 @@ async def test_method_create_entry_overload_1(self, async_client: AsyncOrb) -> N @parametrize async def test_method_create_entry_with_all_params_overload_1(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="increment", - currency="string", - description="string", + currency="currency", + description="description", effective_date=parse_datetime("2019-12-27T18:11:19.117Z"), expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), invoice_settings={ "auto_collection": True, "net_terms": 0, - "memo": "string", + "memo": "memo", "require_successful_payment": True, }, metadata={"foo": "string"}, - per_unit_cost_basis="string", + per_unit_cost_basis="per_unit_cost_basis", ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @parametrize async def test_raw_response_create_entry_overload_1(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="increment", ) @@ -873,7 +873,7 @@ async def test_raw_response_create_entry_overload_1(self, async_client: AsyncOrb @parametrize async def test_streaming_response_create_entry_overload_1(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="increment", ) as response: @@ -889,7 +889,7 @@ async def test_streaming_response_create_entry_overload_1(self, async_client: As async def test_path_params_create_entry_overload_1(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", amount=0, entry_type="increment", ) @@ -897,7 +897,7 @@ async def test_path_params_create_entry_overload_1(self, async_client: AsyncOrb) @parametrize async def test_method_create_entry_overload_2(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="decrement", ) @@ -906,11 +906,11 @@ async def test_method_create_entry_overload_2(self, async_client: AsyncOrb) -> N @parametrize async def test_method_create_entry_with_all_params_overload_2(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="decrement", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -918,7 +918,7 @@ async def test_method_create_entry_with_all_params_overload_2(self, async_client @parametrize async def test_raw_response_create_entry_overload_2(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="decrement", ) @@ -931,7 +931,7 @@ async def test_raw_response_create_entry_overload_2(self, async_client: AsyncOrb @parametrize async def test_streaming_response_create_entry_overload_2(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", amount=0, entry_type="decrement", ) as response: @@ -947,7 +947,7 @@ async def test_streaming_response_create_entry_overload_2(self, async_client: As async def test_path_params_create_entry_overload_2(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", amount=0, entry_type="decrement", ) @@ -955,7 +955,7 @@ async def test_path_params_create_entry_overload_2(self, async_client: AsyncOrb) @parametrize async def test_method_create_entry_overload_3(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -965,14 +965,14 @@ async def test_method_create_entry_overload_3(self, async_client: AsyncOrb) -> N @parametrize async def test_method_create_entry_with_all_params_overload_3(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), amount=0, - block_id="string", - currency="string", - description="string", + block_id="block_id", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -980,7 +980,7 @@ async def test_method_create_entry_with_all_params_overload_3(self, async_client @parametrize async def test_raw_response_create_entry_overload_3(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -994,7 +994,7 @@ async def test_raw_response_create_entry_overload_3(self, async_client: AsyncOrb @parametrize async def test_streaming_response_create_entry_overload_3(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -1011,7 +1011,7 @@ async def test_streaming_response_create_entry_overload_3(self, async_client: As async def test_path_params_create_entry_overload_3(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -1020,9 +1020,9 @@ async def test_path_params_create_entry_overload_3(self, async_client: AsyncOrb) @parametrize async def test_method_create_entry_overload_4(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -1030,12 +1030,12 @@ async def test_method_create_entry_overload_4(self, async_client: AsyncOrb) -> N @parametrize async def test_method_create_entry_with_all_params_overload_4(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, void_reason="refund", ) @@ -1044,9 +1044,9 @@ async def test_method_create_entry_with_all_params_overload_4(self, async_client @parametrize async def test_raw_response_create_entry_overload_4(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) @@ -1058,9 +1058,9 @@ async def test_raw_response_create_entry_overload_4(self, async_client: AsyncOrb @parametrize async def test_streaming_response_create_entry_overload_4(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) as response: assert not response.is_closed @@ -1075,18 +1075,18 @@ async def test_streaming_response_create_entry_overload_4(self, async_client: As async def test_path_params_create_entry_overload_4(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) @parametrize async def test_method_create_entry_overload_5(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -1094,12 +1094,12 @@ async def test_method_create_entry_overload_5(self, async_client: AsyncOrb) -> N @parametrize async def test_method_create_entry_with_all_params_overload_5(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryResponse, ledger, path=["response"]) @@ -1107,9 +1107,9 @@ async def test_method_create_entry_with_all_params_overload_5(self, async_client @parametrize async def test_raw_response_create_entry_overload_5(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) @@ -1121,9 +1121,9 @@ async def test_raw_response_create_entry_overload_5(self, async_client: AsyncOrb @parametrize async def test_streaming_response_create_entry_overload_5(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry( - "string", + customer_id="customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) as response: assert not response.is_closed @@ -1138,16 +1138,16 @@ async def test_streaming_response_create_entry_overload_5(self, async_client: As async def test_path_params_create_entry_overload_5(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry( - "", + customer_id="", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) @parametrize async def test_method_create_entry_by_external_id_overload_1(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="increment", ) @@ -1156,28 +1156,28 @@ async def test_method_create_entry_by_external_id_overload_1(self, async_client: @parametrize async def test_method_create_entry_by_external_id_with_all_params_overload_1(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="increment", - currency="string", - description="string", + currency="currency", + description="description", effective_date=parse_datetime("2019-12-27T18:11:19.117Z"), expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), invoice_settings={ "auto_collection": True, "net_terms": 0, - "memo": "string", + "memo": "memo", "require_successful_payment": True, }, metadata={"foo": "string"}, - per_unit_cost_basis="string", + per_unit_cost_basis="per_unit_cost_basis", ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @parametrize async def test_raw_response_create_entry_by_external_id_overload_1(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="increment", ) @@ -1190,7 +1190,7 @@ async def test_raw_response_create_entry_by_external_id_overload_1(self, async_c @parametrize async def test_streaming_response_create_entry_by_external_id_overload_1(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="increment", ) as response: @@ -1206,7 +1206,7 @@ async def test_streaming_response_create_entry_by_external_id_overload_1(self, a async def test_path_params_create_entry_by_external_id_overload_1(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", amount=0, entry_type="increment", ) @@ -1214,7 +1214,7 @@ async def test_path_params_create_entry_by_external_id_overload_1(self, async_cl @parametrize async def test_method_create_entry_by_external_id_overload_2(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="decrement", ) @@ -1223,11 +1223,11 @@ async def test_method_create_entry_by_external_id_overload_2(self, async_client: @parametrize async def test_method_create_entry_by_external_id_with_all_params_overload_2(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="decrement", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -1235,7 +1235,7 @@ async def test_method_create_entry_by_external_id_with_all_params_overload_2(sel @parametrize async def test_raw_response_create_entry_by_external_id_overload_2(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="decrement", ) @@ -1248,7 +1248,7 @@ async def test_raw_response_create_entry_by_external_id_overload_2(self, async_c @parametrize async def test_streaming_response_create_entry_by_external_id_overload_2(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, entry_type="decrement", ) as response: @@ -1264,7 +1264,7 @@ async def test_streaming_response_create_entry_by_external_id_overload_2(self, a async def test_path_params_create_entry_by_external_id_overload_2(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", amount=0, entry_type="decrement", ) @@ -1272,7 +1272,7 @@ async def test_path_params_create_entry_by_external_id_overload_2(self, async_cl @parametrize async def test_method_create_entry_by_external_id_overload_3(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -1282,14 +1282,14 @@ async def test_method_create_entry_by_external_id_overload_3(self, async_client: @parametrize async def test_method_create_entry_by_external_id_with_all_params_overload_3(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), amount=0, - block_id="string", - currency="string", - description="string", + block_id="block_id", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -1297,7 +1297,7 @@ async def test_method_create_entry_by_external_id_with_all_params_overload_3(sel @parametrize async def test_raw_response_create_entry_by_external_id_overload_3(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -1311,7 +1311,7 @@ async def test_raw_response_create_entry_by_external_id_overload_3(self, async_c @parametrize async def test_streaming_response_create_entry_by_external_id_overload_3(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -1328,7 +1328,7 @@ async def test_streaming_response_create_entry_by_external_id_overload_3(self, a async def test_path_params_create_entry_by_external_id_overload_3(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", entry_type="expiration_change", expiry_date=parse_datetime("2019-12-27T18:11:19.117Z"), target_expiry_date=parse_date("2019-12-27"), @@ -1337,9 +1337,9 @@ async def test_path_params_create_entry_by_external_id_overload_3(self, async_cl @parametrize async def test_method_create_entry_by_external_id_overload_4(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -1347,12 +1347,12 @@ async def test_method_create_entry_by_external_id_overload_4(self, async_client: @parametrize async def test_method_create_entry_by_external_id_with_all_params_overload_4(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, void_reason="refund", ) @@ -1361,9 +1361,9 @@ async def test_method_create_entry_by_external_id_with_all_params_overload_4(sel @parametrize async def test_raw_response_create_entry_by_external_id_overload_4(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) @@ -1375,9 +1375,9 @@ async def test_raw_response_create_entry_by_external_id_overload_4(self, async_c @parametrize async def test_streaming_response_create_entry_by_external_id_overload_4(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) as response: assert not response.is_closed @@ -1392,18 +1392,18 @@ async def test_streaming_response_create_entry_by_external_id_overload_4(self, a async def test_path_params_create_entry_by_external_id_overload_4(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", amount=0, - block_id="string", + block_id="block_id", entry_type="void", ) @parametrize async def test_method_create_entry_by_external_id_overload_5(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -1411,12 +1411,12 @@ async def test_method_create_entry_by_external_id_overload_5(self, async_client: @parametrize async def test_method_create_entry_by_external_id_with_all_params_overload_5(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", - currency="string", - description="string", + currency="currency", + description="description", metadata={"foo": "string"}, ) assert_matches_type(LedgerCreateEntryByExternalIDResponse, ledger, path=["response"]) @@ -1424,9 +1424,9 @@ async def test_method_create_entry_by_external_id_with_all_params_overload_5(sel @parametrize async def test_raw_response_create_entry_by_external_id_overload_5(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) @@ -1438,9 +1438,9 @@ async def test_raw_response_create_entry_by_external_id_overload_5(self, async_c @parametrize async def test_streaming_response_create_entry_by_external_id_overload_5(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.create_entry_by_external_id( - "string", + external_customer_id="external_customer_id", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) as response: assert not response.is_closed @@ -1455,40 +1455,40 @@ async def test_streaming_response_create_entry_by_external_id_overload_5(self, a async def test_path_params_create_entry_by_external_id_overload_5(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.create_entry_by_external_id( - "", + external_customer_id="", amount=0, - block_id="string", + block_id="block_id", entry_type="amendment", ) @parametrize async def test_method_list_by_external_id(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert_matches_type(AsyncPage[LedgerListByExternalIDResponse], ledger, path=["response"]) @parametrize async def test_method_list_by_external_id_with_all_params(self, async_client: AsyncOrb) -> None: ledger = await async_client.customers.credits.ledger.list_by_external_id( - "string", + external_customer_id="external_customer_id", created_at_gt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - currency="string", - cursor="string", + currency="currency", + cursor="cursor", entry_status="committed", entry_type="increment", limit=1, - minimum_amount="string", + minimum_amount="minimum_amount", ) assert_matches_type(AsyncPage[LedgerListByExternalIDResponse], ledger, path=["response"]) @parametrize async def test_raw_response_list_by_external_id(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.ledger.with_raw_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -1499,7 +1499,7 @@ async def test_raw_response_list_by_external_id(self, async_client: AsyncOrb) -> @parametrize async def test_streaming_response_list_by_external_id(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.ledger.with_streaming_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1513,5 +1513,5 @@ async def test_streaming_response_list_by_external_id(self, async_client: AsyncO async def test_path_params_list_by_external_id(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.ledger.with_raw_response.list_by_external_id( - "", + external_customer_id="", ) diff --git a/tests/api_resources/customers/credits/test_top_ups.py b/tests/api_resources/customers/credits/test_top_ups.py index b0f01ed8..b830664e 100644 --- a/tests/api_resources/customers/credits/test_top_ups.py +++ b/tests/api_resources/customers/credits/test_top_ups.py @@ -26,32 +26,32 @@ class TestTopUps: @parametrize def test_method_create(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.create( - "string", - amount="string", - currency="string", + customer_id="customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) assert_matches_type(TopUpCreateResponse, top_up, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.create( - "string", - amount="string", - currency="string", + customer_id="customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, - "memo": "string", + "memo": "memo", "require_successful_payment": True, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", expires_after=0, expires_after_unit="day", ) @@ -60,15 +60,15 @@ def test_method_create_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_create(self, client: Orb) -> None: response = client.customers.credits.top_ups.with_raw_response.create( - "string", - amount="string", - currency="string", + customer_id="customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) assert response.is_closed is True @@ -79,15 +79,15 @@ def test_raw_response_create(self, client: Orb) -> None: @parametrize def test_streaming_response_create(self, client: Orb) -> None: with client.customers.credits.top_ups.with_streaming_response.create( - "string", - amount="string", - currency="string", + customer_id="customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -101,29 +101,29 @@ def test_streaming_response_create(self, client: Orb) -> None: def test_path_params_create(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.top_ups.with_raw_response.create( - "", - amount="string", - currency="string", + customer_id="", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) @parametrize def test_method_list(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.list( - "string", + customer_id="customer_id", ) assert_matches_type(SyncPage[TopUpListResponse], top_up, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.list( - "string", - cursor="string", + customer_id="customer_id", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[TopUpListResponse], top_up, path=["response"]) @@ -131,7 +131,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_list(self, client: Orb) -> None: response = client.customers.credits.top_ups.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -142,7 +142,7 @@ def test_raw_response_list(self, client: Orb) -> None: @parametrize def test_streaming_response_list(self, client: Orb) -> None: with client.customers.credits.top_ups.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -156,22 +156,22 @@ def test_streaming_response_list(self, client: Orb) -> None: def test_path_params_list(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.top_ups.with_raw_response.list( - "", + customer_id="", ) @parametrize def test_method_delete(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.delete( - "string", - customer_id="string", + top_up_id="top_up_id", + customer_id="customer_id", ) assert top_up is None @parametrize def test_raw_response_delete(self, client: Orb) -> None: response = client.customers.credits.top_ups.with_raw_response.delete( - "string", - customer_id="string", + top_up_id="top_up_id", + customer_id="customer_id", ) assert response.is_closed is True @@ -182,8 +182,8 @@ def test_raw_response_delete(self, client: Orb) -> None: @parametrize def test_streaming_response_delete(self, client: Orb) -> None: with client.customers.credits.top_ups.with_streaming_response.delete( - "string", - customer_id="string", + top_up_id="top_up_id", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -197,45 +197,45 @@ def test_streaming_response_delete(self, client: Orb) -> None: def test_path_params_delete(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.top_ups.with_raw_response.delete( - "string", + top_up_id="top_up_id", customer_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `top_up_id` but received ''"): client.customers.credits.top_ups.with_raw_response.delete( - "", - customer_id="string", + top_up_id="", + customer_id="customer_id", ) @parametrize def test_method_create_by_external_id(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.create_by_external_id( - "string", - amount="string", - currency="string", + external_customer_id="external_customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) assert_matches_type(TopUpCreateByExternalIDResponse, top_up, path=["response"]) @parametrize def test_method_create_by_external_id_with_all_params(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.create_by_external_id( - "string", - amount="string", - currency="string", + external_customer_id="external_customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, - "memo": "string", + "memo": "memo", "require_successful_payment": True, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", expires_after=0, expires_after_unit="day", ) @@ -244,15 +244,15 @@ def test_method_create_by_external_id_with_all_params(self, client: Orb) -> None @parametrize def test_raw_response_create_by_external_id(self, client: Orb) -> None: response = client.customers.credits.top_ups.with_raw_response.create_by_external_id( - "string", - amount="string", - currency="string", + external_customer_id="external_customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) assert response.is_closed is True @@ -263,15 +263,15 @@ def test_raw_response_create_by_external_id(self, client: Orb) -> None: @parametrize def test_streaming_response_create_by_external_id(self, client: Orb) -> None: with client.customers.credits.top_ups.with_streaming_response.create_by_external_id( - "string", - amount="string", - currency="string", + external_customer_id="external_customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -285,30 +285,30 @@ def test_streaming_response_create_by_external_id(self, client: Orb) -> None: def test_path_params_create_by_external_id(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.top_ups.with_raw_response.create_by_external_id( - "", - amount="string", - currency="string", + external_customer_id="", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) @parametrize def test_method_delete_by_external_id(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.delete_by_external_id( - "string", - external_customer_id="string", + top_up_id="top_up_id", + external_customer_id="external_customer_id", ) assert top_up is None @parametrize def test_raw_response_delete_by_external_id(self, client: Orb) -> None: response = client.customers.credits.top_ups.with_raw_response.delete_by_external_id( - "string", - external_customer_id="string", + top_up_id="top_up_id", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -319,8 +319,8 @@ def test_raw_response_delete_by_external_id(self, client: Orb) -> None: @parametrize def test_streaming_response_delete_by_external_id(self, client: Orb) -> None: with client.customers.credits.top_ups.with_streaming_response.delete_by_external_id( - "string", - external_customer_id="string", + top_up_id="top_up_id", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -334,28 +334,28 @@ def test_streaming_response_delete_by_external_id(self, client: Orb) -> None: def test_path_params_delete_by_external_id(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.top_ups.with_raw_response.delete_by_external_id( - "string", + top_up_id="top_up_id", external_customer_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `top_up_id` but received ''"): client.customers.credits.top_ups.with_raw_response.delete_by_external_id( - "", - external_customer_id="string", + top_up_id="", + external_customer_id="external_customer_id", ) @parametrize def test_method_list_by_external_id(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert_matches_type(SyncPage[TopUpListByExternalIDResponse], top_up, path=["response"]) @parametrize def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None: top_up = client.customers.credits.top_ups.list_by_external_id( - "string", - cursor="string", + external_customer_id="external_customer_id", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[TopUpListByExternalIDResponse], top_up, path=["response"]) @@ -363,7 +363,7 @@ def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_list_by_external_id(self, client: Orb) -> None: response = client.customers.credits.top_ups.with_raw_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -374,7 +374,7 @@ def test_raw_response_list_by_external_id(self, client: Orb) -> None: @parametrize def test_streaming_response_list_by_external_id(self, client: Orb) -> None: with client.customers.credits.top_ups.with_streaming_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -388,7 +388,7 @@ def test_streaming_response_list_by_external_id(self, client: Orb) -> None: def test_path_params_list_by_external_id(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.top_ups.with_raw_response.list_by_external_id( - "", + external_customer_id="", ) @@ -398,32 +398,32 @@ class TestAsyncTopUps: @parametrize async def test_method_create(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.create( - "string", - amount="string", - currency="string", + customer_id="customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) assert_matches_type(TopUpCreateResponse, top_up, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.create( - "string", - amount="string", - currency="string", + customer_id="customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, - "memo": "string", + "memo": "memo", "require_successful_payment": True, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", expires_after=0, expires_after_unit="day", ) @@ -432,15 +432,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No @parametrize async def test_raw_response_create(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.top_ups.with_raw_response.create( - "string", - amount="string", - currency="string", + customer_id="customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) assert response.is_closed is True @@ -451,15 +451,15 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.top_ups.with_streaming_response.create( - "string", - amount="string", - currency="string", + customer_id="customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -473,29 +473,29 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: async def test_path_params_create(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.top_ups.with_raw_response.create( - "", - amount="string", - currency="string", + customer_id="", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) @parametrize async def test_method_list(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.list( - "string", + customer_id="customer_id", ) assert_matches_type(AsyncPage[TopUpListResponse], top_up, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.list( - "string", - cursor="string", + customer_id="customer_id", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[TopUpListResponse], top_up, path=["response"]) @@ -503,7 +503,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None @parametrize async def test_raw_response_list(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.top_ups.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -514,7 +514,7 @@ async def test_raw_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.top_ups.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -528,22 +528,22 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async def test_path_params_list(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.top_ups.with_raw_response.list( - "", + customer_id="", ) @parametrize async def test_method_delete(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.delete( - "string", - customer_id="string", + top_up_id="top_up_id", + customer_id="customer_id", ) assert top_up is None @parametrize async def test_raw_response_delete(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.top_ups.with_raw_response.delete( - "string", - customer_id="string", + top_up_id="top_up_id", + customer_id="customer_id", ) assert response.is_closed is True @@ -554,8 +554,8 @@ async def test_raw_response_delete(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.top_ups.with_streaming_response.delete( - "string", - customer_id="string", + top_up_id="top_up_id", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -569,45 +569,45 @@ async def test_streaming_response_delete(self, async_client: AsyncOrb) -> None: async def test_path_params_delete(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.top_ups.with_raw_response.delete( - "string", + top_up_id="top_up_id", customer_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `top_up_id` but received ''"): await async_client.customers.credits.top_ups.with_raw_response.delete( - "", - customer_id="string", + top_up_id="", + customer_id="customer_id", ) @parametrize async def test_method_create_by_external_id(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.create_by_external_id( - "string", - amount="string", - currency="string", + external_customer_id="external_customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) assert_matches_type(TopUpCreateByExternalIDResponse, top_up, path=["response"]) @parametrize async def test_method_create_by_external_id_with_all_params(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.create_by_external_id( - "string", - amount="string", - currency="string", + external_customer_id="external_customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, - "memo": "string", + "memo": "memo", "require_successful_payment": True, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", expires_after=0, expires_after_unit="day", ) @@ -616,15 +616,15 @@ async def test_method_create_by_external_id_with_all_params(self, async_client: @parametrize async def test_raw_response_create_by_external_id(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.top_ups.with_raw_response.create_by_external_id( - "string", - amount="string", - currency="string", + external_customer_id="external_customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) assert response.is_closed is True @@ -635,15 +635,15 @@ async def test_raw_response_create_by_external_id(self, async_client: AsyncOrb) @parametrize async def test_streaming_response_create_by_external_id(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.top_ups.with_streaming_response.create_by_external_id( - "string", - amount="string", - currency="string", + external_customer_id="external_customer_id", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -657,30 +657,30 @@ async def test_streaming_response_create_by_external_id(self, async_client: Asyn async def test_path_params_create_by_external_id(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.top_ups.with_raw_response.create_by_external_id( - "", - amount="string", - currency="string", + external_customer_id="", + amount="amount", + currency="currency", invoice_settings={ "auto_collection": True, "net_terms": 0, }, - per_unit_cost_basis="string", - threshold="string", + per_unit_cost_basis="per_unit_cost_basis", + threshold="threshold", ) @parametrize async def test_method_delete_by_external_id(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.delete_by_external_id( - "string", - external_customer_id="string", + top_up_id="top_up_id", + external_customer_id="external_customer_id", ) assert top_up is None @parametrize async def test_raw_response_delete_by_external_id(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.top_ups.with_raw_response.delete_by_external_id( - "string", - external_customer_id="string", + top_up_id="top_up_id", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -691,8 +691,8 @@ async def test_raw_response_delete_by_external_id(self, async_client: AsyncOrb) @parametrize async def test_streaming_response_delete_by_external_id(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.top_ups.with_streaming_response.delete_by_external_id( - "string", - external_customer_id="string", + top_up_id="top_up_id", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -706,28 +706,28 @@ async def test_streaming_response_delete_by_external_id(self, async_client: Asyn async def test_path_params_delete_by_external_id(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.top_ups.with_raw_response.delete_by_external_id( - "string", + top_up_id="top_up_id", external_customer_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `top_up_id` but received ''"): await async_client.customers.credits.top_ups.with_raw_response.delete_by_external_id( - "", - external_customer_id="string", + top_up_id="", + external_customer_id="external_customer_id", ) @parametrize async def test_method_list_by_external_id(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert_matches_type(AsyncPage[TopUpListByExternalIDResponse], top_up, path=["response"]) @parametrize async def test_method_list_by_external_id_with_all_params(self, async_client: AsyncOrb) -> None: top_up = await async_client.customers.credits.top_ups.list_by_external_id( - "string", - cursor="string", + external_customer_id="external_customer_id", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[TopUpListByExternalIDResponse], top_up, path=["response"]) @@ -735,7 +735,7 @@ async def test_method_list_by_external_id_with_all_params(self, async_client: As @parametrize async def test_raw_response_list_by_external_id(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.top_ups.with_raw_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -746,7 +746,7 @@ async def test_raw_response_list_by_external_id(self, async_client: AsyncOrb) -> @parametrize async def test_streaming_response_list_by_external_id(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.top_ups.with_streaming_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -760,5 +760,5 @@ async def test_streaming_response_list_by_external_id(self, async_client: AsyncO async def test_path_params_list_by_external_id(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.top_ups.with_raw_response.list_by_external_id( - "", + external_customer_id="", ) diff --git a/tests/api_resources/customers/test_balance_transactions.py b/tests/api_resources/customers/test_balance_transactions.py index bc62f40b..77d23372 100644 --- a/tests/api_resources/customers/test_balance_transactions.py +++ b/tests/api_resources/customers/test_balance_transactions.py @@ -25,8 +25,8 @@ class TestBalanceTransactions: @parametrize def test_method_create(self, client: Orb) -> None: balance_transaction = client.customers.balance_transactions.create( - "string", - amount="string", + customer_id="customer_id", + amount="amount", type="increment", ) assert_matches_type(BalanceTransactionCreateResponse, balance_transaction, path=["response"]) @@ -34,18 +34,18 @@ def test_method_create(self, client: Orb) -> None: @parametrize def test_method_create_with_all_params(self, client: Orb) -> None: balance_transaction = client.customers.balance_transactions.create( - "string", - amount="string", + customer_id="customer_id", + amount="amount", type="increment", - description="string", + description="description", ) assert_matches_type(BalanceTransactionCreateResponse, balance_transaction, path=["response"]) @parametrize def test_raw_response_create(self, client: Orb) -> None: response = client.customers.balance_transactions.with_raw_response.create( - "string", - amount="string", + customer_id="customer_id", + amount="amount", type="increment", ) @@ -57,8 +57,8 @@ def test_raw_response_create(self, client: Orb) -> None: @parametrize def test_streaming_response_create(self, client: Orb) -> None: with client.customers.balance_transactions.with_streaming_response.create( - "string", - amount="string", + customer_id="customer_id", + amount="amount", type="increment", ) as response: assert not response.is_closed @@ -73,23 +73,23 @@ def test_streaming_response_create(self, client: Orb) -> None: def test_path_params_create(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.balance_transactions.with_raw_response.create( - "", - amount="string", + customer_id="", + amount="amount", type="increment", ) @parametrize def test_method_list(self, client: Orb) -> None: balance_transaction = client.customers.balance_transactions.list( - "string", + customer_id="customer_id", ) assert_matches_type(SyncPage[BalanceTransactionListResponse], balance_transaction, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: balance_transaction = client.customers.balance_transactions.list( - "string", - cursor="string", + customer_id="customer_id", + cursor="cursor", limit=1, operation_time_gt=parse_datetime("2019-12-27T18:11:19.117Z"), operation_time_gte=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -101,7 +101,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_list(self, client: Orb) -> None: response = client.customers.balance_transactions.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -112,7 +112,7 @@ def test_raw_response_list(self, client: Orb) -> None: @parametrize def test_streaming_response_list(self, client: Orb) -> None: with client.customers.balance_transactions.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -126,7 +126,7 @@ def test_streaming_response_list(self, client: Orb) -> None: def test_path_params_list(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.balance_transactions.with_raw_response.list( - "", + customer_id="", ) @@ -136,8 +136,8 @@ class TestAsyncBalanceTransactions: @parametrize async def test_method_create(self, async_client: AsyncOrb) -> None: balance_transaction = await async_client.customers.balance_transactions.create( - "string", - amount="string", + customer_id="customer_id", + amount="amount", type="increment", ) assert_matches_type(BalanceTransactionCreateResponse, balance_transaction, path=["response"]) @@ -145,18 +145,18 @@ async def test_method_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> None: balance_transaction = await async_client.customers.balance_transactions.create( - "string", - amount="string", + customer_id="customer_id", + amount="amount", type="increment", - description="string", + description="description", ) assert_matches_type(BalanceTransactionCreateResponse, balance_transaction, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncOrb) -> None: response = await async_client.customers.balance_transactions.with_raw_response.create( - "string", - amount="string", + customer_id="customer_id", + amount="amount", type="increment", ) @@ -168,8 +168,8 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: async with async_client.customers.balance_transactions.with_streaming_response.create( - "string", - amount="string", + customer_id="customer_id", + amount="amount", type="increment", ) as response: assert not response.is_closed @@ -184,23 +184,23 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: async def test_path_params_create(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.balance_transactions.with_raw_response.create( - "", - amount="string", + customer_id="", + amount="amount", type="increment", ) @parametrize async def test_method_list(self, async_client: AsyncOrb) -> None: balance_transaction = await async_client.customers.balance_transactions.list( - "string", + customer_id="customer_id", ) assert_matches_type(AsyncPage[BalanceTransactionListResponse], balance_transaction, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: balance_transaction = await async_client.customers.balance_transactions.list( - "string", - cursor="string", + customer_id="customer_id", + cursor="cursor", limit=1, operation_time_gt=parse_datetime("2019-12-27T18:11:19.117Z"), operation_time_gte=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -212,7 +212,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None @parametrize async def test_raw_response_list(self, async_client: AsyncOrb) -> None: response = await async_client.customers.balance_transactions.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -223,7 +223,7 @@ async def test_raw_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async with async_client.customers.balance_transactions.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -237,5 +237,5 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async def test_path_params_list(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.balance_transactions.with_raw_response.list( - "", + customer_id="", ) diff --git a/tests/api_resources/customers/test_costs.py b/tests/api_resources/customers/test_costs.py index 9d8fa5e8..e9e1afa2 100644 --- a/tests/api_resources/customers/test_costs.py +++ b/tests/api_resources/customers/test_costs.py @@ -24,14 +24,14 @@ class TestCosts: @parametrize def test_method_list(self, client: Orb) -> None: cost = client.customers.costs.list( - "string", + customer_id="customer_id", ) assert_matches_type(CostListResponse, cost, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: cost = client.customers.costs.list( - "string", + customer_id="customer_id", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -41,7 +41,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_list(self, client: Orb) -> None: response = client.customers.costs.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -52,7 +52,7 @@ def test_raw_response_list(self, client: Orb) -> None: @parametrize def test_streaming_response_list(self, client: Orb) -> None: with client.customers.costs.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,20 +66,20 @@ def test_streaming_response_list(self, client: Orb) -> None: def test_path_params_list(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.costs.with_raw_response.list( - "", + customer_id="", ) @parametrize def test_method_list_by_external_id(self, client: Orb) -> None: cost = client.customers.costs.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert_matches_type(CostListByExternalIDResponse, cost, path=["response"]) @parametrize def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None: cost = client.customers.costs.list_by_external_id( - "string", + external_customer_id="external_customer_id", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -89,7 +89,7 @@ def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_list_by_external_id(self, client: Orb) -> None: response = client.customers.costs.with_raw_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -100,7 +100,7 @@ def test_raw_response_list_by_external_id(self, client: Orb) -> None: @parametrize def test_streaming_response_list_by_external_id(self, client: Orb) -> None: with client.customers.costs.with_streaming_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -114,7 +114,7 @@ def test_streaming_response_list_by_external_id(self, client: Orb) -> None: def test_path_params_list_by_external_id(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.costs.with_raw_response.list_by_external_id( - "", + external_customer_id="", ) @@ -124,14 +124,14 @@ class TestAsyncCosts: @parametrize async def test_method_list(self, async_client: AsyncOrb) -> None: cost = await async_client.customers.costs.list( - "string", + customer_id="customer_id", ) assert_matches_type(CostListResponse, cost, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: cost = await async_client.customers.costs.list( - "string", + customer_id="customer_id", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -141,7 +141,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None @parametrize async def test_raw_response_list(self, async_client: AsyncOrb) -> None: response = await async_client.customers.costs.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -152,7 +152,7 @@ async def test_raw_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async with async_client.customers.costs.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -166,20 +166,20 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async def test_path_params_list(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.costs.with_raw_response.list( - "", + customer_id="", ) @parametrize async def test_method_list_by_external_id(self, async_client: AsyncOrb) -> None: cost = await async_client.customers.costs.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert_matches_type(CostListByExternalIDResponse, cost, path=["response"]) @parametrize async def test_method_list_by_external_id_with_all_params(self, async_client: AsyncOrb) -> None: cost = await async_client.customers.costs.list_by_external_id( - "string", + external_customer_id="external_customer_id", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -189,7 +189,7 @@ async def test_method_list_by_external_id_with_all_params(self, async_client: As @parametrize async def test_raw_response_list_by_external_id(self, async_client: AsyncOrb) -> None: response = await async_client.customers.costs.with_raw_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -200,7 +200,7 @@ async def test_raw_response_list_by_external_id(self, async_client: AsyncOrb) -> @parametrize async def test_streaming_response_list_by_external_id(self, async_client: AsyncOrb) -> None: async with async_client.customers.costs.with_streaming_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -214,5 +214,5 @@ async def test_streaming_response_list_by_external_id(self, async_client: AsyncO async def test_path_params_list_by_external_id(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.costs.with_raw_response.list_by_external_id( - "", + external_customer_id="", ) diff --git a/tests/api_resources/customers/test_credits.py b/tests/api_resources/customers/test_credits.py index 04103085..19de5732 100644 --- a/tests/api_resources/customers/test_credits.py +++ b/tests/api_resources/customers/test_credits.py @@ -24,16 +24,16 @@ class TestCredits: @parametrize def test_method_list(self, client: Orb) -> None: credit = client.customers.credits.list( - "string", + customer_id="customer_id", ) assert_matches_type(SyncPage[CreditListResponse], credit, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: credit = client.customers.credits.list( - "string", - currency="string", - cursor="string", + customer_id="customer_id", + currency="currency", + cursor="cursor", include_all_blocks=True, limit=1, ) @@ -42,7 +42,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_list(self, client: Orb) -> None: response = client.customers.credits.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -53,7 +53,7 @@ def test_raw_response_list(self, client: Orb) -> None: @parametrize def test_streaming_response_list(self, client: Orb) -> None: with client.customers.credits.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,22 +67,22 @@ def test_streaming_response_list(self, client: Orb) -> None: def test_path_params_list(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.credits.with_raw_response.list( - "", + customer_id="", ) @parametrize def test_method_list_by_external_id(self, client: Orb) -> None: credit = client.customers.credits.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert_matches_type(SyncPage[CreditListByExternalIDResponse], credit, path=["response"]) @parametrize def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None: credit = client.customers.credits.list_by_external_id( - "string", - currency="string", - cursor="string", + external_customer_id="external_customer_id", + currency="currency", + cursor="cursor", include_all_blocks=True, limit=1, ) @@ -91,7 +91,7 @@ def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_list_by_external_id(self, client: Orb) -> None: response = client.customers.credits.with_raw_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -102,7 +102,7 @@ def test_raw_response_list_by_external_id(self, client: Orb) -> None: @parametrize def test_streaming_response_list_by_external_id(self, client: Orb) -> None: with client.customers.credits.with_streaming_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -116,7 +116,7 @@ def test_streaming_response_list_by_external_id(self, client: Orb) -> None: def test_path_params_list_by_external_id(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.customers.credits.with_raw_response.list_by_external_id( - "", + external_customer_id="", ) @@ -126,16 +126,16 @@ class TestAsyncCredits: @parametrize async def test_method_list(self, async_client: AsyncOrb) -> None: credit = await async_client.customers.credits.list( - "string", + customer_id="customer_id", ) assert_matches_type(AsyncPage[CreditListResponse], credit, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: credit = await async_client.customers.credits.list( - "string", - currency="string", - cursor="string", + customer_id="customer_id", + currency="currency", + cursor="cursor", include_all_blocks=True, limit=1, ) @@ -144,7 +144,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None @parametrize async def test_raw_response_list(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.with_raw_response.list( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -155,7 +155,7 @@ async def test_raw_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.with_streaming_response.list( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -169,22 +169,22 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: async def test_path_params_list(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.credits.with_raw_response.list( - "", + customer_id="", ) @parametrize async def test_method_list_by_external_id(self, async_client: AsyncOrb) -> None: credit = await async_client.customers.credits.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert_matches_type(AsyncPage[CreditListByExternalIDResponse], credit, path=["response"]) @parametrize async def test_method_list_by_external_id_with_all_params(self, async_client: AsyncOrb) -> None: credit = await async_client.customers.credits.list_by_external_id( - "string", - currency="string", - cursor="string", + external_customer_id="external_customer_id", + currency="currency", + cursor="cursor", include_all_blocks=True, limit=1, ) @@ -193,7 +193,7 @@ async def test_method_list_by_external_id_with_all_params(self, async_client: As @parametrize async def test_raw_response_list_by_external_id(self, async_client: AsyncOrb) -> None: response = await async_client.customers.credits.with_raw_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) assert response.is_closed is True @@ -204,7 +204,7 @@ async def test_raw_response_list_by_external_id(self, async_client: AsyncOrb) -> @parametrize async def test_streaming_response_list_by_external_id(self, async_client: AsyncOrb) -> None: async with async_client.customers.credits.with_streaming_response.list_by_external_id( - "string", + external_customer_id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -218,5 +218,5 @@ async def test_streaming_response_list_by_external_id(self, async_client: AsyncO async def test_path_params_list_by_external_id(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.customers.credits.with_raw_response.list_by_external_id( - "", + external_customer_id="", ) diff --git a/tests/api_resources/customers/test_usage.py b/tests/api_resources/customers/test_usage.py index b933101e..4d3f7b17 100644 --- a/tests/api_resources/customers/test_usage.py +++ b/tests/api_resources/customers/test_usage.py @@ -24,20 +24,20 @@ class TestUsage: @parametrize def test_method_update(self, client: Orb) -> None: usage = client.customers.usage.update( - "string", + id="customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -48,26 +48,26 @@ def test_method_update(self, client: Orb) -> None: @parametrize def test_method_update_with_all_params(self, client: Orb) -> None: usage = client.customers.usage.update( - "string", + id="customer_id", events=[ { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -80,20 +80,20 @@ def test_method_update_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_update(self, client: Orb) -> None: response = client.customers.usage.with_raw_response.update( - "string", + id="customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -108,20 +108,20 @@ def test_raw_response_update(self, client: Orb) -> None: @parametrize def test_streaming_response_update(self, client: Orb) -> None: with client.customers.usage.with_streaming_response.update( - "string", + id="customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -139,20 +139,20 @@ def test_streaming_response_update(self, client: Orb) -> None: def test_path_params_update(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.customers.usage.with_raw_response.update( - "", + id="", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -162,20 +162,20 @@ def test_path_params_update(self, client: Orb) -> None: @parametrize def test_method_update_by_external_id(self, client: Orb) -> None: usage = client.customers.usage.update_by_external_id( - "string", + id="external_customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -186,26 +186,26 @@ def test_method_update_by_external_id(self, client: Orb) -> None: @parametrize def test_method_update_by_external_id_with_all_params(self, client: Orb) -> None: usage = client.customers.usage.update_by_external_id( - "string", + id="external_customer_id", events=[ { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -218,20 +218,20 @@ def test_method_update_by_external_id_with_all_params(self, client: Orb) -> None @parametrize def test_raw_response_update_by_external_id(self, client: Orb) -> None: response = client.customers.usage.with_raw_response.update_by_external_id( - "string", + id="external_customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -246,20 +246,20 @@ def test_raw_response_update_by_external_id(self, client: Orb) -> None: @parametrize def test_streaming_response_update_by_external_id(self, client: Orb) -> None: with client.customers.usage.with_streaming_response.update_by_external_id( - "string", + id="external_customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -277,20 +277,20 @@ def test_streaming_response_update_by_external_id(self, client: Orb) -> None: def test_path_params_update_by_external_id(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.customers.usage.with_raw_response.update_by_external_id( - "", + id="", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -304,20 +304,20 @@ class TestAsyncUsage: @parametrize async def test_method_update(self, async_client: AsyncOrb) -> None: usage = await async_client.customers.usage.update( - "string", + id="customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -328,26 +328,26 @@ async def test_method_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> None: usage = await async_client.customers.usage.update( - "string", + id="customer_id", events=[ { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -360,20 +360,20 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No @parametrize async def test_raw_response_update(self, async_client: AsyncOrb) -> None: response = await async_client.customers.usage.with_raw_response.update( - "string", + id="customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -388,20 +388,20 @@ async def test_raw_response_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async with async_client.customers.usage.with_streaming_response.update( - "string", + id="customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -419,20 +419,20 @@ async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async def test_path_params_update(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.customers.usage.with_raw_response.update( - "", + id="", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -442,20 +442,20 @@ async def test_path_params_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_update_by_external_id(self, async_client: AsyncOrb) -> None: usage = await async_client.customers.usage.update_by_external_id( - "string", + id="external_customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -466,26 +466,26 @@ async def test_method_update_by_external_id(self, async_client: AsyncOrb) -> Non @parametrize async def test_method_update_by_external_id_with_all_params(self, async_client: AsyncOrb) -> None: usage = await async_client.customers.usage.update_by_external_id( - "string", + id="external_customer_id", events=[ { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -498,20 +498,20 @@ async def test_method_update_by_external_id_with_all_params(self, async_client: @parametrize async def test_raw_response_update_by_external_id(self, async_client: AsyncOrb) -> None: response = await async_client.customers.usage.with_raw_response.update_by_external_id( - "string", + id="external_customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -526,20 +526,20 @@ async def test_raw_response_update_by_external_id(self, async_client: AsyncOrb) @parametrize async def test_streaming_response_update_by_external_id(self, async_client: AsyncOrb) -> None: async with async_client.customers.usage.with_streaming_response.update_by_external_id( - "string", + id="external_customer_id", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, @@ -557,20 +557,20 @@ async def test_streaming_response_update_by_external_id(self, async_client: Asyn async def test_path_params_update_by_external_id(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.customers.usage.with_raw_response.update_by_external_id( - "", + id="", events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, }, diff --git a/tests/api_resources/events/test_backfills.py b/tests/api_resources/events/test_backfills.py index 18e48c9e..02675703 100644 --- a/tests/api_resources/events/test_backfills.py +++ b/tests/api_resources/events/test_backfills.py @@ -39,8 +39,8 @@ def test_method_create_with_all_params(self, client: Orb) -> None: timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), close_time=parse_datetime("2019-12-27T18:11:19.117Z"), - customer_id="string", - external_customer_id="string", + customer_id="customer_id", + external_customer_id="external_customer_id", replace_existing_events=True, ) assert_matches_type(BackfillCreateResponse, backfill, path=["response"]) @@ -79,7 +79,7 @@ def test_method_list(self, client: Orb) -> None: @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: backfill = client.events.backfills.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[BackfillListResponse], backfill, path=["response"]) @@ -107,14 +107,14 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_close(self, client: Orb) -> None: backfill = client.events.backfills.close( - "string", + "backfill_id", ) assert_matches_type(BackfillCloseResponse, backfill, path=["response"]) @parametrize def test_raw_response_close(self, client: Orb) -> None: response = client.events.backfills.with_raw_response.close( - "string", + "backfill_id", ) assert response.is_closed is True @@ -125,7 +125,7 @@ def test_raw_response_close(self, client: Orb) -> None: @parametrize def test_streaming_response_close(self, client: Orb) -> None: with client.events.backfills.with_streaming_response.close( - "string", + "backfill_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,14 +145,14 @@ def test_path_params_close(self, client: Orb) -> None: @parametrize def test_method_fetch(self, client: Orb) -> None: backfill = client.events.backfills.fetch( - "string", + "backfill_id", ) assert_matches_type(BackfillFetchResponse, backfill, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.events.backfills.with_raw_response.fetch( - "string", + "backfill_id", ) assert response.is_closed is True @@ -163,7 +163,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.events.backfills.with_streaming_response.fetch( - "string", + "backfill_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -183,14 +183,14 @@ def test_path_params_fetch(self, client: Orb) -> None: @parametrize def test_method_revert(self, client: Orb) -> None: backfill = client.events.backfills.revert( - "string", + "backfill_id", ) assert_matches_type(BackfillRevertResponse, backfill, path=["response"]) @parametrize def test_raw_response_revert(self, client: Orb) -> None: response = client.events.backfills.with_raw_response.revert( - "string", + "backfill_id", ) assert response.is_closed is True @@ -201,7 +201,7 @@ def test_raw_response_revert(self, client: Orb) -> None: @parametrize def test_streaming_response_revert(self, client: Orb) -> None: with client.events.backfills.with_streaming_response.revert( - "string", + "backfill_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -236,8 +236,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), close_time=parse_datetime("2019-12-27T18:11:19.117Z"), - customer_id="string", - external_customer_id="string", + customer_id="customer_id", + external_customer_id="external_customer_id", replace_existing_events=True, ) assert_matches_type(BackfillCreateResponse, backfill, path=["response"]) @@ -276,7 +276,7 @@ async def test_method_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: backfill = await async_client.events.backfills.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[BackfillListResponse], backfill, path=["response"]) @@ -304,14 +304,14 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_close(self, async_client: AsyncOrb) -> None: backfill = await async_client.events.backfills.close( - "string", + "backfill_id", ) assert_matches_type(BackfillCloseResponse, backfill, path=["response"]) @parametrize async def test_raw_response_close(self, async_client: AsyncOrb) -> None: response = await async_client.events.backfills.with_raw_response.close( - "string", + "backfill_id", ) assert response.is_closed is True @@ -322,7 +322,7 @@ async def test_raw_response_close(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_close(self, async_client: AsyncOrb) -> None: async with async_client.events.backfills.with_streaming_response.close( - "string", + "backfill_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -342,14 +342,14 @@ async def test_path_params_close(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: backfill = await async_client.events.backfills.fetch( - "string", + "backfill_id", ) assert_matches_type(BackfillFetchResponse, backfill, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.events.backfills.with_raw_response.fetch( - "string", + "backfill_id", ) assert response.is_closed is True @@ -360,7 +360,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.events.backfills.with_streaming_response.fetch( - "string", + "backfill_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -380,14 +380,14 @@ async def test_path_params_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_revert(self, async_client: AsyncOrb) -> None: backfill = await async_client.events.backfills.revert( - "string", + "backfill_id", ) assert_matches_type(BackfillRevertResponse, backfill, path=["response"]) @parametrize async def test_raw_response_revert(self, async_client: AsyncOrb) -> None: response = await async_client.events.backfills.with_raw_response.revert( - "string", + "backfill_id", ) assert response.is_closed is True @@ -398,7 +398,7 @@ async def test_raw_response_revert(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_revert(self, async_client: AsyncOrb) -> None: async with async_client.events.backfills.with_streaming_response.revert( - "string", + "backfill_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/plans/test_external_plan_id.py b/tests/api_resources/plans/test_external_plan_id.py index f28c7431..a73b26ea 100644 --- a/tests/api_resources/plans/test_external_plan_id.py +++ b/tests/api_resources/plans/test_external_plan_id.py @@ -20,15 +20,15 @@ class TestExternalPlanID: @parametrize def test_method_update(self, client: Orb) -> None: external_plan_id = client.plans.external_plan_id.update( - "string", + other_external_plan_id="external_plan_id", ) assert_matches_type(Plan, external_plan_id, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Orb) -> None: external_plan_id = client.plans.external_plan_id.update( - "string", - external_plan_id="string", + other_external_plan_id="external_plan_id", + external_plan_id="external_plan_id", metadata={"foo": "string"}, ) assert_matches_type(Plan, external_plan_id, path=["response"]) @@ -36,7 +36,7 @@ def test_method_update_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_update(self, client: Orb) -> None: response = client.plans.external_plan_id.with_raw_response.update( - "string", + other_external_plan_id="external_plan_id", ) assert response.is_closed is True @@ -47,7 +47,7 @@ def test_raw_response_update(self, client: Orb) -> None: @parametrize def test_streaming_response_update(self, client: Orb) -> None: with client.plans.external_plan_id.with_streaming_response.update( - "string", + other_external_plan_id="external_plan_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -63,21 +63,21 @@ def test_path_params_update(self, client: Orb) -> None: ValueError, match=r"Expected a non-empty value for `other_external_plan_id` but received ''" ): client.plans.external_plan_id.with_raw_response.update( - "", + other_external_plan_id="", external_plan_id="", ) @parametrize def test_method_fetch(self, client: Orb) -> None: external_plan_id = client.plans.external_plan_id.fetch( - "string", + "external_plan_id", ) assert_matches_type(Plan, external_plan_id, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.plans.external_plan_id.with_raw_response.fetch( - "string", + "external_plan_id", ) assert response.is_closed is True @@ -88,7 +88,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.plans.external_plan_id.with_streaming_response.fetch( - "string", + "external_plan_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -112,15 +112,15 @@ class TestAsyncExternalPlanID: @parametrize async def test_method_update(self, async_client: AsyncOrb) -> None: external_plan_id = await async_client.plans.external_plan_id.update( - "string", + other_external_plan_id="external_plan_id", ) assert_matches_type(Plan, external_plan_id, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> None: external_plan_id = await async_client.plans.external_plan_id.update( - "string", - external_plan_id="string", + other_external_plan_id="external_plan_id", + external_plan_id="external_plan_id", metadata={"foo": "string"}, ) assert_matches_type(Plan, external_plan_id, path=["response"]) @@ -128,7 +128,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No @parametrize async def test_raw_response_update(self, async_client: AsyncOrb) -> None: response = await async_client.plans.external_plan_id.with_raw_response.update( - "string", + other_external_plan_id="external_plan_id", ) assert response.is_closed is True @@ -139,7 +139,7 @@ async def test_raw_response_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async with async_client.plans.external_plan_id.with_streaming_response.update( - "string", + other_external_plan_id="external_plan_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,21 +155,21 @@ async def test_path_params_update(self, async_client: AsyncOrb) -> None: ValueError, match=r"Expected a non-empty value for `other_external_plan_id` but received ''" ): await async_client.plans.external_plan_id.with_raw_response.update( - "", + other_external_plan_id="", external_plan_id="", ) @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: external_plan_id = await async_client.plans.external_plan_id.fetch( - "string", + "external_plan_id", ) assert_matches_type(Plan, external_plan_id, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.plans.external_plan_id.with_raw_response.fetch( - "string", + "external_plan_id", ) assert response.is_closed is True @@ -180,7 +180,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.plans.external_plan_id.with_streaming_response.fetch( - "string", + "external_plan_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/prices/test_external_price_id.py b/tests/api_resources/prices/test_external_price_id.py index abd884c2..b3fa48d8 100644 --- a/tests/api_resources/prices/test_external_price_id.py +++ b/tests/api_resources/prices/test_external_price_id.py @@ -20,14 +20,14 @@ class TestExternalPriceID: @parametrize def test_method_fetch(self, client: Orb) -> None: external_price_id = client.prices.external_price_id.fetch( - "string", + "external_price_id", ) assert_matches_type(Price, external_price_id, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.prices.external_price_id.with_raw_response.fetch( - "string", + "external_price_id", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.prices.external_price_id.with_streaming_response.fetch( - "string", + "external_price_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -62,14 +62,14 @@ class TestAsyncExternalPriceID: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: external_price_id = await async_client.prices.external_price_id.fetch( - "string", + "external_price_id", ) assert_matches_type(Price, external_price_id, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.prices.external_price_id.with_raw_response.fetch( - "string", + "external_price_id", ) assert response.is_closed is True @@ -80,7 +80,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.prices.external_price_id.with_streaming_response.fetch( - "string", + "external_price_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_alerts.py b/tests/api_resources/test_alerts.py index 0dc7fba1..a96b00b0 100644 --- a/tests/api_resources/test_alerts.py +++ b/tests/api_resources/test_alerts.py @@ -24,14 +24,14 @@ class TestAlerts: @parametrize def test_method_retrieve(self, client: Orb) -> None: alert = client.alerts.retrieve( - "string", + "alert_id", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Orb) -> None: response = client.alerts.with_raw_response.retrieve( - "string", + "alert_id", ) assert response.is_closed is True @@ -42,7 +42,7 @@ def test_raw_response_retrieve(self, client: Orb) -> None: @parametrize def test_streaming_response_retrieve(self, client: Orb) -> None: with client.alerts.with_streaming_response.retrieve( - "string", + "alert_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -73,11 +73,11 @@ def test_method_list_with_all_params(self, client: Orb) -> None: created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", - customer_id="string", - external_customer_id="string", + cursor="cursor", + customer_id="customer_id", + external_customer_id="external_customer_id", limit=1, - subscription_id="string", + subscription_id="subscription_id", ) assert_matches_type(SyncPage[Alert], alert, path=["response"]) @@ -106,18 +106,18 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_create_for_customer(self, client: Orb) -> None: alert = client.alerts.create_for_customer( - "string", - currency="string", - type="string", + customer_id="customer_id", + currency="currency", + type="type", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize def test_method_create_for_customer_with_all_params(self, client: Orb) -> None: alert = client.alerts.create_for_customer( - "string", - currency="string", - type="string", + customer_id="customer_id", + currency="currency", + type="type", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], ) assert_matches_type(Alert, alert, path=["response"]) @@ -125,9 +125,9 @@ def test_method_create_for_customer_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_create_for_customer(self, client: Orb) -> None: response = client.alerts.with_raw_response.create_for_customer( - "string", - currency="string", - type="string", + customer_id="customer_id", + currency="currency", + type="type", ) assert response.is_closed is True @@ -138,9 +138,9 @@ def test_raw_response_create_for_customer(self, client: Orb) -> None: @parametrize def test_streaming_response_create_for_customer(self, client: Orb) -> None: with client.alerts.with_streaming_response.create_for_customer( - "string", - currency="string", - type="string", + customer_id="customer_id", + currency="currency", + type="type", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -154,26 +154,26 @@ def test_streaming_response_create_for_customer(self, client: Orb) -> None: def test_path_params_create_for_customer(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.alerts.with_raw_response.create_for_customer( - "", - currency="string", - type="string", + customer_id="", + currency="currency", + type="type", ) @parametrize def test_method_create_for_external_customer(self, client: Orb) -> None: alert = client.alerts.create_for_external_customer( - "string", - currency="string", - type="string", + external_customer_id="external_customer_id", + currency="currency", + type="type", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize def test_method_create_for_external_customer_with_all_params(self, client: Orb) -> None: alert = client.alerts.create_for_external_customer( - "string", - currency="string", - type="string", + external_customer_id="external_customer_id", + currency="currency", + type="type", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], ) assert_matches_type(Alert, alert, path=["response"]) @@ -181,9 +181,9 @@ def test_method_create_for_external_customer_with_all_params(self, client: Orb) @parametrize def test_raw_response_create_for_external_customer(self, client: Orb) -> None: response = client.alerts.with_raw_response.create_for_external_customer( - "string", - currency="string", - type="string", + external_customer_id="external_customer_id", + currency="currency", + type="type", ) assert response.is_closed is True @@ -194,9 +194,9 @@ def test_raw_response_create_for_external_customer(self, client: Orb) -> None: @parametrize def test_streaming_response_create_for_external_customer(self, client: Orb) -> None: with client.alerts.with_streaming_response.create_for_external_customer( - "string", - currency="string", - type="string", + external_customer_id="external_customer_id", + currency="currency", + type="type", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -210,36 +210,36 @@ def test_streaming_response_create_for_external_customer(self, client: Orb) -> N def test_path_params_create_for_external_customer(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): client.alerts.with_raw_response.create_for_external_customer( - "", - currency="string", - type="string", + external_customer_id="", + currency="currency", + type="type", ) @parametrize def test_method_create_for_subscription(self, client: Orb) -> None: alert = client.alerts.create_for_subscription( - "string", + subscription_id="subscription_id", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", + type="type", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize def test_method_create_for_subscription_with_all_params(self, client: Orb) -> None: alert = client.alerts.create_for_subscription( - "string", + subscription_id="subscription_id", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", - metric_id="string", + type="type", + metric_id="metric_id", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize def test_raw_response_create_for_subscription(self, client: Orb) -> None: response = client.alerts.with_raw_response.create_for_subscription( - "string", + subscription_id="subscription_id", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", + type="type", ) assert response.is_closed is True @@ -250,9 +250,9 @@ def test_raw_response_create_for_subscription(self, client: Orb) -> None: @parametrize def test_streaming_response_create_for_subscription(self, client: Orb) -> None: with client.alerts.with_streaming_response.create_for_subscription( - "string", + subscription_id="subscription_id", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", + type="type", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -266,22 +266,22 @@ def test_streaming_response_create_for_subscription(self, client: Orb) -> None: def test_path_params_create_for_subscription(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.alerts.with_raw_response.create_for_subscription( - "", + subscription_id="", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", + type="type", ) @parametrize def test_method_disable(self, client: Orb) -> None: alert = client.alerts.disable( - "string", + "alert_configuration_id", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize def test_raw_response_disable(self, client: Orb) -> None: response = client.alerts.with_raw_response.disable( - "string", + "alert_configuration_id", ) assert response.is_closed is True @@ -292,7 +292,7 @@ def test_raw_response_disable(self, client: Orb) -> None: @parametrize def test_streaming_response_disable(self, client: Orb) -> None: with client.alerts.with_streaming_response.disable( - "string", + "alert_configuration_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -314,14 +314,14 @@ def test_path_params_disable(self, client: Orb) -> None: @parametrize def test_method_enable(self, client: Orb) -> None: alert = client.alerts.enable( - "string", + "alert_configuration_id", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize def test_raw_response_enable(self, client: Orb) -> None: response = client.alerts.with_raw_response.enable( - "string", + "alert_configuration_id", ) assert response.is_closed is True @@ -332,7 +332,7 @@ def test_raw_response_enable(self, client: Orb) -> None: @parametrize def test_streaming_response_enable(self, client: Orb) -> None: with client.alerts.with_streaming_response.enable( - "string", + "alert_configuration_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -358,14 +358,14 @@ class TestAsyncAlerts: @parametrize async def test_method_retrieve(self, async_client: AsyncOrb) -> None: alert = await async_client.alerts.retrieve( - "string", + "alert_id", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncOrb) -> None: response = await async_client.alerts.with_raw_response.retrieve( - "string", + "alert_id", ) assert response.is_closed is True @@ -376,7 +376,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncOrb) -> None: async with async_client.alerts.with_streaming_response.retrieve( - "string", + "alert_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -407,11 +407,11 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", - customer_id="string", - external_customer_id="string", + cursor="cursor", + customer_id="customer_id", + external_customer_id="external_customer_id", limit=1, - subscription_id="string", + subscription_id="subscription_id", ) assert_matches_type(AsyncPage[Alert], alert, path=["response"]) @@ -440,18 +440,18 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_create_for_customer(self, async_client: AsyncOrb) -> None: alert = await async_client.alerts.create_for_customer( - "string", - currency="string", - type="string", + customer_id="customer_id", + currency="currency", + type="type", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize async def test_method_create_for_customer_with_all_params(self, async_client: AsyncOrb) -> None: alert = await async_client.alerts.create_for_customer( - "string", - currency="string", - type="string", + customer_id="customer_id", + currency="currency", + type="type", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], ) assert_matches_type(Alert, alert, path=["response"]) @@ -459,9 +459,9 @@ async def test_method_create_for_customer_with_all_params(self, async_client: As @parametrize async def test_raw_response_create_for_customer(self, async_client: AsyncOrb) -> None: response = await async_client.alerts.with_raw_response.create_for_customer( - "string", - currency="string", - type="string", + customer_id="customer_id", + currency="currency", + type="type", ) assert response.is_closed is True @@ -472,9 +472,9 @@ async def test_raw_response_create_for_customer(self, async_client: AsyncOrb) -> @parametrize async def test_streaming_response_create_for_customer(self, async_client: AsyncOrb) -> None: async with async_client.alerts.with_streaming_response.create_for_customer( - "string", - currency="string", - type="string", + customer_id="customer_id", + currency="currency", + type="type", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -488,26 +488,26 @@ async def test_streaming_response_create_for_customer(self, async_client: AsyncO async def test_path_params_create_for_customer(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.alerts.with_raw_response.create_for_customer( - "", - currency="string", - type="string", + customer_id="", + currency="currency", + type="type", ) @parametrize async def test_method_create_for_external_customer(self, async_client: AsyncOrb) -> None: alert = await async_client.alerts.create_for_external_customer( - "string", - currency="string", - type="string", + external_customer_id="external_customer_id", + currency="currency", + type="type", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize async def test_method_create_for_external_customer_with_all_params(self, async_client: AsyncOrb) -> None: alert = await async_client.alerts.create_for_external_customer( - "string", - currency="string", - type="string", + external_customer_id="external_customer_id", + currency="currency", + type="type", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], ) assert_matches_type(Alert, alert, path=["response"]) @@ -515,9 +515,9 @@ async def test_method_create_for_external_customer_with_all_params(self, async_c @parametrize async def test_raw_response_create_for_external_customer(self, async_client: AsyncOrb) -> None: response = await async_client.alerts.with_raw_response.create_for_external_customer( - "string", - currency="string", - type="string", + external_customer_id="external_customer_id", + currency="currency", + type="type", ) assert response.is_closed is True @@ -528,9 +528,9 @@ async def test_raw_response_create_for_external_customer(self, async_client: Asy @parametrize async def test_streaming_response_create_for_external_customer(self, async_client: AsyncOrb) -> None: async with async_client.alerts.with_streaming_response.create_for_external_customer( - "string", - currency="string", - type="string", + external_customer_id="external_customer_id", + currency="currency", + type="type", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -544,36 +544,36 @@ async def test_streaming_response_create_for_external_customer(self, async_clien async def test_path_params_create_for_external_customer(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"): await async_client.alerts.with_raw_response.create_for_external_customer( - "", - currency="string", - type="string", + external_customer_id="", + currency="currency", + type="type", ) @parametrize async def test_method_create_for_subscription(self, async_client: AsyncOrb) -> None: alert = await async_client.alerts.create_for_subscription( - "string", + subscription_id="subscription_id", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", + type="type", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize async def test_method_create_for_subscription_with_all_params(self, async_client: AsyncOrb) -> None: alert = await async_client.alerts.create_for_subscription( - "string", + subscription_id="subscription_id", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", - metric_id="string", + type="type", + metric_id="metric_id", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize async def test_raw_response_create_for_subscription(self, async_client: AsyncOrb) -> None: response = await async_client.alerts.with_raw_response.create_for_subscription( - "string", + subscription_id="subscription_id", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", + type="type", ) assert response.is_closed is True @@ -584,9 +584,9 @@ async def test_raw_response_create_for_subscription(self, async_client: AsyncOrb @parametrize async def test_streaming_response_create_for_subscription(self, async_client: AsyncOrb) -> None: async with async_client.alerts.with_streaming_response.create_for_subscription( - "string", + subscription_id="subscription_id", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", + type="type", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -600,22 +600,22 @@ async def test_streaming_response_create_for_subscription(self, async_client: As async def test_path_params_create_for_subscription(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.alerts.with_raw_response.create_for_subscription( - "", + subscription_id="", thresholds=[{"value": 0}, {"value": 0}, {"value": 0}], - type="string", + type="type", ) @parametrize async def test_method_disable(self, async_client: AsyncOrb) -> None: alert = await async_client.alerts.disable( - "string", + "alert_configuration_id", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize async def test_raw_response_disable(self, async_client: AsyncOrb) -> None: response = await async_client.alerts.with_raw_response.disable( - "string", + "alert_configuration_id", ) assert response.is_closed is True @@ -626,7 +626,7 @@ async def test_raw_response_disable(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_disable(self, async_client: AsyncOrb) -> None: async with async_client.alerts.with_streaming_response.disable( - "string", + "alert_configuration_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -648,14 +648,14 @@ async def test_path_params_disable(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_enable(self, async_client: AsyncOrb) -> None: alert = await async_client.alerts.enable( - "string", + "alert_configuration_id", ) assert_matches_type(Alert, alert, path=["response"]) @parametrize async def test_raw_response_enable(self, async_client: AsyncOrb) -> None: response = await async_client.alerts.with_raw_response.enable( - "string", + "alert_configuration_id", ) assert response.is_closed is True @@ -666,7 +666,7 @@ async def test_raw_response_enable(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_enable(self, async_client: AsyncOrb) -> None: async with async_client.alerts.with_streaming_response.enable( - "string", + "alert_configuration_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_coupons.py b/tests/api_resources/test_coupons.py index 977bf45d..8d59baa8 100644 --- a/tests/api_resources/test_coupons.py +++ b/tests/api_resources/test_coupons.py @@ -82,9 +82,9 @@ def test_method_list(self, client: Orb) -> None: @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: coupon = client.coupons.list( - cursor="string", + cursor="cursor", limit=1, - redemption_code="string", + redemption_code="redemption_code", show_archived=True, ) assert_matches_type(SyncPage[Coupon], coupon, path=["response"]) @@ -112,14 +112,14 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_archive(self, client: Orb) -> None: coupon = client.coupons.archive( - "string", + "coupon_id", ) assert_matches_type(Coupon, coupon, path=["response"]) @parametrize def test_raw_response_archive(self, client: Orb) -> None: response = client.coupons.with_raw_response.archive( - "string", + "coupon_id", ) assert response.is_closed is True @@ -130,7 +130,7 @@ def test_raw_response_archive(self, client: Orb) -> None: @parametrize def test_streaming_response_archive(self, client: Orb) -> None: with client.coupons.with_streaming_response.archive( - "string", + "coupon_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -150,14 +150,14 @@ def test_path_params_archive(self, client: Orb) -> None: @parametrize def test_method_fetch(self, client: Orb) -> None: coupon = client.coupons.fetch( - "string", + "coupon_id", ) assert_matches_type(Coupon, coupon, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.coupons.with_raw_response.fetch( - "string", + "coupon_id", ) assert response.is_closed is True @@ -168,7 +168,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.coupons.with_streaming_response.fetch( - "string", + "coupon_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -253,9 +253,9 @@ async def test_method_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: coupon = await async_client.coupons.list( - cursor="string", + cursor="cursor", limit=1, - redemption_code="string", + redemption_code="redemption_code", show_archived=True, ) assert_matches_type(AsyncPage[Coupon], coupon, path=["response"]) @@ -283,14 +283,14 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_archive(self, async_client: AsyncOrb) -> None: coupon = await async_client.coupons.archive( - "string", + "coupon_id", ) assert_matches_type(Coupon, coupon, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncOrb) -> None: response = await async_client.coupons.with_raw_response.archive( - "string", + "coupon_id", ) assert response.is_closed is True @@ -301,7 +301,7 @@ async def test_raw_response_archive(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncOrb) -> None: async with async_client.coupons.with_streaming_response.archive( - "string", + "coupon_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -321,14 +321,14 @@ async def test_path_params_archive(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: coupon = await async_client.coupons.fetch( - "string", + "coupon_id", ) assert_matches_type(Coupon, coupon, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.coupons.with_raw_response.fetch( - "string", + "coupon_id", ) assert response.is_closed is True @@ -339,7 +339,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.coupons.with_streaming_response.fetch( - "string", + "coupon_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_credit_notes.py b/tests/api_resources/test_credit_notes.py index b7d1d62d..b44d927f 100644 --- a/tests/api_resources/test_credit_notes.py +++ b/tests/api_resources/test_credit_notes.py @@ -26,7 +26,7 @@ def test_method_list(self, client: Orb) -> None: @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: credit_note = client.credit_notes.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[CreditNote], credit_note, path=["response"]) @@ -54,14 +54,14 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_fetch(self, client: Orb) -> None: credit_note = client.credit_notes.fetch( - "string", + "credit_note_id", ) assert_matches_type(CreditNote, credit_note, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.credit_notes.with_raw_response.fetch( - "string", + "credit_note_id", ) assert response.is_closed is True @@ -72,7 +72,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.credit_notes.with_streaming_response.fetch( - "string", + "credit_note_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -101,7 +101,7 @@ async def test_method_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: credit_note = await async_client.credit_notes.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[CreditNote], credit_note, path=["response"]) @@ -129,14 +129,14 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: credit_note = await async_client.credit_notes.fetch( - "string", + "credit_note_id", ) assert_matches_type(CreditNote, credit_note, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.credit_notes.with_raw_response.fetch( - "string", + "credit_note_id", ) assert response.is_closed is True @@ -147,7 +147,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.credit_notes.with_streaming_response.fetch( - "string", + "credit_note_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_customers.py b/tests/api_resources/test_customers.py index 83296e9f..89174717 100644 --- a/tests/api_resources/test_customers.py +++ b/tests/api_resources/test_customers.py @@ -24,72 +24,72 @@ class TestCustomers: @parametrize def test_method_create(self, client: Orb) -> None: customer = client.customers.create( - email="string", - name="string", + email="email", + name="name", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Orb) -> None: customer = client.customers.create( - email="string", - name="string", + email="email", + name="name", accounting_sync_configuration={ "excluded": True, "accounting_providers": [ { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, ], }, additional_emails=["string", "string", "string"], auto_collection=True, billing_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, - currency="string", + currency="currency", email_delivery=True, - external_customer_id="string", + external_customer_id="external_customer_id", metadata={"foo": "string"}, payment_provider="quickbooks", - payment_provider_id="string", + payment_provider_id="payment_provider_id", reporting_configuration={"exempt": True}, shipping_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, tax_id={ "country": "AD", "type": "ad_nrt", - "value": "string", + "value": "value", }, - timezone="string", + timezone="timezone", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize def test_raw_response_create(self, client: Orb) -> None: response = client.customers.with_raw_response.create( - email="string", - name="string", + email="email", + name="name", ) assert response.is_closed is True @@ -100,8 +100,8 @@ def test_raw_response_create(self, client: Orb) -> None: @parametrize def test_streaming_response_create(self, client: Orb) -> None: with client.customers.with_streaming_response.create( - email="string", - name="string", + email="email", + name="name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -114,62 +114,62 @@ def test_streaming_response_create(self, client: Orb) -> None: @parametrize def test_method_update(self, client: Orb) -> None: customer = client.customers.update( - "string", + customer_id="customer_id", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Orb) -> None: customer = client.customers.update( - "string", + customer_id="customer_id", accounting_sync_configuration={ "excluded": True, "accounting_providers": [ { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, ], }, additional_emails=["string"], auto_collection=True, billing_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, - currency="string", - email="string", + currency="currency", + email="email", email_delivery=True, - external_customer_id="string", + external_customer_id="external_customer_id", metadata={"foo": "string"}, - name="string", + name="name", payment_provider="quickbooks", - payment_provider_id="string", + payment_provider_id="payment_provider_id", reporting_configuration={"exempt": True}, shipping_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, tax_id={ "country": "AD", "type": "ad_nrt", - "value": "string", + "value": "value", }, ) assert_matches_type(Customer, customer, path=["response"]) @@ -177,7 +177,7 @@ def test_method_update_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_update(self, client: Orb) -> None: response = client.customers.with_raw_response.update( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -188,7 +188,7 @@ def test_raw_response_update(self, client: Orb) -> None: @parametrize def test_streaming_response_update(self, client: Orb) -> None: with client.customers.with_streaming_response.update( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -202,7 +202,7 @@ def test_streaming_response_update(self, client: Orb) -> None: def test_path_params_update(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): client.customers.with_raw_response.update( - "", + customer_id="", ) @parametrize @@ -217,7 +217,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[Customer], customer, path=["response"]) @@ -245,14 +245,14 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_delete(self, client: Orb) -> None: customer = client.customers.delete( - "string", + "customer_id", ) assert customer is None @parametrize def test_raw_response_delete(self, client: Orb) -> None: response = client.customers.with_raw_response.delete( - "string", + "customer_id", ) assert response.is_closed is True @@ -263,7 +263,7 @@ def test_raw_response_delete(self, client: Orb) -> None: @parametrize def test_streaming_response_delete(self, client: Orb) -> None: with client.customers.with_streaming_response.delete( - "string", + "customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -283,14 +283,14 @@ def test_path_params_delete(self, client: Orb) -> None: @parametrize def test_method_fetch(self, client: Orb) -> None: customer = client.customers.fetch( - "string", + "customer_id", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.customers.with_raw_response.fetch( - "string", + "customer_id", ) assert response.is_closed is True @@ -301,7 +301,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.customers.with_streaming_response.fetch( - "string", + "customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -321,14 +321,14 @@ def test_path_params_fetch(self, client: Orb) -> None: @parametrize def test_method_fetch_by_external_id(self, client: Orb) -> None: customer = client.customers.fetch_by_external_id( - "string", + "external_customer_id", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize def test_raw_response_fetch_by_external_id(self, client: Orb) -> None: response = client.customers.with_raw_response.fetch_by_external_id( - "string", + "external_customer_id", ) assert response.is_closed is True @@ -339,7 +339,7 @@ def test_raw_response_fetch_by_external_id(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch_by_external_id(self, client: Orb) -> None: with client.customers.with_streaming_response.fetch_by_external_id( - "string", + "external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -359,62 +359,62 @@ def test_path_params_fetch_by_external_id(self, client: Orb) -> None: @parametrize def test_method_update_by_external_id(self, client: Orb) -> None: customer = client.customers.update_by_external_id( - "string", + id="external_customer_id", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize def test_method_update_by_external_id_with_all_params(self, client: Orb) -> None: customer = client.customers.update_by_external_id( - "string", + id="external_customer_id", accounting_sync_configuration={ "excluded": True, "accounting_providers": [ { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, ], }, additional_emails=["string"], auto_collection=True, billing_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, - currency="string", - email="string", + currency="currency", + email="email", email_delivery=True, - external_customer_id="string", + external_customer_id="external_customer_id", metadata={"foo": "string"}, - name="string", + name="name", payment_provider="quickbooks", - payment_provider_id="string", + payment_provider_id="payment_provider_id", reporting_configuration={"exempt": True}, shipping_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, tax_id={ "country": "AD", "type": "ad_nrt", - "value": "string", + "value": "value", }, ) assert_matches_type(Customer, customer, path=["response"]) @@ -422,7 +422,7 @@ def test_method_update_by_external_id_with_all_params(self, client: Orb) -> None @parametrize def test_raw_response_update_by_external_id(self, client: Orb) -> None: response = client.customers.with_raw_response.update_by_external_id( - "string", + id="external_customer_id", ) assert response.is_closed is True @@ -433,7 +433,7 @@ def test_raw_response_update_by_external_id(self, client: Orb) -> None: @parametrize def test_streaming_response_update_by_external_id(self, client: Orb) -> None: with client.customers.with_streaming_response.update_by_external_id( - "string", + id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -447,7 +447,7 @@ def test_streaming_response_update_by_external_id(self, client: Orb) -> None: def test_path_params_update_by_external_id(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.customers.with_raw_response.update_by_external_id( - "", + id="", external_customer_id="", ) @@ -458,72 +458,72 @@ class TestAsyncCustomers: @parametrize async def test_method_create(self, async_client: AsyncOrb) -> None: customer = await async_client.customers.create( - email="string", - name="string", + email="email", + name="name", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> None: customer = await async_client.customers.create( - email="string", - name="string", + email="email", + name="name", accounting_sync_configuration={ "excluded": True, "accounting_providers": [ { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, ], }, additional_emails=["string", "string", "string"], auto_collection=True, billing_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, - currency="string", + currency="currency", email_delivery=True, - external_customer_id="string", + external_customer_id="external_customer_id", metadata={"foo": "string"}, payment_provider="quickbooks", - payment_provider_id="string", + payment_provider_id="payment_provider_id", reporting_configuration={"exempt": True}, shipping_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, tax_id={ "country": "AD", "type": "ad_nrt", - "value": "string", + "value": "value", }, - timezone="string", + timezone="timezone", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncOrb) -> None: response = await async_client.customers.with_raw_response.create( - email="string", - name="string", + email="email", + name="name", ) assert response.is_closed is True @@ -534,8 +534,8 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: async with async_client.customers.with_streaming_response.create( - email="string", - name="string", + email="email", + name="name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -548,62 +548,62 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_update(self, async_client: AsyncOrb) -> None: customer = await async_client.customers.update( - "string", + customer_id="customer_id", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> None: customer = await async_client.customers.update( - "string", + customer_id="customer_id", accounting_sync_configuration={ "excluded": True, "accounting_providers": [ { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, ], }, additional_emails=["string"], auto_collection=True, billing_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, - currency="string", - email="string", + currency="currency", + email="email", email_delivery=True, - external_customer_id="string", + external_customer_id="external_customer_id", metadata={"foo": "string"}, - name="string", + name="name", payment_provider="quickbooks", - payment_provider_id="string", + payment_provider_id="payment_provider_id", reporting_configuration={"exempt": True}, shipping_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, tax_id={ "country": "AD", "type": "ad_nrt", - "value": "string", + "value": "value", }, ) assert_matches_type(Customer, customer, path=["response"]) @@ -611,7 +611,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No @parametrize async def test_raw_response_update(self, async_client: AsyncOrb) -> None: response = await async_client.customers.with_raw_response.update( - "string", + customer_id="customer_id", ) assert response.is_closed is True @@ -622,7 +622,7 @@ async def test_raw_response_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async with async_client.customers.with_streaming_response.update( - "string", + customer_id="customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -636,7 +636,7 @@ async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async def test_path_params_update(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"): await async_client.customers.with_raw_response.update( - "", + customer_id="", ) @parametrize @@ -651,7 +651,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[Customer], customer, path=["response"]) @@ -679,14 +679,14 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_delete(self, async_client: AsyncOrb) -> None: customer = await async_client.customers.delete( - "string", + "customer_id", ) assert customer is None @parametrize async def test_raw_response_delete(self, async_client: AsyncOrb) -> None: response = await async_client.customers.with_raw_response.delete( - "string", + "customer_id", ) assert response.is_closed is True @@ -697,7 +697,7 @@ async def test_raw_response_delete(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncOrb) -> None: async with async_client.customers.with_streaming_response.delete( - "string", + "customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -717,14 +717,14 @@ async def test_path_params_delete(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: customer = await async_client.customers.fetch( - "string", + "customer_id", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.customers.with_raw_response.fetch( - "string", + "customer_id", ) assert response.is_closed is True @@ -735,7 +735,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.customers.with_streaming_response.fetch( - "string", + "customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -755,14 +755,14 @@ async def test_path_params_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch_by_external_id(self, async_client: AsyncOrb) -> None: customer = await async_client.customers.fetch_by_external_id( - "string", + "external_customer_id", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize async def test_raw_response_fetch_by_external_id(self, async_client: AsyncOrb) -> None: response = await async_client.customers.with_raw_response.fetch_by_external_id( - "string", + "external_customer_id", ) assert response.is_closed is True @@ -773,7 +773,7 @@ async def test_raw_response_fetch_by_external_id(self, async_client: AsyncOrb) - @parametrize async def test_streaming_response_fetch_by_external_id(self, async_client: AsyncOrb) -> None: async with async_client.customers.with_streaming_response.fetch_by_external_id( - "string", + "external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -793,62 +793,62 @@ async def test_path_params_fetch_by_external_id(self, async_client: AsyncOrb) -> @parametrize async def test_method_update_by_external_id(self, async_client: AsyncOrb) -> None: customer = await async_client.customers.update_by_external_id( - "string", + id="external_customer_id", ) assert_matches_type(Customer, customer, path=["response"]) @parametrize async def test_method_update_by_external_id_with_all_params(self, async_client: AsyncOrb) -> None: customer = await async_client.customers.update_by_external_id( - "string", + id="external_customer_id", accounting_sync_configuration={ "excluded": True, "accounting_providers": [ { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, { - "provider_type": "string", - "external_provider_id": "string", + "provider_type": "provider_type", + "external_provider_id": "external_provider_id", }, ], }, additional_emails=["string"], auto_collection=True, billing_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, - currency="string", - email="string", + currency="currency", + email="email", email_delivery=True, - external_customer_id="string", + external_customer_id="external_customer_id", metadata={"foo": "string"}, - name="string", + name="name", payment_provider="quickbooks", - payment_provider_id="string", + payment_provider_id="payment_provider_id", reporting_configuration={"exempt": True}, shipping_address={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", }, tax_id={ "country": "AD", "type": "ad_nrt", - "value": "string", + "value": "value", }, ) assert_matches_type(Customer, customer, path=["response"]) @@ -856,7 +856,7 @@ async def test_method_update_by_external_id_with_all_params(self, async_client: @parametrize async def test_raw_response_update_by_external_id(self, async_client: AsyncOrb) -> None: response = await async_client.customers.with_raw_response.update_by_external_id( - "string", + id="external_customer_id", ) assert response.is_closed is True @@ -867,7 +867,7 @@ async def test_raw_response_update_by_external_id(self, async_client: AsyncOrb) @parametrize async def test_streaming_response_update_by_external_id(self, async_client: AsyncOrb) -> None: async with async_client.customers.with_streaming_response.update_by_external_id( - "string", + id="external_customer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -881,6 +881,6 @@ async def test_streaming_response_update_by_external_id(self, async_client: Asyn async def test_path_params_update_by_external_id(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.customers.with_raw_response.update_by_external_id( - "", + id="", external_customer_id="", ) diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 1347a5d1..d179e3bf 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -26,8 +26,8 @@ class TestEvents: @parametrize def test_method_update(self, client: Orb) -> None: event = client.events.update( - "string", - event_name="string", + event_id="event_id", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), ) @@ -36,20 +36,20 @@ def test_method_update(self, client: Orb) -> None: @parametrize def test_method_update_with_all_params(self, client: Orb) -> None: event = client.events.update( - "string", - event_name="string", + event_id="event_id", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), - customer_id="string", - external_customer_id="string", + customer_id="customer_id", + external_customer_id="external_customer_id", ) assert_matches_type(EventUpdateResponse, event, path=["response"]) @parametrize def test_raw_response_update(self, client: Orb) -> None: response = client.events.with_raw_response.update( - "string", - event_name="string", + event_id="event_id", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), ) @@ -62,8 +62,8 @@ def test_raw_response_update(self, client: Orb) -> None: @parametrize def test_streaming_response_update(self, client: Orb) -> None: with client.events.with_streaming_response.update( - "string", - event_name="string", + event_id="event_id", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), ) as response: @@ -79,8 +79,8 @@ def test_streaming_response_update(self, client: Orb) -> None: def test_path_params_update(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.events.with_raw_response.update( - "", - event_name="string", + event_id="", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), ) @@ -88,14 +88,14 @@ def test_path_params_update(self, client: Orb) -> None: @parametrize def test_method_deprecate(self, client: Orb) -> None: event = client.events.deprecate( - "string", + "event_id", ) assert_matches_type(EventDeprecateResponse, event, path=["response"]) @parametrize def test_raw_response_deprecate(self, client: Orb) -> None: response = client.events.with_raw_response.deprecate( - "string", + "event_id", ) assert response.is_closed is True @@ -106,7 +106,7 @@ def test_raw_response_deprecate(self, client: Orb) -> None: @parametrize def test_streaming_response_deprecate(self, client: Orb) -> None: with client.events.with_streaming_response.deprecate( - "string", + "event_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,22 +128,22 @@ def test_method_ingest(self, client: Orb) -> None: event = client.events.ingest( events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, ], ) @@ -154,31 +154,31 @@ def test_method_ingest_with_all_params(self, client: Orb) -> None: event = client.events.ingest( events=[ { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, ], - backfill_id="string", + backfill_id="backfill_id", debug=True, ) assert_matches_type(EventIngestResponse, event, path=["response"]) @@ -188,22 +188,22 @@ def test_raw_response_ingest(self, client: Orb) -> None: response = client.events.with_raw_response.ingest( events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, ], ) @@ -218,22 +218,22 @@ def test_streaming_response_ingest(self, client: Orb) -> None: with client.events.with_streaming_response.ingest( events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, ], ) as response: @@ -292,8 +292,8 @@ class TestAsyncEvents: @parametrize async def test_method_update(self, async_client: AsyncOrb) -> None: event = await async_client.events.update( - "string", - event_name="string", + event_id="event_id", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), ) @@ -302,20 +302,20 @@ async def test_method_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> None: event = await async_client.events.update( - "string", - event_name="string", + event_id="event_id", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), - customer_id="string", - external_customer_id="string", + customer_id="customer_id", + external_customer_id="external_customer_id", ) assert_matches_type(EventUpdateResponse, event, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncOrb) -> None: response = await async_client.events.with_raw_response.update( - "string", - event_name="string", + event_id="event_id", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), ) @@ -328,8 +328,8 @@ async def test_raw_response_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async with async_client.events.with_streaming_response.update( - "string", - event_name="string", + event_id="event_id", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), ) as response: @@ -345,8 +345,8 @@ async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async def test_path_params_update(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.events.with_raw_response.update( - "", - event_name="string", + event_id="", + event_name="event_name", properties={}, timestamp=parse_datetime("2020-12-09T16:09:53Z"), ) @@ -354,14 +354,14 @@ async def test_path_params_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_deprecate(self, async_client: AsyncOrb) -> None: event = await async_client.events.deprecate( - "string", + "event_id", ) assert_matches_type(EventDeprecateResponse, event, path=["response"]) @parametrize async def test_raw_response_deprecate(self, async_client: AsyncOrb) -> None: response = await async_client.events.with_raw_response.deprecate( - "string", + "event_id", ) assert response.is_closed is True @@ -372,7 +372,7 @@ async def test_raw_response_deprecate(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_deprecate(self, async_client: AsyncOrb) -> None: async with async_client.events.with_streaming_response.deprecate( - "string", + "event_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -394,22 +394,22 @@ async def test_method_ingest(self, async_client: AsyncOrb) -> None: event = await async_client.events.ingest( events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, ], ) @@ -420,31 +420,31 @@ async def test_method_ingest_with_all_params(self, async_client: AsyncOrb) -> No event = await async_client.events.ingest( events=[ { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "customer_id": "string", - "external_customer_id": "string", - "event_name": "string", + "customer_id": "customer_id", + "external_customer_id": "external_customer_id", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, ], - backfill_id="string", + backfill_id="backfill_id", debug=True, ) assert_matches_type(EventIngestResponse, event, path=["response"]) @@ -454,22 +454,22 @@ async def test_raw_response_ingest(self, async_client: AsyncOrb) -> None: response = await async_client.events.with_raw_response.ingest( events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, ], ) @@ -484,22 +484,22 @@ async def test_streaming_response_ingest(self, async_client: AsyncOrb) -> None: async with async_client.events.with_streaming_response.ingest( events=[ { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, { - "event_name": "string", + "event_name": "event_name", "timestamp": parse_datetime("2020-12-09T16:09:53Z"), "properties": {}, - "idempotency_key": "string", + "idempotency_key": "idempotency_key", }, ], ) as response: diff --git a/tests/api_resources/test_invoices.py b/tests/api_resources/test_invoices.py index 0d2e2df5..2de0176d 100644 --- a/tests/api_resources/test_invoices.py +++ b/tests/api_resources/test_invoices.py @@ -35,7 +35,7 @@ def test_method_create(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -44,7 +44,7 @@ def test_method_create(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -53,7 +53,7 @@ def test_method_create(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], net_terms=0, @@ -73,7 +73,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -82,7 +82,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -91,7 +91,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], net_terms=0, @@ -99,7 +99,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: discount={ "discount_type": "percentage", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], - "reason": "string", + "reason": "reason", "percentage_discount": 0.15, }, external_customer_id="external-customer-id", @@ -122,7 +122,7 @@ def test_raw_response_create(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -131,7 +131,7 @@ def test_raw_response_create(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -140,7 +140,7 @@ def test_raw_response_create(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], net_terms=0, @@ -164,7 +164,7 @@ def test_streaming_response_create(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -173,7 +173,7 @@ def test_streaming_response_create(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -182,7 +182,7 @@ def test_streaming_response_create(self, client: Orb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], net_terms=0, @@ -203,17 +203,17 @@ def test_method_list(self, client: Orb) -> None: @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: invoice = client.invoices.list( - amount="string", - amount_gt="string", - amount_lt="string", - cursor="string", - customer_id="string", + amount="amount", + amount_gt="amount[gt]", + amount_lt="amount[lt]", + cursor="cursor", + customer_id="customer_id", date_type="due_date", due_date=parse_date("2019-12-27"), - due_date_window="string", + due_date_window="due_date_window", due_date_gt=parse_date("2019-12-27"), due_date_lt=parse_date("2019-12-27"), - external_customer_id="string", + external_customer_id="external_customer_id", invoice_date_gt=parse_datetime("2019-12-27T18:11:19.117Z"), invoice_date_gte=parse_datetime("2019-12-27T18:11:19.117Z"), invoice_date_lt=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -221,7 +221,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: is_recurring=True, limit=1, status=["draft", "issued", "paid"], - subscription_id="string", + subscription_id="subscription_id", ) assert_matches_type(SyncPage[Invoice], invoice, path=["response"]) @@ -248,14 +248,14 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_fetch(self, client: Orb) -> None: invoice = client.invoices.fetch( - "string", + "invoice_id", ) assert_matches_type(Invoice, invoice, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.invoices.with_raw_response.fetch( - "string", + "invoice_id", ) assert response.is_closed is True @@ -266,7 +266,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.invoices.with_streaming_response.fetch( - "string", + "invoice_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -291,7 +291,7 @@ def test_method_fetch_upcoming(self, client: Orb) -> None: @parametrize def test_method_fetch_upcoming_with_all_params(self, client: Orb) -> None: invoice = client.invoices.fetch_upcoming( - subscription_id="string", + subscription_id="subscription_id", ) assert_matches_type(InvoiceFetchUpcomingResponse, invoice, path=["response"]) @@ -318,14 +318,14 @@ def test_streaming_response_fetch_upcoming(self, client: Orb) -> None: @parametrize def test_method_issue(self, client: Orb) -> None: invoice = client.invoices.issue( - "string", + "invoice_id", ) assert_matches_type(Invoice, invoice, path=["response"]) @parametrize def test_raw_response_issue(self, client: Orb) -> None: response = client.invoices.with_raw_response.issue( - "string", + "invoice_id", ) assert response.is_closed is True @@ -336,7 +336,7 @@ def test_raw_response_issue(self, client: Orb) -> None: @parametrize def test_streaming_response_issue(self, client: Orb) -> None: with client.invoices.with_streaming_response.issue( - "string", + "invoice_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -356,7 +356,7 @@ def test_path_params_issue(self, client: Orb) -> None: @parametrize def test_method_mark_paid(self, client: Orb) -> None: invoice = client.invoices.mark_paid( - "string", + invoice_id="invoice_id", payment_received_date=parse_date("2023-09-22"), ) assert_matches_type(Invoice, invoice, path=["response"]) @@ -364,17 +364,17 @@ def test_method_mark_paid(self, client: Orb) -> None: @parametrize def test_method_mark_paid_with_all_params(self, client: Orb) -> None: invoice = client.invoices.mark_paid( - "string", + invoice_id="invoice_id", payment_received_date=parse_date("2023-09-22"), external_id="external_payment_id_123", - notes="string", + notes="notes", ) assert_matches_type(Invoice, invoice, path=["response"]) @parametrize def test_raw_response_mark_paid(self, client: Orb) -> None: response = client.invoices.with_raw_response.mark_paid( - "string", + invoice_id="invoice_id", payment_received_date=parse_date("2023-09-22"), ) @@ -386,7 +386,7 @@ def test_raw_response_mark_paid(self, client: Orb) -> None: @parametrize def test_streaming_response_mark_paid(self, client: Orb) -> None: with client.invoices.with_streaming_response.mark_paid( - "string", + invoice_id="invoice_id", payment_received_date=parse_date("2023-09-22"), ) as response: assert not response.is_closed @@ -401,21 +401,21 @@ def test_streaming_response_mark_paid(self, client: Orb) -> None: def test_path_params_mark_paid(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invoice_id` but received ''"): client.invoices.with_raw_response.mark_paid( - "", + invoice_id="", payment_received_date=parse_date("2023-09-22"), ) @parametrize def test_method_void(self, client: Orb) -> None: invoice = client.invoices.void( - "string", + "invoice_id", ) assert_matches_type(Invoice, invoice, path=["response"]) @parametrize def test_raw_response_void(self, client: Orb) -> None: response = client.invoices.with_raw_response.void( - "string", + "invoice_id", ) assert response.is_closed is True @@ -426,7 +426,7 @@ def test_raw_response_void(self, client: Orb) -> None: @parametrize def test_streaming_response_void(self, client: Orb) -> None: with client.invoices.with_streaming_response.void( - "string", + "invoice_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -460,7 +460,7 @@ async def test_method_create(self, async_client: AsyncOrb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -469,7 +469,7 @@ async def test_method_create(self, async_client: AsyncOrb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -478,7 +478,7 @@ async def test_method_create(self, async_client: AsyncOrb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], net_terms=0, @@ -498,7 +498,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -507,7 +507,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -516,7 +516,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], net_terms=0, @@ -524,7 +524,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No discount={ "discount_type": "percentage", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], - "reason": "string", + "reason": "reason", "percentage_discount": 0.15, }, external_customer_id="external-customer-id", @@ -547,7 +547,7 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -556,7 +556,7 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -565,7 +565,7 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], net_terms=0, @@ -589,7 +589,7 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -598,7 +598,7 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { "start_date": parse_date("2023-09-22"), @@ -607,7 +607,7 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: "name": "Line Item Name", "item_id": "4khy3nwzktxv7", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], net_terms=0, @@ -628,17 +628,17 @@ async def test_method_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: invoice = await async_client.invoices.list( - amount="string", - amount_gt="string", - amount_lt="string", - cursor="string", - customer_id="string", + amount="amount", + amount_gt="amount[gt]", + amount_lt="amount[lt]", + cursor="cursor", + customer_id="customer_id", date_type="due_date", due_date=parse_date("2019-12-27"), - due_date_window="string", + due_date_window="due_date_window", due_date_gt=parse_date("2019-12-27"), due_date_lt=parse_date("2019-12-27"), - external_customer_id="string", + external_customer_id="external_customer_id", invoice_date_gt=parse_datetime("2019-12-27T18:11:19.117Z"), invoice_date_gte=parse_datetime("2019-12-27T18:11:19.117Z"), invoice_date_lt=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -646,7 +646,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None is_recurring=True, limit=1, status=["draft", "issued", "paid"], - subscription_id="string", + subscription_id="subscription_id", ) assert_matches_type(AsyncPage[Invoice], invoice, path=["response"]) @@ -673,14 +673,14 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: invoice = await async_client.invoices.fetch( - "string", + "invoice_id", ) assert_matches_type(Invoice, invoice, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.invoices.with_raw_response.fetch( - "string", + "invoice_id", ) assert response.is_closed is True @@ -691,7 +691,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.invoices.with_streaming_response.fetch( - "string", + "invoice_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -716,7 +716,7 @@ async def test_method_fetch_upcoming(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch_upcoming_with_all_params(self, async_client: AsyncOrb) -> None: invoice = await async_client.invoices.fetch_upcoming( - subscription_id="string", + subscription_id="subscription_id", ) assert_matches_type(InvoiceFetchUpcomingResponse, invoice, path=["response"]) @@ -743,14 +743,14 @@ async def test_streaming_response_fetch_upcoming(self, async_client: AsyncOrb) - @parametrize async def test_method_issue(self, async_client: AsyncOrb) -> None: invoice = await async_client.invoices.issue( - "string", + "invoice_id", ) assert_matches_type(Invoice, invoice, path=["response"]) @parametrize async def test_raw_response_issue(self, async_client: AsyncOrb) -> None: response = await async_client.invoices.with_raw_response.issue( - "string", + "invoice_id", ) assert response.is_closed is True @@ -761,7 +761,7 @@ async def test_raw_response_issue(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_issue(self, async_client: AsyncOrb) -> None: async with async_client.invoices.with_streaming_response.issue( - "string", + "invoice_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -781,7 +781,7 @@ async def test_path_params_issue(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_mark_paid(self, async_client: AsyncOrb) -> None: invoice = await async_client.invoices.mark_paid( - "string", + invoice_id="invoice_id", payment_received_date=parse_date("2023-09-22"), ) assert_matches_type(Invoice, invoice, path=["response"]) @@ -789,17 +789,17 @@ async def test_method_mark_paid(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_mark_paid_with_all_params(self, async_client: AsyncOrb) -> None: invoice = await async_client.invoices.mark_paid( - "string", + invoice_id="invoice_id", payment_received_date=parse_date("2023-09-22"), external_id="external_payment_id_123", - notes="string", + notes="notes", ) assert_matches_type(Invoice, invoice, path=["response"]) @parametrize async def test_raw_response_mark_paid(self, async_client: AsyncOrb) -> None: response = await async_client.invoices.with_raw_response.mark_paid( - "string", + invoice_id="invoice_id", payment_received_date=parse_date("2023-09-22"), ) @@ -811,7 +811,7 @@ async def test_raw_response_mark_paid(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_mark_paid(self, async_client: AsyncOrb) -> None: async with async_client.invoices.with_streaming_response.mark_paid( - "string", + invoice_id="invoice_id", payment_received_date=parse_date("2023-09-22"), ) as response: assert not response.is_closed @@ -826,21 +826,21 @@ async def test_streaming_response_mark_paid(self, async_client: AsyncOrb) -> Non async def test_path_params_mark_paid(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invoice_id` but received ''"): await async_client.invoices.with_raw_response.mark_paid( - "", + invoice_id="", payment_received_date=parse_date("2023-09-22"), ) @parametrize async def test_method_void(self, async_client: AsyncOrb) -> None: invoice = await async_client.invoices.void( - "string", + "invoice_id", ) assert_matches_type(Invoice, invoice, path=["response"]) @parametrize async def test_raw_response_void(self, async_client: AsyncOrb) -> None: response = await async_client.invoices.with_raw_response.void( - "string", + "invoice_id", ) assert response.is_closed is True @@ -851,7 +851,7 @@ async def test_raw_response_void(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_void(self, async_client: AsyncOrb) -> None: async with async_client.invoices.with_streaming_response.void( - "string", + "invoice_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_items.py b/tests/api_resources/test_items.py index 6ef650eb..fedf3cc2 100644 --- a/tests/api_resources/test_items.py +++ b/tests/api_resources/test_items.py @@ -52,36 +52,36 @@ def test_streaming_response_create(self, client: Orb) -> None: @parametrize def test_method_update(self, client: Orb) -> None: item = client.items.update( - "string", + item_id="item_id", ) assert_matches_type(Item, item, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Orb) -> None: item = client.items.update( - "string", + item_id="item_id", external_connections=[ { "external_connection_name": "stripe", - "external_entity_id": "string", + "external_entity_id": "external_entity_id", }, { "external_connection_name": "stripe", - "external_entity_id": "string", + "external_entity_id": "external_entity_id", }, { "external_connection_name": "stripe", - "external_entity_id": "string", + "external_entity_id": "external_entity_id", }, ], - name="string", + name="name", ) assert_matches_type(Item, item, path=["response"]) @parametrize def test_raw_response_update(self, client: Orb) -> None: response = client.items.with_raw_response.update( - "string", + item_id="item_id", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_update(self, client: Orb) -> None: @parametrize def test_streaming_response_update(self, client: Orb) -> None: with client.items.with_streaming_response.update( - "string", + item_id="item_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,7 +106,7 @@ def test_streaming_response_update(self, client: Orb) -> None: def test_path_params_update(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `item_id` but received ''"): client.items.with_raw_response.update( - "", + item_id="", ) @parametrize @@ -117,7 +117,7 @@ def test_method_list(self, client: Orb) -> None: @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: item = client.items.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[Item], item, path=["response"]) @@ -145,14 +145,14 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_fetch(self, client: Orb) -> None: item = client.items.fetch( - "string", + "item_id", ) assert_matches_type(Item, item, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.items.with_raw_response.fetch( - "string", + "item_id", ) assert response.is_closed is True @@ -163,7 +163,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.items.with_streaming_response.fetch( - "string", + "item_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -218,36 +218,36 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_update(self, async_client: AsyncOrb) -> None: item = await async_client.items.update( - "string", + item_id="item_id", ) assert_matches_type(Item, item, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> None: item = await async_client.items.update( - "string", + item_id="item_id", external_connections=[ { "external_connection_name": "stripe", - "external_entity_id": "string", + "external_entity_id": "external_entity_id", }, { "external_connection_name": "stripe", - "external_entity_id": "string", + "external_entity_id": "external_entity_id", }, { "external_connection_name": "stripe", - "external_entity_id": "string", + "external_entity_id": "external_entity_id", }, ], - name="string", + name="name", ) assert_matches_type(Item, item, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncOrb) -> None: response = await async_client.items.with_raw_response.update( - "string", + item_id="item_id", ) assert response.is_closed is True @@ -258,7 +258,7 @@ async def test_raw_response_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async with async_client.items.with_streaming_response.update( - "string", + item_id="item_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -272,7 +272,7 @@ async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async def test_path_params_update(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `item_id` but received ''"): await async_client.items.with_raw_response.update( - "", + item_id="", ) @parametrize @@ -283,7 +283,7 @@ async def test_method_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: item = await async_client.items.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[Item], item, path=["response"]) @@ -311,14 +311,14 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: item = await async_client.items.fetch( - "string", + "item_id", ) assert_matches_type(Item, item, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.items.with_raw_response.fetch( - "string", + "item_id", ) assert response.is_closed is True @@ -329,7 +329,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.items.with_streaming_response.fetch( - "string", + "item_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_metrics.py b/tests/api_resources/test_metrics.py index ef2741dd..59a86fab 100644 --- a/tests/api_resources/test_metrics.py +++ b/tests/api_resources/test_metrics.py @@ -27,7 +27,7 @@ class TestMetrics: def test_method_create(self, client: Orb) -> None: metric = client.metrics.create( description="Sum of bytes downloaded in fast mode", - item_id="string", + item_id="item_id", name="Bytes downloaded", sql="SELECT sum(bytes_downloaded) FROM events WHERE download_speed = 'fast'", ) @@ -37,7 +37,7 @@ def test_method_create(self, client: Orb) -> None: def test_method_create_with_all_params(self, client: Orb) -> None: metric = client.metrics.create( description="Sum of bytes downloaded in fast mode", - item_id="string", + item_id="item_id", name="Bytes downloaded", sql="SELECT sum(bytes_downloaded) FROM events WHERE download_speed = 'fast'", metadata={"foo": "string"}, @@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: def test_raw_response_create(self, client: Orb) -> None: response = client.metrics.with_raw_response.create( description="Sum of bytes downloaded in fast mode", - item_id="string", + item_id="item_id", name="Bytes downloaded", sql="SELECT sum(bytes_downloaded) FROM events WHERE download_speed = 'fast'", ) @@ -62,7 +62,7 @@ def test_raw_response_create(self, client: Orb) -> None: def test_streaming_response_create(self, client: Orb) -> None: with client.metrics.with_streaming_response.create( description="Sum of bytes downloaded in fast mode", - item_id="string", + item_id="item_id", name="Bytes downloaded", sql="SELECT sum(bytes_downloaded) FROM events WHERE download_speed = 'fast'", ) as response: @@ -86,7 +86,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[MetricListResponse], metric, path=["response"]) @@ -114,14 +114,14 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_fetch(self, client: Orb) -> None: metric = client.metrics.fetch( - "string", + "metric_id", ) assert_matches_type(MetricFetchResponse, metric, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.metrics.with_raw_response.fetch( - "string", + "metric_id", ) assert response.is_closed is True @@ -132,7 +132,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.metrics.with_streaming_response.fetch( - "string", + "metric_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -157,7 +157,7 @@ class TestAsyncMetrics: async def test_method_create(self, async_client: AsyncOrb) -> None: metric = await async_client.metrics.create( description="Sum of bytes downloaded in fast mode", - item_id="string", + item_id="item_id", name="Bytes downloaded", sql="SELECT sum(bytes_downloaded) FROM events WHERE download_speed = 'fast'", ) @@ -167,7 +167,7 @@ async def test_method_create(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> None: metric = await async_client.metrics.create( description="Sum of bytes downloaded in fast mode", - item_id="string", + item_id="item_id", name="Bytes downloaded", sql="SELECT sum(bytes_downloaded) FROM events WHERE download_speed = 'fast'", metadata={"foo": "string"}, @@ -178,7 +178,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No async def test_raw_response_create(self, async_client: AsyncOrb) -> None: response = await async_client.metrics.with_raw_response.create( description="Sum of bytes downloaded in fast mode", - item_id="string", + item_id="item_id", name="Bytes downloaded", sql="SELECT sum(bytes_downloaded) FROM events WHERE download_speed = 'fast'", ) @@ -192,7 +192,7 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None: async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: async with async_client.metrics.with_streaming_response.create( description="Sum of bytes downloaded in fast mode", - item_id="string", + item_id="item_id", name="Bytes downloaded", sql="SELECT sum(bytes_downloaded) FROM events WHERE download_speed = 'fast'", ) as response: @@ -216,7 +216,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[MetricListResponse], metric, path=["response"]) @@ -244,14 +244,14 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: metric = await async_client.metrics.fetch( - "string", + "metric_id", ) assert_matches_type(MetricFetchResponse, metric, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.metrics.with_raw_response.fetch( - "string", + "metric_id", ) assert response.is_closed is True @@ -262,7 +262,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.metrics.with_streaming_response.fetch( - "string", + "metric_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 7134af1a..9e247f89 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -22,15 +22,15 @@ class TestPlans: @parametrize def test_method_create(self, client: Orb) -> None: plan = client.plans.create( - currency="string", - name="string", + currency="currency", + name="name", prices=[ { "name": "Annual fee", - "item_id": "string", + "item_id": "item_id", "cadence": "annual", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, } ], ) @@ -39,26 +39,26 @@ def test_method_create(self, client: Orb) -> None: @parametrize def test_method_create_with_all_params(self, client: Orb) -> None: plan = client.plans.create( - currency="string", - name="string", + currency="currency", + name="name", prices=[ { - "external_price_id": "string", + "external_price_id": "external_price_id", "name": "Annual fee", - "billable_metric_id": "string", - "item_id": "string", + "billable_metric_id": "billable_metric_id", + "item_id": "item_id", "billed_in_advance": True, "fixed_price_quantity": 0, - "invoice_grouping_key": "string", + "invoice_grouping_key": "invoice_grouping_key", "cadence": "annual", "conversion_rate": 0, "model_type": "unit", - "unit_config": {"unit_amount": "string"}, - "currency": "string", + "unit_config": {"unit_amount": "unit_amount"}, + "currency": "currency", } ], - default_invoice_memo="string", - external_plan_id="string", + default_invoice_memo="default_invoice_memo", + external_plan_id="external_plan_id", metadata={"foo": "string"}, net_terms=0, status="active", @@ -68,15 +68,15 @@ def test_method_create_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_create(self, client: Orb) -> None: response = client.plans.with_raw_response.create( - currency="string", - name="string", + currency="currency", + name="name", prices=[ { "name": "Annual fee", - "item_id": "string", + "item_id": "item_id", "cadence": "annual", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, } ], ) @@ -89,15 +89,15 @@ def test_raw_response_create(self, client: Orb) -> None: @parametrize def test_streaming_response_create(self, client: Orb) -> None: with client.plans.with_streaming_response.create( - currency="string", - name="string", + currency="currency", + name="name", prices=[ { "name": "Annual fee", - "item_id": "string", + "item_id": "item_id", "cadence": "annual", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, } ], ) as response: @@ -112,15 +112,15 @@ def test_streaming_response_create(self, client: Orb) -> None: @parametrize def test_method_update(self, client: Orb) -> None: plan = client.plans.update( - "string", + plan_id="plan_id", ) assert_matches_type(Plan, plan, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Orb) -> None: plan = client.plans.update( - "string", - external_plan_id="string", + plan_id="plan_id", + external_plan_id="external_plan_id", metadata={"foo": "string"}, ) assert_matches_type(Plan, plan, path=["response"]) @@ -128,7 +128,7 @@ def test_method_update_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_update(self, client: Orb) -> None: response = client.plans.with_raw_response.update( - "string", + plan_id="plan_id", ) assert response.is_closed is True @@ -139,7 +139,7 @@ def test_raw_response_update(self, client: Orb) -> None: @parametrize def test_streaming_response_update(self, client: Orb) -> None: with client.plans.with_streaming_response.update( - "string", + plan_id="plan_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -153,7 +153,7 @@ def test_streaming_response_update(self, client: Orb) -> None: def test_path_params_update(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_id` but received ''"): client.plans.with_raw_response.update( - "", + plan_id="", ) @parametrize @@ -168,7 +168,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None: created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", + cursor="cursor", limit=1, status="active", ) @@ -197,14 +197,14 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_fetch(self, client: Orb) -> None: plan = client.plans.fetch( - "string", + "plan_id", ) assert_matches_type(Plan, plan, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.plans.with_raw_response.fetch( - "string", + "plan_id", ) assert response.is_closed is True @@ -215,7 +215,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.plans.with_streaming_response.fetch( - "string", + "plan_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -239,15 +239,15 @@ class TestAsyncPlans: @parametrize async def test_method_create(self, async_client: AsyncOrb) -> None: plan = await async_client.plans.create( - currency="string", - name="string", + currency="currency", + name="name", prices=[ { "name": "Annual fee", - "item_id": "string", + "item_id": "item_id", "cadence": "annual", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, } ], ) @@ -256,26 +256,26 @@ async def test_method_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> None: plan = await async_client.plans.create( - currency="string", - name="string", + currency="currency", + name="name", prices=[ { - "external_price_id": "string", + "external_price_id": "external_price_id", "name": "Annual fee", - "billable_metric_id": "string", - "item_id": "string", + "billable_metric_id": "billable_metric_id", + "item_id": "item_id", "billed_in_advance": True, "fixed_price_quantity": 0, - "invoice_grouping_key": "string", + "invoice_grouping_key": "invoice_grouping_key", "cadence": "annual", "conversion_rate": 0, "model_type": "unit", - "unit_config": {"unit_amount": "string"}, - "currency": "string", + "unit_config": {"unit_amount": "unit_amount"}, + "currency": "currency", } ], - default_invoice_memo="string", - external_plan_id="string", + default_invoice_memo="default_invoice_memo", + external_plan_id="external_plan_id", metadata={"foo": "string"}, net_terms=0, status="active", @@ -285,15 +285,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No @parametrize async def test_raw_response_create(self, async_client: AsyncOrb) -> None: response = await async_client.plans.with_raw_response.create( - currency="string", - name="string", + currency="currency", + name="name", prices=[ { "name": "Annual fee", - "item_id": "string", + "item_id": "item_id", "cadence": "annual", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, } ], ) @@ -306,15 +306,15 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: async with async_client.plans.with_streaming_response.create( - currency="string", - name="string", + currency="currency", + name="name", prices=[ { "name": "Annual fee", - "item_id": "string", + "item_id": "item_id", "cadence": "annual", "model_type": "unit", - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, } ], ) as response: @@ -329,15 +329,15 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_update(self, async_client: AsyncOrb) -> None: plan = await async_client.plans.update( - "string", + plan_id="plan_id", ) assert_matches_type(Plan, plan, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> None: plan = await async_client.plans.update( - "string", - external_plan_id="string", + plan_id="plan_id", + external_plan_id="external_plan_id", metadata={"foo": "string"}, ) assert_matches_type(Plan, plan, path=["response"]) @@ -345,7 +345,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No @parametrize async def test_raw_response_update(self, async_client: AsyncOrb) -> None: response = await async_client.plans.with_raw_response.update( - "string", + plan_id="plan_id", ) assert response.is_closed is True @@ -356,7 +356,7 @@ async def test_raw_response_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async with async_client.plans.with_streaming_response.update( - "string", + plan_id="plan_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -370,7 +370,7 @@ async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async def test_path_params_update(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_id` but received ''"): await async_client.plans.with_raw_response.update( - "", + plan_id="", ) @parametrize @@ -385,7 +385,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", + cursor="cursor", limit=1, status="active", ) @@ -414,14 +414,14 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: plan = await async_client.plans.fetch( - "string", + "plan_id", ) assert_matches_type(Plan, plan, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.plans.with_raw_response.fetch( - "string", + "plan_id", ) assert response.is_closed is True @@ -432,7 +432,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.plans.with_streaming_response.fetch( - "string", + "plan_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_prices.py b/tests/api_resources/test_prices.py index 69d065d7..eba58c84 100644 --- a/tests/api_resources/test_prices.py +++ b/tests/api_resources/test_prices.py @@ -23,11 +23,11 @@ class TestPrices: def test_method_create_overload_1(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit", name="Annual fee", - unit_config={"unit_amount": "string"}, + unit_config={"unit_amount": "unit_amount"}, ) assert_matches_type(Price, price, path=["response"]) @@ -35,17 +35,17 @@ def test_method_create_overload_1(self, client: Orb) -> None: def test_method_create_with_all_params_overload_1(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit", name="Annual fee", - unit_config={"unit_amount": "string"}, - billable_metric_id="string", + unit_config={"unit_amount": "unit_amount"}, + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -53,11 +53,11 @@ def test_method_create_with_all_params_overload_1(self, client: Orb) -> None: def test_raw_response_create_overload_1(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit", name="Annual fee", - unit_config={"unit_amount": "string"}, + unit_config={"unit_amount": "unit_amount"}, ) assert response.is_closed is True @@ -69,11 +69,11 @@ def test_raw_response_create_overload_1(self, client: Orb) -> None: def test_streaming_response_create_overload_1(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit", name="Annual fee", - unit_config={"unit_amount": "string"}, + unit_config={"unit_amount": "unit_amount"}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,12 +87,12 @@ def test_streaming_response_create_overload_1(self, client: Orb) -> None: def test_method_create_overload_2(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package", name="Annual fee", package_config={ - "package_amount": "string", + "package_amount": "package_amount", "package_size": 0, }, ) @@ -102,20 +102,20 @@ def test_method_create_overload_2(self, client: Orb) -> None: def test_method_create_with_all_params_overload_2(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package", name="Annual fee", package_config={ - "package_amount": "string", + "package_amount": "package_amount", "package_size": 0, }, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -123,12 +123,12 @@ def test_method_create_with_all_params_overload_2(self, client: Orb) -> None: def test_raw_response_create_overload_2(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package", name="Annual fee", package_config={ - "package_amount": "string", + "package_amount": "package_amount", "package_size": 0, }, ) @@ -142,12 +142,12 @@ def test_raw_response_create_overload_2(self, client: Orb) -> None: def test_streaming_response_create_overload_2(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package", name="Annual fee", package_config={ - "package_amount": "string", + "package_amount": "package_amount", "package_size": 0, }, ) as response: @@ -163,22 +163,22 @@ def test_streaming_response_create_overload_2(self, client: Orb) -> None: def test_method_create_overload_3(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -192,34 +192,34 @@ def test_method_create_overload_3(self, client: Orb) -> None: def test_method_create_with_all_params_overload_3(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], }, model_type="matrix", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -227,22 +227,22 @@ def test_method_create_with_all_params_overload_3(self, client: Orb) -> None: def test_raw_response_create_overload_3(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -260,22 +260,22 @@ def test_raw_response_create_overload_3(self, client: Orb) -> None: def test_streaming_response_create_overload_3(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -295,22 +295,22 @@ def test_streaming_response_create_overload_3(self, client: Orb) -> None: def test_method_create_overload_4(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_with_allocation_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -325,22 +325,22 @@ def test_method_create_overload_4(self, client: Orb) -> None: def test_method_create_with_all_params_overload_4(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_with_allocation_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -348,12 +348,12 @@ def test_method_create_with_all_params_overload_4(self, client: Orb) -> None: }, model_type="matrix_with_allocation", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -361,22 +361,22 @@ def test_method_create_with_all_params_overload_4(self, client: Orb) -> None: def test_raw_response_create_overload_4(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_with_allocation_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -395,22 +395,22 @@ def test_raw_response_create_overload_4(self, client: Orb) -> None: def test_streaming_response_create_overload_4(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_with_allocation_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -431,23 +431,23 @@ def test_streaming_response_create_overload_4(self, client: Orb) -> None: def test_method_create_overload_5(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered", name="Annual fee", tiered_config={ "tiers": [ { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, @@ -458,8 +458,8 @@ def test_method_create_overload_5(self, client: Orb) -> None: def test_method_create_with_all_params_overload_5(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered", name="Annual fee", tiered_config={ @@ -467,26 +467,26 @@ def test_method_create_with_all_params_overload_5(self, client: Orb) -> None: { "first_unit": 0, "last_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, "last_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, "last_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -494,23 +494,23 @@ def test_method_create_with_all_params_overload_5(self, client: Orb) -> None: def test_raw_response_create_overload_5(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered", name="Annual fee", tiered_config={ "tiers": [ { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, @@ -525,23 +525,23 @@ def test_raw_response_create_overload_5(self, client: Orb) -> None: def test_streaming_response_create_overload_5(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered", name="Annual fee", tiered_config={ "tiers": [ { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, @@ -558,22 +558,22 @@ def test_streaming_response_create_overload_5(self, client: Orb) -> None: def test_method_create_overload_6(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_bps", name="Annual fee", tiered_bps_config={ "tiers": [ { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, ] @@ -585,38 +585,38 @@ def test_method_create_overload_6(self, client: Orb) -> None: def test_method_create_with_all_params_overload_6(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_bps", name="Annual fee", tiered_bps_config={ "tiers": [ { - "minimum_amount": "string", - "maximum_amount": "string", + "minimum_amount": "minimum_amount", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, { - "minimum_amount": "string", - "maximum_amount": "string", + "minimum_amount": "minimum_amount", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, { - "minimum_amount": "string", - "maximum_amount": "string", + "minimum_amount": "minimum_amount", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, ] }, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -624,22 +624,22 @@ def test_method_create_with_all_params_overload_6(self, client: Orb) -> None: def test_raw_response_create_overload_6(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_bps", name="Annual fee", tiered_bps_config={ "tiers": [ { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, ] @@ -655,22 +655,22 @@ def test_raw_response_create_overload_6(self, client: Orb) -> None: def test_streaming_response_create_overload_6(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_bps", name="Annual fee", tiered_bps_config={ "tiers": [ { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, ] @@ -689,8 +689,8 @@ def test_method_create_overload_7(self, client: Orb) -> None: price = client.prices.create( bps_config={"bps": 0}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bps", name="Annual fee", ) @@ -701,19 +701,19 @@ def test_method_create_with_all_params_overload_7(self, client: Orb) -> None: price = client.prices.create( bps_config={ "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bps", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -722,8 +722,8 @@ def test_raw_response_create_overload_7(self, client: Orb) -> None: response = client.prices.with_raw_response.create( bps_config={"bps": 0}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bps", name="Annual fee", ) @@ -738,8 +738,8 @@ def test_streaming_response_create_overload_7(self, client: Orb) -> None: with client.prices.with_streaming_response.create( bps_config={"bps": 0}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bps", name="Annual fee", ) as response: @@ -756,8 +756,8 @@ def test_method_create_overload_8(self, client: Orb) -> None: price = client.prices.create( bulk_bps_config={"tiers": [{"bps": 0}, {"bps": 0}, {"bps": 0}]}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk_bps", name="Annual fee", ) @@ -769,33 +769,33 @@ def test_method_create_with_all_params_overload_8(self, client: Orb) -> None: bulk_bps_config={ "tiers": [ { - "maximum_amount": "string", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, { - "maximum_amount": "string", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, { - "maximum_amount": "string", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, ] }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk_bps", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -804,8 +804,8 @@ def test_raw_response_create_overload_8(self, client: Orb) -> None: response = client.prices.with_raw_response.create( bulk_bps_config={"tiers": [{"bps": 0}, {"bps": 0}, {"bps": 0}]}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk_bps", name="Annual fee", ) @@ -820,8 +820,8 @@ def test_streaming_response_create_overload_8(self, client: Orb) -> None: with client.prices.with_streaming_response.create( bulk_bps_config={"tiers": [{"bps": 0}, {"bps": 0}, {"bps": 0}]}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk_bps", name="Annual fee", ) as response: @@ -836,10 +836,16 @@ def test_streaming_response_create_overload_8(self, client: Orb) -> None: @parametrize def test_method_create_overload_9(self, client: Orb) -> None: price = client.prices.create( - bulk_config={"tiers": [{"unit_amount": "string"}, {"unit_amount": "string"}, {"unit_amount": "string"}]}, + bulk_config={ + "tiers": [ + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + ] + }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk", name="Annual fee", ) @@ -852,39 +858,45 @@ def test_method_create_with_all_params_overload_9(self, client: Orb) -> None: "tiers": [ { "maximum_units": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "maximum_units": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "maximum_units": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @parametrize def test_raw_response_create_overload_9(self, client: Orb) -> None: response = client.prices.with_raw_response.create( - bulk_config={"tiers": [{"unit_amount": "string"}, {"unit_amount": "string"}, {"unit_amount": "string"}]}, + bulk_config={ + "tiers": [ + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + ] + }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk", name="Annual fee", ) @@ -897,10 +909,16 @@ def test_raw_response_create_overload_9(self, client: Orb) -> None: @parametrize def test_streaming_response_create_overload_9(self, client: Orb) -> None: with client.prices.with_streaming_response.create( - bulk_config={"tiers": [{"unit_amount": "string"}, {"unit_amount": "string"}, {"unit_amount": "string"}]}, + bulk_config={ + "tiers": [ + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + ] + }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk", name="Annual fee", ) as response: @@ -916,8 +934,8 @@ def test_streaming_response_create_overload_9(self, client: Orb) -> None: def test_method_create_overload_10(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="threshold_total_amount", name="Annual fee", threshold_total_amount_config={"foo": "bar"}, @@ -928,17 +946,17 @@ def test_method_create_overload_10(self, client: Orb) -> None: def test_method_create_with_all_params_overload_10(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="threshold_total_amount", name="Annual fee", threshold_total_amount_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -946,8 +964,8 @@ def test_method_create_with_all_params_overload_10(self, client: Orb) -> None: def test_raw_response_create_overload_10(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="threshold_total_amount", name="Annual fee", threshold_total_amount_config={"foo": "bar"}, @@ -962,8 +980,8 @@ def test_raw_response_create_overload_10(self, client: Orb) -> None: def test_streaming_response_create_overload_10(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="threshold_total_amount", name="Annual fee", threshold_total_amount_config={"foo": "bar"}, @@ -980,8 +998,8 @@ def test_streaming_response_create_overload_10(self, client: Orb) -> None: def test_method_create_overload_11(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package", name="Annual fee", tiered_package_config={"foo": "bar"}, @@ -992,17 +1010,17 @@ def test_method_create_overload_11(self, client: Orb) -> None: def test_method_create_with_all_params_overload_11(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package", name="Annual fee", tiered_package_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1010,8 +1028,8 @@ def test_method_create_with_all_params_overload_11(self, client: Orb) -> None: def test_raw_response_create_overload_11(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package", name="Annual fee", tiered_package_config={"foo": "bar"}, @@ -1026,8 +1044,8 @@ def test_raw_response_create_overload_11(self, client: Orb) -> None: def test_streaming_response_create_overload_11(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package", name="Annual fee", tiered_package_config={"foo": "bar"}, @@ -1044,9 +1062,9 @@ def test_streaming_response_create_overload_11(self, client: Orb) -> None: def test_method_create_overload_12(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", + currency="currency", grouped_tiered_config={"foo": "bar"}, - item_id="string", + item_id="item_id", model_type="grouped_tiered", name="Annual fee", ) @@ -1056,17 +1074,17 @@ def test_method_create_overload_12(self, client: Orb) -> None: def test_method_create_with_all_params_overload_12(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", + currency="currency", grouped_tiered_config={"foo": "bar"}, - item_id="string", + item_id="item_id", model_type="grouped_tiered", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1074,9 +1092,9 @@ def test_method_create_with_all_params_overload_12(self, client: Orb) -> None: def test_raw_response_create_overload_12(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", + currency="currency", grouped_tiered_config={"foo": "bar"}, - item_id="string", + item_id="item_id", model_type="grouped_tiered", name="Annual fee", ) @@ -1090,9 +1108,9 @@ def test_raw_response_create_overload_12(self, client: Orb) -> None: def test_streaming_response_create_overload_12(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", + currency="currency", grouped_tiered_config={"foo": "bar"}, - item_id="string", + item_id="item_id", model_type="grouped_tiered", name="Annual fee", ) as response: @@ -1108,8 +1126,8 @@ def test_streaming_response_create_overload_12(self, client: Orb) -> None: def test_method_create_overload_13(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_minimum", name="Annual fee", tiered_with_minimum_config={"foo": "bar"}, @@ -1120,17 +1138,17 @@ def test_method_create_overload_13(self, client: Orb) -> None: def test_method_create_with_all_params_overload_13(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_minimum", name="Annual fee", tiered_with_minimum_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1138,8 +1156,8 @@ def test_method_create_with_all_params_overload_13(self, client: Orb) -> None: def test_raw_response_create_overload_13(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_minimum", name="Annual fee", tiered_with_minimum_config={"foo": "bar"}, @@ -1154,8 +1172,8 @@ def test_raw_response_create_overload_13(self, client: Orb) -> None: def test_streaming_response_create_overload_13(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_minimum", name="Annual fee", tiered_with_minimum_config={"foo": "bar"}, @@ -1172,8 +1190,8 @@ def test_streaming_response_create_overload_13(self, client: Orb) -> None: def test_method_create_overload_14(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package_with_allocation", name="Annual fee", package_with_allocation_config={"foo": "bar"}, @@ -1184,17 +1202,17 @@ def test_method_create_overload_14(self, client: Orb) -> None: def test_method_create_with_all_params_overload_14(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package_with_allocation", name="Annual fee", package_with_allocation_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1202,8 +1220,8 @@ def test_method_create_with_all_params_overload_14(self, client: Orb) -> None: def test_raw_response_create_overload_14(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package_with_allocation", name="Annual fee", package_with_allocation_config={"foo": "bar"}, @@ -1218,8 +1236,8 @@ def test_raw_response_create_overload_14(self, client: Orb) -> None: def test_streaming_response_create_overload_14(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package_with_allocation", name="Annual fee", package_with_allocation_config={"foo": "bar"}, @@ -1236,8 +1254,8 @@ def test_streaming_response_create_overload_14(self, client: Orb) -> None: def test_method_create_overload_15(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package_with_minimum", name="Annual fee", tiered_package_with_minimum_config={"foo": "bar"}, @@ -1248,17 +1266,17 @@ def test_method_create_overload_15(self, client: Orb) -> None: def test_method_create_with_all_params_overload_15(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package_with_minimum", name="Annual fee", tiered_package_with_minimum_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1266,8 +1284,8 @@ def test_method_create_with_all_params_overload_15(self, client: Orb) -> None: def test_raw_response_create_overload_15(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package_with_minimum", name="Annual fee", tiered_package_with_minimum_config={"foo": "bar"}, @@ -1282,8 +1300,8 @@ def test_raw_response_create_overload_15(self, client: Orb) -> None: def test_streaming_response_create_overload_15(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package_with_minimum", name="Annual fee", tiered_package_with_minimum_config={"foo": "bar"}, @@ -1300,8 +1318,8 @@ def test_streaming_response_create_overload_15(self, client: Orb) -> None: def test_method_create_overload_16(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_percent", name="Annual fee", unit_with_percent_config={"foo": "bar"}, @@ -1312,17 +1330,17 @@ def test_method_create_overload_16(self, client: Orb) -> None: def test_method_create_with_all_params_overload_16(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_percent", name="Annual fee", unit_with_percent_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1330,8 +1348,8 @@ def test_method_create_with_all_params_overload_16(self, client: Orb) -> None: def test_raw_response_create_overload_16(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_percent", name="Annual fee", unit_with_percent_config={"foo": "bar"}, @@ -1346,8 +1364,8 @@ def test_raw_response_create_overload_16(self, client: Orb) -> None: def test_streaming_response_create_overload_16(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_percent", name="Annual fee", unit_with_percent_config={"foo": "bar"}, @@ -1364,8 +1382,8 @@ def test_streaming_response_create_overload_16(self, client: Orb) -> None: def test_method_create_overload_17(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_proration", name="Annual fee", tiered_with_proration_config={"foo": "bar"}, @@ -1376,17 +1394,17 @@ def test_method_create_overload_17(self, client: Orb) -> None: def test_method_create_with_all_params_overload_17(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_proration", name="Annual fee", tiered_with_proration_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1394,8 +1412,8 @@ def test_method_create_with_all_params_overload_17(self, client: Orb) -> None: def test_raw_response_create_overload_17(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_proration", name="Annual fee", tiered_with_proration_config={"foo": "bar"}, @@ -1410,8 +1428,8 @@ def test_raw_response_create_overload_17(self, client: Orb) -> None: def test_streaming_response_create_overload_17(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_proration", name="Annual fee", tiered_with_proration_config={"foo": "bar"}, @@ -1428,8 +1446,8 @@ def test_streaming_response_create_overload_17(self, client: Orb) -> None: def test_method_create_overload_18(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_proration", name="Annual fee", unit_with_proration_config={"foo": "bar"}, @@ -1440,17 +1458,17 @@ def test_method_create_overload_18(self, client: Orb) -> None: def test_method_create_with_all_params_overload_18(self, client: Orb) -> None: price = client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_proration", name="Annual fee", unit_with_proration_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1458,8 +1476,8 @@ def test_method_create_with_all_params_overload_18(self, client: Orb) -> None: def test_raw_response_create_overload_18(self, client: Orb) -> None: response = client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_proration", name="Annual fee", unit_with_proration_config={"foo": "bar"}, @@ -1474,8 +1492,8 @@ def test_raw_response_create_overload_18(self, client: Orb) -> None: def test_streaming_response_create_overload_18(self, client: Orb) -> None: with client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_proration", name="Annual fee", unit_with_proration_config={"foo": "bar"}, @@ -1496,7 +1514,7 @@ def test_method_list(self, client: Orb) -> None: @parametrize def test_method_list_with_all_params(self, client: Orb) -> None: price = client.prices.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[Price], price, path=["response"]) @@ -1524,7 +1542,7 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_evaluate(self, client: Orb) -> None: price = client.prices.evaluate( - "string", + price_id="price_id", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) @@ -1533,11 +1551,11 @@ def test_method_evaluate(self, client: Orb) -> None: @parametrize def test_method_evaluate_with_all_params(self, client: Orb) -> None: price = client.prices.evaluate( - "string", + price_id="price_id", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), - customer_id="string", - external_customer_id="string", + customer_id="customer_id", + external_customer_id="external_customer_id", filter="my_numeric_property > 100 AND my_other_property = 'bar'", grouping_keys=["case when my_event_type = 'foo' then true else false end"], ) @@ -1546,7 +1564,7 @@ def test_method_evaluate_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_evaluate(self, client: Orb) -> None: response = client.prices.with_raw_response.evaluate( - "string", + price_id="price_id", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) @@ -1559,7 +1577,7 @@ def test_raw_response_evaluate(self, client: Orb) -> None: @parametrize def test_streaming_response_evaluate(self, client: Orb) -> None: with client.prices.with_streaming_response.evaluate( - "string", + price_id="price_id", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) as response: @@ -1575,7 +1593,7 @@ def test_streaming_response_evaluate(self, client: Orb) -> None: def test_path_params_evaluate(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `price_id` but received ''"): client.prices.with_raw_response.evaluate( - "", + price_id="", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) @@ -1583,14 +1601,14 @@ def test_path_params_evaluate(self, client: Orb) -> None: @parametrize def test_method_fetch(self, client: Orb) -> None: price = client.prices.fetch( - "string", + "price_id", ) assert_matches_type(Price, price, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.prices.with_raw_response.fetch( - "string", + "price_id", ) assert response.is_closed is True @@ -1601,7 +1619,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.prices.with_streaming_response.fetch( - "string", + "price_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1626,11 +1644,11 @@ class TestAsyncPrices: async def test_method_create_overload_1(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit", name="Annual fee", - unit_config={"unit_amount": "string"}, + unit_config={"unit_amount": "unit_amount"}, ) assert_matches_type(Price, price, path=["response"]) @@ -1638,17 +1656,17 @@ async def test_method_create_overload_1(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_1(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit", name="Annual fee", - unit_config={"unit_amount": "string"}, - billable_metric_id="string", + unit_config={"unit_amount": "unit_amount"}, + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1656,11 +1674,11 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn async def test_raw_response_create_overload_1(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit", name="Annual fee", - unit_config={"unit_amount": "string"}, + unit_config={"unit_amount": "unit_amount"}, ) assert response.is_closed is True @@ -1672,11 +1690,11 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncOrb) -> N async def test_streaming_response_create_overload_1(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit", name="Annual fee", - unit_config={"unit_amount": "string"}, + unit_config={"unit_amount": "unit_amount"}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1690,12 +1708,12 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncOrb async def test_method_create_overload_2(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package", name="Annual fee", package_config={ - "package_amount": "string", + "package_amount": "package_amount", "package_size": 0, }, ) @@ -1705,20 +1723,20 @@ async def test_method_create_overload_2(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_2(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package", name="Annual fee", package_config={ - "package_amount": "string", + "package_amount": "package_amount", "package_size": 0, }, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1726,12 +1744,12 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn async def test_raw_response_create_overload_2(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package", name="Annual fee", package_config={ - "package_amount": "string", + "package_amount": "package_amount", "package_size": 0, }, ) @@ -1745,12 +1763,12 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncOrb) -> N async def test_streaming_response_create_overload_2(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package", name="Annual fee", package_config={ - "package_amount": "string", + "package_amount": "package_amount", "package_size": 0, }, ) as response: @@ -1766,22 +1784,22 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncOrb async def test_method_create_overload_3(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -1795,34 +1813,34 @@ async def test_method_create_overload_3(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_3(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], }, model_type="matrix", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1830,22 +1848,22 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn async def test_raw_response_create_overload_3(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -1863,22 +1881,22 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncOrb) -> N async def test_streaming_response_create_overload_3(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -1898,22 +1916,22 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncOrb async def test_method_create_overload_4(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_with_allocation_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -1928,22 +1946,22 @@ async def test_method_create_overload_4(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_4(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_with_allocation_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -1951,12 +1969,12 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn }, model_type="matrix_with_allocation", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -1964,22 +1982,22 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn async def test_raw_response_create_overload_4(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_with_allocation_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -1998,22 +2016,22 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncOrb) -> N async def test_streaming_response_create_overload_4(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", matrix_with_allocation_config={ "dimensions": ["string", "string", "string"], - "default_unit_amount": "string", + "default_unit_amount": "default_unit_amount", "matrix_values": [ { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, { - "unit_amount": "string", + "unit_amount": "unit_amount", "dimension_values": ["string", "string", "string"], }, ], @@ -2034,23 +2052,23 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncOrb async def test_method_create_overload_5(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered", name="Annual fee", tiered_config={ "tiers": [ { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, @@ -2061,8 +2079,8 @@ async def test_method_create_overload_5(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_5(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered", name="Annual fee", tiered_config={ @@ -2070,26 +2088,26 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn { "first_unit": 0, "last_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, "last_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, "last_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2097,23 +2115,23 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn async def test_raw_response_create_overload_5(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered", name="Annual fee", tiered_config={ "tiers": [ { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, @@ -2128,23 +2146,23 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncOrb) -> N async def test_streaming_response_create_overload_5(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered", name="Annual fee", tiered_config={ "tiers": [ { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "first_unit": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, @@ -2161,22 +2179,22 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncOrb async def test_method_create_overload_6(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_bps", name="Annual fee", tiered_bps_config={ "tiers": [ { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, ] @@ -2188,38 +2206,38 @@ async def test_method_create_overload_6(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_6(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_bps", name="Annual fee", tiered_bps_config={ "tiers": [ { - "minimum_amount": "string", - "maximum_amount": "string", + "minimum_amount": "minimum_amount", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, { - "minimum_amount": "string", - "maximum_amount": "string", + "minimum_amount": "minimum_amount", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, { - "minimum_amount": "string", - "maximum_amount": "string", + "minimum_amount": "minimum_amount", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, ] }, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2227,22 +2245,22 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn async def test_raw_response_create_overload_6(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_bps", name="Annual fee", tiered_bps_config={ "tiers": [ { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, ] @@ -2258,22 +2276,22 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncOrb) -> N async def test_streaming_response_create_overload_6(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_bps", name="Annual fee", tiered_bps_config={ "tiers": [ { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, { - "minimum_amount": "string", + "minimum_amount": "minimum_amount", "bps": 0, }, ] @@ -2292,8 +2310,8 @@ async def test_method_create_overload_7(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( bps_config={"bps": 0}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bps", name="Annual fee", ) @@ -2304,19 +2322,19 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn price = await async_client.prices.create( bps_config={ "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bps", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2325,8 +2343,8 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncOrb) -> N response = await async_client.prices.with_raw_response.create( bps_config={"bps": 0}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bps", name="Annual fee", ) @@ -2341,8 +2359,8 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncOrb async with async_client.prices.with_streaming_response.create( bps_config={"bps": 0}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bps", name="Annual fee", ) as response: @@ -2359,8 +2377,8 @@ async def test_method_create_overload_8(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( bulk_bps_config={"tiers": [{"bps": 0}, {"bps": 0}, {"bps": 0}]}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk_bps", name="Annual fee", ) @@ -2372,33 +2390,33 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn bulk_bps_config={ "tiers": [ { - "maximum_amount": "string", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, { - "maximum_amount": "string", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, { - "maximum_amount": "string", + "maximum_amount": "maximum_amount", "bps": 0, - "per_unit_maximum": "string", + "per_unit_maximum": "per_unit_maximum", }, ] }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk_bps", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2407,8 +2425,8 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncOrb) -> N response = await async_client.prices.with_raw_response.create( bulk_bps_config={"tiers": [{"bps": 0}, {"bps": 0}, {"bps": 0}]}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk_bps", name="Annual fee", ) @@ -2423,8 +2441,8 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncOrb async with async_client.prices.with_streaming_response.create( bulk_bps_config={"tiers": [{"bps": 0}, {"bps": 0}, {"bps": 0}]}, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk_bps", name="Annual fee", ) as response: @@ -2439,10 +2457,16 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncOrb @parametrize async def test_method_create_overload_9(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( - bulk_config={"tiers": [{"unit_amount": "string"}, {"unit_amount": "string"}, {"unit_amount": "string"}]}, + bulk_config={ + "tiers": [ + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + ] + }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk", name="Annual fee", ) @@ -2455,39 +2479,45 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn "tiers": [ { "maximum_units": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "maximum_units": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, { "maximum_units": 0, - "unit_amount": "string", + "unit_amount": "unit_amount", }, ] }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @parametrize async def test_raw_response_create_overload_9(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( - bulk_config={"tiers": [{"unit_amount": "string"}, {"unit_amount": "string"}, {"unit_amount": "string"}]}, + bulk_config={ + "tiers": [ + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + ] + }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk", name="Annual fee", ) @@ -2500,10 +2530,16 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncOrb) -> N @parametrize async def test_streaming_response_create_overload_9(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( - bulk_config={"tiers": [{"unit_amount": "string"}, {"unit_amount": "string"}, {"unit_amount": "string"}]}, + bulk_config={ + "tiers": [ + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + {"unit_amount": "unit_amount"}, + ] + }, cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="bulk", name="Annual fee", ) as response: @@ -2519,8 +2555,8 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncOrb async def test_method_create_overload_10(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="threshold_total_amount", name="Annual fee", threshold_total_amount_config={"foo": "bar"}, @@ -2531,17 +2567,17 @@ async def test_method_create_overload_10(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_10(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="threshold_total_amount", name="Annual fee", threshold_total_amount_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2549,8 +2585,8 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy async def test_raw_response_create_overload_10(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="threshold_total_amount", name="Annual fee", threshold_total_amount_config={"foo": "bar"}, @@ -2565,8 +2601,8 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncOrb) -> async def test_streaming_response_create_overload_10(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="threshold_total_amount", name="Annual fee", threshold_total_amount_config={"foo": "bar"}, @@ -2583,8 +2619,8 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncOr async def test_method_create_overload_11(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package", name="Annual fee", tiered_package_config={"foo": "bar"}, @@ -2595,17 +2631,17 @@ async def test_method_create_overload_11(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_11(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package", name="Annual fee", tiered_package_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2613,8 +2649,8 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy async def test_raw_response_create_overload_11(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package", name="Annual fee", tiered_package_config={"foo": "bar"}, @@ -2629,8 +2665,8 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncOrb) -> async def test_streaming_response_create_overload_11(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package", name="Annual fee", tiered_package_config={"foo": "bar"}, @@ -2647,9 +2683,9 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncOr async def test_method_create_overload_12(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", + currency="currency", grouped_tiered_config={"foo": "bar"}, - item_id="string", + item_id="item_id", model_type="grouped_tiered", name="Annual fee", ) @@ -2659,17 +2695,17 @@ async def test_method_create_overload_12(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_12(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", + currency="currency", grouped_tiered_config={"foo": "bar"}, - item_id="string", + item_id="item_id", model_type="grouped_tiered", name="Annual fee", - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2677,9 +2713,9 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy async def test_raw_response_create_overload_12(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", + currency="currency", grouped_tiered_config={"foo": "bar"}, - item_id="string", + item_id="item_id", model_type="grouped_tiered", name="Annual fee", ) @@ -2693,9 +2729,9 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncOrb) -> async def test_streaming_response_create_overload_12(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", + currency="currency", grouped_tiered_config={"foo": "bar"}, - item_id="string", + item_id="item_id", model_type="grouped_tiered", name="Annual fee", ) as response: @@ -2711,8 +2747,8 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncOr async def test_method_create_overload_13(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_minimum", name="Annual fee", tiered_with_minimum_config={"foo": "bar"}, @@ -2723,17 +2759,17 @@ async def test_method_create_overload_13(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_13(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_minimum", name="Annual fee", tiered_with_minimum_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2741,8 +2777,8 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy async def test_raw_response_create_overload_13(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_minimum", name="Annual fee", tiered_with_minimum_config={"foo": "bar"}, @@ -2757,8 +2793,8 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncOrb) -> async def test_streaming_response_create_overload_13(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_minimum", name="Annual fee", tiered_with_minimum_config={"foo": "bar"}, @@ -2775,8 +2811,8 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncOr async def test_method_create_overload_14(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package_with_allocation", name="Annual fee", package_with_allocation_config={"foo": "bar"}, @@ -2787,17 +2823,17 @@ async def test_method_create_overload_14(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_14(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package_with_allocation", name="Annual fee", package_with_allocation_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2805,8 +2841,8 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy async def test_raw_response_create_overload_14(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package_with_allocation", name="Annual fee", package_with_allocation_config={"foo": "bar"}, @@ -2821,8 +2857,8 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncOrb) -> async def test_streaming_response_create_overload_14(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="package_with_allocation", name="Annual fee", package_with_allocation_config={"foo": "bar"}, @@ -2839,8 +2875,8 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncOr async def test_method_create_overload_15(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package_with_minimum", name="Annual fee", tiered_package_with_minimum_config={"foo": "bar"}, @@ -2851,17 +2887,17 @@ async def test_method_create_overload_15(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_15(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package_with_minimum", name="Annual fee", tiered_package_with_minimum_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2869,8 +2905,8 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy async def test_raw_response_create_overload_15(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package_with_minimum", name="Annual fee", tiered_package_with_minimum_config={"foo": "bar"}, @@ -2885,8 +2921,8 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncOrb) -> async def test_streaming_response_create_overload_15(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_package_with_minimum", name="Annual fee", tiered_package_with_minimum_config={"foo": "bar"}, @@ -2903,8 +2939,8 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncOr async def test_method_create_overload_16(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_percent", name="Annual fee", unit_with_percent_config={"foo": "bar"}, @@ -2915,17 +2951,17 @@ async def test_method_create_overload_16(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_16(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_percent", name="Annual fee", unit_with_percent_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2933,8 +2969,8 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy async def test_raw_response_create_overload_16(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_percent", name="Annual fee", unit_with_percent_config={"foo": "bar"}, @@ -2949,8 +2985,8 @@ async def test_raw_response_create_overload_16(self, async_client: AsyncOrb) -> async def test_streaming_response_create_overload_16(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_percent", name="Annual fee", unit_with_percent_config={"foo": "bar"}, @@ -2967,8 +3003,8 @@ async def test_streaming_response_create_overload_16(self, async_client: AsyncOr async def test_method_create_overload_17(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_proration", name="Annual fee", tiered_with_proration_config={"foo": "bar"}, @@ -2979,17 +3015,17 @@ async def test_method_create_overload_17(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_17(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_proration", name="Annual fee", tiered_with_proration_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -2997,8 +3033,8 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy async def test_raw_response_create_overload_17(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_proration", name="Annual fee", tiered_with_proration_config={"foo": "bar"}, @@ -3013,8 +3049,8 @@ async def test_raw_response_create_overload_17(self, async_client: AsyncOrb) -> async def test_streaming_response_create_overload_17(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="tiered_with_proration", name="Annual fee", tiered_with_proration_config={"foo": "bar"}, @@ -3031,8 +3067,8 @@ async def test_streaming_response_create_overload_17(self, async_client: AsyncOr async def test_method_create_overload_18(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_proration", name="Annual fee", unit_with_proration_config={"foo": "bar"}, @@ -3043,17 +3079,17 @@ async def test_method_create_overload_18(self, async_client: AsyncOrb) -> None: async def test_method_create_with_all_params_overload_18(self, async_client: AsyncOrb) -> None: price = await async_client.prices.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_proration", name="Annual fee", unit_with_proration_config={"foo": "bar"}, - billable_metric_id="string", + billable_metric_id="billable_metric_id", billed_in_advance=True, conversion_rate=0, - external_price_id="string", + external_price_id="external_price_id", fixed_price_quantity=0, - invoice_grouping_key="string", + invoice_grouping_key="invoice_grouping_key", ) assert_matches_type(Price, price, path=["response"]) @@ -3061,8 +3097,8 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy async def test_raw_response_create_overload_18(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_proration", name="Annual fee", unit_with_proration_config={"foo": "bar"}, @@ -3077,8 +3113,8 @@ async def test_raw_response_create_overload_18(self, async_client: AsyncOrb) -> async def test_streaming_response_create_overload_18(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.create( cadence="annual", - currency="string", - item_id="string", + currency="currency", + item_id="item_id", model_type="unit_with_proration", name="Annual fee", unit_with_proration_config={"foo": "bar"}, @@ -3099,7 +3135,7 @@ async def test_method_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: price = await async_client.prices.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[Price], price, path=["response"]) @@ -3127,7 +3163,7 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_evaluate(self, async_client: AsyncOrb) -> None: price = await async_client.prices.evaluate( - "string", + price_id="price_id", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) @@ -3136,11 +3172,11 @@ async def test_method_evaluate(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_evaluate_with_all_params(self, async_client: AsyncOrb) -> None: price = await async_client.prices.evaluate( - "string", + price_id="price_id", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), - customer_id="string", - external_customer_id="string", + customer_id="customer_id", + external_customer_id="external_customer_id", filter="my_numeric_property > 100 AND my_other_property = 'bar'", grouping_keys=["case when my_event_type = 'foo' then true else false end"], ) @@ -3149,7 +3185,7 @@ async def test_method_evaluate_with_all_params(self, async_client: AsyncOrb) -> @parametrize async def test_raw_response_evaluate(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.evaluate( - "string", + price_id="price_id", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) @@ -3162,7 +3198,7 @@ async def test_raw_response_evaluate(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_evaluate(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.evaluate( - "string", + price_id="price_id", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) as response: @@ -3178,7 +3214,7 @@ async def test_streaming_response_evaluate(self, async_client: AsyncOrb) -> None async def test_path_params_evaluate(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `price_id` but received ''"): await async_client.prices.with_raw_response.evaluate( - "", + price_id="", timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"), timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) @@ -3186,14 +3222,14 @@ async def test_path_params_evaluate(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: price = await async_client.prices.fetch( - "string", + "price_id", ) assert_matches_type(Price, price, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.prices.with_raw_response.fetch( - "string", + "price_id", ) assert response.is_closed is True @@ -3204,7 +3240,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.prices.with_streaming_response.fetch( - "string", + "price_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index 359c89b3..b38be425 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -34,76 +34,76 @@ def test_method_create_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.create( align_billing_with_subscription_start_date=True, auto_collection=True, - aws_region="string", - coupon_redemption_code="string", + aws_region="aws_region", + coupon_redemption_code="coupon_redemption_code", credits_overage_rate=0, - customer_id="string", - default_invoice_memo="string", + customer_id="customer_id", + default_invoice_memo="default_invoice_memo", end_date=parse_datetime("2019-12-27T18:11:19.117Z"), - external_customer_id="string", + external_customer_id="external_customer_id", external_marketplace="google", - external_marketplace_reporting_id="string", + external_marketplace_reporting_id="external_marketplace_reporting_id", external_plan_id="ZMwNQefe7J3ecf7W", initial_phase_order=0, - invoicing_threshold="string", + invoicing_threshold="invoicing_threshold", metadata={"foo": "string"}, net_terms=0, per_credit_overage_amount=0, plan_id="ZMwNQefe7J3ecf7W", price_overrides=[ { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], start_date=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -133,16 +133,16 @@ def test_streaming_response_create(self, client: Orb) -> None: @parametrize def test_method_update(self, client: Orb) -> None: subscription = client.subscriptions.update( - "string", + subscription_id="subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.update( - "string", + subscription_id="subscription_id", auto_collection=True, - default_invoice_memo="string", + default_invoice_memo="default_invoice_memo", invoicing_threshold="10.00", metadata={"foo": "string"}, net_terms=0, @@ -152,7 +152,7 @@ def test_method_update_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_update(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.update( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -163,7 +163,7 @@ def test_raw_response_update(self, client: Orb) -> None: @parametrize def test_streaming_response_update(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.update( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -177,7 +177,7 @@ def test_streaming_response_update(self, client: Orb) -> None: def test_path_params_update(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.update( - "", + subscription_id="", ) @parametrize @@ -192,9 +192,9 @@ def test_method_list_with_all_params(self, client: Orb) -> None: created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", - customer_id="string", - external_customer_id="string", + cursor="cursor", + customer_id="customer_id", + external_customer_id="external_customer_id", limit=1, status="active", ) @@ -223,7 +223,7 @@ def test_streaming_response_list(self, client: Orb) -> None: @parametrize def test_method_cancel(self, client: Orb) -> None: subscription = client.subscriptions.cancel( - "string", + subscription_id="subscription_id", cancel_option="end_of_subscription_term", ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -231,7 +231,7 @@ def test_method_cancel(self, client: Orb) -> None: @parametrize def test_method_cancel_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.cancel( - "string", + subscription_id="subscription_id", cancel_option="end_of_subscription_term", cancellation_date=parse_datetime("2019-12-27T18:11:19.117Z"), ) @@ -240,7 +240,7 @@ def test_method_cancel_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_cancel(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.cancel( - "string", + subscription_id="subscription_id", cancel_option="end_of_subscription_term", ) @@ -252,7 +252,7 @@ def test_raw_response_cancel(self, client: Orb) -> None: @parametrize def test_streaming_response_cancel(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.cancel( - "string", + subscription_id="subscription_id", cancel_option="end_of_subscription_term", ) as response: assert not response.is_closed @@ -267,21 +267,21 @@ def test_streaming_response_cancel(self, client: Orb) -> None: def test_path_params_cancel(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.cancel( - "", + subscription_id="", cancel_option="end_of_subscription_term", ) @parametrize def test_method_fetch(self, client: Orb) -> None: subscription = client.subscriptions.fetch( - "string", + "subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize def test_raw_response_fetch(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.fetch( - "string", + "subscription_id", ) assert response.is_closed is True @@ -292,7 +292,7 @@ def test_raw_response_fetch(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.fetch( - "string", + "subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -312,14 +312,14 @@ def test_path_params_fetch(self, client: Orb) -> None: @parametrize def test_method_fetch_costs(self, client: Orb) -> None: subscription = client.subscriptions.fetch_costs( - "string", + subscription_id="subscription_id", ) assert_matches_type(SubscriptionFetchCostsResponse, subscription, path=["response"]) @parametrize def test_method_fetch_costs_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.fetch_costs( - "string", + subscription_id="subscription_id", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -329,7 +329,7 @@ def test_method_fetch_costs_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_fetch_costs(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.fetch_costs( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -340,7 +340,7 @@ def test_raw_response_fetch_costs(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch_costs(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.fetch_costs( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -354,21 +354,21 @@ def test_streaming_response_fetch_costs(self, client: Orb) -> None: def test_path_params_fetch_costs(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.fetch_costs( - "", + subscription_id="", ) @parametrize def test_method_fetch_schedule(self, client: Orb) -> None: subscription = client.subscriptions.fetch_schedule( - "string", + subscription_id="subscription_id", ) assert_matches_type(SyncPage[SubscriptionFetchScheduleResponse], subscription, path=["response"]) @parametrize def test_method_fetch_schedule_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.fetch_schedule( - "string", - cursor="string", + subscription_id="subscription_id", + cursor="cursor", limit=1, start_date_gt=parse_datetime("2019-12-27T18:11:19.117Z"), start_date_gte=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -380,7 +380,7 @@ def test_method_fetch_schedule_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_fetch_schedule(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.fetch_schedule( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -391,7 +391,7 @@ def test_raw_response_fetch_schedule(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch_schedule(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.fetch_schedule( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -405,14 +405,14 @@ def test_streaming_response_fetch_schedule(self, client: Orb) -> None: def test_path_params_fetch_schedule(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.fetch_schedule( - "", + subscription_id="", ) @pytest.mark.skip(reason="Incorrect example breaks Prism") @parametrize def test_method_fetch_usage(self, client: Orb) -> None: subscription = client.subscriptions.fetch_usage( - "string", + subscription_id="subscription_id", ) assert_matches_type(SubscriptionUsage, subscription, path=["response"]) @@ -420,16 +420,16 @@ def test_method_fetch_usage(self, client: Orb) -> None: @parametrize def test_method_fetch_usage_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.fetch_usage( - "string", - billable_metric_id="string", - cursor="string", - first_dimension_key="string", - first_dimension_value="string", + subscription_id="subscription_id", + billable_metric_id="billable_metric_id", + cursor="cursor", + first_dimension_key="first_dimension_key", + first_dimension_value="first_dimension_value", granularity="day", - group_by="string", + group_by="group_by", limit=0, - second_dimension_key="string", - second_dimension_value="string", + second_dimension_key="second_dimension_key", + second_dimension_value="second_dimension_value", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -440,7 +440,7 @@ def test_method_fetch_usage_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_fetch_usage(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.fetch_usage( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -452,7 +452,7 @@ def test_raw_response_fetch_usage(self, client: Orb) -> None: @parametrize def test_streaming_response_fetch_usage(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.fetch_usage( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -467,14 +467,14 @@ def test_streaming_response_fetch_usage(self, client: Orb) -> None: def test_path_params_fetch_usage(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.fetch_usage( - "", + subscription_id="", ) @pytest.mark.skip(reason="Incorrect example breaks Prism") @parametrize def test_method_price_intervals(self, client: Orb) -> None: subscription = client.subscriptions.price_intervals( - "string", + subscription_id="subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -482,24 +482,24 @@ def test_method_price_intervals(self, client: Orb) -> None: @parametrize def test_method_price_intervals_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.price_intervals( - "string", + subscription_id="subscription_id", add=[ { "price_id": "h74gfhdjvn7ujokd", "external_price_id": "external_price_id", "price": { - "external_price_id": "string", + "external_price_id": "external_price_id", "name": "Annual fee", - "billable_metric_id": "string", - "item_id": "string", + "billable_metric_id": "billable_metric_id", + "item_id": "item_id", "billed_in_advance": True, "fixed_price_quantity": 0, - "invoice_grouping_key": "string", + "invoice_grouping_key": "invoice_grouping_key", "cadence": "annual", "conversion_rate": 0, "model_type": "unit", - "unit_config": {"unit_amount": "string"}, - "currency": "string", + "unit_config": {"unit_amount": "unit_amount"}, + "currency": "currency", }, "allocation_price": { "currency": "USD", @@ -544,18 +544,18 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None: "price_id": "h74gfhdjvn7ujokd", "external_price_id": "external_price_id", "price": { - "external_price_id": "string", + "external_price_id": "external_price_id", "name": "Annual fee", - "billable_metric_id": "string", - "item_id": "string", + "billable_metric_id": "billable_metric_id", + "item_id": "item_id", "billed_in_advance": True, "fixed_price_quantity": 0, - "invoice_grouping_key": "string", + "invoice_grouping_key": "invoice_grouping_key", "cadence": "annual", "conversion_rate": 0, "model_type": "unit", - "unit_config": {"unit_amount": "string"}, - "currency": "string", + "unit_config": {"unit_amount": "unit_amount"}, + "currency": "currency", }, "allocation_price": { "currency": "USD", @@ -600,18 +600,18 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None: "price_id": "h74gfhdjvn7ujokd", "external_price_id": "external_price_id", "price": { - "external_price_id": "string", + "external_price_id": "external_price_id", "name": "Annual fee", - "billable_metric_id": "string", - "item_id": "string", + "billable_metric_id": "billable_metric_id", + "item_id": "item_id", "billed_in_advance": True, "fixed_price_quantity": 0, - "invoice_grouping_key": "string", + "invoice_grouping_key": "invoice_grouping_key", "cadence": "annual", "conversion_rate": 0, "model_type": "unit", - "unit_config": {"unit_amount": "string"}, - "currency": "string", + "unit_config": {"unit_amount": "unit_amount"}, + "currency": "currency", }, "allocation_price": { "currency": "USD", @@ -768,7 +768,7 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_price_intervals(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.price_intervals( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -780,7 +780,7 @@ def test_raw_response_price_intervals(self, client: Orb) -> None: @parametrize def test_streaming_response_price_intervals(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.price_intervals( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -795,13 +795,13 @@ def test_streaming_response_price_intervals(self, client: Orb) -> None: def test_path_params_price_intervals(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.price_intervals( - "", + subscription_id="", ) @parametrize def test_method_schedule_plan_change(self, client: Orb) -> None: subscription = client.subscriptions.schedule_plan_change( - "string", + subscription_id="subscription_id", change_option="requested_date", ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -809,12 +809,12 @@ def test_method_schedule_plan_change(self, client: Orb) -> None: @parametrize def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.schedule_plan_change( - "string", + subscription_id="subscription_id", change_option="requested_date", align_billing_with_plan_change_date=True, billing_cycle_alignment="unchanged", change_date="2017-07-21T17:32:28Z", - coupon_redemption_code="string", + coupon_redemption_code="coupon_redemption_code", credits_overage_rate=0, external_plan_id="ZMwNQefe7J3ecf7W", initial_phase_order=2, @@ -823,58 +823,58 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: plan_id="ZMwNQefe7J3ecf7W", price_overrides=[ { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], ) @@ -883,7 +883,7 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_schedule_plan_change(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.schedule_plan_change( - "string", + subscription_id="subscription_id", change_option="requested_date", ) @@ -895,7 +895,7 @@ def test_raw_response_schedule_plan_change(self, client: Orb) -> None: @parametrize def test_streaming_response_schedule_plan_change(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.schedule_plan_change( - "string", + subscription_id="subscription_id", change_option="requested_date", ) as response: assert not response.is_closed @@ -910,21 +910,21 @@ def test_streaming_response_schedule_plan_change(self, client: Orb) -> None: def test_path_params_schedule_plan_change(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.schedule_plan_change( - "", + subscription_id="", change_option="requested_date", ) @parametrize def test_method_trigger_phase(self, client: Orb) -> None: subscription = client.subscriptions.trigger_phase( - "string", + subscription_id="subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize def test_method_trigger_phase_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.trigger_phase( - "string", + subscription_id="subscription_id", effective_date=parse_date("2019-12-27"), ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -932,7 +932,7 @@ def test_method_trigger_phase_with_all_params(self, client: Orb) -> None: @parametrize def test_raw_response_trigger_phase(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.trigger_phase( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -943,7 +943,7 @@ def test_raw_response_trigger_phase(self, client: Orb) -> None: @parametrize def test_streaming_response_trigger_phase(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.trigger_phase( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -957,20 +957,20 @@ def test_streaming_response_trigger_phase(self, client: Orb) -> None: def test_path_params_trigger_phase(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.trigger_phase( - "", + subscription_id="", ) @parametrize def test_method_unschedule_cancellation(self, client: Orb) -> None: subscription = client.subscriptions.unschedule_cancellation( - "string", + "subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize def test_raw_response_unschedule_cancellation(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.unschedule_cancellation( - "string", + "subscription_id", ) assert response.is_closed is True @@ -981,7 +981,7 @@ def test_raw_response_unschedule_cancellation(self, client: Orb) -> None: @parametrize def test_streaming_response_unschedule_cancellation(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.unschedule_cancellation( - "string", + "subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1001,16 +1001,16 @@ def test_path_params_unschedule_cancellation(self, client: Orb) -> None: @parametrize def test_method_unschedule_fixed_fee_quantity_updates(self, client: Orb) -> None: subscription = client.subscriptions.unschedule_fixed_fee_quantity_updates( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize def test_raw_response_unschedule_fixed_fee_quantity_updates(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.unschedule_fixed_fee_quantity_updates( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", ) assert response.is_closed is True @@ -1021,8 +1021,8 @@ def test_raw_response_unschedule_fixed_fee_quantity_updates(self, client: Orb) - @parametrize def test_streaming_response_unschedule_fixed_fee_quantity_updates(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.unschedule_fixed_fee_quantity_updates( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1036,21 +1036,21 @@ def test_streaming_response_unschedule_fixed_fee_quantity_updates(self, client: def test_path_params_unschedule_fixed_fee_quantity_updates(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.unschedule_fixed_fee_quantity_updates( - "", - price_id="string", + subscription_id="", + price_id="price_id", ) @parametrize def test_method_unschedule_pending_plan_changes(self, client: Orb) -> None: subscription = client.subscriptions.unschedule_pending_plan_changes( - "string", + "subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize def test_raw_response_unschedule_pending_plan_changes(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.unschedule_pending_plan_changes( - "string", + "subscription_id", ) assert response.is_closed is True @@ -1061,7 +1061,7 @@ def test_raw_response_unschedule_pending_plan_changes(self, client: Orb) -> None @parametrize def test_streaming_response_unschedule_pending_plan_changes(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.unschedule_pending_plan_changes( - "string", + "subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1081,8 +1081,8 @@ def test_path_params_unschedule_pending_plan_changes(self, client: Orb) -> None: @parametrize def test_method_update_fixed_fee_quantity(self, client: Orb) -> None: subscription = client.subscriptions.update_fixed_fee_quantity( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", quantity=0, ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -1090,8 +1090,8 @@ def test_method_update_fixed_fee_quantity(self, client: Orb) -> None: @parametrize def test_method_update_fixed_fee_quantity_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.update_fixed_fee_quantity( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", quantity=0, change_option="immediate", effective_date=parse_date("2022-12-21"), @@ -1101,8 +1101,8 @@ def test_method_update_fixed_fee_quantity_with_all_params(self, client: Orb) -> @parametrize def test_raw_response_update_fixed_fee_quantity(self, client: Orb) -> None: response = client.subscriptions.with_raw_response.update_fixed_fee_quantity( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", quantity=0, ) @@ -1114,8 +1114,8 @@ def test_raw_response_update_fixed_fee_quantity(self, client: Orb) -> None: @parametrize def test_streaming_response_update_fixed_fee_quantity(self, client: Orb) -> None: with client.subscriptions.with_streaming_response.update_fixed_fee_quantity( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", quantity=0, ) as response: assert not response.is_closed @@ -1130,8 +1130,8 @@ def test_streaming_response_update_fixed_fee_quantity(self, client: Orb) -> None def test_path_params_update_fixed_fee_quantity(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): client.subscriptions.with_raw_response.update_fixed_fee_quantity( - "", - price_id="string", + subscription_id="", + price_id="price_id", quantity=0, ) @@ -1149,76 +1149,76 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No subscription = await async_client.subscriptions.create( align_billing_with_subscription_start_date=True, auto_collection=True, - aws_region="string", - coupon_redemption_code="string", + aws_region="aws_region", + coupon_redemption_code="coupon_redemption_code", credits_overage_rate=0, - customer_id="string", - default_invoice_memo="string", + customer_id="customer_id", + default_invoice_memo="default_invoice_memo", end_date=parse_datetime("2019-12-27T18:11:19.117Z"), - external_customer_id="string", + external_customer_id="external_customer_id", external_marketplace="google", - external_marketplace_reporting_id="string", + external_marketplace_reporting_id="external_marketplace_reporting_id", external_plan_id="ZMwNQefe7J3ecf7W", initial_phase_order=0, - invoicing_threshold="string", + invoicing_threshold="invoicing_threshold", metadata={"foo": "string"}, net_terms=0, per_credit_overage_amount=0, plan_id="ZMwNQefe7J3ecf7W", price_overrides=[ { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], start_date=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -1248,16 +1248,16 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_update(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.update( - "string", + subscription_id="subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.update( - "string", + subscription_id="subscription_id", auto_collection=True, - default_invoice_memo="string", + default_invoice_memo="default_invoice_memo", invoicing_threshold="10.00", metadata={"foo": "string"}, net_terms=0, @@ -1267,7 +1267,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No @parametrize async def test_raw_response_update(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.update( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -1278,7 +1278,7 @@ async def test_raw_response_update(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.update( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1292,7 +1292,7 @@ async def test_streaming_response_update(self, async_client: AsyncOrb) -> None: async def test_path_params_update(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.update( - "", + subscription_id="", ) @parametrize @@ -1307,9 +1307,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None created_at_gte=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lt=parse_datetime("2019-12-27T18:11:19.117Z"), created_at_lte=parse_datetime("2019-12-27T18:11:19.117Z"), - cursor="string", - customer_id="string", - external_customer_id="string", + cursor="cursor", + customer_id="customer_id", + external_customer_id="external_customer_id", limit=1, status="active", ) @@ -1338,7 +1338,7 @@ async def test_streaming_response_list(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.cancel( - "string", + subscription_id="subscription_id", cancel_option="end_of_subscription_term", ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -1346,7 +1346,7 @@ async def test_method_cancel(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_cancel_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.cancel( - "string", + subscription_id="subscription_id", cancel_option="end_of_subscription_term", cancellation_date=parse_datetime("2019-12-27T18:11:19.117Z"), ) @@ -1355,7 +1355,7 @@ async def test_method_cancel_with_all_params(self, async_client: AsyncOrb) -> No @parametrize async def test_raw_response_cancel(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.cancel( - "string", + subscription_id="subscription_id", cancel_option="end_of_subscription_term", ) @@ -1367,7 +1367,7 @@ async def test_raw_response_cancel(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.cancel( - "string", + subscription_id="subscription_id", cancel_option="end_of_subscription_term", ) as response: assert not response.is_closed @@ -1382,21 +1382,21 @@ async def test_streaming_response_cancel(self, async_client: AsyncOrb) -> None: async def test_path_params_cancel(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.cancel( - "", + subscription_id="", cancel_option="end_of_subscription_term", ) @parametrize async def test_method_fetch(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.fetch( - "string", + "subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.fetch( - "string", + "subscription_id", ) assert response.is_closed is True @@ -1407,7 +1407,7 @@ async def test_raw_response_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.fetch( - "string", + "subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1427,14 +1427,14 @@ async def test_path_params_fetch(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch_costs(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.fetch_costs( - "string", + subscription_id="subscription_id", ) assert_matches_type(SubscriptionFetchCostsResponse, subscription, path=["response"]) @parametrize async def test_method_fetch_costs_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.fetch_costs( - "string", + subscription_id="subscription_id", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -1444,7 +1444,7 @@ async def test_method_fetch_costs_with_all_params(self, async_client: AsyncOrb) @parametrize async def test_raw_response_fetch_costs(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.fetch_costs( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -1455,7 +1455,7 @@ async def test_raw_response_fetch_costs(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch_costs(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.fetch_costs( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1469,21 +1469,21 @@ async def test_streaming_response_fetch_costs(self, async_client: AsyncOrb) -> N async def test_path_params_fetch_costs(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.fetch_costs( - "", + subscription_id="", ) @parametrize async def test_method_fetch_schedule(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.fetch_schedule( - "string", + subscription_id="subscription_id", ) assert_matches_type(AsyncPage[SubscriptionFetchScheduleResponse], subscription, path=["response"]) @parametrize async def test_method_fetch_schedule_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.fetch_schedule( - "string", - cursor="string", + subscription_id="subscription_id", + cursor="cursor", limit=1, start_date_gt=parse_datetime("2019-12-27T18:11:19.117Z"), start_date_gte=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -1495,7 +1495,7 @@ async def test_method_fetch_schedule_with_all_params(self, async_client: AsyncOr @parametrize async def test_raw_response_fetch_schedule(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.fetch_schedule( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -1506,7 +1506,7 @@ async def test_raw_response_fetch_schedule(self, async_client: AsyncOrb) -> None @parametrize async def test_streaming_response_fetch_schedule(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.fetch_schedule( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1520,14 +1520,14 @@ async def test_streaming_response_fetch_schedule(self, async_client: AsyncOrb) - async def test_path_params_fetch_schedule(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.fetch_schedule( - "", + subscription_id="", ) @pytest.mark.skip(reason="Incorrect example breaks Prism") @parametrize async def test_method_fetch_usage(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.fetch_usage( - "string", + subscription_id="subscription_id", ) assert_matches_type(SubscriptionUsage, subscription, path=["response"]) @@ -1535,16 +1535,16 @@ async def test_method_fetch_usage(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_fetch_usage_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.fetch_usage( - "string", - billable_metric_id="string", - cursor="string", - first_dimension_key="string", - first_dimension_value="string", + subscription_id="subscription_id", + billable_metric_id="billable_metric_id", + cursor="cursor", + first_dimension_key="first_dimension_key", + first_dimension_value="first_dimension_value", granularity="day", - group_by="string", + group_by="group_by", limit=0, - second_dimension_key="string", - second_dimension_value="string", + second_dimension_key="second_dimension_key", + second_dimension_value="second_dimension_value", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -1555,7 +1555,7 @@ async def test_method_fetch_usage_with_all_params(self, async_client: AsyncOrb) @parametrize async def test_raw_response_fetch_usage(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.fetch_usage( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -1567,7 +1567,7 @@ async def test_raw_response_fetch_usage(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_fetch_usage(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.fetch_usage( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1582,14 +1582,14 @@ async def test_streaming_response_fetch_usage(self, async_client: AsyncOrb) -> N async def test_path_params_fetch_usage(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.fetch_usage( - "", + subscription_id="", ) @pytest.mark.skip(reason="Incorrect example breaks Prism") @parametrize async def test_method_price_intervals(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.price_intervals( - "string", + subscription_id="subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -1597,24 +1597,24 @@ async def test_method_price_intervals(self, async_client: AsyncOrb) -> None: @parametrize async def test_method_price_intervals_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.price_intervals( - "string", + subscription_id="subscription_id", add=[ { "price_id": "h74gfhdjvn7ujokd", "external_price_id": "external_price_id", "price": { - "external_price_id": "string", + "external_price_id": "external_price_id", "name": "Annual fee", - "billable_metric_id": "string", - "item_id": "string", + "billable_metric_id": "billable_metric_id", + "item_id": "item_id", "billed_in_advance": True, "fixed_price_quantity": 0, - "invoice_grouping_key": "string", + "invoice_grouping_key": "invoice_grouping_key", "cadence": "annual", "conversion_rate": 0, "model_type": "unit", - "unit_config": {"unit_amount": "string"}, - "currency": "string", + "unit_config": {"unit_amount": "unit_amount"}, + "currency": "currency", }, "allocation_price": { "currency": "USD", @@ -1659,18 +1659,18 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO "price_id": "h74gfhdjvn7ujokd", "external_price_id": "external_price_id", "price": { - "external_price_id": "string", + "external_price_id": "external_price_id", "name": "Annual fee", - "billable_metric_id": "string", - "item_id": "string", + "billable_metric_id": "billable_metric_id", + "item_id": "item_id", "billed_in_advance": True, "fixed_price_quantity": 0, - "invoice_grouping_key": "string", + "invoice_grouping_key": "invoice_grouping_key", "cadence": "annual", "conversion_rate": 0, "model_type": "unit", - "unit_config": {"unit_amount": "string"}, - "currency": "string", + "unit_config": {"unit_amount": "unit_amount"}, + "currency": "currency", }, "allocation_price": { "currency": "USD", @@ -1715,18 +1715,18 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO "price_id": "h74gfhdjvn7ujokd", "external_price_id": "external_price_id", "price": { - "external_price_id": "string", + "external_price_id": "external_price_id", "name": "Annual fee", - "billable_metric_id": "string", - "item_id": "string", + "billable_metric_id": "billable_metric_id", + "item_id": "item_id", "billed_in_advance": True, "fixed_price_quantity": 0, - "invoice_grouping_key": "string", + "invoice_grouping_key": "invoice_grouping_key", "cadence": "annual", "conversion_rate": 0, "model_type": "unit", - "unit_config": {"unit_amount": "string"}, - "currency": "string", + "unit_config": {"unit_amount": "unit_amount"}, + "currency": "currency", }, "allocation_price": { "currency": "USD", @@ -1883,7 +1883,7 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO @parametrize async def test_raw_response_price_intervals(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.price_intervals( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -1895,7 +1895,7 @@ async def test_raw_response_price_intervals(self, async_client: AsyncOrb) -> Non @parametrize async def test_streaming_response_price_intervals(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.price_intervals( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1910,13 +1910,13 @@ async def test_streaming_response_price_intervals(self, async_client: AsyncOrb) async def test_path_params_price_intervals(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.price_intervals( - "", + subscription_id="", ) @parametrize async def test_method_schedule_plan_change(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.schedule_plan_change( - "string", + subscription_id="subscription_id", change_option="requested_date", ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -1924,12 +1924,12 @@ async def test_method_schedule_plan_change(self, async_client: AsyncOrb) -> None @parametrize async def test_method_schedule_plan_change_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.schedule_plan_change( - "string", + subscription_id="subscription_id", change_option="requested_date", align_billing_with_plan_change_date=True, billing_cycle_alignment="unchanged", change_date="2017-07-21T17:32:28Z", - coupon_redemption_code="string", + coupon_redemption_code="coupon_redemption_code", credits_overage_rate=0, external_plan_id="ZMwNQefe7J3ecf7W", initial_phase_order=2, @@ -1938,58 +1938,58 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A plan_id="ZMwNQefe7J3ecf7W", price_overrides=[ { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, { - "id": "string", + "id": "id", "model_type": "unit", "minimum_amount": "1.23", "maximum_amount": "1.23", - "currency": "string", + "currency": "currency", "conversion_rate": 0, "discount": { "discount_type": "percentage", "percentage_discount": 0.15, - "trial_amount_discount": "string", + "trial_amount_discount": "trial_amount_discount", "usage_discount": 0, - "amount_discount": "string", + "amount_discount": "amount_discount", "applies_to_price_ids": ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"], }, "fixed_price_quantity": 2, - "unit_config": {"unit_amount": "string"}, + "unit_config": {"unit_amount": "unit_amount"}, }, ], ) @@ -1998,7 +1998,7 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A @parametrize async def test_raw_response_schedule_plan_change(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.schedule_plan_change( - "string", + subscription_id="subscription_id", change_option="requested_date", ) @@ -2010,7 +2010,7 @@ async def test_raw_response_schedule_plan_change(self, async_client: AsyncOrb) - @parametrize async def test_streaming_response_schedule_plan_change(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.schedule_plan_change( - "string", + subscription_id="subscription_id", change_option="requested_date", ) as response: assert not response.is_closed @@ -2025,21 +2025,21 @@ async def test_streaming_response_schedule_plan_change(self, async_client: Async async def test_path_params_schedule_plan_change(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.schedule_plan_change( - "", + subscription_id="", change_option="requested_date", ) @parametrize async def test_method_trigger_phase(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.trigger_phase( - "string", + subscription_id="subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize async def test_method_trigger_phase_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.trigger_phase( - "string", + subscription_id="subscription_id", effective_date=parse_date("2019-12-27"), ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -2047,7 +2047,7 @@ async def test_method_trigger_phase_with_all_params(self, async_client: AsyncOrb @parametrize async def test_raw_response_trigger_phase(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.trigger_phase( - "string", + subscription_id="subscription_id", ) assert response.is_closed is True @@ -2058,7 +2058,7 @@ async def test_raw_response_trigger_phase(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_trigger_phase(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.trigger_phase( - "string", + subscription_id="subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2072,20 +2072,20 @@ async def test_streaming_response_trigger_phase(self, async_client: AsyncOrb) -> async def test_path_params_trigger_phase(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.trigger_phase( - "", + subscription_id="", ) @parametrize async def test_method_unschedule_cancellation(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.unschedule_cancellation( - "string", + "subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize async def test_raw_response_unschedule_cancellation(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.unschedule_cancellation( - "string", + "subscription_id", ) assert response.is_closed is True @@ -2096,7 +2096,7 @@ async def test_raw_response_unschedule_cancellation(self, async_client: AsyncOrb @parametrize async def test_streaming_response_unschedule_cancellation(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.unschedule_cancellation( - "string", + "subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2116,16 +2116,16 @@ async def test_path_params_unschedule_cancellation(self, async_client: AsyncOrb) @parametrize async def test_method_unschedule_fixed_fee_quantity_updates(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.unschedule_fixed_fee_quantity_updates( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize async def test_raw_response_unschedule_fixed_fee_quantity_updates(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.unschedule_fixed_fee_quantity_updates( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", ) assert response.is_closed is True @@ -2136,8 +2136,8 @@ async def test_raw_response_unschedule_fixed_fee_quantity_updates(self, async_cl @parametrize async def test_streaming_response_unschedule_fixed_fee_quantity_updates(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.unschedule_fixed_fee_quantity_updates( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2151,21 +2151,21 @@ async def test_streaming_response_unschedule_fixed_fee_quantity_updates(self, as async def test_path_params_unschedule_fixed_fee_quantity_updates(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.unschedule_fixed_fee_quantity_updates( - "", - price_id="string", + subscription_id="", + price_id="price_id", ) @parametrize async def test_method_unschedule_pending_plan_changes(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.unschedule_pending_plan_changes( - "string", + "subscription_id", ) assert_matches_type(Subscription, subscription, path=["response"]) @parametrize async def test_raw_response_unschedule_pending_plan_changes(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.unschedule_pending_plan_changes( - "string", + "subscription_id", ) assert response.is_closed is True @@ -2176,7 +2176,7 @@ async def test_raw_response_unschedule_pending_plan_changes(self, async_client: @parametrize async def test_streaming_response_unschedule_pending_plan_changes(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.unschedule_pending_plan_changes( - "string", + "subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2196,8 +2196,8 @@ async def test_path_params_unschedule_pending_plan_changes(self, async_client: A @parametrize async def test_method_update_fixed_fee_quantity(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.update_fixed_fee_quantity( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", quantity=0, ) assert_matches_type(Subscription, subscription, path=["response"]) @@ -2205,8 +2205,8 @@ async def test_method_update_fixed_fee_quantity(self, async_client: AsyncOrb) -> @parametrize async def test_method_update_fixed_fee_quantity_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.update_fixed_fee_quantity( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", quantity=0, change_option="immediate", effective_date=parse_date("2022-12-21"), @@ -2216,8 +2216,8 @@ async def test_method_update_fixed_fee_quantity_with_all_params(self, async_clie @parametrize async def test_raw_response_update_fixed_fee_quantity(self, async_client: AsyncOrb) -> None: response = await async_client.subscriptions.with_raw_response.update_fixed_fee_quantity( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", quantity=0, ) @@ -2229,8 +2229,8 @@ async def test_raw_response_update_fixed_fee_quantity(self, async_client: AsyncO @parametrize async def test_streaming_response_update_fixed_fee_quantity(self, async_client: AsyncOrb) -> None: async with async_client.subscriptions.with_streaming_response.update_fixed_fee_quantity( - "string", - price_id="string", + subscription_id="subscription_id", + price_id="price_id", quantity=0, ) as response: assert not response.is_closed @@ -2245,7 +2245,7 @@ async def test_streaming_response_update_fixed_fee_quantity(self, async_client: async def test_path_params_update_fixed_fee_quantity(self, async_client: AsyncOrb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"): await async_client.subscriptions.with_raw_response.update_fixed_fee_quantity( - "", - price_id="string", + subscription_id="", + price_id="price_id", quantity=0, )