yasmina-motor-ruby 0.0.8
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.
- checksums.yaml +7 -0
- data/.fern/metadata.json +10 -0
- data/.fern/replay.lock +10 -0
- data/.fernignore +4 -0
- data/.rubocop.yml +103 -0
- data/CONTRIBUTING.md +120 -0
- data/LICENSE +21 -0
- data/README.md +173 -0
- data/Rakefile +20 -0
- data/custom.gemspec.rb +16 -0
- data/lib/yasminaai/client.rb +37 -0
- data/lib/yasminaai/environment.rb +9 -0
- data/lib/yasminaai/errors/api_error.rb +8 -0
- data/lib/yasminaai/errors/client_error.rb +17 -0
- data/lib/yasminaai/errors/redirect_error.rb +8 -0
- data/lib/yasminaai/errors/response_error.rb +42 -0
- data/lib/yasminaai/errors/server_error.rb +11 -0
- data/lib/yasminaai/errors/timeout_error.rb +8 -0
- data/lib/yasminaai/internal/errors/constraint_error.rb +10 -0
- data/lib/yasminaai/internal/errors/type_error.rb +10 -0
- data/lib/yasminaai/internal/http/base_request.rb +51 -0
- data/lib/yasminaai/internal/http/raw_client.rb +215 -0
- data/lib/yasminaai/internal/iterators/cursor_item_iterator.rb +28 -0
- data/lib/yasminaai/internal/iterators/cursor_page_iterator.rb +63 -0
- data/lib/yasminaai/internal/iterators/item_iterator.rb +65 -0
- data/lib/yasminaai/internal/iterators/offset_item_iterator.rb +30 -0
- data/lib/yasminaai/internal/iterators/offset_page_iterator.rb +103 -0
- data/lib/yasminaai/internal/json/request.rb +41 -0
- data/lib/yasminaai/internal/json/serializable.rb +25 -0
- data/lib/yasminaai/internal/multipart/multipart_encoder.rb +141 -0
- data/lib/yasminaai/internal/multipart/multipart_form_data.rb +78 -0
- data/lib/yasminaai/internal/multipart/multipart_form_data_part.rb +51 -0
- data/lib/yasminaai/internal/multipart/multipart_request.rb +40 -0
- data/lib/yasminaai/internal/types/array.rb +47 -0
- data/lib/yasminaai/internal/types/boolean.rb +34 -0
- data/lib/yasminaai/internal/types/enum.rb +56 -0
- data/lib/yasminaai/internal/types/hash.rb +36 -0
- data/lib/yasminaai/internal/types/model/field.rb +38 -0
- data/lib/yasminaai/internal/types/model.rb +208 -0
- data/lib/yasminaai/internal/types/type.rb +35 -0
- data/lib/yasminaai/internal/types/union.rb +161 -0
- data/lib/yasminaai/internal/types/unknown.rb +15 -0
- data/lib/yasminaai/internal/types/utils.rb +116 -0
- data/lib/yasminaai/ot_ps/client.rb +79 -0
- data/lib/yasminaai/ot_ps/types/post_issue_otp_request.rb +21 -0
- data/lib/yasminaai/ot_ps/types/post_quote_otp_request.rb +15 -0
- data/lib/yasminaai/policies/client.rb +144 -0
- data/lib/yasminaai/policies/types/get_policies_car_policy_request.rb +11 -0
- data/lib/yasminaai/policies/types/get_policies_request.rb +35 -0
- data/lib/yasminaai/policies/types/post_policies_request.rb +21 -0
- data/lib/yasminaai/quotes/client.rb +164 -0
- data/lib/yasminaai/quotes/types/delete_quote_requests_id_request.rb +11 -0
- data/lib/yasminaai/quotes/types/delete_quote_requests_id_response.rb +11 -0
- data/lib/yasminaai/quotes/types/get_quote_requests_id_request.rb +11 -0
- data/lib/yasminaai/quotes/types/get_quote_requests_request.rb +17 -0
- data/lib/yasminaai/quotes/types/post_quote_requests_request.rb +37 -0
- data/lib/yasminaai/quotes/types/post_quote_requests_request_accept_language.rb +13 -0
- data/lib/yasminaai/quotes/types/post_quote_requests_request_drivers_item.rb +15 -0
- data/lib/yasminaai/types/bad_request_error_body.rb +11 -0
- data/lib/yasminaai/types/benefit.rb +21 -0
- data/lib/yasminaai/types/company_quote.rb +25 -0
- data/lib/yasminaai/types/company_quote_type.rb +12 -0
- data/lib/yasminaai/types/error.rb +11 -0
- data/lib/yasminaai/types/paginated_policy_response.rb +35 -0
- data/lib/yasminaai/types/paginated_quote_response.rb +35 -0
- data/lib/yasminaai/types/pagination_link.rb +13 -0
- data/lib/yasminaai/types/policy.rb +39 -0
- data/lib/yasminaai/types/policy_aggregates.rb +14 -0
- data/lib/yasminaai/types/policy_month_aggregate.rb +11 -0
- data/lib/yasminaai/types/quote_price.rb +19 -0
- data/lib/yasminaai/types/quote_request_aggregates.rb +12 -0
- data/lib/yasminaai/types/quote_response.rb +37 -0
- data/lib/yasminaai/types/quote_response_drivers_item.rb +13 -0
- data/lib/yasminaai/types/quote_response_quotes_item.rb +25 -0
- data/lib/yasminaai/types/quote_response_quotes_item_type.rb +12 -0
- data/lib/yasminaai/types/unauthorized_error_body.rb +11 -0
- data/lib/yasminaai/version.rb +5 -0
- data/lib/yasminaai.rb +72 -0
- data/reference.md +872 -0
- metadata +121 -0
data/reference.md
ADDED
|
@@ -0,0 +1,872 @@
|
|
|
1
|
+
# Reference
|
|
2
|
+
## Quotes
|
|
3
|
+
<details><summary><code>client.quotes.<a href="/lib/yasminaai/quotes/client.rb">show_quote</a>(id) -> Yasminaai::Types::QuoteResponse</code></summary>
|
|
4
|
+
<dl>
|
|
5
|
+
<dd>
|
|
6
|
+
|
|
7
|
+
#### 🔌 Usage
|
|
8
|
+
|
|
9
|
+
<dl>
|
|
10
|
+
<dd>
|
|
11
|
+
|
|
12
|
+
<dl>
|
|
13
|
+
<dd>
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
client.quotes.show_quote(id: 1)
|
|
17
|
+
```
|
|
18
|
+
</dd>
|
|
19
|
+
</dl>
|
|
20
|
+
</dd>
|
|
21
|
+
</dl>
|
|
22
|
+
|
|
23
|
+
#### ⚙️ Parameters
|
|
24
|
+
|
|
25
|
+
<dl>
|
|
26
|
+
<dd>
|
|
27
|
+
|
|
28
|
+
<dl>
|
|
29
|
+
<dd>
|
|
30
|
+
|
|
31
|
+
**id:** `Integer`
|
|
32
|
+
|
|
33
|
+
</dd>
|
|
34
|
+
</dl>
|
|
35
|
+
|
|
36
|
+
<dl>
|
|
37
|
+
<dd>
|
|
38
|
+
|
|
39
|
+
**request_options:** `Yasminaai::Quotes::RequestOptions`
|
|
40
|
+
|
|
41
|
+
</dd>
|
|
42
|
+
</dl>
|
|
43
|
+
</dd>
|
|
44
|
+
</dl>
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
</dd>
|
|
48
|
+
</dl>
|
|
49
|
+
</details>
|
|
50
|
+
|
|
51
|
+
<details><summary><code>client.quotes.<a href="/lib/yasminaai/quotes/client.rb">delete_quote</a>(id) -> Yasminaai::Quotes::Types::DeleteQuoteRequestsIDResponse</code></summary>
|
|
52
|
+
<dl>
|
|
53
|
+
<dd>
|
|
54
|
+
|
|
55
|
+
#### 🔌 Usage
|
|
56
|
+
|
|
57
|
+
<dl>
|
|
58
|
+
<dd>
|
|
59
|
+
|
|
60
|
+
<dl>
|
|
61
|
+
<dd>
|
|
62
|
+
|
|
63
|
+
```ruby
|
|
64
|
+
client.quotes.delete_quote(id: 1)
|
|
65
|
+
```
|
|
66
|
+
</dd>
|
|
67
|
+
</dl>
|
|
68
|
+
</dd>
|
|
69
|
+
</dl>
|
|
70
|
+
|
|
71
|
+
#### ⚙️ Parameters
|
|
72
|
+
|
|
73
|
+
<dl>
|
|
74
|
+
<dd>
|
|
75
|
+
|
|
76
|
+
<dl>
|
|
77
|
+
<dd>
|
|
78
|
+
|
|
79
|
+
**id:** `Integer`
|
|
80
|
+
|
|
81
|
+
</dd>
|
|
82
|
+
</dl>
|
|
83
|
+
|
|
84
|
+
<dl>
|
|
85
|
+
<dd>
|
|
86
|
+
|
|
87
|
+
**request_options:** `Yasminaai::Quotes::RequestOptions`
|
|
88
|
+
|
|
89
|
+
</dd>
|
|
90
|
+
</dl>
|
|
91
|
+
</dd>
|
|
92
|
+
</dl>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
</dd>
|
|
96
|
+
</dl>
|
|
97
|
+
</details>
|
|
98
|
+
|
|
99
|
+
<details><summary><code>client.quotes.<a href="/lib/yasminaai/quotes/client.rb">list_quotes</a>() -> Yasminaai::Types::PaginatedQuoteResponse</code></summary>
|
|
100
|
+
<dl>
|
|
101
|
+
<dd>
|
|
102
|
+
|
|
103
|
+
#### 🔌 Usage
|
|
104
|
+
|
|
105
|
+
<dl>
|
|
106
|
+
<dd>
|
|
107
|
+
|
|
108
|
+
<dl>
|
|
109
|
+
<dd>
|
|
110
|
+
|
|
111
|
+
```ruby
|
|
112
|
+
client.quotes.list_quotes(
|
|
113
|
+
date_from: "2026-06-01",
|
|
114
|
+
date_to: "2026-06-30",
|
|
115
|
+
per_page: 10,
|
|
116
|
+
include_aggregates: true
|
|
117
|
+
)
|
|
118
|
+
```
|
|
119
|
+
</dd>
|
|
120
|
+
</dl>
|
|
121
|
+
</dd>
|
|
122
|
+
</dl>
|
|
123
|
+
|
|
124
|
+
#### ⚙️ Parameters
|
|
125
|
+
|
|
126
|
+
<dl>
|
|
127
|
+
<dd>
|
|
128
|
+
|
|
129
|
+
<dl>
|
|
130
|
+
<dd>
|
|
131
|
+
|
|
132
|
+
**date_from:** `String` — Inclusive lower bound for quote request creation date.
|
|
133
|
+
|
|
134
|
+
</dd>
|
|
135
|
+
</dl>
|
|
136
|
+
|
|
137
|
+
<dl>
|
|
138
|
+
<dd>
|
|
139
|
+
|
|
140
|
+
**date_to:** `String` — Inclusive upper bound for quote request creation date.
|
|
141
|
+
|
|
142
|
+
</dd>
|
|
143
|
+
</dl>
|
|
144
|
+
|
|
145
|
+
<dl>
|
|
146
|
+
<dd>
|
|
147
|
+
|
|
148
|
+
**per_page:** `Integer` — Number of quote requests to return per page.
|
|
149
|
+
|
|
150
|
+
</dd>
|
|
151
|
+
</dl>
|
|
152
|
+
|
|
153
|
+
<dl>
|
|
154
|
+
<dd>
|
|
155
|
+
|
|
156
|
+
**include_aggregates:** `Internal::Types::Boolean` — When true, includes quote request totals and monthly buckets for the filtered result set.
|
|
157
|
+
|
|
158
|
+
</dd>
|
|
159
|
+
</dl>
|
|
160
|
+
|
|
161
|
+
<dl>
|
|
162
|
+
<dd>
|
|
163
|
+
|
|
164
|
+
**request_options:** `Yasminaai::Quotes::RequestOptions`
|
|
165
|
+
|
|
166
|
+
</dd>
|
|
167
|
+
</dl>
|
|
168
|
+
</dd>
|
|
169
|
+
</dl>
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
</dd>
|
|
173
|
+
</dl>
|
|
174
|
+
</details>
|
|
175
|
+
|
|
176
|
+
<details><summary><code>client.quotes.<a href="/lib/yasminaai/quotes/client.rb">request_quotes</a>(request) -> Yasminaai::Types::QuoteResponse</code></summary>
|
|
177
|
+
<dl>
|
|
178
|
+
<dd>
|
|
179
|
+
|
|
180
|
+
#### 📝 Description
|
|
181
|
+
|
|
182
|
+
<dl>
|
|
183
|
+
<dd>
|
|
184
|
+
|
|
185
|
+
<dl>
|
|
186
|
+
<dd>
|
|
187
|
+
|
|
188
|
+
For getting prices with benefits.
|
|
189
|
+
The Quote IDs can be used later to issue a policy
|
|
190
|
+
</dd>
|
|
191
|
+
</dl>
|
|
192
|
+
</dd>
|
|
193
|
+
</dl>
|
|
194
|
+
|
|
195
|
+
#### 🔌 Usage
|
|
196
|
+
|
|
197
|
+
<dl>
|
|
198
|
+
<dd>
|
|
199
|
+
|
|
200
|
+
<dl>
|
|
201
|
+
<dd>
|
|
202
|
+
|
|
203
|
+
```ruby
|
|
204
|
+
client.quotes.request_quotes(
|
|
205
|
+
otp: "123456",
|
|
206
|
+
owner_id: "owner_id",
|
|
207
|
+
phone: "phone",
|
|
208
|
+
birthdate: "2023-01-15",
|
|
209
|
+
car_estimated_cost: 1.1
|
|
210
|
+
)
|
|
211
|
+
```
|
|
212
|
+
</dd>
|
|
213
|
+
</dl>
|
|
214
|
+
</dd>
|
|
215
|
+
</dl>
|
|
216
|
+
|
|
217
|
+
#### ⚙️ Parameters
|
|
218
|
+
|
|
219
|
+
<dl>
|
|
220
|
+
<dd>
|
|
221
|
+
|
|
222
|
+
<dl>
|
|
223
|
+
<dd>
|
|
224
|
+
|
|
225
|
+
**accept_language:** `Yasminaai::Quotes::Types::PostQuoteRequestsRequestAcceptLanguage` — Set to ar to receive Arabic-localized quote content.
|
|
226
|
+
|
|
227
|
+
</dd>
|
|
228
|
+
</dl>
|
|
229
|
+
|
|
230
|
+
<dl>
|
|
231
|
+
<dd>
|
|
232
|
+
|
|
233
|
+
**otp:** `String` — The OTP received by the customer from the Request OTP API
|
|
234
|
+
|
|
235
|
+
</dd>
|
|
236
|
+
</dl>
|
|
237
|
+
|
|
238
|
+
<dl>
|
|
239
|
+
<dd>
|
|
240
|
+
|
|
241
|
+
**owner_id:** `String` — Owner ID must be 10 digits starting with 1, 2, or 7
|
|
242
|
+
|
|
243
|
+
</dd>
|
|
244
|
+
</dl>
|
|
245
|
+
|
|
246
|
+
<dl>
|
|
247
|
+
<dd>
|
|
248
|
+
|
|
249
|
+
**email:** `String` — Email address must be valid and belongs to the customer
|
|
250
|
+
|
|
251
|
+
</dd>
|
|
252
|
+
</dl>
|
|
253
|
+
|
|
254
|
+
<dl>
|
|
255
|
+
<dd>
|
|
256
|
+
|
|
257
|
+
**phone:** `String` — Phone number must start with 05 and be 10 digits
|
|
258
|
+
|
|
259
|
+
</dd>
|
|
260
|
+
</dl>
|
|
261
|
+
|
|
262
|
+
<dl>
|
|
263
|
+
<dd>
|
|
264
|
+
|
|
265
|
+
**birthdate:** `String` — Birthdate in YYYY-MM-DD format
|
|
266
|
+
|
|
267
|
+
</dd>
|
|
268
|
+
</dl>
|
|
269
|
+
|
|
270
|
+
<dl>
|
|
271
|
+
<dd>
|
|
272
|
+
|
|
273
|
+
**car_sequence_number:** `String` — Car sequence number must be 8 or 9 digits
|
|
274
|
+
|
|
275
|
+
</dd>
|
|
276
|
+
</dl>
|
|
277
|
+
|
|
278
|
+
<dl>
|
|
279
|
+
<dd>
|
|
280
|
+
|
|
281
|
+
**custom_number:** `String` — Custom car number between 1000000 and 9999999999 (for newly imported cars)
|
|
282
|
+
|
|
283
|
+
</dd>
|
|
284
|
+
</dl>
|
|
285
|
+
|
|
286
|
+
<dl>
|
|
287
|
+
<dd>
|
|
288
|
+
|
|
289
|
+
**is_ownership_transfer:** `Internal::Types::Boolean` — Indicates if the ownership is being transferred
|
|
290
|
+
|
|
291
|
+
</dd>
|
|
292
|
+
</dl>
|
|
293
|
+
|
|
294
|
+
<dl>
|
|
295
|
+
<dd>
|
|
296
|
+
|
|
297
|
+
**current_car_owner_id:** `String` — Required if is_ownership_transfer is true; 10 digits starting with 1,2,7
|
|
298
|
+
|
|
299
|
+
</dd>
|
|
300
|
+
</dl>
|
|
301
|
+
|
|
302
|
+
<dl>
|
|
303
|
+
<dd>
|
|
304
|
+
|
|
305
|
+
**car_estimated_cost:** `Integer` — Estimated cost of the car
|
|
306
|
+
|
|
307
|
+
</dd>
|
|
308
|
+
</dl>
|
|
309
|
+
|
|
310
|
+
<dl>
|
|
311
|
+
<dd>
|
|
312
|
+
|
|
313
|
+
**car_model_year:** `Integer` — Car model year between 1950 and next year
|
|
314
|
+
|
|
315
|
+
</dd>
|
|
316
|
+
</dl>
|
|
317
|
+
|
|
318
|
+
<dl>
|
|
319
|
+
<dd>
|
|
320
|
+
|
|
321
|
+
**start_date:** `String` — Desired policy start date in YYYY-MM-DD. Must be between tomorrow and 28 days from today (inclusive). The platform validates this range server-side.
|
|
322
|
+
|
|
323
|
+
</dd>
|
|
324
|
+
</dl>
|
|
325
|
+
|
|
326
|
+
<dl>
|
|
327
|
+
<dd>
|
|
328
|
+
|
|
329
|
+
**drivers:** `Internal::Types::Array[Yasminaai::Quotes::Types::PostQuoteRequestsRequestDriversItem]` — List of drivers for the vehicle. When provided, the sum of all driving_percentage values must equal 100, and the owner must be included among the drivers.
|
|
330
|
+
|
|
331
|
+
</dd>
|
|
332
|
+
</dl>
|
|
333
|
+
|
|
334
|
+
<dl>
|
|
335
|
+
<dd>
|
|
336
|
+
|
|
337
|
+
**request_options:** `Yasminaai::Quotes::RequestOptions`
|
|
338
|
+
|
|
339
|
+
</dd>
|
|
340
|
+
</dl>
|
|
341
|
+
</dd>
|
|
342
|
+
</dl>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
</dd>
|
|
346
|
+
</dl>
|
|
347
|
+
</details>
|
|
348
|
+
|
|
349
|
+
## Policies
|
|
350
|
+
<details><summary><code>client.policies.<a href="/lib/yasminaai/policies/client.rb">show_policy</a>(car_policy) -> Yasminaai::Types::Policy</code></summary>
|
|
351
|
+
<dl>
|
|
352
|
+
<dd>
|
|
353
|
+
|
|
354
|
+
#### 📝 Description
|
|
355
|
+
|
|
356
|
+
<dl>
|
|
357
|
+
<dd>
|
|
358
|
+
|
|
359
|
+
<dl>
|
|
360
|
+
<dd>
|
|
361
|
+
|
|
362
|
+
Show a specific policy
|
|
363
|
+
</dd>
|
|
364
|
+
</dl>
|
|
365
|
+
</dd>
|
|
366
|
+
</dl>
|
|
367
|
+
|
|
368
|
+
#### 🔌 Usage
|
|
369
|
+
|
|
370
|
+
<dl>
|
|
371
|
+
<dd>
|
|
372
|
+
|
|
373
|
+
<dl>
|
|
374
|
+
<dd>
|
|
375
|
+
|
|
376
|
+
```ruby
|
|
377
|
+
client.policies.show_policy(car_policy: 1)
|
|
378
|
+
```
|
|
379
|
+
</dd>
|
|
380
|
+
</dl>
|
|
381
|
+
</dd>
|
|
382
|
+
</dl>
|
|
383
|
+
|
|
384
|
+
#### ⚙️ Parameters
|
|
385
|
+
|
|
386
|
+
<dl>
|
|
387
|
+
<dd>
|
|
388
|
+
|
|
389
|
+
<dl>
|
|
390
|
+
<dd>
|
|
391
|
+
|
|
392
|
+
**car_policy:** `Integer`
|
|
393
|
+
|
|
394
|
+
</dd>
|
|
395
|
+
</dl>
|
|
396
|
+
|
|
397
|
+
<dl>
|
|
398
|
+
<dd>
|
|
399
|
+
|
|
400
|
+
**request_options:** `Yasminaai::Policies::RequestOptions`
|
|
401
|
+
|
|
402
|
+
</dd>
|
|
403
|
+
</dl>
|
|
404
|
+
</dd>
|
|
405
|
+
</dl>
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
</dd>
|
|
409
|
+
</dl>
|
|
410
|
+
</details>
|
|
411
|
+
|
|
412
|
+
<details><summary><code>client.policies.<a href="/lib/yasminaai/policies/client.rb">list_policies</a>() -> Yasminaai::Types::PaginatedPolicyResponse</code></summary>
|
|
413
|
+
<dl>
|
|
414
|
+
<dd>
|
|
415
|
+
|
|
416
|
+
#### 📝 Description
|
|
417
|
+
|
|
418
|
+
<dl>
|
|
419
|
+
<dd>
|
|
420
|
+
|
|
421
|
+
<dl>
|
|
422
|
+
<dd>
|
|
423
|
+
|
|
424
|
+
Listing requested policies
|
|
425
|
+
</dd>
|
|
426
|
+
</dl>
|
|
427
|
+
</dd>
|
|
428
|
+
</dl>
|
|
429
|
+
|
|
430
|
+
#### 🔌 Usage
|
|
431
|
+
|
|
432
|
+
<dl>
|
|
433
|
+
<dd>
|
|
434
|
+
|
|
435
|
+
<dl>
|
|
436
|
+
<dd>
|
|
437
|
+
|
|
438
|
+
```ruby
|
|
439
|
+
client.policies.list_policies(
|
|
440
|
+
date_from: "2026-06-01",
|
|
441
|
+
date_to: "2026-06-30",
|
|
442
|
+
include_aggregates: true
|
|
443
|
+
)
|
|
444
|
+
```
|
|
445
|
+
</dd>
|
|
446
|
+
</dl>
|
|
447
|
+
</dd>
|
|
448
|
+
</dl>
|
|
449
|
+
|
|
450
|
+
#### ⚙️ Parameters
|
|
451
|
+
|
|
452
|
+
<dl>
|
|
453
|
+
<dd>
|
|
454
|
+
|
|
455
|
+
<dl>
|
|
456
|
+
<dd>
|
|
457
|
+
|
|
458
|
+
**quote_request_id:** `Integer`
|
|
459
|
+
|
|
460
|
+
</dd>
|
|
461
|
+
</dl>
|
|
462
|
+
|
|
463
|
+
<dl>
|
|
464
|
+
<dd>
|
|
465
|
+
|
|
466
|
+
**quote_price_id:** `String`
|
|
467
|
+
|
|
468
|
+
</dd>
|
|
469
|
+
</dl>
|
|
470
|
+
|
|
471
|
+
<dl>
|
|
472
|
+
<dd>
|
|
473
|
+
|
|
474
|
+
**provider_policy_id:** `Integer`
|
|
475
|
+
|
|
476
|
+
</dd>
|
|
477
|
+
</dl>
|
|
478
|
+
|
|
479
|
+
<dl>
|
|
480
|
+
<dd>
|
|
481
|
+
|
|
482
|
+
**car_sequence_number:** `String`
|
|
483
|
+
|
|
484
|
+
</dd>
|
|
485
|
+
</dl>
|
|
486
|
+
|
|
487
|
+
<dl>
|
|
488
|
+
<dd>
|
|
489
|
+
|
|
490
|
+
**new_owner_id:** `String`
|
|
491
|
+
|
|
492
|
+
</dd>
|
|
493
|
+
</dl>
|
|
494
|
+
|
|
495
|
+
<dl>
|
|
496
|
+
<dd>
|
|
497
|
+
|
|
498
|
+
**previous_owner_id:** `String`
|
|
499
|
+
|
|
500
|
+
</dd>
|
|
501
|
+
</dl>
|
|
502
|
+
|
|
503
|
+
<dl>
|
|
504
|
+
<dd>
|
|
505
|
+
|
|
506
|
+
**status:** `Integer`
|
|
507
|
+
|
|
508
|
+
</dd>
|
|
509
|
+
</dl>
|
|
510
|
+
|
|
511
|
+
<dl>
|
|
512
|
+
<dd>
|
|
513
|
+
|
|
514
|
+
**min_price:** `Integer`
|
|
515
|
+
|
|
516
|
+
</dd>
|
|
517
|
+
</dl>
|
|
518
|
+
|
|
519
|
+
<dl>
|
|
520
|
+
<dd>
|
|
521
|
+
|
|
522
|
+
**max_price:** `Integer`
|
|
523
|
+
|
|
524
|
+
</dd>
|
|
525
|
+
</dl>
|
|
526
|
+
|
|
527
|
+
<dl>
|
|
528
|
+
<dd>
|
|
529
|
+
|
|
530
|
+
**per_page:** `Integer`
|
|
531
|
+
|
|
532
|
+
</dd>
|
|
533
|
+
</dl>
|
|
534
|
+
|
|
535
|
+
<dl>
|
|
536
|
+
<dd>
|
|
537
|
+
|
|
538
|
+
**date_from:** `String` — 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`.
|
|
539
|
+
|
|
540
|
+
</dd>
|
|
541
|
+
</dl>
|
|
542
|
+
|
|
543
|
+
<dl>
|
|
544
|
+
<dd>
|
|
545
|
+
|
|
546
|
+
**date_to:** `String` — 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`.
|
|
547
|
+
|
|
548
|
+
</dd>
|
|
549
|
+
</dl>
|
|
550
|
+
|
|
551
|
+
<dl>
|
|
552
|
+
<dd>
|
|
553
|
+
|
|
554
|
+
**include_aggregates:** `Internal::Types::Boolean` — When true, includes policy totals, total price, and monthly buckets for the filtered result set.
|
|
555
|
+
|
|
556
|
+
</dd>
|
|
557
|
+
</dl>
|
|
558
|
+
|
|
559
|
+
<dl>
|
|
560
|
+
<dd>
|
|
561
|
+
|
|
562
|
+
**request_options:** `Yasminaai::Policies::RequestOptions`
|
|
563
|
+
|
|
564
|
+
</dd>
|
|
565
|
+
</dl>
|
|
566
|
+
</dd>
|
|
567
|
+
</dl>
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
</dd>
|
|
571
|
+
</dl>
|
|
572
|
+
</details>
|
|
573
|
+
|
|
574
|
+
<details><summary><code>client.policies.<a href="/lib/yasminaai/policies/client.rb">issue_policy</a>(request) -> Yasminaai::Types::Policy</code></summary>
|
|
575
|
+
<dl>
|
|
576
|
+
<dd>
|
|
577
|
+
|
|
578
|
+
#### 📝 Description
|
|
579
|
+
|
|
580
|
+
<dl>
|
|
581
|
+
<dd>
|
|
582
|
+
|
|
583
|
+
<dl>
|
|
584
|
+
<dd>
|
|
585
|
+
|
|
586
|
+
For issuing a new policy
|
|
587
|
+
</dd>
|
|
588
|
+
</dl>
|
|
589
|
+
</dd>
|
|
590
|
+
</dl>
|
|
591
|
+
|
|
592
|
+
#### 🔌 Usage
|
|
593
|
+
|
|
594
|
+
<dl>
|
|
595
|
+
<dd>
|
|
596
|
+
|
|
597
|
+
<dl>
|
|
598
|
+
<dd>
|
|
599
|
+
|
|
600
|
+
```ruby
|
|
601
|
+
client.policies.issue_policy(
|
|
602
|
+
otp: "123456",
|
|
603
|
+
quote_request_id: 123,
|
|
604
|
+
quote_reference_id: "550e8400-e29b-41d4-a716-446655440000",
|
|
605
|
+
quote_price_id: "550e8400-e29b-41d4-a716-446655440001"
|
|
606
|
+
)
|
|
607
|
+
```
|
|
608
|
+
</dd>
|
|
609
|
+
</dl>
|
|
610
|
+
</dd>
|
|
611
|
+
</dl>
|
|
612
|
+
|
|
613
|
+
#### ⚙️ Parameters
|
|
614
|
+
|
|
615
|
+
<dl>
|
|
616
|
+
<dd>
|
|
617
|
+
|
|
618
|
+
<dl>
|
|
619
|
+
<dd>
|
|
620
|
+
|
|
621
|
+
**otp:** `String` — The OTP received by the customer from the Issue OTP API
|
|
622
|
+
|
|
623
|
+
</dd>
|
|
624
|
+
</dl>
|
|
625
|
+
|
|
626
|
+
<dl>
|
|
627
|
+
<dd>
|
|
628
|
+
|
|
629
|
+
**quote_request_id:** `Integer` — ID of the car quote request
|
|
630
|
+
|
|
631
|
+
</dd>
|
|
632
|
+
</dl>
|
|
633
|
+
|
|
634
|
+
<dl>
|
|
635
|
+
<dd>
|
|
636
|
+
|
|
637
|
+
**quote_reference_id:** `String` — Unique identifier for the quote reference ID (coming from POST /quote-requests)
|
|
638
|
+
|
|
639
|
+
</dd>
|
|
640
|
+
</dl>
|
|
641
|
+
|
|
642
|
+
<dl>
|
|
643
|
+
<dd>
|
|
644
|
+
|
|
645
|
+
**quote_price_id:** `String` — Unique identifier for the quote price ID that exists inside a quote item (coming from POST /quote-requests)
|
|
646
|
+
|
|
647
|
+
</dd>
|
|
648
|
+
</dl>
|
|
649
|
+
|
|
650
|
+
<dl>
|
|
651
|
+
<dd>
|
|
652
|
+
|
|
653
|
+
**benefits:** `Internal::Types::Array[String]` — List of benefit UUIDs
|
|
654
|
+
|
|
655
|
+
</dd>
|
|
656
|
+
</dl>
|
|
657
|
+
|
|
658
|
+
<dl>
|
|
659
|
+
<dd>
|
|
660
|
+
|
|
661
|
+
**extra_fields:** `Internal::Types::Hash[String, Object]` — Optional free-form object with additional fields. Total JSON-encoded size must not exceed 255 characters.
|
|
662
|
+
|
|
663
|
+
</dd>
|
|
664
|
+
</dl>
|
|
665
|
+
|
|
666
|
+
<dl>
|
|
667
|
+
<dd>
|
|
668
|
+
|
|
669
|
+
**request_options:** `Yasminaai::Policies::RequestOptions`
|
|
670
|
+
|
|
671
|
+
</dd>
|
|
672
|
+
</dl>
|
|
673
|
+
</dd>
|
|
674
|
+
</dl>
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
</dd>
|
|
678
|
+
</dl>
|
|
679
|
+
</details>
|
|
680
|
+
|
|
681
|
+
## OtPs
|
|
682
|
+
<details><summary><code>client.ot_ps.<a href="/lib/yasminaai/ot_ps/client.rb">request_otp_for_quote_verification</a>(request) -> </code></summary>
|
|
683
|
+
<dl>
|
|
684
|
+
<dd>
|
|
685
|
+
|
|
686
|
+
#### 📝 Description
|
|
687
|
+
|
|
688
|
+
<dl>
|
|
689
|
+
<dd>
|
|
690
|
+
|
|
691
|
+
<dl>
|
|
692
|
+
<dd>
|
|
693
|
+
|
|
694
|
+
This endpoint sends a one-time password (OTP) to the provided email and phone number for quote verification. It should be called before creating a quote request.
|
|
695
|
+
</dd>
|
|
696
|
+
</dl>
|
|
697
|
+
</dd>
|
|
698
|
+
</dl>
|
|
699
|
+
|
|
700
|
+
#### 🔌 Usage
|
|
701
|
+
|
|
702
|
+
<dl>
|
|
703
|
+
<dd>
|
|
704
|
+
|
|
705
|
+
<dl>
|
|
706
|
+
<dd>
|
|
707
|
+
|
|
708
|
+
```ruby
|
|
709
|
+
client.ot_ps.request_otp_for_quote_verification(
|
|
710
|
+
email: "someone@example.com",
|
|
711
|
+
phone: "0501234567",
|
|
712
|
+
owner_id: "1012345678"
|
|
713
|
+
)
|
|
714
|
+
```
|
|
715
|
+
</dd>
|
|
716
|
+
</dl>
|
|
717
|
+
</dd>
|
|
718
|
+
</dl>
|
|
719
|
+
|
|
720
|
+
#### ⚙️ Parameters
|
|
721
|
+
|
|
722
|
+
<dl>
|
|
723
|
+
<dd>
|
|
724
|
+
|
|
725
|
+
<dl>
|
|
726
|
+
<dd>
|
|
727
|
+
|
|
728
|
+
**email:** `String` — Email address of the car owner
|
|
729
|
+
|
|
730
|
+
</dd>
|
|
731
|
+
</dl>
|
|
732
|
+
|
|
733
|
+
<dl>
|
|
734
|
+
<dd>
|
|
735
|
+
|
|
736
|
+
**phone:** `String` — Phone number starting with 05 and containing 10 digits
|
|
737
|
+
|
|
738
|
+
</dd>
|
|
739
|
+
</dl>
|
|
740
|
+
|
|
741
|
+
<dl>
|
|
742
|
+
<dd>
|
|
743
|
+
|
|
744
|
+
**owner_id:** `String` — National ID or Iqama ID of the car owner (10 digits)
|
|
745
|
+
|
|
746
|
+
</dd>
|
|
747
|
+
</dl>
|
|
748
|
+
|
|
749
|
+
<dl>
|
|
750
|
+
<dd>
|
|
751
|
+
|
|
752
|
+
**request_options:** `Yasminaai::OtPs::RequestOptions`
|
|
753
|
+
|
|
754
|
+
</dd>
|
|
755
|
+
</dl>
|
|
756
|
+
</dd>
|
|
757
|
+
</dl>
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
</dd>
|
|
761
|
+
</dl>
|
|
762
|
+
</details>
|
|
763
|
+
|
|
764
|
+
<details><summary><code>client.ot_ps.<a href="/lib/yasminaai/ot_ps/client.rb">request_otp_for_issuing_policy</a>(request) -> </code></summary>
|
|
765
|
+
<dl>
|
|
766
|
+
<dd>
|
|
767
|
+
|
|
768
|
+
#### 📝 Description
|
|
769
|
+
|
|
770
|
+
<dl>
|
|
771
|
+
<dd>
|
|
772
|
+
|
|
773
|
+
<dl>
|
|
774
|
+
<dd>
|
|
775
|
+
|
|
776
|
+
This endpoint sends a one-time password (OTP). It should be called before issuing a policy.
|
|
777
|
+
</dd>
|
|
778
|
+
</dl>
|
|
779
|
+
</dd>
|
|
780
|
+
</dl>
|
|
781
|
+
|
|
782
|
+
#### 🔌 Usage
|
|
783
|
+
|
|
784
|
+
<dl>
|
|
785
|
+
<dd>
|
|
786
|
+
|
|
787
|
+
<dl>
|
|
788
|
+
<dd>
|
|
789
|
+
|
|
790
|
+
```ruby
|
|
791
|
+
client.ot_ps.request_otp_for_issuing_policy(
|
|
792
|
+
email: "someone@example.com",
|
|
793
|
+
phone: "0501234567",
|
|
794
|
+
owner_id: "1012345678",
|
|
795
|
+
quote_request_id: 123,
|
|
796
|
+
quote_reference_id: "550e8400-e29b-41d4-a716-446655440000",
|
|
797
|
+
quote_price_id: "550e8400-e29b-41d4-a716-446655440001"
|
|
798
|
+
)
|
|
799
|
+
```
|
|
800
|
+
</dd>
|
|
801
|
+
</dl>
|
|
802
|
+
</dd>
|
|
803
|
+
</dl>
|
|
804
|
+
|
|
805
|
+
#### ⚙️ Parameters
|
|
806
|
+
|
|
807
|
+
<dl>
|
|
808
|
+
<dd>
|
|
809
|
+
|
|
810
|
+
<dl>
|
|
811
|
+
<dd>
|
|
812
|
+
|
|
813
|
+
**email:** `String` — Email address of the car owner
|
|
814
|
+
|
|
815
|
+
</dd>
|
|
816
|
+
</dl>
|
|
817
|
+
|
|
818
|
+
<dl>
|
|
819
|
+
<dd>
|
|
820
|
+
|
|
821
|
+
**phone:** `String` — Phone number starting with 05 and containing 10 digits
|
|
822
|
+
|
|
823
|
+
</dd>
|
|
824
|
+
</dl>
|
|
825
|
+
|
|
826
|
+
<dl>
|
|
827
|
+
<dd>
|
|
828
|
+
|
|
829
|
+
**owner_id:** `String` — National ID or Iqama ID of the car owner (10 digits)
|
|
830
|
+
|
|
831
|
+
</dd>
|
|
832
|
+
</dl>
|
|
833
|
+
|
|
834
|
+
<dl>
|
|
835
|
+
<dd>
|
|
836
|
+
|
|
837
|
+
**quote_request_id:** `Integer` — ID of the car quote request
|
|
838
|
+
|
|
839
|
+
</dd>
|
|
840
|
+
</dl>
|
|
841
|
+
|
|
842
|
+
<dl>
|
|
843
|
+
<dd>
|
|
844
|
+
|
|
845
|
+
**quote_reference_id:** `String` — Unique identifier for the quote reference ID (coming from POST /quote-requests)
|
|
846
|
+
|
|
847
|
+
</dd>
|
|
848
|
+
</dl>
|
|
849
|
+
|
|
850
|
+
<dl>
|
|
851
|
+
<dd>
|
|
852
|
+
|
|
853
|
+
**quote_price_id:** `String` — Unique identifier for the quote price ID that exists inside a quote item (coming from POST /quote-requests)
|
|
854
|
+
|
|
855
|
+
</dd>
|
|
856
|
+
</dl>
|
|
857
|
+
|
|
858
|
+
<dl>
|
|
859
|
+
<dd>
|
|
860
|
+
|
|
861
|
+
**request_options:** `Yasminaai::OtPs::RequestOptions`
|
|
862
|
+
|
|
863
|
+
</dd>
|
|
864
|
+
</dl>
|
|
865
|
+
</dd>
|
|
866
|
+
</dl>
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
</dd>
|
|
870
|
+
</dl>
|
|
871
|
+
</details>
|
|
872
|
+
|