gmt-python-sdk 0.24.2__tar.gz → 0.25.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.25.0/.release-please-manifest.json +3 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/CHANGELOG.md +13 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/PKG-INFO +1 -1
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/api.md +29 -4
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/pyproject.toml +1 -1
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_client.py +1 -1
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_version.py +1 -1
- gmt_python_sdk-0.25.0/src/gmt/resources/profile/__init__.py +47 -0
- gmt_python_sdk-0.25.0/src/gmt/resources/profile/discount.py +145 -0
- {gmt_python_sdk-0.24.2/src/gmt/resources → gmt_python_sdk-0.25.0/src/gmt/resources/profile}/profile.py +87 -11
- gmt_python_sdk-0.25.0/src/gmt/resources/profile/referral.py +230 -0
- gmt_python_sdk-0.25.0/src/gmt/types/profile/__init__.py +8 -0
- gmt_python_sdk-0.25.0/src/gmt/types/profile/discount_retrieve_response.py +94 -0
- gmt_python_sdk-0.25.0/src/gmt/types/profile/referral_retrieve_response.py +121 -0
- gmt_python_sdk-0.25.0/src/gmt/types/profile/referral_transfer_balance_params.py +12 -0
- gmt_python_sdk-0.25.0/src/gmt/types/profile/referral_transfer_balance_response.py +50 -0
- gmt_python_sdk-0.25.0/tests/api_resources/profile/test_discount.py +80 -0
- gmt_python_sdk-0.25.0/tests/api_resources/profile/test_referral.py +151 -0
- gmt_python_sdk-0.25.0/tests/api_resources/purchases/__init__.py +1 -0
- gmt_python_sdk-0.24.2/.release-please-manifest.json +0 -3
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/.gitignore +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/CONTRIBUTING.md +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/LICENSE +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/README.md +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/SECURITY.md +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/bin/check-release-environment +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/bin/publish-pypi +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/examples/.keep +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/release-please-config.json +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/requirements-dev.lock +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/__init__.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_base_client.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_compat.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_constants.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_exceptions.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_files.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_models.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_qs.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_resource.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_streaming.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_types.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/__init__.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_compat.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_datetime_parse.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_json.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_logs.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_proxy.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_reflection.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_resources_proxy.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_streams.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_sync.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_transform.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_typing.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/_utils/_utils.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/lib/.keep +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/pagination.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/py.typed +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/resources/__init__.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/resources/accounts.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/resources/purchases/__init__.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/resources/purchases/bulk.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/resources/purchases/purchases.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/resources/service.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/resources/webhooks.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/__init__.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/account_list_countries_params.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/account_list_countries_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/account_list_params.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/account_list_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/account_retrieve_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/profile_change_login_params.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/profile_change_login_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/profile_change_password_params.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/profile_change_password_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/profile_retrieve_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/profile_unbind_telegram_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchase_create_params.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchase_create_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchase_list_params.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchase_list_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchase_refund_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchase_request_verification_code_params.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchase_request_verification_code_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchase_retrieve_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchases/__init__.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchases/bulk_create_params.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchases/bulk_create_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/purchases/bulk_retrieve_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/service_get_server_time_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/service_health_check_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/webhook_test_params.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/src/gmt/types/webhook_test_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/__init__.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/api_resources/__init__.py +0 -0
- {gmt_python_sdk-0.24.2/tests/api_resources/purchases → gmt_python_sdk-0.25.0/tests/api_resources/profile}/__init__.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/api_resources/purchases/test_bulk.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/api_resources/test_accounts.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/api_resources/test_profile.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/api_resources/test_purchases.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/api_resources/test_service.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/api_resources/test_webhooks.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/conftest.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/sample_file.txt +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_client.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_deepcopy.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_extract_files.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_files.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_models.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_qs.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_required_args.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_response.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_streaming.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_transform.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_utils/test_json.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_utils/test_proxy.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/test_utils/test_typing.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/tests/utils.py +0 -0
- {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.25.0}/uv.lock +0 -0
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.25.0 (2026-03-19)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.24.2...v0.25.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.24.2...v0.25.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([7c3c060](https://github.com/cameo6/gmt-python-sdk/commit/7c3c060715f9b4ecca26af06b909abeaeb218538))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** tweak CI branches ([64e5f36](https://github.com/cameo6/gmt-python-sdk/commit/64e5f36e98a4937f8d51a5e52572f6b255c30ea8))
|
|
15
|
+
|
|
3
16
|
## 0.24.2 (2026-03-17)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v0.24.1...v0.24.2](https://github.com/cameo6/gmt-python-sdk/compare/v0.24.1...v0.24.2)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: gmt-python-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.25.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
|
|
@@ -40,10 +40,35 @@ from gmt.types import (
|
|
|
40
40
|
|
|
41
41
|
Methods:
|
|
42
42
|
|
|
43
|
-
- <code title="get /v1/profile/">client.profile.<a href="./src/gmt/resources/profile.py">retrieve</a>() -> <a href="./src/gmt/types/profile_retrieve_response.py">ProfileRetrieveResponse</a></code>
|
|
44
|
-
- <code title="patch /v1/profile/change-login">client.profile.<a href="./src/gmt/resources/profile.py">change_login</a>(\*\*<a href="src/gmt/types/profile_change_login_params.py">params</a>) -> <a href="./src/gmt/types/profile_change_login_response.py">ProfileChangeLoginResponse</a></code>
|
|
45
|
-
- <code title="patch /v1/profile/change-password">client.profile.<a href="./src/gmt/resources/profile.py">change_password</a>(\*\*<a href="src/gmt/types/profile_change_password_params.py">params</a>) -> <a href="./src/gmt/types/profile_change_password_response.py">ProfileChangePasswordResponse</a></code>
|
|
46
|
-
- <code title="patch /v1/profile/unbind-telegram">client.profile.<a href="./src/gmt/resources/profile.py">unbind_telegram</a>() -> <a href="./src/gmt/types/profile_unbind_telegram_response.py">ProfileUnbindTelegramResponse</a></code>
|
|
43
|
+
- <code title="get /v1/profile/">client.profile.<a href="./src/gmt/resources/profile/profile.py">retrieve</a>() -> <a href="./src/gmt/types/profile_retrieve_response.py">ProfileRetrieveResponse</a></code>
|
|
44
|
+
- <code title="patch /v1/profile/change-login">client.profile.<a href="./src/gmt/resources/profile/profile.py">change_login</a>(\*\*<a href="src/gmt/types/profile_change_login_params.py">params</a>) -> <a href="./src/gmt/types/profile_change_login_response.py">ProfileChangeLoginResponse</a></code>
|
|
45
|
+
- <code title="patch /v1/profile/change-password">client.profile.<a href="./src/gmt/resources/profile/profile.py">change_password</a>(\*\*<a href="src/gmt/types/profile_change_password_params.py">params</a>) -> <a href="./src/gmt/types/profile_change_password_response.py">ProfileChangePasswordResponse</a></code>
|
|
46
|
+
- <code title="patch /v1/profile/unbind-telegram">client.profile.<a href="./src/gmt/resources/profile/profile.py">unbind_telegram</a>() -> <a href="./src/gmt/types/profile_unbind_telegram_response.py">ProfileUnbindTelegramResponse</a></code>
|
|
47
|
+
|
|
48
|
+
## Discount
|
|
49
|
+
|
|
50
|
+
Types:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from gmt.types.profile import DiscountRetrieveResponse
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Methods:
|
|
57
|
+
|
|
58
|
+
- <code title="get /v1/profile/discount">client.profile.discount.<a href="./src/gmt/resources/profile/discount.py">retrieve</a>() -> <a href="./src/gmt/types/profile/discount_retrieve_response.py">DiscountRetrieveResponse</a></code>
|
|
59
|
+
|
|
60
|
+
## Referral
|
|
61
|
+
|
|
62
|
+
Types:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from gmt.types.profile import ReferralRetrieveResponse, ReferralTransferBalanceResponse
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Methods:
|
|
69
|
+
|
|
70
|
+
- <code title="get /v1/profile/referral">client.profile.referral.<a href="./src/gmt/resources/profile/referral.py">retrieve</a>() -> <a href="./src/gmt/types/profile/referral_retrieve_response.py">ReferralRetrieveResponse</a></code>
|
|
71
|
+
- <code title="post /v1/profile/referral/transfer-balance">client.profile.referral.<a href="./src/gmt/resources/profile/referral.py">transfer_balance</a>(\*\*<a href="src/gmt/types/profile/referral_transfer_balance_params.py">params</a>) -> <a href="./src/gmt/types/profile/referral_transfer_balance_response.py">ReferralTransferBalanceResponse</a></code>
|
|
47
72
|
|
|
48
73
|
# Purchases
|
|
49
74
|
|
|
@@ -32,10 +32,10 @@ from ._base_client import (
|
|
|
32
32
|
|
|
33
33
|
if TYPE_CHECKING:
|
|
34
34
|
from .resources import profile, service, accounts, webhooks, purchases
|
|
35
|
-
from .resources.profile import ProfileResource, AsyncProfileResource
|
|
36
35
|
from .resources.service import ServiceResource, AsyncServiceResource
|
|
37
36
|
from .resources.accounts import AccountsResource, AsyncAccountsResource
|
|
38
37
|
from .resources.webhooks import WebhooksResource, AsyncWebhooksResource
|
|
38
|
+
from .resources.profile.profile import ProfileResource, AsyncProfileResource
|
|
39
39
|
from .resources.purchases.purchases import PurchasesResource, AsyncPurchasesResource
|
|
40
40
|
|
|
41
41
|
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Gmt", "AsyncGmt", "Client", "AsyncClient"]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .profile import (
|
|
4
|
+
ProfileResource,
|
|
5
|
+
AsyncProfileResource,
|
|
6
|
+
ProfileResourceWithRawResponse,
|
|
7
|
+
AsyncProfileResourceWithRawResponse,
|
|
8
|
+
ProfileResourceWithStreamingResponse,
|
|
9
|
+
AsyncProfileResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .discount import (
|
|
12
|
+
DiscountResource,
|
|
13
|
+
AsyncDiscountResource,
|
|
14
|
+
DiscountResourceWithRawResponse,
|
|
15
|
+
AsyncDiscountResourceWithRawResponse,
|
|
16
|
+
DiscountResourceWithStreamingResponse,
|
|
17
|
+
AsyncDiscountResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .referral import (
|
|
20
|
+
ReferralResource,
|
|
21
|
+
AsyncReferralResource,
|
|
22
|
+
ReferralResourceWithRawResponse,
|
|
23
|
+
AsyncReferralResourceWithRawResponse,
|
|
24
|
+
ReferralResourceWithStreamingResponse,
|
|
25
|
+
AsyncReferralResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"DiscountResource",
|
|
30
|
+
"AsyncDiscountResource",
|
|
31
|
+
"DiscountResourceWithRawResponse",
|
|
32
|
+
"AsyncDiscountResourceWithRawResponse",
|
|
33
|
+
"DiscountResourceWithStreamingResponse",
|
|
34
|
+
"AsyncDiscountResourceWithStreamingResponse",
|
|
35
|
+
"ReferralResource",
|
|
36
|
+
"AsyncReferralResource",
|
|
37
|
+
"ReferralResourceWithRawResponse",
|
|
38
|
+
"AsyncReferralResourceWithRawResponse",
|
|
39
|
+
"ReferralResourceWithStreamingResponse",
|
|
40
|
+
"AsyncReferralResourceWithStreamingResponse",
|
|
41
|
+
"ProfileResource",
|
|
42
|
+
"AsyncProfileResource",
|
|
43
|
+
"ProfileResourceWithRawResponse",
|
|
44
|
+
"AsyncProfileResourceWithRawResponse",
|
|
45
|
+
"ProfileResourceWithStreamingResponse",
|
|
46
|
+
"AsyncProfileResourceWithStreamingResponse",
|
|
47
|
+
]
|
|
@@ -0,0 +1,145 @@
|
|
|
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 Body, Query, Headers, NotGiven, not_given
|
|
8
|
+
from ..._compat import cached_property
|
|
9
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ..._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from ..._base_client import make_request_options
|
|
17
|
+
from ...types.profile.discount_retrieve_response import DiscountRetrieveResponse
|
|
18
|
+
|
|
19
|
+
__all__ = ["DiscountResource", "AsyncDiscountResource"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class DiscountResource(SyncAPIResource):
|
|
23
|
+
"""User profile management."""
|
|
24
|
+
|
|
25
|
+
@cached_property
|
|
26
|
+
def with_raw_response(self) -> DiscountResourceWithRawResponse:
|
|
27
|
+
"""
|
|
28
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
29
|
+
the raw response object instead of the parsed content.
|
|
30
|
+
|
|
31
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#accessing-raw-response-data-eg-headers
|
|
32
|
+
"""
|
|
33
|
+
return DiscountResourceWithRawResponse(self)
|
|
34
|
+
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_streaming_response(self) -> DiscountResourceWithStreamingResponse:
|
|
37
|
+
"""
|
|
38
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
39
|
+
|
|
40
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#with_streaming_response
|
|
41
|
+
"""
|
|
42
|
+
return DiscountResourceWithStreamingResponse(self)
|
|
43
|
+
|
|
44
|
+
def retrieve(
|
|
45
|
+
self,
|
|
46
|
+
*,
|
|
47
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
|
+
extra_headers: Headers | None = None,
|
|
50
|
+
extra_query: Query | None = None,
|
|
51
|
+
extra_body: Body | None = None,
|
|
52
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
53
|
+
) -> DiscountRetrieveResponse:
|
|
54
|
+
"""
|
|
55
|
+
Returns user's current discount level and percentage based on their purchase
|
|
56
|
+
history.
|
|
57
|
+
"""
|
|
58
|
+
return self._get(
|
|
59
|
+
"/v1/profile/discount",
|
|
60
|
+
options=make_request_options(
|
|
61
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
62
|
+
),
|
|
63
|
+
cast_to=DiscountRetrieveResponse,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class AsyncDiscountResource(AsyncAPIResource):
|
|
68
|
+
"""User profile management."""
|
|
69
|
+
|
|
70
|
+
@cached_property
|
|
71
|
+
def with_raw_response(self) -> AsyncDiscountResourceWithRawResponse:
|
|
72
|
+
"""
|
|
73
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
74
|
+
the raw response object instead of the parsed content.
|
|
75
|
+
|
|
76
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#accessing-raw-response-data-eg-headers
|
|
77
|
+
"""
|
|
78
|
+
return AsyncDiscountResourceWithRawResponse(self)
|
|
79
|
+
|
|
80
|
+
@cached_property
|
|
81
|
+
def with_streaming_response(self) -> AsyncDiscountResourceWithStreamingResponse:
|
|
82
|
+
"""
|
|
83
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
84
|
+
|
|
85
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#with_streaming_response
|
|
86
|
+
"""
|
|
87
|
+
return AsyncDiscountResourceWithStreamingResponse(self)
|
|
88
|
+
|
|
89
|
+
async def retrieve(
|
|
90
|
+
self,
|
|
91
|
+
*,
|
|
92
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
93
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
94
|
+
extra_headers: Headers | None = None,
|
|
95
|
+
extra_query: Query | None = None,
|
|
96
|
+
extra_body: Body | None = None,
|
|
97
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
98
|
+
) -> DiscountRetrieveResponse:
|
|
99
|
+
"""
|
|
100
|
+
Returns user's current discount level and percentage based on their purchase
|
|
101
|
+
history.
|
|
102
|
+
"""
|
|
103
|
+
return await self._get(
|
|
104
|
+
"/v1/profile/discount",
|
|
105
|
+
options=make_request_options(
|
|
106
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
107
|
+
),
|
|
108
|
+
cast_to=DiscountRetrieveResponse,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class DiscountResourceWithRawResponse:
|
|
113
|
+
def __init__(self, discount: DiscountResource) -> None:
|
|
114
|
+
self._discount = discount
|
|
115
|
+
|
|
116
|
+
self.retrieve = to_raw_response_wrapper(
|
|
117
|
+
discount.retrieve,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class AsyncDiscountResourceWithRawResponse:
|
|
122
|
+
def __init__(self, discount: AsyncDiscountResource) -> None:
|
|
123
|
+
self._discount = discount
|
|
124
|
+
|
|
125
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
126
|
+
discount.retrieve,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class DiscountResourceWithStreamingResponse:
|
|
131
|
+
def __init__(self, discount: DiscountResource) -> None:
|
|
132
|
+
self._discount = discount
|
|
133
|
+
|
|
134
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
135
|
+
discount.retrieve,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class AsyncDiscountResourceWithStreamingResponse:
|
|
140
|
+
def __init__(self, discount: AsyncDiscountResource) -> None:
|
|
141
|
+
self._discount = discount
|
|
142
|
+
|
|
143
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
144
|
+
discount.retrieve,
|
|
145
|
+
)
|
|
@@ -4,22 +4,38 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
from ...types import profile_change_login_params, profile_change_password_params
|
|
8
|
+
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
9
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
10
|
+
from .discount import (
|
|
11
|
+
DiscountResource,
|
|
12
|
+
AsyncDiscountResource,
|
|
13
|
+
DiscountResourceWithRawResponse,
|
|
14
|
+
AsyncDiscountResourceWithRawResponse,
|
|
15
|
+
DiscountResourceWithStreamingResponse,
|
|
16
|
+
AsyncDiscountResourceWithStreamingResponse,
|
|
17
|
+
)
|
|
18
|
+
from .referral import (
|
|
19
|
+
ReferralResource,
|
|
20
|
+
AsyncReferralResource,
|
|
21
|
+
ReferralResourceWithRawResponse,
|
|
22
|
+
AsyncReferralResourceWithRawResponse,
|
|
23
|
+
ReferralResourceWithStreamingResponse,
|
|
24
|
+
AsyncReferralResourceWithStreamingResponse,
|
|
25
|
+
)
|
|
26
|
+
from ..._compat import cached_property
|
|
27
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
28
|
+
from ..._response import (
|
|
13
29
|
to_raw_response_wrapper,
|
|
14
30
|
to_streamed_response_wrapper,
|
|
15
31
|
async_to_raw_response_wrapper,
|
|
16
32
|
async_to_streamed_response_wrapper,
|
|
17
33
|
)
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
34
|
+
from ..._base_client import make_request_options
|
|
35
|
+
from ...types.profile_retrieve_response import ProfileRetrieveResponse
|
|
36
|
+
from ...types.profile_change_login_response import ProfileChangeLoginResponse
|
|
37
|
+
from ...types.profile_change_password_response import ProfileChangePasswordResponse
|
|
38
|
+
from ...types.profile_unbind_telegram_response import ProfileUnbindTelegramResponse
|
|
23
39
|
|
|
24
40
|
__all__ = ["ProfileResource", "AsyncProfileResource"]
|
|
25
41
|
|
|
@@ -27,6 +43,16 @@ __all__ = ["ProfileResource", "AsyncProfileResource"]
|
|
|
27
43
|
class ProfileResource(SyncAPIResource):
|
|
28
44
|
"""User profile management."""
|
|
29
45
|
|
|
46
|
+
@cached_property
|
|
47
|
+
def discount(self) -> DiscountResource:
|
|
48
|
+
"""User profile management."""
|
|
49
|
+
return DiscountResource(self._client)
|
|
50
|
+
|
|
51
|
+
@cached_property
|
|
52
|
+
def referral(self) -> ReferralResource:
|
|
53
|
+
"""User profile management."""
|
|
54
|
+
return ReferralResource(self._client)
|
|
55
|
+
|
|
30
56
|
@cached_property
|
|
31
57
|
def with_raw_response(self) -> ProfileResourceWithRawResponse:
|
|
32
58
|
"""
|
|
@@ -165,6 +191,16 @@ class ProfileResource(SyncAPIResource):
|
|
|
165
191
|
class AsyncProfileResource(AsyncAPIResource):
|
|
166
192
|
"""User profile management."""
|
|
167
193
|
|
|
194
|
+
@cached_property
|
|
195
|
+
def discount(self) -> AsyncDiscountResource:
|
|
196
|
+
"""User profile management."""
|
|
197
|
+
return AsyncDiscountResource(self._client)
|
|
198
|
+
|
|
199
|
+
@cached_property
|
|
200
|
+
def referral(self) -> AsyncReferralResource:
|
|
201
|
+
"""User profile management."""
|
|
202
|
+
return AsyncReferralResource(self._client)
|
|
203
|
+
|
|
168
204
|
@cached_property
|
|
169
205
|
def with_raw_response(self) -> AsyncProfileResourceWithRawResponse:
|
|
170
206
|
"""
|
|
@@ -319,6 +355,16 @@ class ProfileResourceWithRawResponse:
|
|
|
319
355
|
profile.unbind_telegram,
|
|
320
356
|
)
|
|
321
357
|
|
|
358
|
+
@cached_property
|
|
359
|
+
def discount(self) -> DiscountResourceWithRawResponse:
|
|
360
|
+
"""User profile management."""
|
|
361
|
+
return DiscountResourceWithRawResponse(self._profile.discount)
|
|
362
|
+
|
|
363
|
+
@cached_property
|
|
364
|
+
def referral(self) -> ReferralResourceWithRawResponse:
|
|
365
|
+
"""User profile management."""
|
|
366
|
+
return ReferralResourceWithRawResponse(self._profile.referral)
|
|
367
|
+
|
|
322
368
|
|
|
323
369
|
class AsyncProfileResourceWithRawResponse:
|
|
324
370
|
def __init__(self, profile: AsyncProfileResource) -> None:
|
|
@@ -337,6 +383,16 @@ class AsyncProfileResourceWithRawResponse:
|
|
|
337
383
|
profile.unbind_telegram,
|
|
338
384
|
)
|
|
339
385
|
|
|
386
|
+
@cached_property
|
|
387
|
+
def discount(self) -> AsyncDiscountResourceWithRawResponse:
|
|
388
|
+
"""User profile management."""
|
|
389
|
+
return AsyncDiscountResourceWithRawResponse(self._profile.discount)
|
|
390
|
+
|
|
391
|
+
@cached_property
|
|
392
|
+
def referral(self) -> AsyncReferralResourceWithRawResponse:
|
|
393
|
+
"""User profile management."""
|
|
394
|
+
return AsyncReferralResourceWithRawResponse(self._profile.referral)
|
|
395
|
+
|
|
340
396
|
|
|
341
397
|
class ProfileResourceWithStreamingResponse:
|
|
342
398
|
def __init__(self, profile: ProfileResource) -> None:
|
|
@@ -355,6 +411,16 @@ class ProfileResourceWithStreamingResponse:
|
|
|
355
411
|
profile.unbind_telegram,
|
|
356
412
|
)
|
|
357
413
|
|
|
414
|
+
@cached_property
|
|
415
|
+
def discount(self) -> DiscountResourceWithStreamingResponse:
|
|
416
|
+
"""User profile management."""
|
|
417
|
+
return DiscountResourceWithStreamingResponse(self._profile.discount)
|
|
418
|
+
|
|
419
|
+
@cached_property
|
|
420
|
+
def referral(self) -> ReferralResourceWithStreamingResponse:
|
|
421
|
+
"""User profile management."""
|
|
422
|
+
return ReferralResourceWithStreamingResponse(self._profile.referral)
|
|
423
|
+
|
|
358
424
|
|
|
359
425
|
class AsyncProfileResourceWithStreamingResponse:
|
|
360
426
|
def __init__(self, profile: AsyncProfileResource) -> None:
|
|
@@ -372,3 +438,13 @@ class AsyncProfileResourceWithStreamingResponse:
|
|
|
372
438
|
self.unbind_telegram = async_to_streamed_response_wrapper(
|
|
373
439
|
profile.unbind_telegram,
|
|
374
440
|
)
|
|
441
|
+
|
|
442
|
+
@cached_property
|
|
443
|
+
def discount(self) -> AsyncDiscountResourceWithStreamingResponse:
|
|
444
|
+
"""User profile management."""
|
|
445
|
+
return AsyncDiscountResourceWithStreamingResponse(self._profile.discount)
|
|
446
|
+
|
|
447
|
+
@cached_property
|
|
448
|
+
def referral(self) -> AsyncReferralResourceWithStreamingResponse:
|
|
449
|
+
"""User profile management."""
|
|
450
|
+
return AsyncReferralResourceWithStreamingResponse(self._profile.referral)
|
|
@@ -0,0 +1,230 @@
|
|
|
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 Body, Query, Headers, NotGiven, not_given
|
|
8
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
9
|
+
from ..._compat import cached_property
|
|
10
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
+
from ..._response import (
|
|
12
|
+
to_raw_response_wrapper,
|
|
13
|
+
to_streamed_response_wrapper,
|
|
14
|
+
async_to_raw_response_wrapper,
|
|
15
|
+
async_to_streamed_response_wrapper,
|
|
16
|
+
)
|
|
17
|
+
from ..._base_client import make_request_options
|
|
18
|
+
from ...types.profile import referral_transfer_balance_params
|
|
19
|
+
from ...types.profile.referral_retrieve_response import ReferralRetrieveResponse
|
|
20
|
+
from ...types.profile.referral_transfer_balance_response import ReferralTransferBalanceResponse
|
|
21
|
+
|
|
22
|
+
__all__ = ["ReferralResource", "AsyncReferralResource"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ReferralResource(SyncAPIResource):
|
|
26
|
+
"""User profile management."""
|
|
27
|
+
|
|
28
|
+
@cached_property
|
|
29
|
+
def with_raw_response(self) -> ReferralResourceWithRawResponse:
|
|
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 ReferralResourceWithRawResponse(self)
|
|
37
|
+
|
|
38
|
+
@cached_property
|
|
39
|
+
def with_streaming_response(self) -> ReferralResourceWithStreamingResponse:
|
|
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 ReferralResourceWithStreamingResponse(self)
|
|
46
|
+
|
|
47
|
+
def retrieve(
|
|
48
|
+
self,
|
|
49
|
+
*,
|
|
50
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
51
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
52
|
+
extra_headers: Headers | None = None,
|
|
53
|
+
extra_query: Query | None = None,
|
|
54
|
+
extra_body: Body | None = None,
|
|
55
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
56
|
+
) -> ReferralRetrieveResponse:
|
|
57
|
+
"""
|
|
58
|
+
Returns user's referral program status, including current level, commission
|
|
59
|
+
percentage, referral count, and earnings.
|
|
60
|
+
"""
|
|
61
|
+
return self._get(
|
|
62
|
+
"/v1/profile/referral",
|
|
63
|
+
options=make_request_options(
|
|
64
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
65
|
+
),
|
|
66
|
+
cast_to=ReferralRetrieveResponse,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
def transfer_balance(
|
|
70
|
+
self,
|
|
71
|
+
*,
|
|
72
|
+
amount: float,
|
|
73
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
74
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
75
|
+
extra_headers: Headers | None = None,
|
|
76
|
+
extra_query: Query | None = None,
|
|
77
|
+
extra_body: Body | None = None,
|
|
78
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
79
|
+
) -> ReferralTransferBalanceResponse:
|
|
80
|
+
"""
|
|
81
|
+
Change the current user password to a new one.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
amount: Amount to transfer from referral balance
|
|
85
|
+
|
|
86
|
+
extra_headers: Send extra headers
|
|
87
|
+
|
|
88
|
+
extra_query: Add additional query parameters to the request
|
|
89
|
+
|
|
90
|
+
extra_body: Add additional JSON properties to the request
|
|
91
|
+
|
|
92
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
93
|
+
"""
|
|
94
|
+
return self._post(
|
|
95
|
+
"/v1/profile/referral/transfer-balance",
|
|
96
|
+
body=maybe_transform({"amount": amount}, referral_transfer_balance_params.ReferralTransferBalanceParams),
|
|
97
|
+
options=make_request_options(
|
|
98
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
99
|
+
),
|
|
100
|
+
cast_to=ReferralTransferBalanceResponse,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class AsyncReferralResource(AsyncAPIResource):
|
|
105
|
+
"""User profile management."""
|
|
106
|
+
|
|
107
|
+
@cached_property
|
|
108
|
+
def with_raw_response(self) -> AsyncReferralResourceWithRawResponse:
|
|
109
|
+
"""
|
|
110
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
111
|
+
the raw response object instead of the parsed content.
|
|
112
|
+
|
|
113
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#accessing-raw-response-data-eg-headers
|
|
114
|
+
"""
|
|
115
|
+
return AsyncReferralResourceWithRawResponse(self)
|
|
116
|
+
|
|
117
|
+
@cached_property
|
|
118
|
+
def with_streaming_response(self) -> AsyncReferralResourceWithStreamingResponse:
|
|
119
|
+
"""
|
|
120
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
121
|
+
|
|
122
|
+
For more information, see https://www.github.com/cameo6/gmt-python-sdk#with_streaming_response
|
|
123
|
+
"""
|
|
124
|
+
return AsyncReferralResourceWithStreamingResponse(self)
|
|
125
|
+
|
|
126
|
+
async def retrieve(
|
|
127
|
+
self,
|
|
128
|
+
*,
|
|
129
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
130
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
131
|
+
extra_headers: Headers | None = None,
|
|
132
|
+
extra_query: Query | None = None,
|
|
133
|
+
extra_body: Body | None = None,
|
|
134
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
135
|
+
) -> ReferralRetrieveResponse:
|
|
136
|
+
"""
|
|
137
|
+
Returns user's referral program status, including current level, commission
|
|
138
|
+
percentage, referral count, and earnings.
|
|
139
|
+
"""
|
|
140
|
+
return await self._get(
|
|
141
|
+
"/v1/profile/referral",
|
|
142
|
+
options=make_request_options(
|
|
143
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
144
|
+
),
|
|
145
|
+
cast_to=ReferralRetrieveResponse,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
async def transfer_balance(
|
|
149
|
+
self,
|
|
150
|
+
*,
|
|
151
|
+
amount: float,
|
|
152
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
153
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
154
|
+
extra_headers: Headers | None = None,
|
|
155
|
+
extra_query: Query | None = None,
|
|
156
|
+
extra_body: Body | None = None,
|
|
157
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
158
|
+
) -> ReferralTransferBalanceResponse:
|
|
159
|
+
"""
|
|
160
|
+
Change the current user password to a new one.
|
|
161
|
+
|
|
162
|
+
Args:
|
|
163
|
+
amount: Amount to transfer from referral balance
|
|
164
|
+
|
|
165
|
+
extra_headers: Send extra headers
|
|
166
|
+
|
|
167
|
+
extra_query: Add additional query parameters to the request
|
|
168
|
+
|
|
169
|
+
extra_body: Add additional JSON properties to the request
|
|
170
|
+
|
|
171
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
172
|
+
"""
|
|
173
|
+
return await self._post(
|
|
174
|
+
"/v1/profile/referral/transfer-balance",
|
|
175
|
+
body=await async_maybe_transform(
|
|
176
|
+
{"amount": amount}, referral_transfer_balance_params.ReferralTransferBalanceParams
|
|
177
|
+
),
|
|
178
|
+
options=make_request_options(
|
|
179
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
180
|
+
),
|
|
181
|
+
cast_to=ReferralTransferBalanceResponse,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class ReferralResourceWithRawResponse:
|
|
186
|
+
def __init__(self, referral: ReferralResource) -> None:
|
|
187
|
+
self._referral = referral
|
|
188
|
+
|
|
189
|
+
self.retrieve = to_raw_response_wrapper(
|
|
190
|
+
referral.retrieve,
|
|
191
|
+
)
|
|
192
|
+
self.transfer_balance = to_raw_response_wrapper(
|
|
193
|
+
referral.transfer_balance,
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class AsyncReferralResourceWithRawResponse:
|
|
198
|
+
def __init__(self, referral: AsyncReferralResource) -> None:
|
|
199
|
+
self._referral = referral
|
|
200
|
+
|
|
201
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
202
|
+
referral.retrieve,
|
|
203
|
+
)
|
|
204
|
+
self.transfer_balance = async_to_raw_response_wrapper(
|
|
205
|
+
referral.transfer_balance,
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
class ReferralResourceWithStreamingResponse:
|
|
210
|
+
def __init__(self, referral: ReferralResource) -> None:
|
|
211
|
+
self._referral = referral
|
|
212
|
+
|
|
213
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
214
|
+
referral.retrieve,
|
|
215
|
+
)
|
|
216
|
+
self.transfer_balance = to_streamed_response_wrapper(
|
|
217
|
+
referral.transfer_balance,
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class AsyncReferralResourceWithStreamingResponse:
|
|
222
|
+
def __init__(self, referral: AsyncReferralResource) -> None:
|
|
223
|
+
self._referral = referral
|
|
224
|
+
|
|
225
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
226
|
+
referral.retrieve,
|
|
227
|
+
)
|
|
228
|
+
self.transfer_balance = async_to_streamed_response_wrapper(
|
|
229
|
+
referral.transfer_balance,
|
|
230
|
+
)
|