checkout-intents 0.3.2__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. checkout_intents-0.3.3/.release-please-manifest.json +3 -0
  2. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/CHANGELOG.md +15 -0
  3. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/PKG-INFO +5 -2
  4. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/README.md +4 -1
  5. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/pyproject.toml +9 -7
  6. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/requirements.lock +16 -15
  7. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_base_client.py +8 -2
  8. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_client.py +105 -30
  9. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_types.py +3 -2
  10. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_version.py +1 -1
  11. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/uv.lock +1 -1
  12. checkout_intents-0.3.2/.release-please-manifest.json +0 -3
  13. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/.gitignore +0 -0
  14. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/CONTRIBUTING.md +0 -0
  15. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/LICENSE +0 -0
  16. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/SECURITY.md +0 -0
  17. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/api.md +0 -0
  18. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/bin/check-release-environment +0 -0
  19. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/bin/publish-pypi +0 -0
  20. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/examples/.keep +0 -0
  21. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/examples/complete-checkout-intent.py +0 -0
  22. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/examples/error-handling.py +0 -0
  23. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/noxfile.py +0 -0
  24. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/release-please-config.json +0 -0
  25. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/requirements-dev.lock +0 -0
  26. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/__init__.py +0 -0
  27. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_compat.py +0 -0
  28. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_constants.py +0 -0
  29. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_exceptions.py +0 -0
  30. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_files.py +0 -0
  31. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_models.py +0 -0
  32. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_qs.py +0 -0
  33. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_resource.py +0 -0
  34. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_response.py +0 -0
  35. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_streaming.py +0 -0
  36. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/__init__.py +0 -0
  37. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_compat.py +0 -0
  38. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_datetime_parse.py +0 -0
  39. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_logs.py +0 -0
  40. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_proxy.py +0 -0
  41. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_reflection.py +0 -0
  42. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_resources_proxy.py +0 -0
  43. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_streams.py +0 -0
  44. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_sync.py +0 -0
  45. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_transform.py +0 -0
  46. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_typing.py +0 -0
  47. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/_utils/_utils.py +0 -0
  48. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/lib/.keep +0 -0
  49. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/pagination.py +0 -0
  50. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/py.typed +0 -0
  51. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/resources/__init__.py +0 -0
  52. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/resources/brands.py +0 -0
  53. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/resources/checkout_intents.py +0 -0
  54. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/__init__.py +0 -0
  55. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/base_checkout_intent.py +0 -0
  56. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/brand_retrieve_response.py +0 -0
  57. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/buyer.py +0 -0
  58. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/buyer_param.py +0 -0
  59. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/checkout_intent.py +0 -0
  60. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/checkout_intent_add_payment_params.py +0 -0
  61. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/checkout_intent_confirm_params.py +0 -0
  62. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/checkout_intent_create_params.py +0 -0
  63. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/checkout_intent_list_params.py +0 -0
  64. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/money.py +0 -0
  65. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/offer.py +0 -0
  66. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/payment_method.py +0 -0
  67. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/payment_method_param.py +0 -0
  68. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/variant_selection.py +0 -0
  69. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/src/checkout_intents/types/variant_selection_param.py +0 -0
  70. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/__init__.py +0 -0
  71. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/api_resources/__init__.py +0 -0
  72. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/api_resources/test_brands.py +0 -0
  73. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/api_resources/test_checkout_intents.py +0 -0
  74. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/conftest.py +0 -0
  75. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/sample_file.txt +0 -0
  76. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_client.py +0 -0
  77. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_deepcopy.py +0 -0
  78. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_environment_inference.py +0 -0
  79. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_extract_files.py +0 -0
  80. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_files.py +0 -0
  81. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_models.py +0 -0
  82. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_polling.py +0 -0
  83. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_qs.py +0 -0
  84. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_required_args.py +0 -0
  85. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_response.py +0 -0
  86. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_streaming.py +0 -0
  87. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_transform.py +0 -0
  88. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_utils/test_datetime_parse.py +0 -0
  89. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_utils/test_proxy.py +0 -0
  90. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/test_utils/test_typing.py +0 -0
  91. {checkout_intents-0.3.2 → checkout_intents-0.3.3}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.3.3"
3
+ }
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.3 (2025-12-17)
4
+
5
+ Full Changelog: [v0.3.2...v0.3.3](https://github.com/rye-com/checkout-intents-python/compare/v0.3.2...v0.3.3)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **types:** allow pyright to infer TypedDict types within SequenceNotStr ([1567425](https://github.com/rye-com/checkout-intents-python/commit/156742587303ed71cd6bd48cac88b289aa7b066a))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **docs:** use environment variables for authentication in code snippets ([1786fcf](https://github.com/rye-com/checkout-intents-python/commit/1786fcf0791f227d91a07e3aad06a302d16aa8e0))
15
+ * **internal:** add missing files argument to base client ([3af52aa](https://github.com/rye-com/checkout-intents-python/commit/3af52aa804ed204b5aeab65b996956448a2f0225))
16
+ * update lockfile ([3695089](https://github.com/rye-com/checkout-intents-python/commit/3695089432c17c48ebd52580651c023e75c44b8d))
17
+
3
18
  ## 0.3.2 (2025-11-28)
4
19
 
5
20
  Full Changelog: [v0.3.1...v0.3.2](https://github.com/rye-com/checkout-intents-python/compare/v0.3.1...v0.3.2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: checkout-intents
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: The official Python library for the Checkout Intents API
5
5
  Project-URL: Homepage, https://github.com/rye-com/checkout-intents-python
6
6
  Project-URL: Repository, https://github.com/rye-com/checkout-intents-python
@@ -236,6 +236,7 @@ pip install checkout-intents[aiohttp]
236
236
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
237
237
 
238
238
  ```python
239
+ import os
239
240
  import asyncio
240
241
  from checkout_intents import DefaultAioHttpClient
241
242
  from checkout_intents import AsyncCheckoutIntents
@@ -243,7 +244,9 @@ from checkout_intents import AsyncCheckoutIntents
243
244
 
244
245
  async def main() -> None:
245
246
  async with AsyncCheckoutIntents(
246
- api_key="My API Key",
247
+ api_key=os.environ.get(
248
+ "CHECKOUT_INTENTS_API_KEY"
249
+ ), # This is the default and can be omitted
247
250
  http_client=DefaultAioHttpClient(),
248
251
  ) as client:
249
252
  checkout_intent = await client.checkout_intents.create(
@@ -201,6 +201,7 @@ pip install checkout-intents[aiohttp]
201
201
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
202
202
 
203
203
  ```python
204
+ import os
204
205
  import asyncio
205
206
  from checkout_intents import DefaultAioHttpClient
206
207
  from checkout_intents import AsyncCheckoutIntents
@@ -208,7 +209,9 @@ from checkout_intents import AsyncCheckoutIntents
208
209
 
209
210
  async def main() -> None:
210
211
  async with AsyncCheckoutIntents(
211
- api_key="My API Key",
212
+ api_key=os.environ.get(
213
+ "CHECKOUT_INTENTS_API_KEY"
214
+ ), # This is the default and can be omitted
212
215
  http_client=DefaultAioHttpClient(),
213
216
  ) as client:
214
217
  checkout_intent = await client.checkout_intents.create(
@@ -1,20 +1,22 @@
1
1
  [project]
2
2
  name = "checkout-intents"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "The official Python library for the Checkout Intents API"
5
5
  dynamic = ["readme"]
6
6
  license = "MIT"
7
7
  authors = [
8
8
  { name = "Checkout Intents", email = "dev@rye.com" },
9
9
  ]
10
+
10
11
  dependencies = [
11
- "httpx>=0.23.0, <1",
12
- "pydantic>=1.9.0, <3",
13
- "typing-extensions>=4.10, <5",
14
- "anyio>=3.5.0, <5",
15
- "distro>=1.7.0, <2",
16
- "sniffio",
12
+ "httpx>=0.23.0, <1",
13
+ "pydantic>=1.9.0, <3",
14
+ "typing-extensions>=4.10, <5",
15
+ "anyio>=3.5.0, <5",
16
+ "distro>=1.7.0, <2",
17
+ "sniffio",
17
18
  ]
19
+
18
20
  requires-python = ">= 3.9"
19
21
  classifiers = [
20
22
  "Typing :: Typed",
@@ -12,28 +12,28 @@
12
12
  -e file:.
13
13
  aiohappyeyeballs==2.6.1
14
14
  # via aiohttp
15
- aiohttp==3.12.8
15
+ aiohttp==3.13.2
16
16
  # via checkout-intents
17
17
  # via httpx-aiohttp
18
- aiosignal==1.3.2
18
+ aiosignal==1.4.0
19
19
  # via aiohttp
20
- annotated-types==0.6.0
20
+ annotated-types==0.7.0
21
21
  # via pydantic
22
- anyio==4.4.0
22
+ anyio==4.12.0
23
23
  # via checkout-intents
24
24
  # via httpx
25
25
  async-timeout==5.0.1
26
26
  # via aiohttp
27
- attrs==25.3.0
27
+ attrs==25.4.0
28
28
  # via aiohttp
29
- certifi==2023.7.22
29
+ certifi==2025.11.12
30
30
  # via httpcore
31
31
  # via httpx
32
- distro==1.8.0
32
+ distro==1.9.0
33
33
  # via checkout-intents
34
- exceptiongroup==1.2.2
34
+ exceptiongroup==1.3.1
35
35
  # via anyio
36
- frozenlist==1.6.2
36
+ frozenlist==1.8.0
37
37
  # via aiohttp
38
38
  # via aiosignal
39
39
  h11==0.16.0
@@ -45,31 +45,32 @@ httpx==0.28.1
45
45
  # via httpx-aiohttp
46
46
  httpx-aiohttp==0.1.9
47
47
  # via checkout-intents
48
- idna==3.4
48
+ idna==3.11
49
49
  # via anyio
50
50
  # via httpx
51
51
  # via yarl
52
- multidict==6.4.4
52
+ multidict==6.7.0
53
53
  # via aiohttp
54
54
  # via yarl
55
- propcache==0.3.1
55
+ propcache==0.4.1
56
56
  # via aiohttp
57
57
  # via yarl
58
58
  pydantic==2.12.5
59
59
  # via checkout-intents
60
60
  pydantic-core==2.41.5
61
61
  # via pydantic
62
- sniffio==1.3.0
63
- # via anyio
62
+ sniffio==1.3.1
64
63
  # via checkout-intents
65
64
  typing-extensions==4.15.0
65
+ # via aiosignal
66
66
  # via anyio
67
67
  # via checkout-intents
68
+ # via exceptiongroup
68
69
  # via multidict
69
70
  # via pydantic
70
71
  # via pydantic-core
71
72
  # via typing-inspection
72
73
  typing-inspection==0.4.2
73
74
  # via pydantic
74
- yarl==1.20.0
75
+ yarl==1.22.0
75
76
  # via aiohttp
@@ -1247,9 +1247,12 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
1247
1247
  *,
1248
1248
  cast_to: Type[ResponseT],
1249
1249
  body: Body | None = None,
1250
+ files: RequestFiles | None = None,
1250
1251
  options: RequestOptions = {},
1251
1252
  ) -> ResponseT:
1252
- opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
1253
+ opts = FinalRequestOptions.construct(
1254
+ method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
1255
+ )
1253
1256
  return self.request(cast_to, opts)
1254
1257
 
1255
1258
  def put(
@@ -1767,9 +1770,12 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1767
1770
  *,
1768
1771
  cast_to: Type[ResponseT],
1769
1772
  body: Body | None = None,
1773
+ files: RequestFiles | None = None,
1770
1774
  options: RequestOptions = {},
1771
1775
  ) -> ResponseT:
1772
- opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
1776
+ opts = FinalRequestOptions.construct(
1777
+ method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
1778
+ )
1773
1779
  return await self.request(cast_to, opts)
1774
1780
 
1775
1781
  async def put(
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import os
6
- from typing import Any, Dict, Mapping, cast
6
+ from typing import TYPE_CHECKING, Any, Dict, Mapping, cast
7
7
  from typing_extensions import Self, Literal, override
8
8
 
9
9
  import httpx
@@ -20,8 +20,8 @@ from ._types import (
20
20
  not_given,
21
21
  )
22
22
  from ._utils import is_given, get_async_library
23
+ from ._compat import cached_property
23
24
  from ._version import __version__
24
- from .resources import brands, checkout_intents
25
25
  from ._streaming import Stream as Stream, AsyncStream as AsyncStream
26
26
  from ._exceptions import APIStatusError, CheckoutIntentsError
27
27
  from ._base_client import (
@@ -30,6 +30,11 @@ from ._base_client import (
30
30
  AsyncAPIClient,
31
31
  )
32
32
 
33
+ if TYPE_CHECKING:
34
+ from .resources import brands, checkout_intents
35
+ from .resources.brands import BrandsResource, AsyncBrandsResource
36
+ from .resources.checkout_intents import CheckoutIntentsResource, AsyncCheckoutIntentsResource
37
+
33
38
  __all__ = [
34
39
  "ENVIRONMENTS",
35
40
  "Timeout",
@@ -66,11 +71,6 @@ def _extract_environment_from_api_key(api_key: str) -> Literal["staging", "produ
66
71
 
67
72
 
68
73
  class CheckoutIntents(SyncAPIClient):
69
- checkout_intents: checkout_intents.CheckoutIntentsResource
70
- brands: brands.BrandsResource
71
- with_raw_response: CheckoutIntentsWithRawResponse
72
- with_streaming_response: CheckoutIntentsWithStreamedResponse
73
-
74
74
  # client options
75
75
  api_key: str
76
76
 
@@ -166,10 +166,25 @@ class CheckoutIntents(SyncAPIClient):
166
166
  _strict_response_validation=_strict_response_validation,
167
167
  )
168
168
 
169
- self.checkout_intents = checkout_intents.CheckoutIntentsResource(self)
170
- self.brands = brands.BrandsResource(self)
171
- self.with_raw_response = CheckoutIntentsWithRawResponse(self)
172
- self.with_streaming_response = CheckoutIntentsWithStreamedResponse(self)
169
+ @cached_property
170
+ def checkout_intents(self) -> CheckoutIntentsResource:
171
+ from .resources.checkout_intents import CheckoutIntentsResource
172
+
173
+ return CheckoutIntentsResource(self)
174
+
175
+ @cached_property
176
+ def brands(self) -> BrandsResource:
177
+ from .resources.brands import BrandsResource
178
+
179
+ return BrandsResource(self)
180
+
181
+ @cached_property
182
+ def with_raw_response(self) -> CheckoutIntentsWithRawResponse:
183
+ return CheckoutIntentsWithRawResponse(self)
184
+
185
+ @cached_property
186
+ def with_streaming_response(self) -> CheckoutIntentsWithStreamedResponse:
187
+ return CheckoutIntentsWithStreamedResponse(self)
173
188
 
174
189
  @property
175
190
  @override
@@ -279,11 +294,6 @@ class CheckoutIntents(SyncAPIClient):
279
294
 
280
295
 
281
296
  class AsyncCheckoutIntents(AsyncAPIClient):
282
- checkout_intents: checkout_intents.AsyncCheckoutIntentsResource
283
- brands: brands.AsyncBrandsResource
284
- with_raw_response: AsyncCheckoutIntentsWithRawResponse
285
- with_streaming_response: AsyncCheckoutIntentsWithStreamedResponse
286
-
287
297
  # client options
288
298
  api_key: str
289
299
 
@@ -379,10 +389,25 @@ class AsyncCheckoutIntents(AsyncAPIClient):
379
389
  _strict_response_validation=_strict_response_validation,
380
390
  )
381
391
 
382
- self.checkout_intents = checkout_intents.AsyncCheckoutIntentsResource(self)
383
- self.brands = brands.AsyncBrandsResource(self)
384
- self.with_raw_response = AsyncCheckoutIntentsWithRawResponse(self)
385
- self.with_streaming_response = AsyncCheckoutIntentsWithStreamedResponse(self)
392
+ @cached_property
393
+ def checkout_intents(self) -> AsyncCheckoutIntentsResource:
394
+ from .resources.checkout_intents import AsyncCheckoutIntentsResource
395
+
396
+ return AsyncCheckoutIntentsResource(self)
397
+
398
+ @cached_property
399
+ def brands(self) -> AsyncBrandsResource:
400
+ from .resources.brands import AsyncBrandsResource
401
+
402
+ return AsyncBrandsResource(self)
403
+
404
+ @cached_property
405
+ def with_raw_response(self) -> AsyncCheckoutIntentsWithRawResponse:
406
+ return AsyncCheckoutIntentsWithRawResponse(self)
407
+
408
+ @cached_property
409
+ def with_streaming_response(self) -> AsyncCheckoutIntentsWithStreamedResponse:
410
+ return AsyncCheckoutIntentsWithStreamedResponse(self)
386
411
 
387
412
  @property
388
413
  @override
@@ -492,29 +517,79 @@ class AsyncCheckoutIntents(AsyncAPIClient):
492
517
 
493
518
 
494
519
  class CheckoutIntentsWithRawResponse:
520
+ _client: CheckoutIntents
521
+
495
522
  def __init__(self, client: CheckoutIntents) -> None:
496
- self.checkout_intents = checkout_intents.CheckoutIntentsResourceWithRawResponse(client.checkout_intents)
497
- self.brands = brands.BrandsResourceWithRawResponse(client.brands)
523
+ self._client = client
524
+
525
+ @cached_property
526
+ def checkout_intents(self) -> checkout_intents.CheckoutIntentsResourceWithRawResponse:
527
+ from .resources.checkout_intents import CheckoutIntentsResourceWithRawResponse
528
+
529
+ return CheckoutIntentsResourceWithRawResponse(self._client.checkout_intents)
530
+
531
+ @cached_property
532
+ def brands(self) -> brands.BrandsResourceWithRawResponse:
533
+ from .resources.brands import BrandsResourceWithRawResponse
534
+
535
+ return BrandsResourceWithRawResponse(self._client.brands)
498
536
 
499
537
 
500
538
  class AsyncCheckoutIntentsWithRawResponse:
539
+ _client: AsyncCheckoutIntents
540
+
501
541
  def __init__(self, client: AsyncCheckoutIntents) -> None:
502
- self.checkout_intents = checkout_intents.AsyncCheckoutIntentsResourceWithRawResponse(client.checkout_intents)
503
- self.brands = brands.AsyncBrandsResourceWithRawResponse(client.brands)
542
+ self._client = client
543
+
544
+ @cached_property
545
+ def checkout_intents(self) -> checkout_intents.AsyncCheckoutIntentsResourceWithRawResponse:
546
+ from .resources.checkout_intents import AsyncCheckoutIntentsResourceWithRawResponse
547
+
548
+ return AsyncCheckoutIntentsResourceWithRawResponse(self._client.checkout_intents)
549
+
550
+ @cached_property
551
+ def brands(self) -> brands.AsyncBrandsResourceWithRawResponse:
552
+ from .resources.brands import AsyncBrandsResourceWithRawResponse
553
+
554
+ return AsyncBrandsResourceWithRawResponse(self._client.brands)
504
555
 
505
556
 
506
557
  class CheckoutIntentsWithStreamedResponse:
558
+ _client: CheckoutIntents
559
+
507
560
  def __init__(self, client: CheckoutIntents) -> None:
508
- self.checkout_intents = checkout_intents.CheckoutIntentsResourceWithStreamingResponse(client.checkout_intents)
509
- self.brands = brands.BrandsResourceWithStreamingResponse(client.brands)
561
+ self._client = client
562
+
563
+ @cached_property
564
+ def checkout_intents(self) -> checkout_intents.CheckoutIntentsResourceWithStreamingResponse:
565
+ from .resources.checkout_intents import CheckoutIntentsResourceWithStreamingResponse
566
+
567
+ return CheckoutIntentsResourceWithStreamingResponse(self._client.checkout_intents)
568
+
569
+ @cached_property
570
+ def brands(self) -> brands.BrandsResourceWithStreamingResponse:
571
+ from .resources.brands import BrandsResourceWithStreamingResponse
572
+
573
+ return BrandsResourceWithStreamingResponse(self._client.brands)
510
574
 
511
575
 
512
576
  class AsyncCheckoutIntentsWithStreamedResponse:
577
+ _client: AsyncCheckoutIntents
578
+
513
579
  def __init__(self, client: AsyncCheckoutIntents) -> None:
514
- self.checkout_intents = checkout_intents.AsyncCheckoutIntentsResourceWithStreamingResponse(
515
- client.checkout_intents
516
- )
517
- self.brands = brands.AsyncBrandsResourceWithStreamingResponse(client.brands)
580
+ self._client = client
581
+
582
+ @cached_property
583
+ def checkout_intents(self) -> checkout_intents.AsyncCheckoutIntentsResourceWithStreamingResponse:
584
+ from .resources.checkout_intents import AsyncCheckoutIntentsResourceWithStreamingResponse
585
+
586
+ return AsyncCheckoutIntentsResourceWithStreamingResponse(self._client.checkout_intents)
587
+
588
+ @cached_property
589
+ def brands(self) -> brands.AsyncBrandsResourceWithStreamingResponse:
590
+ from .resources.brands import AsyncBrandsResourceWithStreamingResponse
591
+
592
+ return AsyncBrandsResourceWithStreamingResponse(self._client.brands)
518
593
 
519
594
 
520
595
  Client = CheckoutIntents
@@ -243,6 +243,9 @@ _T_co = TypeVar("_T_co", covariant=True)
243
243
  if TYPE_CHECKING:
244
244
  # This works because str.__contains__ does not accept object (either in typeshed or at runtime)
245
245
  # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
246
+ #
247
+ # Note: index() and count() methods are intentionally omitted to allow pyright to properly
248
+ # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
246
249
  class SequenceNotStr(Protocol[_T_co]):
247
250
  @overload
248
251
  def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
@@ -251,8 +254,6 @@ if TYPE_CHECKING:
251
254
  def __contains__(self, value: object, /) -> bool: ...
252
255
  def __len__(self) -> int: ...
253
256
  def __iter__(self) -> Iterator[_T_co]: ...
254
- def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
255
- def count(self, value: Any, /) -> int: ...
256
257
  def __reversed__(self) -> Iterator[_T_co]: ...
257
258
  else:
258
259
  # just point this to a normal `Sequence` at runtime to avoid having to special case
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "checkout_intents"
4
- __version__ = "0.3.2" # x-release-please-version
4
+ __version__ = "0.3.3" # x-release-please-version
@@ -236,7 +236,7 @@ wheels = [
236
236
 
237
237
  [[package]]
238
238
  name = "checkout-intents"
239
- version = "0.3.1"
239
+ version = "0.3.2"
240
240
  source = { editable = "." }
241
241
  dependencies = [
242
242
  { name = "anyio" },
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.3.2"
3
- }