gmt-python-sdk 0.28.0__tar.gz → 0.30.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 (129) hide show
  1. gmt_python_sdk-0.30.0/.release-please-manifest.json +3 -0
  2. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/CHANGELOG.md +21 -0
  3. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/PKG-INFO +5 -1
  4. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/README.md +4 -0
  5. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/pyproject.toml +1 -1
  6. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_qs.py +4 -1
  7. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_version.py +1 -1
  8. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/purchases/purchases.py +8 -0
  9. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchase_create_response.py +0 -3
  10. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchase_list_params.py +3 -0
  11. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchase_list_response.py +0 -3
  12. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchase_refund_response.py +0 -3
  13. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchase_request_verification_code_response.py +0 -3
  14. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchase_retrieve_response.py +0 -3
  15. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/test_purchases.py +8 -0
  16. gmt_python_sdk-0.28.0/.release-please-manifest.json +0 -3
  17. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/.gitignore +0 -0
  18. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/CONTRIBUTING.md +0 -0
  19. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/LICENSE +0 -0
  20. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/SECURITY.md +0 -0
  21. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/api.md +0 -0
  22. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/bin/check-release-environment +0 -0
  23. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/bin/publish-pypi +0 -0
  24. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/examples/.keep +0 -0
  25. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/release-please-config.json +0 -0
  26. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/requirements-dev.lock +0 -0
  27. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/__init__.py +0 -0
  28. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_base_client.py +0 -0
  29. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_client.py +0 -0
  30. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_compat.py +0 -0
  31. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_constants.py +0 -0
  32. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_exceptions.py +0 -0
  33. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_files.py +0 -0
  34. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_models.py +0 -0
  35. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_resource.py +0 -0
  36. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_response.py +0 -0
  37. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_streaming.py +0 -0
  38. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_types.py +0 -0
  39. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/__init__.py +0 -0
  40. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_compat.py +0 -0
  41. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_datetime_parse.py +0 -0
  42. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_json.py +0 -0
  43. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_logs.py +0 -0
  44. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_path.py +0 -0
  45. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_proxy.py +0 -0
  46. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_reflection.py +0 -0
  47. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_resources_proxy.py +0 -0
  48. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_streams.py +0 -0
  49. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_sync.py +0 -0
  50. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_transform.py +0 -0
  51. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_typing.py +0 -0
  52. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/_utils/_utils.py +0 -0
  53. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/lib/.keep +0 -0
  54. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/pagination.py +0 -0
  55. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/py.typed +0 -0
  56. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/__init__.py +0 -0
  57. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/accounts.py +0 -0
  58. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/profile/__init__.py +0 -0
  59. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/profile/discount.py +0 -0
  60. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/profile/profile.py +0 -0
  61. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/profile/referral/__init__.py +0 -0
  62. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/profile/referral/referral.py +0 -0
  63. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/profile/referral/transaction.py +0 -0
  64. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/purchases/__init__.py +0 -0
  65. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/purchases/bulk.py +0 -0
  66. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/service.py +0 -0
  67. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/resources/webhooks.py +0 -0
  68. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/__init__.py +0 -0
  69. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/account_list_countries_params.py +0 -0
  70. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/account_list_countries_response.py +0 -0
  71. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/account_list_params.py +0 -0
  72. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/account_list_response.py +0 -0
  73. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/account_retrieve_response.py +0 -0
  74. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile/__init__.py +0 -0
  75. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile/discount_retrieve_response.py +0 -0
  76. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile/referral/__init__.py +0 -0
  77. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile/referral/transaction_list_params.py +0 -0
  78. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile/referral/transaction_list_response.py +0 -0
  79. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile/referral_retrieve_response.py +0 -0
  80. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile/referral_transfer_balance_params.py +0 -0
  81. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile/referral_transfer_balance_response.py +0 -0
  82. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile_change_login_params.py +0 -0
  83. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile_change_login_response.py +0 -0
  84. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile_change_password_params.py +0 -0
  85. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile_change_password_response.py +0 -0
  86. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile_retrieve_response.py +0 -0
  87. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/profile_unbind_telegram_response.py +0 -0
  88. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchase_create_params.py +0 -0
  89. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchase_request_verification_code_params.py +0 -0
  90. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchases/__init__.py +0 -0
  91. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchases/bulk_create_params.py +0 -0
  92. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchases/bulk_create_response.py +0 -0
  93. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/purchases/bulk_retrieve_response.py +0 -0
  94. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/service_get_server_time_response.py +0 -0
  95. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/service_health_check_response.py +0 -0
  96. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/webhook_test_params.py +0 -0
  97. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/src/gmt/types/webhook_test_response.py +0 -0
  98. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/__init__.py +0 -0
  99. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/__init__.py +0 -0
  100. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/profile/__init__.py +0 -0
  101. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/profile/referral/__init__.py +0 -0
  102. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/profile/referral/test_transaction.py +0 -0
  103. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/profile/test_discount.py +0 -0
  104. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/profile/test_referral.py +0 -0
  105. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/purchases/__init__.py +0 -0
  106. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/purchases/test_bulk.py +0 -0
  107. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/test_accounts.py +0 -0
  108. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/test_profile.py +0 -0
  109. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/test_service.py +0 -0
  110. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/api_resources/test_webhooks.py +0 -0
  111. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/conftest.py +0 -0
  112. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/sample_file.txt +0 -0
  113. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_client.py +0 -0
  114. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_deepcopy.py +0 -0
  115. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_extract_files.py +0 -0
  116. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_files.py +0 -0
  117. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_models.py +0 -0
  118. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_qs.py +0 -0
  119. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_required_args.py +0 -0
  120. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_response.py +0 -0
  121. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_streaming.py +0 -0
  122. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_transform.py +0 -0
  123. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_utils/test_datetime_parse.py +0 -0
  124. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_utils/test_json.py +0 -0
  125. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_utils/test_path.py +0 -0
  126. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_utils/test_proxy.py +0 -0
  127. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/test_utils/test_typing.py +0 -0
  128. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/tests/utils.py +0 -0
  129. {gmt_python_sdk-0.28.0 → gmt_python_sdk-0.30.0}/uv.lock +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.30.0"
3
+ }
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.30.0 (2026-03-27)
4
+
5
+ Full Changelog: [v0.29.0...v0.30.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.29.0...v0.30.0)
6
+
7
+ ### Features
8
+
9
+ * **internal:** implement indices array format for query and form serialization ([6ef35c9](https://github.com/cameo6/gmt-python-sdk/commit/6ef35c9cef6f411ca6850daa6ce74e7e4b3f6545))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **ci:** skip lint on metadata-only changes ([ee3a69f](https://github.com/cameo6/gmt-python-sdk/commit/ee3a69ff5c07780d08c5ca7a0607949219c2e314))
15
+
16
+ ## 0.29.0 (2026-03-24)
17
+
18
+ Full Changelog: [v0.28.0...v0.29.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.28.0...v0.29.0)
19
+
20
+ ### Features
21
+
22
+ * **api:** api update ([5ef7788](https://github.com/cameo6/gmt-python-sdk/commit/5ef7788180e7b3c55e3d7deb0f4f828ecb71dd33))
23
+
3
24
  ## 0.28.0 (2026-03-24)
4
25
 
5
26
  Full Changelog: [v0.27.1...v0.28.0](https://github.com/cameo6/gmt-python-sdk/compare/v0.27.1...v0.28.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gmt-python-sdk
3
- Version: 0.28.0
3
+ Version: 0.30.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
@@ -149,6 +149,7 @@ all_purchases = []
149
149
  for purchase in client.purchases.list(
150
150
  page=1,
151
151
  page_size=100,
152
+ sort="date_desc",
152
153
  ):
153
154
  # Do something with purchase here
154
155
  all_purchases.append(purchase)
@@ -170,6 +171,7 @@ async def main() -> None:
170
171
  async for purchase in client.purchases.list(
171
172
  page=1,
172
173
  page_size=100,
174
+ sort="date_desc",
173
175
  ):
174
176
  all_purchases.append(purchase)
175
177
  print(all_purchases)
@@ -184,6 +186,7 @@ Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get
184
186
  first_page = await client.purchases.list(
185
187
  page=1,
186
188
  page_size=100,
189
+ sort="date_desc",
187
190
  )
188
191
  if first_page.has_next_page():
189
192
  print(f"will fetch next page using these details: {first_page.next_page_info()}")
@@ -199,6 +202,7 @@ Or just work directly with the returned data:
199
202
  first_page = await client.purchases.list(
200
203
  page=1,
201
204
  page_size=100,
205
+ sort="date_desc",
202
206
  )
203
207
 
204
208
  print(f"page number: {first_page.pagination.current_page}") # => "page number: 1"
@@ -114,6 +114,7 @@ all_purchases = []
114
114
  for purchase in client.purchases.list(
115
115
  page=1,
116
116
  page_size=100,
117
+ sort="date_desc",
117
118
  ):
118
119
  # Do something with purchase here
119
120
  all_purchases.append(purchase)
@@ -135,6 +136,7 @@ async def main() -> None:
135
136
  async for purchase in client.purchases.list(
136
137
  page=1,
137
138
  page_size=100,
139
+ sort="date_desc",
138
140
  ):
139
141
  all_purchases.append(purchase)
140
142
  print(all_purchases)
@@ -149,6 +151,7 @@ Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get
149
151
  first_page = await client.purchases.list(
150
152
  page=1,
151
153
  page_size=100,
154
+ sort="date_desc",
152
155
  )
153
156
  if first_page.has_next_page():
154
157
  print(f"will fetch next page using these details: {first_page.next_page_info()}")
@@ -164,6 +167,7 @@ Or just work directly with the returned data:
164
167
  first_page = await client.purchases.list(
165
168
  page=1,
166
169
  page_size=100,
170
+ sort="date_desc",
167
171
  )
168
172
 
169
173
  print(f"page number: {first_page.pagination.current_page}") # => "page number: 1"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gmt-python-sdk"
3
- version = "0.28.0"
3
+ version = "0.30.0"
4
4
  description = "The official Python library for the gmt API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -101,7 +101,10 @@ class Querystring:
101
101
  items.extend(self._stringify_item(key, item, opts))
102
102
  return items
103
103
  elif array_format == "indices":
104
- raise NotImplementedError("The array indices format is not supported yet")
104
+ items = []
105
+ for i, item in enumerate(value):
106
+ items.extend(self._stringify_item(f"{key}[{i}]", item, opts))
107
+ return items
105
108
  elif array_format == "brackets":
106
109
  items = []
107
110
  key = key + "[]"
@@ -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.28.0" # x-release-please-version
4
+ __version__ = "0.30.0" # x-release-please-version
@@ -153,6 +153,7 @@ class PurchasesResource(SyncAPIResource):
153
153
  *,
154
154
  page: int,
155
155
  page_size: int,
156
+ sort: Literal["date_asc", "date_desc"],
156
157
  status: Literal["PENDING", "SUCCESS", "ERROR", "REFUND"] | Omit = omit,
157
158
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
158
159
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -182,6 +183,8 @@ class PurchasesResource(SyncAPIResource):
182
183
 
183
184
  page_size: Number of items per page.
184
185
 
186
+ sort: Sort purchases by creation date
187
+
185
188
  status: **Purchase Status Lifecycle.** `PENDING` (initial) → `SUCCESS` (after code
186
189
  request) or `ERROR` (provider failure). Any status can transition to `REFUND`
187
190
  via admin action.
@@ -215,6 +218,7 @@ class PurchasesResource(SyncAPIResource):
215
218
  {
216
219
  "page": page,
217
220
  "page_size": page_size,
221
+ "sort": sort,
218
222
  "status": status,
219
223
  },
220
224
  purchase_list_params.PurchaseListParams,
@@ -445,6 +449,7 @@ class AsyncPurchasesResource(AsyncAPIResource):
445
449
  *,
446
450
  page: int,
447
451
  page_size: int,
452
+ sort: Literal["date_asc", "date_desc"],
448
453
  status: Literal["PENDING", "SUCCESS", "ERROR", "REFUND"] | Omit = omit,
449
454
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
450
455
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -474,6 +479,8 @@ class AsyncPurchasesResource(AsyncAPIResource):
474
479
 
475
480
  page_size: Number of items per page.
476
481
 
482
+ sort: Sort purchases by creation date
483
+
477
484
  status: **Purchase Status Lifecycle.** `PENDING` (initial) → `SUCCESS` (after code
478
485
  request) or `ERROR` (provider failure). Any status can transition to `REFUND`
479
486
  via admin action.
@@ -507,6 +514,7 @@ class AsyncPurchasesResource(AsyncAPIResource):
507
514
  {
508
515
  "page": page,
509
516
  "page_size": page_size,
517
+ "sort": sort,
510
518
  "status": status,
511
519
  },
512
520
  purchase_list_params.PurchaseListParams,
@@ -74,9 +74,6 @@ class PurchaseCreateResponse(BaseModel):
74
74
 
75
75
  display_name: DisplayName
76
76
 
77
- emoji: str
78
- """Country flag emoji."""
79
-
80
77
  phone_number: Optional[str] = None
81
78
  """
82
79
  **E.164 International Format.** Phone number with country code prefix (e.g.,
@@ -14,6 +14,9 @@ class PurchaseListParams(TypedDict, total=False):
14
14
  page_size: Required[int]
15
15
  """Number of items per page."""
16
16
 
17
+ sort: Required[Literal["date_asc", "date_desc"]]
18
+ """Sort purchases by creation date"""
19
+
17
20
  status: Literal["PENDING", "SUCCESS", "ERROR", "REFUND"]
18
21
  """
19
22
  **Purchase Status Lifecycle.** `PENDING` (initial) → `SUCCESS` (after code
@@ -74,9 +74,6 @@ class PurchaseListResponse(BaseModel):
74
74
 
75
75
  display_name: DisplayName
76
76
 
77
- emoji: str
78
- """Country flag emoji."""
79
-
80
77
  phone_number: Optional[str] = None
81
78
  """
82
79
  **E.164 International Format.** Phone number with country code prefix (e.g.,
@@ -82,9 +82,6 @@ class Purchase(BaseModel):
82
82
 
83
83
  display_name: PurchaseDisplayName
84
84
 
85
- emoji: str
86
- """Country flag emoji."""
87
-
88
85
  phone_number: Optional[str] = None
89
86
  """
90
87
  **E.164 International Format.** Phone number with country code prefix (e.g.,
@@ -98,9 +98,6 @@ class Purchase(BaseModel):
98
98
 
99
99
  display_name: PurchaseDisplayName
100
100
 
101
- emoji: str
102
- """Country flag emoji."""
103
-
104
101
  phone_number: Optional[str] = None
105
102
  """
106
103
  **E.164 International Format.** Phone number with country code prefix (e.g.,
@@ -74,9 +74,6 @@ class PurchaseRetrieveResponse(BaseModel):
74
74
 
75
75
  display_name: DisplayName
76
76
 
77
- emoji: str
78
- """Country flag emoji."""
79
-
80
77
  phone_number: Optional[str] = None
81
78
  """
82
79
  **E.164 International Format.** Phone number with country code prefix (e.g.,
@@ -98,6 +98,7 @@ class TestPurchases:
98
98
  purchase = client.purchases.list(
99
99
  page=1,
100
100
  page_size=50,
101
+ sort="date_desc",
101
102
  )
102
103
  assert_matches_type(SyncPageNumber[PurchaseListResponse], purchase, path=["response"])
103
104
 
@@ -107,6 +108,7 @@ class TestPurchases:
107
108
  purchase = client.purchases.list(
108
109
  page=1,
109
110
  page_size=50,
111
+ sort="date_desc",
110
112
  status="SUCCESS",
111
113
  )
112
114
  assert_matches_type(SyncPageNumber[PurchaseListResponse], purchase, path=["response"])
@@ -117,6 +119,7 @@ class TestPurchases:
117
119
  response = client.purchases.with_raw_response.list(
118
120
  page=1,
119
121
  page_size=50,
122
+ sort="date_desc",
120
123
  )
121
124
 
122
125
  assert response.is_closed is True
@@ -130,6 +133,7 @@ class TestPurchases:
130
133
  with client.purchases.with_streaming_response.list(
131
134
  page=1,
132
135
  page_size=50,
136
+ sort="date_desc",
133
137
  ) as response:
134
138
  assert not response.is_closed
135
139
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -296,6 +300,7 @@ class TestAsyncPurchases:
296
300
  purchase = await async_client.purchases.list(
297
301
  page=1,
298
302
  page_size=50,
303
+ sort="date_desc",
299
304
  )
300
305
  assert_matches_type(AsyncPageNumber[PurchaseListResponse], purchase, path=["response"])
301
306
 
@@ -305,6 +310,7 @@ class TestAsyncPurchases:
305
310
  purchase = await async_client.purchases.list(
306
311
  page=1,
307
312
  page_size=50,
313
+ sort="date_desc",
308
314
  status="SUCCESS",
309
315
  )
310
316
  assert_matches_type(AsyncPageNumber[PurchaseListResponse], purchase, path=["response"])
@@ -315,6 +321,7 @@ class TestAsyncPurchases:
315
321
  response = await async_client.purchases.with_raw_response.list(
316
322
  page=1,
317
323
  page_size=50,
324
+ sort="date_desc",
318
325
  )
319
326
 
320
327
  assert response.is_closed is True
@@ -328,6 +335,7 @@ class TestAsyncPurchases:
328
335
  async with async_client.purchases.with_streaming_response.list(
329
336
  page=1,
330
337
  page_size=50,
338
+ sort="date_desc",
331
339
  ) as response:
332
340
  assert not response.is_closed
333
341
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.28.0"
3
- }
File without changes
File without changes
File without changes