gmt-python-sdk 0.25.0__tar.gz → 0.27.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 (127) hide show
  1. gmt_python_sdk-0.27.0/.release-please-manifest.json +3 -0
  2. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/CHANGELOG.md +16 -0
  3. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/PKG-INFO +1 -1
  4. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/api.md +14 -2
  5. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/pyproject.toml +1 -1
  6. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_version.py +1 -1
  7. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/profile/profile.py +8 -8
  8. gmt_python_sdk-0.27.0/src/gmt/resources/profile/referral/__init__.py +33 -0
  9. {gmt_python_sdk-0.25.0/src/gmt/resources/profile → gmt_python_sdk-0.27.0/src/gmt/resources/profile/referral}/referral.py +47 -9
  10. gmt_python_sdk-0.27.0/src/gmt/resources/profile/referral/transaction.py +200 -0
  11. gmt_python_sdk-0.27.0/src/gmt/types/profile/referral/__init__.py +6 -0
  12. gmt_python_sdk-0.27.0/src/gmt/types/profile/referral/transaction_list_params.py +15 -0
  13. gmt_python_sdk-0.27.0/src/gmt/types/profile/referral/transaction_list_response.py +45 -0
  14. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile_retrieve_response.py +1 -48
  15. gmt_python_sdk-0.27.0/tests/api_resources/profile/referral/test_transaction.py +99 -0
  16. gmt_python_sdk-0.27.0/tests/api_resources/purchases/__init__.py +1 -0
  17. gmt_python_sdk-0.25.0/.release-please-manifest.json +0 -3
  18. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/.gitignore +0 -0
  19. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/CONTRIBUTING.md +0 -0
  20. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/LICENSE +0 -0
  21. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/README.md +0 -0
  22. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/SECURITY.md +0 -0
  23. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/bin/check-release-environment +0 -0
  24. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/bin/publish-pypi +0 -0
  25. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/examples/.keep +0 -0
  26. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/release-please-config.json +0 -0
  27. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/requirements-dev.lock +0 -0
  28. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/__init__.py +0 -0
  29. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_base_client.py +0 -0
  30. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_client.py +0 -0
  31. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_compat.py +0 -0
  32. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_constants.py +0 -0
  33. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_exceptions.py +0 -0
  34. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_files.py +0 -0
  35. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_models.py +0 -0
  36. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_qs.py +0 -0
  37. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_resource.py +0 -0
  38. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_response.py +0 -0
  39. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_streaming.py +0 -0
  40. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_types.py +0 -0
  41. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/__init__.py +0 -0
  42. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_compat.py +0 -0
  43. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_datetime_parse.py +0 -0
  44. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_json.py +0 -0
  45. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_logs.py +0 -0
  46. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_proxy.py +0 -0
  47. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_reflection.py +0 -0
  48. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_resources_proxy.py +0 -0
  49. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_streams.py +0 -0
  50. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_sync.py +0 -0
  51. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_transform.py +0 -0
  52. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_typing.py +0 -0
  53. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/_utils/_utils.py +0 -0
  54. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/lib/.keep +0 -0
  55. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/pagination.py +0 -0
  56. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/py.typed +0 -0
  57. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/__init__.py +0 -0
  58. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/accounts.py +0 -0
  59. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/profile/__init__.py +0 -0
  60. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/profile/discount.py +0 -0
  61. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/purchases/__init__.py +0 -0
  62. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/purchases/bulk.py +0 -0
  63. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/purchases/purchases.py +0 -0
  64. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/service.py +0 -0
  65. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/resources/webhooks.py +0 -0
  66. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/__init__.py +0 -0
  67. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/account_list_countries_params.py +0 -0
  68. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/account_list_countries_response.py +0 -0
  69. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/account_list_params.py +0 -0
  70. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/account_list_response.py +0 -0
  71. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/account_retrieve_response.py +0 -0
  72. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile/__init__.py +0 -0
  73. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile/discount_retrieve_response.py +0 -0
  74. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile/referral_retrieve_response.py +0 -0
  75. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile/referral_transfer_balance_params.py +0 -0
  76. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile/referral_transfer_balance_response.py +0 -0
  77. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile_change_login_params.py +0 -0
  78. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile_change_login_response.py +0 -0
  79. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile_change_password_params.py +0 -0
  80. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile_change_password_response.py +0 -0
  81. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/profile_unbind_telegram_response.py +0 -0
  82. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchase_create_params.py +0 -0
  83. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchase_create_response.py +0 -0
  84. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchase_list_params.py +0 -0
  85. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchase_list_response.py +0 -0
  86. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchase_refund_response.py +0 -0
  87. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchase_request_verification_code_params.py +0 -0
  88. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchase_request_verification_code_response.py +0 -0
  89. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchase_retrieve_response.py +0 -0
  90. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchases/__init__.py +0 -0
  91. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchases/bulk_create_params.py +0 -0
  92. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchases/bulk_create_response.py +0 -0
  93. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/purchases/bulk_retrieve_response.py +0 -0
  94. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/service_get_server_time_response.py +0 -0
  95. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/service_health_check_response.py +0 -0
  96. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/webhook_test_params.py +0 -0
  97. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/src/gmt/types/webhook_test_response.py +0 -0
  98. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/__init__.py +0 -0
  99. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/__init__.py +0 -0
  100. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/profile/__init__.py +0 -0
  101. {gmt_python_sdk-0.25.0/tests/api_resources/purchases → gmt_python_sdk-0.27.0/tests/api_resources/profile/referral}/__init__.py +0 -0
  102. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/profile/test_discount.py +0 -0
  103. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/profile/test_referral.py +0 -0
  104. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/purchases/test_bulk.py +0 -0
  105. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/test_accounts.py +0 -0
  106. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/test_profile.py +0 -0
  107. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/test_purchases.py +0 -0
  108. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/test_service.py +0 -0
  109. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/api_resources/test_webhooks.py +0 -0
  110. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/conftest.py +0 -0
  111. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/sample_file.txt +0 -0
  112. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_client.py +0 -0
  113. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_deepcopy.py +0 -0
  114. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_extract_files.py +0 -0
  115. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_files.py +0 -0
  116. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_models.py +0 -0
  117. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_qs.py +0 -0
  118. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_required_args.py +0 -0
  119. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_response.py +0 -0
  120. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_streaming.py +0 -0
  121. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_transform.py +0 -0
  122. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_utils/test_datetime_parse.py +0 -0
  123. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_utils/test_json.py +0 -0
  124. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_utils/test_proxy.py +0 -0
  125. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/test_utils/test_typing.py +0 -0
  126. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/tests/utils.py +0 -0
  127. {gmt_python_sdk-0.25.0 → gmt_python_sdk-0.27.0}/uv.lock +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.27.0"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.27.0 (2026-03-19)
4
+
5
+ Full Changelog: [v0.26.0...v0.27.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.26.0...v0.27.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([ff595bf](https://github.com/cameo6/gmt-python-sdk/commit/ff595bf16b8743cae98796cc0faead1b1918b924))
10
+
11
+ ## 0.26.0 (2026-03-19)
12
+
13
+ Full Changelog: [v0.25.0...v0.26.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.25.0...v0.26.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([e2cc7ce](https://github.com/cameo6/gmt-python-sdk/commit/e2cc7ce08e452707d3e04a3b2d68e0cd9f8039cf))
18
+
3
19
  ## 0.25.0 (2026-03-19)
4
20
 
5
21
  Full Changelog: [v0.24.2...v0.25.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.24.2...v0.25.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gmt-python-sdk
3
- Version: 0.25.0
3
+ Version: 0.27.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
@@ -67,8 +67,20 @@ from gmt.types.profile import ReferralRetrieveResponse, ReferralTransferBalanceR
67
67
 
68
68
  Methods:
69
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>
70
+ - <code title="get /v1/profile/referral">client.profile.referral.<a href="./src/gmt/resources/profile/referral/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/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>
72
+
73
+ ### Transaction
74
+
75
+ Types:
76
+
77
+ ```python
78
+ from gmt.types.profile.referral import TransactionListResponse
79
+ ```
80
+
81
+ Methods:
82
+
83
+ - <code title="get /v1/profile/referral/transaction">client.profile.referral.transaction.<a href="./src/gmt/resources/profile/referral/transaction.py">list</a>(\*\*<a href="src/gmt/types/profile/referral/transaction_list_params.py">params</a>) -> <a href="./src/gmt/types/profile/referral/transaction_list_response.py">SyncPageNumber[TransactionListResponse]</a></code>
72
84
 
73
85
  # Purchases
74
86
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gmt-python-sdk"
3
- version = "0.25.0"
3
+ version = "0.27.0"
4
4
  description = "The official Python library for the gmt API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -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.25.0" # x-release-please-version
4
+ __version__ = "0.27.0" # x-release-please-version
@@ -15,14 +15,6 @@ from .discount import (
15
15
  DiscountResourceWithStreamingResponse,
16
16
  AsyncDiscountResourceWithStreamingResponse,
17
17
  )
18
- from .referral import (
19
- ReferralResource,
20
- AsyncReferralResource,
21
- ReferralResourceWithRawResponse,
22
- AsyncReferralResourceWithRawResponse,
23
- ReferralResourceWithStreamingResponse,
24
- AsyncReferralResourceWithStreamingResponse,
25
- )
26
18
  from ..._compat import cached_property
27
19
  from ..._resource import SyncAPIResource, AsyncAPIResource
28
20
  from ..._response import (
@@ -32,6 +24,14 @@ from ..._response import (
32
24
  async_to_streamed_response_wrapper,
33
25
  )
34
26
  from ..._base_client import make_request_options
27
+ from .referral.referral import (
28
+ ReferralResource,
29
+ AsyncReferralResource,
30
+ ReferralResourceWithRawResponse,
31
+ AsyncReferralResourceWithRawResponse,
32
+ ReferralResourceWithStreamingResponse,
33
+ AsyncReferralResourceWithStreamingResponse,
34
+ )
35
35
  from ...types.profile_retrieve_response import ProfileRetrieveResponse
36
36
  from ...types.profile_change_login_response import ProfileChangeLoginResponse
37
37
  from ...types.profile_change_password_response import ProfileChangePasswordResponse
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .referral import (
4
+ ReferralResource,
5
+ AsyncReferralResource,
6
+ ReferralResourceWithRawResponse,
7
+ AsyncReferralResourceWithRawResponse,
8
+ ReferralResourceWithStreamingResponse,
9
+ AsyncReferralResourceWithStreamingResponse,
10
+ )
11
+ from .transaction import (
12
+ TransactionResource,
13
+ AsyncTransactionResource,
14
+ TransactionResourceWithRawResponse,
15
+ AsyncTransactionResourceWithRawResponse,
16
+ TransactionResourceWithStreamingResponse,
17
+ AsyncTransactionResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "TransactionResource",
22
+ "AsyncTransactionResource",
23
+ "TransactionResourceWithRawResponse",
24
+ "AsyncTransactionResourceWithRawResponse",
25
+ "TransactionResourceWithStreamingResponse",
26
+ "AsyncTransactionResourceWithStreamingResponse",
27
+ "ReferralResource",
28
+ "AsyncReferralResource",
29
+ "ReferralResourceWithRawResponse",
30
+ "AsyncReferralResourceWithRawResponse",
31
+ "ReferralResourceWithStreamingResponse",
32
+ "AsyncReferralResourceWithStreamingResponse",
33
+ ]
@@ -4,20 +4,28 @@ from __future__ import annotations
4
4
 
5
5
  import httpx
6
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 (
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 .transaction import (
11
+ TransactionResource,
12
+ AsyncTransactionResource,
13
+ TransactionResourceWithRawResponse,
14
+ AsyncTransactionResourceWithRawResponse,
15
+ TransactionResourceWithStreamingResponse,
16
+ AsyncTransactionResourceWithStreamingResponse,
17
+ )
18
+ from ...._resource import SyncAPIResource, AsyncAPIResource
19
+ from ...._response import (
12
20
  to_raw_response_wrapper,
13
21
  to_streamed_response_wrapper,
14
22
  async_to_raw_response_wrapper,
15
23
  async_to_streamed_response_wrapper,
16
24
  )
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
25
+ from ...._base_client import make_request_options
26
+ from ....types.profile import referral_transfer_balance_params
27
+ from ....types.profile.referral_retrieve_response import ReferralRetrieveResponse
28
+ from ....types.profile.referral_transfer_balance_response import ReferralTransferBalanceResponse
21
29
 
22
30
  __all__ = ["ReferralResource", "AsyncReferralResource"]
23
31
 
@@ -25,6 +33,11 @@ __all__ = ["ReferralResource", "AsyncReferralResource"]
25
33
  class ReferralResource(SyncAPIResource):
26
34
  """User profile management."""
27
35
 
36
+ @cached_property
37
+ def transaction(self) -> TransactionResource:
38
+ """User profile management."""
39
+ return TransactionResource(self._client)
40
+
28
41
  @cached_property
29
42
  def with_raw_response(self) -> ReferralResourceWithRawResponse:
30
43
  """
@@ -104,6 +117,11 @@ class ReferralResource(SyncAPIResource):
104
117
  class AsyncReferralResource(AsyncAPIResource):
105
118
  """User profile management."""
106
119
 
120
+ @cached_property
121
+ def transaction(self) -> AsyncTransactionResource:
122
+ """User profile management."""
123
+ return AsyncTransactionResource(self._client)
124
+
107
125
  @cached_property
108
126
  def with_raw_response(self) -> AsyncReferralResourceWithRawResponse:
109
127
  """
@@ -193,6 +211,11 @@ class ReferralResourceWithRawResponse:
193
211
  referral.transfer_balance,
194
212
  )
195
213
 
214
+ @cached_property
215
+ def transaction(self) -> TransactionResourceWithRawResponse:
216
+ """User profile management."""
217
+ return TransactionResourceWithRawResponse(self._referral.transaction)
218
+
196
219
 
197
220
  class AsyncReferralResourceWithRawResponse:
198
221
  def __init__(self, referral: AsyncReferralResource) -> None:
@@ -205,6 +228,11 @@ class AsyncReferralResourceWithRawResponse:
205
228
  referral.transfer_balance,
206
229
  )
207
230
 
231
+ @cached_property
232
+ def transaction(self) -> AsyncTransactionResourceWithRawResponse:
233
+ """User profile management."""
234
+ return AsyncTransactionResourceWithRawResponse(self._referral.transaction)
235
+
208
236
 
209
237
  class ReferralResourceWithStreamingResponse:
210
238
  def __init__(self, referral: ReferralResource) -> None:
@@ -217,6 +245,11 @@ class ReferralResourceWithStreamingResponse:
217
245
  referral.transfer_balance,
218
246
  )
219
247
 
248
+ @cached_property
249
+ def transaction(self) -> TransactionResourceWithStreamingResponse:
250
+ """User profile management."""
251
+ return TransactionResourceWithStreamingResponse(self._referral.transaction)
252
+
220
253
 
221
254
  class AsyncReferralResourceWithStreamingResponse:
222
255
  def __init__(self, referral: AsyncReferralResource) -> None:
@@ -228,3 +261,8 @@ class AsyncReferralResourceWithStreamingResponse:
228
261
  self.transfer_balance = async_to_streamed_response_wrapper(
229
262
  referral.transfer_balance,
230
263
  )
264
+
265
+ @cached_property
266
+ def transaction(self) -> AsyncTransactionResourceWithStreamingResponse:
267
+ """User profile management."""
268
+ return AsyncTransactionResourceWithStreamingResponse(self._referral.transaction)
@@ -0,0 +1,200 @@
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
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 ....pagination import SyncPageNumber, AsyncPageNumber
18
+ from ...._base_client import AsyncPaginator, make_request_options
19
+ from ....types.profile.referral import transaction_list_params
20
+ from ....types.profile.referral.transaction_list_response import TransactionListResponse
21
+
22
+ __all__ = ["TransactionResource", "AsyncTransactionResource"]
23
+
24
+
25
+ class TransactionResource(SyncAPIResource):
26
+ """User profile management."""
27
+
28
+ @cached_property
29
+ def with_raw_response(self) -> TransactionResourceWithRawResponse:
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 TransactionResourceWithRawResponse(self)
37
+
38
+ @cached_property
39
+ def with_streaming_response(self) -> TransactionResourceWithStreamingResponse:
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 TransactionResourceWithStreamingResponse(self)
46
+
47
+ def list(
48
+ self,
49
+ *,
50
+ page: int,
51
+ page_size: int,
52
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
53
+ # The extra values given here take precedence over values defined on the client or passed to this method.
54
+ extra_headers: Headers | None = None,
55
+ extra_query: Query | None = None,
56
+ extra_body: Body | None = None,
57
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
58
+ ) -> SyncPageNumber[TransactionListResponse]:
59
+ """
60
+ Returns paginated referral transaction history for the authenticated user,
61
+ ordered by newest first.
62
+
63
+ Args:
64
+ page: Page number.
65
+
66
+ page_size: Number of items per page.
67
+
68
+ extra_headers: Send extra headers
69
+
70
+ extra_query: Add additional query parameters to the request
71
+
72
+ extra_body: Add additional JSON properties to the request
73
+
74
+ timeout: Override the client-level default timeout for this request, in seconds
75
+ """
76
+ return self._get_api_list(
77
+ "/v1/profile/referral/transaction",
78
+ page=SyncPageNumber[TransactionListResponse],
79
+ options=make_request_options(
80
+ extra_headers=extra_headers,
81
+ extra_query=extra_query,
82
+ extra_body=extra_body,
83
+ timeout=timeout,
84
+ query=maybe_transform(
85
+ {
86
+ "page": page,
87
+ "page_size": page_size,
88
+ },
89
+ transaction_list_params.TransactionListParams,
90
+ ),
91
+ ),
92
+ model=TransactionListResponse,
93
+ )
94
+
95
+
96
+ class AsyncTransactionResource(AsyncAPIResource):
97
+ """User profile management."""
98
+
99
+ @cached_property
100
+ def with_raw_response(self) -> AsyncTransactionResourceWithRawResponse:
101
+ """
102
+ This property can be used as a prefix for any HTTP method call to return
103
+ the raw response object instead of the parsed content.
104
+
105
+ For more information, see https://www.github.com/cameo6/gmt-python-sdk#accessing-raw-response-data-eg-headers
106
+ """
107
+ return AsyncTransactionResourceWithRawResponse(self)
108
+
109
+ @cached_property
110
+ def with_streaming_response(self) -> AsyncTransactionResourceWithStreamingResponse:
111
+ """
112
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
113
+
114
+ For more information, see https://www.github.com/cameo6/gmt-python-sdk#with_streaming_response
115
+ """
116
+ return AsyncTransactionResourceWithStreamingResponse(self)
117
+
118
+ def list(
119
+ self,
120
+ *,
121
+ page: int,
122
+ page_size: int,
123
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
124
+ # The extra values given here take precedence over values defined on the client or passed to this method.
125
+ extra_headers: Headers | None = None,
126
+ extra_query: Query | None = None,
127
+ extra_body: Body | None = None,
128
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
129
+ ) -> AsyncPaginator[TransactionListResponse, AsyncPageNumber[TransactionListResponse]]:
130
+ """
131
+ Returns paginated referral transaction history for the authenticated user,
132
+ ordered by newest first.
133
+
134
+ Args:
135
+ page: Page number.
136
+
137
+ page_size: Number of items per page.
138
+
139
+ extra_headers: Send extra headers
140
+
141
+ extra_query: Add additional query parameters to the request
142
+
143
+ extra_body: Add additional JSON properties to the request
144
+
145
+ timeout: Override the client-level default timeout for this request, in seconds
146
+ """
147
+ return self._get_api_list(
148
+ "/v1/profile/referral/transaction",
149
+ page=AsyncPageNumber[TransactionListResponse],
150
+ options=make_request_options(
151
+ extra_headers=extra_headers,
152
+ extra_query=extra_query,
153
+ extra_body=extra_body,
154
+ timeout=timeout,
155
+ query=maybe_transform(
156
+ {
157
+ "page": page,
158
+ "page_size": page_size,
159
+ },
160
+ transaction_list_params.TransactionListParams,
161
+ ),
162
+ ),
163
+ model=TransactionListResponse,
164
+ )
165
+
166
+
167
+ class TransactionResourceWithRawResponse:
168
+ def __init__(self, transaction: TransactionResource) -> None:
169
+ self._transaction = transaction
170
+
171
+ self.list = to_raw_response_wrapper(
172
+ transaction.list,
173
+ )
174
+
175
+
176
+ class AsyncTransactionResourceWithRawResponse:
177
+ def __init__(self, transaction: AsyncTransactionResource) -> None:
178
+ self._transaction = transaction
179
+
180
+ self.list = async_to_raw_response_wrapper(
181
+ transaction.list,
182
+ )
183
+
184
+
185
+ class TransactionResourceWithStreamingResponse:
186
+ def __init__(self, transaction: TransactionResource) -> None:
187
+ self._transaction = transaction
188
+
189
+ self.list = to_streamed_response_wrapper(
190
+ transaction.list,
191
+ )
192
+
193
+
194
+ class AsyncTransactionResourceWithStreamingResponse:
195
+ def __init__(self, transaction: AsyncTransactionResource) -> None:
196
+ self._transaction = transaction
197
+
198
+ self.list = async_to_streamed_response_wrapper(
199
+ transaction.list,
200
+ )
@@ -0,0 +1,6 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .transaction_list_params import TransactionListParams as TransactionListParams
6
+ from .transaction_list_response import TransactionListResponse as TransactionListResponse
@@ -0,0 +1,15 @@
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 Required, TypedDict
6
+
7
+ __all__ = ["TransactionListParams"]
8
+
9
+
10
+ class TransactionListParams(TypedDict, total=False):
11
+ page: Required[int]
12
+ """Page number."""
13
+
14
+ page_size: Required[int]
15
+ """Number of items per page."""
@@ -0,0 +1,45 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ...._models import BaseModel
6
+
7
+ __all__ = ["TransactionListResponse", "Amount", "BalanceAfter", "BalanceBefore"]
8
+
9
+
10
+ class Amount(BaseModel):
11
+ amount: str
12
+ """Monetary amount as a string with up to 2 decimal places."""
13
+
14
+ currency_code: str
15
+ """ISO 4217 currency code."""
16
+
17
+
18
+ class BalanceAfter(BaseModel):
19
+ amount: str
20
+ """Monetary amount as a string with up to 2 decimal places."""
21
+
22
+ currency_code: str
23
+ """ISO 4217 currency code."""
24
+
25
+
26
+ class BalanceBefore(BaseModel):
27
+ amount: str
28
+ """Monetary amount as a string with up to 2 decimal places."""
29
+
30
+ currency_code: str
31
+ """ISO 4217 currency code."""
32
+
33
+
34
+ class TransactionListResponse(BaseModel):
35
+ id: int
36
+
37
+ amount: Amount
38
+
39
+ balance_after: BalanceAfter
40
+
41
+ balance_before: BalanceBefore
42
+
43
+ created_at: str
44
+
45
+ from_user_id: Optional[str] = None
@@ -5,15 +5,7 @@ from typing_extensions import Literal
5
5
 
6
6
  from .._models import BaseModel
7
7
 
8
- __all__ = [
9
- "ProfileRetrieveResponse",
10
- "Balance",
11
- "Discount",
12
- "Referral",
13
- "ReferralBalance",
14
- "ReferralProfit",
15
- "Statistics",
16
- ]
8
+ __all__ = ["ProfileRetrieveResponse", "Balance", "Discount", "Statistics"]
17
9
 
18
10
 
19
11
  class Balance(BaseModel):
@@ -32,43 +24,6 @@ class Discount(BaseModel):
32
24
  """Discount percentage."""
33
25
 
34
26
 
35
- class ReferralBalance(BaseModel):
36
- """Current referral balance available for withdrawal."""
37
-
38
- amount: str
39
- """Monetary amount as a string with up to 2 decimal places."""
40
-
41
- currency_code: str
42
- """ISO 4217 currency code."""
43
-
44
-
45
- class ReferralProfit(BaseModel):
46
- """Total lifetime earnings from referral commissions."""
47
-
48
- amount: str
49
- """Monetary amount as a string with up to 2 decimal places."""
50
-
51
- currency_code: str
52
- """ISO 4217 currency code."""
53
-
54
-
55
- class Referral(BaseModel):
56
- balance: ReferralBalance
57
- """Current referral balance available for withdrawal."""
58
-
59
- level: Literal["bronze", "silver", "gold", "platinum"]
60
- """Current referral program level: bronze, silver, gold, platinum."""
61
-
62
- percent: float
63
- """Referral commission percentage."""
64
-
65
- profit: ReferralProfit
66
- """Total lifetime earnings from referral commissions."""
67
-
68
- referrals_count: int
69
- """Total number of users invited through referral link."""
70
-
71
-
72
27
  class Statistics(BaseModel):
73
28
  total_purchases: int
74
29
  """Total number of successful purchases."""
@@ -88,8 +43,6 @@ class ProfileRetrieveResponse(BaseModel):
88
43
  login: Optional[str] = None
89
44
  """Web username"""
90
45
 
91
- referral: Referral
92
-
93
46
  statistics: Statistics
94
47
 
95
48
  telegram_id: Optional[str] = None
@@ -0,0 +1,99 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ from typing import Any, cast
7
+
8
+ import pytest
9
+
10
+ from gmt import Gmt, AsyncGmt
11
+ from tests.utils import assert_matches_type
12
+ from gmt.pagination import SyncPageNumber, AsyncPageNumber
13
+ from gmt.types.profile.referral import TransactionListResponse
14
+
15
+ base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
16
+
17
+
18
+ class TestTransaction:
19
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
20
+
21
+ @pytest.mark.skip(reason="Mock server tests are disabled")
22
+ @parametrize
23
+ def test_method_list(self, client: Gmt) -> None:
24
+ transaction = client.profile.referral.transaction.list(
25
+ page=1,
26
+ page_size=50,
27
+ )
28
+ assert_matches_type(SyncPageNumber[TransactionListResponse], transaction, path=["response"])
29
+
30
+ @pytest.mark.skip(reason="Mock server tests are disabled")
31
+ @parametrize
32
+ def test_raw_response_list(self, client: Gmt) -> None:
33
+ response = client.profile.referral.transaction.with_raw_response.list(
34
+ page=1,
35
+ page_size=50,
36
+ )
37
+
38
+ assert response.is_closed is True
39
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
40
+ transaction = response.parse()
41
+ assert_matches_type(SyncPageNumber[TransactionListResponse], transaction, path=["response"])
42
+
43
+ @pytest.mark.skip(reason="Mock server tests are disabled")
44
+ @parametrize
45
+ def test_streaming_response_list(self, client: Gmt) -> None:
46
+ with client.profile.referral.transaction.with_streaming_response.list(
47
+ page=1,
48
+ page_size=50,
49
+ ) as response:
50
+ assert not response.is_closed
51
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
52
+
53
+ transaction = response.parse()
54
+ assert_matches_type(SyncPageNumber[TransactionListResponse], transaction, path=["response"])
55
+
56
+ assert cast(Any, response.is_closed) is True
57
+
58
+
59
+ class TestAsyncTransaction:
60
+ parametrize = pytest.mark.parametrize(
61
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
62
+ )
63
+
64
+ @pytest.mark.skip(reason="Mock server tests are disabled")
65
+ @parametrize
66
+ async def test_method_list(self, async_client: AsyncGmt) -> None:
67
+ transaction = await async_client.profile.referral.transaction.list(
68
+ page=1,
69
+ page_size=50,
70
+ )
71
+ assert_matches_type(AsyncPageNumber[TransactionListResponse], transaction, path=["response"])
72
+
73
+ @pytest.mark.skip(reason="Mock server tests are disabled")
74
+ @parametrize
75
+ async def test_raw_response_list(self, async_client: AsyncGmt) -> None:
76
+ response = await async_client.profile.referral.transaction.with_raw_response.list(
77
+ page=1,
78
+ page_size=50,
79
+ )
80
+
81
+ assert response.is_closed is True
82
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
83
+ transaction = await response.parse()
84
+ assert_matches_type(AsyncPageNumber[TransactionListResponse], transaction, path=["response"])
85
+
86
+ @pytest.mark.skip(reason="Mock server tests are disabled")
87
+ @parametrize
88
+ async def test_streaming_response_list(self, async_client: AsyncGmt) -> None:
89
+ async with async_client.profile.referral.transaction.with_streaming_response.list(
90
+ page=1,
91
+ page_size=50,
92
+ ) as response:
93
+ assert not response.is_closed
94
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
95
+
96
+ transaction = await response.parse()
97
+ assert_matches_type(AsyncPageNumber[TransactionListResponse], transaction, path=["response"])
98
+
99
+ assert cast(Any, response.is_closed) is True
@@ -0,0 +1 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.25.0"
3
- }
File without changes
File without changes