Subversion Repositories SmartDukaan

Rev

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

Rev 6630 Rev 6762
Line 218... Line 218...
218
     - invoiceNumber
218
     - invoiceNumber
219
     - supplierId
219
     - supplierId
220
    """
220
    """
221
    pass
221
    pass
222
 
222
 
-
 
223
  def createPurchaseForOurExtBilling(self, invoiceNumber, unitPrice, itemId):
-
 
224
    """
-
 
225
     * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
-
 
226
    *
-
 
227
 
-
 
228
    Parameters:
-
 
229
     - invoiceNumber
-
 
230
     - unitPrice
-
 
231
     - itemId
-
 
232
    """
-
 
233
    pass
-
 
234
 
-
 
235
  def fulfillPOForExtBilling(self, itemId, quantity):
-
 
236
    """
-
 
237
    Parameters:
-
 
238
     - itemId
-
 
239
     - quantity
-
 
240
    """
-
 
241
    pass
-
 
242
 
223
 
243
 
224
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
244
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
225
  def __init__(self, iprot, oprot=None):
245
  def __init__(self, iprot, oprot=None):
226
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
246
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
227
 
247
 
Line 954... Line 974...
954
    self._iprot.readMessageEnd()
974
    self._iprot.readMessageEnd()
955
    if result.success is not None:
975
    if result.success is not None:
956
      return result.success
976
      return result.success
957
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
977
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
958
 
978
 
-
 
979
  def createPurchaseForOurExtBilling(self, invoiceNumber, unitPrice, itemId):
-
 
980
    """
-
 
981
     * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
-
 
982
    *
-
 
983
 
-
 
984
    Parameters:
-
 
985
     - invoiceNumber
-
 
986
     - unitPrice
-
 
987
     - itemId
-
 
988
    """
-
 
989
    self.send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, itemId)
-
 
990
    return self.recv_createPurchaseForOurExtBilling()
-
 
991
 
-
 
992
  def send_createPurchaseForOurExtBilling(self, invoiceNumber, unitPrice, itemId):
-
 
993
    self._oprot.writeMessageBegin('createPurchaseForOurExtBilling', TMessageType.CALL, self._seqid)
-
 
994
    args = createPurchaseForOurExtBilling_args()
-
 
995
    args.invoiceNumber = invoiceNumber
-
 
996
    args.unitPrice = unitPrice
-
 
997
    args.itemId = itemId
-
 
998
    args.write(self._oprot)
-
 
999
    self._oprot.writeMessageEnd()
-
 
1000
    self._oprot.trans.flush()
-
 
1001
 
-
 
1002
  def recv_createPurchaseForOurExtBilling(self, ):
-
 
1003
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1004
    if mtype == TMessageType.EXCEPTION:
-
 
1005
      x = TApplicationException()
-
 
1006
      x.read(self._iprot)
-
 
1007
      self._iprot.readMessageEnd()
-
 
1008
      raise x
-
 
1009
    result = createPurchaseForOurExtBilling_result()
-
 
1010
    result.read(self._iprot)
-
 
1011
    self._iprot.readMessageEnd()
-
 
1012
    if result.success is not None:
-
 
1013
      return result.success
-
 
1014
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
-
 
1015
 
-
 
1016
  def fulfillPOForExtBilling(self, itemId, quantity):
-
 
1017
    """
-
 
1018
    Parameters:
-
 
1019
     - itemId
-
 
1020
     - quantity
-
 
1021
    """
-
 
1022
    self.send_fulfillPOForExtBilling(itemId, quantity)
-
 
1023
    self.recv_fulfillPOForExtBilling()
-
 
1024
 
-
 
1025
  def send_fulfillPOForExtBilling(self, itemId, quantity):
-
 
1026
    self._oprot.writeMessageBegin('fulfillPOForExtBilling', TMessageType.CALL, self._seqid)
-
 
1027
    args = fulfillPOForExtBilling_args()
-
 
1028
    args.itemId = itemId
-
 
1029
    args.quantity = quantity
-
 
1030
    args.write(self._oprot)
-
 
1031
    self._oprot.writeMessageEnd()
-
 
1032
    self._oprot.trans.flush()
-
 
1033
 
-
 
1034
  def recv_fulfillPOForExtBilling(self, ):
-
 
1035
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1036
    if mtype == TMessageType.EXCEPTION:
-
 
1037
      x = TApplicationException()
-
 
1038
      x.read(self._iprot)
-
 
1039
      self._iprot.readMessageEnd()
-
 
1040
      raise x
-
 
1041
    result = fulfillPOForExtBilling_result()
-
 
1042
    result.read(self._iprot)
-
 
1043
    self._iprot.readMessageEnd()
-
 
1044
    return
-
 
1045
 
959
 
1046
 
960
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1047
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
961
  def __init__(self, handler):
1048
  def __init__(self, handler):
962
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1049
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
963
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
1050
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
Line 980... Line 1067...
980
    self._processMap["updateSupplier"] = Processor.process_updateSupplier
1067
    self._processMap["updateSupplier"] = Processor.process_updateSupplier
981
    self._processMap["createPurchaseReturn"] = Processor.process_createPurchaseReturn
1068
    self._processMap["createPurchaseReturn"] = Processor.process_createPurchaseReturn
982
    self._processMap["settlePurchaseReturn"] = Processor.process_settlePurchaseReturn
1069
    self._processMap["settlePurchaseReturn"] = Processor.process_settlePurchaseReturn
983
    self._processMap["getUnsettledPurchaseReturns"] = Processor.process_getUnsettledPurchaseReturns
1070
    self._processMap["getUnsettledPurchaseReturns"] = Processor.process_getUnsettledPurchaseReturns
984
    self._processMap["getInvoice"] = Processor.process_getInvoice
1071
    self._processMap["getInvoice"] = Processor.process_getInvoice
-
 
1072
    self._processMap["createPurchaseForOurExtBilling"] = Processor.process_createPurchaseForOurExtBilling
-
 
1073
    self._processMap["fulfillPOForExtBilling"] = Processor.process_fulfillPOForExtBilling
985
 
1074
 
986
  def process(self, iprot, oprot):
1075
  def process(self, iprot, oprot):
987
    (name, type, seqid) = iprot.readMessageBegin()
1076
    (name, type, seqid) = iprot.readMessageBegin()
988
    if name not in self._processMap:
1077
    if name not in self._processMap:
989
      iprot.skip(TType.STRUCT)
1078
      iprot.skip(TType.STRUCT)
Line 1280... Line 1369...
1280
    oprot.writeMessageBegin("getInvoice", TMessageType.REPLY, seqid)
1369
    oprot.writeMessageBegin("getInvoice", TMessageType.REPLY, seqid)
1281
    result.write(oprot)
1370
    result.write(oprot)
1282
    oprot.writeMessageEnd()
1371
    oprot.writeMessageEnd()
1283
    oprot.trans.flush()
1372
    oprot.trans.flush()
1284
 
1373
 
-
 
1374
  def process_createPurchaseForOurExtBilling(self, seqid, iprot, oprot):
-
 
1375
    args = createPurchaseForOurExtBilling_args()
-
 
1376
    args.read(iprot)
-
 
1377
    iprot.readMessageEnd()
-
 
1378
    result = createPurchaseForOurExtBilling_result()
-
 
1379
    result.success = self._handler.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.itemId)
-
 
1380
    oprot.writeMessageBegin("createPurchaseForOurExtBilling", TMessageType.REPLY, seqid)
-
 
1381
    result.write(oprot)
-
 
1382
    oprot.writeMessageEnd()
-
 
1383
    oprot.trans.flush()
-
 
1384
 
-
 
1385
  def process_fulfillPOForExtBilling(self, seqid, iprot, oprot):
-
 
1386
    args = fulfillPOForExtBilling_args()
-
 
1387
    args.read(iprot)
-
 
1388
    iprot.readMessageEnd()
-
 
1389
    result = fulfillPOForExtBilling_result()
-
 
1390
    self._handler.fulfillPOForExtBilling(args.itemId, args.quantity)
-
 
1391
    oprot.writeMessageBegin("fulfillPOForExtBilling", TMessageType.REPLY, seqid)
-
 
1392
    result.write(oprot)
-
 
1393
    oprot.writeMessageEnd()
-
 
1394
    oprot.trans.flush()
-
 
1395
 
1285
 
1396
 
1286
# HELPER FUNCTIONS AND STRUCTURES
1397
# HELPER FUNCTIONS AND STRUCTURES
1287
 
1398
 
1288
class createPurchaseOrder_args:
1399
class createPurchaseOrder_args:
1289
  """
1400
  """
Line 4134... Line 4245...
4134
    oprot.writeFieldStop()
4245
    oprot.writeFieldStop()
4135
    oprot.writeStructEnd()
4246
    oprot.writeStructEnd()
4136
 
4247
 
4137
  def validate(self):
4248
  def validate(self):
4138
    return
4249
    return
-
 
4250
 
-
 
4251
 
-
 
4252
  def __repr__(self):
-
 
4253
    L = ['%s=%r' % (key, value)
-
 
4254
      for key, value in self.__dict__.iteritems()]
-
 
4255
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4256
 
-
 
4257
  def __eq__(self, other):
-
 
4258
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4259
 
-
 
4260
  def __ne__(self, other):
-
 
4261
    return not (self == other)
-
 
4262
 
-
 
4263
class createPurchaseForOurExtBilling_args:
-
 
4264
  """
-
 
4265
  Attributes:
-
 
4266
   - invoiceNumber
-
 
4267
   - unitPrice
-
 
4268
   - itemId
-
 
4269
  """
-
 
4270
 
-
 
4271
  thrift_spec = (
-
 
4272
    None, # 0
-
 
4273
    (1, TType.STRING, 'invoiceNumber', None, None, ), # 1
-
 
4274
    (2, TType.DOUBLE, 'unitPrice', None, None, ), # 2
-
 
4275
    (3, TType.I64, 'itemId', None, None, ), # 3
-
 
4276
  )
-
 
4277
 
-
 
4278
  def __init__(self, invoiceNumber=None, unitPrice=None, itemId=None,):
-
 
4279
    self.invoiceNumber = invoiceNumber
-
 
4280
    self.unitPrice = unitPrice
-
 
4281
    self.itemId = itemId
-
 
4282
 
-
 
4283
  def read(self, iprot):
-
 
4284
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4285
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4286
      return
-
 
4287
    iprot.readStructBegin()
-
 
4288
    while True:
-
 
4289
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4290
      if ftype == TType.STOP:
-
 
4291
        break
-
 
4292
      if fid == 1:
-
 
4293
        if ftype == TType.STRING:
-
 
4294
          self.invoiceNumber = iprot.readString();
-
 
4295
        else:
-
 
4296
          iprot.skip(ftype)
-
 
4297
      elif fid == 2:
-
 
4298
        if ftype == TType.DOUBLE:
-
 
4299
          self.unitPrice = iprot.readDouble();
-
 
4300
        else:
-
 
4301
          iprot.skip(ftype)
-
 
4302
      elif fid == 3:
-
 
4303
        if ftype == TType.I64:
-
 
4304
          self.itemId = iprot.readI64();
-
 
4305
        else:
-
 
4306
          iprot.skip(ftype)
-
 
4307
      else:
-
 
4308
        iprot.skip(ftype)
-
 
4309
      iprot.readFieldEnd()
-
 
4310
    iprot.readStructEnd()
-
 
4311
 
-
 
4312
  def write(self, oprot):
-
 
4313
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4314
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4315
      return
-
 
4316
    oprot.writeStructBegin('createPurchaseForOurExtBilling_args')
-
 
4317
    if self.invoiceNumber is not None:
-
 
4318
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 1)
-
 
4319
      oprot.writeString(self.invoiceNumber)
-
 
4320
      oprot.writeFieldEnd()
-
 
4321
    if self.unitPrice is not None:
-
 
4322
      oprot.writeFieldBegin('unitPrice', TType.DOUBLE, 2)
-
 
4323
      oprot.writeDouble(self.unitPrice)
-
 
4324
      oprot.writeFieldEnd()
-
 
4325
    if self.itemId is not None:
-
 
4326
      oprot.writeFieldBegin('itemId', TType.I64, 3)
-
 
4327
      oprot.writeI64(self.itemId)
-
 
4328
      oprot.writeFieldEnd()
-
 
4329
    oprot.writeFieldStop()
-
 
4330
    oprot.writeStructEnd()
-
 
4331
 
-
 
4332
  def validate(self):
-
 
4333
    return
-
 
4334
 
-
 
4335
 
-
 
4336
  def __repr__(self):
-
 
4337
    L = ['%s=%r' % (key, value)
-
 
4338
      for key, value in self.__dict__.iteritems()]
-
 
4339
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4340
 
-
 
4341
  def __eq__(self, other):
-
 
4342
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4343
 
-
 
4344
  def __ne__(self, other):
-
 
4345
    return not (self == other)
-
 
4346
 
-
 
4347
class createPurchaseForOurExtBilling_result:
-
 
4348
  """
-
 
4349
  Attributes:
-
 
4350
   - success
-
 
4351
  """
-
 
4352
 
-
 
4353
  thrift_spec = (
-
 
4354
    (0, TType.I64, 'success', None, None, ), # 0
-
 
4355
  )
-
 
4356
 
-
 
4357
  def __init__(self, success=None,):
-
 
4358
    self.success = success
-
 
4359
 
-
 
4360
  def read(self, iprot):
-
 
4361
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4362
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4363
      return
-
 
4364
    iprot.readStructBegin()
-
 
4365
    while True:
-
 
4366
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4367
      if ftype == TType.STOP:
-
 
4368
        break
-
 
4369
      if fid == 0:
-
 
4370
        if ftype == TType.I64:
-
 
4371
          self.success = iprot.readI64();
-
 
4372
        else:
-
 
4373
          iprot.skip(ftype)
-
 
4374
      else:
-
 
4375
        iprot.skip(ftype)
-
 
4376
      iprot.readFieldEnd()
-
 
4377
    iprot.readStructEnd()
-
 
4378
 
-
 
4379
  def write(self, oprot):
-
 
4380
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4381
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4382
      return
-
 
4383
    oprot.writeStructBegin('createPurchaseForOurExtBilling_result')
-
 
4384
    if self.success is not None:
-
 
4385
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
4386
      oprot.writeI64(self.success)
-
 
4387
      oprot.writeFieldEnd()
-
 
4388
    oprot.writeFieldStop()
-
 
4389
    oprot.writeStructEnd()
-
 
4390
 
-
 
4391
  def validate(self):
-
 
4392
    return
-
 
4393
 
-
 
4394
 
-
 
4395
  def __repr__(self):
-
 
4396
    L = ['%s=%r' % (key, value)
-
 
4397
      for key, value in self.__dict__.iteritems()]
-
 
4398
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4399
 
-
 
4400
  def __eq__(self, other):
-
 
4401
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4402
 
-
 
4403
  def __ne__(self, other):
-
 
4404
    return not (self == other)
-
 
4405
 
-
 
4406
class fulfillPOForExtBilling_args:
-
 
4407
  """
-
 
4408
  Attributes:
-
 
4409
   - itemId
-
 
4410
   - quantity
-
 
4411
  """
-
 
4412
 
-
 
4413
  thrift_spec = (
-
 
4414
    None, # 0
-
 
4415
    (1, TType.I64, 'itemId', None, None, ), # 1
-
 
4416
    (2, TType.I64, 'quantity', None, None, ), # 2
-
 
4417
  )
-
 
4418
 
-
 
4419
  def __init__(self, itemId=None, quantity=None,):
-
 
4420
    self.itemId = itemId
-
 
4421
    self.quantity = quantity
-
 
4422
 
-
 
4423
  def read(self, iprot):
-
 
4424
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4425
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4426
      return
-
 
4427
    iprot.readStructBegin()
-
 
4428
    while True:
-
 
4429
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4430
      if ftype == TType.STOP:
-
 
4431
        break
-
 
4432
      if fid == 1:
-
 
4433
        if ftype == TType.I64:
-
 
4434
          self.itemId = iprot.readI64();
-
 
4435
        else:
-
 
4436
          iprot.skip(ftype)
-
 
4437
      elif fid == 2:
-
 
4438
        if ftype == TType.I64:
-
 
4439
          self.quantity = iprot.readI64();
-
 
4440
        else:
-
 
4441
          iprot.skip(ftype)
-
 
4442
      else:
-
 
4443
        iprot.skip(ftype)
-
 
4444
      iprot.readFieldEnd()
-
 
4445
    iprot.readStructEnd()
-
 
4446
 
-
 
4447
  def write(self, oprot):
-
 
4448
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4449
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4450
      return
-
 
4451
    oprot.writeStructBegin('fulfillPOForExtBilling_args')
-
 
4452
    if self.itemId is not None:
-
 
4453
      oprot.writeFieldBegin('itemId', TType.I64, 1)
-
 
4454
      oprot.writeI64(self.itemId)
-
 
4455
      oprot.writeFieldEnd()
-
 
4456
    if self.quantity is not None:
-
 
4457
      oprot.writeFieldBegin('quantity', TType.I64, 2)
-
 
4458
      oprot.writeI64(self.quantity)
-
 
4459
      oprot.writeFieldEnd()
-
 
4460
    oprot.writeFieldStop()
-
 
4461
    oprot.writeStructEnd()
-
 
4462
 
-
 
4463
  def validate(self):
-
 
4464
    return
-
 
4465
 
-
 
4466
 
-
 
4467
  def __repr__(self):
-
 
4468
    L = ['%s=%r' % (key, value)
-
 
4469
      for key, value in self.__dict__.iteritems()]
-
 
4470
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4471
 
-
 
4472
  def __eq__(self, other):
-
 
4473
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4474
 
-
 
4475
  def __ne__(self, other):
-
 
4476
    return not (self == other)
-
 
4477
 
-
 
4478
class fulfillPOForExtBilling_result:
-
 
4479
 
-
 
4480
  thrift_spec = (
-
 
4481
  )
-
 
4482
 
-
 
4483
  def read(self, iprot):
-
 
4484
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4485
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4486
      return
-
 
4487
    iprot.readStructBegin()
-
 
4488
    while True:
-
 
4489
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4490
      if ftype == TType.STOP:
-
 
4491
        break
-
 
4492
      else:
-
 
4493
        iprot.skip(ftype)
-
 
4494
      iprot.readFieldEnd()
-
 
4495
    iprot.readStructEnd()
-
 
4496
 
-
 
4497
  def write(self, oprot):
-
 
4498
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4499
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4500
      return
-
 
4501
    oprot.writeStructBegin('fulfillPOForExtBilling_result')
-
 
4502
    oprot.writeFieldStop()
-
 
4503
    oprot.writeStructEnd()
-
 
4504
 
-
 
4505
  def validate(self):
-
 
4506
    return
4139
 
4507
 
4140
 
4508
 
4141
  def __repr__(self):
4509
  def __repr__(self):
4142
    L = ['%s=%r' % (key, value)
4510
    L = ['%s=%r' % (key, value)
4143
      for key, value in self.__dict__.iteritems()]
4511
      for key, value in self.__dict__.iteritems()]