samsara-api 4.1.0__py3-none-any.whl → 4.1.1__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.
- samsara/core/client_wrapper.py +2 -2
- samsara/work_orders/client.py +30 -0
- samsara/work_orders/raw_client.py +30 -0
- {samsara_api-4.1.0.dist-info → samsara_api-4.1.1.dist-info}/METADATA +1 -1
- {samsara_api-4.1.0.dist-info → samsara_api-4.1.1.dist-info}/RECORD +7 -7
- {samsara_api-4.1.0.dist-info → samsara_api-4.1.1.dist-info}/LICENSE +0 -0
- {samsara_api-4.1.0.dist-info → samsara_api-4.1.1.dist-info}/WHEEL +0 -0
samsara/core/client_wrapper.py
CHANGED
|
@@ -22,10 +22,10 @@ class BaseClientWrapper:
|
|
|
22
22
|
|
|
23
23
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
24
24
|
headers: typing.Dict[str, str] = {
|
|
25
|
-
"User-Agent": "samsara-api/4.1.
|
|
25
|
+
"User-Agent": "samsara-api/4.1.1",
|
|
26
26
|
"X-Fern-Language": "Python",
|
|
27
27
|
"X-Fern-SDK-Name": "samsara-api",
|
|
28
|
-
"X-Fern-SDK-Version": "4.1.
|
|
28
|
+
"X-Fern-SDK-Version": "4.1.1",
|
|
29
29
|
**(self.get_custom_headers() or {}),
|
|
30
30
|
}
|
|
31
31
|
token = self._get_token()
|
samsara/work_orders/client.py
CHANGED
|
@@ -153,11 +153,14 @@ class WorkOrdersClient:
|
|
|
153
153
|
discount: typing.Optional[WorkOrderDiscountObjectRequestBody] = OMIT,
|
|
154
154
|
due_at_time: typing.Optional[dt.datetime] = OMIT,
|
|
155
155
|
engine_hours: typing.Optional[int] = OMIT,
|
|
156
|
+
invoice_number: typing.Optional[str] = OMIT,
|
|
156
157
|
items: typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]] = OMIT,
|
|
157
158
|
odometer_meters: typing.Optional[int] = OMIT,
|
|
159
|
+
po_number: typing.Optional[str] = OMIT,
|
|
158
160
|
priority: typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority] = OMIT,
|
|
159
161
|
service_task_instances: typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]] = OMIT,
|
|
160
162
|
tax: typing.Optional[WorkOrderTaxCreateObjectRequestBody] = OMIT,
|
|
163
|
+
vendor_uuid: typing.Optional[str] = OMIT,
|
|
161
164
|
request_options: typing.Optional[RequestOptions] = None,
|
|
162
165
|
) -> WorkOrdersPostWorkOrdersResponseBody:
|
|
163
166
|
"""
|
|
@@ -192,12 +195,18 @@ class WorkOrdersClient:
|
|
|
192
195
|
engine_hours : typing.Optional[int]
|
|
193
196
|
The engine hours at the time of the work order. Will default to current asset reading if unset.
|
|
194
197
|
|
|
198
|
+
invoice_number : typing.Optional[str]
|
|
199
|
+
The invoice number for the work order.
|
|
200
|
+
|
|
195
201
|
items : typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]]
|
|
196
202
|
Items related to the work order.
|
|
197
203
|
|
|
198
204
|
odometer_meters : typing.Optional[int]
|
|
199
205
|
The odometer reading at the time of the work order. Will default to current asset reading if unset.
|
|
200
206
|
|
|
207
|
+
po_number : typing.Optional[str]
|
|
208
|
+
The purchase order number for the work order.
|
|
209
|
+
|
|
201
210
|
priority : typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority]
|
|
202
211
|
The priority of the work order Valid values: `High`, `Low`, `Medium`, `Urgent`
|
|
203
212
|
|
|
@@ -206,6 +215,9 @@ class WorkOrdersClient:
|
|
|
206
215
|
|
|
207
216
|
tax : typing.Optional[WorkOrderTaxCreateObjectRequestBody]
|
|
208
217
|
|
|
218
|
+
vendor_uuid : typing.Optional[str]
|
|
219
|
+
The vendor UUID for the work order.
|
|
220
|
+
|
|
209
221
|
request_options : typing.Optional[RequestOptions]
|
|
210
222
|
Request-specific configuration.
|
|
211
223
|
|
|
@@ -233,11 +245,14 @@ class WorkOrdersClient:
|
|
|
233
245
|
discount=discount,
|
|
234
246
|
due_at_time=due_at_time,
|
|
235
247
|
engine_hours=engine_hours,
|
|
248
|
+
invoice_number=invoice_number,
|
|
236
249
|
items=items,
|
|
237
250
|
odometer_meters=odometer_meters,
|
|
251
|
+
po_number=po_number,
|
|
238
252
|
priority=priority,
|
|
239
253
|
service_task_instances=service_task_instances,
|
|
240
254
|
tax=tax,
|
|
255
|
+
vendor_uuid=vendor_uuid,
|
|
241
256
|
request_options=request_options,
|
|
242
257
|
)
|
|
243
258
|
return _response.data
|
|
@@ -629,11 +644,14 @@ class AsyncWorkOrdersClient:
|
|
|
629
644
|
discount: typing.Optional[WorkOrderDiscountObjectRequestBody] = OMIT,
|
|
630
645
|
due_at_time: typing.Optional[dt.datetime] = OMIT,
|
|
631
646
|
engine_hours: typing.Optional[int] = OMIT,
|
|
647
|
+
invoice_number: typing.Optional[str] = OMIT,
|
|
632
648
|
items: typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]] = OMIT,
|
|
633
649
|
odometer_meters: typing.Optional[int] = OMIT,
|
|
650
|
+
po_number: typing.Optional[str] = OMIT,
|
|
634
651
|
priority: typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority] = OMIT,
|
|
635
652
|
service_task_instances: typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]] = OMIT,
|
|
636
653
|
tax: typing.Optional[WorkOrderTaxCreateObjectRequestBody] = OMIT,
|
|
654
|
+
vendor_uuid: typing.Optional[str] = OMIT,
|
|
637
655
|
request_options: typing.Optional[RequestOptions] = None,
|
|
638
656
|
) -> WorkOrdersPostWorkOrdersResponseBody:
|
|
639
657
|
"""
|
|
@@ -668,12 +686,18 @@ class AsyncWorkOrdersClient:
|
|
|
668
686
|
engine_hours : typing.Optional[int]
|
|
669
687
|
The engine hours at the time of the work order. Will default to current asset reading if unset.
|
|
670
688
|
|
|
689
|
+
invoice_number : typing.Optional[str]
|
|
690
|
+
The invoice number for the work order.
|
|
691
|
+
|
|
671
692
|
items : typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]]
|
|
672
693
|
Items related to the work order.
|
|
673
694
|
|
|
674
695
|
odometer_meters : typing.Optional[int]
|
|
675
696
|
The odometer reading at the time of the work order. Will default to current asset reading if unset.
|
|
676
697
|
|
|
698
|
+
po_number : typing.Optional[str]
|
|
699
|
+
The purchase order number for the work order.
|
|
700
|
+
|
|
677
701
|
priority : typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority]
|
|
678
702
|
The priority of the work order Valid values: `High`, `Low`, `Medium`, `Urgent`
|
|
679
703
|
|
|
@@ -682,6 +706,9 @@ class AsyncWorkOrdersClient:
|
|
|
682
706
|
|
|
683
707
|
tax : typing.Optional[WorkOrderTaxCreateObjectRequestBody]
|
|
684
708
|
|
|
709
|
+
vendor_uuid : typing.Optional[str]
|
|
710
|
+
The vendor UUID for the work order.
|
|
711
|
+
|
|
685
712
|
request_options : typing.Optional[RequestOptions]
|
|
686
713
|
Request-specific configuration.
|
|
687
714
|
|
|
@@ -717,11 +744,14 @@ class AsyncWorkOrdersClient:
|
|
|
717
744
|
discount=discount,
|
|
718
745
|
due_at_time=due_at_time,
|
|
719
746
|
engine_hours=engine_hours,
|
|
747
|
+
invoice_number=invoice_number,
|
|
720
748
|
items=items,
|
|
721
749
|
odometer_meters=odometer_meters,
|
|
750
|
+
po_number=po_number,
|
|
722
751
|
priority=priority,
|
|
723
752
|
service_task_instances=service_task_instances,
|
|
724
753
|
tax=tax,
|
|
754
|
+
vendor_uuid=vendor_uuid,
|
|
725
755
|
request_options=request_options,
|
|
726
756
|
)
|
|
727
757
|
return _response.data
|
|
@@ -371,11 +371,14 @@ class RawWorkOrdersClient:
|
|
|
371
371
|
discount: typing.Optional[WorkOrderDiscountObjectRequestBody] = OMIT,
|
|
372
372
|
due_at_time: typing.Optional[dt.datetime] = OMIT,
|
|
373
373
|
engine_hours: typing.Optional[int] = OMIT,
|
|
374
|
+
invoice_number: typing.Optional[str] = OMIT,
|
|
374
375
|
items: typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]] = OMIT,
|
|
375
376
|
odometer_meters: typing.Optional[int] = OMIT,
|
|
377
|
+
po_number: typing.Optional[str] = OMIT,
|
|
376
378
|
priority: typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority] = OMIT,
|
|
377
379
|
service_task_instances: typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]] = OMIT,
|
|
378
380
|
tax: typing.Optional[WorkOrderTaxCreateObjectRequestBody] = OMIT,
|
|
381
|
+
vendor_uuid: typing.Optional[str] = OMIT,
|
|
379
382
|
request_options: typing.Optional[RequestOptions] = None,
|
|
380
383
|
) -> HttpResponse[WorkOrdersPostWorkOrdersResponseBody]:
|
|
381
384
|
"""
|
|
@@ -410,12 +413,18 @@ class RawWorkOrdersClient:
|
|
|
410
413
|
engine_hours : typing.Optional[int]
|
|
411
414
|
The engine hours at the time of the work order. Will default to current asset reading if unset.
|
|
412
415
|
|
|
416
|
+
invoice_number : typing.Optional[str]
|
|
417
|
+
The invoice number for the work order.
|
|
418
|
+
|
|
413
419
|
items : typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]]
|
|
414
420
|
Items related to the work order.
|
|
415
421
|
|
|
416
422
|
odometer_meters : typing.Optional[int]
|
|
417
423
|
The odometer reading at the time of the work order. Will default to current asset reading if unset.
|
|
418
424
|
|
|
425
|
+
po_number : typing.Optional[str]
|
|
426
|
+
The purchase order number for the work order.
|
|
427
|
+
|
|
419
428
|
priority : typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority]
|
|
420
429
|
The priority of the work order Valid values: `High`, `Low`, `Medium`, `Urgent`
|
|
421
430
|
|
|
@@ -424,6 +433,9 @@ class RawWorkOrdersClient:
|
|
|
424
433
|
|
|
425
434
|
tax : typing.Optional[WorkOrderTaxCreateObjectRequestBody]
|
|
426
435
|
|
|
436
|
+
vendor_uuid : typing.Optional[str]
|
|
437
|
+
The vendor UUID for the work order.
|
|
438
|
+
|
|
427
439
|
request_options : typing.Optional[RequestOptions]
|
|
428
440
|
Request-specific configuration.
|
|
429
441
|
|
|
@@ -445,10 +457,12 @@ class RawWorkOrdersClient:
|
|
|
445
457
|
),
|
|
446
458
|
"dueAtTime": due_at_time,
|
|
447
459
|
"engineHours": engine_hours,
|
|
460
|
+
"invoiceNumber": invoice_number,
|
|
448
461
|
"items": convert_and_respect_annotation_metadata(
|
|
449
462
|
object_=items, annotation=typing.Sequence[WorkOrderItemObjectRequestBody], direction="write"
|
|
450
463
|
),
|
|
451
464
|
"odometerMeters": odometer_meters,
|
|
465
|
+
"poNumber": po_number,
|
|
452
466
|
"priority": priority,
|
|
453
467
|
"serviceTaskInstances": convert_and_respect_annotation_metadata(
|
|
454
468
|
object_=service_task_instances,
|
|
@@ -458,6 +472,7 @@ class RawWorkOrdersClient:
|
|
|
458
472
|
"tax": convert_and_respect_annotation_metadata(
|
|
459
473
|
object_=tax, annotation=WorkOrderTaxCreateObjectRequestBody, direction="write"
|
|
460
474
|
),
|
|
475
|
+
"vendorUuid": vendor_uuid,
|
|
461
476
|
},
|
|
462
477
|
headers={
|
|
463
478
|
"content-type": "application/json",
|
|
@@ -1480,11 +1495,14 @@ class AsyncRawWorkOrdersClient:
|
|
|
1480
1495
|
discount: typing.Optional[WorkOrderDiscountObjectRequestBody] = OMIT,
|
|
1481
1496
|
due_at_time: typing.Optional[dt.datetime] = OMIT,
|
|
1482
1497
|
engine_hours: typing.Optional[int] = OMIT,
|
|
1498
|
+
invoice_number: typing.Optional[str] = OMIT,
|
|
1483
1499
|
items: typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]] = OMIT,
|
|
1484
1500
|
odometer_meters: typing.Optional[int] = OMIT,
|
|
1501
|
+
po_number: typing.Optional[str] = OMIT,
|
|
1485
1502
|
priority: typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority] = OMIT,
|
|
1486
1503
|
service_task_instances: typing.Optional[typing.Sequence[ServiceTaskInstanceInputObjectRequestBody]] = OMIT,
|
|
1487
1504
|
tax: typing.Optional[WorkOrderTaxCreateObjectRequestBody] = OMIT,
|
|
1505
|
+
vendor_uuid: typing.Optional[str] = OMIT,
|
|
1488
1506
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1489
1507
|
) -> AsyncHttpResponse[WorkOrdersPostWorkOrdersResponseBody]:
|
|
1490
1508
|
"""
|
|
@@ -1519,12 +1537,18 @@ class AsyncRawWorkOrdersClient:
|
|
|
1519
1537
|
engine_hours : typing.Optional[int]
|
|
1520
1538
|
The engine hours at the time of the work order. Will default to current asset reading if unset.
|
|
1521
1539
|
|
|
1540
|
+
invoice_number : typing.Optional[str]
|
|
1541
|
+
The invoice number for the work order.
|
|
1542
|
+
|
|
1522
1543
|
items : typing.Optional[typing.Sequence[WorkOrderItemObjectRequestBody]]
|
|
1523
1544
|
Items related to the work order.
|
|
1524
1545
|
|
|
1525
1546
|
odometer_meters : typing.Optional[int]
|
|
1526
1547
|
The odometer reading at the time of the work order. Will default to current asset reading if unset.
|
|
1527
1548
|
|
|
1549
|
+
po_number : typing.Optional[str]
|
|
1550
|
+
The purchase order number for the work order.
|
|
1551
|
+
|
|
1528
1552
|
priority : typing.Optional[WorkOrdersPostWorkOrdersRequestBodyPriority]
|
|
1529
1553
|
The priority of the work order Valid values: `High`, `Low`, `Medium`, `Urgent`
|
|
1530
1554
|
|
|
@@ -1533,6 +1557,9 @@ class AsyncRawWorkOrdersClient:
|
|
|
1533
1557
|
|
|
1534
1558
|
tax : typing.Optional[WorkOrderTaxCreateObjectRequestBody]
|
|
1535
1559
|
|
|
1560
|
+
vendor_uuid : typing.Optional[str]
|
|
1561
|
+
The vendor UUID for the work order.
|
|
1562
|
+
|
|
1536
1563
|
request_options : typing.Optional[RequestOptions]
|
|
1537
1564
|
Request-specific configuration.
|
|
1538
1565
|
|
|
@@ -1554,10 +1581,12 @@ class AsyncRawWorkOrdersClient:
|
|
|
1554
1581
|
),
|
|
1555
1582
|
"dueAtTime": due_at_time,
|
|
1556
1583
|
"engineHours": engine_hours,
|
|
1584
|
+
"invoiceNumber": invoice_number,
|
|
1557
1585
|
"items": convert_and_respect_annotation_metadata(
|
|
1558
1586
|
object_=items, annotation=typing.Sequence[WorkOrderItemObjectRequestBody], direction="write"
|
|
1559
1587
|
),
|
|
1560
1588
|
"odometerMeters": odometer_meters,
|
|
1589
|
+
"poNumber": po_number,
|
|
1561
1590
|
"priority": priority,
|
|
1562
1591
|
"serviceTaskInstances": convert_and_respect_annotation_metadata(
|
|
1563
1592
|
object_=service_task_instances,
|
|
@@ -1567,6 +1596,7 @@ class AsyncRawWorkOrdersClient:
|
|
|
1567
1596
|
"tax": convert_and_respect_annotation_metadata(
|
|
1568
1597
|
object_=tax, annotation=WorkOrderTaxCreateObjectRequestBody, direction="write"
|
|
1569
1598
|
),
|
|
1599
|
+
"vendorUuid": vendor_uuid,
|
|
1570
1600
|
},
|
|
1571
1601
|
headers={
|
|
1572
1602
|
"content-type": "application/json",
|
|
@@ -58,7 +58,7 @@ samsara/contacts/client.py,sha256=cjWeQqB4KnyZ1kP8wJKIsVIP6y8v3c5aUl0tRwt-XHY,20
|
|
|
58
58
|
samsara/contacts/raw_client.py,sha256=fYgYXyCONzUxCB95APJ5KtoR8pmoPtPXz1DuXXhybpI,25991
|
|
59
59
|
samsara/core/__init__.py,sha256=LS5PHdFxqIeDNAKS0etuTxkpIkpm7Xi6gnJhhaUK49Q,3774
|
|
60
60
|
samsara/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
|
|
61
|
-
samsara/core/client_wrapper.py,sha256=
|
|
61
|
+
samsara/core/client_wrapper.py,sha256=6tuISsrIS0dR_yLtrW86ewtOtuMJ3wmSRerxttOuCgE,2817
|
|
62
62
|
samsara/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
63
63
|
samsara/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
64
64
|
samsara/core/force_multipart.py,sha256=cH981xLy0kZVKiZZkFoeUjgJ2Zuq7KXB2aRAnmHzRDc,477
|
|
@@ -3420,8 +3420,8 @@ samsara/webhooks/types/webhooks_patch_webhook_request_body_version.py,sha256=WaQ
|
|
|
3420
3420
|
samsara/webhooks/types/webhooks_post_webhooks_request_body_event_types_item.py,sha256=v7_qY5x4VzDTzf683x2-VUCDwSr2ZK_9EPZ9fXGShq4,995
|
|
3421
3421
|
samsara/webhooks/types/webhooks_post_webhooks_request_body_version.py,sha256=1HR1l6_Qc_jS_mf_UkguxgMiiIeAiwaX7jjOTQfG1bw,224
|
|
3422
3422
|
samsara/work_orders/__init__.py,sha256=hBumunkSPD3sPI2oDCb1mI_BqyRO--F7gXjFSbLtwdY,2011
|
|
3423
|
-
samsara/work_orders/client.py,sha256=
|
|
3424
|
-
samsara/work_orders/raw_client.py,sha256=
|
|
3423
|
+
samsara/work_orders/client.py,sha256=hByqn-xRfkZF-W5px9ylVXMXo5wW1hL9y7wCZboVPvk,44419
|
|
3424
|
+
samsara/work_orders/raw_client.py,sha256=4w3zGI3lqMOMQVJN2jI0yDpcezIKoDS63Nzzv717TNc,105510
|
|
3425
3425
|
samsara/work_orders/types/__init__.py,sha256=9N3SMYZWbaJYpc_QeqSYR9PbxWeQS7B0bu7aPuR2mv8,2608
|
|
3426
3426
|
samsara/work_orders/types/stream_work_orders_request_work_order_statuses_item.py,sha256=aRxVZpRcgso3-807FMcVRrtxCUuzAxh-jvmO9m336i4,377
|
|
3427
3427
|
samsara/work_orders/types/work_orders_patch_work_orders_request_body_category.py,sha256=N_fipIxqD6g8OFEmUXOpHy4tILtR94Z13eOPWlhiwXA,254
|
|
@@ -3429,7 +3429,7 @@ samsara/work_orders/types/work_orders_patch_work_orders_request_body_priority.py
|
|
|
3429
3429
|
samsara/work_orders/types/work_orders_patch_work_orders_request_body_status.py,sha256=HCbiTTKvZhHCnsfipa-7_u4ZXx1uToFt4cEljXUd9l8,375
|
|
3430
3430
|
samsara/work_orders/types/work_orders_post_work_orders_request_body_category.py,sha256=f4ymEFlM2n2Rl4RTq8HCmJLfjiiFV25meugT2WscLys,253
|
|
3431
3431
|
samsara/work_orders/types/work_orders_post_work_orders_request_body_priority.py,sha256=5XQBG4kltC3s19wLXysQlPTK_h82LG5RszQSxk1hd14,208
|
|
3432
|
-
samsara_api-4.1.
|
|
3433
|
-
samsara_api-4.1.
|
|
3434
|
-
samsara_api-4.1.
|
|
3435
|
-
samsara_api-4.1.
|
|
3432
|
+
samsara_api-4.1.1.dist-info/LICENSE,sha256=uX-nl5hOEHp4uvQPCcpde-doNbQhV5uRQNwkB474IoQ,1064
|
|
3433
|
+
samsara_api-4.1.1.dist-info/METADATA,sha256=M2kE5gazGokL_MXU6UWgmH6dMeMYQBoIURiKoBUdbDg,18974
|
|
3434
|
+
samsara_api-4.1.1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
3435
|
+
samsara_api-4.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|