payi 0.1.0a27__tar.gz → 0.1.0a29__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.

Potentially problematic release.


This version of payi might be problematic. Click here for more details.

Files changed (147) hide show
  1. payi-0.1.0a29/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a27 → payi-0.1.0a29}/CHANGELOG.md +23 -0
  3. {payi-0.1.0a27 → payi-0.1.0a29}/PKG-INFO +7 -11
  4. {payi-0.1.0a27 → payi-0.1.0a29}/README.md +4 -6
  5. {payi-0.1.0a27 → payi-0.1.0a29}/pyproject.toml +3 -4
  6. {payi-0.1.0a27 → payi-0.1.0a29}/requirements-dev.lock +10 -13
  7. {payi-0.1.0a27 → payi-0.1.0a29}/requirements.lock +4 -4
  8. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_client.py +2 -2
  9. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_compat.py +5 -3
  10. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_models.py +11 -8
  11. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_types.py +4 -2
  12. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_utils/__init__.py +1 -0
  13. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_utils/_transform.py +12 -2
  14. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_utils/_utils.py +17 -0
  15. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_version.py +1 -1
  16. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/billing_models.py +8 -0
  17. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/experiences/types.py +24 -4
  18. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/ingest.py +12 -0
  19. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/billing_model.py +2 -0
  20. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/billing_model_create_params.py +2 -0
  21. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/billing_model_update_params.py +2 -0
  22. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/cost_details.py +2 -0
  23. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/experiences/experience_type.py +3 -0
  24. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/experiences/type_create_params.py +3 -0
  25. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/experiences/type_update_params.py +4 -1
  26. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/ingest_event_param.py +8 -0
  27. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/ingest_units_params.py +6 -0
  28. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/experiences/test_types.py +44 -8
  29. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/test_billing_models.py +4 -0
  30. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/test_ingest.py +6 -0
  31. {payi-0.1.0a27 → payi-0.1.0a29}/tests/conftest.py +8 -6
  32. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_client.py +4 -4
  33. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_models.py +7 -14
  34. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_transform.py +15 -0
  35. payi-0.1.0a27/.release-please-manifest.json +0 -3
  36. payi-0.1.0a27/src/payi/types/evaluations/__init__.py +0 -6
  37. payi-0.1.0a27/src/payi/types/evaluations/experience_create_params.py +0 -14
  38. payi-0.1.0a27/src/payi/types/evaluations/request_create_params.py +0 -14
  39. payi-0.1.0a27/src/payi/types/shared/__init__.py +0 -2
  40. payi-0.1.0a27/tests/api_resources/experiences/__init__.py +0 -1
  41. {payi-0.1.0a27 → payi-0.1.0a29}/.gitignore +0 -0
  42. {payi-0.1.0a27 → payi-0.1.0a29}/CONTRIBUTING.md +0 -0
  43. {payi-0.1.0a27 → payi-0.1.0a29}/LICENSE +0 -0
  44. {payi-0.1.0a27 → payi-0.1.0a29}/SECURITY.md +0 -0
  45. {payi-0.1.0a27 → payi-0.1.0a29}/api.md +0 -0
  46. {payi-0.1.0a27 → payi-0.1.0a29}/bin/check-release-environment +0 -0
  47. {payi-0.1.0a27 → payi-0.1.0a29}/bin/publish-pypi +0 -0
  48. {payi-0.1.0a27 → payi-0.1.0a29}/examples/.keep +0 -0
  49. {payi-0.1.0a27 → payi-0.1.0a29}/mypy.ini +0 -0
  50. {payi-0.1.0a27 → payi-0.1.0a29}/noxfile.py +0 -0
  51. {payi-0.1.0a27 → payi-0.1.0a29}/release-please-config.json +0 -0
  52. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/__init__.py +0 -0
  53. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_base_client.py +0 -0
  54. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_constants.py +0 -0
  55. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_exceptions.py +0 -0
  56. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_files.py +0 -0
  57. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_qs.py +0 -0
  58. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_resource.py +0 -0
  59. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_response.py +0 -0
  60. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_streaming.py +0 -0
  61. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_utils/_logs.py +0 -0
  62. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_utils/_proxy.py +0 -0
  63. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_utils/_reflection.py +0 -0
  64. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_utils/_streams.py +0 -0
  65. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_utils/_sync.py +0 -0
  66. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/_utils/_typing.py +0 -0
  67. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/lib/.keep +0 -0
  68. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/lib/helpers.py +0 -0
  69. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/py.typed +0 -0
  70. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/__init__.py +0 -0
  71. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/budgets/__init__.py +0 -0
  72. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/budgets/budgets.py +0 -0
  73. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/budgets/tags.py +0 -0
  74. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/categories/__init__.py +0 -0
  75. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/categories/categories.py +0 -0
  76. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/categories/resources.py +0 -0
  77. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/csat.py +0 -0
  78. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/experiences/__init__.py +0 -0
  79. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/experiences/experiences.py +0 -0
  80. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/resources/price_modifiers.py +0 -0
  81. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/__init__.py +0 -0
  82. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/billing_model_list_response.py +0 -0
  83. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budget_create_params.py +0 -0
  84. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budget_history_response.py +0 -0
  85. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budget_list_params.py +0 -0
  86. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budget_response.py +0 -0
  87. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budget_update_params.py +0 -0
  88. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/__init__.py +0 -0
  89. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/budget_tags.py +0 -0
  90. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/tag_create_params.py +0 -0
  91. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/tag_create_response.py +0 -0
  92. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/tag_delete_response.py +0 -0
  93. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/tag_list_response.py +0 -0
  94. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/tag_remove_params.py +0 -0
  95. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/tag_remove_response.py +0 -0
  96. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/tag_update_params.py +0 -0
  97. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/budgets/tag_update_response.py +0 -0
  98. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/bulk_ingest_response.py +0 -0
  99. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/categories/__init__.py +0 -0
  100. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/categories/resource_create_params.py +0 -0
  101. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/categories/resource_list_response.py +0 -0
  102. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/category_delete_resource_response.py +0 -0
  103. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/category_delete_response.py +0 -0
  104. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/category_list_resources_response.py +0 -0
  105. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/category_list_response.py +0 -0
  106. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/category_resource_response.py +0 -0
  107. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/category_response.py +0 -0
  108. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/cost_data.py +0 -0
  109. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/csat.py +0 -0
  110. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/csat_create_params.py +0 -0
  111. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/default_response.py +0 -0
  112. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/experience_instance.py +0 -0
  113. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/experiences/__init__.py +0 -0
  114. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/experiences/type_list_params.py +0 -0
  115. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/experiences/type_list_response.py +0 -0
  116. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/ingest_bulk_params.py +0 -0
  117. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/ingest_response.py +0 -0
  118. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/paged_budget_list.py +0 -0
  119. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/price_modifier.py +0 -0
  120. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/price_modifier_create_params.py +0 -0
  121. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/price_modifier_retrieve_response.py +0 -0
  122. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/price_modifier_update_params.py +0 -0
  123. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/requests_data.py +0 -0
  124. {payi-0.1.0a27 → payi-0.1.0a29}/src/payi/types/total_cost_data.py +0 -0
  125. {payi-0.1.0a27 → payi-0.1.0a29}/tests/__init__.py +0 -0
  126. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/__init__.py +0 -0
  127. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/budgets/__init__.py +0 -0
  128. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/budgets/test_tags.py +0 -0
  129. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/categories/__init__.py +0 -0
  130. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/categories/test_resources.py +0 -0
  131. {payi-0.1.0a27/tests/api_resources/evaluations → payi-0.1.0a29/tests/api_resources/experiences}/__init__.py +0 -0
  132. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/test_budgets.py +0 -0
  133. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/test_categories.py +0 -0
  134. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/test_csat.py +0 -0
  135. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/test_experiences.py +0 -0
  136. {payi-0.1.0a27 → payi-0.1.0a29}/tests/api_resources/test_price_modifiers.py +0 -0
  137. {payi-0.1.0a27 → payi-0.1.0a29}/tests/sample_file.txt +0 -0
  138. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_deepcopy.py +0 -0
  139. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_extract_files.py +0 -0
  140. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_files.py +0 -0
  141. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_qs.py +0 -0
  142. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_required_args.py +0 -0
  143. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_response.py +0 -0
  144. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_streaming.py +0 -0
  145. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_utils/test_proxy.py +0 -0
  146. {payi-0.1.0a27 → payi-0.1.0a29}/tests/test_utils/test_typing.py +0 -0
  147. {payi-0.1.0a27 → payi-0.1.0a29}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.29"
3
+ }
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.29 (2024-11-15)
4
+
5
+ Full Changelog: [v0.1.0-alpha.28...v0.1.0-alpha.29](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.28...v0.1.0-alpha.29)
6
+
7
+ ### Features
8
+
9
+ * **api:** update apikey header ([#132](https://github.com/Pay-i/pay-i-python/issues/132)) ([4e42d00](https://github.com/Pay-i/pay-i-python/commit/4e42d005530be2e002f536c2008c75a2afc1dea2))
10
+
11
+ ## 0.1.0-alpha.28 (2024-11-15)
12
+
13
+ Full Changelog: [v0.1.0-alpha.27...v0.1.0-alpha.28](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.27...v0.1.0-alpha.28)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([#127](https://github.com/Pay-i/pay-i-python/issues/127)) ([f9f8665](https://github.com/Pay-i/pay-i-python/commit/f9f8665278eec1f3b4d081076047460004230a97))
18
+
19
+
20
+ ### Chores
21
+
22
+ * rebuild project due to codegen change ([#128](https://github.com/Pay-i/pay-i-python/issues/128)) ([31ab0f5](https://github.com/Pay-i/pay-i-python/commit/31ab0f57ca4d1c073c7d1996af9df94db792cf9f))
23
+ * rebuild project due to codegen change ([#130](https://github.com/Pay-i/pay-i-python/issues/130)) ([e98d9ce](https://github.com/Pay-i/pay-i-python/commit/e98d9cead371ef5e3e9f3b68116dc81975fbd471))
24
+ * rebuild project due to codegen change ([#131](https://github.com/Pay-i/pay-i-python/issues/131)) ([e197c4b](https://github.com/Pay-i/pay-i-python/commit/e197c4b0199f417b550ee4c852ffcaef4888c82c))
25
+
3
26
  ## 0.1.0-alpha.27 (2024-10-22)
4
27
 
5
28
  Full Changelog: [v0.1.0-alpha.26...v0.1.0-alpha.27](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.26...v0.1.0-alpha.27)
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a27
3
+ Version: 0.1.0a29
4
4
  Summary: The official Python library for the payi API
5
5
  Project-URL: Homepage, https://github.com/Pay-i/pay-i-python
6
6
  Project-URL: Repository, https://github.com/Pay-i/pay-i-python
7
7
  Author-email: Payi <support@payi.com>
8
- License-Expression: Apache-2.0
9
- License-File: LICENSE
8
+ License: Apache-2.0
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: License :: OSI Approved :: Apache Software License
12
11
  Classifier: Operating System :: MacOS
@@ -14,7 +13,6 @@ Classifier: Operating System :: Microsoft :: Windows
14
13
  Classifier: Operating System :: OS Independent
15
14
  Classifier: Operating System :: POSIX
16
15
  Classifier: Operating System :: POSIX :: Linux
17
- Classifier: Programming Language :: Python :: 3.7
18
16
  Classifier: Programming Language :: Python :: 3.8
19
17
  Classifier: Programming Language :: Python :: 3.9
20
18
  Classifier: Programming Language :: Python :: 3.10
@@ -22,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.11
22
20
  Classifier: Programming Language :: Python :: 3.12
23
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
22
  Classifier: Typing :: Typed
25
- Requires-Python: >=3.7
23
+ Requires-Python: >=3.8
26
24
  Requires-Dist: anyio<5,>=3.5.0
27
25
  Requires-Dist: cached-property; python_version < '3.8'
28
26
  Requires-Dist: distro<2,>=1.7.0
@@ -36,7 +34,7 @@ Description-Content-Type: text/markdown
36
34
 
37
35
  [![PyPI version](https://img.shields.io/pypi/v/payi.svg)](https://pypi.org/project/payi/)
38
36
 
39
- The Payi Python library provides convenient access to the Payi REST API from any Python 3.7+
37
+ The Payi Python library provides convenient access to the Payi REST API from any Python 3.8+
40
38
  application. The library includes type definitions for all request params and response fields,
41
39
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
42
40
 
@@ -62,8 +60,7 @@ import os
62
60
  from payi import Payi
63
61
 
64
62
  client = Payi(
65
- # This is the default and can be omitted
66
- api_key=os.environ.get("PAYI_API_KEY"),
63
+ api_key=os.environ.get("PAYI_API_KEY"), # This is the default and can be omitted
67
64
  )
68
65
 
69
66
  budget_response = client.budgets.create(
@@ -88,8 +85,7 @@ import asyncio
88
85
  from payi import AsyncPayi
89
86
 
90
87
  client = AsyncPayi(
91
- # This is the default and can be omitted
92
- api_key=os.environ.get("PAYI_API_KEY"),
88
+ api_key=os.environ.get("PAYI_API_KEY"), # This is the default and can be omitted
93
89
  )
94
90
 
95
91
 
@@ -369,7 +365,7 @@ print(payi.__version__)
369
365
 
370
366
  ## Requirements
371
367
 
372
- Python 3.7 or higher.
368
+ Python 3.8 or higher.
373
369
 
374
370
  ## Contributing
375
371
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![PyPI version](https://img.shields.io/pypi/v/payi.svg)](https://pypi.org/project/payi/)
4
4
 
5
- The Payi Python library provides convenient access to the Payi REST API from any Python 3.7+
5
+ The Payi Python library provides convenient access to the Payi REST API from any Python 3.8+
6
6
  application. The library includes type definitions for all request params and response fields,
7
7
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
8
8
 
@@ -28,8 +28,7 @@ import os
28
28
  from payi import Payi
29
29
 
30
30
  client = Payi(
31
- # This is the default and can be omitted
32
- api_key=os.environ.get("PAYI_API_KEY"),
31
+ api_key=os.environ.get("PAYI_API_KEY"), # This is the default and can be omitted
33
32
  )
34
33
 
35
34
  budget_response = client.budgets.create(
@@ -54,8 +53,7 @@ import asyncio
54
53
  from payi import AsyncPayi
55
54
 
56
55
  client = AsyncPayi(
57
- # This is the default and can be omitted
58
- api_key=os.environ.get("PAYI_API_KEY"),
56
+ api_key=os.environ.get("PAYI_API_KEY"), # This is the default and can be omitted
59
57
  )
60
58
 
61
59
 
@@ -335,7 +333,7 @@ print(payi.__version__)
335
333
 
336
334
  ## Requirements
337
335
 
338
- Python 3.7 or higher.
336
+ Python 3.8 or higher.
339
337
 
340
338
  ## Contributing
341
339
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.27"
3
+ version = "0.1.0-alpha.29"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -16,11 +16,10 @@ dependencies = [
16
16
  "sniffio",
17
17
  "cached-property; python_version < '3.8'",
18
18
  ]
19
- requires-python = ">= 3.7"
19
+ requires-python = ">= 3.8"
20
20
  classifiers = [
21
21
  "Typing :: Typed",
22
22
  "Intended Audience :: Developers",
23
- "Programming Language :: Python :: 3.7",
24
23
  "Programming Language :: Python :: 3.8",
25
24
  "Programming Language :: Python :: 3.9",
26
25
  "Programming Language :: Python :: 3.10",
@@ -139,7 +138,7 @@ filterwarnings = [
139
138
  # there are a couple of flags that are still disabled by
140
139
  # default in strict mode as they are experimental and niche.
141
140
  typeCheckingMode = "strict"
142
- pythonVersion = "3.7"
141
+ pythonVersion = "3.8"
143
142
 
144
143
  exclude = [
145
144
  "_dev",
@@ -16,8 +16,6 @@ anyio==4.4.0
16
16
  # via payi
17
17
  argcomplete==3.1.2
18
18
  # via nox
19
- attrs==23.1.0
20
- # via pytest
21
19
  certifi==2023.7.22
22
20
  # via httpcore
23
21
  # via httpx
@@ -28,8 +26,9 @@ distlib==0.3.7
28
26
  # via virtualenv
29
27
  distro==1.8.0
30
28
  # via payi
31
- exceptiongroup==1.1.3
29
+ exceptiongroup==1.2.2
32
30
  # via anyio
31
+ # via pytest
33
32
  filelock==3.12.4
34
33
  # via virtualenv
35
34
  h11==0.14.0
@@ -49,7 +48,7 @@ markdown-it-py==3.0.0
49
48
  # via rich
50
49
  mdurl==0.1.2
51
50
  # via markdown-it-py
52
- mypy==1.11.2
51
+ mypy==1.13.0
53
52
  mypy-extensions==1.0.0
54
53
  # via mypy
55
54
  nodeenv==1.8.0
@@ -60,20 +59,18 @@ packaging==23.2
60
59
  # via pytest
61
60
  platformdirs==3.11.0
62
61
  # via virtualenv
63
- pluggy==1.3.0
64
- # via pytest
65
- py==1.11.0
62
+ pluggy==1.5.0
66
63
  # via pytest
67
- pydantic==2.7.1
64
+ pydantic==2.9.2
68
65
  # via payi
69
- pydantic-core==2.18.2
66
+ pydantic-core==2.23.4
70
67
  # via pydantic
71
68
  pygments==2.18.0
72
69
  # via rich
73
70
  pyright==1.1.380
74
- pytest==7.1.1
71
+ pytest==8.3.3
75
72
  # via pytest-asyncio
76
- pytest-asyncio==0.21.1
73
+ pytest-asyncio==0.24.0
77
74
  python-dateutil==2.8.2
78
75
  # via time-machine
79
76
  pytz==2023.3.post1
@@ -90,10 +87,10 @@ sniffio==1.3.0
90
87
  # via httpx
91
88
  # via payi
92
89
  time-machine==2.9.0
93
- tomli==2.0.1
90
+ tomli==2.0.2
94
91
  # via mypy
95
92
  # via pytest
96
- typing-extensions==4.8.0
93
+ typing-extensions==4.12.2
97
94
  # via anyio
98
95
  # via mypy
99
96
  # via payi
@@ -19,7 +19,7 @@ certifi==2023.7.22
19
19
  # via httpx
20
20
  distro==1.8.0
21
21
  # via payi
22
- exceptiongroup==1.1.3
22
+ exceptiongroup==1.2.2
23
23
  # via anyio
24
24
  h11==0.14.0
25
25
  # via httpcore
@@ -30,15 +30,15 @@ httpx==0.25.2
30
30
  idna==3.4
31
31
  # via anyio
32
32
  # via httpx
33
- pydantic==2.7.1
33
+ pydantic==2.9.2
34
34
  # via payi
35
- pydantic-core==2.18.2
35
+ pydantic-core==2.23.4
36
36
  # via pydantic
37
37
  sniffio==1.3.0
38
38
  # via anyio
39
39
  # via httpx
40
40
  # via payi
41
- typing-extensions==4.8.0
41
+ typing-extensions==4.12.2
42
42
  # via anyio
43
43
  # via payi
44
44
  # via pydantic
@@ -129,7 +129,7 @@ class Payi(SyncAPIClient):
129
129
  @override
130
130
  def auth_headers(self) -> dict[str, str]:
131
131
  api_key = self.api_key
132
- return {"Authorization": api_key}
132
+ return {"xProxy-api-key": api_key}
133
133
 
134
134
  @property
135
135
  @override
@@ -309,7 +309,7 @@ class AsyncPayi(AsyncAPIClient):
309
309
  @override
310
310
  def auth_headers(self) -> dict[str, str]:
311
311
  api_key = self.api_key
312
- return {"Authorization": api_key}
312
+ return {"xProxy-api-key": api_key}
313
313
 
314
314
  @property
315
315
  @override
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload
4
4
  from datetime import date, datetime
5
- from typing_extensions import Self
5
+ from typing_extensions import Self, Literal
6
6
 
7
7
  import pydantic
8
8
  from pydantic.fields import FieldInfo
@@ -133,13 +133,15 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str:
133
133
  def model_dump(
134
134
  model: pydantic.BaseModel,
135
135
  *,
136
- exclude: IncEx = None,
136
+ exclude: IncEx | None = None,
137
137
  exclude_unset: bool = False,
138
138
  exclude_defaults: bool = False,
139
139
  warnings: bool = True,
140
+ mode: Literal["json", "python"] = "python",
140
141
  ) -> dict[str, Any]:
141
- if PYDANTIC_V2:
142
+ if PYDANTIC_V2 or hasattr(model, "model_dump"):
142
143
  return model.model_dump(
144
+ mode=mode,
143
145
  exclude=exclude,
144
146
  exclude_unset=exclude_unset,
145
147
  exclude_defaults=exclude_defaults,
@@ -37,6 +37,7 @@ from ._utils import (
37
37
  PropertyInfo,
38
38
  is_list,
39
39
  is_given,
40
+ json_safe,
40
41
  lru_cache,
41
42
  is_mapping,
42
43
  parse_date,
@@ -176,7 +177,7 @@ class BaseModel(pydantic.BaseModel):
176
177
  # Based on https://github.com/samuelcolvin/pydantic/issues/1168#issuecomment-817742836.
177
178
  @classmethod
178
179
  @override
179
- def construct(
180
+ def construct( # pyright: ignore[reportIncompatibleMethodOverride]
180
181
  cls: Type[ModelT],
181
182
  _fields_set: set[str] | None = None,
182
183
  **values: object,
@@ -248,8 +249,8 @@ class BaseModel(pydantic.BaseModel):
248
249
  self,
249
250
  *,
250
251
  mode: Literal["json", "python"] | str = "python",
251
- include: IncEx = None,
252
- exclude: IncEx = None,
252
+ include: IncEx | None = None,
253
+ exclude: IncEx | None = None,
253
254
  by_alias: bool = False,
254
255
  exclude_unset: bool = False,
255
256
  exclude_defaults: bool = False,
@@ -279,8 +280,8 @@ class BaseModel(pydantic.BaseModel):
279
280
  Returns:
280
281
  A dictionary representation of the model.
281
282
  """
282
- if mode != "python":
283
- raise ValueError("mode is only supported in Pydantic v2")
283
+ if mode not in {"json", "python"}:
284
+ raise ValueError("mode must be either 'json' or 'python'")
284
285
  if round_trip != False:
285
286
  raise ValueError("round_trip is only supported in Pydantic v2")
286
287
  if warnings != True:
@@ -289,7 +290,7 @@ class BaseModel(pydantic.BaseModel):
289
290
  raise ValueError("context is only supported in Pydantic v2")
290
291
  if serialize_as_any != False:
291
292
  raise ValueError("serialize_as_any is only supported in Pydantic v2")
292
- return super().dict( # pyright: ignore[reportDeprecated]
293
+ dumped = super().dict( # pyright: ignore[reportDeprecated]
293
294
  include=include,
294
295
  exclude=exclude,
295
296
  by_alias=by_alias,
@@ -298,13 +299,15 @@ class BaseModel(pydantic.BaseModel):
298
299
  exclude_none=exclude_none,
299
300
  )
300
301
 
302
+ return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped
303
+
301
304
  @override
302
305
  def model_dump_json(
303
306
  self,
304
307
  *,
305
308
  indent: int | None = None,
306
- include: IncEx = None,
307
- exclude: IncEx = None,
309
+ include: IncEx | None = None,
310
+ exclude: IncEx | None = None,
308
311
  by_alias: bool = False,
309
312
  exclude_unset: bool = False,
310
313
  exclude_defaults: bool = False,
@@ -16,7 +16,7 @@ from typing import (
16
16
  Optional,
17
17
  Sequence,
18
18
  )
19
- from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable
19
+ from typing_extensions import Set, Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable
20
20
 
21
21
  import httpx
22
22
  import pydantic
@@ -193,7 +193,9 @@ StrBytesIntFloat = Union[str, bytes, int, float]
193
193
 
194
194
  # Note: copied from Pydantic
195
195
  # https://github.com/pydantic/pydantic/blob/32ea570bf96e84234d2992e1ddf40ab8a565925a/pydantic/main.py#L49
196
- IncEx: TypeAlias = "set[int] | set[str] | dict[int, Any] | dict[str, Any] | None"
196
+ IncEx: TypeAlias = Union[
197
+ Set[int], Set[str], Mapping[int, Union["IncEx", Literal[True]]], Mapping[str, Union["IncEx", Literal[True]]]
198
+ ]
197
199
 
198
200
  PostParser = Callable[[Any], Any]
199
201
 
@@ -6,6 +6,7 @@ from ._utils import (
6
6
  is_list as is_list,
7
7
  is_given as is_given,
8
8
  is_tuple as is_tuple,
9
+ json_safe as json_safe,
9
10
  lru_cache as lru_cache,
10
11
  is_mapping as is_mapping,
11
12
  is_tuple_t as is_tuple_t,
@@ -173,6 +173,11 @@ def _transform_recursive(
173
173
  # Iterable[T]
174
174
  or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str))
175
175
  ):
176
+ # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually
177
+ # intended as an iterable, so we don't transform it.
178
+ if isinstance(data, dict):
179
+ return cast(object, data)
180
+
176
181
  inner_type = extract_type_arg(stripped_type, 0)
177
182
  return [_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
178
183
 
@@ -186,7 +191,7 @@ def _transform_recursive(
186
191
  return data
187
192
 
188
193
  if isinstance(data, pydantic.BaseModel):
189
- return model_dump(data, exclude_unset=True)
194
+ return model_dump(data, exclude_unset=True, mode="json")
190
195
 
191
196
  annotated_type = _get_annotated_type(annotation)
192
197
  if annotated_type is None:
@@ -311,6 +316,11 @@ async def _async_transform_recursive(
311
316
  # Iterable[T]
312
317
  or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str))
313
318
  ):
319
+ # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually
320
+ # intended as an iterable, so we don't transform it.
321
+ if isinstance(data, dict):
322
+ return cast(object, data)
323
+
314
324
  inner_type = extract_type_arg(stripped_type, 0)
315
325
  return [await _async_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
316
326
 
@@ -324,7 +334,7 @@ async def _async_transform_recursive(
324
334
  return data
325
335
 
326
336
  if isinstance(data, pydantic.BaseModel):
327
- return model_dump(data, exclude_unset=True)
337
+ return model_dump(data, exclude_unset=True, mode="json")
328
338
 
329
339
  annotated_type = _get_annotated_type(annotation)
330
340
  if annotated_type is None:
@@ -16,6 +16,7 @@ from typing import (
16
16
  overload,
17
17
  )
18
18
  from pathlib import Path
19
+ from datetime import date, datetime
19
20
  from typing_extensions import TypeGuard
20
21
 
21
22
  import sniffio
@@ -395,3 +396,19 @@ def lru_cache(*, maxsize: int | None = 128) -> Callable[[CallableT], CallableT]:
395
396
  maxsize=maxsize,
396
397
  )
397
398
  return cast(Any, wrapper) # type: ignore[no-any-return]
399
+
400
+
401
+ def json_safe(data: object) -> object:
402
+ """Translates a mapping / sequence recursively in the same fashion
403
+ as `pydantic` v2's `model_dump(mode="json")`.
404
+ """
405
+ if is_mapping(data):
406
+ return {json_safe(key): json_safe(value) for key, value in data.items()}
407
+
408
+ if is_iterable(data) and not isinstance(data, (str, bytes, bytearray)):
409
+ return [json_safe(item) for item in data]
410
+
411
+ if isinstance(data, (datetime, date)):
412
+ return data.isoformat()
413
+
414
+ return data
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "payi"
4
- __version__ = "0.1.0-alpha.27" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.29" # x-release-please-version
@@ -53,6 +53,7 @@ class BillingModelsResource(SyncAPIResource):
53
53
  *,
54
54
  name: str,
55
55
  type: Literal["costplus"],
56
+ default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
56
57
  prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
57
58
  prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
58
59
  threshold: Optional[float] | NotGiven = NOT_GIVEN,
@@ -79,6 +80,7 @@ class BillingModelsResource(SyncAPIResource):
79
80
  {
80
81
  "name": name,
81
82
  "type": type,
83
+ "default_price_modifier": default_price_modifier,
82
84
  "prepaid_amount": prepaid_amount,
83
85
  "prepaid_max": prepaid_max,
84
86
  "threshold": threshold,
@@ -127,6 +129,7 @@ class BillingModelsResource(SyncAPIResource):
127
129
  billing_model_id: str,
128
130
  *,
129
131
  type: Literal["costplus"],
132
+ default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
130
133
  name: Optional[str] | NotGiven = NOT_GIVEN,
131
134
  prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
132
135
  prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
@@ -155,6 +158,7 @@ class BillingModelsResource(SyncAPIResource):
155
158
  body=maybe_transform(
156
159
  {
157
160
  "type": type,
161
+ "default_price_modifier": default_price_modifier,
158
162
  "name": name,
159
163
  "prepaid_amount": prepaid_amount,
160
164
  "prepaid_max": prepaid_max,
@@ -243,6 +247,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
243
247
  *,
244
248
  name: str,
245
249
  type: Literal["costplus"],
250
+ default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
246
251
  prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
247
252
  prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
248
253
  threshold: Optional[float] | NotGiven = NOT_GIVEN,
@@ -269,6 +274,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
269
274
  {
270
275
  "name": name,
271
276
  "type": type,
277
+ "default_price_modifier": default_price_modifier,
272
278
  "prepaid_amount": prepaid_amount,
273
279
  "prepaid_max": prepaid_max,
274
280
  "threshold": threshold,
@@ -317,6 +323,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
317
323
  billing_model_id: str,
318
324
  *,
319
325
  type: Literal["costplus"],
326
+ default_price_modifier: Optional[float] | NotGiven = NOT_GIVEN,
320
327
  name: Optional[str] | NotGiven = NOT_GIVEN,
321
328
  prepaid_amount: Optional[float] | NotGiven = NOT_GIVEN,
322
329
  prepaid_max: Optional[float] | NotGiven = NOT_GIVEN,
@@ -345,6 +352,7 @@ class AsyncBillingModelsResource(AsyncAPIResource):
345
352
  body=await async_maybe_transform(
346
353
  {
347
354
  "type": type,
355
+ "default_price_modifier": default_price_modifier,
348
356
  "name": name,
349
357
  "prepaid_amount": prepaid_amount,
350
358
  "prepaid_max": prepaid_max,
@@ -2,6 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import Optional
6
+
5
7
  import httpx
6
8
 
7
9
  from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
@@ -50,6 +52,7 @@ class TypesResource(SyncAPIResource):
50
52
  *,
51
53
  description: str,
52
54
  name: str,
55
+ logging_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
53
56
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
54
57
  # The extra values given here take precedence over values defined on the client or passed to this method.
55
58
  extra_headers: Headers | None = None,
@@ -75,6 +78,7 @@ class TypesResource(SyncAPIResource):
75
78
  {
76
79
  "description": description,
77
80
  "name": name,
81
+ "logging_enabled": logging_enabled,
78
82
  },
79
83
  type_create_params.TypeCreateParams,
80
84
  ),
@@ -121,7 +125,8 @@ class TypesResource(SyncAPIResource):
121
125
  self,
122
126
  experience_name: str,
123
127
  *,
124
- description: str,
128
+ description: Optional[str],
129
+ logging_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
125
130
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
126
131
  # The extra values given here take precedence over values defined on the client or passed to this method.
127
132
  extra_headers: Headers | None = None,
@@ -145,7 +150,13 @@ class TypesResource(SyncAPIResource):
145
150
  raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
146
151
  return self._patch(
147
152
  f"/api/v1/experiences/types/{experience_name}",
148
- body=maybe_transform({"description": description}, type_update_params.TypeUpdateParams),
153
+ body=maybe_transform(
154
+ {
155
+ "description": description,
156
+ "logging_enabled": logging_enabled,
157
+ },
158
+ type_update_params.TypeUpdateParams,
159
+ ),
149
160
  options=make_request_options(
150
161
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
151
162
  ),
@@ -248,6 +259,7 @@ class AsyncTypesResource(AsyncAPIResource):
248
259
  *,
249
260
  description: str,
250
261
  name: str,
262
+ logging_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
251
263
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
252
264
  # The extra values given here take precedence over values defined on the client or passed to this method.
253
265
  extra_headers: Headers | None = None,
@@ -273,6 +285,7 @@ class AsyncTypesResource(AsyncAPIResource):
273
285
  {
274
286
  "description": description,
275
287
  "name": name,
288
+ "logging_enabled": logging_enabled,
276
289
  },
277
290
  type_create_params.TypeCreateParams,
278
291
  ),
@@ -319,7 +332,8 @@ class AsyncTypesResource(AsyncAPIResource):
319
332
  self,
320
333
  experience_name: str,
321
334
  *,
322
- description: str,
335
+ description: Optional[str],
336
+ logging_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
323
337
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
324
338
  # The extra values given here take precedence over values defined on the client or passed to this method.
325
339
  extra_headers: Headers | None = None,
@@ -343,7 +357,13 @@ class AsyncTypesResource(AsyncAPIResource):
343
357
  raise ValueError(f"Expected a non-empty value for `experience_name` but received {experience_name!r}")
344
358
  return await self._patch(
345
359
  f"/api/v1/experiences/types/{experience_name}",
346
- body=await async_maybe_transform({"description": description}, type_update_params.TypeUpdateParams),
360
+ body=await async_maybe_transform(
361
+ {
362
+ "description": description,
363
+ "logging_enabled": logging_enabled,
364
+ },
365
+ type_update_params.TypeUpdateParams,
366
+ ),
347
367
  options=make_request_options(
348
368
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
349
369
  ),