Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 2.9.0 #363

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.8.0"
".": "2.9.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 93
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-f7a9ce053743cf34e86ef2a3fec65b24f39847fd7e09c89a61e8fe222ac33e01.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-af2e129bdcee200185e3fb82837268c03686680beafec3e04b3b17ba32782b48.yml
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.9.0 (2024-08-23)

Full Changelog: [v2.8.0...v2.9.0](https://github.com/orbcorp/orb-python/compare/v2.8.0...v2.9.0)

### Features

* **api:** OpenAPI spec update via Stainless API ([#362](https://github.com/orbcorp/orb-python/issues/362)) ([b32c5c4](https://github.com/orbcorp/orb-python/commit/b32c5c421b709cc364f9efef136e2c4873bcb1c6))

## 2.8.0 (2024-08-22)

Full Changelog: [v2.7.0...v2.8.0](https://github.com/orbcorp/orb-python/compare/v2.7.0...v2.8.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "orb-billing"
version = "2.8.0"
version = "2.9.0"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/orb/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "orb"
__version__ = "2.8.0" # x-release-please-version
__version__ = "2.9.0" # x-release-please-version
16 changes: 8 additions & 8 deletions tests/api_resources/test_customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ class TestCustomers:
def test_method_create(self, client: Orb) -> None:
customer = client.customers.create(
email="email",
name="name",
name="x",
)
assert_matches_type(Customer, customer, path=["response"])

@parametrize
def test_method_create_with_all_params(self, client: Orb) -> None:
customer = client.customers.create(
email="email",
name="name",
name="x",
accounting_sync_configuration={
"accounting_providers": [
{
Expand Down Expand Up @@ -89,7 +89,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
def test_raw_response_create(self, client: Orb) -> None:
response = client.customers.with_raw_response.create(
email="email",
name="name",
name="x",
)

assert response.is_closed is True
Expand All @@ -101,7 +101,7 @@ def test_raw_response_create(self, client: Orb) -> None:
def test_streaming_response_create(self, client: Orb) -> None:
with client.customers.with_streaming_response.create(
email="email",
name="name",
name="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -459,15 +459,15 @@ class TestAsyncCustomers:
async def test_method_create(self, async_client: AsyncOrb) -> None:
customer = await async_client.customers.create(
email="email",
name="name",
name="x",
)
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="email",
name="name",
name="x",
accounting_sync_configuration={
"accounting_providers": [
{
Expand Down Expand Up @@ -523,7 +523,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.customers.with_raw_response.create(
email="email",
name="name",
name="x",
)

assert response.is_closed is True
Expand All @@ -535,7 +535,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.customers.with_streaming_response.create(
email="email",
name="name",
name="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down
160 changes: 8 additions & 152 deletions tests/api_resources/test_invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,7 @@ def test_method_create(self, client: Orb) -> None:
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
}
],
net_terms=0,
)
Expand All @@ -74,25 +56,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
}
],
net_terms=0,
customer_id="4khy3nwzktxv7",
Expand Down Expand Up @@ -123,25 +87,7 @@ def test_raw_response_create(self, client: Orb) -> None:
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
}
],
net_terms=0,
)
Expand All @@ -165,25 +111,7 @@ def test_streaming_response_create(self, client: Orb) -> None:
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
}
],
net_terms=0,
) as response:
Expand Down Expand Up @@ -507,25 +435,7 @@ async def test_method_create(self, async_client: AsyncOrb) -> None:
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
}
],
net_terms=0,
)
Expand All @@ -545,25 +455,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
}
],
net_terms=0,
customer_id="4khy3nwzktxv7",
Expand Down Expand Up @@ -594,25 +486,7 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None:
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
}
],
net_terms=0,
)
Expand All @@ -636,25 +510,7 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None:
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
{
"end_date": parse_date("2023-09-22"),
"item_id": "4khy3nwzktxv7",
"model_type": "unit",
"name": "Line Item Name",
"quantity": 1,
"start_date": parse_date("2023-09-22"),
"unit_config": {"unit_amount": "unit_amount"},
},
}
],
net_terms=0,
) as response:
Expand Down
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:

respx_mock.post("/customers").mock(side_effect=retry_handler)

response = client.customers.with_raw_response.create(email="email", name="name")
response = client.customers.with_raw_response.create(email="email", name="x")

assert response.retries_taken == failures_before_success

Expand All @@ -789,7 +789,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:

respx_mock.post("/customers").mock(side_effect=retry_handler)

with client.customers.with_streaming_response.create(email="email", name="name") as response:
with client.customers.with_streaming_response.create(email="email", name="x") as response:
assert response.retries_taken == failures_before_success


Expand Down Expand Up @@ -1531,7 +1531,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:

respx_mock.post("/customers").mock(side_effect=retry_handler)

response = await client.customers.with_raw_response.create(email="email", name="name")
response = await client.customers.with_raw_response.create(email="email", name="x")

assert response.retries_taken == failures_before_success

Expand All @@ -1555,5 +1555,5 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:

respx_mock.post("/customers").mock(side_effect=retry_handler)

async with client.customers.with_streaming_response.create(email="email", name="name") as response:
async with client.customers.with_streaming_response.create(email="email", name="x") as response:
assert response.retries_taken == failures_before_success