payi 0.1.0a25__tar.gz → 0.1.0a27__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 (152) hide show
  1. payi-0.1.0a27/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a25 → payi-0.1.0a27}/CHANGELOG.md +22 -0
  3. {payi-0.1.0a25 → payi-0.1.0a27}/CONTRIBUTING.md +24 -20
  4. {payi-0.1.0a25 → payi-0.1.0a27}/PKG-INFO +5 -1
  5. {payi-0.1.0a25 → payi-0.1.0a27}/README.md +4 -0
  6. {payi-0.1.0a25 → payi-0.1.0a27}/api.md +33 -11
  7. {payi-0.1.0a25 → payi-0.1.0a27}/pyproject.toml +3 -7
  8. {payi-0.1.0a25 → payi-0.1.0a27}/requirements-dev.lock +1 -1
  9. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_base_client.py +13 -3
  10. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_client.py +24 -8
  11. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_response.py +3 -0
  12. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_version.py +1 -1
  13. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/__init__.py +42 -14
  14. payi-0.1.0a27/src/payi/resources/billing_models.py +492 -0
  15. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/budgets/budgets.py +4 -4
  16. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/categories/resources.py +9 -9
  17. payi-0.1.0a25/src/payi/resources/evaluations/experiences.py → payi-0.1.0a27/src/payi/resources/csat.py +49 -49
  18. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/ingest.py +23 -11
  19. payi-0.1.0a27/src/payi/resources/price_modifiers.py +353 -0
  20. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/__init__.py +10 -1
  21. payi-0.1.0a27/src/payi/types/billing_model.py +29 -0
  22. payi-0.1.0a27/src/payi/types/billing_model_create_params.py +20 -0
  23. payi-0.1.0a27/src/payi/types/billing_model_list_response.py +10 -0
  24. payi-0.1.0a27/src/payi/types/billing_model_update_params.py +20 -0
  25. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budget_create_params.py +2 -2
  26. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budget_response.py +2 -2
  27. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/bulk_ingest_response.py +7 -0
  28. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/categories/resource_create_params.py +10 -4
  29. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/category_resource_response.py +10 -4
  30. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/cost_data.py +0 -1
  31. payi-0.1.0a25/src/payi/types/shared/evaluation_response.py → payi-0.1.0a27/src/payi/types/csat.py +3 -4
  32. payi-0.1.0a27/src/payi/types/csat_create_params.py +14 -0
  33. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/experience_instance.py +0 -1
  34. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/experiences/experience_type.py +0 -1
  35. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/ingest_event_param.py +14 -6
  36. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/ingest_response.py +7 -1
  37. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/ingest_units_params.py +13 -6
  38. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/paged_budget_list.py +2 -2
  39. payi-0.1.0a27/src/payi/types/price_modifier.py +26 -0
  40. payi-0.1.0a27/src/payi/types/price_modifier_create_params.py +17 -0
  41. payi-0.1.0a27/src/payi/types/price_modifier_retrieve_response.py +10 -0
  42. payi-0.1.0a27/src/payi/types/price_modifier_update_params.py +17 -0
  43. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/requests_data.py +2 -1
  44. payi-0.1.0a27/src/payi/types/shared/__init__.py +2 -0
  45. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/total_cost_data.py +0 -1
  46. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/categories/test_resources.py +74 -4
  47. payi-0.1.0a27/tests/api_resources/test_billing_models.py +422 -0
  48. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/test_budgets.py +2 -2
  49. payi-0.1.0a25/tests/api_resources/evaluations/test_experiences.py → payi-0.1.0a27/tests/api_resources/test_csat.py +35 -35
  50. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/test_ingest.py +40 -52
  51. payi-0.1.0a27/tests/api_resources/test_price_modifiers.py +261 -0
  52. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_client.py +121 -2
  53. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_models.py +1 -1
  54. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_response.py +50 -0
  55. payi-0.1.0a25/.release-please-manifest.json +0 -3
  56. payi-0.1.0a25/src/payi/resources/evaluations/__init__.py +0 -47
  57. payi-0.1.0a25/src/payi/resources/evaluations/evaluations.py +0 -134
  58. payi-0.1.0a25/src/payi/resources/evaluations/requests.py +0 -200
  59. payi-0.1.0a25/src/payi/types/shared/__init__.py +0 -3
  60. payi-0.1.0a25/tests/api_resources/evaluations/test_requests.py +0 -124
  61. {payi-0.1.0a25 → payi-0.1.0a27}/.gitignore +0 -0
  62. {payi-0.1.0a25 → payi-0.1.0a27}/LICENSE +0 -0
  63. {payi-0.1.0a25 → payi-0.1.0a27}/SECURITY.md +0 -0
  64. {payi-0.1.0a25 → payi-0.1.0a27}/bin/check-release-environment +0 -0
  65. {payi-0.1.0a25 → payi-0.1.0a27}/bin/publish-pypi +0 -0
  66. {payi-0.1.0a25 → payi-0.1.0a27}/examples/.keep +0 -0
  67. {payi-0.1.0a25 → payi-0.1.0a27}/mypy.ini +0 -0
  68. {payi-0.1.0a25 → payi-0.1.0a27}/noxfile.py +0 -0
  69. {payi-0.1.0a25 → payi-0.1.0a27}/release-please-config.json +0 -0
  70. {payi-0.1.0a25 → payi-0.1.0a27}/requirements.lock +0 -0
  71. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/__init__.py +0 -0
  72. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_compat.py +0 -0
  73. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_constants.py +0 -0
  74. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_exceptions.py +0 -0
  75. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_files.py +0 -0
  76. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_models.py +0 -0
  77. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_qs.py +0 -0
  78. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_resource.py +0 -0
  79. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_streaming.py +0 -0
  80. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_types.py +0 -0
  81. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_utils/__init__.py +0 -0
  82. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_utils/_logs.py +0 -0
  83. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_utils/_proxy.py +0 -0
  84. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_utils/_reflection.py +0 -0
  85. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_utils/_streams.py +0 -0
  86. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_utils/_sync.py +0 -0
  87. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_utils/_transform.py +0 -0
  88. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_utils/_typing.py +0 -0
  89. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/_utils/_utils.py +0 -0
  90. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/lib/.keep +0 -0
  91. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/lib/helpers.py +0 -0
  92. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/py.typed +0 -0
  93. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/budgets/__init__.py +0 -0
  94. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/budgets/tags.py +0 -0
  95. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/categories/__init__.py +0 -0
  96. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/categories/categories.py +0 -0
  97. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/experiences/__init__.py +0 -0
  98. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/experiences/experiences.py +0 -0
  99. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/resources/experiences/types.py +0 -0
  100. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budget_history_response.py +0 -0
  101. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budget_list_params.py +0 -0
  102. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budget_update_params.py +0 -0
  103. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/__init__.py +0 -0
  104. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/budget_tags.py +0 -0
  105. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/tag_create_params.py +0 -0
  106. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/tag_create_response.py +0 -0
  107. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/tag_delete_response.py +0 -0
  108. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/tag_list_response.py +0 -0
  109. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/tag_remove_params.py +0 -0
  110. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/tag_remove_response.py +0 -0
  111. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/tag_update_params.py +0 -0
  112. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/budgets/tag_update_response.py +0 -0
  113. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/categories/__init__.py +0 -0
  114. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/categories/resource_list_response.py +0 -0
  115. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/category_delete_resource_response.py +0 -0
  116. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/category_delete_response.py +0 -0
  117. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/category_list_resources_response.py +0 -0
  118. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/category_list_response.py +0 -0
  119. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/category_response.py +0 -0
  120. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/cost_details.py +0 -0
  121. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/default_response.py +0 -0
  122. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/evaluations/__init__.py +0 -0
  123. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/evaluations/experience_create_params.py +0 -0
  124. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/evaluations/request_create_params.py +0 -0
  125. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/experiences/__init__.py +0 -0
  126. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/experiences/type_create_params.py +0 -0
  127. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/experiences/type_list_params.py +0 -0
  128. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/experiences/type_list_response.py +0 -0
  129. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/experiences/type_update_params.py +0 -0
  130. {payi-0.1.0a25 → payi-0.1.0a27}/src/payi/types/ingest_bulk_params.py +0 -0
  131. {payi-0.1.0a25 → payi-0.1.0a27}/tests/__init__.py +0 -0
  132. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/__init__.py +0 -0
  133. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/budgets/__init__.py +0 -0
  134. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/budgets/test_tags.py +0 -0
  135. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/categories/__init__.py +0 -0
  136. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/evaluations/__init__.py +0 -0
  137. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/experiences/__init__.py +0 -0
  138. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/experiences/test_types.py +0 -0
  139. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/test_categories.py +0 -0
  140. {payi-0.1.0a25 → payi-0.1.0a27}/tests/api_resources/test_experiences.py +0 -0
  141. {payi-0.1.0a25 → payi-0.1.0a27}/tests/conftest.py +0 -0
  142. {payi-0.1.0a25 → payi-0.1.0a27}/tests/sample_file.txt +0 -0
  143. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_deepcopy.py +0 -0
  144. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_extract_files.py +0 -0
  145. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_files.py +0 -0
  146. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_qs.py +0 -0
  147. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_required_args.py +0 -0
  148. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_streaming.py +0 -0
  149. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_transform.py +0 -0
  150. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_utils/test_proxy.py +0 -0
  151. {payi-0.1.0a25 → payi-0.1.0a27}/tests/test_utils/test_typing.py +0 -0
  152. {payi-0.1.0a25 → payi-0.1.0a27}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.27"
3
+ }
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.27 (2024-10-22)
4
+
5
+ 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)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([#121](https://github.com/Pay-i/pay-i-python/issues/121)) ([5d4aa28](https://github.com/Pay-i/pay-i-python/commit/5d4aa28bde2fa653fb5c99081758d8c06de572ea))
10
+ * **api:** api update ([#125](https://github.com/Pay-i/pay-i-python/issues/125)) ([64e1ac8](https://github.com/Pay-i/pay-i-python/commit/64e1ac8e641917f23998c95fc9ce717484dc826f))
11
+
12
+ ## 0.1.0-alpha.26 (2024-10-01)
13
+
14
+ Full Changelog: [v0.1.0-alpha.25...v0.1.0-alpha.26](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.25...v0.1.0-alpha.26)
15
+
16
+ ### Features
17
+
18
+ * **api:** api update ([#121](https://github.com/Pay-i/pay-i-python/issues/121)) ([2705291](https://github.com/Pay-i/pay-i-python/commit/27052910f37169c45456fc2a752a8525eb858d4e))
19
+
20
+
21
+ ### Chores
22
+
23
+ * **internal:** codegen related update ([#119](https://github.com/Pay-i/pay-i-python/issues/119)) ([1e7361a](https://github.com/Pay-i/pay-i-python/commit/1e7361a69e9751e834bb32a450624324aa27c646))
24
+
3
25
  ## 0.1.0-alpha.25 (2024-09-25)
4
26
 
5
27
  Full Changelog: [v0.1.0-alpha.24...v0.1.0-alpha.25](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.24...v0.1.0-alpha.25)
@@ -2,9 +2,13 @@
2
2
 
3
3
  ### With Rye
4
4
 
5
- We use [Rye](https://rye.astral.sh/) to manage dependencies so we highly recommend [installing it](https://rye.astral.sh/guide/installation/) as it will automatically provision a Python environment with the expected Python version.
5
+ We use [Rye](https://rye.astral.sh/) to manage dependencies because it will automatically provision a Python environment with the expected Python version. To set it up, run:
6
6
 
7
- After installing Rye, you'll just have to run this command:
7
+ ```sh
8
+ $ ./scripts/bootstrap
9
+ ```
10
+
11
+ Or [install Rye manually](https://rye.astral.sh/guide/installation/) and run:
8
12
 
9
13
  ```sh
10
14
  $ rye sync --all-features
@@ -39,17 +43,17 @@ modify the contents of the `src/payi/lib/` and `examples/` directories.
39
43
 
40
44
  All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
41
45
 
42
- ```bash
46
+ ```py
43
47
  # add an example to examples/<your-example>.py
44
48
 
45
49
  #!/usr/bin/env -S rye run python
46
50
 
47
51
  ```
48
52
 
49
- ```
50
- chmod +x examples/<your-example>.py
53
+ ```sh
54
+ $ chmod +x examples/<your-example>.py
51
55
  # run the example against your api
52
- ./examples/<your-example>.py
56
+ $ ./examples/<your-example>.py
53
57
  ```
54
58
 
55
59
  ## Using the repository from source
@@ -58,8 +62,8 @@ If you’d like to use the repository from source, you can either install from g
58
62
 
59
63
  To install via git:
60
64
 
61
- ```bash
62
- pip install git+ssh://git@github.com/Pay-i/pay-i-python.git
65
+ ```sh
66
+ $ pip install git+ssh://git@github.com/Pay-i/pay-i-python.git
63
67
  ```
64
68
 
65
69
  Alternatively, you can build from source and install the wheel file:
@@ -68,29 +72,29 @@ Building this package will create two files in the `dist/` directory, a `.tar.gz
68
72
 
69
73
  To create a distributable version of the library, all you have to do is run this command:
70
74
 
71
- ```bash
72
- rye build
75
+ ```sh
76
+ $ rye build
73
77
  # or
74
- python -m build
78
+ $ python -m build
75
79
  ```
76
80
 
77
81
  Then to install:
78
82
 
79
83
  ```sh
80
- pip install ./path-to-wheel-file.whl
84
+ $ pip install ./path-to-wheel-file.whl
81
85
  ```
82
86
 
83
87
  ## Running tests
84
88
 
85
89
  Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
86
90
 
87
- ```bash
91
+ ```sh
88
92
  # you will need npm installed
89
- npx prism mock path/to/your/openapi.yml
93
+ $ npx prism mock path/to/your/openapi.yml
90
94
  ```
91
95
 
92
- ```bash
93
- rye run pytest
96
+ ```sh
97
+ $ ./scripts/test
94
98
  ```
95
99
 
96
100
  ## Linting and formatting
@@ -100,14 +104,14 @@ This repository uses [ruff](https://github.com/astral-sh/ruff) and
100
104
 
101
105
  To lint:
102
106
 
103
- ```bash
104
- rye run lint
107
+ ```sh
108
+ $ ./scripts/lint
105
109
  ```
106
110
 
107
111
  To format and fix all ruff issues automatically:
108
112
 
109
- ```bash
110
- rye run format
113
+ ```sh
114
+ $ ./scripts/format
111
115
  ```
112
116
 
113
117
  ## Publishing and releases
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a25
3
+ Version: 0.1.0a27
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
@@ -370,3 +370,7 @@ print(payi.__version__)
370
370
  ## Requirements
371
371
 
372
372
  Python 3.7 or higher.
373
+
374
+ ## Contributing
375
+
376
+ See [the contributing documentation](https://github.com/Pay-i/pay-i-python/tree/main/./CONTRIBUTING.md).
@@ -336,3 +336,7 @@ print(payi.__version__)
336
336
  ## Requirements
337
337
 
338
338
  Python 3.7 or higher.
339
+
340
+ ## Contributing
341
+
342
+ See [the contributing documentation](./CONTRIBUTING.md).
@@ -1,9 +1,3 @@
1
- # Shared Types
2
-
3
- ```python
4
- from payi.types import EvaluationResponse
5
- ```
6
-
7
1
  # Budgets
8
2
 
9
3
  Types:
@@ -133,16 +127,44 @@ Methods:
133
127
  - <code title="get /api/v1/experiences/types">client.experiences.types.<a href="./src/payi/resources/experiences/types.py">list</a>(\*\*<a href="src/payi/types/experiences/type_list_params.py">params</a>) -> <a href="./src/payi/types/experiences/type_list_response.py">TypeListResponse</a></code>
134
128
  - <code title="delete /api/v1/experiences/types/{experience_name}">client.experiences.types.<a href="./src/payi/resources/experiences/types.py">delete</a>(experience_name) -> <a href="./src/payi/types/experiences/experience_type.py">ExperienceType</a></code>
135
129
 
136
- # Evaluations
130
+ # Csat
131
+
132
+ Types:
133
+
134
+ ```python
135
+ from payi.types import Csat
136
+ ```
137
+
138
+ Methods:
139
+
140
+ - <code title="post /api/v1/csat/experiences/{experience_id}">client.csat.<a href="./src/payi/resources/csat.py">create</a>(experience_id, \*\*<a href="src/payi/types/csat_create_params.py">params</a>) -> <a href="./src/payi/types/csat.py">Csat</a></code>
141
+
142
+ # BillingModels
143
+
144
+ Types:
137
145
 
138
- ## Experiences
146
+ ```python
147
+ from payi.types import BillingModel, BillingModelListResponse
148
+ ```
139
149
 
140
150
  Methods:
141
151
 
142
- - <code title="post /api/v1/evaluations/experiences/{experience_id}">client.evaluations.experiences.<a href="./src/payi/resources/evaluations/experiences.py">create</a>(experience_id, \*\*<a href="src/payi/types/evaluations/experience_create_params.py">params</a>) -> <a href="./src/payi/types/shared/evaluation_response.py">EvaluationResponse</a></code>
152
+ - <code title="post /api/v1/billing-model">client.billing_models.<a href="./src/payi/resources/billing_models.py">create</a>(\*\*<a href="src/payi/types/billing_model_create_params.py">params</a>) -> <a href="./src/payi/types/billing_model.py">BillingModel</a></code>
153
+ - <code title="get /api/v1/billing-model/{billing_model_id}">client.billing_models.<a href="./src/payi/resources/billing_models.py">retrieve</a>(billing_model_id) -> <a href="./src/payi/types/billing_model.py">BillingModel</a></code>
154
+ - <code title="put /api/v1/billing-model/{billing_model_id}">client.billing_models.<a href="./src/payi/resources/billing_models.py">update</a>(billing_model_id, \*\*<a href="src/payi/types/billing_model_update_params.py">params</a>) -> <a href="./src/payi/types/billing_model.py">BillingModel</a></code>
155
+ - <code title="get /api/v1/billing-model">client.billing_models.<a href="./src/payi/resources/billing_models.py">list</a>() -> <a href="./src/payi/types/billing_model_list_response.py">BillingModelListResponse</a></code>
156
+ - <code title="put /api/v1/billing-model/{billing_model_id}/default">client.billing_models.<a href="./src/payi/resources/billing_models.py">set_default</a>(billing_model_id) -> <a href="./src/payi/types/billing_model.py">BillingModel</a></code>
143
157
 
144
- ## Requests
158
+ # PriceModifiers
159
+
160
+ Types:
161
+
162
+ ```python
163
+ from payi.types import PriceModifier, PriceModifierRetrieveResponse
164
+ ```
145
165
 
146
166
  Methods:
147
167
 
148
- - <code title="post /api/v1/evaluations/requests/{request_id}">client.evaluations.requests.<a href="./src/payi/resources/evaluations/requests.py">create</a>(request_id, \*\*<a href="src/payi/types/evaluations/request_create_params.py">params</a>) -> <a href="./src/payi/types/shared/evaluation_response.py">EvaluationResponse</a></code>
168
+ - <code title="post /api/v1/price-modifier">client.price_modifiers.<a href="./src/payi/resources/price_modifiers.py">create</a>(\*\*<a href="src/payi/types/price_modifier_create_params.py">params</a>) -> <a href="./src/payi/types/price_modifier.py">PriceModifier</a></code>
169
+ - <code title="get /api/v1/price-modifier/{billing_model_id}">client.price_modifiers.<a href="./src/payi/resources/price_modifiers.py">retrieve</a>(billing_model_id) -> <a href="./src/payi/types/price_modifier_retrieve_response.py">PriceModifierRetrieveResponse</a></code>
170
+ - <code title="put /api/v1/price-modifier">client.price_modifiers.<a href="./src/payi/resources/price_modifiers.py">update</a>(\*\*<a href="src/payi/types/price_modifier_update_params.py">params</a>) -> <a href="./src/payi/types/price_modifier.py">PriceModifier</a></code>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.25"
3
+ version = "0.1.0-alpha.27"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -63,11 +63,11 @@ format = { chain = [
63
63
  "format:ruff",
64
64
  "format:docs",
65
65
  "fix:ruff",
66
+ # run formatting again to fix any inconsistencies when imports are stripped
67
+ "format:ruff",
66
68
  ]}
67
- "format:black" = "black ."
68
69
  "format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
69
70
  "format:ruff" = "ruff format"
70
- "format:isort" = "isort ."
71
71
 
72
72
  "lint" = { chain = [
73
73
  "check:ruff",
@@ -125,10 +125,6 @@ path = "README.md"
125
125
  pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
126
126
  replacement = '[\1](https://github.com/Pay-i/pay-i-python/tree/main/\g<2>)'
127
127
 
128
- [tool.black]
129
- line-length = 120
130
- target-version = ["py37"]
131
-
132
128
  [tool.pytest.ini_options]
133
129
  testpaths = ["tests"]
134
130
  addopts = "--tb=short"
@@ -80,7 +80,7 @@ pytz==2023.3.post1
80
80
  # via dirty-equals
81
81
  respx==0.20.2
82
82
  rich==13.7.1
83
- ruff==0.6.5
83
+ ruff==0.6.9
84
84
  setuptools==68.2.2
85
85
  # via nodeenv
86
86
  six==1.16.0
@@ -143,6 +143,12 @@ class PageInfo:
143
143
  self.url = url
144
144
  self.params = params
145
145
 
146
+ @override
147
+ def __repr__(self) -> str:
148
+ if self.url:
149
+ return f"{self.__class__.__name__}(url={self.url})"
150
+ return f"{self.__class__.__name__}(params={self.params})"
151
+
146
152
 
147
153
  class BasePage(GenericModel, Generic[_T]):
148
154
  """
@@ -412,7 +418,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
412
418
  if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers:
413
419
  headers[idempotency_header] = options.idempotency_key or self._idempotency_key()
414
420
 
415
- headers.setdefault("x-stainless-retry-count", str(retries_taken))
421
+ # Don't set the retry count header if it was already set or removed by the caller. We check
422
+ # `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case.
423
+ if "x-stainless-retry-count" not in (header.lower() for header in custom_headers):
424
+ headers["x-stainless-retry-count"] = str(retries_taken)
416
425
 
417
426
  return headers
418
427
 
@@ -686,7 +695,8 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
686
695
  if retry_after is not None and 0 < retry_after <= 60:
687
696
  return retry_after
688
697
 
689
- nb_retries = max_retries - remaining_retries
698
+ # Also cap retry count to 1000 to avoid any potential overflows with `pow`
699
+ nb_retries = min(max_retries - remaining_retries, 1000)
690
700
 
691
701
  # Apply exponential backoff, but not more than the max.
692
702
  sleep_seconds = min(INITIAL_RETRY_DELAY * pow(2.0, nb_retries), MAX_RETRY_DELAY)
@@ -1565,7 +1575,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1565
1575
  except Exception as err:
1566
1576
  log.debug("Encountered Exception", exc_info=True)
1567
1577
 
1568
- if retries_taken > 0:
1578
+ if remaining_retries > 0:
1569
1579
  return await self._retry_request(
1570
1580
  input_options,
1571
1581
  cast_to,
@@ -50,7 +50,9 @@ class Payi(SyncAPIClient):
50
50
  ingest: resources.IngestResource
51
51
  categories: resources.CategoriesResource
52
52
  experiences: resources.ExperiencesResource
53
- evaluations: resources.EvaluationsResource
53
+ csat: resources.CsatResource
54
+ billing_models: resources.BillingModelsResource
55
+ price_modifiers: resources.PriceModifiersResource
54
56
  with_raw_response: PayiWithRawResponse
55
57
  with_streaming_response: PayiWithStreamedResponse
56
58
 
@@ -112,7 +114,9 @@ class Payi(SyncAPIClient):
112
114
  self.ingest = resources.IngestResource(self)
113
115
  self.categories = resources.CategoriesResource(self)
114
116
  self.experiences = resources.ExperiencesResource(self)
115
- self.evaluations = resources.EvaluationsResource(self)
117
+ self.csat = resources.CsatResource(self)
118
+ self.billing_models = resources.BillingModelsResource(self)
119
+ self.price_modifiers = resources.PriceModifiersResource(self)
116
120
  self.with_raw_response = PayiWithRawResponse(self)
117
121
  self.with_streaming_response = PayiWithStreamedResponse(self)
118
122
 
@@ -226,7 +230,9 @@ class AsyncPayi(AsyncAPIClient):
226
230
  ingest: resources.AsyncIngestResource
227
231
  categories: resources.AsyncCategoriesResource
228
232
  experiences: resources.AsyncExperiencesResource
229
- evaluations: resources.AsyncEvaluationsResource
233
+ csat: resources.AsyncCsatResource
234
+ billing_models: resources.AsyncBillingModelsResource
235
+ price_modifiers: resources.AsyncPriceModifiersResource
230
236
  with_raw_response: AsyncPayiWithRawResponse
231
237
  with_streaming_response: AsyncPayiWithStreamedResponse
232
238
 
@@ -288,7 +294,9 @@ class AsyncPayi(AsyncAPIClient):
288
294
  self.ingest = resources.AsyncIngestResource(self)
289
295
  self.categories = resources.AsyncCategoriesResource(self)
290
296
  self.experiences = resources.AsyncExperiencesResource(self)
291
- self.evaluations = resources.AsyncEvaluationsResource(self)
297
+ self.csat = resources.AsyncCsatResource(self)
298
+ self.billing_models = resources.AsyncBillingModelsResource(self)
299
+ self.price_modifiers = resources.AsyncPriceModifiersResource(self)
292
300
  self.with_raw_response = AsyncPayiWithRawResponse(self)
293
301
  self.with_streaming_response = AsyncPayiWithStreamedResponse(self)
294
302
 
@@ -403,7 +411,9 @@ class PayiWithRawResponse:
403
411
  self.ingest = resources.IngestResourceWithRawResponse(client.ingest)
404
412
  self.categories = resources.CategoriesResourceWithRawResponse(client.categories)
405
413
  self.experiences = resources.ExperiencesResourceWithRawResponse(client.experiences)
406
- self.evaluations = resources.EvaluationsResourceWithRawResponse(client.evaluations)
414
+ self.csat = resources.CsatResourceWithRawResponse(client.csat)
415
+ self.billing_models = resources.BillingModelsResourceWithRawResponse(client.billing_models)
416
+ self.price_modifiers = resources.PriceModifiersResourceWithRawResponse(client.price_modifiers)
407
417
 
408
418
 
409
419
  class AsyncPayiWithRawResponse:
@@ -412,7 +422,9 @@ class AsyncPayiWithRawResponse:
412
422
  self.ingest = resources.AsyncIngestResourceWithRawResponse(client.ingest)
413
423
  self.categories = resources.AsyncCategoriesResourceWithRawResponse(client.categories)
414
424
  self.experiences = resources.AsyncExperiencesResourceWithRawResponse(client.experiences)
415
- self.evaluations = resources.AsyncEvaluationsResourceWithRawResponse(client.evaluations)
425
+ self.csat = resources.AsyncCsatResourceWithRawResponse(client.csat)
426
+ self.billing_models = resources.AsyncBillingModelsResourceWithRawResponse(client.billing_models)
427
+ self.price_modifiers = resources.AsyncPriceModifiersResourceWithRawResponse(client.price_modifiers)
416
428
 
417
429
 
418
430
  class PayiWithStreamedResponse:
@@ -421,7 +433,9 @@ class PayiWithStreamedResponse:
421
433
  self.ingest = resources.IngestResourceWithStreamingResponse(client.ingest)
422
434
  self.categories = resources.CategoriesResourceWithStreamingResponse(client.categories)
423
435
  self.experiences = resources.ExperiencesResourceWithStreamingResponse(client.experiences)
424
- self.evaluations = resources.EvaluationsResourceWithStreamingResponse(client.evaluations)
436
+ self.csat = resources.CsatResourceWithStreamingResponse(client.csat)
437
+ self.billing_models = resources.BillingModelsResourceWithStreamingResponse(client.billing_models)
438
+ self.price_modifiers = resources.PriceModifiersResourceWithStreamingResponse(client.price_modifiers)
425
439
 
426
440
 
427
441
  class AsyncPayiWithStreamedResponse:
@@ -430,7 +444,9 @@ class AsyncPayiWithStreamedResponse:
430
444
  self.ingest = resources.AsyncIngestResourceWithStreamingResponse(client.ingest)
431
445
  self.categories = resources.AsyncCategoriesResourceWithStreamingResponse(client.categories)
432
446
  self.experiences = resources.AsyncExperiencesResourceWithStreamingResponse(client.experiences)
433
- self.evaluations = resources.AsyncEvaluationsResourceWithStreamingResponse(client.evaluations)
447
+ self.csat = resources.AsyncCsatResourceWithStreamingResponse(client.csat)
448
+ self.billing_models = resources.AsyncBillingModelsResourceWithStreamingResponse(client.billing_models)
449
+ self.price_modifiers = resources.AsyncPriceModifiersResourceWithStreamingResponse(client.price_modifiers)
434
450
 
435
451
 
436
452
  Client = Payi
@@ -192,6 +192,9 @@ class BaseAPIResponse(Generic[R]):
192
192
  if cast_to == float:
193
193
  return cast(R, float(response.text))
194
194
 
195
+ if cast_to == bool:
196
+ return cast(R, response.text.lower() == "true")
197
+
195
198
  origin = get_origin(cast_to) or cast_to
196
199
 
197
200
  if origin == APIResponse:
@@ -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.25" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.27" # x-release-please-version
@@ -1,5 +1,13 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ from .csat import (
4
+ CsatResource,
5
+ AsyncCsatResource,
6
+ CsatResourceWithRawResponse,
7
+ AsyncCsatResourceWithRawResponse,
8
+ CsatResourceWithStreamingResponse,
9
+ AsyncCsatResourceWithStreamingResponse,
10
+ )
3
11
  from .ingest import (
4
12
  IngestResource,
5
13
  AsyncIngestResource,
@@ -24,14 +32,6 @@ from .categories import (
24
32
  CategoriesResourceWithStreamingResponse,
25
33
  AsyncCategoriesResourceWithStreamingResponse,
26
34
  )
27
- from .evaluations import (
28
- EvaluationsResource,
29
- AsyncEvaluationsResource,
30
- EvaluationsResourceWithRawResponse,
31
- AsyncEvaluationsResourceWithRawResponse,
32
- EvaluationsResourceWithStreamingResponse,
33
- AsyncEvaluationsResourceWithStreamingResponse,
34
- )
35
35
  from .experiences import (
36
36
  ExperiencesResource,
37
37
  AsyncExperiencesResource,
@@ -40,6 +40,22 @@ from .experiences import (
40
40
  ExperiencesResourceWithStreamingResponse,
41
41
  AsyncExperiencesResourceWithStreamingResponse,
42
42
  )
43
+ from .billing_models import (
44
+ BillingModelsResource,
45
+ AsyncBillingModelsResource,
46
+ BillingModelsResourceWithRawResponse,
47
+ AsyncBillingModelsResourceWithRawResponse,
48
+ BillingModelsResourceWithStreamingResponse,
49
+ AsyncBillingModelsResourceWithStreamingResponse,
50
+ )
51
+ from .price_modifiers import (
52
+ PriceModifiersResource,
53
+ AsyncPriceModifiersResource,
54
+ PriceModifiersResourceWithRawResponse,
55
+ AsyncPriceModifiersResourceWithRawResponse,
56
+ PriceModifiersResourceWithStreamingResponse,
57
+ AsyncPriceModifiersResourceWithStreamingResponse,
58
+ )
43
59
 
44
60
  __all__ = [
45
61
  "BudgetsResource",
@@ -66,10 +82,22 @@ __all__ = [
66
82
  "AsyncExperiencesResourceWithRawResponse",
67
83
  "ExperiencesResourceWithStreamingResponse",
68
84
  "AsyncExperiencesResourceWithStreamingResponse",
69
- "EvaluationsResource",
70
- "AsyncEvaluationsResource",
71
- "EvaluationsResourceWithRawResponse",
72
- "AsyncEvaluationsResourceWithRawResponse",
73
- "EvaluationsResourceWithStreamingResponse",
74
- "AsyncEvaluationsResourceWithStreamingResponse",
85
+ "CsatResource",
86
+ "AsyncCsatResource",
87
+ "CsatResourceWithRawResponse",
88
+ "AsyncCsatResourceWithRawResponse",
89
+ "CsatResourceWithStreamingResponse",
90
+ "AsyncCsatResourceWithStreamingResponse",
91
+ "BillingModelsResource",
92
+ "AsyncBillingModelsResource",
93
+ "BillingModelsResourceWithRawResponse",
94
+ "AsyncBillingModelsResourceWithRawResponse",
95
+ "BillingModelsResourceWithStreamingResponse",
96
+ "AsyncBillingModelsResourceWithStreamingResponse",
97
+ "PriceModifiersResource",
98
+ "AsyncPriceModifiersResource",
99
+ "PriceModifiersResourceWithRawResponse",
100
+ "AsyncPriceModifiersResourceWithRawResponse",
101
+ "PriceModifiersResourceWithStreamingResponse",
102
+ "AsyncPriceModifiersResourceWithStreamingResponse",
75
103
  ]