layrz-sdk 4.0.15__py3-none-any.whl → 4.0.17__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.

Potentially problematic release.


This version of layrz-sdk might be problematic. Click here for more details.

@@ -10,8 +10,10 @@ from .asset_contact import AssetContact
10
10
  from .asset_operation_mode import AssetOperationMode
11
11
  from .ats_entry import AtsEntry
12
12
  from .ats_exit_history import AtsExitExecutionHistory
13
+ from .ats_operation import AtsOperation, AtsOperationMovement
13
14
  from .ats_possible_entry import AtsPossibleEntry
14
15
  from .ats_possible_exit import AtsPossibleExit
16
+ from .ats_purchaseorder import AtsPurchaseOrder, DeliveryCategories, OrderCategories, OrderStatus
15
17
  from .ats_reception import AtsReception
16
18
  from .broadcast import (
17
19
  BroadcastPayload,
@@ -208,4 +210,10 @@ __all__ = [
208
210
  'WaypointKind',
209
211
  'WaypointRef',
210
212
  'Weekday',
213
+ 'AtsPurchaseOrder',
214
+ 'DeliveryCategories',
215
+ 'OrderCategories',
216
+ 'OrderStatus',
217
+ 'AtsOperationMovement',
218
+ 'AtsOperation',
211
219
  ]
@@ -0,0 +1,47 @@
1
+ """Entry entity"""
2
+
3
+ from datetime import datetime
4
+ from enum import StrEnum
5
+
6
+ from pydantic import BaseModel, Field
7
+
8
+ from .ats_purchaseorder import AtsPurchaseOrder, DeliveryCategories, OrderCategories, OrderStatus
9
+
10
+
11
+ class AtsOperationMovement(BaseModel):
12
+ """Ats operation movement entity"""
13
+
14
+ model_config = {
15
+ 'json_encoders': {
16
+ datetime: lambda v: v.timestamp(),
17
+ OrderStatus: lambda v: v.value,
18
+ },
19
+ }
20
+ pk: int = Field(description='Defines the primary key of the Function', alias='id')
21
+ status: OrderStatus = Field(..., description='Current status of the order')
22
+ created_at: datetime = Field(description='Timestamp when the operation movement was created')
23
+ asset_id: int | None = Field(description='ID of the asset', default=None)
24
+ operation_id: int = Field(description='ID of the operation')
25
+
26
+
27
+ class AtsOperation(BaseModel):
28
+ """Entry entity"""
29
+
30
+ model_config = {
31
+ 'json_encoders': {
32
+ datetime: lambda v: v.timestamp(),
33
+ OrderStatus: lambda v: v.value,
34
+ OrderCategories: lambda v: v.value,
35
+ DeliveryCategories: lambda v: v.value,
36
+ },
37
+ }
38
+ pk: int = Field(description='Defines the primary key of the Function', alias='id')
39
+ purchased_at: datetime = Field(description='Timestamp when the operation was purchased')
40
+ order_status: OrderStatus = Field(..., description='Current status of the order')
41
+ category: OrderCategories = Field(..., description='Category of the operation')
42
+ deliver_category: DeliveryCategories = Field(..., description='Delivery category of the operation')
43
+ seller_asset_id: int = Field(description='ID of the seller asset')
44
+ transport_asset_id: int = Field(description='ID of the transport asset')
45
+ finished_at: datetime | None = Field(description='Timestamp when the operation was finished', default=None)
46
+ history: list[AtsOperationMovement] = Field(description='List of operation movements')
47
+ purchase_orders: list[AtsPurchaseOrder] = Field(description='List of purchase orders')
@@ -24,6 +24,4 @@ class AtsPossibleEntry(BaseModel):
24
24
  )
25
25
  is_ready_by_reception: bool | None = Field(description='Indicates if the entry is ready by reception', default=False)
26
26
  false_positive_count: int = Field(description='Count of false positives for the entry', default=0)
27
- reception_id: int | None = Field(
28
- description='Reception ID associated with the entry', default=None, alias='receptionId'
29
- )
27
+ reception_id: int | None = Field(description='Reception ID associated with the entry', default=None)
@@ -0,0 +1,65 @@
1
+ """Entry entity"""
2
+
3
+ from datetime import datetime
4
+ from enum import StrEnum
5
+
6
+ from pydantic import BaseModel, Field
7
+
8
+
9
+ class OrderStatus(StrEnum):
10
+ GENERATED = 'GENERATED'
11
+ IN_TRANSIT = 'IN_TRANSIT'
12
+ WAITING_TO_DISPATCH = 'WAITING_TO_DISPATCH' # For trucks
13
+ DELIVERED = 'DELIVERED'
14
+ # For the purchase order status in the port
15
+ READY_TO_OPERATE = 'READY_TO_OPERATE'
16
+ UNLOADING_OPERATION = 'UNLOADING_OPERATION'
17
+ UNLOADING_FUEL = 'UNLOADING_FUEL'
18
+ UNLOADING_FUEL_INTERRUPTED = 'UNLOADING_FUEL_INTERRUPTED'
19
+ DESTINATION_BERTH_EXIT = 'DESTINATION_BERTH_EXIT'
20
+ ORIGIN_BERTH_EXIT = 'ORIGIN_BERTH_EXIT'
21
+
22
+
23
+ class OrderCategories(StrEnum):
24
+ PICKUP = 'PICKUP'
25
+ PICKUP_TO_SUPPLIER = 'PICKUP_TO_SUPPLIER'
26
+ TRANSFER = 'TRANSFER'
27
+ DELIVERY_TO_SUPPLIER = 'DELIVERY_TO_SUPPLIER'
28
+ DELIVERY_TO_RESELLER = 'DELIVERY_TO_RESELLER'
29
+ FOR_SALE_OUTSIDE = 'FOR_SALE_OUTSIDE'
30
+ DELIVERY_TO_STORAGE = 'DELIVERY_TO_STORAGE'
31
+ RETURN_FROM_STORAGE = 'RETURN_FROM_STORAGE'
32
+ NOT_DEFINED = 'NOT_DEFINED'
33
+
34
+
35
+ class DeliveryCategories(StrEnum):
36
+ SAME_STATE = 'SAME_STATE'
37
+ OTHER_STATE = 'OTHER_STATE'
38
+ NOT_DEFINED = 'NOT_DEFINED'
39
+
40
+
41
+ class AtsPurchaseOrder(BaseModel):
42
+ """Entry entity"""
43
+
44
+ model_config = {
45
+ 'json_encoders': {
46
+ datetime: lambda v: v.timestamp(),
47
+ OrderStatus: lambda v: v.value,
48
+ OrderCategories: lambda v: v.value,
49
+ DeliveryCategories: lambda v: v.value,
50
+ },
51
+ }
52
+ pk: int = Field(description='Defines the primary key of the Function', alias='id')
53
+ purchased_at: datetime = Field(description='Timestamp when the operation was purchased')
54
+ order_status: OrderStatus = Field(..., description='Current status of the order')
55
+ order_id: int = Field(description='ID of the order')
56
+ category: OrderCategories | None = Field(description='Category of the operation', default=None)
57
+ deliver_category: DeliveryCategories | None = Field(description='Delivery category of the operation', default=None)
58
+ seller_asset_id: int = Field(description='ID of the seller asset')
59
+ transport_asset_id: int | None = Field(description='ID of the transport asset', default=None)
60
+ asset_id: int = Field(description='ID of the asset')
61
+ delivered_at: datetime | None = Field(description='Timestamp when the operation was delivered', default=None)
62
+ eta: datetime | None = Field(description='Estimated time of arrival to the destination', default=None)
63
+ eta_updated_at: datetime | None = Field(description='Timestamp when the ETA was last updated', default=None)
64
+ invoice_type: str = Field(description='Type of the invoice')
65
+ operation_id: int | None = Field(description='ID of the operation', default=None)
@@ -10,7 +10,7 @@ from layrz_sdk.constants import UTC
10
10
  class AtsReception(BaseModel):
11
11
  """AtsReception entity"""
12
12
 
13
- pk: int = Field(description='Defines the primary key of the AtsReception')
13
+ pk: int = Field(description='Defines the primary key of the AtsReception', alias='id')
14
14
  volume_bought: float = Field(
15
15
  description='Volume bought in liters',
16
16
  default=0.0,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: layrz-sdk
3
- Version: 4.0.15
3
+ Version: 4.0.17
4
4
  Summary: Layrz SDK for Python
5
5
  Author-email: "Golden M, Inc." <software@goldenm.com>
6
6
  Maintainer-email: Kenny Mochizuki <kenny@goldenm.com>, Luis Reyes <lreyes@goldenm.com>, Kasen Li <kli@goldenm.com>, Miguel Zauzich <miguel@goldenm.com>, Angel Prieto <aprieto@goldenm.com>
@@ -3,7 +3,7 @@ layrz_sdk/constants.py,sha256=guXfIsVAcex76OEMv6DAJy1km1A_WUfWJuUO2Lo3kXE,344
3
3
  layrz_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  layrz_sdk/decorators/__init__.py,sha256=btoa1egRuYFWggsnfXprvCnxBN9Oq8pbRGcRUR2lm10,82
5
5
  layrz_sdk/decorators/func_timing.py,sha256=xRZrWv13ppS8wDy8DeMSNwH21soXGg-i1lOkSzsJ0c8,2196
6
- layrz_sdk/entities/__init__.py,sha256=toGC5cRVz6EFjSkCDd278gceO71I_ITXFjT_cAF0jjc,6125
6
+ layrz_sdk/entities/__init__.py,sha256=OFMwCCEUErBl5PWo8sO_vhBBalgk5sDfEn7RefNcm_8,6413
7
7
  layrz_sdk/entities/action.py,sha256=cbyrfeBsUpdv5ipMtIDvFNJj-FE6whPt7I22BnEZ2sU,2020
8
8
  layrz_sdk/entities/action_geofence_ownership.py,sha256=xP_JG2qY7ogJtbCv-jE1xWAdc2oA0icoRIOAI6acicA,590
9
9
  layrz_sdk/entities/action_kind.py,sha256=2PR4MesAyKssdWAwOGE4hYfzyhGd9pW78H9rlyXu28Q,1189
@@ -14,9 +14,11 @@ layrz_sdk/entities/asset_contact.py,sha256=ptxItpob4VdQeM6qMUtSZgZxBw5DfKp3kVfBV
14
14
  layrz_sdk/entities/asset_operation_mode.py,sha256=umvmRb8W3kEDUd9dqyKhJ745xe3wssNjPw8gGGcKYO8,551
15
15
  layrz_sdk/entities/ats_entry.py,sha256=wtrw3F9Pkirn0uGIvWyxbSqf36GWu2CRfqXuc5legmQ,669
16
16
  layrz_sdk/entities/ats_exit_history.py,sha256=qfeOQcMQqoGEYk0Tp1Oe5K7M_nld7JxpX09rPUQl7hc,1457
17
- layrz_sdk/entities/ats_possible_entry.py,sha256=M3eWsKvzE4V2YdP2udB5Kih_8hSHw923jG16YYT_gtw,1461
17
+ layrz_sdk/entities/ats_operation.py,sha256=948SXvDOdBeh4Qi3vMNNV9Q50V-XtaQxnW4ls0oDjlQ,1973
18
+ layrz_sdk/entities/ats_possible_entry.py,sha256=Z6gcGyzX0XTYoTQvFDeN2ggkyjBDiX-3L-L_5EnzcUY,1432
18
19
  layrz_sdk/entities/ats_possible_exit.py,sha256=gCibHlXicrs7dsACVWIBZ-I7RqEbdbKJQllxkjHNHoY,1822
19
- layrz_sdk/entities/ats_reception.py,sha256=DuZSsH92wP3cJE-q6g2hxyd4d-tN06hruS6P1pg2FBY,946
20
+ layrz_sdk/entities/ats_purchaseorder.py,sha256=4zT59cIbJ45706jRnyASQP6J-q8PWaZ0vJB0J-ibEeE,2615
21
+ layrz_sdk/entities/ats_reception.py,sha256=1zzeUvUqSCYP1cBlBNWNgOrdBQ-5SUky2tuA5_EYiKI,958
20
22
  layrz_sdk/entities/case.py,sha256=4ufVTeVRNpLOe0cx2vUWLsraP4mePq8gNl8mt7-XFPo,1782
21
23
  layrz_sdk/entities/case_ignored_status.py,sha256=B7HDz6MAD3lQAab2gx5w6wcG_Yp6DRc2VXpeS2M45fw,429
22
24
  layrz_sdk/entities/case_status.py,sha256=XdlgfOm1OZmHVvlarJuf7CDPPlV80-2koXSSzcdWnt4,355
@@ -111,8 +113,8 @@ layrz_sdk/helpers/__init__.py,sha256=5iW3z2m3jrYhvTfxX-p-QTkR9X9oTKfEsbtVOg9jFFY
111
113
  layrz_sdk/helpers/color.py,sha256=dlpMafbM-4Wd9D9hMbbnZJf4ALkpie_ZmBR2Vz_YCmM,1203
112
114
  layrz_sdk/lcl/__init__.py,sha256=U967AWANkL3u_YVxMNAYlh8jkZ6hqHfStacz7yz6sOA,89
113
115
  layrz_sdk/lcl/core.py,sha256=_3uK05I0iwJl63cVWKxt-qFkq0DWggCj5M680GHH5uQ,25161
114
- layrz_sdk-4.0.15.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
115
- layrz_sdk-4.0.15.dist-info/METADATA,sha256=__cKwSU8gX9k2SXTjHgzFddZ6qRVbXwFdhMQ_aRIay4,2045
116
- layrz_sdk-4.0.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
117
- layrz_sdk-4.0.15.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
118
- layrz_sdk-4.0.15.dist-info/RECORD,,
116
+ layrz_sdk-4.0.17.dist-info/licenses/LICENSE,sha256=d5ZrU--lIPER7QByXDKcrtOTOMk1JvN_9FdYDuoWi7Y,1057
117
+ layrz_sdk-4.0.17.dist-info/METADATA,sha256=ZdYFhN8A6REU7MEBKw8T7_VCAtEWqKMCVt9J7e1BHnM,2045
118
+ layrz_sdk-4.0.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
119
+ layrz_sdk-4.0.17.dist-info/top_level.txt,sha256=yUTMMzfdZ0HDWQH5TaSlFM4xtwmP1fSGxmlL1dmu4l4,10
120
+ layrz_sdk-4.0.17.dist-info/RECORD,,