Subversion Repositories SmartDukaan

Rev

Rev 1504 | Rev 4439 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1504 Rev 3218
Line 5... Line 5...
5
'''
5
'''
6
 
6
 
7
from shop2020.clients.LogisticsClient import LogisticsClient
7
from shop2020.clients.LogisticsClient import LogisticsClient
8
from shop2020.thriftpy.logistics.ttypes import *
8
from shop2020.thriftpy.logistics.ttypes import *
9
import datetime
9
import datetime
-
 
10
from shop2020.logistics.service.impl.DataService import DeliveryEstimate
10
 
11
 
11
 
12
 
12
client = LogisticsClient().get_client()
13
client = LogisticsClient().get_client()
13
 
14
 
14
"""
15
"""
Line 41... Line 42...
41
# Item = 15 (<5000) Pincode = 201301 (Local) serviced by Both, Provider = 2
42
# Item = 15 (<5000) Pincode = 201301 (Local) serviced by Both, Provider = 2
42
# Item = 04 (>5000) Pincode = 201307 (Local) serviced by Both,  Provider = 1
43
# Item = 04 (>5000) Pincode = 201307 (Local) serviced by Both,  Provider = 1
43
# Item = 19 (=5000) Pincode = 201307 (Local) serviced by Both,  Provider = 2
44
# Item = 19 (=5000) Pincode = 201307 (Local) serviced by Both,  Provider = 2
44
 
45
 
45
 
46
 
-
 
47
print client.getLogisticsEstimation(14, "201301") #Provider = 1
46
client.getLogisticsEstimation(14, "125005") #Provider = 1
48
print client.getLogisticsEstimation(14, "332001") #Provider = 1
-
 
49
print client.isCodAllowed("201301")
-
 
50
print client.isCodAllowed("3")
-
 
51
print client.getDestinationCode(1, "201301")
-
 
52
print client.getDestinationCode(1, "332001")
-
 
53
 
47
client.getLogisticsEstimation(02, "125005") #Provider = 1
54
#client.getLogisticsEstimation(02, "125005") #Provider = 1
48
client.getLogisticsEstimation(19, "123106") #Provider = 2
55
#client.getLogisticsEstimation(19, "123106") #Provider = 2
49
client.getLogisticsEstimation(01, "123106") #Provider = 2
56
#client.getLogisticsEstimation(01, "123106") #Provider = 2
50
client.getLogisticsEstimation(14, "834011") #Provider = 2
57
#client.getLogisticsEstimation(14, "834011") #Provider = 2
51
client.getLogisticsEstimation(14, "854305") #Provider = 1
58
#client.getLogisticsEstimation(14, "854305") #Provider = 1
52
client.getLogisticsEstimation(1, "854305") #Provider = 1
59
#client.getLogisticsEstimation(1, "854305") #Provider = 1
53
 
60
#
54
client.getLogisticsEstimation(03, "201301") #Provider = 1
61
#client.getLogisticsEstimation(03, "201301") #Provider = 1
55
client.getLogisticsEstimation(15, "201301") #Provider = 2
62
#client.getLogisticsEstimation(15, "201301") #Provider = 2
56
client.getLogisticsEstimation(04, "201307") #Provider = 1
63
#client.getLogisticsEstimation(04, "201307") #Provider = 1
57
client.getLogisticsEstimation(19, "201307") #Provider = 2
64
#client.getLogisticsEstimation(19, "201307") #Provider = 2