Subversion Repositories SmartDukaan

Rev

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

Rev 4484 Rev 4488
Line 447... Line 447...
447
     - orderId
447
     - orderId
448
     - isAuthorized
448
     - isAuthorized
449
    """
449
    """
450
    pass
450
    pass
451
 
451
 
-
 
452
  def markOrderReturnRequestReceived(self, orderId):
-
 
453
    """
-
 
454
    Once user raise the request for a RET, order status will be changed from DELVIERY_SUCCESS to RET_REQUEST_RECEIVED
-
 
455
 
-
 
456
    Parameters:
-
 
457
     - orderId
-
 
458
    """
-
 
459
    pass
-
 
460
 
-
 
461
  def markOrderReturnRequestAuthorized(self, orderId, isAuthorized):
-
 
462
    """
-
 
463
    CRM person can authorize or deny the request reised by customer. If he authorizes order will change from RET_REQUEST_RECEIVED
-
 
464
    to RET_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS.
-
 
465
 
-
 
466
    Parameters:
-
 
467
     - orderId
-
 
468
     - isAuthorized
-
 
469
    """
-
 
470
    pass
-
 
471
 
452
  def requestPickupNumber(self, orderId):
472
  def requestPickupNumber(self, orderId):
453
    """
473
    """
454
    Sends out an email to the account manager of the original courier provider used to ship the order.
474
    Sends out an email to the account manager of the original courier provider used to ship the order.
455
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
475
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
456
    If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
476
    If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
Line 2365... Line 2385...
2365
      return result.success
2385
      return result.success
2366
    if result.ex is not None:
2386
    if result.ex is not None:
2367
      raise result.ex
2387
      raise result.ex
2368
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrderDoaRequestAuthorized failed: unknown result");
2388
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrderDoaRequestAuthorized failed: unknown result");
2369
 
2389
 
-
 
2390
  def markOrderReturnRequestReceived(self, orderId):
-
 
2391
    """
-
 
2392
    Once user raise the request for a RET, order status will be changed from DELVIERY_SUCCESS to RET_REQUEST_RECEIVED
-
 
2393
 
-
 
2394
    Parameters:
-
 
2395
     - orderId
-
 
2396
    """
-
 
2397
    self.send_markOrderReturnRequestReceived(orderId)
-
 
2398
    return self.recv_markOrderReturnRequestReceived()
-
 
2399
 
-
 
2400
  def send_markOrderReturnRequestReceived(self, orderId):
-
 
2401
    self._oprot.writeMessageBegin('markOrderReturnRequestReceived', TMessageType.CALL, self._seqid)
-
 
2402
    args = markOrderReturnRequestReceived_args()
-
 
2403
    args.orderId = orderId
-
 
2404
    args.write(self._oprot)
-
 
2405
    self._oprot.writeMessageEnd()
-
 
2406
    self._oprot.trans.flush()
-
 
2407
 
-
 
2408
  def recv_markOrderReturnRequestReceived(self, ):
-
 
2409
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2410
    if mtype == TMessageType.EXCEPTION:
-
 
2411
      x = TApplicationException()
-
 
2412
      x.read(self._iprot)
-
 
2413
      self._iprot.readMessageEnd()
-
 
2414
      raise x
-
 
2415
    result = markOrderReturnRequestReceived_result()
-
 
2416
    result.read(self._iprot)
-
 
2417
    self._iprot.readMessageEnd()
-
 
2418
    if result.success is not None:
-
 
2419
      return result.success
-
 
2420
    if result.ex is not None:
-
 
2421
      raise result.ex
-
 
2422
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrderReturnRequestReceived failed: unknown result");
-
 
2423
 
-
 
2424
  def markOrderReturnRequestAuthorized(self, orderId, isAuthorized):
-
 
2425
    """
-
 
2426
    CRM person can authorize or deny the request reised by customer. If he authorizes order will change from RET_REQUEST_RECEIVED
-
 
2427
    to RET_REQUEST_AUTHORIZED. If he denies, status will be changed back to DELVIERY_SUCCESS.
-
 
2428
 
-
 
2429
    Parameters:
-
 
2430
     - orderId
-
 
2431
     - isAuthorized
-
 
2432
    """
-
 
2433
    self.send_markOrderReturnRequestAuthorized(orderId, isAuthorized)
-
 
2434
    return self.recv_markOrderReturnRequestAuthorized()
-
 
2435
 
-
 
2436
  def send_markOrderReturnRequestAuthorized(self, orderId, isAuthorized):
-
 
2437
    self._oprot.writeMessageBegin('markOrderReturnRequestAuthorized', TMessageType.CALL, self._seqid)
-
 
2438
    args = markOrderReturnRequestAuthorized_args()
-
 
2439
    args.orderId = orderId
-
 
2440
    args.isAuthorized = isAuthorized
-
 
2441
    args.write(self._oprot)
-
 
2442
    self._oprot.writeMessageEnd()
-
 
2443
    self._oprot.trans.flush()
-
 
2444
 
-
 
2445
  def recv_markOrderReturnRequestAuthorized(self, ):
-
 
2446
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2447
    if mtype == TMessageType.EXCEPTION:
-
 
2448
      x = TApplicationException()
-
 
2449
      x.read(self._iprot)
-
 
2450
      self._iprot.readMessageEnd()
-
 
2451
      raise x
-
 
2452
    result = markOrderReturnRequestAuthorized_result()
-
 
2453
    result.read(self._iprot)
-
 
2454
    self._iprot.readMessageEnd()
-
 
2455
    if result.success is not None:
-
 
2456
      return result.success
-
 
2457
    if result.ex is not None:
-
 
2458
      raise result.ex
-
 
2459
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrderReturnRequestAuthorized failed: unknown result");
-
 
2460
 
2370
  def requestPickupNumber(self, orderId):
2461
  def requestPickupNumber(self, orderId):
2371
    """
2462
    """
2372
    Sends out an email to the account manager of the original courier provider used to ship the order.
2463
    Sends out an email to the account manager of the original courier provider used to ship the order.
2373
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
2464
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUEST_RAISED.
2374
    If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
2465
    If the order status was DOA_PICKUP_REQUEST_RAISED, it is left unchanged.
Line 3595... Line 3686...
3595
    self._processMap["updateNonDeliveryReason"] = Processor.process_updateNonDeliveryReason
3686
    self._processMap["updateNonDeliveryReason"] = Processor.process_updateNonDeliveryReason
3596
    self._processMap["getUndeliveredOrders"] = Processor.process_getUndeliveredOrders
3687
    self._processMap["getUndeliveredOrders"] = Processor.process_getUndeliveredOrders
3597
    self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
3688
    self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
3598
    self._processMap["markOrderDoaRequestReceived"] = Processor.process_markOrderDoaRequestReceived
3689
    self._processMap["markOrderDoaRequestReceived"] = Processor.process_markOrderDoaRequestReceived
3599
    self._processMap["markOrderDoaRequestAuthorized"] = Processor.process_markOrderDoaRequestAuthorized
3690
    self._processMap["markOrderDoaRequestAuthorized"] = Processor.process_markOrderDoaRequestAuthorized
-
 
3691
    self._processMap["markOrderReturnRequestReceived"] = Processor.process_markOrderReturnRequestReceived
-
 
3692
    self._processMap["markOrderReturnRequestAuthorized"] = Processor.process_markOrderReturnRequestAuthorized
3600
    self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
3693
    self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
3601
    self._processMap["authorizePickup"] = Processor.process_authorizePickup
3694
    self._processMap["authorizePickup"] = Processor.process_authorizePickup
3602
    self._processMap["markDoasAsPickedUp"] = Processor.process_markDoasAsPickedUp
3695
    self._processMap["markDoasAsPickedUp"] = Processor.process_markDoasAsPickedUp
3603
    self._processMap["receiveReturn"] = Processor.process_receiveReturn
3696
    self._processMap["receiveReturn"] = Processor.process_receiveReturn
3604
    self._processMap["validateDoa"] = Processor.process_validateDoa
3697
    self._processMap["validateDoa"] = Processor.process_validateDoa
Line 4221... Line 4314...
4221
    oprot.writeMessageBegin("markOrderDoaRequestAuthorized", TMessageType.REPLY, seqid)
4314
    oprot.writeMessageBegin("markOrderDoaRequestAuthorized", TMessageType.REPLY, seqid)
4222
    result.write(oprot)
4315
    result.write(oprot)
4223
    oprot.writeMessageEnd()
4316
    oprot.writeMessageEnd()
4224
    oprot.trans.flush()
4317
    oprot.trans.flush()
4225
 
4318
 
-
 
4319
  def process_markOrderReturnRequestReceived(self, seqid, iprot, oprot):
-
 
4320
    args = markOrderReturnRequestReceived_args()
-
 
4321
    args.read(iprot)
-
 
4322
    iprot.readMessageEnd()
-
 
4323
    result = markOrderReturnRequestReceived_result()
-
 
4324
    try:
-
 
4325
      result.success = self._handler.markOrderReturnRequestReceived(args.orderId)
-
 
4326
    except TransactionServiceException, ex:
-
 
4327
      result.ex = ex
-
 
4328
    oprot.writeMessageBegin("markOrderReturnRequestReceived", TMessageType.REPLY, seqid)
-
 
4329
    result.write(oprot)
-
 
4330
    oprot.writeMessageEnd()
-
 
4331
    oprot.trans.flush()
-
 
4332
 
-
 
4333
  def process_markOrderReturnRequestAuthorized(self, seqid, iprot, oprot):
-
 
4334
    args = markOrderReturnRequestAuthorized_args()
-
 
4335
    args.read(iprot)
-
 
4336
    iprot.readMessageEnd()
-
 
4337
    result = markOrderReturnRequestAuthorized_result()
-
 
4338
    try:
-
 
4339
      result.success = self._handler.markOrderReturnRequestAuthorized(args.orderId, args.isAuthorized)
-
 
4340
    except TransactionServiceException, ex:
-
 
4341
      result.ex = ex
-
 
4342
    oprot.writeMessageBegin("markOrderReturnRequestAuthorized", TMessageType.REPLY, seqid)
-
 
4343
    result.write(oprot)
-
 
4344
    oprot.writeMessageEnd()
-
 
4345
    oprot.trans.flush()
-
 
4346
 
4226
  def process_requestPickupNumber(self, seqid, iprot, oprot):
4347
  def process_requestPickupNumber(self, seqid, iprot, oprot):
4227
    args = requestPickupNumber_args()
4348
    args = requestPickupNumber_args()
4228
    args.read(iprot)
4349
    args.read(iprot)
4229
    iprot.readMessageEnd()
4350
    iprot.readMessageEnd()
4230
    result = requestPickupNumber_result()
4351
    result = requestPickupNumber_result()
Line 10903... Line 11024...
10903
    if self.success is not None:
11024
    if self.success is not None:
10904
      oprot.writeFieldBegin('success', TType.BOOL, 0)
11025
      oprot.writeFieldBegin('success', TType.BOOL, 0)
10905
      oprot.writeBool(self.success)
11026
      oprot.writeBool(self.success)
10906
      oprot.writeFieldEnd()
11027
      oprot.writeFieldEnd()
10907
    if self.ex is not None:
11028
    if self.ex is not None:
-
 
11029
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
11030
      self.ex.write(oprot)
-
 
11031
      oprot.writeFieldEnd()
-
 
11032
    oprot.writeFieldStop()
-
 
11033
    oprot.writeStructEnd()
-
 
11034
 
-
 
11035
  def validate(self):
-
 
11036
    return
-
 
11037
 
-
 
11038
 
-
 
11039
  def __repr__(self):
-
 
11040
    L = ['%s=%r' % (key, value)
-
 
11041
      for key, value in self.__dict__.iteritems()]
-
 
11042
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11043
 
-
 
11044
  def __eq__(self, other):
-
 
11045
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11046
 
-
 
11047
  def __ne__(self, other):
-
 
11048
    return not (self == other)
-
 
11049
 
-
 
11050
class markOrderReturnRequestReceived_args:
-
 
11051
  """
-
 
11052
  Attributes:
-
 
11053
   - orderId
-
 
11054
  """
-
 
11055
 
-
 
11056
  thrift_spec = (
-
 
11057
    None, # 0
-
 
11058
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
11059
  )
-
 
11060
 
-
 
11061
  def __init__(self, orderId=None,):
-
 
11062
    self.orderId = orderId
-
 
11063
 
-
 
11064
  def read(self, iprot):
-
 
11065
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11066
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11067
      return
-
 
11068
    iprot.readStructBegin()
-
 
11069
    while True:
-
 
11070
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11071
      if ftype == TType.STOP:
-
 
11072
        break
-
 
11073
      if fid == 1:
-
 
11074
        if ftype == TType.I64:
-
 
11075
          self.orderId = iprot.readI64();
-
 
11076
        else:
-
 
11077
          iprot.skip(ftype)
-
 
11078
      else:
-
 
11079
        iprot.skip(ftype)
-
 
11080
      iprot.readFieldEnd()
-
 
11081
    iprot.readStructEnd()
-
 
11082
 
-
 
11083
  def write(self, oprot):
-
 
11084
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
11085
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
11086
      return
-
 
11087
    oprot.writeStructBegin('markOrderReturnRequestReceived_args')
-
 
11088
    if self.orderId is not None:
-
 
11089
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
11090
      oprot.writeI64(self.orderId)
-
 
11091
      oprot.writeFieldEnd()
-
 
11092
    oprot.writeFieldStop()
-
 
11093
    oprot.writeStructEnd()
-
 
11094
 
-
 
11095
  def validate(self):
-
 
11096
    return
-
 
11097
 
-
 
11098
 
-
 
11099
  def __repr__(self):
-
 
11100
    L = ['%s=%r' % (key, value)
-
 
11101
      for key, value in self.__dict__.iteritems()]
-
 
11102
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11103
 
-
 
11104
  def __eq__(self, other):
-
 
11105
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11106
 
-
 
11107
  def __ne__(self, other):
-
 
11108
    return not (self == other)
-
 
11109
 
-
 
11110
class markOrderReturnRequestReceived_result:
-
 
11111
  """
-
 
11112
  Attributes:
-
 
11113
   - success
-
 
11114
   - ex
-
 
11115
  """
-
 
11116
 
-
 
11117
  thrift_spec = (
-
 
11118
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
11119
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
11120
  )
-
 
11121
 
-
 
11122
  def __init__(self, success=None, ex=None,):
-
 
11123
    self.success = success
-
 
11124
    self.ex = ex
-
 
11125
 
-
 
11126
  def read(self, iprot):
-
 
11127
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11128
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11129
      return
-
 
11130
    iprot.readStructBegin()
-
 
11131
    while True:
-
 
11132
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11133
      if ftype == TType.STOP:
-
 
11134
        break
-
 
11135
      if fid == 0:
-
 
11136
        if ftype == TType.BOOL:
-
 
11137
          self.success = iprot.readBool();
-
 
11138
        else:
-
 
11139
          iprot.skip(ftype)
-
 
11140
      elif fid == 1:
-
 
11141
        if ftype == TType.STRUCT:
-
 
11142
          self.ex = TransactionServiceException()
-
 
11143
          self.ex.read(iprot)
-
 
11144
        else:
-
 
11145
          iprot.skip(ftype)
-
 
11146
      else:
-
 
11147
        iprot.skip(ftype)
-
 
11148
      iprot.readFieldEnd()
-
 
11149
    iprot.readStructEnd()
-
 
11150
 
-
 
11151
  def write(self, oprot):
-
 
11152
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
11153
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
11154
      return
-
 
11155
    oprot.writeStructBegin('markOrderReturnRequestReceived_result')
-
 
11156
    if self.success is not None:
-
 
11157
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
11158
      oprot.writeBool(self.success)
-
 
11159
      oprot.writeFieldEnd()
-
 
11160
    if self.ex is not None:
-
 
11161
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
11162
      self.ex.write(oprot)
-
 
11163
      oprot.writeFieldEnd()
-
 
11164
    oprot.writeFieldStop()
-
 
11165
    oprot.writeStructEnd()
-
 
11166
 
-
 
11167
  def validate(self):
-
 
11168
    return
-
 
11169
 
-
 
11170
 
-
 
11171
  def __repr__(self):
-
 
11172
    L = ['%s=%r' % (key, value)
-
 
11173
      for key, value in self.__dict__.iteritems()]
-
 
11174
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11175
 
-
 
11176
  def __eq__(self, other):
-
 
11177
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11178
 
-
 
11179
  def __ne__(self, other):
-
 
11180
    return not (self == other)
-
 
11181
 
-
 
11182
class markOrderReturnRequestAuthorized_args:
-
 
11183
  """
-
 
11184
  Attributes:
-
 
11185
   - orderId
-
 
11186
   - isAuthorized
-
 
11187
  """
-
 
11188
 
-
 
11189
  thrift_spec = (
-
 
11190
    None, # 0
-
 
11191
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
11192
    (2, TType.BOOL, 'isAuthorized', None, None, ), # 2
-
 
11193
  )
-
 
11194
 
-
 
11195
  def __init__(self, orderId=None, isAuthorized=None,):
-
 
11196
    self.orderId = orderId
-
 
11197
    self.isAuthorized = isAuthorized
-
 
11198
 
-
 
11199
  def read(self, iprot):
-
 
11200
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11201
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11202
      return
-
 
11203
    iprot.readStructBegin()
-
 
11204
    while True:
-
 
11205
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11206
      if ftype == TType.STOP:
-
 
11207
        break
-
 
11208
      if fid == 1:
-
 
11209
        if ftype == TType.I64:
-
 
11210
          self.orderId = iprot.readI64();
-
 
11211
        else:
-
 
11212
          iprot.skip(ftype)
-
 
11213
      elif fid == 2:
-
 
11214
        if ftype == TType.BOOL:
-
 
11215
          self.isAuthorized = iprot.readBool();
-
 
11216
        else:
-
 
11217
          iprot.skip(ftype)
-
 
11218
      else:
-
 
11219
        iprot.skip(ftype)
-
 
11220
      iprot.readFieldEnd()
-
 
11221
    iprot.readStructEnd()
-
 
11222
 
-
 
11223
  def write(self, oprot):
-
 
11224
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
11225
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
11226
      return
-
 
11227
    oprot.writeStructBegin('markOrderReturnRequestAuthorized_args')
-
 
11228
    if self.orderId is not None:
-
 
11229
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
11230
      oprot.writeI64(self.orderId)
-
 
11231
      oprot.writeFieldEnd()
-
 
11232
    if self.isAuthorized is not None:
-
 
11233
      oprot.writeFieldBegin('isAuthorized', TType.BOOL, 2)
-
 
11234
      oprot.writeBool(self.isAuthorized)
-
 
11235
      oprot.writeFieldEnd()
-
 
11236
    oprot.writeFieldStop()
-
 
11237
    oprot.writeStructEnd()
-
 
11238
 
-
 
11239
  def validate(self):
-
 
11240
    return
-
 
11241
 
-
 
11242
 
-
 
11243
  def __repr__(self):
-
 
11244
    L = ['%s=%r' % (key, value)
-
 
11245
      for key, value in self.__dict__.iteritems()]
-
 
11246
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11247
 
-
 
11248
  def __eq__(self, other):
-
 
11249
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11250
 
-
 
11251
  def __ne__(self, other):
-
 
11252
    return not (self == other)
-
 
11253
 
-
 
11254
class markOrderReturnRequestAuthorized_result:
-
 
11255
  """
-
 
11256
  Attributes:
-
 
11257
   - success
-
 
11258
   - ex
-
 
11259
  """
-
 
11260
 
-
 
11261
  thrift_spec = (
-
 
11262
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
11263
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
11264
  )
-
 
11265
 
-
 
11266
  def __init__(self, success=None, ex=None,):
-
 
11267
    self.success = success
-
 
11268
    self.ex = ex
-
 
11269
 
-
 
11270
  def read(self, iprot):
-
 
11271
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11272
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11273
      return
-
 
11274
    iprot.readStructBegin()
-
 
11275
    while True:
-
 
11276
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11277
      if ftype == TType.STOP:
-
 
11278
        break
-
 
11279
      if fid == 0:
-
 
11280
        if ftype == TType.BOOL:
-
 
11281
          self.success = iprot.readBool();
-
 
11282
        else:
-
 
11283
          iprot.skip(ftype)
-
 
11284
      elif fid == 1:
-
 
11285
        if ftype == TType.STRUCT:
-
 
11286
          self.ex = TransactionServiceException()
-
 
11287
          self.ex.read(iprot)
-
 
11288
        else:
-
 
11289
          iprot.skip(ftype)
-
 
11290
      else:
-
 
11291
        iprot.skip(ftype)
-
 
11292
      iprot.readFieldEnd()
-
 
11293
    iprot.readStructEnd()
-
 
11294
 
-
 
11295
  def write(self, oprot):
-
 
11296
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
11297
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
11298
      return
-
 
11299
    oprot.writeStructBegin('markOrderReturnRequestAuthorized_result')
-
 
11300
    if self.success is not None:
-
 
11301
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
11302
      oprot.writeBool(self.success)
-
 
11303
      oprot.writeFieldEnd()
-
 
11304
    if self.ex is not None:
10908
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
11305
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
10909
      self.ex.write(oprot)
11306
      self.ex.write(oprot)
10910
      oprot.writeFieldEnd()
11307
      oprot.writeFieldEnd()
10911
    oprot.writeFieldStop()
11308
    oprot.writeFieldStop()
10912
    oprot.writeStructEnd()
11309
    oprot.writeStructEnd()