python-moloni-fix 0.3.16__py3-none-any.whl

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 (52) hide show
  1. moloni/__init__.py +0 -0
  2. moloni/__version__.py +1 -0
  3. moloni/api/__init__.py +701 -0
  4. moloni/api/bankaccounts_client.py +372 -0
  5. moloni/api/billsoflading_client.py +693 -0
  6. moloni/api/companies_client.py +322 -0
  7. moloni/api/countries_client.py +171 -0
  8. moloni/api/creditnotes_client.py +615 -0
  9. moloni/api/currencies_client.py +171 -0
  10. moloni/api/customeralternateaddresses_client.py +519 -0
  11. moloni/api/customerreturnnotes_client.py +701 -0
  12. moloni/api/customers_client.py +1413 -0
  13. moloni/api/debitnotes_client.py +597 -0
  14. moloni/api/deductions_client.py +435 -0
  15. moloni/api/deliverymethods_client.py +431 -0
  16. moloni/api/deliverynotes_client.py +714 -0
  17. moloni/api/documentmodels_client.py +171 -0
  18. moloni/api/documents_client.py +472 -0
  19. moloni/api/documentsets_client.py +447 -0
  20. moloni/api/estimates_client.py +663 -0
  21. moloni/api/fiscalzones_client.py +219 -0
  22. moloni/api/identificationtemplates_client.py +513 -0
  23. moloni/api/invoicereceipts_client.py +705 -0
  24. moloni/api/invoices_client.py +705 -0
  25. moloni/api/languages_client.py +171 -0
  26. moloni/api/maturitydates_client.py +441 -0
  27. moloni/api/measurementunits_client.py +437 -0
  28. moloni/api/ownassetsmovementguides_client.py +683 -0
  29. moloni/api/paymentmethods_client.py +429 -0
  30. moloni/api/productcategories_client.py +400 -0
  31. moloni/api/products_client.py +1252 -0
  32. moloni/api/receipts_client.py +591 -0
  33. moloni/api/salesmen_client.py +580 -0
  34. moloni/api/simplifiedinvoices_client.py +705 -0
  35. moloni/api/subscription_client.py +104 -0
  36. moloni/api/suppliers_client.py +1264 -0
  37. moloni/api/taxes_client.py +477 -0
  38. moloni/api/taxexemptions_client.py +171 -0
  39. moloni/api/users_client.py +104 -0
  40. moloni/api/vehicles_client.py +435 -0
  41. moloni/api/warehouses_client.py +506 -0
  42. moloni/api/waybills_client.py +699 -0
  43. moloni/base/__init__.py +24 -0
  44. moloni/base/client.py +164 -0
  45. moloni/base/config.py +6 -0
  46. moloni/base/helpers.py +150 -0
  47. moloni/base/logger_config.py +49 -0
  48. python_moloni_fix-0.3.16.dist-info/METADATA +231 -0
  49. python_moloni_fix-0.3.16.dist-info/RECORD +52 -0
  50. python_moloni_fix-0.3.16.dist-info/WHEEL +5 -0
  51. python_moloni_fix-0.3.16.dist-info/licenses/LICENSE +21 -0
  52. python_moloni_fix-0.3.16.dist-info/top_level.txt +1 -0
@@ -0,0 +1,663 @@
1
+ from pydantic import BaseModel, ValidationError
2
+ from typing import Union, Optional, List, Any
3
+
4
+ from moloni.base.client import MoloniBaseClient
5
+ from moloni.base.helpers import endpoint, fill_query_params, validate_data
6
+ from moloni.base import ApiResponse
7
+
8
+
9
+ class ApiRequestModel(BaseModel):
10
+ _api_client: Any = None
11
+
12
+ def connect(self, *args, **kwargs):
13
+ self._api_client = EstimatesClient(*args, **kwargs)
14
+ return self
15
+
16
+ def __enter__(self):
17
+ return self.connect()
18
+
19
+ def __exit__(self, exc_type, exc_value, traceback):
20
+ pass
21
+
22
+
23
+ class Associated_documents(BaseModel):
24
+ associated_id: Optional[Any] = None
25
+ value: Optional[Any] = None
26
+
27
+
28
+ class Payments(BaseModel):
29
+ date: Optional[Any] = None
30
+ notes: Optional[Any] = None
31
+ payment_method_id: Optional[Any] = None
32
+ value: Optional[Any] = None
33
+
34
+
35
+ class Products(BaseModel):
36
+ discount: Optional[Any] = None
37
+ exemption_reason: Optional[Any] = None
38
+ name: Optional[Any] = None
39
+ order: Optional[Any] = None
40
+ price: Optional[Any] = None
41
+ product_id: Optional[Any] = None
42
+ qty: Optional[Any] = None
43
+ summary: Optional[Any] = None
44
+ taxes: Optional[Any] = None
45
+ warehouse_id: Optional[Any] = None
46
+
47
+
48
+ class EstimatesCountModel(ApiRequestModel):
49
+ company_id: Union[str, int]
50
+ customer_id: Optional[Union[str, int]] = None
51
+ date: Optional[str] = None
52
+ document_set_id: Optional[Union[str, int]] = None
53
+ expiration_date: Optional[str] = None
54
+ number: Optional[str] = None
55
+ salesman_id: Optional[Union[str, int]] = None
56
+ year: Optional[str] = None
57
+ your_reference: Optional[str] = None
58
+
59
+ def request(self) -> ApiResponse:
60
+ """
61
+ request(self) -> ApiResponse
62
+
63
+ Make an API request using the initialized client.
64
+
65
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
66
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
67
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
68
+
69
+ Returns:
70
+ The response from the API.
71
+
72
+ Raises:
73
+ ValueError: If the client is not initialized via the `connect` method.
74
+
75
+ Example:
76
+
77
+ # Assuming you have a model instance `request_model` and an API client `api_client`
78
+
79
+ ..code-block:: python
80
+
81
+ with request_model.connect(auth_config=auth_config) as api:
82
+ response = api.request()
83
+
84
+ # The above example assumes that the `connect` method has been used to initialize the client.
85
+ # The request method then sends the model's data to the API and returns the API's response.
86
+
87
+ """
88
+ if hasattr(self, "_api_client"):
89
+ response = self._api_client.count(
90
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
91
+ )
92
+ return response
93
+ else:
94
+ raise ValueError("Client not initialized. Use the 'connect' method.")
95
+
96
+
97
+ class EstimatesDeleteModel(ApiRequestModel):
98
+ company_id: Union[str, int]
99
+ document_id: Optional[Union[str, int]] = None
100
+
101
+ def request(self) -> ApiResponse:
102
+ """
103
+ request(self) -> ApiResponse
104
+
105
+ Make an API request using the initialized client.
106
+
107
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
108
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
109
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
110
+
111
+ Returns:
112
+ The response from the API.
113
+
114
+ Raises:
115
+ ValueError: If the client is not initialized via the `connect` method.
116
+
117
+ Example:
118
+
119
+ # Assuming you have a model instance `request_model` and an API client `api_client`
120
+
121
+ ..code-block:: python
122
+
123
+ with request_model.connect(auth_config=auth_config) as api:
124
+ response = api.request()
125
+
126
+ # The above example assumes that the `connect` method has been used to initialize the client.
127
+ # The request method then sends the model's data to the API and returns the API's response.
128
+
129
+ """
130
+ if hasattr(self, "_api_client"):
131
+ response = self._api_client.delete(
132
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
133
+ )
134
+ return response
135
+ else:
136
+ raise ValueError("Client not initialized. Use the 'connect' method.")
137
+
138
+
139
+ class EstimatesGetAllModel(ApiRequestModel):
140
+ company_id: Union[str, int]
141
+ customer_id: Optional[Union[str, int]] = None
142
+ date: Optional[str] = None
143
+ document_set_id: Optional[Union[str, int]] = None
144
+ expiration_date: Optional[str] = None
145
+ number: Optional[str] = None
146
+ offset: Optional[Union[str, int]] = 0
147
+ qty: Optional[Union[str, int]] = 25
148
+ salesman_id: Optional[Union[str, int]] = None
149
+ year: Optional[str] = None
150
+ your_reference: Optional[str] = None
151
+
152
+ def request(self) -> ApiResponse:
153
+ """
154
+ request(self) -> ApiResponse
155
+
156
+ Make an API request using the initialized client.
157
+
158
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
159
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
160
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
161
+
162
+ Returns:
163
+ The response from the API.
164
+
165
+ Raises:
166
+ ValueError: If the client is not initialized via the `connect` method.
167
+
168
+ Example:
169
+
170
+ # Assuming you have a model instance `request_model` and an API client `api_client`
171
+
172
+ ..code-block:: python
173
+
174
+ with request_model.connect(auth_config=auth_config) as api:
175
+ response = api.request()
176
+
177
+ # The above example assumes that the `connect` method has been used to initialize the client.
178
+ # The request method then sends the model's data to the API and returns the API's response.
179
+
180
+ """
181
+ if hasattr(self, "_api_client"):
182
+ response = self._api_client.get_all(
183
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
184
+ )
185
+ return response
186
+ else:
187
+ raise ValueError("Client not initialized. Use the 'connect' method.")
188
+
189
+
190
+ class EstimatesGetOneModel(ApiRequestModel):
191
+ company_id: Union[str, int]
192
+ customer_id: Optional[Union[str, int]] = None
193
+ date: Optional[str] = None
194
+ document_id: Optional[Union[str, int]] = None
195
+ document_set_id: Optional[Union[str, int]] = None
196
+ expiration_date: Optional[str] = None
197
+ number: Optional[str] = None
198
+ salesman_id: Optional[Union[str, int]] = None
199
+ year: Optional[str] = None
200
+ your_reference: Optional[str] = None
201
+
202
+ def request(self) -> ApiResponse:
203
+ """
204
+ request(self) -> ApiResponse
205
+
206
+ Make an API request using the initialized client.
207
+
208
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
209
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
210
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
211
+
212
+ Returns:
213
+ The response from the API.
214
+
215
+ Raises:
216
+ ValueError: If the client is not initialized via the `connect` method.
217
+
218
+ Example:
219
+
220
+ # Assuming you have a model instance `request_model` and an API client `api_client`
221
+
222
+ ..code-block:: python
223
+
224
+ with request_model.connect(auth_config=auth_config) as api:
225
+ response = api.request()
226
+
227
+ # The above example assumes that the `connect` method has been used to initialize the client.
228
+ # The request method then sends the model's data to the API and returns the API's response.
229
+
230
+ """
231
+ if hasattr(self, "_api_client"):
232
+ response = self._api_client.get_one(
233
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
234
+ )
235
+ return response
236
+ else:
237
+ raise ValueError("Client not initialized. Use the 'connect' method.")
238
+
239
+
240
+ class EstimatesInsertModel(ApiRequestModel):
241
+ company_id: Union[str, int]
242
+ customer_id: Optional[Union[str, int]] = None
243
+ date: Optional[str] = None
244
+ deduction_id: Optional[Union[str, int]] = None
245
+ delivery_datetime: Optional[str] = None
246
+ delivery_departure_address: Optional[str] = None
247
+ delivery_departure_city: Optional[str] = None
248
+ delivery_departure_country: Optional[str] = None
249
+ delivery_departure_zip_code: Optional[str] = None
250
+ delivery_destination_address: Optional[str] = None
251
+ delivery_destination_city: Optional[str] = None
252
+ delivery_destination_country: Optional[str] = None
253
+ delivery_destination_zip_code: Optional[str] = None
254
+ delivery_method_id: Optional[Union[str, int]] = None
255
+ document_set_id: Optional[Union[str, int]] = None
256
+ expiration_date: Optional[str] = None
257
+ financial_discount: Optional[str] = None
258
+ notes: Optional[str] = None
259
+ products: Optional[List[Products]] = None
260
+ salesman_commission: Optional[str] = None
261
+ salesman_id: Optional[Union[str, int]] = None
262
+ special_discount: Optional[str] = None
263
+ status: Optional[str] = None
264
+ vehicle_id: Optional[Union[str, int]] = None
265
+ your_reference: Optional[str] = None
266
+
267
+ def request(self) -> ApiResponse:
268
+ """
269
+ request(self) -> ApiResponse
270
+
271
+ Make an API request using the initialized client.
272
+
273
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
274
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
275
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
276
+
277
+ Returns:
278
+ The response from the API.
279
+
280
+ Raises:
281
+ ValueError: If the client is not initialized via the `connect` method.
282
+
283
+ Example:
284
+
285
+ # Assuming you have a model instance `request_model` and an API client `api_client`
286
+
287
+ ..code-block:: python
288
+
289
+ with request_model.connect(auth_config=auth_config) as api:
290
+ response = api.request()
291
+
292
+ # The above example assumes that the `connect` method has been used to initialize the client.
293
+ # The request method then sends the model's data to the API and returns the API's response.
294
+
295
+ """
296
+ if hasattr(self, "_api_client"):
297
+ response = self._api_client.insert(
298
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
299
+ )
300
+ return response
301
+ else:
302
+ raise ValueError("Client not initialized. Use the 'connect' method.")
303
+
304
+
305
+ class EstimatesUpdateModel(ApiRequestModel):
306
+ company_id: Union[str, int]
307
+ customer_id: Optional[Union[str, int]] = None
308
+ date: Optional[str] = None
309
+ deduction_id: Optional[Union[str, int]] = None
310
+ delivery_datetime: Optional[str] = None
311
+ delivery_departure_address: Optional[str] = None
312
+ delivery_departure_city: Optional[str] = None
313
+ delivery_departure_country: Optional[str] = None
314
+ delivery_departure_zip_code: Optional[str] = None
315
+ delivery_destination_address: Optional[str] = None
316
+ delivery_destination_city: Optional[str] = None
317
+ delivery_destination_country: Optional[str] = None
318
+ delivery_destination_zip_code: Optional[str] = None
319
+ delivery_method_id: Optional[Union[str, int]] = None
320
+ document_id: Optional[Union[str, int]] = None
321
+ document_set_id: Optional[Union[str, int]] = None
322
+ expiration_date: Optional[str] = None
323
+ financial_discount: Optional[str] = None
324
+ notes: Optional[str] = None
325
+ products: Optional[List[Products]] = None
326
+ salesman_commission: Optional[str] = None
327
+ salesman_id: Optional[Union[str, int]] = None
328
+ special_discount: Optional[str] = None
329
+ status: Optional[str] = None
330
+ vehicle_id: Optional[Union[str, int]] = None
331
+ your_reference: Optional[str] = None
332
+
333
+ def request(self) -> ApiResponse:
334
+ """
335
+ request(self) -> ApiResponse
336
+
337
+ Make an API request using the initialized client.
338
+
339
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
340
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
341
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
342
+
343
+ Returns:
344
+ The response from the API.
345
+
346
+ Raises:
347
+ ValueError: If the client is not initialized via the `connect` method.
348
+
349
+ Example:
350
+
351
+ # Assuming you have a model instance `request_model` and an API client `api_client`
352
+
353
+ ..code-block:: python
354
+
355
+ with request_model.connect(auth_config=auth_config) as api:
356
+ response = api.request()
357
+
358
+ # The above example assumes that the `connect` method has been used to initialize the client.
359
+ # The request method then sends the model's data to the API and returns the API's response.
360
+
361
+ """
362
+ if hasattr(self, "_api_client"):
363
+ response = self._api_client.update(
364
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
365
+ )
366
+ return response
367
+ else:
368
+ raise ValueError("Client not initialized. Use the 'connect' method.")
369
+
370
+
371
+ class EstimatesClient(MoloniBaseClient):
372
+
373
+ @endpoint("/<version>/estimates/count/", method="post")
374
+ def count(self, data: Union[EstimatesCountModel, dict], **kwargs):
375
+ """
376
+ count(self, data: Union[EstimatesCountModel, dict], **kwargs)
377
+
378
+ Args:
379
+
380
+ data (Union[EstimatesCountModel, dict]): A model instance or dictionary containing the following fields:
381
+
382
+ - company_id (Union[str, int]): company_id of the EstimatesCountModel.
383
+
384
+ - customer_id (Union[str, int]): customer_id of the EstimatesCountModel.
385
+
386
+ - date (str): date of the EstimatesCountModel.
387
+
388
+ - document_set_id (Union[str, int]): document_set_id of the EstimatesCountModel.
389
+
390
+ - expiration_date (str): expiration_date of the EstimatesCountModel.
391
+
392
+ - number (str): number of the EstimatesCountModel.
393
+
394
+ - salesman_id (Union[str, int]): salesman_id of the EstimatesCountModel.
395
+
396
+ - year (str): year of the EstimatesCountModel.
397
+
398
+ - your_reference (str): your_reference of the EstimatesCountModel.
399
+
400
+
401
+
402
+ Returns:
403
+ ApiResponse: The response from the API.
404
+ """
405
+
406
+ data = validate_data(data, self.validate, EstimatesCountModel)
407
+
408
+ return self._request(
409
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
410
+ )
411
+
412
+ @endpoint("/<version>/estimates/delete/", method="post")
413
+ def delete(self, data: Union[EstimatesDeleteModel, dict], **kwargs):
414
+ """
415
+ delete(self, data: Union[EstimatesDeleteModel, dict], **kwargs)
416
+
417
+ Args:
418
+
419
+ data (Union[EstimatesDeleteModel, dict]): A model instance or dictionary containing the following fields:
420
+
421
+ - company_id (Union[str, int]): company_id of the EstimatesDeleteModel.
422
+
423
+ - document_id (Union[str, int]): document_id of the EstimatesDeleteModel.
424
+
425
+
426
+
427
+ Returns:
428
+ ApiResponse: The response from the API.
429
+ """
430
+
431
+ data = validate_data(data, self.validate, EstimatesDeleteModel)
432
+
433
+ return self._request(
434
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
435
+ )
436
+
437
+ @endpoint("/<version>/estimates/getAll/", method="post")
438
+ def get_all(self, data: Union[EstimatesGetAllModel, dict], **kwargs):
439
+ """
440
+ get_all(self, data: Union[EstimatesGetAllModel, dict], **kwargs)
441
+
442
+ Args:
443
+
444
+ data (Union[EstimatesGetAllModel, dict]): A model instance or dictionary containing the following fields:
445
+
446
+ - company_id (Union[str, int]): company_id of the EstimatesGetAllModel.
447
+
448
+ - customer_id (Union[str, int]): customer_id of the EstimatesGetAllModel.
449
+
450
+ - date (str): date of the EstimatesGetAllModel.
451
+
452
+ - document_set_id (Union[str, int]): document_set_id of the EstimatesGetAllModel.
453
+
454
+ - expiration_date (str): expiration_date of the EstimatesGetAllModel.
455
+
456
+ - number (str): number of the EstimatesGetAllModel.
457
+
458
+ - offset (str): offset of the EstimatesGetAllModel.
459
+
460
+ - qty (str): qty of the EstimatesGetAllModel.
461
+
462
+ - salesman_id (Union[str, int]): salesman_id of the EstimatesGetAllModel.
463
+
464
+ - year (str): year of the EstimatesGetAllModel.
465
+
466
+ - your_reference (str): your_reference of the EstimatesGetAllModel.
467
+
468
+
469
+
470
+ Returns:
471
+ ApiResponse: The response from the API.
472
+ """
473
+
474
+ data = validate_data(data, self.validate, EstimatesGetAllModel)
475
+
476
+ return self._request(
477
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
478
+ )
479
+
480
+ @endpoint("/<version>/estimates/getOne/", method="post")
481
+ def get_one(self, data: Union[EstimatesGetOneModel, dict], **kwargs):
482
+ """
483
+ get_one(self, data: Union[EstimatesGetOneModel, dict], **kwargs)
484
+
485
+ Args:
486
+
487
+ data (Union[EstimatesGetOneModel, dict]): A model instance or dictionary containing the following fields:
488
+
489
+ - company_id (Union[str, int]): company_id of the EstimatesGetOneModel.
490
+
491
+ - customer_id (Union[str, int]): customer_id of the EstimatesGetOneModel.
492
+
493
+ - date (str): date of the EstimatesGetOneModel.
494
+
495
+ - document_id (Union[str, int]): document_id of the EstimatesGetOneModel.
496
+
497
+ - document_set_id (Union[str, int]): document_set_id of the EstimatesGetOneModel.
498
+
499
+ - expiration_date (str): expiration_date of the EstimatesGetOneModel.
500
+
501
+ - number (str): number of the EstimatesGetOneModel.
502
+
503
+ - salesman_id (Union[str, int]): salesman_id of the EstimatesGetOneModel.
504
+
505
+ - year (str): year of the EstimatesGetOneModel.
506
+
507
+ - your_reference (str): your_reference of the EstimatesGetOneModel.
508
+
509
+
510
+
511
+ Returns:
512
+ ApiResponse: The response from the API.
513
+ """
514
+
515
+ data = validate_data(data, self.validate, EstimatesGetOneModel)
516
+
517
+ return self._request(
518
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
519
+ )
520
+
521
+ @endpoint("/<version>/estimates/insert/", method="post")
522
+ def insert(self, data: Union[EstimatesInsertModel, dict], **kwargs):
523
+ """
524
+ insert(self, data: Union[EstimatesInsertModel, dict], **kwargs)
525
+
526
+ Args:
527
+
528
+ data (Union[EstimatesInsertModel, dict]): A model instance or dictionary containing the following fields:
529
+
530
+ - company_id (Union[str, int]): company_id of the EstimatesInsertModel.
531
+
532
+ - customer_id (Union[str, int]): customer_id of the EstimatesInsertModel.
533
+
534
+ - date (str): date of the EstimatesInsertModel.
535
+
536
+ - deduction_id (Union[str, int]): deduction_id of the EstimatesInsertModel.
537
+
538
+ - delivery_datetime (str): delivery_datetime of the EstimatesInsertModel.
539
+
540
+ - delivery_departure_address (str): delivery_departure_address of the EstimatesInsertModel.
541
+
542
+ - delivery_departure_city (str): delivery_departure_city of the EstimatesInsertModel.
543
+
544
+ - delivery_departure_country (str): delivery_departure_country of the EstimatesInsertModel.
545
+
546
+ - delivery_departure_zip_code (str): delivery_departure_zip_code of the EstimatesInsertModel.
547
+
548
+ - delivery_destination_address (str): delivery_destination_address of the EstimatesInsertModel.
549
+
550
+ - delivery_destination_city (str): delivery_destination_city of the EstimatesInsertModel.
551
+
552
+ - delivery_destination_country (str): delivery_destination_country of the EstimatesInsertModel.
553
+
554
+ - delivery_destination_zip_code (str): delivery_destination_zip_code of the EstimatesInsertModel.
555
+
556
+ - delivery_method_id (Union[str, int]): delivery_method_id of the EstimatesInsertModel.
557
+
558
+ - document_set_id (Union[str, int]): document_set_id of the EstimatesInsertModel.
559
+
560
+ - expiration_date (str): expiration_date of the EstimatesInsertModel.
561
+
562
+ - financial_discount (str): financial_discount of the EstimatesInsertModel.
563
+
564
+ - notes (str): notes of the EstimatesInsertModel.
565
+
566
+ - products (str): products of the EstimatesInsertModel.
567
+
568
+ - salesman_commission (str): salesman_commission of the EstimatesInsertModel.
569
+
570
+ - salesman_id (Union[str, int]): salesman_id of the EstimatesInsertModel.
571
+
572
+ - special_discount (str): special_discount of the EstimatesInsertModel.
573
+
574
+ - status (str): status of the EstimatesInsertModel.
575
+
576
+ - vehicle_id (Union[str, int]): vehicle_id of the EstimatesInsertModel.
577
+
578
+ - your_reference (str): your_reference of the EstimatesInsertModel.
579
+
580
+
581
+
582
+ Returns:
583
+ ApiResponse: The response from the API.
584
+ """
585
+
586
+ data = validate_data(data, self.validate, EstimatesInsertModel)
587
+
588
+ return self._request(
589
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
590
+ )
591
+
592
+ @endpoint("/<version>/estimates/update/", method="post")
593
+ def update(self, data: Union[EstimatesUpdateModel, dict], **kwargs):
594
+ """
595
+ update(self, data: Union[EstimatesUpdateModel, dict], **kwargs)
596
+
597
+ Args:
598
+
599
+ data (Union[EstimatesUpdateModel, dict]): A model instance or dictionary containing the following fields:
600
+
601
+ - company_id (Union[str, int]): company_id of the EstimatesUpdateModel.
602
+
603
+ - customer_id (Union[str, int]): customer_id of the EstimatesUpdateModel.
604
+
605
+ - date (str): date of the EstimatesUpdateModel.
606
+
607
+ - deduction_id (Union[str, int]): deduction_id of the EstimatesUpdateModel.
608
+
609
+ - delivery_datetime (str): delivery_datetime of the EstimatesUpdateModel.
610
+
611
+ - delivery_departure_address (str): delivery_departure_address of the EstimatesUpdateModel.
612
+
613
+ - delivery_departure_city (str): delivery_departure_city of the EstimatesUpdateModel.
614
+
615
+ - delivery_departure_country (str): delivery_departure_country of the EstimatesUpdateModel.
616
+
617
+ - delivery_departure_zip_code (str): delivery_departure_zip_code of the EstimatesUpdateModel.
618
+
619
+ - delivery_destination_address (str): delivery_destination_address of the EstimatesUpdateModel.
620
+
621
+ - delivery_destination_city (str): delivery_destination_city of the EstimatesUpdateModel.
622
+
623
+ - delivery_destination_country (str): delivery_destination_country of the EstimatesUpdateModel.
624
+
625
+ - delivery_destination_zip_code (str): delivery_destination_zip_code of the EstimatesUpdateModel.
626
+
627
+ - delivery_method_id (Union[str, int]): delivery_method_id of the EstimatesUpdateModel.
628
+
629
+ - document_id (Union[str, int]): document_id of the EstimatesUpdateModel.
630
+
631
+ - document_set_id (Union[str, int]): document_set_id of the EstimatesUpdateModel.
632
+
633
+ - expiration_date (str): expiration_date of the EstimatesUpdateModel.
634
+
635
+ - financial_discount (str): financial_discount of the EstimatesUpdateModel.
636
+
637
+ - notes (str): notes of the EstimatesUpdateModel.
638
+
639
+ - products (str): products of the EstimatesUpdateModel.
640
+
641
+ - salesman_commission (str): salesman_commission of the EstimatesUpdateModel.
642
+
643
+ - salesman_id (Union[str, int]): salesman_id of the EstimatesUpdateModel.
644
+
645
+ - special_discount (str): special_discount of the EstimatesUpdateModel.
646
+
647
+ - status (str): status of the EstimatesUpdateModel.
648
+
649
+ - vehicle_id (Union[str, int]): vehicle_id of the EstimatesUpdateModel.
650
+
651
+ - your_reference (str): your_reference of the EstimatesUpdateModel.
652
+
653
+
654
+
655
+ Returns:
656
+ ApiResponse: The response from the API.
657
+ """
658
+
659
+ data = validate_data(data, self.validate, EstimatesUpdateModel)
660
+
661
+ return self._request(
662
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
663
+ )