gmt-python-sdk 0.24.2__tar.gz → 0.26.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.
Files changed (120) hide show
  1. gmt_python_sdk-0.26.0/.release-please-manifest.json +3 -0
  2. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/CHANGELOG.md +21 -0
  3. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/PKG-INFO +1 -1
  4. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/api.md +29 -4
  5. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/pyproject.toml +1 -1
  6. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_client.py +1 -1
  7. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_version.py +1 -1
  8. gmt_python_sdk-0.26.0/src/gmt/resources/profile/__init__.py +47 -0
  9. gmt_python_sdk-0.26.0/src/gmt/resources/profile/discount.py +145 -0
  10. {gmt_python_sdk-0.24.2/src/gmt/resources → gmt_python_sdk-0.26.0/src/gmt/resources/profile}/profile.py +87 -11
  11. gmt_python_sdk-0.26.0/src/gmt/resources/profile/referral.py +230 -0
  12. gmt_python_sdk-0.26.0/src/gmt/types/profile/__init__.py +8 -0
  13. gmt_python_sdk-0.26.0/src/gmt/types/profile/discount_retrieve_response.py +94 -0
  14. gmt_python_sdk-0.26.0/src/gmt/types/profile/referral_retrieve_response.py +121 -0
  15. gmt_python_sdk-0.26.0/src/gmt/types/profile/referral_transfer_balance_params.py +12 -0
  16. gmt_python_sdk-0.26.0/src/gmt/types/profile/referral_transfer_balance_response.py +50 -0
  17. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/profile_retrieve_response.py +1 -48
  18. gmt_python_sdk-0.26.0/tests/api_resources/profile/test_discount.py +80 -0
  19. gmt_python_sdk-0.26.0/tests/api_resources/profile/test_referral.py +151 -0
  20. gmt_python_sdk-0.26.0/tests/api_resources/purchases/__init__.py +1 -0
  21. gmt_python_sdk-0.24.2/.release-please-manifest.json +0 -3
  22. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/.gitignore +0 -0
  23. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/CONTRIBUTING.md +0 -0
  24. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/LICENSE +0 -0
  25. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/README.md +0 -0
  26. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/SECURITY.md +0 -0
  27. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/bin/check-release-environment +0 -0
  28. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/bin/publish-pypi +0 -0
  29. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/examples/.keep +0 -0
  30. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/release-please-config.json +0 -0
  31. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/requirements-dev.lock +0 -0
  32. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/__init__.py +0 -0
  33. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_base_client.py +0 -0
  34. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_compat.py +0 -0
  35. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_constants.py +0 -0
  36. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_exceptions.py +0 -0
  37. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_files.py +0 -0
  38. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_models.py +0 -0
  39. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_qs.py +0 -0
  40. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_resource.py +0 -0
  41. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_response.py +0 -0
  42. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_streaming.py +0 -0
  43. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_types.py +0 -0
  44. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/__init__.py +0 -0
  45. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_compat.py +0 -0
  46. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_datetime_parse.py +0 -0
  47. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_json.py +0 -0
  48. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_logs.py +0 -0
  49. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_proxy.py +0 -0
  50. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_reflection.py +0 -0
  51. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_resources_proxy.py +0 -0
  52. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_streams.py +0 -0
  53. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_sync.py +0 -0
  54. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_transform.py +0 -0
  55. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_typing.py +0 -0
  56. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/_utils/_utils.py +0 -0
  57. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/lib/.keep +0 -0
  58. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/pagination.py +0 -0
  59. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/py.typed +0 -0
  60. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/resources/__init__.py +0 -0
  61. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/resources/accounts.py +0 -0
  62. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/resources/purchases/__init__.py +0 -0
  63. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/resources/purchases/bulk.py +0 -0
  64. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/resources/purchases/purchases.py +0 -0
  65. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/resources/service.py +0 -0
  66. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/resources/webhooks.py +0 -0
  67. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/__init__.py +0 -0
  68. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/account_list_countries_params.py +0 -0
  69. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/account_list_countries_response.py +0 -0
  70. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/account_list_params.py +0 -0
  71. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/account_list_response.py +0 -0
  72. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/account_retrieve_response.py +0 -0
  73. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/profile_change_login_params.py +0 -0
  74. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/profile_change_login_response.py +0 -0
  75. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/profile_change_password_params.py +0 -0
  76. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/profile_change_password_response.py +0 -0
  77. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/profile_unbind_telegram_response.py +0 -0
  78. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchase_create_params.py +0 -0
  79. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchase_create_response.py +0 -0
  80. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchase_list_params.py +0 -0
  81. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchase_list_response.py +0 -0
  82. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchase_refund_response.py +0 -0
  83. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchase_request_verification_code_params.py +0 -0
  84. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchase_request_verification_code_response.py +0 -0
  85. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchase_retrieve_response.py +0 -0
  86. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchases/__init__.py +0 -0
  87. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchases/bulk_create_params.py +0 -0
  88. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchases/bulk_create_response.py +0 -0
  89. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/purchases/bulk_retrieve_response.py +0 -0
  90. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/service_get_server_time_response.py +0 -0
  91. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/service_health_check_response.py +0 -0
  92. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/webhook_test_params.py +0 -0
  93. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/src/gmt/types/webhook_test_response.py +0 -0
  94. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/__init__.py +0 -0
  95. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/api_resources/__init__.py +0 -0
  96. {gmt_python_sdk-0.24.2/tests/api_resources/purchases → gmt_python_sdk-0.26.0/tests/api_resources/profile}/__init__.py +0 -0
  97. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/api_resources/purchases/test_bulk.py +0 -0
  98. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/api_resources/test_accounts.py +0 -0
  99. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/api_resources/test_profile.py +0 -0
  100. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/api_resources/test_purchases.py +0 -0
  101. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/api_resources/test_service.py +0 -0
  102. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/api_resources/test_webhooks.py +0 -0
  103. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/conftest.py +0 -0
  104. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/sample_file.txt +0 -0
  105. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_client.py +0 -0
  106. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_deepcopy.py +0 -0
  107. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_extract_files.py +0 -0
  108. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_files.py +0 -0
  109. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_models.py +0 -0
  110. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_qs.py +0 -0
  111. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_required_args.py +0 -0
  112. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_response.py +0 -0
  113. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_streaming.py +0 -0
  114. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_transform.py +0 -0
  115. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_utils/test_datetime_parse.py +0 -0
  116. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_utils/test_json.py +0 -0
  117. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_utils/test_proxy.py +0 -0
  118. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/test_utils/test_typing.py +0 -0
  119. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/tests/utils.py +0 -0
  120. {gmt_python_sdk-0.24.2 → gmt_python_sdk-0.26.0}/uv.lock +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.26.0"
3
+ }
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.26.0 (2026-03-19)
4
+
5
+ Full Changelog: [v0.25.0...v0.26.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.25.0...v0.26.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([e2cc7ce](https://github.com/cameo6/gmt-python-sdk/commit/e2cc7ce08e452707d3e04a3b2d68e0cd9f8039cf))
10
+
11
+ ## 0.25.0 (2026-03-19)
12
+
13
+ Full Changelog: [v0.24.2...v0.25.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.24.2...v0.25.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** manual updates ([7c3c060](https://github.com/cameo6/gmt-python-sdk/commit/7c3c060715f9b4ecca26af06b909abeaeb218538))
18
+
19
+
20
+ ### Chores
21
+
22
+ * **internal:** tweak CI branches ([64e5f36](https://github.com/cameo6/gmt-python-sdk/commit/64e5f36e98a4937f8d51a5e52572f6b255c30ea8))
23
+
3
24
  ## 0.24.2 (2026-03-17)
4
25
 
5
26
  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.24.2
3
+ Version: 0.26.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
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gmt-python-sdk"
3
- version = "0.24.2"
3
+ version = "0.26.0"
4
4
  description = "The official Python library for the gmt API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -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"]
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "gmt"
4
- __version__ = "0.24.2" # x-release-please-version
4
+ __version__ = "0.26.0" # x-release-please-version
@@ -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 ..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 .._compat import cached_property
11
- from .._resource import SyncAPIResource, AsyncAPIResource
12
- from .._response import (
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 .._base_client import make_request_options
19
- from ..types.profile_retrieve_response import ProfileRetrieveResponse
20
- from ..types.profile_change_login_response import ProfileChangeLoginResponse
21
- from ..types.profile_change_password_response import ProfileChangePasswordResponse
22
- from ..types.profile_unbind_telegram_response import ProfileUnbindTelegramResponse
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)