Subversion Repositories SmartDukaan

Rev

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

Rev 6762 Rev 7410
Line 157... Line 157...
157
    Parameters:
157
    Parameters:
158
     - date
158
     - date
159
    """
159
    """
160
    pass
160
    pass
161
 
161
 
-
 
162
  def getInvoicesForWarehouse(self, warehouseId, supplierId, date):
-
 
163
    """
-
 
164
    Fetches all invoices after a given date
-
 
165
 
-
 
166
    Parameters:
-
 
167
     - warehouseId
-
 
168
     - supplierId
-
 
169
     - date
-
 
170
    """
-
 
171
    pass
-
 
172
 
162
  def createInvoice(self, invoice):
173
  def createInvoice(self, invoice):
163
    """
174
    """
164
    Creates an invoice object
175
    Creates an invoice object
165
 
176
 
166
    Parameters:
177
    Parameters:
Line 238... Line 249...
238
     - itemId
249
     - itemId
239
     - quantity
250
     - quantity
240
    """
251
    """
241
    pass
252
    pass
242
 
253
 
-
 
254
  def closePO(self, poId):
-
 
255
    """
-
 
256
    Marks a purchase order as closedcomplete and updates the receivedOn time.
-
 
257
 
-
 
258
    Parameters:
-
 
259
     - poId
-
 
260
    """
-
 
261
    pass
-
 
262
 
-
 
263
  def isInvoiceReceived(self, invoiceNumber, supplierId):
-
 
264
    """
-
 
265
    Check if invoice is already received with given supplierId and invoiceNumber
-
 
266
 
-
 
267
    Parameters:
-
 
268
     - invoiceNumber
-
 
269
     - supplierId
-
 
270
    """
-
 
271
    pass
-
 
272
 
243
 
273
 
244
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
274
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
245
  def __init__(self, iprot, oprot=None):
275
  def __init__(self, iprot, oprot=None):
246
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
276
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
247
 
277
 
Line 756... Line 786...
756
    self._iprot.readMessageEnd()
786
    self._iprot.readMessageEnd()
757
    if result.success is not None:
787
    if result.success is not None:
758
      return result.success
788
      return result.success
759
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
789
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
760
 
790
 
-
 
791
  def getInvoicesForWarehouse(self, warehouseId, supplierId, date):
-
 
792
    """
-
 
793
    Fetches all invoices after a given date
-
 
794
 
-
 
795
    Parameters:
-
 
796
     - warehouseId
-
 
797
     - supplierId
-
 
798
     - date
-
 
799
    """
-
 
800
    self.send_getInvoicesForWarehouse(warehouseId, supplierId, date)
-
 
801
    return self.recv_getInvoicesForWarehouse()
-
 
802
 
-
 
803
  def send_getInvoicesForWarehouse(self, warehouseId, supplierId, date):
-
 
804
    self._oprot.writeMessageBegin('getInvoicesForWarehouse', TMessageType.CALL, self._seqid)
-
 
805
    args = getInvoicesForWarehouse_args()
-
 
806
    args.warehouseId = warehouseId
-
 
807
    args.supplierId = supplierId
-
 
808
    args.date = date
-
 
809
    args.write(self._oprot)
-
 
810
    self._oprot.writeMessageEnd()
-
 
811
    self._oprot.trans.flush()
-
 
812
 
-
 
813
  def recv_getInvoicesForWarehouse(self, ):
-
 
814
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
815
    if mtype == TMessageType.EXCEPTION:
-
 
816
      x = TApplicationException()
-
 
817
      x.read(self._iprot)
-
 
818
      self._iprot.readMessageEnd()
-
 
819
      raise x
-
 
820
    result = getInvoicesForWarehouse_result()
-
 
821
    result.read(self._iprot)
-
 
822
    self._iprot.readMessageEnd()
-
 
823
    if result.success is not None:
-
 
824
      return result.success
-
 
825
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
-
 
826
 
761
  def createInvoice(self, invoice):
827
  def createInvoice(self, invoice):
762
    """
828
    """
763
    Creates an invoice object
829
    Creates an invoice object
764
 
830
 
765
    Parameters:
831
    Parameters:
Line 1041... Line 1107...
1041
    result = fulfillPOForExtBilling_result()
1107
    result = fulfillPOForExtBilling_result()
1042
    result.read(self._iprot)
1108
    result.read(self._iprot)
1043
    self._iprot.readMessageEnd()
1109
    self._iprot.readMessageEnd()
1044
    return
1110
    return
1045
 
1111
 
-
 
1112
  def closePO(self, poId):
-
 
1113
    """
-
 
1114
    Marks a purchase order as closedcomplete and updates the receivedOn time.
-
 
1115
 
-
 
1116
    Parameters:
-
 
1117
     - poId
-
 
1118
    """
-
 
1119
    self.send_closePO(poId)
-
 
1120
    self.recv_closePO()
-
 
1121
 
-
 
1122
  def send_closePO(self, poId):
-
 
1123
    self._oprot.writeMessageBegin('closePO', TMessageType.CALL, self._seqid)
-
 
1124
    args = closePO_args()
-
 
1125
    args.poId = poId
-
 
1126
    args.write(self._oprot)
-
 
1127
    self._oprot.writeMessageEnd()
-
 
1128
    self._oprot.trans.flush()
-
 
1129
 
-
 
1130
  def recv_closePO(self, ):
-
 
1131
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1132
    if mtype == TMessageType.EXCEPTION:
-
 
1133
      x = TApplicationException()
-
 
1134
      x.read(self._iprot)
-
 
1135
      self._iprot.readMessageEnd()
-
 
1136
      raise x
-
 
1137
    result = closePO_result()
-
 
1138
    result.read(self._iprot)
-
 
1139
    self._iprot.readMessageEnd()
-
 
1140
    if result.e is not None:
-
 
1141
      raise result.e
-
 
1142
    return
-
 
1143
 
-
 
1144
  def isInvoiceReceived(self, invoiceNumber, supplierId):
-
 
1145
    """
-
 
1146
    Check if invoice is already received with given supplierId and invoiceNumber
-
 
1147
 
-
 
1148
    Parameters:
-
 
1149
     - invoiceNumber
-
 
1150
     - supplierId
-
 
1151
    """
-
 
1152
    self.send_isInvoiceReceived(invoiceNumber, supplierId)
-
 
1153
    return self.recv_isInvoiceReceived()
-
 
1154
 
-
 
1155
  def send_isInvoiceReceived(self, invoiceNumber, supplierId):
-
 
1156
    self._oprot.writeMessageBegin('isInvoiceReceived', TMessageType.CALL, self._seqid)
-
 
1157
    args = isInvoiceReceived_args()
-
 
1158
    args.invoiceNumber = invoiceNumber
-
 
1159
    args.supplierId = supplierId
-
 
1160
    args.write(self._oprot)
-
 
1161
    self._oprot.writeMessageEnd()
-
 
1162
    self._oprot.trans.flush()
-
 
1163
 
-
 
1164
  def recv_isInvoiceReceived(self, ):
-
 
1165
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1166
    if mtype == TMessageType.EXCEPTION:
-
 
1167
      x = TApplicationException()
-
 
1168
      x.read(self._iprot)
-
 
1169
      self._iprot.readMessageEnd()
-
 
1170
      raise x
-
 
1171
    result = isInvoiceReceived_result()
-
 
1172
    result.read(self._iprot)
-
 
1173
    self._iprot.readMessageEnd()
-
 
1174
    if result.success is not None:
-
 
1175
      return result.success
-
 
1176
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
-
 
1177
 
1046
 
1178
 
1047
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1179
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1048
  def __init__(self, handler):
1180
  def __init__(self, handler):
1049
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1181
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1050
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
1182
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
Line 1060... Line 1192...
1060
    self._processMap["getSuppliers"] = Processor.process_getSuppliers
1192
    self._processMap["getSuppliers"] = Processor.process_getSuppliers
1061
    self._processMap["fulfillPO"] = Processor.process_fulfillPO
1193
    self._processMap["fulfillPO"] = Processor.process_fulfillPO
1062
    self._processMap["updatePurchaseOrder"] = Processor.process_updatePurchaseOrder
1194
    self._processMap["updatePurchaseOrder"] = Processor.process_updatePurchaseOrder
1063
    self._processMap["unFulfillPO"] = Processor.process_unFulfillPO
1195
    self._processMap["unFulfillPO"] = Processor.process_unFulfillPO
1064
    self._processMap["getInvoices"] = Processor.process_getInvoices
1196
    self._processMap["getInvoices"] = Processor.process_getInvoices
-
 
1197
    self._processMap["getInvoicesForWarehouse"] = Processor.process_getInvoicesForWarehouse
1065
    self._processMap["createInvoice"] = Processor.process_createInvoice
1198
    self._processMap["createInvoice"] = Processor.process_createInvoice
1066
    self._processMap["addSupplier"] = Processor.process_addSupplier
1199
    self._processMap["addSupplier"] = Processor.process_addSupplier
1067
    self._processMap["updateSupplier"] = Processor.process_updateSupplier
1200
    self._processMap["updateSupplier"] = Processor.process_updateSupplier
1068
    self._processMap["createPurchaseReturn"] = Processor.process_createPurchaseReturn
1201
    self._processMap["createPurchaseReturn"] = Processor.process_createPurchaseReturn
1069
    self._processMap["settlePurchaseReturn"] = Processor.process_settlePurchaseReturn
1202
    self._processMap["settlePurchaseReturn"] = Processor.process_settlePurchaseReturn
1070
    self._processMap["getUnsettledPurchaseReturns"] = Processor.process_getUnsettledPurchaseReturns
1203
    self._processMap["getUnsettledPurchaseReturns"] = Processor.process_getUnsettledPurchaseReturns
1071
    self._processMap["getInvoice"] = Processor.process_getInvoice
1204
    self._processMap["getInvoice"] = Processor.process_getInvoice
1072
    self._processMap["createPurchaseForOurExtBilling"] = Processor.process_createPurchaseForOurExtBilling
1205
    self._processMap["createPurchaseForOurExtBilling"] = Processor.process_createPurchaseForOurExtBilling
1073
    self._processMap["fulfillPOForExtBilling"] = Processor.process_fulfillPOForExtBilling
1206
    self._processMap["fulfillPOForExtBilling"] = Processor.process_fulfillPOForExtBilling
-
 
1207
    self._processMap["closePO"] = Processor.process_closePO
-
 
1208
    self._processMap["isInvoiceReceived"] = Processor.process_isInvoiceReceived
1074
 
1209
 
1075
  def process(self, iprot, oprot):
1210
  def process(self, iprot, oprot):
1076
    (name, type, seqid) = iprot.readMessageBegin()
1211
    (name, type, seqid) = iprot.readMessageBegin()
1077
    if name not in self._processMap:
1212
    if name not in self._processMap:
1078
      iprot.skip(TType.STRUCT)
1213
      iprot.skip(TType.STRUCT)
Line 1289... Line 1424...
1289
    oprot.writeMessageBegin("getInvoices", TMessageType.REPLY, seqid)
1424
    oprot.writeMessageBegin("getInvoices", TMessageType.REPLY, seqid)
1290
    result.write(oprot)
1425
    result.write(oprot)
1291
    oprot.writeMessageEnd()
1426
    oprot.writeMessageEnd()
1292
    oprot.trans.flush()
1427
    oprot.trans.flush()
1293
 
1428
 
-
 
1429
  def process_getInvoicesForWarehouse(self, seqid, iprot, oprot):
-
 
1430
    args = getInvoicesForWarehouse_args()
-
 
1431
    args.read(iprot)
-
 
1432
    iprot.readMessageEnd()
-
 
1433
    result = getInvoicesForWarehouse_result()
-
 
1434
    result.success = self._handler.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date)
-
 
1435
    oprot.writeMessageBegin("getInvoicesForWarehouse", TMessageType.REPLY, seqid)
-
 
1436
    result.write(oprot)
-
 
1437
    oprot.writeMessageEnd()
-
 
1438
    oprot.trans.flush()
-
 
1439
 
1294
  def process_createInvoice(self, seqid, iprot, oprot):
1440
  def process_createInvoice(self, seqid, iprot, oprot):
1295
    args = createInvoice_args()
1441
    args = createInvoice_args()
1296
    args.read(iprot)
1442
    args.read(iprot)
1297
    iprot.readMessageEnd()
1443
    iprot.readMessageEnd()
1298
    result = createInvoice_result()
1444
    result = createInvoice_result()
Line 1391... Line 1537...
1391
    oprot.writeMessageBegin("fulfillPOForExtBilling", TMessageType.REPLY, seqid)
1537
    oprot.writeMessageBegin("fulfillPOForExtBilling", TMessageType.REPLY, seqid)
1392
    result.write(oprot)
1538
    result.write(oprot)
1393
    oprot.writeMessageEnd()
1539
    oprot.writeMessageEnd()
1394
    oprot.trans.flush()
1540
    oprot.trans.flush()
1395
 
1541
 
-
 
1542
  def process_closePO(self, seqid, iprot, oprot):
-
 
1543
    args = closePO_args()
-
 
1544
    args.read(iprot)
-
 
1545
    iprot.readMessageEnd()
-
 
1546
    result = closePO_result()
-
 
1547
    try:
-
 
1548
      self._handler.closePO(args.poId)
-
 
1549
    except PurchaseServiceException, e:
-
 
1550
      result.e = e
-
 
1551
    oprot.writeMessageBegin("closePO", TMessageType.REPLY, seqid)
-
 
1552
    result.write(oprot)
-
 
1553
    oprot.writeMessageEnd()
-
 
1554
    oprot.trans.flush()
-
 
1555
 
-
 
1556
  def process_isInvoiceReceived(self, seqid, iprot, oprot):
-
 
1557
    args = isInvoiceReceived_args()
-
 
1558
    args.read(iprot)
-
 
1559
    iprot.readMessageEnd()
-
 
1560
    result = isInvoiceReceived_result()
-
 
1561
    result.success = self._handler.isInvoiceReceived(args.invoiceNumber, args.supplierId)
-
 
1562
    oprot.writeMessageBegin("isInvoiceReceived", TMessageType.REPLY, seqid)
-
 
1563
    result.write(oprot)
-
 
1564
    oprot.writeMessageEnd()
-
 
1565
    oprot.trans.flush()
-
 
1566
 
1396
 
1567
 
1397
# HELPER FUNCTIONS AND STRUCTURES
1568
# HELPER FUNCTIONS AND STRUCTURES
1398
 
1569
 
1399
class createPurchaseOrder_args:
1570
class createPurchaseOrder_args:
1400
  """
1571
  """
Line 3440... Line 3611...
3440
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3611
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3441
 
3612
 
3442
  def __ne__(self, other):
3613
  def __ne__(self, other):
3443
    return not (self == other)
3614
    return not (self == other)
3444
 
3615
 
-
 
3616
class getInvoicesForWarehouse_args:
-
 
3617
  """
-
 
3618
  Attributes:
-
 
3619
   - warehouseId
-
 
3620
   - supplierId
-
 
3621
   - date
-
 
3622
  """
-
 
3623
 
-
 
3624
  thrift_spec = (
-
 
3625
    None, # 0
-
 
3626
    (1, TType.I64, 'warehouseId', None, None, ), # 1
-
 
3627
    (2, TType.I64, 'supplierId', None, None, ), # 2
-
 
3628
    (3, TType.I64, 'date', None, None, ), # 3
-
 
3629
  )
-
 
3630
 
-
 
3631
  def __init__(self, warehouseId=None, supplierId=None, date=None,):
-
 
3632
    self.warehouseId = warehouseId
-
 
3633
    self.supplierId = supplierId
-
 
3634
    self.date = date
-
 
3635
 
-
 
3636
  def read(self, iprot):
-
 
3637
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3638
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3639
      return
-
 
3640
    iprot.readStructBegin()
-
 
3641
    while True:
-
 
3642
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3643
      if ftype == TType.STOP:
-
 
3644
        break
-
 
3645
      if fid == 1:
-
 
3646
        if ftype == TType.I64:
-
 
3647
          self.warehouseId = iprot.readI64();
-
 
3648
        else:
-
 
3649
          iprot.skip(ftype)
-
 
3650
      elif fid == 2:
-
 
3651
        if ftype == TType.I64:
-
 
3652
          self.supplierId = iprot.readI64();
-
 
3653
        else:
-
 
3654
          iprot.skip(ftype)
-
 
3655
      elif fid == 3:
-
 
3656
        if ftype == TType.I64:
-
 
3657
          self.date = iprot.readI64();
-
 
3658
        else:
-
 
3659
          iprot.skip(ftype)
-
 
3660
      else:
-
 
3661
        iprot.skip(ftype)
-
 
3662
      iprot.readFieldEnd()
-
 
3663
    iprot.readStructEnd()
-
 
3664
 
-
 
3665
  def write(self, oprot):
-
 
3666
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3667
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3668
      return
-
 
3669
    oprot.writeStructBegin('getInvoicesForWarehouse_args')
-
 
3670
    if self.warehouseId is not None:
-
 
3671
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
-
 
3672
      oprot.writeI64(self.warehouseId)
-
 
3673
      oprot.writeFieldEnd()
-
 
3674
    if self.supplierId is not None:
-
 
3675
      oprot.writeFieldBegin('supplierId', TType.I64, 2)
-
 
3676
      oprot.writeI64(self.supplierId)
-
 
3677
      oprot.writeFieldEnd()
-
 
3678
    if self.date is not None:
-
 
3679
      oprot.writeFieldBegin('date', TType.I64, 3)
-
 
3680
      oprot.writeI64(self.date)
-
 
3681
      oprot.writeFieldEnd()
-
 
3682
    oprot.writeFieldStop()
-
 
3683
    oprot.writeStructEnd()
-
 
3684
 
-
 
3685
  def validate(self):
-
 
3686
    return
-
 
3687
 
-
 
3688
 
-
 
3689
  def __repr__(self):
-
 
3690
    L = ['%s=%r' % (key, value)
-
 
3691
      for key, value in self.__dict__.iteritems()]
-
 
3692
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3693
 
-
 
3694
  def __eq__(self, other):
-
 
3695
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3696
 
-
 
3697
  def __ne__(self, other):
-
 
3698
    return not (self == other)
-
 
3699
 
-
 
3700
class getInvoicesForWarehouse_result:
-
 
3701
  """
-
 
3702
  Attributes:
-
 
3703
   - success
-
 
3704
  """
-
 
3705
 
-
 
3706
  thrift_spec = (
-
 
3707
    (0, TType.LIST, 'success', (TType.STRUCT,(Invoice, Invoice.thrift_spec)), None, ), # 0
-
 
3708
  )
-
 
3709
 
-
 
3710
  def __init__(self, success=None,):
-
 
3711
    self.success = success
-
 
3712
 
-
 
3713
  def read(self, iprot):
-
 
3714
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3715
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3716
      return
-
 
3717
    iprot.readStructBegin()
-
 
3718
    while True:
-
 
3719
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3720
      if ftype == TType.STOP:
-
 
3721
        break
-
 
3722
      if fid == 0:
-
 
3723
        if ftype == TType.LIST:
-
 
3724
          self.success = []
-
 
3725
          (_etype52, _size49) = iprot.readListBegin()
-
 
3726
          for _i53 in xrange(_size49):
-
 
3727
            _elem54 = Invoice()
-
 
3728
            _elem54.read(iprot)
-
 
3729
            self.success.append(_elem54)
-
 
3730
          iprot.readListEnd()
-
 
3731
        else:
-
 
3732
          iprot.skip(ftype)
-
 
3733
      else:
-
 
3734
        iprot.skip(ftype)
-
 
3735
      iprot.readFieldEnd()
-
 
3736
    iprot.readStructEnd()
-
 
3737
 
-
 
3738
  def write(self, oprot):
-
 
3739
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3740
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3741
      return
-
 
3742
    oprot.writeStructBegin('getInvoicesForWarehouse_result')
-
 
3743
    if self.success is not None:
-
 
3744
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
3745
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
3746
      for iter55 in self.success:
-
 
3747
        iter55.write(oprot)
-
 
3748
      oprot.writeListEnd()
-
 
3749
      oprot.writeFieldEnd()
-
 
3750
    oprot.writeFieldStop()
-
 
3751
    oprot.writeStructEnd()
-
 
3752
 
-
 
3753
  def validate(self):
-
 
3754
    return
-
 
3755
 
-
 
3756
 
-
 
3757
  def __repr__(self):
-
 
3758
    L = ['%s=%r' % (key, value)
-
 
3759
      for key, value in self.__dict__.iteritems()]
-
 
3760
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3761
 
-
 
3762
  def __eq__(self, other):
-
 
3763
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3764
 
-
 
3765
  def __ne__(self, other):
-
 
3766
    return not (self == other)
-
 
3767
 
3445
class createInvoice_args:
3768
class createInvoice_args:
3446
  """
3769
  """
3447
  Attributes:
3770
  Attributes:
3448
   - invoice
3771
   - invoice
3449
  """
3772
  """
Line 4075... Line 4398...
4075
      if ftype == TType.STOP:
4398
      if ftype == TType.STOP:
4076
        break
4399
        break
4077
      if fid == 0:
4400
      if fid == 0:
4078
        if ftype == TType.LIST:
4401
        if ftype == TType.LIST:
4079
          self.success = []
4402
          self.success = []
4080
          (_etype52, _size49) = iprot.readListBegin()
4403
          (_etype59, _size56) = iprot.readListBegin()
4081
          for _i53 in xrange(_size49):
4404
          for _i60 in xrange(_size56):
4082
            _elem54 = PurchaseReturn()
4405
            _elem61 = PurchaseReturn()
4083
            _elem54.read(iprot)
4406
            _elem61.read(iprot)
4084
            self.success.append(_elem54)
4407
            self.success.append(_elem61)
4085
          iprot.readListEnd()
4408
          iprot.readListEnd()
4086
        else:
4409
        else:
4087
          iprot.skip(ftype)
4410
          iprot.skip(ftype)
4088
      else:
4411
      else:
4089
        iprot.skip(ftype)
4412
        iprot.skip(ftype)
Line 4096... Line 4419...
4096
      return
4419
      return
4097
    oprot.writeStructBegin('getUnsettledPurchaseReturns_result')
4420
    oprot.writeStructBegin('getUnsettledPurchaseReturns_result')
4098
    if self.success is not None:
4421
    if self.success is not None:
4099
      oprot.writeFieldBegin('success', TType.LIST, 0)
4422
      oprot.writeFieldBegin('success', TType.LIST, 0)
4100
      oprot.writeListBegin(TType.STRUCT, len(self.success))
4423
      oprot.writeListBegin(TType.STRUCT, len(self.success))
4101
      for iter55 in self.success:
4424
      for iter62 in self.success:
4102
        iter55.write(oprot)
4425
        iter62.write(oprot)
4103
      oprot.writeListEnd()
4426
      oprot.writeListEnd()
4104
      oprot.writeFieldEnd()
4427
      oprot.writeFieldEnd()
4105
    oprot.writeFieldStop()
4428
    oprot.writeFieldStop()
4106
    oprot.writeStructEnd()
4429
    oprot.writeStructEnd()
4107
 
4430
 
Line 4215... Line 4538...
4215
      if ftype == TType.STOP:
4538
      if ftype == TType.STOP:
4216
        break
4539
        break
4217
      if fid == 0:
4540
      if fid == 0:
4218
        if ftype == TType.LIST:
4541
        if ftype == TType.LIST:
4219
          self.success = []
4542
          self.success = []
4220
          (_etype59, _size56) = iprot.readListBegin()
4543
          (_etype66, _size63) = iprot.readListBegin()
4221
          for _i60 in xrange(_size56):
4544
          for _i67 in xrange(_size63):
4222
            _elem61 = PurchaseReturn()
4545
            _elem68 = PurchaseReturn()
4223
            _elem61.read(iprot)
4546
            _elem68.read(iprot)
4224
            self.success.append(_elem61)
4547
            self.success.append(_elem68)
4225
          iprot.readListEnd()
4548
          iprot.readListEnd()
4226
        else:
4549
        else:
4227
          iprot.skip(ftype)
4550
          iprot.skip(ftype)
4228
      else:
4551
      else:
4229
        iprot.skip(ftype)
4552
        iprot.skip(ftype)
Line 4236... Line 4559...
4236
      return
4559
      return
4237
    oprot.writeStructBegin('getInvoice_result')
4560
    oprot.writeStructBegin('getInvoice_result')
4238
    if self.success is not None:
4561
    if self.success is not None:
4239
      oprot.writeFieldBegin('success', TType.LIST, 0)
4562
      oprot.writeFieldBegin('success', TType.LIST, 0)
4240
      oprot.writeListBegin(TType.STRUCT, len(self.success))
4563
      oprot.writeListBegin(TType.STRUCT, len(self.success))
4241
      for iter62 in self.success:
4564
      for iter69 in self.success:
4242
        iter62.write(oprot)
4565
        iter69.write(oprot)
4243
      oprot.writeListEnd()
4566
      oprot.writeListEnd()
4244
      oprot.writeFieldEnd()
4567
      oprot.writeFieldEnd()
4245
    oprot.writeFieldStop()
4568
    oprot.writeFieldStop()
4246
    oprot.writeStructEnd()
4569
    oprot.writeStructEnd()
4247
 
4570
 
Line 4502... Line 4825...
4502
    oprot.writeFieldStop()
4825
    oprot.writeFieldStop()
4503
    oprot.writeStructEnd()
4826
    oprot.writeStructEnd()
4504
 
4827
 
4505
  def validate(self):
4828
  def validate(self):
4506
    return
4829
    return
-
 
4830
 
-
 
4831
 
-
 
4832
  def __repr__(self):
-
 
4833
    L = ['%s=%r' % (key, value)
-
 
4834
      for key, value in self.__dict__.iteritems()]
-
 
4835
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4836
 
-
 
4837
  def __eq__(self, other):
-
 
4838
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4839
 
-
 
4840
  def __ne__(self, other):
-
 
4841
    return not (self == other)
-
 
4842
 
-
 
4843
class closePO_args:
-
 
4844
  """
-
 
4845
  Attributes:
-
 
4846
   - poId
-
 
4847
  """
-
 
4848
 
-
 
4849
  thrift_spec = (
-
 
4850
    None, # 0
-
 
4851
    (1, TType.I64, 'poId', None, None, ), # 1
-
 
4852
  )
-
 
4853
 
-
 
4854
  def __init__(self, poId=None,):
-
 
4855
    self.poId = poId
-
 
4856
 
-
 
4857
  def read(self, iprot):
-
 
4858
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4859
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4860
      return
-
 
4861
    iprot.readStructBegin()
-
 
4862
    while True:
-
 
4863
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4864
      if ftype == TType.STOP:
-
 
4865
        break
-
 
4866
      if fid == 1:
-
 
4867
        if ftype == TType.I64:
-
 
4868
          self.poId = iprot.readI64();
-
 
4869
        else:
-
 
4870
          iprot.skip(ftype)
-
 
4871
      else:
-
 
4872
        iprot.skip(ftype)
-
 
4873
      iprot.readFieldEnd()
-
 
4874
    iprot.readStructEnd()
-
 
4875
 
-
 
4876
  def write(self, oprot):
-
 
4877
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4878
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4879
      return
-
 
4880
    oprot.writeStructBegin('closePO_args')
-
 
4881
    if self.poId is not None:
-
 
4882
      oprot.writeFieldBegin('poId', TType.I64, 1)
-
 
4883
      oprot.writeI64(self.poId)
-
 
4884
      oprot.writeFieldEnd()
-
 
4885
    oprot.writeFieldStop()
-
 
4886
    oprot.writeStructEnd()
-
 
4887
 
-
 
4888
  def validate(self):
-
 
4889
    return
-
 
4890
 
-
 
4891
 
-
 
4892
  def __repr__(self):
-
 
4893
    L = ['%s=%r' % (key, value)
-
 
4894
      for key, value in self.__dict__.iteritems()]
-
 
4895
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4896
 
-
 
4897
  def __eq__(self, other):
-
 
4898
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4899
 
-
 
4900
  def __ne__(self, other):
-
 
4901
    return not (self == other)
-
 
4902
 
-
 
4903
class closePO_result:
-
 
4904
  """
-
 
4905
  Attributes:
-
 
4906
   - e
-
 
4907
  """
-
 
4908
 
-
 
4909
  thrift_spec = (
-
 
4910
    None, # 0
-
 
4911
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
-
 
4912
  )
-
 
4913
 
-
 
4914
  def __init__(self, e=None,):
-
 
4915
    self.e = e
-
 
4916
 
-
 
4917
  def read(self, iprot):
-
 
4918
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4919
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4920
      return
-
 
4921
    iprot.readStructBegin()
-
 
4922
    while True:
-
 
4923
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4924
      if ftype == TType.STOP:
-
 
4925
        break
-
 
4926
      if fid == 1:
-
 
4927
        if ftype == TType.STRUCT:
-
 
4928
          self.e = PurchaseServiceException()
-
 
4929
          self.e.read(iprot)
-
 
4930
        else:
-
 
4931
          iprot.skip(ftype)
-
 
4932
      else:
-
 
4933
        iprot.skip(ftype)
-
 
4934
      iprot.readFieldEnd()
-
 
4935
    iprot.readStructEnd()
-
 
4936
 
-
 
4937
  def write(self, oprot):
-
 
4938
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4939
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4940
      return
-
 
4941
    oprot.writeStructBegin('closePO_result')
-
 
4942
    if self.e is not None:
-
 
4943
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
-
 
4944
      self.e.write(oprot)
-
 
4945
      oprot.writeFieldEnd()
-
 
4946
    oprot.writeFieldStop()
-
 
4947
    oprot.writeStructEnd()
-
 
4948
 
-
 
4949
  def validate(self):
-
 
4950
    return
-
 
4951
 
-
 
4952
 
-
 
4953
  def __repr__(self):
-
 
4954
    L = ['%s=%r' % (key, value)
-
 
4955
      for key, value in self.__dict__.iteritems()]
-
 
4956
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4957
 
-
 
4958
  def __eq__(self, other):
-
 
4959
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4960
 
-
 
4961
  def __ne__(self, other):
-
 
4962
    return not (self == other)
-
 
4963
 
-
 
4964
class isInvoiceReceived_args:
-
 
4965
  """
-
 
4966
  Attributes:
-
 
4967
   - invoiceNumber
-
 
4968
   - supplierId
-
 
4969
  """
-
 
4970
 
-
 
4971
  thrift_spec = (
-
 
4972
    None, # 0
-
 
4973
    (1, TType.STRING, 'invoiceNumber', None, None, ), # 1
-
 
4974
    (2, TType.I64, 'supplierId', None, None, ), # 2
-
 
4975
  )
-
 
4976
 
-
 
4977
  def __init__(self, invoiceNumber=None, supplierId=None,):
-
 
4978
    self.invoiceNumber = invoiceNumber
-
 
4979
    self.supplierId = supplierId
-
 
4980
 
-
 
4981
  def read(self, iprot):
-
 
4982
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4983
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4984
      return
-
 
4985
    iprot.readStructBegin()
-
 
4986
    while True:
-
 
4987
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4988
      if ftype == TType.STOP:
-
 
4989
        break
-
 
4990
      if fid == 1:
-
 
4991
        if ftype == TType.STRING:
-
 
4992
          self.invoiceNumber = iprot.readString();
-
 
4993
        else:
-
 
4994
          iprot.skip(ftype)
-
 
4995
      elif fid == 2:
-
 
4996
        if ftype == TType.I64:
-
 
4997
          self.supplierId = iprot.readI64();
-
 
4998
        else:
-
 
4999
          iprot.skip(ftype)
-
 
5000
      else:
-
 
5001
        iprot.skip(ftype)
-
 
5002
      iprot.readFieldEnd()
-
 
5003
    iprot.readStructEnd()
-
 
5004
 
-
 
5005
  def write(self, oprot):
-
 
5006
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5007
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5008
      return
-
 
5009
    oprot.writeStructBegin('isInvoiceReceived_args')
-
 
5010
    if self.invoiceNumber is not None:
-
 
5011
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 1)
-
 
5012
      oprot.writeString(self.invoiceNumber)
-
 
5013
      oprot.writeFieldEnd()
-
 
5014
    if self.supplierId is not None:
-
 
5015
      oprot.writeFieldBegin('supplierId', TType.I64, 2)
-
 
5016
      oprot.writeI64(self.supplierId)
-
 
5017
      oprot.writeFieldEnd()
-
 
5018
    oprot.writeFieldStop()
-
 
5019
    oprot.writeStructEnd()
-
 
5020
 
-
 
5021
  def validate(self):
-
 
5022
    return
-
 
5023
 
-
 
5024
 
-
 
5025
  def __repr__(self):
-
 
5026
    L = ['%s=%r' % (key, value)
-
 
5027
      for key, value in self.__dict__.iteritems()]
-
 
5028
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5029
 
-
 
5030
  def __eq__(self, other):
-
 
5031
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5032
 
-
 
5033
  def __ne__(self, other):
-
 
5034
    return not (self == other)
-
 
5035
 
-
 
5036
class isInvoiceReceived_result:
-
 
5037
  """
-
 
5038
  Attributes:
-
 
5039
   - success
-
 
5040
  """
-
 
5041
 
-
 
5042
  thrift_spec = (
-
 
5043
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
5044
  )
-
 
5045
 
-
 
5046
  def __init__(self, success=None,):
-
 
5047
    self.success = success
-
 
5048
 
-
 
5049
  def read(self, iprot):
-
 
5050
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5051
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5052
      return
-
 
5053
    iprot.readStructBegin()
-
 
5054
    while True:
-
 
5055
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5056
      if ftype == TType.STOP:
-
 
5057
        break
-
 
5058
      if fid == 0:
-
 
5059
        if ftype == TType.BOOL:
-
 
5060
          self.success = iprot.readBool();
-
 
5061
        else:
-
 
5062
          iprot.skip(ftype)
-
 
5063
      else:
-
 
5064
        iprot.skip(ftype)
-
 
5065
      iprot.readFieldEnd()
-
 
5066
    iprot.readStructEnd()
-
 
5067
 
-
 
5068
  def write(self, oprot):
-
 
5069
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5070
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5071
      return
-
 
5072
    oprot.writeStructBegin('isInvoiceReceived_result')
-
 
5073
    if self.success is not None:
-
 
5074
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
5075
      oprot.writeBool(self.success)
-
 
5076
      oprot.writeFieldEnd()
-
 
5077
    oprot.writeFieldStop()
-
 
5078
    oprot.writeStructEnd()
-
 
5079
 
-
 
5080
  def validate(self):
-
 
5081
    return
4507
 
5082
 
4508
 
5083
 
4509
  def __repr__(self):
5084
  def __repr__(self):
4510
    L = ['%s=%r' % (key, value)
5085
    L = ['%s=%r' % (key, value)
4511
      for key, value in self.__dict__.iteritems()]
5086
      for key, value in self.__dict__.iteritems()]