motor-python-sdk 0.0.3__tar.gz → 0.0.28__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 (69) hide show
  1. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/PKG-INFO +4 -4
  2. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/README.md +3 -3
  3. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/pyproject.toml +1 -1
  4. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/__init__.py +27 -6
  5. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/client.py +4 -4
  6. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/client_wrapper.py +2 -2
  7. motor_python_sdk-0.0.28/src/yasminaai/environment.py +8 -0
  8. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/policies/client.py +69 -6
  9. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/policies/raw_client.py +50 -8
  10. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/quotes/__init__.py +3 -6
  11. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/quotes/client.py +125 -21
  12. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/quotes/raw_client.py +120 -19
  13. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/quotes/types/__init__.py +3 -6
  14. motor_python_sdk-0.0.28/src/yasminaai/quotes/types/post_quote_requests_request_accept_language.py +5 -0
  15. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/types/__init__.py +24 -0
  16. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/types/benefit.py +5 -0
  17. motor_python_sdk-0.0.28/src/yasminaai/types/company_quote.py +54 -0
  18. motor_python_sdk-0.0.28/src/yasminaai/types/company_quote_type.py +5 -0
  19. motor_python_sdk-0.0.28/src/yasminaai/types/paginated_policy_response.py +39 -0
  20. motor_python_sdk-0.0.3/src/yasminaai/quotes/types/get_quote_requests_response.py → motor_python_sdk-0.0.28/src/yasminaai/types/paginated_quote_response.py +8 -6
  21. motor_python_sdk-0.0.3/src/yasminaai/quotes/types/get_quote_requests_response_links_item.py → motor_python_sdk-0.0.28/src/yasminaai/types/pagination_link.py +2 -2
  22. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/types/policy.py +6 -0
  23. motor_python_sdk-0.0.28/src/yasminaai/types/policy_aggregates.py +29 -0
  24. motor_python_sdk-0.0.28/src/yasminaai/types/policy_month_aggregate.py +20 -0
  25. motor_python_sdk-0.0.3/src/yasminaai/types/company_quote.py → motor_python_sdk-0.0.28/src/yasminaai/types/quote_request_aggregates.py +10 -6
  26. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/types/quote_response.py +5 -0
  27. motor_python_sdk-0.0.28/src/yasminaai/types/quote_response_quotes_item.py +61 -0
  28. motor_python_sdk-0.0.28/src/yasminaai/types/quote_response_quotes_item_type.py +5 -0
  29. motor_python_sdk-0.0.3/src/yasminaai/environment.py +0 -7
  30. motor_python_sdk-0.0.3/src/yasminaai/types/quote_response_quotes_item.py +0 -30
  31. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/_default_clients.py +0 -0
  32. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/__init__.py +0 -0
  33. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/api_error.py +0 -0
  34. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/datetime_utils.py +0 -0
  35. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/file.py +0 -0
  36. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/force_multipart.py +0 -0
  37. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/http_client.py +0 -0
  38. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/http_response.py +0 -0
  39. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/http_sse/__init__.py +0 -0
  40. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/http_sse/_api.py +0 -0
  41. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/http_sse/_decoders.py +0 -0
  42. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/http_sse/_exceptions.py +0 -0
  43. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/http_sse/_models.py +0 -0
  44. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/jsonable_encoder.py +0 -0
  45. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/logging.py +0 -0
  46. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/parse_error.py +0 -0
  47. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/pydantic_utilities.py +0 -0
  48. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/query_encoder.py +0 -0
  49. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/remove_none_from_dict.py +0 -0
  50. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/request_options.py +0 -0
  51. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/core/serialization.py +0 -0
  52. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/errors/__init__.py +0 -0
  53. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/errors/bad_request_error.py +0 -0
  54. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/errors/not_found_error.py +0 -0
  55. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/errors/unauthorized_error.py +0 -0
  56. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/errors/unprocessable_entity_error.py +0 -0
  57. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/ot_ps/__init__.py +0 -0
  58. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/ot_ps/client.py +0 -0
  59. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/ot_ps/raw_client.py +0 -0
  60. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/policies/__init__.py +0 -0
  61. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/py.typed +0 -0
  62. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/quotes/types/delete_quote_requests_id_response.py +0 -0
  63. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/quotes/types/post_quote_requests_request_drivers_item.py +0 -0
  64. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/types/bad_request_error_body.py +0 -0
  65. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/types/error.py +0 -0
  66. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/types/quote_price.py +0 -0
  67. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/types/quote_response_drivers_item.py +0 -0
  68. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/types/unauthorized_error_body.py +0 -0
  69. {motor_python_sdk-0.0.3 → motor_python_sdk-0.0.28}/src/yasminaai/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: motor-python-sdk
3
- Version: 0.0.3
3
+ Version: 0.0.28
4
4
  Summary:
5
5
  Requires-Python: >=3.10,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -74,10 +74,10 @@ client = YasminaaiApi(
74
74
  )
75
75
 
76
76
  client.quotes.request_quotes(
77
+ otp="123456",
77
78
  owner_id="owner_id",
78
79
  phone="phone",
79
80
  birthdate=datetime.date.fromisoformat("2023-01-15"),
80
- car_sequence_number="car_sequence_number",
81
81
  car_estimated_cost=1.1,
82
82
  )
83
83
  ```
@@ -91,7 +91,7 @@ from yasminaai import YasminaaiApi
91
91
  from yasminaai.environment import YasminaaiApiEnvironment
92
92
 
93
93
  client = YasminaaiApi(
94
- environment=YasminaaiApiEnvironment.DEFAULT,
94
+ environment=YasminaaiApiEnvironment.SANDBOX,
95
95
  )
96
96
  ```
97
97
 
@@ -112,10 +112,10 @@ client = AsyncYasminaaiApi(
112
112
 
113
113
  async def main() -> None:
114
114
  await client.quotes.request_quotes(
115
+ otp="123456",
115
116
  owner_id="owner_id",
116
117
  phone="phone",
117
118
  birthdate=datetime.date.fromisoformat("2023-01-15"),
118
- car_sequence_number="car_sequence_number",
119
119
  car_estimated_cost=1.1,
120
120
  )
121
121
 
@@ -43,10 +43,10 @@ client = YasminaaiApi(
43
43
  )
44
44
 
45
45
  client.quotes.request_quotes(
46
+ otp="123456",
46
47
  owner_id="owner_id",
47
48
  phone="phone",
48
49
  birthdate=datetime.date.fromisoformat("2023-01-15"),
49
- car_sequence_number="car_sequence_number",
50
50
  car_estimated_cost=1.1,
51
51
  )
52
52
  ```
@@ -60,7 +60,7 @@ from yasminaai import YasminaaiApi
60
60
  from yasminaai.environment import YasminaaiApiEnvironment
61
61
 
62
62
  client = YasminaaiApi(
63
- environment=YasminaaiApiEnvironment.DEFAULT,
63
+ environment=YasminaaiApiEnvironment.SANDBOX,
64
64
  )
65
65
  ```
66
66
 
@@ -81,10 +81,10 @@ client = AsyncYasminaaiApi(
81
81
 
82
82
  async def main() -> None:
83
83
  await client.quotes.request_quotes(
84
+ otp="123456",
84
85
  owner_id="owner_id",
85
86
  phone="phone",
86
87
  birthdate=datetime.date.fromisoformat("2023-01-15"),
87
- car_sequence_number="car_sequence_number",
88
88
  car_estimated_cost=1.1,
89
89
  )
90
90
 
@@ -4,7 +4,7 @@ dynamic = ["version"]
4
4
 
5
5
  [tool.poetry]
6
6
  name = "motor-python-sdk"
7
- version = "0.0.3"
7
+ version = "0.0.28"
8
8
  description = ""
9
9
  readme = "README.md"
10
10
  authors = []
@@ -10,12 +10,20 @@ if typing.TYPE_CHECKING:
10
10
  BadRequestErrorBody,
11
11
  Benefit,
12
12
  CompanyQuote,
13
+ CompanyQuoteType,
13
14
  Error,
15
+ PaginatedPolicyResponse,
16
+ PaginatedQuoteResponse,
17
+ PaginationLink,
14
18
  Policy,
19
+ PolicyAggregates,
20
+ PolicyMonthAggregate,
15
21
  QuotePrice,
22
+ QuoteRequestAggregates,
16
23
  QuoteResponse,
17
24
  QuoteResponseDriversItem,
18
25
  QuoteResponseQuotesItem,
26
+ QuoteResponseQuotesItemType,
19
27
  UnauthorizedErrorBody,
20
28
  )
21
29
  from .errors import BadRequestError, NotFoundError, UnauthorizedError, UnprocessableEntityError
@@ -25,8 +33,7 @@ if typing.TYPE_CHECKING:
25
33
  from .environment import YasminaaiApiEnvironment
26
34
  from .quotes import (
27
35
  DeleteQuoteRequestsIdResponse,
28
- GetQuoteRequestsResponse,
29
- GetQuoteRequestsResponseLinksItem,
36
+ PostQuoteRequestsRequestAcceptLanguage,
30
37
  PostQuoteRequestsRequestDriversItem,
31
38
  )
32
39
  from .version import __version__
@@ -36,19 +43,26 @@ _dynamic_imports: typing.Dict[str, str] = {
36
43
  "BadRequestErrorBody": ".types",
37
44
  "Benefit": ".types",
38
45
  "CompanyQuote": ".types",
46
+ "CompanyQuoteType": ".types",
39
47
  "DefaultAioHttpClient": "._default_clients",
40
48
  "DefaultAsyncHttpxClient": "._default_clients",
41
49
  "DeleteQuoteRequestsIdResponse": ".quotes",
42
50
  "Error": ".types",
43
- "GetQuoteRequestsResponse": ".quotes",
44
- "GetQuoteRequestsResponseLinksItem": ".quotes",
45
51
  "NotFoundError": ".errors",
52
+ "PaginatedPolicyResponse": ".types",
53
+ "PaginatedQuoteResponse": ".types",
54
+ "PaginationLink": ".types",
46
55
  "Policy": ".types",
56
+ "PolicyAggregates": ".types",
57
+ "PolicyMonthAggregate": ".types",
58
+ "PostQuoteRequestsRequestAcceptLanguage": ".quotes",
47
59
  "PostQuoteRequestsRequestDriversItem": ".quotes",
48
60
  "QuotePrice": ".types",
61
+ "QuoteRequestAggregates": ".types",
49
62
  "QuoteResponse": ".types",
50
63
  "QuoteResponseDriversItem": ".types",
51
64
  "QuoteResponseQuotesItem": ".types",
65
+ "QuoteResponseQuotesItemType": ".types",
52
66
  "UnauthorizedError": ".errors",
53
67
  "UnauthorizedErrorBody": ".types",
54
68
  "UnprocessableEntityError": ".errors",
@@ -88,19 +102,26 @@ __all__ = [
88
102
  "BadRequestErrorBody",
89
103
  "Benefit",
90
104
  "CompanyQuote",
105
+ "CompanyQuoteType",
91
106
  "DefaultAioHttpClient",
92
107
  "DefaultAsyncHttpxClient",
93
108
  "DeleteQuoteRequestsIdResponse",
94
109
  "Error",
95
- "GetQuoteRequestsResponse",
96
- "GetQuoteRequestsResponseLinksItem",
97
110
  "NotFoundError",
111
+ "PaginatedPolicyResponse",
112
+ "PaginatedQuoteResponse",
113
+ "PaginationLink",
98
114
  "Policy",
115
+ "PolicyAggregates",
116
+ "PolicyMonthAggregate",
117
+ "PostQuoteRequestsRequestAcceptLanguage",
99
118
  "PostQuoteRequestsRequestDriversItem",
100
119
  "QuotePrice",
120
+ "QuoteRequestAggregates",
101
121
  "QuoteResponse",
102
122
  "QuoteResponseDriversItem",
103
123
  "QuoteResponseQuotesItem",
124
+ "QuoteResponseQuotesItemType",
104
125
  "UnauthorizedError",
105
126
  "UnauthorizedErrorBody",
106
127
  "UnprocessableEntityError",
@@ -29,7 +29,7 @@ class YasminaaiApi:
29
29
 
30
30
 
31
31
 
32
- Defaults to YasminaaiApiEnvironment.DEFAULT
32
+ Defaults to YasminaaiApiEnvironment.SANDBOX
33
33
 
34
34
 
35
35
 
@@ -65,7 +65,7 @@ class YasminaaiApi:
65
65
  self,
66
66
  *,
67
67
  base_url: typing.Optional[str] = None,
68
- environment: YasminaaiApiEnvironment = YasminaaiApiEnvironment.DEFAULT,
68
+ environment: YasminaaiApiEnvironment = YasminaaiApiEnvironment.SANDBOX,
69
69
  token: typing.Union[str, typing.Callable[[], str]],
70
70
  headers: typing.Optional[typing.Dict[str, str]] = None,
71
71
  timeout: typing.Optional[float] = None,
@@ -152,7 +152,7 @@ class AsyncYasminaaiApi:
152
152
 
153
153
 
154
154
 
155
- Defaults to YasminaaiApiEnvironment.DEFAULT
155
+ Defaults to YasminaaiApiEnvironment.SANDBOX
156
156
 
157
157
 
158
158
 
@@ -191,7 +191,7 @@ class AsyncYasminaaiApi:
191
191
  self,
192
192
  *,
193
193
  base_url: typing.Optional[str] = None,
194
- environment: YasminaaiApiEnvironment = YasminaaiApiEnvironment.DEFAULT,
194
+ environment: YasminaaiApiEnvironment = YasminaaiApiEnvironment.SANDBOX,
195
195
  token: typing.Union[str, typing.Callable[[], str]],
196
196
  headers: typing.Optional[typing.Dict[str, str]] = None,
197
197
  async_token: typing.Optional[typing.Callable[[], typing.Awaitable[str]]] = None,
@@ -29,12 +29,12 @@ class BaseClientWrapper:
29
29
  import platform
30
30
 
31
31
  headers: typing.Dict[str, str] = {
32
- "User-Agent": "motor-python-sdk/0.0.3",
32
+ "User-Agent": "motor-python-sdk/0.0.28",
33
33
  "X-Fern-Language": "Python",
34
34
  "X-Fern-Runtime": f"python/{platform.python_version()}",
35
35
  "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
36
36
  "X-Fern-SDK-Name": "motor-python-sdk",
37
- "X-Fern-SDK-Version": "0.0.3",
37
+ "X-Fern-SDK-Version": "0.0.28",
38
38
  **(self.get_custom_headers() or {}),
39
39
  }
40
40
  headers["Authorization"] = f"Bearer {self._get_token()}"
@@ -0,0 +1,8 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import enum
4
+
5
+
6
+ class YasminaaiApiEnvironment(enum.Enum):
7
+ SANDBOX = "https://sandbox.yasmina.ai/api/v1/car-comp"
8
+ PRODUCTION = "https://production.yasmina.ai/api/v1/car-comp"
@@ -1,9 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ import datetime as dt
3
4
  import typing
4
5
 
5
6
  from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
7
  from ..core.request_options import RequestOptions
8
+ from ..types.paginated_policy_response import PaginatedPolicyResponse
7
9
  from ..types.policy import Policy
8
10
  from .raw_client import AsyncRawPoliciesClient, RawPoliciesClient
9
11
 
@@ -69,8 +71,11 @@ class PoliciesClient:
69
71
  min_price: typing.Optional[float] = None,
70
72
  max_price: typing.Optional[float] = None,
71
73
  per_page: typing.Optional[int] = None,
74
+ date_from: typing.Optional[dt.date] = None,
75
+ date_to: typing.Optional[dt.date] = None,
76
+ include_aggregates: typing.Optional[bool] = None,
72
77
  request_options: typing.Optional[RequestOptions] = None,
73
- ) -> typing.List[Policy]:
78
+ ) -> PaginatedPolicyResponse:
74
79
  """
75
80
  Listing requested policies
76
81
 
@@ -96,22 +101,41 @@ class PoliciesClient:
96
101
 
97
102
  per_page : typing.Optional[int]
98
103
 
104
+ date_from : typing.Optional[dt.date]
105
+ Inclusive lower bound for the policy date. For issued policies (`status=1`), this filters by `uploaded_at` (the provider policy issue timestamp) and falls back to `created_at` when `uploaded_at` is unavailable. For other statuses, this filters by `created_at`.
106
+
107
+ date_to : typing.Optional[dt.date]
108
+ Inclusive upper bound for the policy date. For issued policies (`status=1`), this filters by `uploaded_at` (the provider policy issue timestamp) and falls back to `created_at` when `uploaded_at` is unavailable. For other statuses, this filters by `created_at`.
109
+
110
+ include_aggregates : typing.Optional[bool]
111
+ When true, includes policy totals, total price, and monthly buckets for the filtered result set.
112
+
99
113
  request_options : typing.Optional[RequestOptions]
100
114
  Request-specific configuration.
101
115
 
102
116
  Returns
103
117
  -------
104
- typing.List[Policy]
118
+ PaginatedPolicyResponse
105
119
  Success
106
120
 
107
121
  Examples
108
122
  --------
123
+ import datetime
124
+
109
125
  from yasminaai import YasminaaiApi
110
126
 
111
127
  client = YasminaaiApi(
112
128
  token="YOUR_TOKEN",
113
129
  )
114
- client.policies.list_policies()
130
+ client.policies.list_policies(
131
+ date_from=datetime.date.fromisoformat(
132
+ "2026-06-01",
133
+ ),
134
+ date_to=datetime.date.fromisoformat(
135
+ "2026-06-30",
136
+ ),
137
+ include_aggregates=True,
138
+ )
115
139
  """
116
140
  _response = self._raw_client.list_policies(
117
141
  quote_request_id=quote_request_id,
@@ -124,6 +148,9 @@ class PoliciesClient:
124
148
  min_price=min_price,
125
149
  max_price=max_price,
126
150
  per_page=per_page,
151
+ date_from=date_from,
152
+ date_to=date_to,
153
+ include_aggregates=include_aggregates,
127
154
  request_options=request_options,
128
155
  )
129
156
  return _response.data
@@ -131,6 +158,7 @@ class PoliciesClient:
131
158
  def issue_policy(
132
159
  self,
133
160
  *,
161
+ otp: str,
134
162
  quote_request_id: int,
135
163
  quote_reference_id: str,
136
164
  quote_price_id: str,
@@ -143,6 +171,9 @@ class PoliciesClient:
143
171
 
144
172
  Parameters
145
173
  ----------
174
+ otp : str
175
+ The OTP received by the customer from the Issue OTP API
176
+
146
177
  quote_request_id : int
147
178
  ID of the car quote request
148
179
 
@@ -174,12 +205,14 @@ class PoliciesClient:
174
205
  token="YOUR_TOKEN",
175
206
  )
176
207
  client.policies.issue_policy(
208
+ otp="123456",
177
209
  quote_request_id=123,
178
210
  quote_reference_id="550e8400-e29b-41d4-a716-446655440000",
179
211
  quote_price_id="550e8400-e29b-41d4-a716-446655440001",
180
212
  )
181
213
  """
182
214
  _response = self._raw_client.issue_policy(
215
+ otp=otp,
183
216
  quote_request_id=quote_request_id,
184
217
  quote_reference_id=quote_reference_id,
185
218
  quote_price_id=quote_price_id,
@@ -256,8 +289,11 @@ class AsyncPoliciesClient:
256
289
  min_price: typing.Optional[float] = None,
257
290
  max_price: typing.Optional[float] = None,
258
291
  per_page: typing.Optional[int] = None,
292
+ date_from: typing.Optional[dt.date] = None,
293
+ date_to: typing.Optional[dt.date] = None,
294
+ include_aggregates: typing.Optional[bool] = None,
259
295
  request_options: typing.Optional[RequestOptions] = None,
260
- ) -> typing.List[Policy]:
296
+ ) -> PaginatedPolicyResponse:
261
297
  """
262
298
  Listing requested policies
263
299
 
@@ -283,17 +319,27 @@ class AsyncPoliciesClient:
283
319
 
284
320
  per_page : typing.Optional[int]
285
321
 
322
+ date_from : typing.Optional[dt.date]
323
+ Inclusive lower bound for the policy date. For issued policies (`status=1`), this filters by `uploaded_at` (the provider policy issue timestamp) and falls back to `created_at` when `uploaded_at` is unavailable. For other statuses, this filters by `created_at`.
324
+
325
+ date_to : typing.Optional[dt.date]
326
+ Inclusive upper bound for the policy date. For issued policies (`status=1`), this filters by `uploaded_at` (the provider policy issue timestamp) and falls back to `created_at` when `uploaded_at` is unavailable. For other statuses, this filters by `created_at`.
327
+
328
+ include_aggregates : typing.Optional[bool]
329
+ When true, includes policy totals, total price, and monthly buckets for the filtered result set.
330
+
286
331
  request_options : typing.Optional[RequestOptions]
287
332
  Request-specific configuration.
288
333
 
289
334
  Returns
290
335
  -------
291
- typing.List[Policy]
336
+ PaginatedPolicyResponse
292
337
  Success
293
338
 
294
339
  Examples
295
340
  --------
296
341
  import asyncio
342
+ import datetime
297
343
 
298
344
  from yasminaai import AsyncYasminaaiApi
299
345
 
@@ -303,7 +349,15 @@ class AsyncPoliciesClient:
303
349
 
304
350
 
305
351
  async def main() -> None:
306
- await client.policies.list_policies()
352
+ await client.policies.list_policies(
353
+ date_from=datetime.date.fromisoformat(
354
+ "2026-06-01",
355
+ ),
356
+ date_to=datetime.date.fromisoformat(
357
+ "2026-06-30",
358
+ ),
359
+ include_aggregates=True,
360
+ )
307
361
 
308
362
 
309
363
  asyncio.run(main())
@@ -319,6 +373,9 @@ class AsyncPoliciesClient:
319
373
  min_price=min_price,
320
374
  max_price=max_price,
321
375
  per_page=per_page,
376
+ date_from=date_from,
377
+ date_to=date_to,
378
+ include_aggregates=include_aggregates,
322
379
  request_options=request_options,
323
380
  )
324
381
  return _response.data
@@ -326,6 +383,7 @@ class AsyncPoliciesClient:
326
383
  async def issue_policy(
327
384
  self,
328
385
  *,
386
+ otp: str,
329
387
  quote_request_id: int,
330
388
  quote_reference_id: str,
331
389
  quote_price_id: str,
@@ -338,6 +396,9 @@ class AsyncPoliciesClient:
338
396
 
339
397
  Parameters
340
398
  ----------
399
+ otp : str
400
+ The OTP received by the customer from the Issue OTP API
401
+
341
402
  quote_request_id : int
342
403
  ID of the car quote request
343
404
 
@@ -374,6 +435,7 @@ class AsyncPoliciesClient:
374
435
 
375
436
  async def main() -> None:
376
437
  await client.policies.issue_policy(
438
+ otp="123456",
377
439
  quote_request_id=123,
378
440
  quote_reference_id="550e8400-e29b-41d4-a716-446655440000",
379
441
  quote_price_id="550e8400-e29b-41d4-a716-446655440001",
@@ -383,6 +445,7 @@ class AsyncPoliciesClient:
383
445
  asyncio.run(main())
384
446
  """
385
447
  _response = await self._raw_client.issue_policy(
448
+ otp=otp,
386
449
  quote_request_id=quote_request_id,
387
450
  quote_reference_id=quote_reference_id,
388
451
  quote_price_id=quote_price_id,
@@ -1,5 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ import datetime as dt
3
4
  import typing
4
5
  from json.decoder import JSONDecodeError
5
6
 
@@ -12,6 +13,7 @@ from ..core.pydantic_utilities import parse_obj_as
12
13
  from ..core.request_options import RequestOptions
13
14
  from ..errors.unauthorized_error import UnauthorizedError
14
15
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
16
+ from ..types.paginated_policy_response import PaginatedPolicyResponse
15
17
  from ..types.policy import Policy
16
18
  from pydantic import ValidationError
17
19
 
@@ -78,8 +80,11 @@ class RawPoliciesClient:
78
80
  min_price: typing.Optional[float] = None,
79
81
  max_price: typing.Optional[float] = None,
80
82
  per_page: typing.Optional[int] = None,
83
+ date_from: typing.Optional[dt.date] = None,
84
+ date_to: typing.Optional[dt.date] = None,
85
+ include_aggregates: typing.Optional[bool] = None,
81
86
  request_options: typing.Optional[RequestOptions] = None,
82
- ) -> HttpResponse[typing.List[Policy]]:
87
+ ) -> HttpResponse[PaginatedPolicyResponse]:
83
88
  """
84
89
  Listing requested policies
85
90
 
@@ -105,12 +110,21 @@ class RawPoliciesClient:
105
110
 
106
111
  per_page : typing.Optional[int]
107
112
 
113
+ date_from : typing.Optional[dt.date]
114
+ Inclusive lower bound for the policy date. For issued policies (`status=1`), this filters by `uploaded_at` (the provider policy issue timestamp) and falls back to `created_at` when `uploaded_at` is unavailable. For other statuses, this filters by `created_at`.
115
+
116
+ date_to : typing.Optional[dt.date]
117
+ Inclusive upper bound for the policy date. For issued policies (`status=1`), this filters by `uploaded_at` (the provider policy issue timestamp) and falls back to `created_at` when `uploaded_at` is unavailable. For other statuses, this filters by `created_at`.
118
+
119
+ include_aggregates : typing.Optional[bool]
120
+ When true, includes policy totals, total price, and monthly buckets for the filtered result set.
121
+
108
122
  request_options : typing.Optional[RequestOptions]
109
123
  Request-specific configuration.
110
124
 
111
125
  Returns
112
126
  -------
113
- HttpResponse[typing.List[Policy]]
127
+ HttpResponse[PaginatedPolicyResponse]
114
128
  Success
115
129
  """
116
130
  _response = self._client_wrapper.httpx_client.request(
@@ -127,15 +141,18 @@ class RawPoliciesClient:
127
141
  "min_price": min_price,
128
142
  "max_price": max_price,
129
143
  "per_page": per_page,
144
+ "date_from": str(date_from) if date_from is not None else None,
145
+ "date_to": str(date_to) if date_to is not None else None,
146
+ "include_aggregates": include_aggregates,
130
147
  },
131
148
  request_options=request_options,
132
149
  )
133
150
  try:
134
151
  if 200 <= _response.status_code < 300:
135
152
  _data = typing.cast(
136
- typing.List[Policy],
153
+ PaginatedPolicyResponse,
137
154
  parse_obj_as(
138
- type_=typing.List[Policy], # type: ignore
155
+ type_=PaginatedPolicyResponse, # type: ignore
139
156
  object_=_response.json(),
140
157
  ),
141
158
  )
@@ -163,6 +180,7 @@ class RawPoliciesClient:
163
180
  def issue_policy(
164
181
  self,
165
182
  *,
183
+ otp: str,
166
184
  quote_request_id: int,
167
185
  quote_reference_id: str,
168
186
  quote_price_id: str,
@@ -175,6 +193,9 @@ class RawPoliciesClient:
175
193
 
176
194
  Parameters
177
195
  ----------
196
+ otp : str
197
+ The OTP received by the customer from the Issue OTP API
198
+
178
199
  quote_request_id : int
179
200
  ID of the car quote request
180
201
 
@@ -202,6 +223,7 @@ class RawPoliciesClient:
202
223
  "policies",
203
224
  method="POST",
204
225
  json={
226
+ "otp": otp,
205
227
  "quote_request_id": quote_request_id,
206
228
  "quote_reference_id": quote_reference_id,
207
229
  "quote_price_id": quote_price_id,
@@ -315,8 +337,11 @@ class AsyncRawPoliciesClient:
315
337
  min_price: typing.Optional[float] = None,
316
338
  max_price: typing.Optional[float] = None,
317
339
  per_page: typing.Optional[int] = None,
340
+ date_from: typing.Optional[dt.date] = None,
341
+ date_to: typing.Optional[dt.date] = None,
342
+ include_aggregates: typing.Optional[bool] = None,
318
343
  request_options: typing.Optional[RequestOptions] = None,
319
- ) -> AsyncHttpResponse[typing.List[Policy]]:
344
+ ) -> AsyncHttpResponse[PaginatedPolicyResponse]:
320
345
  """
321
346
  Listing requested policies
322
347
 
@@ -342,12 +367,21 @@ class AsyncRawPoliciesClient:
342
367
 
343
368
  per_page : typing.Optional[int]
344
369
 
370
+ date_from : typing.Optional[dt.date]
371
+ Inclusive lower bound for the policy date. For issued policies (`status=1`), this filters by `uploaded_at` (the provider policy issue timestamp) and falls back to `created_at` when `uploaded_at` is unavailable. For other statuses, this filters by `created_at`.
372
+
373
+ date_to : typing.Optional[dt.date]
374
+ Inclusive upper bound for the policy date. For issued policies (`status=1`), this filters by `uploaded_at` (the provider policy issue timestamp) and falls back to `created_at` when `uploaded_at` is unavailable. For other statuses, this filters by `created_at`.
375
+
376
+ include_aggregates : typing.Optional[bool]
377
+ When true, includes policy totals, total price, and monthly buckets for the filtered result set.
378
+
345
379
  request_options : typing.Optional[RequestOptions]
346
380
  Request-specific configuration.
347
381
 
348
382
  Returns
349
383
  -------
350
- AsyncHttpResponse[typing.List[Policy]]
384
+ AsyncHttpResponse[PaginatedPolicyResponse]
351
385
  Success
352
386
  """
353
387
  _response = await self._client_wrapper.httpx_client.request(
@@ -364,15 +398,18 @@ class AsyncRawPoliciesClient:
364
398
  "min_price": min_price,
365
399
  "max_price": max_price,
366
400
  "per_page": per_page,
401
+ "date_from": str(date_from) if date_from is not None else None,
402
+ "date_to": str(date_to) if date_to is not None else None,
403
+ "include_aggregates": include_aggregates,
367
404
  },
368
405
  request_options=request_options,
369
406
  )
370
407
  try:
371
408
  if 200 <= _response.status_code < 300:
372
409
  _data = typing.cast(
373
- typing.List[Policy],
410
+ PaginatedPolicyResponse,
374
411
  parse_obj_as(
375
- type_=typing.List[Policy], # type: ignore
412
+ type_=PaginatedPolicyResponse, # type: ignore
376
413
  object_=_response.json(),
377
414
  ),
378
415
  )
@@ -400,6 +437,7 @@ class AsyncRawPoliciesClient:
400
437
  async def issue_policy(
401
438
  self,
402
439
  *,
440
+ otp: str,
403
441
  quote_request_id: int,
404
442
  quote_reference_id: str,
405
443
  quote_price_id: str,
@@ -412,6 +450,9 @@ class AsyncRawPoliciesClient:
412
450
 
413
451
  Parameters
414
452
  ----------
453
+ otp : str
454
+ The OTP received by the customer from the Issue OTP API
455
+
415
456
  quote_request_id : int
416
457
  ID of the car quote request
417
458
 
@@ -439,6 +480,7 @@ class AsyncRawPoliciesClient:
439
480
  "policies",
440
481
  method="POST",
441
482
  json={
483
+ "otp": otp,
442
484
  "quote_request_id": quote_request_id,
443
485
  "quote_reference_id": quote_reference_id,
444
486
  "quote_price_id": quote_price_id,
@@ -8,14 +8,12 @@ from importlib import import_module
8
8
  if typing.TYPE_CHECKING:
9
9
  from .types import (
10
10
  DeleteQuoteRequestsIdResponse,
11
- GetQuoteRequestsResponse,
12
- GetQuoteRequestsResponseLinksItem,
11
+ PostQuoteRequestsRequestAcceptLanguage,
13
12
  PostQuoteRequestsRequestDriversItem,
14
13
  )
15
14
  _dynamic_imports: typing.Dict[str, str] = {
16
15
  "DeleteQuoteRequestsIdResponse": ".types",
17
- "GetQuoteRequestsResponse": ".types",
18
- "GetQuoteRequestsResponseLinksItem": ".types",
16
+ "PostQuoteRequestsRequestAcceptLanguage": ".types",
19
17
  "PostQuoteRequestsRequestDriversItem": ".types",
20
18
  }
21
19
 
@@ -43,7 +41,6 @@ def __dir__():
43
41
 
44
42
  __all__ = [
45
43
  "DeleteQuoteRequestsIdResponse",
46
- "GetQuoteRequestsResponse",
47
- "GetQuoteRequestsResponseLinksItem",
44
+ "PostQuoteRequestsRequestAcceptLanguage",
48
45
  "PostQuoteRequestsRequestDriversItem",
49
46
  ]