Subversion Repositories SmartDukaan

Rev

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

Rev 4391 Rev 4630
Line 21... Line 21...
21
  print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
21
  print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
22
  print ''
22
  print ''
23
  print 'Functions:'
23
  print 'Functions:'
24
  print '  Provider getProvider(i64 providerId)'
24
  print '  Provider getProvider(i64 providerId)'
25
  print '   getAllProviders()'
25
  print '   getAllProviders()'
26
  print '  LogisticsInfo getLogisticsEstimation(i64 itemId, string destination_pin)'
26
  print '  LogisticsInfo getLogisticsEstimation(i64 itemId, string destination_pin, DeliveryType type)'
27
  print '  LogisticsInfo getLogisticsInfo(string destination_pincode, i64 item_id, DeliveryType type)'
27
  print '  LogisticsInfo getLogisticsInfo(string destination_pincode, i64 item_id, DeliveryType type)'
28
  print '  string getEmptyAWB(i64 providerId)'
28
  print '  string getEmptyAWB(i64 providerId)'
29
  print '   getShipmentInfo(string awb, i64 providerId)'
29
  print '   getShipmentInfo(string awb, i64 providerId)'
30
  print '  string getDestinationCode(i64 providerId, string pinCode)'
30
  print '  string getDestinationCode(i64 providerId, string pinCode)'
31
  print '  i64 getFreeAwbCount(i64 providerId, string type)'
31
  print '  i64 getFreeAwbCount(i64 providerId, string type)'
Line 92... Line 92...
92
    print 'getAllProviders requires 0 args'
92
    print 'getAllProviders requires 0 args'
93
    sys.exit(1)
93
    sys.exit(1)
94
  pp.pprint(client.getAllProviders())
94
  pp.pprint(client.getAllProviders())
95
 
95
 
96
elif cmd == 'getLogisticsEstimation':
96
elif cmd == 'getLogisticsEstimation':
97
  if len(args) != 2:
97
  if len(args) != 3:
98
    print 'getLogisticsEstimation requires 2 args'
98
    print 'getLogisticsEstimation requires 3 args'
99
    sys.exit(1)
99
    sys.exit(1)
100
  pp.pprint(client.getLogisticsEstimation(eval(args[0]),args[1],))
100
  pp.pprint(client.getLogisticsEstimation(eval(args[0]),args[1],eval(args[2]),))
101
 
101
 
102
elif cmd == 'getLogisticsInfo':
102
elif cmd == 'getLogisticsInfo':
103
  if len(args) != 3:
103
  if len(args) != 3:
104
    print 'getLogisticsInfo requires 3 args'
104
    print 'getLogisticsInfo requires 3 args'
105
    sys.exit(1)
105
    sys.exit(1)