gmt-python-sdk 0.18.0__tar.gz → 0.19.0__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.
- gmt_python_sdk-0.19.0/.release-please-manifest.json +3 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/CHANGELOG.md +8 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/PKG-INFO +1 -1
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/api.md +1 -3
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/pyproject.toml +1 -1
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_version.py +1 -1
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/resources/purchases/bulk.py +1 -164
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchase_create_response.py +1 -1
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchase_list_response.py +1 -1
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchase_refund_response.py +1 -1
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchase_request_verification_code_response.py +1 -1
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchase_retrieve_response.py +1 -1
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchases/__init__.py +0 -1
- gmt_python_sdk-0.19.0/tests/api_resources/purchases/test_bulk.py +118 -0
- gmt_python_sdk-0.18.0/.release-please-manifest.json +0 -3
- gmt_python_sdk-0.18.0/src/gmt/types/purchases/bulk_retrieve_response.py +0 -76
- gmt_python_sdk-0.18.0/tests/api_resources/purchases/test_bulk.py +0 -286
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/.gitignore +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/CONTRIBUTING.md +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/LICENSE +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/README.md +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/SECURITY.md +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/bin/check-release-environment +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/bin/publish-pypi +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/examples/.keep +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/release-please-config.json +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/requirements-dev.lock +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/__init__.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_base_client.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_client.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_compat.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_constants.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_exceptions.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_files.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_models.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_qs.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_resource.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_streaming.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_types.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/__init__.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_compat.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_datetime_parse.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_json.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_logs.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_proxy.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_reflection.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_resources_proxy.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_streams.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_sync.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_transform.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_typing.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/_utils/_utils.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/lib/.keep +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/pagination.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/py.typed +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/resources/__init__.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/resources/accounts.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/resources/profile.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/resources/purchases/__init__.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/resources/purchases/purchases.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/resources/service.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/resources/webhooks.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/__init__.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/account_list_countries_params.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/account_list_countries_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/account_list_params.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/account_list_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/account_retrieve_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_change_login_params.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_change_login_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_change_password_params.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_change_password_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_retrieve_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_unbind_telegram_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchase_create_params.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchase_list_params.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchase_request_verification_code_params.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchases/bulk_create_params.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchases/bulk_create_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/service_get_server_time_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/service_health_check_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/webhook_test_params.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/webhook_test_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/__init__.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/api_resources/__init__.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/api_resources/purchases/__init__.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/api_resources/test_accounts.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/api_resources/test_profile.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/api_resources/test_purchases.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/api_resources/test_service.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/api_resources/test_webhooks.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/conftest.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/sample_file.txt +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_client.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_deepcopy.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_extract_files.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_files.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_models.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_qs.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_required_args.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_response.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_streaming.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_transform.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_utils/test_json.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_utils/test_proxy.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/test_utils/test_typing.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/tests/utils.py +0 -0
- {gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/uv.lock +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.19.0 (2026-02-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.18.0...v0.19.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.18.0...v0.19.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([f640b10](https://github.com/cameo6/gmt-python-sdk/commit/f640b10ae0f31e7c9e853c9ad272ea3ef4a99286))
|
|
10
|
+
|
|
3
11
|
## 0.18.0 (2026-02-10)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.17.0...v0.18.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.17.0...v0.18.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: gmt-python-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.19.0
|
|
4
4
|
Summary: The official Python library for the gmt API
|
|
5
5
|
Project-URL: Homepage, https://github.com/cameo6/gmt-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/cameo6/gmt-python-sdk
|
|
@@ -72,14 +72,12 @@ Methods:
|
|
|
72
72
|
Types:
|
|
73
73
|
|
|
74
74
|
```python
|
|
75
|
-
from gmt.types.purchases import BulkCreateResponse
|
|
75
|
+
from gmt.types.purchases import BulkCreateResponse
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
Methods:
|
|
79
79
|
|
|
80
80
|
- <code title="post /v1/purchases/bulk">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">create</a>(\*\*<a href="src/gmt/types/purchases/bulk_create_params.py">params</a>) -> <a href="./src/gmt/types/purchases/bulk_create_response.py">BulkCreateResponse</a></code>
|
|
81
|
-
- <code title="get /v1/purchases/bulk/{purchaseId}">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">retrieve</a>(purchase_id) -> <a href="./src/gmt/types/purchases/bulk_retrieve_response.py">BulkRetrieveResponse</a></code>
|
|
82
|
-
- <code title="get /v1/purchases/bulk/{purchaseId}/download">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">download</a>(purchase_id) -> None</code>
|
|
83
81
|
|
|
84
82
|
# Webhooks
|
|
85
83
|
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
-
from ..._types import Body, Omit, Query, Headers,
|
|
7
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
8
8
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
9
9
|
from ..._compat import cached_property
|
|
10
10
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -17,7 +17,6 @@ from ..._response import (
|
|
|
17
17
|
from ..._base_client import make_request_options
|
|
18
18
|
from ...types.purchases import bulk_create_params
|
|
19
19
|
from ...types.purchases.bulk_create_response import BulkCreateResponse
|
|
20
|
-
from ...types.purchases.bulk_retrieve_response import BulkRetrieveResponse
|
|
21
20
|
|
|
22
21
|
__all__ = ["BulkResource", "AsyncBulkResource"]
|
|
23
22
|
|
|
@@ -108,75 +107,6 @@ class BulkResource(SyncAPIResource):
|
|
|
108
107
|
cast_to=BulkCreateResponse,
|
|
109
108
|
)
|
|
110
109
|
|
|
111
|
-
def retrieve(
|
|
112
|
-
self,
|
|
113
|
-
purchase_id: str,
|
|
114
|
-
*,
|
|
115
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
116
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
117
|
-
extra_headers: Headers | None = None,
|
|
118
|
-
extra_query: Query | None = None,
|
|
119
|
-
extra_body: Body | None = None,
|
|
120
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
121
|
-
) -> BulkRetrieveResponse:
|
|
122
|
-
"""
|
|
123
|
-
Returns the status of a bulk purchase, including details and link to download
|
|
124
|
-
archive.
|
|
125
|
-
|
|
126
|
-
Args:
|
|
127
|
-
extra_headers: Send extra headers
|
|
128
|
-
|
|
129
|
-
extra_query: Add additional query parameters to the request
|
|
130
|
-
|
|
131
|
-
extra_body: Add additional JSON properties to the request
|
|
132
|
-
|
|
133
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
134
|
-
"""
|
|
135
|
-
if not purchase_id:
|
|
136
|
-
raise ValueError(f"Expected a non-empty value for `purchase_id` but received {purchase_id!r}")
|
|
137
|
-
return self._get(
|
|
138
|
-
f"/v1/purchases/bulk/{purchase_id}",
|
|
139
|
-
options=make_request_options(
|
|
140
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
141
|
-
),
|
|
142
|
-
cast_to=BulkRetrieveResponse,
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
def download(
|
|
146
|
-
self,
|
|
147
|
-
purchase_id: str,
|
|
148
|
-
*,
|
|
149
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
150
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
151
|
-
extra_headers: Headers | None = None,
|
|
152
|
-
extra_query: Query | None = None,
|
|
153
|
-
extra_body: Body | None = None,
|
|
154
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
155
|
-
) -> None:
|
|
156
|
-
"""
|
|
157
|
-
Download the archive file containing multiple accounts from a successful bulk
|
|
158
|
-
purchase
|
|
159
|
-
|
|
160
|
-
Args:
|
|
161
|
-
extra_headers: Send extra headers
|
|
162
|
-
|
|
163
|
-
extra_query: Add additional query parameters to the request
|
|
164
|
-
|
|
165
|
-
extra_body: Add additional JSON properties to the request
|
|
166
|
-
|
|
167
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
168
|
-
"""
|
|
169
|
-
if not purchase_id:
|
|
170
|
-
raise ValueError(f"Expected a non-empty value for `purchase_id` but received {purchase_id!r}")
|
|
171
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
172
|
-
return self._get(
|
|
173
|
-
f"/v1/purchases/bulk/{purchase_id}/download",
|
|
174
|
-
options=make_request_options(
|
|
175
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
176
|
-
),
|
|
177
|
-
cast_to=NoneType,
|
|
178
|
-
)
|
|
179
|
-
|
|
180
110
|
|
|
181
111
|
class AsyncBulkResource(AsyncAPIResource):
|
|
182
112
|
@cached_property
|
|
@@ -264,75 +194,6 @@ class AsyncBulkResource(AsyncAPIResource):
|
|
|
264
194
|
cast_to=BulkCreateResponse,
|
|
265
195
|
)
|
|
266
196
|
|
|
267
|
-
async def retrieve(
|
|
268
|
-
self,
|
|
269
|
-
purchase_id: str,
|
|
270
|
-
*,
|
|
271
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
272
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
273
|
-
extra_headers: Headers | None = None,
|
|
274
|
-
extra_query: Query | None = None,
|
|
275
|
-
extra_body: Body | None = None,
|
|
276
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
277
|
-
) -> BulkRetrieveResponse:
|
|
278
|
-
"""
|
|
279
|
-
Returns the status of a bulk purchase, including details and link to download
|
|
280
|
-
archive.
|
|
281
|
-
|
|
282
|
-
Args:
|
|
283
|
-
extra_headers: Send extra headers
|
|
284
|
-
|
|
285
|
-
extra_query: Add additional query parameters to the request
|
|
286
|
-
|
|
287
|
-
extra_body: Add additional JSON properties to the request
|
|
288
|
-
|
|
289
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
290
|
-
"""
|
|
291
|
-
if not purchase_id:
|
|
292
|
-
raise ValueError(f"Expected a non-empty value for `purchase_id` but received {purchase_id!r}")
|
|
293
|
-
return await self._get(
|
|
294
|
-
f"/v1/purchases/bulk/{purchase_id}",
|
|
295
|
-
options=make_request_options(
|
|
296
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
297
|
-
),
|
|
298
|
-
cast_to=BulkRetrieveResponse,
|
|
299
|
-
)
|
|
300
|
-
|
|
301
|
-
async def download(
|
|
302
|
-
self,
|
|
303
|
-
purchase_id: str,
|
|
304
|
-
*,
|
|
305
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
306
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
307
|
-
extra_headers: Headers | None = None,
|
|
308
|
-
extra_query: Query | None = None,
|
|
309
|
-
extra_body: Body | None = None,
|
|
310
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
311
|
-
) -> None:
|
|
312
|
-
"""
|
|
313
|
-
Download the archive file containing multiple accounts from a successful bulk
|
|
314
|
-
purchase
|
|
315
|
-
|
|
316
|
-
Args:
|
|
317
|
-
extra_headers: Send extra headers
|
|
318
|
-
|
|
319
|
-
extra_query: Add additional query parameters to the request
|
|
320
|
-
|
|
321
|
-
extra_body: Add additional JSON properties to the request
|
|
322
|
-
|
|
323
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
324
|
-
"""
|
|
325
|
-
if not purchase_id:
|
|
326
|
-
raise ValueError(f"Expected a non-empty value for `purchase_id` but received {purchase_id!r}")
|
|
327
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
328
|
-
return await self._get(
|
|
329
|
-
f"/v1/purchases/bulk/{purchase_id}/download",
|
|
330
|
-
options=make_request_options(
|
|
331
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
332
|
-
),
|
|
333
|
-
cast_to=NoneType,
|
|
334
|
-
)
|
|
335
|
-
|
|
336
197
|
|
|
337
198
|
class BulkResourceWithRawResponse:
|
|
338
199
|
def __init__(self, bulk: BulkResource) -> None:
|
|
@@ -341,12 +202,6 @@ class BulkResourceWithRawResponse:
|
|
|
341
202
|
self.create = to_raw_response_wrapper(
|
|
342
203
|
bulk.create,
|
|
343
204
|
)
|
|
344
|
-
self.retrieve = to_raw_response_wrapper(
|
|
345
|
-
bulk.retrieve,
|
|
346
|
-
)
|
|
347
|
-
self.download = to_raw_response_wrapper(
|
|
348
|
-
bulk.download,
|
|
349
|
-
)
|
|
350
205
|
|
|
351
206
|
|
|
352
207
|
class AsyncBulkResourceWithRawResponse:
|
|
@@ -356,12 +211,6 @@ class AsyncBulkResourceWithRawResponse:
|
|
|
356
211
|
self.create = async_to_raw_response_wrapper(
|
|
357
212
|
bulk.create,
|
|
358
213
|
)
|
|
359
|
-
self.retrieve = async_to_raw_response_wrapper(
|
|
360
|
-
bulk.retrieve,
|
|
361
|
-
)
|
|
362
|
-
self.download = async_to_raw_response_wrapper(
|
|
363
|
-
bulk.download,
|
|
364
|
-
)
|
|
365
214
|
|
|
366
215
|
|
|
367
216
|
class BulkResourceWithStreamingResponse:
|
|
@@ -371,12 +220,6 @@ class BulkResourceWithStreamingResponse:
|
|
|
371
220
|
self.create = to_streamed_response_wrapper(
|
|
372
221
|
bulk.create,
|
|
373
222
|
)
|
|
374
|
-
self.retrieve = to_streamed_response_wrapper(
|
|
375
|
-
bulk.retrieve,
|
|
376
|
-
)
|
|
377
|
-
self.download = to_streamed_response_wrapper(
|
|
378
|
-
bulk.download,
|
|
379
|
-
)
|
|
380
223
|
|
|
381
224
|
|
|
382
225
|
class AsyncBulkResourceWithStreamingResponse:
|
|
@@ -386,9 +229,3 @@ class AsyncBulkResourceWithStreamingResponse:
|
|
|
386
229
|
self.create = async_to_streamed_response_wrapper(
|
|
387
230
|
bulk.create,
|
|
388
231
|
)
|
|
389
|
-
self.retrieve = async_to_streamed_response_wrapper(
|
|
390
|
-
bulk.retrieve,
|
|
391
|
-
)
|
|
392
|
-
self.download = async_to_streamed_response_wrapper(
|
|
393
|
-
bulk.download,
|
|
394
|
-
)
|
|
@@ -74,7 +74,7 @@ class PurchaseCreateResponse(BaseModel):
|
|
|
74
74
|
|
|
75
75
|
display_name: DisplayName
|
|
76
76
|
|
|
77
|
-
phone_number: str
|
|
77
|
+
phone_number: Optional[str] = None
|
|
78
78
|
"""
|
|
79
79
|
**E.164 International Format.** Phone number with country code prefix (e.g.,
|
|
80
80
|
`+12025550123` for US, `+79991234567` for Russia).
|
|
@@ -74,7 +74,7 @@ class PurchaseListResponse(BaseModel):
|
|
|
74
74
|
|
|
75
75
|
display_name: DisplayName
|
|
76
76
|
|
|
77
|
-
phone_number: str
|
|
77
|
+
phone_number: Optional[str] = None
|
|
78
78
|
"""
|
|
79
79
|
**E.164 International Format.** Phone number with country code prefix (e.g.,
|
|
80
80
|
`+12025550123` for US, `+79991234567` for Russia).
|
|
@@ -82,7 +82,7 @@ class Purchase(BaseModel):
|
|
|
82
82
|
|
|
83
83
|
display_name: PurchaseDisplayName
|
|
84
84
|
|
|
85
|
-
phone_number: str
|
|
85
|
+
phone_number: Optional[str] = None
|
|
86
86
|
"""
|
|
87
87
|
**E.164 International Format.** Phone number with country code prefix (e.g.,
|
|
88
88
|
`+12025550123` for US, `+79991234567` for Russia).
|
|
@@ -98,7 +98,7 @@ class Purchase(BaseModel):
|
|
|
98
98
|
|
|
99
99
|
display_name: PurchaseDisplayName
|
|
100
100
|
|
|
101
|
-
phone_number: str
|
|
101
|
+
phone_number: Optional[str] = None
|
|
102
102
|
"""
|
|
103
103
|
**E.164 International Format.** Phone number with country code prefix (e.g.,
|
|
104
104
|
`+12025550123` for US, `+79991234567` for Russia).
|
|
@@ -74,7 +74,7 @@ class PurchaseRetrieveResponse(BaseModel):
|
|
|
74
74
|
|
|
75
75
|
display_name: DisplayName
|
|
76
76
|
|
|
77
|
-
phone_number: str
|
|
77
|
+
phone_number: Optional[str] = None
|
|
78
78
|
"""
|
|
79
79
|
**E.164 International Format.** Phone number with country code prefix (e.g.,
|
|
80
80
|
`+12025550123` for US, `+79991234567` for Russia).
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
from typing import Any, cast
|
|
7
|
+
|
|
8
|
+
import pytest
|
|
9
|
+
|
|
10
|
+
from gmt import Gmt, AsyncGmt
|
|
11
|
+
from tests.utils import assert_matches_type
|
|
12
|
+
from gmt.types.purchases import BulkCreateResponse
|
|
13
|
+
|
|
14
|
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class TestBulk:
|
|
18
|
+
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
|
|
19
|
+
|
|
20
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
21
|
+
@parametrize
|
|
22
|
+
def test_method_create(self, client: Gmt) -> None:
|
|
23
|
+
bulk = client.purchases.bulk.create(
|
|
24
|
+
country_code="US",
|
|
25
|
+
quantity=10,
|
|
26
|
+
)
|
|
27
|
+
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
28
|
+
|
|
29
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
30
|
+
@parametrize
|
|
31
|
+
def test_method_create_with_all_params(self, client: Gmt) -> None:
|
|
32
|
+
bulk = client.purchases.bulk.create(
|
|
33
|
+
country_code="US",
|
|
34
|
+
quantity=10,
|
|
35
|
+
callback_url="https://example.com/webhooks/code-received",
|
|
36
|
+
)
|
|
37
|
+
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
38
|
+
|
|
39
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
40
|
+
@parametrize
|
|
41
|
+
def test_raw_response_create(self, client: Gmt) -> None:
|
|
42
|
+
response = client.purchases.bulk.with_raw_response.create(
|
|
43
|
+
country_code="US",
|
|
44
|
+
quantity=10,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
assert response.is_closed is True
|
|
48
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
49
|
+
bulk = response.parse()
|
|
50
|
+
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
51
|
+
|
|
52
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
53
|
+
@parametrize
|
|
54
|
+
def test_streaming_response_create(self, client: Gmt) -> None:
|
|
55
|
+
with client.purchases.bulk.with_streaming_response.create(
|
|
56
|
+
country_code="US",
|
|
57
|
+
quantity=10,
|
|
58
|
+
) as response:
|
|
59
|
+
assert not response.is_closed
|
|
60
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
61
|
+
|
|
62
|
+
bulk = response.parse()
|
|
63
|
+
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
64
|
+
|
|
65
|
+
assert cast(Any, response.is_closed) is True
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class TestAsyncBulk:
|
|
69
|
+
parametrize = pytest.mark.parametrize(
|
|
70
|
+
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
74
|
+
@parametrize
|
|
75
|
+
async def test_method_create(self, async_client: AsyncGmt) -> None:
|
|
76
|
+
bulk = await async_client.purchases.bulk.create(
|
|
77
|
+
country_code="US",
|
|
78
|
+
quantity=10,
|
|
79
|
+
)
|
|
80
|
+
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
81
|
+
|
|
82
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
83
|
+
@parametrize
|
|
84
|
+
async def test_method_create_with_all_params(self, async_client: AsyncGmt) -> None:
|
|
85
|
+
bulk = await async_client.purchases.bulk.create(
|
|
86
|
+
country_code="US",
|
|
87
|
+
quantity=10,
|
|
88
|
+
callback_url="https://example.com/webhooks/code-received",
|
|
89
|
+
)
|
|
90
|
+
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
91
|
+
|
|
92
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
93
|
+
@parametrize
|
|
94
|
+
async def test_raw_response_create(self, async_client: AsyncGmt) -> None:
|
|
95
|
+
response = await async_client.purchases.bulk.with_raw_response.create(
|
|
96
|
+
country_code="US",
|
|
97
|
+
quantity=10,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
assert response.is_closed is True
|
|
101
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
102
|
+
bulk = await response.parse()
|
|
103
|
+
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
104
|
+
|
|
105
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
106
|
+
@parametrize
|
|
107
|
+
async def test_streaming_response_create(self, async_client: AsyncGmt) -> None:
|
|
108
|
+
async with async_client.purchases.bulk.with_streaming_response.create(
|
|
109
|
+
country_code="US",
|
|
110
|
+
quantity=10,
|
|
111
|
+
) as response:
|
|
112
|
+
assert not response.is_closed
|
|
113
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
114
|
+
|
|
115
|
+
bulk = await response.parse()
|
|
116
|
+
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
117
|
+
|
|
118
|
+
assert cast(Any, response.is_closed) is True
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from typing import Optional
|
|
4
|
-
from typing_extensions import Literal
|
|
5
|
-
|
|
6
|
-
from ..._models import BaseModel
|
|
7
|
-
|
|
8
|
-
__all__ = ["BulkRetrieveResponse", "Item", "PricePerAccount", "TotalPrice"]
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class Item(BaseModel):
|
|
12
|
-
"""Archive data (only populated when status is SUCCESS)"""
|
|
13
|
-
|
|
14
|
-
archive_url: str
|
|
15
|
-
"""Path or URL to download the archive with accounts"""
|
|
16
|
-
|
|
17
|
-
created_at: str
|
|
18
|
-
"""Bulk purchase creation timestamp"""
|
|
19
|
-
|
|
20
|
-
export_id: str
|
|
21
|
-
"""Archive/export ID with sessions"""
|
|
22
|
-
|
|
23
|
-
quantity: int
|
|
24
|
-
"""Number of accounts in the archive"""
|
|
25
|
-
|
|
26
|
-
status: Literal["PENDING", "SUCCESS", "ERROR", "REFUND"]
|
|
27
|
-
"""Status of bulk purchase"""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class PricePerAccount(BaseModel):
|
|
31
|
-
"""Price of a single account"""
|
|
32
|
-
|
|
33
|
-
amount: str
|
|
34
|
-
"""Monetary amount as a string with up to 2 decimal places."""
|
|
35
|
-
|
|
36
|
-
currency_code: str
|
|
37
|
-
"""ISO 4217 currency code."""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class TotalPrice(BaseModel):
|
|
41
|
-
"""Total price for all accounts"""
|
|
42
|
-
|
|
43
|
-
amount: str
|
|
44
|
-
"""Monetary amount as a string with up to 2 decimal places."""
|
|
45
|
-
|
|
46
|
-
currency_code: str
|
|
47
|
-
"""ISO 4217 currency code."""
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class BulkRetrieveResponse(BaseModel):
|
|
51
|
-
bulk_purchase_id: int
|
|
52
|
-
"""Unique ID of the bulk purchase request"""
|
|
53
|
-
|
|
54
|
-
country_code: str
|
|
55
|
-
"""ISO 3166-1 alpha-2 country code."""
|
|
56
|
-
|
|
57
|
-
created_at: str
|
|
58
|
-
"""Bulk purchase creation timestamp"""
|
|
59
|
-
|
|
60
|
-
item: Optional[Item] = None
|
|
61
|
-
"""Archive data (only populated when status is SUCCESS)"""
|
|
62
|
-
|
|
63
|
-
price_per_account: PricePerAccount
|
|
64
|
-
"""Price of a single account"""
|
|
65
|
-
|
|
66
|
-
quantity: int
|
|
67
|
-
"""Number of accounts in this purchase"""
|
|
68
|
-
|
|
69
|
-
status: Literal["PENDING", "SUCCESS", "ERROR", "REFUND"]
|
|
70
|
-
"""Current status of bulk purchase"""
|
|
71
|
-
|
|
72
|
-
total_price: TotalPrice
|
|
73
|
-
"""Total price for all accounts"""
|
|
74
|
-
|
|
75
|
-
updated_at: str
|
|
76
|
-
"""Last update timestamp"""
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import os
|
|
6
|
-
from typing import Any, cast
|
|
7
|
-
|
|
8
|
-
import pytest
|
|
9
|
-
|
|
10
|
-
from gmt import Gmt, AsyncGmt
|
|
11
|
-
from tests.utils import assert_matches_type
|
|
12
|
-
from gmt.types.purchases import BulkCreateResponse, BulkRetrieveResponse
|
|
13
|
-
|
|
14
|
-
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class TestBulk:
|
|
18
|
-
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
|
|
19
|
-
|
|
20
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
21
|
-
@parametrize
|
|
22
|
-
def test_method_create(self, client: Gmt) -> None:
|
|
23
|
-
bulk = client.purchases.bulk.create(
|
|
24
|
-
country_code="US",
|
|
25
|
-
quantity=10,
|
|
26
|
-
)
|
|
27
|
-
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
28
|
-
|
|
29
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
30
|
-
@parametrize
|
|
31
|
-
def test_method_create_with_all_params(self, client: Gmt) -> None:
|
|
32
|
-
bulk = client.purchases.bulk.create(
|
|
33
|
-
country_code="US",
|
|
34
|
-
quantity=10,
|
|
35
|
-
callback_url="https://example.com/webhooks/code-received",
|
|
36
|
-
)
|
|
37
|
-
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
38
|
-
|
|
39
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
40
|
-
@parametrize
|
|
41
|
-
def test_raw_response_create(self, client: Gmt) -> None:
|
|
42
|
-
response = client.purchases.bulk.with_raw_response.create(
|
|
43
|
-
country_code="US",
|
|
44
|
-
quantity=10,
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
assert response.is_closed is True
|
|
48
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
49
|
-
bulk = response.parse()
|
|
50
|
-
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
51
|
-
|
|
52
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
53
|
-
@parametrize
|
|
54
|
-
def test_streaming_response_create(self, client: Gmt) -> None:
|
|
55
|
-
with client.purchases.bulk.with_streaming_response.create(
|
|
56
|
-
country_code="US",
|
|
57
|
-
quantity=10,
|
|
58
|
-
) as response:
|
|
59
|
-
assert not response.is_closed
|
|
60
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
61
|
-
|
|
62
|
-
bulk = response.parse()
|
|
63
|
-
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
64
|
-
|
|
65
|
-
assert cast(Any, response.is_closed) is True
|
|
66
|
-
|
|
67
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
68
|
-
@parametrize
|
|
69
|
-
def test_method_retrieve(self, client: Gmt) -> None:
|
|
70
|
-
bulk = client.purchases.bulk.retrieve(
|
|
71
|
-
"purchaseId",
|
|
72
|
-
)
|
|
73
|
-
assert_matches_type(BulkRetrieveResponse, bulk, path=["response"])
|
|
74
|
-
|
|
75
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
76
|
-
@parametrize
|
|
77
|
-
def test_raw_response_retrieve(self, client: Gmt) -> None:
|
|
78
|
-
response = client.purchases.bulk.with_raw_response.retrieve(
|
|
79
|
-
"purchaseId",
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
assert response.is_closed is True
|
|
83
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
84
|
-
bulk = response.parse()
|
|
85
|
-
assert_matches_type(BulkRetrieveResponse, bulk, path=["response"])
|
|
86
|
-
|
|
87
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
88
|
-
@parametrize
|
|
89
|
-
def test_streaming_response_retrieve(self, client: Gmt) -> None:
|
|
90
|
-
with client.purchases.bulk.with_streaming_response.retrieve(
|
|
91
|
-
"purchaseId",
|
|
92
|
-
) as response:
|
|
93
|
-
assert not response.is_closed
|
|
94
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
95
|
-
|
|
96
|
-
bulk = response.parse()
|
|
97
|
-
assert_matches_type(BulkRetrieveResponse, bulk, path=["response"])
|
|
98
|
-
|
|
99
|
-
assert cast(Any, response.is_closed) is True
|
|
100
|
-
|
|
101
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
102
|
-
@parametrize
|
|
103
|
-
def test_path_params_retrieve(self, client: Gmt) -> None:
|
|
104
|
-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `purchase_id` but received ''"):
|
|
105
|
-
client.purchases.bulk.with_raw_response.retrieve(
|
|
106
|
-
"",
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
110
|
-
@parametrize
|
|
111
|
-
def test_method_download(self, client: Gmt) -> None:
|
|
112
|
-
bulk = client.purchases.bulk.download(
|
|
113
|
-
"purchaseId",
|
|
114
|
-
)
|
|
115
|
-
assert bulk is None
|
|
116
|
-
|
|
117
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
118
|
-
@parametrize
|
|
119
|
-
def test_raw_response_download(self, client: Gmt) -> None:
|
|
120
|
-
response = client.purchases.bulk.with_raw_response.download(
|
|
121
|
-
"purchaseId",
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
assert response.is_closed is True
|
|
125
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
126
|
-
bulk = response.parse()
|
|
127
|
-
assert bulk is None
|
|
128
|
-
|
|
129
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
130
|
-
@parametrize
|
|
131
|
-
def test_streaming_response_download(self, client: Gmt) -> None:
|
|
132
|
-
with client.purchases.bulk.with_streaming_response.download(
|
|
133
|
-
"purchaseId",
|
|
134
|
-
) as response:
|
|
135
|
-
assert not response.is_closed
|
|
136
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
137
|
-
|
|
138
|
-
bulk = response.parse()
|
|
139
|
-
assert bulk is None
|
|
140
|
-
|
|
141
|
-
assert cast(Any, response.is_closed) is True
|
|
142
|
-
|
|
143
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
144
|
-
@parametrize
|
|
145
|
-
def test_path_params_download(self, client: Gmt) -> None:
|
|
146
|
-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `purchase_id` but received ''"):
|
|
147
|
-
client.purchases.bulk.with_raw_response.download(
|
|
148
|
-
"",
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
class TestAsyncBulk:
|
|
153
|
-
parametrize = pytest.mark.parametrize(
|
|
154
|
-
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
158
|
-
@parametrize
|
|
159
|
-
async def test_method_create(self, async_client: AsyncGmt) -> None:
|
|
160
|
-
bulk = await async_client.purchases.bulk.create(
|
|
161
|
-
country_code="US",
|
|
162
|
-
quantity=10,
|
|
163
|
-
)
|
|
164
|
-
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
165
|
-
|
|
166
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
167
|
-
@parametrize
|
|
168
|
-
async def test_method_create_with_all_params(self, async_client: AsyncGmt) -> None:
|
|
169
|
-
bulk = await async_client.purchases.bulk.create(
|
|
170
|
-
country_code="US",
|
|
171
|
-
quantity=10,
|
|
172
|
-
callback_url="https://example.com/webhooks/code-received",
|
|
173
|
-
)
|
|
174
|
-
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
175
|
-
|
|
176
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
177
|
-
@parametrize
|
|
178
|
-
async def test_raw_response_create(self, async_client: AsyncGmt) -> None:
|
|
179
|
-
response = await async_client.purchases.bulk.with_raw_response.create(
|
|
180
|
-
country_code="US",
|
|
181
|
-
quantity=10,
|
|
182
|
-
)
|
|
183
|
-
|
|
184
|
-
assert response.is_closed is True
|
|
185
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
186
|
-
bulk = await response.parse()
|
|
187
|
-
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
188
|
-
|
|
189
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
190
|
-
@parametrize
|
|
191
|
-
async def test_streaming_response_create(self, async_client: AsyncGmt) -> None:
|
|
192
|
-
async with async_client.purchases.bulk.with_streaming_response.create(
|
|
193
|
-
country_code="US",
|
|
194
|
-
quantity=10,
|
|
195
|
-
) as response:
|
|
196
|
-
assert not response.is_closed
|
|
197
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
198
|
-
|
|
199
|
-
bulk = await response.parse()
|
|
200
|
-
assert_matches_type(BulkCreateResponse, bulk, path=["response"])
|
|
201
|
-
|
|
202
|
-
assert cast(Any, response.is_closed) is True
|
|
203
|
-
|
|
204
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
205
|
-
@parametrize
|
|
206
|
-
async def test_method_retrieve(self, async_client: AsyncGmt) -> None:
|
|
207
|
-
bulk = await async_client.purchases.bulk.retrieve(
|
|
208
|
-
"purchaseId",
|
|
209
|
-
)
|
|
210
|
-
assert_matches_type(BulkRetrieveResponse, bulk, path=["response"])
|
|
211
|
-
|
|
212
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
213
|
-
@parametrize
|
|
214
|
-
async def test_raw_response_retrieve(self, async_client: AsyncGmt) -> None:
|
|
215
|
-
response = await async_client.purchases.bulk.with_raw_response.retrieve(
|
|
216
|
-
"purchaseId",
|
|
217
|
-
)
|
|
218
|
-
|
|
219
|
-
assert response.is_closed is True
|
|
220
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
221
|
-
bulk = await response.parse()
|
|
222
|
-
assert_matches_type(BulkRetrieveResponse, bulk, path=["response"])
|
|
223
|
-
|
|
224
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
225
|
-
@parametrize
|
|
226
|
-
async def test_streaming_response_retrieve(self, async_client: AsyncGmt) -> None:
|
|
227
|
-
async with async_client.purchases.bulk.with_streaming_response.retrieve(
|
|
228
|
-
"purchaseId",
|
|
229
|
-
) as response:
|
|
230
|
-
assert not response.is_closed
|
|
231
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
232
|
-
|
|
233
|
-
bulk = await response.parse()
|
|
234
|
-
assert_matches_type(BulkRetrieveResponse, bulk, path=["response"])
|
|
235
|
-
|
|
236
|
-
assert cast(Any, response.is_closed) is True
|
|
237
|
-
|
|
238
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
239
|
-
@parametrize
|
|
240
|
-
async def test_path_params_retrieve(self, async_client: AsyncGmt) -> None:
|
|
241
|
-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `purchase_id` but received ''"):
|
|
242
|
-
await async_client.purchases.bulk.with_raw_response.retrieve(
|
|
243
|
-
"",
|
|
244
|
-
)
|
|
245
|
-
|
|
246
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
247
|
-
@parametrize
|
|
248
|
-
async def test_method_download(self, async_client: AsyncGmt) -> None:
|
|
249
|
-
bulk = await async_client.purchases.bulk.download(
|
|
250
|
-
"purchaseId",
|
|
251
|
-
)
|
|
252
|
-
assert bulk is None
|
|
253
|
-
|
|
254
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
255
|
-
@parametrize
|
|
256
|
-
async def test_raw_response_download(self, async_client: AsyncGmt) -> None:
|
|
257
|
-
response = await async_client.purchases.bulk.with_raw_response.download(
|
|
258
|
-
"purchaseId",
|
|
259
|
-
)
|
|
260
|
-
|
|
261
|
-
assert response.is_closed is True
|
|
262
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
263
|
-
bulk = await response.parse()
|
|
264
|
-
assert bulk is None
|
|
265
|
-
|
|
266
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
267
|
-
@parametrize
|
|
268
|
-
async def test_streaming_response_download(self, async_client: AsyncGmt) -> None:
|
|
269
|
-
async with async_client.purchases.bulk.with_streaming_response.download(
|
|
270
|
-
"purchaseId",
|
|
271
|
-
) as response:
|
|
272
|
-
assert not response.is_closed
|
|
273
|
-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
274
|
-
|
|
275
|
-
bulk = await response.parse()
|
|
276
|
-
assert bulk is None
|
|
277
|
-
|
|
278
|
-
assert cast(Any, response.is_closed) is True
|
|
279
|
-
|
|
280
|
-
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
281
|
-
@parametrize
|
|
282
|
-
async def test_path_params_download(self, async_client: AsyncGmt) -> None:
|
|
283
|
-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `purchase_id` but received ''"):
|
|
284
|
-
await async_client.purchases.bulk.with_raw_response.download(
|
|
285
|
-
"",
|
|
286
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/account_list_countries_params.py
RENAMED
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/account_list_countries_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_change_login_params.py
RENAMED
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_change_login_response.py
RENAMED
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_change_password_params.py
RENAMED
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_change_password_response.py
RENAMED
|
File without changes
|
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/profile_unbind_telegram_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchases/bulk_create_params.py
RENAMED
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/purchases/bulk_create_response.py
RENAMED
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/service_get_server_time_response.py
RENAMED
|
File without changes
|
{gmt_python_sdk-0.18.0 → gmt_python_sdk-0.19.0}/src/gmt/types/service_health_check_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|