Skip to content

Commit

Permalink
feat(client): support passing httpx.URL instances to base_url (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Oct 17, 2023
1 parent 50bd455 commit 802e85e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/modern_treasury/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def __init__(
self,
*,
version: str,
base_url: str,
base_url: str | URL,
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None = DEFAULT_TIMEOUT,
Expand Down Expand Up @@ -739,7 +739,7 @@ def __init__(
self,
*,
version: str,
base_url: str,
base_url: str | URL,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
transport: Transport | None = None,
Expand Down Expand Up @@ -1145,7 +1145,7 @@ def __init__(
self,
*,
version: str,
base_url: str,
base_url: str | URL,
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
Expand Down
10 changes: 5 additions & 5 deletions src/modern_treasury/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
import base64
import asyncio
from typing import Union, Mapping, Optional
from typing import Union, Mapping

import httpx

Expand Down Expand Up @@ -95,7 +95,7 @@ def __init__(
api_key: str | None = None,
organization_id: str | None = None,
webhook_key: str | None = None,
base_url: Optional[str] = None,
base_url: str | httpx.URL | None = None,
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
Expand Down Expand Up @@ -213,7 +213,7 @@ def copy(
api_key: str | None = None,
organization_id: str | None = None,
webhook_key: str | None = None,
base_url: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
http_client: httpx.Client | None = None,
connection_pool_limits: httpx.Limits | None = None,
Expand Down Expand Up @@ -392,7 +392,7 @@ def __init__(
api_key: str | None = None,
organization_id: str | None = None,
webhook_key: str | None = None,
base_url: Optional[str] = None,
base_url: str | httpx.URL | None = None,
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
Expand Down Expand Up @@ -510,7 +510,7 @@ def copy(
api_key: str | None = None,
organization_id: str | None = None,
webhook_key: str | None = None,
base_url: str | None = None,
base_url: str | httpx.URL | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
http_client: httpx.AsyncClient | None = None,
connection_pool_limits: httpx.Limits | None = None,
Expand Down

0 comments on commit 802e85e

Please sign in to comment.