Skip to content
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 @@
{
".": "3.18.1"
".": "3.18.2"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-95a3d7780935a38e0cf076d4ad2d68bd1a5641bced8398d972db2e92751d364a.yml
openapi_spec_hash: 9ebe818c4ad4f2d9c4e473b5192d7544
config_hash: 3dc5bc1df028fc7301fb2ada9846f038
config_hash: 54edf41f0377bc235f622fdaa7405f22
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 3.18.2 (2025-04-07)

Full Changelog: [v3.18.1...v3.18.2](https://github.com/orbcorp/orb-python/compare/v3.18.1...v3.18.2)

### Bug Fixes

* **api:** naming for sync_payment_methods methods ([#612](https://github.com/orbcorp/orb-python/issues/612)) ([48d1f64](https://github.com/orbcorp/orb-python/commit/48d1f64569419343f34cc10e14da8b8f98ea368a))


### Chores

* **internal:** remove trailing character ([#610](https://github.com/orbcorp/orb-python/issues/610)) ([28aac34](https://github.com/orbcorp/orb-python/commit/28aac34bfbb0778e153a70fbac727a508e839a8c))

## 3.18.1 (2025-04-02)

Full Changelog: [v3.18.0...v3.18.1](https://github.com/orbcorp/orb-python/compare/v3.18.0...v3.18.1)
Expand Down
4 changes: 2 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ Methods:
- <code title="delete /customers/{customer_id}">client.customers.<a href="./src/orb/resources/customers/customers.py">delete</a>(customer_id) -> None</code>
- <code title="get /customers/{customer_id}">client.customers.<a href="./src/orb/resources/customers/customers.py">fetch</a>(customer_id) -> <a href="./src/orb/types/customer.py">Customer</a></code>
- <code title="get /customers/external_customer_id/{external_customer_id}">client.customers.<a href="./src/orb/resources/customers/customers.py">fetch_by_external_id</a>(external_customer_id) -> <a href="./src/orb/types/customer.py">Customer</a></code>
- <code title="post /customers/external_customer_id/{external_customer_id}/sync_payment_methods_from_gateway">client.customers.<a href="./src/orb/resources/customers/customers.py">sync_payment_methods_from_gateway</a>(external_customer_id) -> None</code>
- <code title="post /customers/{customer_id}/sync_payment_methods_from_gateway">client.customers.<a href="./src/orb/resources/customers/customers.py">sync_payment_methods_from_gateway_by_external_customer_id</a>(customer_id) -> None</code>
- <code title="post /customers/{customer_id}/sync_payment_methods_from_gateway">client.customers.<a href="./src/orb/resources/customers/customers.py">sync_payment_methods_from_gateway</a>(customer_id) -> None</code>
- <code title="post /customers/external_customer_id/{external_customer_id}/sync_payment_methods_from_gateway">client.customers.<a href="./src/orb/resources/customers/customers.py">sync_payment_methods_from_gateway_by_external_customer_id</a>(external_customer_id) -> None</code>
- <code title="put /customers/external_customer_id/{external_customer_id}">client.customers.<a href="./src/orb/resources/customers/customers.py">update_by_external_id</a>(id, \*\*<a href="src/orb/types/customer_update_by_external_id_params.py">params</a>) -> <a href="./src/orb/types/customer.py">Customer</a></code>

## Costs
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 = "3.18.1"
version = "3.18.2"
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__ = "3.18.1" # x-release-please-version
__version__ = "3.18.2" # x-release-please-version
40 changes: 20 additions & 20 deletions src/orb/resources/customers/customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def fetch_by_external_id(

def sync_payment_methods_from_gateway(
self,
external_customer_id: str,
customer_id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -771,13 +771,11 @@ def sync_payment_methods_from_gateway(

idempotency_key: Specify a custom idempotency key for this request
"""
if not external_customer_id:
raise ValueError(
f"Expected a non-empty value for `external_customer_id` but received {external_customer_id!r}"
)
if not customer_id:
raise ValueError(f"Expected a non-empty value for `customer_id` but received {customer_id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return self._post(
f"/customers/external_customer_id/{external_customer_id}/sync_payment_methods_from_gateway",
f"/customers/{customer_id}/sync_payment_methods_from_gateway",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand All @@ -790,7 +788,7 @@ def sync_payment_methods_from_gateway(

def sync_payment_methods_from_gateway_by_external_customer_id(
self,
customer_id: str,
external_customer_id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -819,11 +817,13 @@ def sync_payment_methods_from_gateway_by_external_customer_id(

idempotency_key: Specify a custom idempotency key for this request
"""
if not customer_id:
raise ValueError(f"Expected a non-empty value for `customer_id` but received {customer_id!r}")
if not external_customer_id:
raise ValueError(
f"Expected a non-empty value for `external_customer_id` but received {external_customer_id!r}"
)
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return self._post(
f"/customers/{customer_id}/sync_payment_methods_from_gateway",
f"/customers/external_customer_id/{external_customer_id}/sync_payment_methods_from_gateway",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down Expand Up @@ -1748,7 +1748,7 @@ async def fetch_by_external_id(

async def sync_payment_methods_from_gateway(
self,
external_customer_id: str,
customer_id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -1777,13 +1777,11 @@ async def sync_payment_methods_from_gateway(

idempotency_key: Specify a custom idempotency key for this request
"""
if not external_customer_id:
raise ValueError(
f"Expected a non-empty value for `external_customer_id` but received {external_customer_id!r}"
)
if not customer_id:
raise ValueError(f"Expected a non-empty value for `customer_id` but received {customer_id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return await self._post(
f"/customers/external_customer_id/{external_customer_id}/sync_payment_methods_from_gateway",
f"/customers/{customer_id}/sync_payment_methods_from_gateway",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand All @@ -1796,7 +1794,7 @@ async def sync_payment_methods_from_gateway(

async def sync_payment_methods_from_gateway_by_external_customer_id(
self,
customer_id: str,
external_customer_id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -1825,11 +1823,13 @@ async def sync_payment_methods_from_gateway_by_external_customer_id(

idempotency_key: Specify a custom idempotency key for this request
"""
if not customer_id:
raise ValueError(f"Expected a non-empty value for `customer_id` but received {customer_id!r}")
if not external_customer_id:
raise ValueError(
f"Expected a non-empty value for `external_customer_id` but received {external_customer_id!r}"
)
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return await self._post(
f"/customers/{customer_id}/sync_payment_methods_from_gateway",
f"/customers/external_customer_id/{external_customer_id}/sync_payment_methods_from_gateway",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down
32 changes: 16 additions & 16 deletions tests/api_resources/test_customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,14 @@ def test_path_params_fetch_by_external_id(self, client: Orb) -> None:
@parametrize
def test_method_sync_payment_methods_from_gateway(self, client: Orb) -> None:
customer = client.customers.sync_payment_methods_from_gateway(
"external_customer_id",
"customer_id",
)
assert customer is None

@parametrize
def test_raw_response_sync_payment_methods_from_gateway(self, client: Orb) -> None:
response = client.customers.with_raw_response.sync_payment_methods_from_gateway(
"external_customer_id",
"customer_id",
)

assert response.is_closed is True
Expand All @@ -379,7 +379,7 @@ def test_raw_response_sync_payment_methods_from_gateway(self, client: Orb) -> No
@parametrize
def test_streaming_response_sync_payment_methods_from_gateway(self, client: Orb) -> None:
with client.customers.with_streaming_response.sync_payment_methods_from_gateway(
"external_customer_id",
"customer_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -391,22 +391,22 @@ def test_streaming_response_sync_payment_methods_from_gateway(self, client: Orb)

@parametrize
def test_path_params_sync_payment_methods_from_gateway(self, client: Orb) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"):
with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"):
client.customers.with_raw_response.sync_payment_methods_from_gateway(
"",
)

@parametrize
def test_method_sync_payment_methods_from_gateway_by_external_customer_id(self, client: Orb) -> None:
customer = client.customers.sync_payment_methods_from_gateway_by_external_customer_id(
"customer_id",
"external_customer_id",
)
assert customer is None

@parametrize
def test_raw_response_sync_payment_methods_from_gateway_by_external_customer_id(self, client: Orb) -> None:
response = client.customers.with_raw_response.sync_payment_methods_from_gateway_by_external_customer_id(
"customer_id",
"external_customer_id",
)

assert response.is_closed is True
Expand All @@ -417,7 +417,7 @@ def test_raw_response_sync_payment_methods_from_gateway_by_external_customer_id(
@parametrize
def test_streaming_response_sync_payment_methods_from_gateway_by_external_customer_id(self, client: Orb) -> None:
with client.customers.with_streaming_response.sync_payment_methods_from_gateway_by_external_customer_id(
"customer_id",
"external_customer_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -429,7 +429,7 @@ def test_streaming_response_sync_payment_methods_from_gateway_by_external_custom

@parametrize
def test_path_params_sync_payment_methods_from_gateway_by_external_customer_id(self, client: Orb) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"):
with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"):
client.customers.with_raw_response.sync_payment_methods_from_gateway_by_external_customer_id(
"",
)
Expand Down Expand Up @@ -873,14 +873,14 @@ async def test_path_params_fetch_by_external_id(self, async_client: AsyncOrb) ->
@parametrize
async def test_method_sync_payment_methods_from_gateway(self, async_client: AsyncOrb) -> None:
customer = await async_client.customers.sync_payment_methods_from_gateway(
"external_customer_id",
"customer_id",
)
assert customer is None

@parametrize
async def test_raw_response_sync_payment_methods_from_gateway(self, async_client: AsyncOrb) -> None:
response = await async_client.customers.with_raw_response.sync_payment_methods_from_gateway(
"external_customer_id",
"customer_id",
)

assert response.is_closed is True
Expand All @@ -891,7 +891,7 @@ async def test_raw_response_sync_payment_methods_from_gateway(self, async_client
@parametrize
async def test_streaming_response_sync_payment_methods_from_gateway(self, async_client: AsyncOrb) -> None:
async with async_client.customers.with_streaming_response.sync_payment_methods_from_gateway(
"external_customer_id",
"customer_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -903,7 +903,7 @@ async def test_streaming_response_sync_payment_methods_from_gateway(self, async_

@parametrize
async def test_path_params_sync_payment_methods_from_gateway(self, async_client: AsyncOrb) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"):
with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"):
await async_client.customers.with_raw_response.sync_payment_methods_from_gateway(
"",
)
Expand All @@ -913,7 +913,7 @@ async def test_method_sync_payment_methods_from_gateway_by_external_customer_id(
self, async_client: AsyncOrb
) -> None:
customer = await async_client.customers.sync_payment_methods_from_gateway_by_external_customer_id(
"customer_id",
"external_customer_id",
)
assert customer is None

Expand All @@ -923,7 +923,7 @@ async def test_raw_response_sync_payment_methods_from_gateway_by_external_custom
) -> None:
response = (
await async_client.customers.with_raw_response.sync_payment_methods_from_gateway_by_external_customer_id(
"customer_id",
"external_customer_id",
)
)

Expand All @@ -938,7 +938,7 @@ async def test_streaming_response_sync_payment_methods_from_gateway_by_external_
) -> None:
async with (
async_client.customers.with_streaming_response.sync_payment_methods_from_gateway_by_external_customer_id(
"customer_id",
"external_customer_id",
)
) as response:
assert not response.is_closed
Expand All @@ -953,7 +953,7 @@ async def test_streaming_response_sync_payment_methods_from_gateway_by_external_
async def test_path_params_sync_payment_methods_from_gateway_by_external_customer_id(
self, async_client: AsyncOrb
) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"):
with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_customer_id` but received ''"):
await async_client.customers.with_raw_response.sync_payment_methods_from_gateway_by_external_customer_id(
"",
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,7 @@ def test_get_platform(self) -> None:
import threading

from orb._utils import asyncify
from orb._base_client import get_platform
from orb._base_client import get_platform

async def test_main() -> None:
result = await asyncify(get_platform)()
Expand Down