gmt-python-sdk 0.32.0__tar.gz → 0.34.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.34.0/.release-please-manifest.json +3 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/CHANGELOG.md +16 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/PKG-INFO +1 -1
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/api.md +16 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/pyproject.toml +1 -1
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_client.py +44 -7
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_version.py +1 -1
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/__init__.py +14 -0
- gmt_python_sdk-0.34.0/src/gmt/resources/purchases_by_hash.py +298 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/telegram/purchases.py +0 -4
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/telegram/telegram.py +0 -10
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/__init__.py +7 -0
- gmt_python_sdk-0.34.0/src/gmt/types/purchases_by_hash_request_verification_code_params.py +20 -0
- gmt_python_sdk-0.34.0/src/gmt/types/purchases_by_hash_request_verification_code_response.py +163 -0
- gmt_python_sdk-0.34.0/src/gmt/types/purchases_by_hash_retrieve_response.py +133 -0
- gmt_python_sdk-0.34.0/tests/api_resources/test_purchases_by_hash.py +213 -0
- gmt_python_sdk-0.32.0/.release-please-manifest.json +0 -3
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/.gitignore +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/CONTRIBUTING.md +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/LICENSE +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/README.md +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/SECURITY.md +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/bin/check-release-environment +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/bin/publish-pypi +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/examples/.keep +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/release-please-config.json +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/requirements-dev.lock +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_base_client.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_compat.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_constants.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_exceptions.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_files.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_models.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_qs.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_resource.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_streaming.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_types.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_compat.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_datetime_parse.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_json.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_logs.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_path.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_proxy.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_reflection.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_resources_proxy.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_streams.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_sync.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_transform.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_typing.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/_utils/_utils.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/lib/.keep +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/pagination.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/py.typed +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/accounts.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/profile/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/profile/discount.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/profile/profile.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/profile/referral/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/profile/referral/referral.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/profile/referral/transaction.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/purchases/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/purchases/bulk.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/purchases/purchases.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/service.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/telegram/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/resources/webhooks.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/account_list_countries_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/account_list_countries_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/account_list_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/account_list_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/account_retrieve_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile/discount_retrieve_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile/referral/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile/referral/transaction_list_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile/referral/transaction_list_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile/referral_retrieve_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile/referral_transfer_balance_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile/referral_transfer_balance_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile_change_login_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile_change_login_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile_change_password_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile_change_password_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile_retrieve_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/profile_unbind_telegram_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchase_create_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchase_create_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchase_list_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchase_list_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchase_refund_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchase_request_verification_code_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchase_request_verification_code_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchase_retrieve_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchases/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchases/bulk_create_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchases/bulk_create_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/purchases/bulk_retrieve_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/service_get_server_time_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/service_health_check_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram/purchase_create_premium_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram/purchase_create_premium_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram/purchase_create_stars_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram/purchase_create_stars_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram/purchase_list_premium_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram/purchase_list_premium_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram/purchase_list_stars_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram/purchase_list_stars_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram_get_premium_price_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram_get_premium_price_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram_get_stars_price_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/telegram_get_stars_price_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/webhook_test_params.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/src/gmt/types/webhook_test_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/profile/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/profile/referral/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/profile/referral/test_transaction.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/profile/test_discount.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/profile/test_referral.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/purchases/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/purchases/test_bulk.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/telegram/__init__.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/telegram/test_purchases.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/test_accounts.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/test_profile.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/test_purchases.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/test_service.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/test_telegram.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/api_resources/test_webhooks.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/conftest.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/sample_file.txt +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_client.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_deepcopy.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_extract_files.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_files.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_models.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_qs.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_required_args.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_response.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_streaming.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_transform.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_utils/test_json.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_utils/test_path.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_utils/test_proxy.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/test_utils/test_typing.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/tests/utils.py +0 -0
- {gmt_python_sdk-0.32.0 → gmt_python_sdk-0.34.0}/uv.lock +0 -0
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.34.0 (2026-04-08)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.33.0...v0.34.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.33.0...v0.34.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([781721d](https://github.com/cameo6/gmt-python-sdk/commit/781721daf46f03bd5f4497b4bcd7ac688fbf41c0))
|
|
10
|
+
|
|
11
|
+
## 0.33.0 (2026-04-08)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.32.0...v0.33.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.32.0...v0.33.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([b59909e](https://github.com/cameo6/gmt-python-sdk/commit/b59909e74f4b65efbafc4d342cbb992172be7523))
|
|
18
|
+
|
|
3
19
|
## 0.32.0 (2026-04-08)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.31.1...v0.32.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.31.1...v0.32.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: gmt-python-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.34.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
|
|
@@ -118,6 +118,22 @@ Methods:
|
|
|
118
118
|
- <code title="get /v1/purchases/bulk/{purchase_id}">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>
|
|
119
119
|
- <code title="get /v1/purchases/bulk/{purchase_id}/download">client.purchases.bulk.<a href="./src/gmt/resources/purchases/bulk.py">download</a>(purchase_id) -> BinaryAPIResponse</code>
|
|
120
120
|
|
|
121
|
+
# PurchasesByHash
|
|
122
|
+
|
|
123
|
+
Types:
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
from gmt.types import (
|
|
127
|
+
PurchasesByHashRetrieveResponse,
|
|
128
|
+
PurchasesByHashRequestVerificationCodeResponse,
|
|
129
|
+
)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Methods:
|
|
133
|
+
|
|
134
|
+
- <code title="get /v1/purchases-by-hash/{hash}">client.purchases_by_hash.<a href="./src/gmt/resources/purchases_by_hash.py">retrieve</a>(hash) -> <a href="./src/gmt/types/purchases_by_hash_retrieve_response.py">PurchasesByHashRetrieveResponse</a></code>
|
|
135
|
+
- <code title="post /v1/purchases-by-hash/{hash}/request-code">client.purchases_by_hash.<a href="./src/gmt/resources/purchases_by_hash.py">request_verification_code</a>(hash, \*\*<a href="src/gmt/types/purchases_by_hash_request_verification_code_params.py">params</a>) -> <a href="./src/gmt/types/purchases_by_hash_request_verification_code_response.py">PurchasesByHashRequestVerificationCodeResponse</a></code>
|
|
136
|
+
|
|
121
137
|
# Telegram
|
|
122
138
|
|
|
123
139
|
Types:
|
|
@@ -31,11 +31,12 @@ from ._base_client import (
|
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
if TYPE_CHECKING:
|
|
34
|
-
from .resources import profile, service, accounts, telegram, webhooks, purchases
|
|
34
|
+
from .resources import profile, service, accounts, telegram, webhooks, purchases, purchases_by_hash
|
|
35
35
|
from .resources.service import ServiceResource, AsyncServiceResource
|
|
36
36
|
from .resources.accounts import AccountsResource, AsyncAccountsResource
|
|
37
37
|
from .resources.webhooks import WebhooksResource, AsyncWebhooksResource
|
|
38
38
|
from .resources.profile.profile import ProfileResource, AsyncProfileResource
|
|
39
|
+
from .resources.purchases_by_hash import PurchasesByHashResource, AsyncPurchasesByHashResource
|
|
39
40
|
from .resources.telegram.telegram import TelegramResource, AsyncTelegramResource
|
|
40
41
|
from .resources.purchases.purchases import PurchasesResource, AsyncPurchasesResource
|
|
41
42
|
|
|
@@ -129,9 +130,15 @@ class Gmt(SyncAPIClient):
|
|
|
129
130
|
|
|
130
131
|
return PurchasesResource(self)
|
|
131
132
|
|
|
133
|
+
@cached_property
|
|
134
|
+
def purchases_by_hash(self) -> PurchasesByHashResource:
|
|
135
|
+
"""Purchase history and management."""
|
|
136
|
+
from .resources.purchases_by_hash import PurchasesByHashResource
|
|
137
|
+
|
|
138
|
+
return PurchasesByHashResource(self)
|
|
139
|
+
|
|
132
140
|
@cached_property
|
|
133
141
|
def telegram(self) -> TelegramResource:
|
|
134
|
-
"""Stars and premium subscription for Telegram."""
|
|
135
142
|
from .resources.telegram import TelegramResource
|
|
136
143
|
|
|
137
144
|
return TelegramResource(self)
|
|
@@ -369,9 +376,15 @@ class AsyncGmt(AsyncAPIClient):
|
|
|
369
376
|
|
|
370
377
|
return AsyncPurchasesResource(self)
|
|
371
378
|
|
|
379
|
+
@cached_property
|
|
380
|
+
def purchases_by_hash(self) -> AsyncPurchasesByHashResource:
|
|
381
|
+
"""Purchase history and management."""
|
|
382
|
+
from .resources.purchases_by_hash import AsyncPurchasesByHashResource
|
|
383
|
+
|
|
384
|
+
return AsyncPurchasesByHashResource(self)
|
|
385
|
+
|
|
372
386
|
@cached_property
|
|
373
387
|
def telegram(self) -> AsyncTelegramResource:
|
|
374
|
-
"""Stars and premium subscription for Telegram."""
|
|
375
388
|
from .resources.telegram import AsyncTelegramResource
|
|
376
389
|
|
|
377
390
|
return AsyncTelegramResource(self)
|
|
@@ -564,9 +577,15 @@ class GmtWithRawResponse:
|
|
|
564
577
|
|
|
565
578
|
return PurchasesResourceWithRawResponse(self._client.purchases)
|
|
566
579
|
|
|
580
|
+
@cached_property
|
|
581
|
+
def purchases_by_hash(self) -> purchases_by_hash.PurchasesByHashResourceWithRawResponse:
|
|
582
|
+
"""Purchase history and management."""
|
|
583
|
+
from .resources.purchases_by_hash import PurchasesByHashResourceWithRawResponse
|
|
584
|
+
|
|
585
|
+
return PurchasesByHashResourceWithRawResponse(self._client.purchases_by_hash)
|
|
586
|
+
|
|
567
587
|
@cached_property
|
|
568
588
|
def telegram(self) -> telegram.TelegramResourceWithRawResponse:
|
|
569
|
-
"""Stars and premium subscription for Telegram."""
|
|
570
589
|
from .resources.telegram import TelegramResourceWithRawResponse
|
|
571
590
|
|
|
572
591
|
return TelegramResourceWithRawResponse(self._client.telegram)
|
|
@@ -645,9 +664,15 @@ class AsyncGmtWithRawResponse:
|
|
|
645
664
|
|
|
646
665
|
return AsyncPurchasesResourceWithRawResponse(self._client.purchases)
|
|
647
666
|
|
|
667
|
+
@cached_property
|
|
668
|
+
def purchases_by_hash(self) -> purchases_by_hash.AsyncPurchasesByHashResourceWithRawResponse:
|
|
669
|
+
"""Purchase history and management."""
|
|
670
|
+
from .resources.purchases_by_hash import AsyncPurchasesByHashResourceWithRawResponse
|
|
671
|
+
|
|
672
|
+
return AsyncPurchasesByHashResourceWithRawResponse(self._client.purchases_by_hash)
|
|
673
|
+
|
|
648
674
|
@cached_property
|
|
649
675
|
def telegram(self) -> telegram.AsyncTelegramResourceWithRawResponse:
|
|
650
|
-
"""Stars and premium subscription for Telegram."""
|
|
651
676
|
from .resources.telegram import AsyncTelegramResourceWithRawResponse
|
|
652
677
|
|
|
653
678
|
return AsyncTelegramResourceWithRawResponse(self._client.telegram)
|
|
@@ -726,9 +751,15 @@ class GmtWithStreamedResponse:
|
|
|
726
751
|
|
|
727
752
|
return PurchasesResourceWithStreamingResponse(self._client.purchases)
|
|
728
753
|
|
|
754
|
+
@cached_property
|
|
755
|
+
def purchases_by_hash(self) -> purchases_by_hash.PurchasesByHashResourceWithStreamingResponse:
|
|
756
|
+
"""Purchase history and management."""
|
|
757
|
+
from .resources.purchases_by_hash import PurchasesByHashResourceWithStreamingResponse
|
|
758
|
+
|
|
759
|
+
return PurchasesByHashResourceWithStreamingResponse(self._client.purchases_by_hash)
|
|
760
|
+
|
|
729
761
|
@cached_property
|
|
730
762
|
def telegram(self) -> telegram.TelegramResourceWithStreamingResponse:
|
|
731
|
-
"""Stars and premium subscription for Telegram."""
|
|
732
763
|
from .resources.telegram import TelegramResourceWithStreamingResponse
|
|
733
764
|
|
|
734
765
|
return TelegramResourceWithStreamingResponse(self._client.telegram)
|
|
@@ -807,9 +838,15 @@ class AsyncGmtWithStreamedResponse:
|
|
|
807
838
|
|
|
808
839
|
return AsyncPurchasesResourceWithStreamingResponse(self._client.purchases)
|
|
809
840
|
|
|
841
|
+
@cached_property
|
|
842
|
+
def purchases_by_hash(self) -> purchases_by_hash.AsyncPurchasesByHashResourceWithStreamingResponse:
|
|
843
|
+
"""Purchase history and management."""
|
|
844
|
+
from .resources.purchases_by_hash import AsyncPurchasesByHashResourceWithStreamingResponse
|
|
845
|
+
|
|
846
|
+
return AsyncPurchasesByHashResourceWithStreamingResponse(self._client.purchases_by_hash)
|
|
847
|
+
|
|
810
848
|
@cached_property
|
|
811
849
|
def telegram(self) -> telegram.AsyncTelegramResourceWithStreamingResponse:
|
|
812
|
-
"""Stars and premium subscription for Telegram."""
|
|
813
850
|
from .resources.telegram import AsyncTelegramResourceWithStreamingResponse
|
|
814
851
|
|
|
815
852
|
return AsyncTelegramResourceWithStreamingResponse(self._client.telegram)
|
|
@@ -48,6 +48,14 @@ from .purchases import (
|
|
|
48
48
|
PurchasesResourceWithStreamingResponse,
|
|
49
49
|
AsyncPurchasesResourceWithStreamingResponse,
|
|
50
50
|
)
|
|
51
|
+
from .purchases_by_hash import (
|
|
52
|
+
PurchasesByHashResource,
|
|
53
|
+
AsyncPurchasesByHashResource,
|
|
54
|
+
PurchasesByHashResourceWithRawResponse,
|
|
55
|
+
AsyncPurchasesByHashResourceWithRawResponse,
|
|
56
|
+
PurchasesByHashResourceWithStreamingResponse,
|
|
57
|
+
AsyncPurchasesByHashResourceWithStreamingResponse,
|
|
58
|
+
)
|
|
51
59
|
|
|
52
60
|
__all__ = [
|
|
53
61
|
"ServiceResource",
|
|
@@ -74,6 +82,12 @@ __all__ = [
|
|
|
74
82
|
"AsyncPurchasesResourceWithRawResponse",
|
|
75
83
|
"PurchasesResourceWithStreamingResponse",
|
|
76
84
|
"AsyncPurchasesResourceWithStreamingResponse",
|
|
85
|
+
"PurchasesByHashResource",
|
|
86
|
+
"AsyncPurchasesByHashResource",
|
|
87
|
+
"PurchasesByHashResourceWithRawResponse",
|
|
88
|
+
"AsyncPurchasesByHashResourceWithRawResponse",
|
|
89
|
+
"PurchasesByHashResourceWithStreamingResponse",
|
|
90
|
+
"AsyncPurchasesByHashResourceWithStreamingResponse",
|
|
77
91
|
"TelegramResource",
|
|
78
92
|
"AsyncTelegramResource",
|
|
79
93
|
"TelegramResourceWithRawResponse",
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..types import purchases_by_hash_request_verification_code_params
|
|
8
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
9
|
+
from .._utils import path_template, maybe_transform, async_maybe_transform
|
|
10
|
+
from .._compat import cached_property
|
|
11
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
12
|
+
from .._response import (
|
|
13
|
+
to_raw_response_wrapper,
|
|
14
|
+
to_streamed_response_wrapper,
|
|
15
|
+
async_to_raw_response_wrapper,
|
|
16
|
+
async_to_streamed_response_wrapper,
|
|
17
|
+
)
|
|
18
|
+
from .._base_client import make_request_options
|
|
19
|
+
from ..types.purchases_by_hash_retrieve_response import PurchasesByHashRetrieveResponse
|
|
20
|
+
from ..types.purchases_by_hash_request_verification_code_response import PurchasesByHashRequestVerificationCodeResponse
|
|
21
|
+
|
|
22
|
+
__all__ = ["PurchasesByHashResource", "AsyncPurchasesByHashResource"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class PurchasesByHashResource(SyncAPIResource):
|
|
26
|
+
"""Purchase history and management."""
|
|
27
|
+
|
|
28
|
+
@cached_property
|
|
29
|
+
def with_raw_response(self) -> PurchasesByHashResourceWithRawResponse:
|
|
30
|
+
"""
|
|
31
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
32
|
+
the raw response object instead of the parsed content.
|
|
33
|
+
|
|
34
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#accessing-raw-response-data-eg-headers
|
|
35
|
+
"""
|
|
36
|
+
return PurchasesByHashResourceWithRawResponse(self)
|
|
37
|
+
|
|
38
|
+
@cached_property
|
|
39
|
+
def with_streaming_response(self) -> PurchasesByHashResourceWithStreamingResponse:
|
|
40
|
+
"""
|
|
41
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
42
|
+
|
|
43
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#with_streaming_response
|
|
44
|
+
"""
|
|
45
|
+
return PurchasesByHashResourceWithStreamingResponse(self)
|
|
46
|
+
|
|
47
|
+
def retrieve(
|
|
48
|
+
self,
|
|
49
|
+
hash: str,
|
|
50
|
+
*,
|
|
51
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
52
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
53
|
+
extra_headers: Headers | None = None,
|
|
54
|
+
extra_query: Query | None = None,
|
|
55
|
+
extra_body: Body | None = None,
|
|
56
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
57
|
+
) -> PurchasesByHashRetrieveResponse:
|
|
58
|
+
"""
|
|
59
|
+
Returns detailed information about specific purchase by its hash code including
|
|
60
|
+
verification data if available.
|
|
61
|
+
|
|
62
|
+
**No authentication required.** The hash code serves as the access token.
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
hash: Unique hash code of the purchase
|
|
66
|
+
|
|
67
|
+
extra_headers: Send extra headers
|
|
68
|
+
|
|
69
|
+
extra_query: Add additional query parameters to the request
|
|
70
|
+
|
|
71
|
+
extra_body: Add additional JSON properties to the request
|
|
72
|
+
|
|
73
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
74
|
+
"""
|
|
75
|
+
if not hash:
|
|
76
|
+
raise ValueError(f"Expected a non-empty value for `hash` but received {hash!r}")
|
|
77
|
+
return self._get(
|
|
78
|
+
path_template("/v1/purchases-by-hash/{hash}", hash=hash),
|
|
79
|
+
options=make_request_options(
|
|
80
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
81
|
+
),
|
|
82
|
+
cast_to=PurchasesByHashRetrieveResponse,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
def request_verification_code(
|
|
86
|
+
self,
|
|
87
|
+
hash: str,
|
|
88
|
+
*,
|
|
89
|
+
callback_url: str | Omit = omit,
|
|
90
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
91
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
92
|
+
extra_headers: Headers | None = None,
|
|
93
|
+
extra_query: Query | None = None,
|
|
94
|
+
extra_body: Body | None = None,
|
|
95
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
96
|
+
) -> PurchasesByHashRequestVerificationCodeResponse:
|
|
97
|
+
"""
|
|
98
|
+
Requests verification code and password from provider using purchase hash code.
|
|
99
|
+
Updates purchase status to SUCCESS.
|
|
100
|
+
|
|
101
|
+
**No authentication required.** The hash code serves as the access token.
|
|
102
|
+
|
|
103
|
+
**Idempotent Operation.** Safe to retry on network errors - will not generate
|
|
104
|
+
duplicate codes.
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
hash: Unique hash code of the purchase
|
|
108
|
+
|
|
109
|
+
callback_url: URL to receive webhook notification when code is received. POST request will be
|
|
110
|
+
sent with either `WebhookSuccessPayload` or `WebhookFailedPayload`.
|
|
111
|
+
|
|
112
|
+
**Retry policy.** If your endpoint does not return HTTP 200, webhook will be
|
|
113
|
+
retried up to 3 times with delays: immediately, after 10 seconds, after 30
|
|
114
|
+
seconds. Any non-200 response triggers retry.
|
|
115
|
+
|
|
116
|
+
extra_headers: Send extra headers
|
|
117
|
+
|
|
118
|
+
extra_query: Add additional query parameters to the request
|
|
119
|
+
|
|
120
|
+
extra_body: Add additional JSON properties to the request
|
|
121
|
+
|
|
122
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
123
|
+
"""
|
|
124
|
+
if not hash:
|
|
125
|
+
raise ValueError(f"Expected a non-empty value for `hash` but received {hash!r}")
|
|
126
|
+
return self._post(
|
|
127
|
+
path_template("/v1/purchases-by-hash/{hash}/request-code", hash=hash),
|
|
128
|
+
body=maybe_transform(
|
|
129
|
+
{"callback_url": callback_url},
|
|
130
|
+
purchases_by_hash_request_verification_code_params.PurchasesByHashRequestVerificationCodeParams,
|
|
131
|
+
),
|
|
132
|
+
options=make_request_options(
|
|
133
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
134
|
+
),
|
|
135
|
+
cast_to=PurchasesByHashRequestVerificationCodeResponse,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class AsyncPurchasesByHashResource(AsyncAPIResource):
|
|
140
|
+
"""Purchase history and management."""
|
|
141
|
+
|
|
142
|
+
@cached_property
|
|
143
|
+
def with_raw_response(self) -> AsyncPurchasesByHashResourceWithRawResponse:
|
|
144
|
+
"""
|
|
145
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
146
|
+
the raw response object instead of the parsed content.
|
|
147
|
+
|
|
148
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#accessing-raw-response-data-eg-headers
|
|
149
|
+
"""
|
|
150
|
+
return AsyncPurchasesByHashResourceWithRawResponse(self)
|
|
151
|
+
|
|
152
|
+
@cached_property
|
|
153
|
+
def with_streaming_response(self) -> AsyncPurchasesByHashResourceWithStreamingResponse:
|
|
154
|
+
"""
|
|
155
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
156
|
+
|
|
157
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#with_streaming_response
|
|
158
|
+
"""
|
|
159
|
+
return AsyncPurchasesByHashResourceWithStreamingResponse(self)
|
|
160
|
+
|
|
161
|
+
async def retrieve(
|
|
162
|
+
self,
|
|
163
|
+
hash: str,
|
|
164
|
+
*,
|
|
165
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
166
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
167
|
+
extra_headers: Headers | None = None,
|
|
168
|
+
extra_query: Query | None = None,
|
|
169
|
+
extra_body: Body | None = None,
|
|
170
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
171
|
+
) -> PurchasesByHashRetrieveResponse:
|
|
172
|
+
"""
|
|
173
|
+
Returns detailed information about specific purchase by its hash code including
|
|
174
|
+
verification data if available.
|
|
175
|
+
|
|
176
|
+
**No authentication required.** The hash code serves as the access token.
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
hash: Unique hash code of the purchase
|
|
180
|
+
|
|
181
|
+
extra_headers: Send extra headers
|
|
182
|
+
|
|
183
|
+
extra_query: Add additional query parameters to the request
|
|
184
|
+
|
|
185
|
+
extra_body: Add additional JSON properties to the request
|
|
186
|
+
|
|
187
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
188
|
+
"""
|
|
189
|
+
if not hash:
|
|
190
|
+
raise ValueError(f"Expected a non-empty value for `hash` but received {hash!r}")
|
|
191
|
+
return await self._get(
|
|
192
|
+
path_template("/v1/purchases-by-hash/{hash}", hash=hash),
|
|
193
|
+
options=make_request_options(
|
|
194
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
195
|
+
),
|
|
196
|
+
cast_to=PurchasesByHashRetrieveResponse,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
async def request_verification_code(
|
|
200
|
+
self,
|
|
201
|
+
hash: str,
|
|
202
|
+
*,
|
|
203
|
+
callback_url: str | Omit = omit,
|
|
204
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
205
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
206
|
+
extra_headers: Headers | None = None,
|
|
207
|
+
extra_query: Query | None = None,
|
|
208
|
+
extra_body: Body | None = None,
|
|
209
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
210
|
+
) -> PurchasesByHashRequestVerificationCodeResponse:
|
|
211
|
+
"""
|
|
212
|
+
Requests verification code and password from provider using purchase hash code.
|
|
213
|
+
Updates purchase status to SUCCESS.
|
|
214
|
+
|
|
215
|
+
**No authentication required.** The hash code serves as the access token.
|
|
216
|
+
|
|
217
|
+
**Idempotent Operation.** Safe to retry on network errors - will not generate
|
|
218
|
+
duplicate codes.
|
|
219
|
+
|
|
220
|
+
Args:
|
|
221
|
+
hash: Unique hash code of the purchase
|
|
222
|
+
|
|
223
|
+
callback_url: URL to receive webhook notification when code is received. POST request will be
|
|
224
|
+
sent with either `WebhookSuccessPayload` or `WebhookFailedPayload`.
|
|
225
|
+
|
|
226
|
+
**Retry policy.** If your endpoint does not return HTTP 200, webhook will be
|
|
227
|
+
retried up to 3 times with delays: immediately, after 10 seconds, after 30
|
|
228
|
+
seconds. Any non-200 response triggers retry.
|
|
229
|
+
|
|
230
|
+
extra_headers: Send extra headers
|
|
231
|
+
|
|
232
|
+
extra_query: Add additional query parameters to the request
|
|
233
|
+
|
|
234
|
+
extra_body: Add additional JSON properties to the request
|
|
235
|
+
|
|
236
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
237
|
+
"""
|
|
238
|
+
if not hash:
|
|
239
|
+
raise ValueError(f"Expected a non-empty value for `hash` but received {hash!r}")
|
|
240
|
+
return await self._post(
|
|
241
|
+
path_template("/v1/purchases-by-hash/{hash}/request-code", hash=hash),
|
|
242
|
+
body=await async_maybe_transform(
|
|
243
|
+
{"callback_url": callback_url},
|
|
244
|
+
purchases_by_hash_request_verification_code_params.PurchasesByHashRequestVerificationCodeParams,
|
|
245
|
+
),
|
|
246
|
+
options=make_request_options(
|
|
247
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
248
|
+
),
|
|
249
|
+
cast_to=PurchasesByHashRequestVerificationCodeResponse,
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
class PurchasesByHashResourceWithRawResponse:
|
|
254
|
+
def __init__(self, purchases_by_hash: PurchasesByHashResource) -> None:
|
|
255
|
+
self._purchases_by_hash = purchases_by_hash
|
|
256
|
+
|
|
257
|
+
self.retrieve = to_raw_response_wrapper(
|
|
258
|
+
purchases_by_hash.retrieve,
|
|
259
|
+
)
|
|
260
|
+
self.request_verification_code = to_raw_response_wrapper(
|
|
261
|
+
purchases_by_hash.request_verification_code,
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
class AsyncPurchasesByHashResourceWithRawResponse:
|
|
266
|
+
def __init__(self, purchases_by_hash: AsyncPurchasesByHashResource) -> None:
|
|
267
|
+
self._purchases_by_hash = purchases_by_hash
|
|
268
|
+
|
|
269
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
270
|
+
purchases_by_hash.retrieve,
|
|
271
|
+
)
|
|
272
|
+
self.request_verification_code = async_to_raw_response_wrapper(
|
|
273
|
+
purchases_by_hash.request_verification_code,
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
class PurchasesByHashResourceWithStreamingResponse:
|
|
278
|
+
def __init__(self, purchases_by_hash: PurchasesByHashResource) -> None:
|
|
279
|
+
self._purchases_by_hash = purchases_by_hash
|
|
280
|
+
|
|
281
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
282
|
+
purchases_by_hash.retrieve,
|
|
283
|
+
)
|
|
284
|
+
self.request_verification_code = to_streamed_response_wrapper(
|
|
285
|
+
purchases_by_hash.request_verification_code,
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
class AsyncPurchasesByHashResourceWithStreamingResponse:
|
|
290
|
+
def __init__(self, purchases_by_hash: AsyncPurchasesByHashResource) -> None:
|
|
291
|
+
self._purchases_by_hash = purchases_by_hash
|
|
292
|
+
|
|
293
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
294
|
+
purchases_by_hash.retrieve,
|
|
295
|
+
)
|
|
296
|
+
self.request_verification_code = async_to_streamed_response_wrapper(
|
|
297
|
+
purchases_by_hash.request_verification_code,
|
|
298
|
+
)
|
|
@@ -31,8 +31,6 @@ __all__ = ["PurchasesResource", "AsyncPurchasesResource"]
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class PurchasesResource(SyncAPIResource):
|
|
34
|
-
"""Stars and premium subscription for Telegram."""
|
|
35
|
-
|
|
36
34
|
@cached_property
|
|
37
35
|
def with_raw_response(self) -> PurchasesResourceWithRawResponse:
|
|
38
36
|
"""
|
|
@@ -239,8 +237,6 @@ class PurchasesResource(SyncAPIResource):
|
|
|
239
237
|
|
|
240
238
|
|
|
241
239
|
class AsyncPurchasesResource(AsyncAPIResource):
|
|
242
|
-
"""Stars and premium subscription for Telegram."""
|
|
243
|
-
|
|
244
240
|
@cached_property
|
|
245
241
|
def with_raw_response(self) -> AsyncPurchasesResourceWithRawResponse:
|
|
246
242
|
"""
|
|
@@ -31,11 +31,8 @@ __all__ = ["TelegramResource", "AsyncTelegramResource"]
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class TelegramResource(SyncAPIResource):
|
|
34
|
-
"""Stars and premium subscription for Telegram."""
|
|
35
|
-
|
|
36
34
|
@cached_property
|
|
37
35
|
def purchases(self) -> PurchasesResource:
|
|
38
|
-
"""Stars and premium subscription for Telegram."""
|
|
39
36
|
return PurchasesResource(self._client)
|
|
40
37
|
|
|
41
38
|
@cached_property
|
|
@@ -135,11 +132,8 @@ class TelegramResource(SyncAPIResource):
|
|
|
135
132
|
|
|
136
133
|
|
|
137
134
|
class AsyncTelegramResource(AsyncAPIResource):
|
|
138
|
-
"""Stars and premium subscription for Telegram."""
|
|
139
|
-
|
|
140
135
|
@cached_property
|
|
141
136
|
def purchases(self) -> AsyncPurchasesResource:
|
|
142
|
-
"""Stars and premium subscription for Telegram."""
|
|
143
137
|
return AsyncPurchasesResource(self._client)
|
|
144
138
|
|
|
145
139
|
@cached_property
|
|
@@ -253,7 +247,6 @@ class TelegramResourceWithRawResponse:
|
|
|
253
247
|
|
|
254
248
|
@cached_property
|
|
255
249
|
def purchases(self) -> PurchasesResourceWithRawResponse:
|
|
256
|
-
"""Stars and premium subscription for Telegram."""
|
|
257
250
|
return PurchasesResourceWithRawResponse(self._telegram.purchases)
|
|
258
251
|
|
|
259
252
|
|
|
@@ -270,7 +263,6 @@ class AsyncTelegramResourceWithRawResponse:
|
|
|
270
263
|
|
|
271
264
|
@cached_property
|
|
272
265
|
def purchases(self) -> AsyncPurchasesResourceWithRawResponse:
|
|
273
|
-
"""Stars and premium subscription for Telegram."""
|
|
274
266
|
return AsyncPurchasesResourceWithRawResponse(self._telegram.purchases)
|
|
275
267
|
|
|
276
268
|
|
|
@@ -287,7 +279,6 @@ class TelegramResourceWithStreamingResponse:
|
|
|
287
279
|
|
|
288
280
|
@cached_property
|
|
289
281
|
def purchases(self) -> PurchasesResourceWithStreamingResponse:
|
|
290
|
-
"""Stars and premium subscription for Telegram."""
|
|
291
282
|
return PurchasesResourceWithStreamingResponse(self._telegram.purchases)
|
|
292
283
|
|
|
293
284
|
|
|
@@ -304,5 +295,4 @@ class AsyncTelegramResourceWithStreamingResponse:
|
|
|
304
295
|
|
|
305
296
|
@cached_property
|
|
306
297
|
def purchases(self) -> AsyncPurchasesResourceWithStreamingResponse:
|
|
307
|
-
"""Stars and premium subscription for Telegram."""
|
|
308
298
|
return AsyncPurchasesResourceWithStreamingResponse(self._telegram.purchases)
|
|
@@ -26,6 +26,7 @@ from .profile_unbind_telegram_response import ProfileUnbindTelegramResponse as P
|
|
|
26
26
|
from .service_get_server_time_response import ServiceGetServerTimeResponse as ServiceGetServerTimeResponse
|
|
27
27
|
from .telegram_get_premium_price_params import TelegramGetPremiumPriceParams as TelegramGetPremiumPriceParams
|
|
28
28
|
from .telegram_get_stars_price_response import TelegramGetStarsPriceResponse as TelegramGetStarsPriceResponse
|
|
29
|
+
from .purchases_by_hash_retrieve_response import PurchasesByHashRetrieveResponse as PurchasesByHashRetrieveResponse
|
|
29
30
|
from .telegram_get_premium_price_response import TelegramGetPremiumPriceResponse as TelegramGetPremiumPriceResponse
|
|
30
31
|
from .purchase_request_verification_code_params import (
|
|
31
32
|
PurchaseRequestVerificationCodeParams as PurchaseRequestVerificationCodeParams,
|
|
@@ -33,3 +34,9 @@ from .purchase_request_verification_code_params import (
|
|
|
33
34
|
from .purchase_request_verification_code_response import (
|
|
34
35
|
PurchaseRequestVerificationCodeResponse as PurchaseRequestVerificationCodeResponse,
|
|
35
36
|
)
|
|
37
|
+
from .purchases_by_hash_request_verification_code_params import (
|
|
38
|
+
PurchasesByHashRequestVerificationCodeParams as PurchasesByHashRequestVerificationCodeParams,
|
|
39
|
+
)
|
|
40
|
+
from .purchases_by_hash_request_verification_code_response import (
|
|
41
|
+
PurchasesByHashRequestVerificationCodeResponse as PurchasesByHashRequestVerificationCodeResponse,
|
|
42
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["PurchasesByHashRequestVerificationCodeParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PurchasesByHashRequestVerificationCodeParams(TypedDict, total=False):
|
|
11
|
+
callback_url: str
|
|
12
|
+
"""URL to receive webhook notification when code is received.
|
|
13
|
+
|
|
14
|
+
POST request will be sent with either `WebhookSuccessPayload` or
|
|
15
|
+
`WebhookFailedPayload`.
|
|
16
|
+
|
|
17
|
+
**Retry policy.** If your endpoint does not return HTTP 200, webhook will be
|
|
18
|
+
retried up to 3 times with delays: immediately, after 10 seconds, after 30
|
|
19
|
+
seconds. Any non-200 response triggers retry.
|
|
20
|
+
"""
|