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,701 @@
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 = CustomerreturnnotesClient(*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 CustomerreturnnotesCountModel(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
+ number: Optional[str] = None
54
+ year: Optional[str] = None
55
+ your_reference: Optional[str] = None
56
+
57
+ def request(self) -> ApiResponse:
58
+ """
59
+ request(self) -> ApiResponse
60
+
61
+ Make an API request using the initialized client.
62
+
63
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
64
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
65
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
66
+
67
+ Returns:
68
+ The response from the API.
69
+
70
+ Raises:
71
+ ValueError: If the client is not initialized via the `connect` method.
72
+
73
+ Example:
74
+
75
+ # Assuming you have a model instance `request_model` and an API client `api_client`
76
+
77
+ ..code-block:: python
78
+
79
+ with request_model.connect(auth_config=auth_config) as api:
80
+ response = api.request()
81
+
82
+ # The above example assumes that the `connect` method has been used to initialize the client.
83
+ # The request method then sends the model's data to the API and returns the API's response.
84
+
85
+ """
86
+ if hasattr(self, "_api_client"):
87
+ response = self._api_client.count(
88
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
89
+ )
90
+ return response
91
+ else:
92
+ raise ValueError("Client not initialized. Use the 'connect' method.")
93
+
94
+
95
+ class CustomerreturnnotesDeleteModel(ApiRequestModel):
96
+ company_id: Union[str, int]
97
+ document_id: Optional[Union[str, int]] = None
98
+
99
+ def request(self) -> ApiResponse:
100
+ """
101
+ request(self) -> ApiResponse
102
+
103
+ Make an API request using the initialized client.
104
+
105
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
106
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
107
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
108
+
109
+ Returns:
110
+ The response from the API.
111
+
112
+ Raises:
113
+ ValueError: If the client is not initialized via the `connect` method.
114
+
115
+ Example:
116
+
117
+ # Assuming you have a model instance `request_model` and an API client `api_client`
118
+
119
+ ..code-block:: python
120
+
121
+ with request_model.connect(auth_config=auth_config) as api:
122
+ response = api.request()
123
+
124
+ # The above example assumes that the `connect` method has been used to initialize the client.
125
+ # The request method then sends the model's data to the API and returns the API's response.
126
+
127
+ """
128
+ if hasattr(self, "_api_client"):
129
+ response = self._api_client.delete(
130
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
131
+ )
132
+ return response
133
+ else:
134
+ raise ValueError("Client not initialized. Use the 'connect' method.")
135
+
136
+
137
+ class CustomerreturnnotesGetAllModel(ApiRequestModel):
138
+ company_id: Union[str, int]
139
+ customer_id: Optional[Union[str, int]] = None
140
+ date: Optional[str] = None
141
+ document_set_id: Optional[Union[str, int]] = None
142
+ number: Optional[str] = None
143
+ offset: Optional[Union[str, int]] = 0
144
+ qty: Optional[Union[str, int]] = 25
145
+ year: Optional[str] = None
146
+ your_reference: Optional[str] = None
147
+
148
+ def request(self) -> ApiResponse:
149
+ """
150
+ request(self) -> ApiResponse
151
+
152
+ Make an API request using the initialized client.
153
+
154
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
155
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
156
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
157
+
158
+ Returns:
159
+ The response from the API.
160
+
161
+ Raises:
162
+ ValueError: If the client is not initialized via the `connect` method.
163
+
164
+ Example:
165
+
166
+ # Assuming you have a model instance `request_model` and an API client `api_client`
167
+
168
+ ..code-block:: python
169
+
170
+ with request_model.connect(auth_config=auth_config) as api:
171
+ response = api.request()
172
+
173
+ # The above example assumes that the `connect` method has been used to initialize the client.
174
+ # The request method then sends the model's data to the API and returns the API's response.
175
+
176
+ """
177
+ if hasattr(self, "_api_client"):
178
+ response = self._api_client.get_all(
179
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
180
+ )
181
+ return response
182
+ else:
183
+ raise ValueError("Client not initialized. Use the 'connect' method.")
184
+
185
+
186
+ class CustomerreturnnotesGetOneModel(ApiRequestModel):
187
+ company_id: Union[str, int]
188
+ customer_id: Optional[Union[str, int]] = None
189
+ date: Optional[str] = None
190
+ document_id: Optional[Union[str, int]] = None
191
+ document_set_id: Optional[Union[str, int]] = None
192
+ number: Optional[str] = None
193
+ year: Optional[str] = None
194
+ your_reference: Optional[str] = None
195
+
196
+ def request(self) -> ApiResponse:
197
+ """
198
+ request(self) -> ApiResponse
199
+
200
+ Make an API request using the initialized client.
201
+
202
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
203
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
204
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
205
+
206
+ Returns:
207
+ The response from the API.
208
+
209
+ Raises:
210
+ ValueError: If the client is not initialized via the `connect` method.
211
+
212
+ Example:
213
+
214
+ # Assuming you have a model instance `request_model` and an API client `api_client`
215
+
216
+ ..code-block:: python
217
+
218
+ with request_model.connect(auth_config=auth_config) as api:
219
+ response = api.request()
220
+
221
+ # The above example assumes that the `connect` method has been used to initialize the client.
222
+ # The request method then sends the model's data to the API and returns the API's response.
223
+
224
+ """
225
+ if hasattr(self, "_api_client"):
226
+ response = self._api_client.get_one(
227
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
228
+ )
229
+ return response
230
+ else:
231
+ raise ValueError("Client not initialized. Use the 'connect' method.")
232
+
233
+
234
+ class CustomerreturnnotesInsertModel(ApiRequestModel):
235
+ company_id: Union[str, int]
236
+ associated_documents: Optional[List[Associated_documents]] = None
237
+ customer_id: Optional[Union[str, int]] = None
238
+ date: Optional[str] = None
239
+ delivery_datetime: Optional[str] = None
240
+ delivery_departure_address: Optional[str] = None
241
+ delivery_departure_city: Optional[str] = None
242
+ delivery_departure_country: Optional[str] = None
243
+ delivery_departure_zip_code: Optional[str] = None
244
+ delivery_destination_address: Optional[str] = None
245
+ delivery_destination_city: Optional[str] = None
246
+ delivery_destination_country: Optional[str] = None
247
+ delivery_destination_zip_code: Optional[str] = None
248
+ delivery_method_id: Optional[Union[str, int]] = None
249
+ document_set_id: Optional[Union[str, int]] = None
250
+ financial_discount: Optional[str] = None
251
+ notes: Optional[str] = None
252
+ products: Optional[List[Products]] = None
253
+ related_documents_notes: Optional[str] = None
254
+ status: Optional[str] = None
255
+ vehicle_id: Optional[Union[str, int]] = None
256
+ your_reference: Optional[str] = None
257
+
258
+ def request(self) -> ApiResponse:
259
+ """
260
+ request(self) -> ApiResponse
261
+
262
+ Make an API request using the initialized client.
263
+
264
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
265
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
266
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
267
+
268
+ Returns:
269
+ The response from the API.
270
+
271
+ Raises:
272
+ ValueError: If the client is not initialized via the `connect` method.
273
+
274
+ Example:
275
+
276
+ # Assuming you have a model instance `request_model` and an API client `api_client`
277
+
278
+ ..code-block:: python
279
+
280
+ with request_model.connect(auth_config=auth_config) as api:
281
+ response = api.request()
282
+
283
+ # The above example assumes that the `connect` method has been used to initialize the client.
284
+ # The request method then sends the model's data to the API and returns the API's response.
285
+
286
+ """
287
+ if hasattr(self, "_api_client"):
288
+ response = self._api_client.insert(
289
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
290
+ )
291
+ return response
292
+ else:
293
+ raise ValueError("Client not initialized. Use the 'connect' method.")
294
+
295
+
296
+ class CustomerreturnnotesSetTransportCodeModel(ApiRequestModel):
297
+ company_id: Union[str, int]
298
+ document_id: Optional[Union[str, int]] = None
299
+ transport_code: Optional[str] = None
300
+
301
+ def request(self) -> ApiResponse:
302
+ """
303
+ request(self) -> ApiResponse
304
+
305
+ Make an API request using the initialized client.
306
+
307
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
308
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
309
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
310
+
311
+ Returns:
312
+ The response from the API.
313
+
314
+ Raises:
315
+ ValueError: If the client is not initialized via the `connect` method.
316
+
317
+ Example:
318
+
319
+ # Assuming you have a model instance `request_model` and an API client `api_client`
320
+
321
+ ..code-block:: python
322
+
323
+ with request_model.connect(auth_config=auth_config) as api:
324
+ response = api.request()
325
+
326
+ # The above example assumes that the `connect` method has been used to initialize the client.
327
+ # The request method then sends the model's data to the API and returns the API's response.
328
+
329
+ """
330
+ if hasattr(self, "_api_client"):
331
+ response = self._api_client.set_transport_code(
332
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
333
+ )
334
+ return response
335
+ else:
336
+ raise ValueError("Client not initialized. Use the 'connect' method.")
337
+
338
+
339
+ class CustomerreturnnotesUpdateModel(ApiRequestModel):
340
+ company_id: Union[str, int]
341
+ associated_documents: Optional[List[Associated_documents]] = None
342
+ customer_id: Optional[Union[str, int]] = None
343
+ date: Optional[str] = None
344
+ delivery_datetime: Optional[str] = None
345
+ delivery_departure_address: Optional[str] = None
346
+ delivery_departure_city: Optional[str] = None
347
+ delivery_departure_country: Optional[str] = None
348
+ delivery_departure_zip_code: Optional[str] = None
349
+ delivery_destination_address: Optional[str] = None
350
+ delivery_destination_city: Optional[str] = None
351
+ delivery_destination_country: Optional[str] = None
352
+ delivery_destination_zip_code: Optional[str] = None
353
+ delivery_method_id: Optional[Union[str, int]] = None
354
+ document_id: Optional[Union[str, int]] = None
355
+ document_set_id: Optional[Union[str, int]] = None
356
+ financial_discount: Optional[str] = None
357
+ notes: Optional[str] = None
358
+ products: Optional[List[Products]] = None
359
+ related_documents_notes: Optional[str] = None
360
+ status: Optional[str] = None
361
+ vehicle_id: Optional[Union[str, int]] = None
362
+ your_reference: Optional[str] = None
363
+
364
+ def request(self) -> ApiResponse:
365
+ """
366
+ request(self) -> ApiResponse
367
+
368
+ Make an API request using the initialized client.
369
+
370
+ This method checks if the `_api_client` attribute is set (i.e., if the client has been initialized via the `connect` method).
371
+ If the client is initialized, it will make an API request using the provided method name and the model's data,
372
+ excluding the `_api_client` attribute itself from the request payload. If the client is not initialized, it will raise a `ValueError`.
373
+
374
+ Returns:
375
+ The response from the API.
376
+
377
+ Raises:
378
+ ValueError: If the client is not initialized via the `connect` method.
379
+
380
+ Example:
381
+
382
+ # Assuming you have a model instance `request_model` and an API client `api_client`
383
+
384
+ ..code-block:: python
385
+
386
+ with request_model.connect(auth_config=auth_config) as api:
387
+ response = api.request()
388
+
389
+ # The above example assumes that the `connect` method has been used to initialize the client.
390
+ # The request method then sends the model's data to the API and returns the API's response.
391
+
392
+ """
393
+ if hasattr(self, "_api_client"):
394
+ response = self._api_client.update(
395
+ self.model_dump(exclude={"_api_client"}, exclude_unset=True)
396
+ )
397
+ return response
398
+ else:
399
+ raise ValueError("Client not initialized. Use the 'connect' method.")
400
+
401
+
402
+ class CustomerreturnnotesClient(MoloniBaseClient):
403
+
404
+ @endpoint("/<version>/customerReturnNotes/count/", method="post")
405
+ def count(self, data: Union[CustomerreturnnotesCountModel, dict], **kwargs):
406
+ """
407
+ count(self, data: Union[CustomerreturnnotesCountModel, dict], **kwargs)
408
+
409
+ Args:
410
+
411
+ data (Union[CustomerreturnnotesCountModel, dict]): A model instance or dictionary containing the following fields:
412
+
413
+ - company_id (Union[str, int]): company_id of the CustomerreturnnotesCountModel.
414
+
415
+ - customer_id (Union[str, int]): customer_id of the CustomerreturnnotesCountModel.
416
+
417
+ - date (str): date of the CustomerreturnnotesCountModel.
418
+
419
+ - document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesCountModel.
420
+
421
+ - number (str): number of the CustomerreturnnotesCountModel.
422
+
423
+ - year (str): year of the CustomerreturnnotesCountModel.
424
+
425
+ - your_reference (str): your_reference of the CustomerreturnnotesCountModel.
426
+
427
+
428
+
429
+ Returns:
430
+ ApiResponse: The response from the API.
431
+ """
432
+
433
+ data = validate_data(data, self.validate, CustomerreturnnotesCountModel)
434
+
435
+ return self._request(
436
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
437
+ )
438
+
439
+ @endpoint("/<version>/customerReturnNotes/delete/", method="post")
440
+ def delete(self, data: Union[CustomerreturnnotesDeleteModel, dict], **kwargs):
441
+ """
442
+ delete(self, data: Union[CustomerreturnnotesDeleteModel, dict], **kwargs)
443
+
444
+ Args:
445
+
446
+ data (Union[CustomerreturnnotesDeleteModel, dict]): A model instance or dictionary containing the following fields:
447
+
448
+ - company_id (Union[str, int]): company_id of the CustomerreturnnotesDeleteModel.
449
+
450
+ - document_id (Union[str, int]): document_id of the CustomerreturnnotesDeleteModel.
451
+
452
+
453
+
454
+ Returns:
455
+ ApiResponse: The response from the API.
456
+ """
457
+
458
+ data = validate_data(data, self.validate, CustomerreturnnotesDeleteModel)
459
+
460
+ return self._request(
461
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
462
+ )
463
+
464
+ @endpoint("/<version>/customerReturnNotes/getAll/", method="post")
465
+ def get_all(self, data: Union[CustomerreturnnotesGetAllModel, dict], **kwargs):
466
+ """
467
+ get_all(self, data: Union[CustomerreturnnotesGetAllModel, dict], **kwargs)
468
+
469
+ Args:
470
+
471
+ data (Union[CustomerreturnnotesGetAllModel, dict]): A model instance or dictionary containing the following fields:
472
+
473
+ - company_id (Union[str, int]): company_id of the CustomerreturnnotesGetAllModel.
474
+
475
+ - customer_id (Union[str, int]): customer_id of the CustomerreturnnotesGetAllModel.
476
+
477
+ - date (str): date of the CustomerreturnnotesGetAllModel.
478
+
479
+ - document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesGetAllModel.
480
+
481
+ - number (str): number of the CustomerreturnnotesGetAllModel.
482
+
483
+ - offset (str): offset of the CustomerreturnnotesGetAllModel.
484
+
485
+ - qty (str): qty of the CustomerreturnnotesGetAllModel.
486
+
487
+ - year (str): year of the CustomerreturnnotesGetAllModel.
488
+
489
+ - your_reference (str): your_reference of the CustomerreturnnotesGetAllModel.
490
+
491
+
492
+
493
+ Returns:
494
+ ApiResponse: The response from the API.
495
+ """
496
+
497
+ data = validate_data(data, self.validate, CustomerreturnnotesGetAllModel)
498
+
499
+ return self._request(
500
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
501
+ )
502
+
503
+ @endpoint("/<version>/customerReturnNotes/getOne/", method="post")
504
+ def get_one(self, data: Union[CustomerreturnnotesGetOneModel, dict], **kwargs):
505
+ """
506
+ get_one(self, data: Union[CustomerreturnnotesGetOneModel, dict], **kwargs)
507
+
508
+ Args:
509
+
510
+ data (Union[CustomerreturnnotesGetOneModel, dict]): A model instance or dictionary containing the following fields:
511
+
512
+ - company_id (Union[str, int]): company_id of the CustomerreturnnotesGetOneModel.
513
+
514
+ - customer_id (Union[str, int]): customer_id of the CustomerreturnnotesGetOneModel.
515
+
516
+ - date (str): date of the CustomerreturnnotesGetOneModel.
517
+
518
+ - document_id (Union[str, int]): document_id of the CustomerreturnnotesGetOneModel.
519
+
520
+ - document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesGetOneModel.
521
+
522
+ - number (str): number of the CustomerreturnnotesGetOneModel.
523
+
524
+ - year (str): year of the CustomerreturnnotesGetOneModel.
525
+
526
+ - your_reference (str): your_reference of the CustomerreturnnotesGetOneModel.
527
+
528
+
529
+
530
+ Returns:
531
+ ApiResponse: The response from the API.
532
+ """
533
+
534
+ data = validate_data(data, self.validate, CustomerreturnnotesGetOneModel)
535
+
536
+ return self._request(
537
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
538
+ )
539
+
540
+ @endpoint("/<version>/customerReturnNotes/insert/", method="post")
541
+ def insert(self, data: Union[CustomerreturnnotesInsertModel, dict], **kwargs):
542
+ """
543
+ insert(self, data: Union[CustomerreturnnotesInsertModel, dict], **kwargs)
544
+
545
+ Args:
546
+
547
+ data (Union[CustomerreturnnotesInsertModel, dict]): A model instance or dictionary containing the following fields:
548
+
549
+ - associated_documents (str): associated_documents of the CustomerreturnnotesInsertModel.
550
+
551
+ - company_id (Union[str, int]): company_id of the CustomerreturnnotesInsertModel.
552
+
553
+ - customer_id (Union[str, int]): customer_id of the CustomerreturnnotesInsertModel.
554
+
555
+ - date (str): date of the CustomerreturnnotesInsertModel.
556
+
557
+ - delivery_datetime (str): delivery_datetime of the CustomerreturnnotesInsertModel.
558
+
559
+ - delivery_departure_address (str): delivery_departure_address of the CustomerreturnnotesInsertModel.
560
+
561
+ - delivery_departure_city (str): delivery_departure_city of the CustomerreturnnotesInsertModel.
562
+
563
+ - delivery_departure_country (str): delivery_departure_country of the CustomerreturnnotesInsertModel.
564
+
565
+ - delivery_departure_zip_code (str): delivery_departure_zip_code of the CustomerreturnnotesInsertModel.
566
+
567
+ - delivery_destination_address (str): delivery_destination_address of the CustomerreturnnotesInsertModel.
568
+
569
+ - delivery_destination_city (str): delivery_destination_city of the CustomerreturnnotesInsertModel.
570
+
571
+ - delivery_destination_country (str): delivery_destination_country of the CustomerreturnnotesInsertModel.
572
+
573
+ - delivery_destination_zip_code (str): delivery_destination_zip_code of the CustomerreturnnotesInsertModel.
574
+
575
+ - delivery_method_id (Union[str, int]): delivery_method_id of the CustomerreturnnotesInsertModel.
576
+
577
+ - document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesInsertModel.
578
+
579
+ - financial_discount (str): financial_discount of the CustomerreturnnotesInsertModel.
580
+
581
+ - notes (str): notes of the CustomerreturnnotesInsertModel.
582
+
583
+ - products (str): products of the CustomerreturnnotesInsertModel.
584
+
585
+ - related_documents_notes (str): related_documents_notes of the CustomerreturnnotesInsertModel.
586
+
587
+ - status (str): status of the CustomerreturnnotesInsertModel.
588
+
589
+ - vehicle_id (Union[str, int]): vehicle_id of the CustomerreturnnotesInsertModel.
590
+
591
+ - your_reference (str): your_reference of the CustomerreturnnotesInsertModel.
592
+
593
+
594
+
595
+ Returns:
596
+ ApiResponse: The response from the API.
597
+ """
598
+
599
+ data = validate_data(data, self.validate, CustomerreturnnotesInsertModel)
600
+
601
+ return self._request(
602
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
603
+ )
604
+
605
+ @endpoint("/<version>/customerReturnNotes/setTransportCode/", method="post")
606
+ def set_transport_code(
607
+ self, data: Union[CustomerreturnnotesSetTransportCodeModel, dict], **kwargs
608
+ ):
609
+ """
610
+ set_transport_code(self, data: Union[CustomerreturnnotesSetTransportCodeModel, dict], **kwargs)
611
+
612
+ Args:
613
+
614
+ data (Union[CustomerreturnnotesSetTransportCodeModel, dict]): A model instance or dictionary containing the following fields:
615
+
616
+ - company_id (Union[str, int]): company_id of the CustomerreturnnotesSetTransportCodeModel.
617
+
618
+ - document_id (Union[str, int]): document_id of the CustomerreturnnotesSetTransportCodeModel.
619
+
620
+ - transport_code (str): transport_code of the CustomerreturnnotesSetTransportCodeModel.
621
+
622
+
623
+
624
+ Returns:
625
+ ApiResponse: The response from the API.
626
+ """
627
+
628
+ data = validate_data(
629
+ data, self.validate, CustomerreturnnotesSetTransportCodeModel
630
+ )
631
+
632
+ return self._request(
633
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
634
+ )
635
+
636
+ @endpoint("/<version>/customerReturnNotes/update/", method="post")
637
+ def update(self, data: Union[CustomerreturnnotesUpdateModel, dict], **kwargs):
638
+ """
639
+ update(self, data: Union[CustomerreturnnotesUpdateModel, dict], **kwargs)
640
+
641
+ Args:
642
+
643
+ data (Union[CustomerreturnnotesUpdateModel, dict]): A model instance or dictionary containing the following fields:
644
+
645
+ - associated_documents (str): associated_documents of the CustomerreturnnotesUpdateModel.
646
+
647
+ - company_id (Union[str, int]): company_id of the CustomerreturnnotesUpdateModel.
648
+
649
+ - customer_id (Union[str, int]): customer_id of the CustomerreturnnotesUpdateModel.
650
+
651
+ - date (str): date of the CustomerreturnnotesUpdateModel.
652
+
653
+ - delivery_datetime (str): delivery_datetime of the CustomerreturnnotesUpdateModel.
654
+
655
+ - delivery_departure_address (str): delivery_departure_address of the CustomerreturnnotesUpdateModel.
656
+
657
+ - delivery_departure_city (str): delivery_departure_city of the CustomerreturnnotesUpdateModel.
658
+
659
+ - delivery_departure_country (str): delivery_departure_country of the CustomerreturnnotesUpdateModel.
660
+
661
+ - delivery_departure_zip_code (str): delivery_departure_zip_code of the CustomerreturnnotesUpdateModel.
662
+
663
+ - delivery_destination_address (str): delivery_destination_address of the CustomerreturnnotesUpdateModel.
664
+
665
+ - delivery_destination_city (str): delivery_destination_city of the CustomerreturnnotesUpdateModel.
666
+
667
+ - delivery_destination_country (str): delivery_destination_country of the CustomerreturnnotesUpdateModel.
668
+
669
+ - delivery_destination_zip_code (str): delivery_destination_zip_code of the CustomerreturnnotesUpdateModel.
670
+
671
+ - delivery_method_id (Union[str, int]): delivery_method_id of the CustomerreturnnotesUpdateModel.
672
+
673
+ - document_id (Union[str, int]): document_id of the CustomerreturnnotesUpdateModel.
674
+
675
+ - document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesUpdateModel.
676
+
677
+ - financial_discount (str): financial_discount of the CustomerreturnnotesUpdateModel.
678
+
679
+ - notes (str): notes of the CustomerreturnnotesUpdateModel.
680
+
681
+ - products (str): products of the CustomerreturnnotesUpdateModel.
682
+
683
+ - related_documents_notes (str): related_documents_notes of the CustomerreturnnotesUpdateModel.
684
+
685
+ - status (str): status of the CustomerreturnnotesUpdateModel.
686
+
687
+ - vehicle_id (Union[str, int]): vehicle_id of the CustomerreturnnotesUpdateModel.
688
+
689
+ - your_reference (str): your_reference of the CustomerreturnnotesUpdateModel.
690
+
691
+
692
+
693
+ Returns:
694
+ ApiResponse: The response from the API.
695
+ """
696
+
697
+ data = validate_data(data, self.validate, CustomerreturnnotesUpdateModel)
698
+
699
+ return self._request(
700
+ fill_query_params(kwargs.pop("path"), self.version), data={**data, **kwargs}
701
+ )