1+ from shipday .bo import PodType
12from shipday .utils .verifiers import verify_instance_of , verify_none_or_instance_of
23from shipday .exeptions .shipday_exeption import ShipdayException
34from shipday .httpclient .shipdayclient import ShipdayClient
@@ -58,7 +59,7 @@ def check_availability(self, *args, pickup_address: Address, delivery_address: A
5859 res = self .httpclient .post (self .AVAILABILITY_PATH , data )
5960 return res
6061
61- def assign (self , * args , order_id :int , service_name : str , tip : float = 0 , estimate_reference = None , ** kwargs ) -> dict :
62+ def assign (self , * args , order_id :int , service_name : str , tip : float = 0 , estimate_reference = None , contactless_delivery : bool = False , pod_types : list [ PodType ] = None , ** kwargs ) -> dict :
6263 verify_instance_of (int , order_id , 'Order id must be integer' )
6364 verify_instance_of ([int , float ], tip , 'Tip must be a number' )
6465 verify_none_or_instance_of (str , estimate_reference , 'Invalid Reference' )
@@ -68,7 +69,9 @@ def assign(self, *args, order_id:int, service_name: str, tip: float = 0, estimat
6869 data = {
6970 'name' : service_name ,
7071 'orderId' : order_id ,
71- 'tip' : tip
72+ 'tip' : tip ,
73+ 'contactlessDelivery' : contactless_delivery ,
74+ 'podTypes' : [pod .value for pod in pod_types ] if pod_types is not None else None
7275 }
7376 if estimate_reference is not None :
7477 data ['estimateReference' ] = estimate_reference
0 commit comments