kurjerzy: Add big boy 50pcs package

master
informatic 2020-04-28 17:26:23 +02:00
parent e8700afd29
commit 39745971ff
1 changed files with 26 additions and 11 deletions

View File

@ -64,6 +64,31 @@ class Kurjerzy:
street = street_number
street_number = ''
if model.faceshield_full_delivered == 50:
params = {
'packageType': 'TYPE_PARCEL',
'weight': 7,
'width': 45,
'height': 35,
'length': 30,
'declareValue': 200,
'content': 'przyłbice dla medyków',
'packingType': 'TYPE_STANDARD',
'count': 1,
}
else:
params = {
'packageType': 'TYPE_PARCEL',
'weight': 4,
'width': 40,
'height': 30,
'length': 20,
'declareValue': 100,
'content': 'przyłbice dla medyków',
'packingType': 'TYPE_STANDARD',
'count': 1,
}
result = self.send_query('''
mutation ($recipient: AddressInput, $sender: AddressInput, $refer: String, $params: ParamsInput, $services: ServicesInput) {
createShipment(
@ -103,17 +128,7 @@ class Kurjerzy:
'country': 'PL',
},
'refer': str(model.id),
'params': {
'packageType': 'TYPE_PARCEL',
'weight': 4,
'width': 40,
'height': 30,
'length': 20,
'declareValue': 100,
'content': 'przyłbice dla medyków',
'packingType': 'TYPE_STANDARD',
'count': 1,
},
'params': params,
'services': {
'cod': 0,
'codValue': 0,