Subversion Repositories SmartDukaan

Rev

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

Rev 644 Rev 647
Line 14... Line 14...
14
except:
14
except:
15
  fastbinary = None
15
  fastbinary = None
16
 
16
 
17
 
17
 
18
class Iface:
18
class Iface:
19
  def getLogisticsInfo(self, destination_pincode, item_id):
19
  def getLogisticsEstimation(self, itemId, destination_pin):
20
    """
20
    """
-
 
21
    Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
-
 
22
    Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
-
 
23
    is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
-
 
24
    
21
    Parameters:
25
    Parameters:
22
     - destination_pincode
26
     - itemId
23
     - item_id
27
     - destination_pin
24
    """
28
    """
25
    pass
29
    pass
26
 
30
 
27
  def getLogisticsEstimation(self, itemId, destination_pin):
31
  def getLogisticsInfo(self, destination_pincode, item_id):
28
    """
32
    """
-
 
33
    Same as above excpet that an airway bill number is also allocated and returned.
-
 
34
    
29
    Parameters:
35
    Parameters:
30
     - itemId
36
     - destination_pincode
31
     - destination_pin
37
     - item_id
32
    """
38
    """
33
    pass
39
    pass
34
 
40
 
35
  def getEmptyAWB(self, provider_id):
41
  def getEmptyAWB(self, providerId):
36
    """
42
    """
-
 
43
    Returns an unused AWB number for the given provider.
-
 
44
    
37
    Parameters:
45
    Parameters:
38
     - provider_id
46
     - providerId
39
    """
47
    """
40
    pass
48
    pass
41
 
49
 
42
  def getShipmentInfo(self, awb):
50
  def getShipmentInfo(self, awb, providerId):
43
    """
51
    """
-
 
52
    Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
-
 
53
    
44
    Parameters:
54
    Parameters:
45
     - awb
55
     - awb
-
 
56
     - providerId
46
    """
57
    """
47
    pass
58
    pass
48
 
59
 
49
 
60
 
50
class Client(Iface):
61
class Client(Iface):
Line 52... Line 63...
52
    self._iprot = self._oprot = iprot
63
    self._iprot = self._oprot = iprot
53
    if oprot != None:
64
    if oprot != None:
54
      self._oprot = oprot
65
      self._oprot = oprot
55
    self._seqid = 0
66
    self._seqid = 0
56
 
67
 
57
  def getLogisticsInfo(self, destination_pincode, item_id):
68
  def getLogisticsEstimation(self, itemId, destination_pin):
58
    """
69
    """
-
 
70
    Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
-
 
71
    Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
-
 
72
    is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
-
 
73
    
59
    Parameters:
74
    Parameters:
60
     - destination_pincode
75
     - itemId
61
     - item_id
76
     - destination_pin
62
    """
77
    """
63
    self.send_getLogisticsInfo(destination_pincode, item_id)
78
    self.send_getLogisticsEstimation(itemId, destination_pin)
64
    return self.recv_getLogisticsInfo()
79
    return self.recv_getLogisticsEstimation()
65
 
80
 
66
  def send_getLogisticsInfo(self, destination_pincode, item_id):
81
  def send_getLogisticsEstimation(self, itemId, destination_pin):
67
    self._oprot.writeMessageBegin('getLogisticsInfo', TMessageType.CALL, self._seqid)
82
    self._oprot.writeMessageBegin('getLogisticsEstimation', TMessageType.CALL, self._seqid)
68
    args = getLogisticsInfo_args()
83
    args = getLogisticsEstimation_args()
69
    args.destination_pincode = destination_pincode
84
    args.itemId = itemId
70
    args.item_id = item_id
85
    args.destination_pin = destination_pin
71
    args.write(self._oprot)
86
    args.write(self._oprot)
72
    self._oprot.writeMessageEnd()
87
    self._oprot.writeMessageEnd()
73
    self._oprot.trans.flush()
88
    self._oprot.trans.flush()
74
 
89
 
75
  def recv_getLogisticsInfo(self, ):
90
  def recv_getLogisticsEstimation(self, ):
76
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
91
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
77
    if mtype == TMessageType.EXCEPTION:
92
    if mtype == TMessageType.EXCEPTION:
78
      x = TApplicationException()
93
      x = TApplicationException()
79
      x.read(self._iprot)
94
      x.read(self._iprot)
80
      self._iprot.readMessageEnd()
95
      self._iprot.readMessageEnd()
81
      raise x
96
      raise x
82
    result = getLogisticsInfo_result()
97
    result = getLogisticsEstimation_result()
83
    result.read(self._iprot)
98
    result.read(self._iprot)
84
    self._iprot.readMessageEnd()
99
    self._iprot.readMessageEnd()
85
    if result.success != None:
100
    if result.success != None:
86
      return result.success
101
      return result.success
87
    if result.se != None:
102
    if result.se != None:
88
      raise result.se
103
      raise result.se
89
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsInfo failed: unknown result");
104
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
90
 
105
 
91
  def getLogisticsEstimation(self, itemId, destination_pin):
106
  def getLogisticsInfo(self, destination_pincode, item_id):
92
    """
107
    """
-
 
108
    Same as above excpet that an airway bill number is also allocated and returned.
-
 
109
    
93
    Parameters:
110
    Parameters:
94
     - itemId
111
     - destination_pincode
95
     - destination_pin
112
     - item_id
96
    """
113
    """
97
    self.send_getLogisticsEstimation(itemId, destination_pin)
114
    self.send_getLogisticsInfo(destination_pincode, item_id)
98
    return self.recv_getLogisticsEstimation()
115
    return self.recv_getLogisticsInfo()
99
 
116
 
100
  def send_getLogisticsEstimation(self, itemId, destination_pin):
117
  def send_getLogisticsInfo(self, destination_pincode, item_id):
101
    self._oprot.writeMessageBegin('getLogisticsEstimation', TMessageType.CALL, self._seqid)
118
    self._oprot.writeMessageBegin('getLogisticsInfo', TMessageType.CALL, self._seqid)
102
    args = getLogisticsEstimation_args()
119
    args = getLogisticsInfo_args()
103
    args.itemId = itemId
120
    args.destination_pincode = destination_pincode
104
    args.destination_pin = destination_pin
121
    args.item_id = item_id
105
    args.write(self._oprot)
122
    args.write(self._oprot)
106
    self._oprot.writeMessageEnd()
123
    self._oprot.writeMessageEnd()
107
    self._oprot.trans.flush()
124
    self._oprot.trans.flush()
108
 
125
 
109
  def recv_getLogisticsEstimation(self, ):
126
  def recv_getLogisticsInfo(self, ):
110
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
127
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
111
    if mtype == TMessageType.EXCEPTION:
128
    if mtype == TMessageType.EXCEPTION:
112
      x = TApplicationException()
129
      x = TApplicationException()
113
      x.read(self._iprot)
130
      x.read(self._iprot)
114
      self._iprot.readMessageEnd()
131
      self._iprot.readMessageEnd()
115
      raise x
132
      raise x
116
    result = getLogisticsEstimation_result()
133
    result = getLogisticsInfo_result()
117
    result.read(self._iprot)
134
    result.read(self._iprot)
118
    self._iprot.readMessageEnd()
135
    self._iprot.readMessageEnd()
119
    if result.success != None:
136
    if result.success != None:
120
      return result.success
137
      return result.success
121
    if result.se != None:
138
    if result.se != None:
122
      raise result.se
139
      raise result.se
123
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
140
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsInfo failed: unknown result");
124
 
141
 
125
  def getEmptyAWB(self, provider_id):
142
  def getEmptyAWB(self, providerId):
126
    """
143
    """
-
 
144
    Returns an unused AWB number for the given provider.
-
 
145
    
127
    Parameters:
146
    Parameters:
128
     - provider_id
147
     - providerId
129
    """
148
    """
130
    self.send_getEmptyAWB(provider_id)
149
    self.send_getEmptyAWB(providerId)
131
    return self.recv_getEmptyAWB()
150
    return self.recv_getEmptyAWB()
132
 
151
 
133
  def send_getEmptyAWB(self, provider_id):
152
  def send_getEmptyAWB(self, providerId):
134
    self._oprot.writeMessageBegin('getEmptyAWB', TMessageType.CALL, self._seqid)
153
    self._oprot.writeMessageBegin('getEmptyAWB', TMessageType.CALL, self._seqid)
135
    args = getEmptyAWB_args()
154
    args = getEmptyAWB_args()
136
    args.provider_id = provider_id
155
    args.providerId = providerId
137
    args.write(self._oprot)
156
    args.write(self._oprot)
138
    self._oprot.writeMessageEnd()
157
    self._oprot.writeMessageEnd()
139
    self._oprot.trans.flush()
158
    self._oprot.trans.flush()
140
 
159
 
141
  def recv_getEmptyAWB(self, ):
160
  def recv_getEmptyAWB(self, ):
Line 148... Line 167...
148
    result = getEmptyAWB_result()
167
    result = getEmptyAWB_result()
149
    result.read(self._iprot)
168
    result.read(self._iprot)
150
    self._iprot.readMessageEnd()
169
    self._iprot.readMessageEnd()
151
    if result.success != None:
170
    if result.success != None:
152
      return result.success
171
      return result.success
-
 
172
    if result.se != None:
-
 
173
      raise result.se
153
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
174
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
154
 
175
 
155
  def getShipmentInfo(self, awb):
176
  def getShipmentInfo(self, awb, providerId):
156
    """
177
    """
-
 
178
    Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
-
 
179
    
157
    Parameters:
180
    Parameters:
158
     - awb
181
     - awb
-
 
182
     - providerId
159
    """
183
    """
160
    self.send_getShipmentInfo(awb)
184
    self.send_getShipmentInfo(awb, providerId)
161
    return self.recv_getShipmentInfo()
185
    return self.recv_getShipmentInfo()
162
 
186
 
163
  def send_getShipmentInfo(self, awb):
187
  def send_getShipmentInfo(self, awb, providerId):
164
    self._oprot.writeMessageBegin('getShipmentInfo', TMessageType.CALL, self._seqid)
188
    self._oprot.writeMessageBegin('getShipmentInfo', TMessageType.CALL, self._seqid)
165
    args = getShipmentInfo_args()
189
    args = getShipmentInfo_args()
166
    args.awb = awb
190
    args.awb = awb
-
 
191
    args.providerId = providerId
167
    args.write(self._oprot)
192
    args.write(self._oprot)
168
    self._oprot.writeMessageEnd()
193
    self._oprot.writeMessageEnd()
169
    self._oprot.trans.flush()
194
    self._oprot.trans.flush()
170
 
195
 
171
  def recv_getShipmentInfo(self, ):
196
  def recv_getShipmentInfo(self, ):
Line 178... Line 203...
178
    result = getShipmentInfo_result()
203
    result = getShipmentInfo_result()
179
    result.read(self._iprot)
204
    result.read(self._iprot)
180
    self._iprot.readMessageEnd()
205
    self._iprot.readMessageEnd()
181
    if result.success != None:
206
    if result.success != None:
182
      return result.success
207
      return result.success
-
 
208
    if result.se != None:
-
 
209
      raise result.se
183
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
210
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
184
 
211
 
185
 
212
 
186
class Processor(Iface, TProcessor):
213
class Processor(Iface, TProcessor):
187
  def __init__(self, handler):
214
  def __init__(self, handler):
188
    self._handler = handler
215
    self._handler = handler
189
    self._processMap = {}
216
    self._processMap = {}
190
    self._processMap["getLogisticsInfo"] = Processor.process_getLogisticsInfo
-
 
191
    self._processMap["getLogisticsEstimation"] = Processor.process_getLogisticsEstimation
217
    self._processMap["getLogisticsEstimation"] = Processor.process_getLogisticsEstimation
-
 
218
    self._processMap["getLogisticsInfo"] = Processor.process_getLogisticsInfo
192
    self._processMap["getEmptyAWB"] = Processor.process_getEmptyAWB
219
    self._processMap["getEmptyAWB"] = Processor.process_getEmptyAWB
193
    self._processMap["getShipmentInfo"] = Processor.process_getShipmentInfo
220
    self._processMap["getShipmentInfo"] = Processor.process_getShipmentInfo
194
 
221
 
195
  def process(self, iprot, oprot):
222
  def process(self, iprot, oprot):
196
    (name, type, seqid) = iprot.readMessageBegin()
223
    (name, type, seqid) = iprot.readMessageBegin()
Line 205... Line 232...
205
      return
232
      return
206
    else:
233
    else:
207
      self._processMap[name](self, seqid, iprot, oprot)
234
      self._processMap[name](self, seqid, iprot, oprot)
208
    return True
235
    return True
209
 
236
 
210
  def process_getLogisticsInfo(self, seqid, iprot, oprot):
237
  def process_getLogisticsEstimation(self, seqid, iprot, oprot):
211
    args = getLogisticsInfo_args()
238
    args = getLogisticsEstimation_args()
212
    args.read(iprot)
239
    args.read(iprot)
213
    iprot.readMessageEnd()
240
    iprot.readMessageEnd()
214
    result = getLogisticsInfo_result()
241
    result = getLogisticsEstimation_result()
215
    try:
242
    try:
216
      result.success = self._handler.getLogisticsInfo(args.destination_pincode, args.item_id)
243
      result.success = self._handler.getLogisticsEstimation(args.itemId, args.destination_pin)
217
    except LogisticsServiceException, se:
244
    except LogisticsServiceException, se:
218
      result.se = se
245
      result.se = se
219
    oprot.writeMessageBegin("getLogisticsInfo", TMessageType.REPLY, seqid)
246
    oprot.writeMessageBegin("getLogisticsEstimation", TMessageType.REPLY, seqid)
220
    result.write(oprot)
247
    result.write(oprot)
221
    oprot.writeMessageEnd()
248
    oprot.writeMessageEnd()
222
    oprot.trans.flush()
249
    oprot.trans.flush()
223
 
250
 
224
  def process_getLogisticsEstimation(self, seqid, iprot, oprot):
251
  def process_getLogisticsInfo(self, seqid, iprot, oprot):
225
    args = getLogisticsEstimation_args()
252
    args = getLogisticsInfo_args()
226
    args.read(iprot)
253
    args.read(iprot)
227
    iprot.readMessageEnd()
254
    iprot.readMessageEnd()
228
    result = getLogisticsEstimation_result()
255
    result = getLogisticsInfo_result()
229
    try:
256
    try:
230
      result.success = self._handler.getLogisticsEstimation(args.itemId, args.destination_pin)
257
      result.success = self._handler.getLogisticsInfo(args.destination_pincode, args.item_id)
231
    except LogisticsServiceException, se:
258
    except LogisticsServiceException, se:
232
      result.se = se
259
      result.se = se
233
    oprot.writeMessageBegin("getLogisticsEstimation", TMessageType.REPLY, seqid)
260
    oprot.writeMessageBegin("getLogisticsInfo", TMessageType.REPLY, seqid)
234
    result.write(oprot)
261
    result.write(oprot)
235
    oprot.writeMessageEnd()
262
    oprot.writeMessageEnd()
236
    oprot.trans.flush()
263
    oprot.trans.flush()
237
 
264
 
238
  def process_getEmptyAWB(self, seqid, iprot, oprot):
265
  def process_getEmptyAWB(self, seqid, iprot, oprot):
239
    args = getEmptyAWB_args()
266
    args = getEmptyAWB_args()
240
    args.read(iprot)
267
    args.read(iprot)
241
    iprot.readMessageEnd()
268
    iprot.readMessageEnd()
242
    result = getEmptyAWB_result()
269
    result = getEmptyAWB_result()
-
 
270
    try:
243
    result.success = self._handler.getEmptyAWB(args.provider_id)
271
      result.success = self._handler.getEmptyAWB(args.providerId)
-
 
272
    except LogisticsServiceException, se:
-
 
273
      result.se = se
244
    oprot.writeMessageBegin("getEmptyAWB", TMessageType.REPLY, seqid)
274
    oprot.writeMessageBegin("getEmptyAWB", TMessageType.REPLY, seqid)
245
    result.write(oprot)
275
    result.write(oprot)
246
    oprot.writeMessageEnd()
276
    oprot.writeMessageEnd()
247
    oprot.trans.flush()
277
    oprot.trans.flush()
248
 
278
 
249
  def process_getShipmentInfo(self, seqid, iprot, oprot):
279
  def process_getShipmentInfo(self, seqid, iprot, oprot):
250
    args = getShipmentInfo_args()
280
    args = getShipmentInfo_args()
251
    args.read(iprot)
281
    args.read(iprot)
252
    iprot.readMessageEnd()
282
    iprot.readMessageEnd()
253
    result = getShipmentInfo_result()
283
    result = getShipmentInfo_result()
-
 
284
    try:
254
    result.success = self._handler.getShipmentInfo(args.awb)
285
      result.success = self._handler.getShipmentInfo(args.awb, args.providerId)
-
 
286
    except LogisticsServiceException, se:
-
 
287
      result.se = se
255
    oprot.writeMessageBegin("getShipmentInfo", TMessageType.REPLY, seqid)
288
    oprot.writeMessageBegin("getShipmentInfo", TMessageType.REPLY, seqid)
256
    result.write(oprot)
289
    result.write(oprot)
257
    oprot.writeMessageEnd()
290
    oprot.writeMessageEnd()
258
    oprot.trans.flush()
291
    oprot.trans.flush()
259
 
292
 
260
 
293
 
261
# HELPER FUNCTIONS AND STRUCTURES
294
# HELPER FUNCTIONS AND STRUCTURES
262
 
295
 
263
class getLogisticsInfo_args:
296
class getLogisticsEstimation_args:
264
  """
297
  """
265
  Attributes:
298
  Attributes:
266
   - destination_pincode
299
   - itemId
267
   - item_id
300
   - destination_pin
268
  """
301
  """
269
 
302
 
270
  thrift_spec = (
303
  thrift_spec = (
271
    None, # 0
304
    None, # 0
272
    (1, TType.STRING, 'destination_pincode', None, None, ), # 1
305
    (1, TType.I64, 'itemId', None, None, ), # 1
273
    (2, TType.STRING, 'item_id', None, None, ), # 2
306
    (2, TType.STRING, 'destination_pin', None, None, ), # 2
274
  )
307
  )
275
 
308
 
276
  def __init__(self, destination_pincode=None, item_id=None,):
309
  def __init__(self, itemId=None, destination_pin=None,):
277
    self.destination_pincode = destination_pincode
310
    self.itemId = itemId
278
    self.item_id = item_id
311
    self.destination_pin = destination_pin
279
 
312
 
280
  def read(self, iprot):
313
  def read(self, iprot):
281
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
314
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
282
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
315
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
283
      return
316
      return
Line 285... Line 318...
285
    while True:
318
    while True:
286
      (fname, ftype, fid) = iprot.readFieldBegin()
319
      (fname, ftype, fid) = iprot.readFieldBegin()
287
      if ftype == TType.STOP:
320
      if ftype == TType.STOP:
288
        break
321
        break
289
      if fid == 1:
322
      if fid == 1:
290
        if ftype == TType.STRING:
323
        if ftype == TType.I64:
291
          self.destination_pincode = iprot.readString();
324
          self.itemId = iprot.readI64();
292
        else:
325
        else:
293
          iprot.skip(ftype)
326
          iprot.skip(ftype)
294
      elif fid == 2:
327
      elif fid == 2:
295
        if ftype == TType.STRING:
328
        if ftype == TType.STRING:
296
          self.item_id = iprot.readString();
329
          self.destination_pin = iprot.readString();
297
        else:
330
        else:
298
          iprot.skip(ftype)
331
          iprot.skip(ftype)
299
      else:
332
      else:
300
        iprot.skip(ftype)
333
        iprot.skip(ftype)
301
      iprot.readFieldEnd()
334
      iprot.readFieldEnd()
Line 303... Line 336...
303
 
336
 
304
  def write(self, oprot):
337
  def write(self, oprot):
305
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
338
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
306
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
339
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
307
      return
340
      return
308
    oprot.writeStructBegin('getLogisticsInfo_args')
341
    oprot.writeStructBegin('getLogisticsEstimation_args')
309
    if self.destination_pincode != None:
342
    if self.itemId != None:
310
      oprot.writeFieldBegin('destination_pincode', TType.STRING, 1)
343
      oprot.writeFieldBegin('itemId', TType.I64, 1)
311
      oprot.writeString(self.destination_pincode)
344
      oprot.writeI64(self.itemId)
312
      oprot.writeFieldEnd()
345
      oprot.writeFieldEnd()
313
    if self.item_id != None:
346
    if self.destination_pin != None:
314
      oprot.writeFieldBegin('item_id', TType.STRING, 2)
347
      oprot.writeFieldBegin('destination_pin', TType.STRING, 2)
315
      oprot.writeString(self.item_id)
348
      oprot.writeString(self.destination_pin)
316
      oprot.writeFieldEnd()
349
      oprot.writeFieldEnd()
317
    oprot.writeFieldStop()
350
    oprot.writeFieldStop()
318
    oprot.writeStructEnd()
351
    oprot.writeStructEnd()
319
 
352
 
320
  def __repr__(self):
353
  def __repr__(self):
Line 326... Line 359...
326
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
359
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
327
 
360
 
328
  def __ne__(self, other):
361
  def __ne__(self, other):
329
    return not (self == other)
362
    return not (self == other)
330
 
363
 
331
class getLogisticsInfo_result:
364
class getLogisticsEstimation_result:
332
  """
365
  """
333
  Attributes:
366
  Attributes:
334
   - success
367
   - success
335
   - se
368
   - se
336
  """
369
  """
Line 372... Line 405...
372
 
405
 
373
  def write(self, oprot):
406
  def write(self, oprot):
374
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
407
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
375
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
408
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
376
      return
409
      return
377
    oprot.writeStructBegin('getLogisticsInfo_result')
410
    oprot.writeStructBegin('getLogisticsEstimation_result')
378
    if self.success != None:
411
    if self.success != None:
379
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
412
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
380
      self.success.write(oprot)
413
      self.success.write(oprot)
381
      oprot.writeFieldEnd()
414
      oprot.writeFieldEnd()
382
    if self.se != None:
415
    if self.se != None:
Line 395... Line 428...
395
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
428
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
396
 
429
 
397
  def __ne__(self, other):
430
  def __ne__(self, other):
398
    return not (self == other)
431
    return not (self == other)
399
 
432
 
400
class getLogisticsEstimation_args:
433
class getLogisticsInfo_args:
401
  """
434
  """
402
  Attributes:
435
  Attributes:
403
   - itemId
436
   - destination_pincode
404
   - destination_pin
437
   - item_id
405
  """
438
  """
406
 
439
 
407
  thrift_spec = (
440
  thrift_spec = (
408
    None, # 0
441
    None, # 0
409
    (1, TType.I64, 'itemId', None, None, ), # 1
442
    (1, TType.STRING, 'destination_pincode', None, None, ), # 1
410
    (2, TType.STRING, 'destination_pin', None, None, ), # 2
443
    (2, TType.STRING, 'item_id', None, None, ), # 2
411
  )
444
  )
412
 
445
 
413
  def __init__(self, itemId=None, destination_pin=None,):
446
  def __init__(self, destination_pincode=None, item_id=None,):
414
    self.itemId = itemId
447
    self.destination_pincode = destination_pincode
415
    self.destination_pin = destination_pin
448
    self.item_id = item_id
416
 
449
 
417
  def read(self, iprot):
450
  def read(self, iprot):
418
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
451
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
419
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
452
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
420
      return
453
      return
Line 422... Line 455...
422
    while True:
455
    while True:
423
      (fname, ftype, fid) = iprot.readFieldBegin()
456
      (fname, ftype, fid) = iprot.readFieldBegin()
424
      if ftype == TType.STOP:
457
      if ftype == TType.STOP:
425
        break
458
        break
426
      if fid == 1:
459
      if fid == 1:
427
        if ftype == TType.I64:
460
        if ftype == TType.STRING:
428
          self.itemId = iprot.readI64();
461
          self.destination_pincode = iprot.readString();
429
        else:
462
        else:
430
          iprot.skip(ftype)
463
          iprot.skip(ftype)
431
      elif fid == 2:
464
      elif fid == 2:
432
        if ftype == TType.STRING:
465
        if ftype == TType.STRING:
433
          self.destination_pin = iprot.readString();
466
          self.item_id = iprot.readString();
434
        else:
467
        else:
435
          iprot.skip(ftype)
468
          iprot.skip(ftype)
436
      else:
469
      else:
437
        iprot.skip(ftype)
470
        iprot.skip(ftype)
438
      iprot.readFieldEnd()
471
      iprot.readFieldEnd()
Line 440... Line 473...
440
 
473
 
441
  def write(self, oprot):
474
  def write(self, oprot):
442
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
475
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
443
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
476
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
444
      return
477
      return
445
    oprot.writeStructBegin('getLogisticsEstimation_args')
478
    oprot.writeStructBegin('getLogisticsInfo_args')
446
    if self.itemId != None:
479
    if self.destination_pincode != None:
447
      oprot.writeFieldBegin('itemId', TType.I64, 1)
480
      oprot.writeFieldBegin('destination_pincode', TType.STRING, 1)
448
      oprot.writeI64(self.itemId)
481
      oprot.writeString(self.destination_pincode)
449
      oprot.writeFieldEnd()
482
      oprot.writeFieldEnd()
450
    if self.destination_pin != None:
483
    if self.item_id != None:
451
      oprot.writeFieldBegin('destination_pin', TType.STRING, 2)
484
      oprot.writeFieldBegin('item_id', TType.STRING, 2)
452
      oprot.writeString(self.destination_pin)
485
      oprot.writeString(self.item_id)
453
      oprot.writeFieldEnd()
486
      oprot.writeFieldEnd()
454
    oprot.writeFieldStop()
487
    oprot.writeFieldStop()
455
    oprot.writeStructEnd()
488
    oprot.writeStructEnd()
456
 
489
 
457
  def __repr__(self):
490
  def __repr__(self):
Line 463... Line 496...
463
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
496
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
464
 
497
 
465
  def __ne__(self, other):
498
  def __ne__(self, other):
466
    return not (self == other)
499
    return not (self == other)
467
 
500
 
468
class getLogisticsEstimation_result:
501
class getLogisticsInfo_result:
469
  """
502
  """
470
  Attributes:
503
  Attributes:
471
   - success
504
   - success
472
   - se
505
   - se
473
  """
506
  """
Line 509... Line 542...
509
 
542
 
510
  def write(self, oprot):
543
  def write(self, oprot):
511
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
544
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
512
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
545
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
513
      return
546
      return
514
    oprot.writeStructBegin('getLogisticsEstimation_result')
547
    oprot.writeStructBegin('getLogisticsInfo_result')
515
    if self.success != None:
548
    if self.success != None:
516
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
549
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
517
      self.success.write(oprot)
550
      self.success.write(oprot)
518
      oprot.writeFieldEnd()
551
      oprot.writeFieldEnd()
519
    if self.se != None:
552
    if self.se != None:
Line 535... Line 568...
535
    return not (self == other)
568
    return not (self == other)
536
 
569
 
537
class getEmptyAWB_args:
570
class getEmptyAWB_args:
538
  """
571
  """
539
  Attributes:
572
  Attributes:
540
   - provider_id
573
   - providerId
541
  """
574
  """
542
 
575
 
543
  thrift_spec = (
576
  thrift_spec = (
544
    None, # 0
577
    None, # 0
545
    (1, TType.I64, 'provider_id', None, None, ), # 1
578
    (1, TType.I64, 'providerId', None, None, ), # 1
546
  )
579
  )
547
 
580
 
548
  def __init__(self, provider_id=None,):
581
  def __init__(self, providerId=None,):
549
    self.provider_id = provider_id
582
    self.providerId = providerId
550
 
583
 
551
  def read(self, iprot):
584
  def read(self, iprot):
552
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
585
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
553
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
586
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
554
      return
587
      return
Line 557... Line 590...
557
      (fname, ftype, fid) = iprot.readFieldBegin()
590
      (fname, ftype, fid) = iprot.readFieldBegin()
558
      if ftype == TType.STOP:
591
      if ftype == TType.STOP:
559
        break
592
        break
560
      if fid == 1:
593
      if fid == 1:
561
        if ftype == TType.I64:
594
        if ftype == TType.I64:
562
          self.provider_id = iprot.readI64();
595
          self.providerId = iprot.readI64();
563
        else:
596
        else:
564
          iprot.skip(ftype)
597
          iprot.skip(ftype)
565
      else:
598
      else:
566
        iprot.skip(ftype)
599
        iprot.skip(ftype)
567
      iprot.readFieldEnd()
600
      iprot.readFieldEnd()
Line 570... Line 603...
570
  def write(self, oprot):
603
  def write(self, oprot):
571
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
604
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
572
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
605
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
573
      return
606
      return
574
    oprot.writeStructBegin('getEmptyAWB_args')
607
    oprot.writeStructBegin('getEmptyAWB_args')
575
    if self.provider_id != None:
608
    if self.providerId != None:
576
      oprot.writeFieldBegin('provider_id', TType.I64, 1)
609
      oprot.writeFieldBegin('providerId', TType.I64, 1)
577
      oprot.writeI64(self.provider_id)
610
      oprot.writeI64(self.providerId)
578
      oprot.writeFieldEnd()
611
      oprot.writeFieldEnd()
579
    oprot.writeFieldStop()
612
    oprot.writeFieldStop()
580
    oprot.writeStructEnd()
613
    oprot.writeStructEnd()
581
 
614
 
582
  def __repr__(self):
615
  def __repr__(self):
Line 592... Line 625...
592
 
625
 
593
class getEmptyAWB_result:
626
class getEmptyAWB_result:
594
  """
627
  """
595
  Attributes:
628
  Attributes:
596
   - success
629
   - success
-
 
630
   - se
597
  """
631
  """
598
 
632
 
599
  thrift_spec = (
633
  thrift_spec = (
600
    (0, TType.STRING, 'success', None, None, ), # 0
634
    (0, TType.STRING, 'success', None, None, ), # 0
-
 
635
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
601
  )
636
  )
602
 
637
 
603
  def __init__(self, success=None,):
638
  def __init__(self, success=None, se=None,):
604
    self.success = success
639
    self.success = success
-
 
640
    self.se = se
605
 
641
 
606
  def read(self, iprot):
642
  def read(self, iprot):
607
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
643
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
608
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
644
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
609
      return
645
      return
Line 615... Line 651...
615
      if fid == 0:
651
      if fid == 0:
616
        if ftype == TType.STRING:
652
        if ftype == TType.STRING:
617
          self.success = iprot.readString();
653
          self.success = iprot.readString();
618
        else:
654
        else:
619
          iprot.skip(ftype)
655
          iprot.skip(ftype)
-
 
656
      elif fid == 1:
-
 
657
        if ftype == TType.STRUCT:
-
 
658
          self.se = LogisticsServiceException()
-
 
659
          self.se.read(iprot)
-
 
660
        else:
-
 
661
          iprot.skip(ftype)
620
      else:
662
      else:
621
        iprot.skip(ftype)
663
        iprot.skip(ftype)
622
      iprot.readFieldEnd()
664
      iprot.readFieldEnd()
623
    iprot.readStructEnd()
665
    iprot.readStructEnd()
624
 
666
 
Line 629... Line 671...
629
    oprot.writeStructBegin('getEmptyAWB_result')
671
    oprot.writeStructBegin('getEmptyAWB_result')
630
    if self.success != None:
672
    if self.success != None:
631
      oprot.writeFieldBegin('success', TType.STRING, 0)
673
      oprot.writeFieldBegin('success', TType.STRING, 0)
632
      oprot.writeString(self.success)
674
      oprot.writeString(self.success)
633
      oprot.writeFieldEnd()
675
      oprot.writeFieldEnd()
-
 
676
    if self.se != None:
-
 
677
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
-
 
678
      self.se.write(oprot)
-
 
679
      oprot.writeFieldEnd()
634
    oprot.writeFieldStop()
680
    oprot.writeFieldStop()
635
    oprot.writeStructEnd()
681
    oprot.writeStructEnd()
636
 
682
 
637
  def __repr__(self):
683
  def __repr__(self):
638
    L = ['%s=%r' % (key, value)
684
    L = ['%s=%r' % (key, value)
Line 647... Line 693...
647
 
693
 
648
class getShipmentInfo_args:
694
class getShipmentInfo_args:
649
  """
695
  """
650
  Attributes:
696
  Attributes:
651
   - awb
697
   - awb
-
 
698
   - providerId
652
  """
699
  """
653
 
700
 
654
  thrift_spec = (
701
  thrift_spec = (
655
    None, # 0
702
    None, # 0
656
    (1, TType.STRING, 'awb', None, None, ), # 1
703
    (1, TType.STRING, 'awb', None, None, ), # 1
-
 
704
    (2, TType.I64, 'providerId', None, None, ), # 2
657
  )
705
  )
658
 
706
 
659
  def __init__(self, awb=None,):
707
  def __init__(self, awb=None, providerId=None,):
660
    self.awb = awb
708
    self.awb = awb
-
 
709
    self.providerId = providerId
661
 
710
 
662
  def read(self, iprot):
711
  def read(self, iprot):
663
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
712
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
664
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
713
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
665
      return
714
      return
Line 671... Line 720...
671
      if fid == 1:
720
      if fid == 1:
672
        if ftype == TType.STRING:
721
        if ftype == TType.STRING:
673
          self.awb = iprot.readString();
722
          self.awb = iprot.readString();
674
        else:
723
        else:
675
          iprot.skip(ftype)
724
          iprot.skip(ftype)
-
 
725
      elif fid == 2:
-
 
726
        if ftype == TType.I64:
-
 
727
          self.providerId = iprot.readI64();
-
 
728
        else:
-
 
729
          iprot.skip(ftype)
676
      else:
730
      else:
677
        iprot.skip(ftype)
731
        iprot.skip(ftype)
678
      iprot.readFieldEnd()
732
      iprot.readFieldEnd()
679
    iprot.readStructEnd()
733
    iprot.readStructEnd()
680
 
734
 
Line 685... Line 739...
685
    oprot.writeStructBegin('getShipmentInfo_args')
739
    oprot.writeStructBegin('getShipmentInfo_args')
686
    if self.awb != None:
740
    if self.awb != None:
687
      oprot.writeFieldBegin('awb', TType.STRING, 1)
741
      oprot.writeFieldBegin('awb', TType.STRING, 1)
688
      oprot.writeString(self.awb)
742
      oprot.writeString(self.awb)
689
      oprot.writeFieldEnd()
743
      oprot.writeFieldEnd()
-
 
744
    if self.providerId != None:
-
 
745
      oprot.writeFieldBegin('providerId', TType.I64, 2)
-
 
746
      oprot.writeI64(self.providerId)
-
 
747
      oprot.writeFieldEnd()
690
    oprot.writeFieldStop()
748
    oprot.writeFieldStop()
691
    oprot.writeStructEnd()
749
    oprot.writeStructEnd()
692
 
750
 
693
  def __repr__(self):
751
  def __repr__(self):
694
    L = ['%s=%r' % (key, value)
752
    L = ['%s=%r' % (key, value)
Line 703... Line 761...
703
 
761
 
704
class getShipmentInfo_result:
762
class getShipmentInfo_result:
705
  """
763
  """
706
  Attributes:
764
  Attributes:
707
   - success
765
   - success
-
 
766
   - se
708
  """
767
  """
709
 
768
 
710
  thrift_spec = (
769
  thrift_spec = (
711
    (0, TType.LIST, 'success', (TType.STRUCT,(AwbUpdate, AwbUpdate.thrift_spec)), None, ), # 0
770
    (0, TType.LIST, 'success', (TType.STRUCT,(AwbUpdate, AwbUpdate.thrift_spec)), None, ), # 0
-
 
771
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
712
  )
772
  )
713
 
773
 
714
  def __init__(self, success=None,):
774
  def __init__(self, success=None, se=None,):
715
    self.success = success
775
    self.success = success
-
 
776
    self.se = se
716
 
777
 
717
  def read(self, iprot):
778
  def read(self, iprot):
718
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
779
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
719
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
780
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
720
      return
781
      return
Line 732... Line 793...
732
            _elem5.read(iprot)
793
            _elem5.read(iprot)
733
            self.success.append(_elem5)
794
            self.success.append(_elem5)
734
          iprot.readListEnd()
795
          iprot.readListEnd()
735
        else:
796
        else:
736
          iprot.skip(ftype)
797
          iprot.skip(ftype)
-
 
798
      elif fid == 1:
-
 
799
        if ftype == TType.STRUCT:
-
 
800
          self.se = LogisticsServiceException()
-
 
801
          self.se.read(iprot)
-
 
802
        else:
-
 
803
          iprot.skip(ftype)
737
      else:
804
      else:
738
        iprot.skip(ftype)
805
        iprot.skip(ftype)
739
      iprot.readFieldEnd()
806
      iprot.readFieldEnd()
740
    iprot.readStructEnd()
807
    iprot.readStructEnd()
741
 
808
 
Line 749... Line 816...
749
      oprot.writeListBegin(TType.STRUCT, len(self.success))
816
      oprot.writeListBegin(TType.STRUCT, len(self.success))
750
      for iter6 in self.success:
817
      for iter6 in self.success:
751
        iter6.write(oprot)
818
        iter6.write(oprot)
752
      oprot.writeListEnd()
819
      oprot.writeListEnd()
753
      oprot.writeFieldEnd()
820
      oprot.writeFieldEnd()
-
 
821
    if self.se != None:
-
 
822
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
-
 
823
      self.se.write(oprot)
-
 
824
      oprot.writeFieldEnd()
754
    oprot.writeFieldStop()
825
    oprot.writeFieldStop()
755
    oprot.writeStructEnd()
826
    oprot.writeStructEnd()
756
 
827
 
757
  def __repr__(self):
828
  def __repr__(self):
758
    L = ['%s=%r' % (key, value)
829
    L = ['%s=%r' % (key, value)