Subversion Repositories SmartDukaan

Rev

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

Rev 5944 Rev 5966
Line 126... Line 126...
126
    Parameters:
126
    Parameters:
127
     - warehouse_id
127
     - warehouse_id
128
    """
128
    """
129
    pass
129
    pass
130
 
130
 
131
  def reserveItemInWarehouse(self, itemId, warehouseId, quantity):
131
  def isOrderBillable(self, itemId, warehouseId, sourceId, orderId):
-
 
132
    """
-
 
133
    Depending on reservation in the table, verify if we can bill this order or not.
-
 
134
 
-
 
135
    Parameters:
-
 
136
     - itemId
-
 
137
     - warehouseId
-
 
138
     - sourceId
-
 
139
     - orderId
-
 
140
    """
-
 
141
    pass
-
 
142
 
-
 
143
  def reserveItemInWarehouse(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
132
    """
144
    """
133
    Increases the reservation count for an item in a warehouse. Should always succeed normally.
145
    Increases the reservation count for an item in a warehouse. Should always succeed normally.
134
 
146
 
135
    Parameters:
147
    Parameters:
136
     - itemId
148
     - itemId
137
     - warehouseId
149
     - warehouseId
-
 
150
     - sourceId
-
 
151
     - orderId
-
 
152
     - createdTimestamp
-
 
153
     - promisedShippingTimestamp
138
     - quantity
154
     - quantity
139
    """
155
    """
140
    pass
156
    pass
141
 
157
 
142
  def reduceReservationCount(self, itemId, warehouseId, quantity):
158
  def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
143
    """
159
    """
144
    Decreases the reservation count for an item in a warehouse. Should always succeed normally.
160
    Decreases the reservation count for an item in a warehouse. Should always succeed normally.
145
 
161
 
146
    Parameters:
162
    Parameters:
147
     - itemId
163
     - itemId
148
     - warehouseId
164
     - warehouseId
-
 
165
     - sourceId
-
 
166
     - orderId
149
     - quantity
167
     - quantity
150
    """
168
    """
151
    pass
169
    pass
152
 
170
 
153
  def getItemPricing(self, itemId, vendorId):
171
  def getItemPricing(self, itemId, vendorId):
Line 752... Line 770...
752
      return result.success
770
      return result.success
753
    if result.cex is not None:
771
    if result.cex is not None:
754
      raise result.cex
772
      raise result.cex
755
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllItemsForWarehouse failed: unknown result");
773
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllItemsForWarehouse failed: unknown result");
756
 
774
 
757
  def reserveItemInWarehouse(self, itemId, warehouseId, quantity):
775
  def isOrderBillable(self, itemId, warehouseId, sourceId, orderId):
-
 
776
    """
-
 
777
    Depending on reservation in the table, verify wether we can bill this order or not.
-
 
778
 
-
 
779
    Parameters:
-
 
780
     - itemId
-
 
781
     - warehouseId
-
 
782
     - sourceId
-
 
783
     - orderId
-
 
784
    """
-
 
785
    self.send_isOrderBillable(itemId, warehouseId, sourceId, orderId)
-
 
786
    return self.recv_isOrderBillable()
-
 
787
 
-
 
788
  def send_isOrderBillable(self, itemId, warehouseId, sourceId, orderId):
-
 
789
    self._oprot.writeMessageBegin('isOrderBillable', TMessageType.CALL, self._seqid)
-
 
790
    args = isOrderBillable_args()
-
 
791
    args.itemId = itemId
-
 
792
    args.warehouseId = warehouseId
-
 
793
    args.sourceId = sourceId
-
 
794
    args.orderId = orderId
-
 
795
    args.write(self._oprot)
-
 
796
    self._oprot.writeMessageEnd()
-
 
797
    self._oprot.trans.flush()
-
 
798
 
-
 
799
  def recv_isOrderBillable(self, ):
-
 
800
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
801
    if mtype == TMessageType.EXCEPTION:
-
 
802
      x = TApplicationException()
-
 
803
      x.read(self._iprot)
-
 
804
      self._iprot.readMessageEnd()
-
 
805
      raise x
-
 
806
    result = isOrderBillable_result()
-
 
807
    result.read(self._iprot)
-
 
808
    self._iprot.readMessageEnd()
-
 
809
    if result.success is not None:
-
 
810
      return result.success
-
 
811
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isOrderBillable failed: unknown result");
-
 
812
 
-
 
813
  def reserveItemInWarehouse(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
758
    """
814
    """
759
    Increases the reservation count for an item in a warehouse. Should always succeed normally.
815
    Increases the reservation count for an item in a warehouse. Should always succeed normally.
760
 
816
 
761
    Parameters:
817
    Parameters:
762
     - itemId
818
     - itemId
763
     - warehouseId
819
     - warehouseId
-
 
820
     - sourceId
-
 
821
     - orderId
-
 
822
     - createdTimestamp
-
 
823
     - promisedShippingTimestamp
764
     - quantity
824
     - quantity
765
    """
825
    """
766
    self.send_reserveItemInWarehouse(itemId, warehouseId, quantity)
826
    self.send_reserveItemInWarehouse(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity)
767
    return self.recv_reserveItemInWarehouse()
827
    return self.recv_reserveItemInWarehouse()
768
 
828
 
769
  def send_reserveItemInWarehouse(self, itemId, warehouseId, quantity):
829
  def send_reserveItemInWarehouse(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
770
    self._oprot.writeMessageBegin('reserveItemInWarehouse', TMessageType.CALL, self._seqid)
830
    self._oprot.writeMessageBegin('reserveItemInWarehouse', TMessageType.CALL, self._seqid)
771
    args = reserveItemInWarehouse_args()
831
    args = reserveItemInWarehouse_args()
772
    args.itemId = itemId
832
    args.itemId = itemId
773
    args.warehouseId = warehouseId
833
    args.warehouseId = warehouseId
-
 
834
    args.sourceId = sourceId
-
 
835
    args.orderId = orderId
-
 
836
    args.createdTimestamp = createdTimestamp
-
 
837
    args.promisedShippingTimestamp = promisedShippingTimestamp
774
    args.quantity = quantity
838
    args.quantity = quantity
775
    args.write(self._oprot)
839
    args.write(self._oprot)
776
    self._oprot.writeMessageEnd()
840
    self._oprot.writeMessageEnd()
777
    self._oprot.trans.flush()
841
    self._oprot.trans.flush()
778
 
842
 
Line 790... Line 854...
790
      return result.success
854
      return result.success
791
    if result.cex is not None:
855
    if result.cex is not None:
792
      raise result.cex
856
      raise result.cex
793
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reserveItemInWarehouse failed: unknown result");
857
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reserveItemInWarehouse failed: unknown result");
794
 
858
 
795
  def reduceReservationCount(self, itemId, warehouseId, quantity):
859
  def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
796
    """
860
    """
797
    Decreases the reservation count for an item in a warehouse. Should always succeed normally.
861
    Decreases the reservation count for an item in a warehouse. Should always succeed normally.
798
 
862
 
799
    Parameters:
863
    Parameters:
800
     - itemId
864
     - itemId
801
     - warehouseId
865
     - warehouseId
-
 
866
     - sourceId
-
 
867
     - orderId
802
     - quantity
868
     - quantity
803
    """
869
    """
804
    self.send_reduceReservationCount(itemId, warehouseId, quantity)
870
    self.send_reduceReservationCount(itemId, warehouseId, sourceId, orderId, quantity)
805
    return self.recv_reduceReservationCount()
871
    return self.recv_reduceReservationCount()
806
 
872
 
807
  def send_reduceReservationCount(self, itemId, warehouseId, quantity):
873
  def send_reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
808
    self._oprot.writeMessageBegin('reduceReservationCount', TMessageType.CALL, self._seqid)
874
    self._oprot.writeMessageBegin('reduceReservationCount', TMessageType.CALL, self._seqid)
809
    args = reduceReservationCount_args()
875
    args = reduceReservationCount_args()
810
    args.itemId = itemId
876
    args.itemId = itemId
811
    args.warehouseId = warehouseId
877
    args.warehouseId = warehouseId
-
 
878
    args.sourceId = sourceId
-
 
879
    args.orderId = orderId
812
    args.quantity = quantity
880
    args.quantity = quantity
813
    args.write(self._oprot)
881
    args.write(self._oprot)
814
    self._oprot.writeMessageEnd()
882
    self._oprot.writeMessageEnd()
815
    self._oprot.trans.flush()
883
    self._oprot.trans.flush()
816
 
884
 
Line 1501... Line 1569...
1501
    self._processMap["getItemAvailibilityAtWarehouse"] = Processor.process_getItemAvailibilityAtWarehouse
1569
    self._processMap["getItemAvailibilityAtWarehouse"] = Processor.process_getItemAvailibilityAtWarehouse
1502
    self._processMap["getItemAvailabilityAtLocation"] = Processor.process_getItemAvailabilityAtLocation
1570
    self._processMap["getItemAvailabilityAtLocation"] = Processor.process_getItemAvailabilityAtLocation
1503
    self._processMap["getAllWarehouses"] = Processor.process_getAllWarehouses
1571
    self._processMap["getAllWarehouses"] = Processor.process_getAllWarehouses
1504
    self._processMap["getWarehouse"] = Processor.process_getWarehouse
1572
    self._processMap["getWarehouse"] = Processor.process_getWarehouse
1505
    self._processMap["getAllItemsForWarehouse"] = Processor.process_getAllItemsForWarehouse
1573
    self._processMap["getAllItemsForWarehouse"] = Processor.process_getAllItemsForWarehouse
-
 
1574
    self._processMap["isOrderBillable"] = Processor.process_isOrderBillable
1506
    self._processMap["reserveItemInWarehouse"] = Processor.process_reserveItemInWarehouse
1575
    self._processMap["reserveItemInWarehouse"] = Processor.process_reserveItemInWarehouse
1507
    self._processMap["reduceReservationCount"] = Processor.process_reduceReservationCount
1576
    self._processMap["reduceReservationCount"] = Processor.process_reduceReservationCount
1508
    self._processMap["getItemPricing"] = Processor.process_getItemPricing
1577
    self._processMap["getItemPricing"] = Processor.process_getItemPricing
1509
    self._processMap["getAllItemPricing"] = Processor.process_getAllItemPricing
1578
    self._processMap["getAllItemPricing"] = Processor.process_getAllItemPricing
1510
    self._processMap["addVendorItemPricing"] = Processor.process_addVendorItemPricing
1579
    self._processMap["addVendorItemPricing"] = Processor.process_addVendorItemPricing
Line 1707... Line 1776...
1707
    oprot.writeMessageBegin("getAllItemsForWarehouse", TMessageType.REPLY, seqid)
1776
    oprot.writeMessageBegin("getAllItemsForWarehouse", TMessageType.REPLY, seqid)
1708
    result.write(oprot)
1777
    result.write(oprot)
1709
    oprot.writeMessageEnd()
1778
    oprot.writeMessageEnd()
1710
    oprot.trans.flush()
1779
    oprot.trans.flush()
1711
 
1780
 
-
 
1781
  def process_isOrderBillable(self, seqid, iprot, oprot):
-
 
1782
    args = isOrderBillable_args()
-
 
1783
    args.read(iprot)
-
 
1784
    iprot.readMessageEnd()
-
 
1785
    result = isOrderBillable_result()
-
 
1786
    result.success = self._handler.isOrderBillable(args.itemId, args.warehouseId, args.sourceId, args.orderId)
-
 
1787
    oprot.writeMessageBegin("isOrderBillable", TMessageType.REPLY, seqid)
-
 
1788
    result.write(oprot)
-
 
1789
    oprot.writeMessageEnd()
-
 
1790
    oprot.trans.flush()
-
 
1791
 
1712
  def process_reserveItemInWarehouse(self, seqid, iprot, oprot):
1792
  def process_reserveItemInWarehouse(self, seqid, iprot, oprot):
1713
    args = reserveItemInWarehouse_args()
1793
    args = reserveItemInWarehouse_args()
1714
    args.read(iprot)
1794
    args.read(iprot)
1715
    iprot.readMessageEnd()
1795
    iprot.readMessageEnd()
1716
    result = reserveItemInWarehouse_result()
1796
    result = reserveItemInWarehouse_result()
1717
    try:
1797
    try:
1718
      result.success = self._handler.reserveItemInWarehouse(args.itemId, args.warehouseId, args.quantity)
1798
      result.success = self._handler.reserveItemInWarehouse(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.createdTimestamp, args.promisedShippingTimestamp, args.quantity)
1719
    except InventoryServiceException, cex:
1799
    except InventoryServiceException, cex:
1720
      result.cex = cex
1800
      result.cex = cex
1721
    oprot.writeMessageBegin("reserveItemInWarehouse", TMessageType.REPLY, seqid)
1801
    oprot.writeMessageBegin("reserveItemInWarehouse", TMessageType.REPLY, seqid)
1722
    result.write(oprot)
1802
    result.write(oprot)
1723
    oprot.writeMessageEnd()
1803
    oprot.writeMessageEnd()
Line 1727... Line 1807...
1727
    args = reduceReservationCount_args()
1807
    args = reduceReservationCount_args()
1728
    args.read(iprot)
1808
    args.read(iprot)
1729
    iprot.readMessageEnd()
1809
    iprot.readMessageEnd()
1730
    result = reduceReservationCount_result()
1810
    result = reduceReservationCount_result()
1731
    try:
1811
    try:
1732
      result.success = self._handler.reduceReservationCount(args.itemId, args.warehouseId, args.quantity)
1812
      result.success = self._handler.reduceReservationCount(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.quantity)
1733
    except InventoryServiceException, cex:
1813
    except InventoryServiceException, cex:
1734
      result.cex = cex
1814
      result.cex = cex
1735
    oprot.writeMessageBegin("reduceReservationCount", TMessageType.REPLY, seqid)
1815
    oprot.writeMessageBegin("reduceReservationCount", TMessageType.REPLY, seqid)
1736
    result.write(oprot)
1816
    result.write(oprot)
1737
    oprot.writeMessageEnd()
1817
    oprot.writeMessageEnd()
Line 3655... Line 3735...
3655
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3735
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3656
 
3736
 
3657
  def __ne__(self, other):
3737
  def __ne__(self, other):
3658
    return not (self == other)
3738
    return not (self == other)
3659
 
3739
 
-
 
3740
class isOrderBillable_args:
-
 
3741
  """
-
 
3742
  Attributes:
-
 
3743
   - itemId
-
 
3744
   - warehouseId
-
 
3745
   - sourceId
-
 
3746
   - orderId
-
 
3747
  """
-
 
3748
 
-
 
3749
  thrift_spec = (
-
 
3750
    None, # 0
-
 
3751
    (1, TType.I64, 'itemId', None, None, ), # 1
-
 
3752
    (2, TType.I64, 'warehouseId', None, None, ), # 2
-
 
3753
    (3, TType.I64, 'sourceId', None, None, ), # 3
-
 
3754
    (4, TType.I64, 'orderId', None, None, ), # 4
-
 
3755
  )
-
 
3756
 
-
 
3757
  def __init__(self, itemId=None, warehouseId=None, sourceId=None, orderId=None,):
-
 
3758
    self.itemId = itemId
-
 
3759
    self.warehouseId = warehouseId
-
 
3760
    self.sourceId = sourceId
-
 
3761
    self.orderId = orderId
-
 
3762
 
-
 
3763
  def read(self, iprot):
-
 
3764
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3765
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3766
      return
-
 
3767
    iprot.readStructBegin()
-
 
3768
    while True:
-
 
3769
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3770
      if ftype == TType.STOP:
-
 
3771
        break
-
 
3772
      if fid == 1:
-
 
3773
        if ftype == TType.I64:
-
 
3774
          self.itemId = iprot.readI64();
-
 
3775
        else:
-
 
3776
          iprot.skip(ftype)
-
 
3777
      elif fid == 2:
-
 
3778
        if ftype == TType.I64:
-
 
3779
          self.warehouseId = iprot.readI64();
-
 
3780
        else:
-
 
3781
          iprot.skip(ftype)
-
 
3782
      elif fid == 3:
-
 
3783
        if ftype == TType.I64:
-
 
3784
          self.sourceId = iprot.readI64();
-
 
3785
        else:
-
 
3786
          iprot.skip(ftype)
-
 
3787
      elif fid == 4:
-
 
3788
        if ftype == TType.I64:
-
 
3789
          self.orderId = iprot.readI64();
-
 
3790
        else:
-
 
3791
          iprot.skip(ftype)
-
 
3792
      else:
-
 
3793
        iprot.skip(ftype)
-
 
3794
      iprot.readFieldEnd()
-
 
3795
    iprot.readStructEnd()
-
 
3796
 
-
 
3797
  def write(self, oprot):
-
 
3798
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3799
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3800
      return
-
 
3801
    oprot.writeStructBegin('isOrderBillable_args')
-
 
3802
    if self.itemId is not None:
-
 
3803
      oprot.writeFieldBegin('itemId', TType.I64, 1)
-
 
3804
      oprot.writeI64(self.itemId)
-
 
3805
      oprot.writeFieldEnd()
-
 
3806
    if self.warehouseId is not None:
-
 
3807
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
-
 
3808
      oprot.writeI64(self.warehouseId)
-
 
3809
      oprot.writeFieldEnd()
-
 
3810
    if self.sourceId is not None:
-
 
3811
      oprot.writeFieldBegin('sourceId', TType.I64, 3)
-
 
3812
      oprot.writeI64(self.sourceId)
-
 
3813
      oprot.writeFieldEnd()
-
 
3814
    if self.orderId is not None:
-
 
3815
      oprot.writeFieldBegin('orderId', TType.I64, 4)
-
 
3816
      oprot.writeI64(self.orderId)
-
 
3817
      oprot.writeFieldEnd()
-
 
3818
    oprot.writeFieldStop()
-
 
3819
    oprot.writeStructEnd()
-
 
3820
 
-
 
3821
  def validate(self):
-
 
3822
    return
-
 
3823
 
-
 
3824
 
-
 
3825
  def __repr__(self):
-
 
3826
    L = ['%s=%r' % (key, value)
-
 
3827
      for key, value in self.__dict__.iteritems()]
-
 
3828
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3829
 
-
 
3830
  def __eq__(self, other):
-
 
3831
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3832
 
-
 
3833
  def __ne__(self, other):
-
 
3834
    return not (self == other)
-
 
3835
 
-
 
3836
class isOrderBillable_result:
-
 
3837
  """
-
 
3838
  Attributes:
-
 
3839
   - success
-
 
3840
  """
-
 
3841
 
-
 
3842
  thrift_spec = (
-
 
3843
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
3844
  )
-
 
3845
 
-
 
3846
  def __init__(self, success=None,):
-
 
3847
    self.success = success
-
 
3848
 
-
 
3849
  def read(self, iprot):
-
 
3850
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3851
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3852
      return
-
 
3853
    iprot.readStructBegin()
-
 
3854
    while True:
-
 
3855
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3856
      if ftype == TType.STOP:
-
 
3857
        break
-
 
3858
      if fid == 0:
-
 
3859
        if ftype == TType.BOOL:
-
 
3860
          self.success = iprot.readBool();
-
 
3861
        else:
-
 
3862
          iprot.skip(ftype)
-
 
3863
      else:
-
 
3864
        iprot.skip(ftype)
-
 
3865
      iprot.readFieldEnd()
-
 
3866
    iprot.readStructEnd()
-
 
3867
 
-
 
3868
  def write(self, oprot):
-
 
3869
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3870
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3871
      return
-
 
3872
    oprot.writeStructBegin('isOrderBillable_result')
-
 
3873
    if self.success is not None:
-
 
3874
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
3875
      oprot.writeBool(self.success)
-
 
3876
      oprot.writeFieldEnd()
-
 
3877
    oprot.writeFieldStop()
-
 
3878
    oprot.writeStructEnd()
-
 
3879
 
-
 
3880
  def validate(self):
-
 
3881
    return
-
 
3882
 
-
 
3883
 
-
 
3884
  def __repr__(self):
-
 
3885
    L = ['%s=%r' % (key, value)
-
 
3886
      for key, value in self.__dict__.iteritems()]
-
 
3887
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3888
 
-
 
3889
  def __eq__(self, other):
-
 
3890
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3891
 
-
 
3892
  def __ne__(self, other):
-
 
3893
    return not (self == other)
-
 
3894
 
3660
class reserveItemInWarehouse_args:
3895
class reserveItemInWarehouse_args:
3661
  """
3896
  """
3662
  Attributes:
3897
  Attributes:
3663
   - itemId
3898
   - itemId
3664
   - warehouseId
3899
   - warehouseId
-
 
3900
   - sourceId
-
 
3901
   - orderId
-
 
3902
   - createdTimestamp
-
 
3903
   - promisedShippingTimestamp
3665
   - quantity
3904
   - quantity
3666
  """
3905
  """
3667
 
3906
 
3668
  thrift_spec = (
3907
  thrift_spec = (
3669
    None, # 0
3908
    None, # 0
3670
    (1, TType.I64, 'itemId', None, None, ), # 1
3909
    (1, TType.I64, 'itemId', None, None, ), # 1
3671
    (2, TType.I64, 'warehouseId', None, None, ), # 2
3910
    (2, TType.I64, 'warehouseId', None, None, ), # 2
-
 
3911
    (3, TType.I64, 'sourceId', None, None, ), # 3
-
 
3912
    (4, TType.I64, 'orderId', None, None, ), # 4
-
 
3913
    (5, TType.I64, 'createdTimestamp', None, None, ), # 5
-
 
3914
    (6, TType.I64, 'promisedShippingTimestamp', None, None, ), # 6
3672
    (3, TType.DOUBLE, 'quantity', None, None, ), # 3
3915
    (7, TType.DOUBLE, 'quantity', None, None, ), # 7
3673
  )
3916
  )
3674
 
3917
 
3675
  def __init__(self, itemId=None, warehouseId=None, quantity=None,):
3918
  def __init__(self, itemId=None, warehouseId=None, sourceId=None, orderId=None, createdTimestamp=None, promisedShippingTimestamp=None, quantity=None,):
3676
    self.itemId = itemId
3919
    self.itemId = itemId
3677
    self.warehouseId = warehouseId
3920
    self.warehouseId = warehouseId
-
 
3921
    self.sourceId = sourceId
-
 
3922
    self.orderId = orderId
-
 
3923
    self.createdTimestamp = createdTimestamp
-
 
3924
    self.promisedShippingTimestamp = promisedShippingTimestamp
3678
    self.quantity = quantity
3925
    self.quantity = quantity
3679
 
3926
 
3680
  def read(self, iprot):
3927
  def read(self, iprot):
3681
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3928
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3682
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3929
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
Line 3695... Line 3942...
3695
        if ftype == TType.I64:
3942
        if ftype == TType.I64:
3696
          self.warehouseId = iprot.readI64();
3943
          self.warehouseId = iprot.readI64();
3697
        else:
3944
        else:
3698
          iprot.skip(ftype)
3945
          iprot.skip(ftype)
3699
      elif fid == 3:
3946
      elif fid == 3:
-
 
3947
        if ftype == TType.I64:
-
 
3948
          self.sourceId = iprot.readI64();
-
 
3949
        else:
-
 
3950
          iprot.skip(ftype)
-
 
3951
      elif fid == 4:
-
 
3952
        if ftype == TType.I64:
-
 
3953
          self.orderId = iprot.readI64();
-
 
3954
        else:
-
 
3955
          iprot.skip(ftype)
-
 
3956
      elif fid == 5:
-
 
3957
        if ftype == TType.I64:
-
 
3958
          self.createdTimestamp = iprot.readI64();
-
 
3959
        else:
-
 
3960
          iprot.skip(ftype)
-
 
3961
      elif fid == 6:
-
 
3962
        if ftype == TType.I64:
-
 
3963
          self.promisedShippingTimestamp = iprot.readI64();
-
 
3964
        else:
-
 
3965
          iprot.skip(ftype)
-
 
3966
      elif fid == 7:
3700
        if ftype == TType.DOUBLE:
3967
        if ftype == TType.DOUBLE:
3701
          self.quantity = iprot.readDouble();
3968
          self.quantity = iprot.readDouble();
3702
        else:
3969
        else:
3703
          iprot.skip(ftype)
3970
          iprot.skip(ftype)
3704
      else:
3971
      else:
Line 3717... Line 3984...
3717
      oprot.writeFieldEnd()
3984
      oprot.writeFieldEnd()
3718
    if self.warehouseId is not None:
3985
    if self.warehouseId is not None:
3719
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
3986
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
3720
      oprot.writeI64(self.warehouseId)
3987
      oprot.writeI64(self.warehouseId)
3721
      oprot.writeFieldEnd()
3988
      oprot.writeFieldEnd()
-
 
3989
    if self.sourceId is not None:
-
 
3990
      oprot.writeFieldBegin('sourceId', TType.I64, 3)
-
 
3991
      oprot.writeI64(self.sourceId)
-
 
3992
      oprot.writeFieldEnd()
-
 
3993
    if self.orderId is not None:
-
 
3994
      oprot.writeFieldBegin('orderId', TType.I64, 4)
-
 
3995
      oprot.writeI64(self.orderId)
-
 
3996
      oprot.writeFieldEnd()
-
 
3997
    if self.createdTimestamp is not None:
-
 
3998
      oprot.writeFieldBegin('createdTimestamp', TType.I64, 5)
-
 
3999
      oprot.writeI64(self.createdTimestamp)
-
 
4000
      oprot.writeFieldEnd()
-
 
4001
    if self.promisedShippingTimestamp is not None:
-
 
4002
      oprot.writeFieldBegin('promisedShippingTimestamp', TType.I64, 6)
-
 
4003
      oprot.writeI64(self.promisedShippingTimestamp)
-
 
4004
      oprot.writeFieldEnd()
3722
    if self.quantity is not None:
4005
    if self.quantity is not None:
3723
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 3)
4006
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 7)
3724
      oprot.writeDouble(self.quantity)
4007
      oprot.writeDouble(self.quantity)
3725
      oprot.writeFieldEnd()
4008
      oprot.writeFieldEnd()
3726
    oprot.writeFieldStop()
4009
    oprot.writeFieldStop()
3727
    oprot.writeStructEnd()
4010
    oprot.writeStructEnd()
3728
 
4011
 
Line 3816... Line 4099...
3816
class reduceReservationCount_args:
4099
class reduceReservationCount_args:
3817
  """
4100
  """
3818
  Attributes:
4101
  Attributes:
3819
   - itemId
4102
   - itemId
3820
   - warehouseId
4103
   - warehouseId
-
 
4104
   - sourceId
-
 
4105
   - orderId
3821
   - quantity
4106
   - quantity
3822
  """
4107
  """
3823
 
4108
 
3824
  thrift_spec = (
4109
  thrift_spec = (
3825
    None, # 0
4110
    None, # 0
3826
    (1, TType.I64, 'itemId', None, None, ), # 1
4111
    (1, TType.I64, 'itemId', None, None, ), # 1
3827
    (2, TType.I64, 'warehouseId', None, None, ), # 2
4112
    (2, TType.I64, 'warehouseId', None, None, ), # 2
-
 
4113
    (3, TType.I64, 'sourceId', None, None, ), # 3
-
 
4114
    (4, TType.I64, 'orderId', None, None, ), # 4
3828
    (3, TType.DOUBLE, 'quantity', None, None, ), # 3
4115
    (5, TType.DOUBLE, 'quantity', None, None, ), # 5
3829
  )
4116
  )
3830
 
4117
 
3831
  def __init__(self, itemId=None, warehouseId=None, quantity=None,):
4118
  def __init__(self, itemId=None, warehouseId=None, sourceId=None, orderId=None, quantity=None,):
3832
    self.itemId = itemId
4119
    self.itemId = itemId
3833
    self.warehouseId = warehouseId
4120
    self.warehouseId = warehouseId
-
 
4121
    self.sourceId = sourceId
-
 
4122
    self.orderId = orderId
3834
    self.quantity = quantity
4123
    self.quantity = quantity
3835
 
4124
 
3836
  def read(self, iprot):
4125
  def read(self, iprot):
3837
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4126
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3838
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4127
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
Line 3851... Line 4140...
3851
        if ftype == TType.I64:
4140
        if ftype == TType.I64:
3852
          self.warehouseId = iprot.readI64();
4141
          self.warehouseId = iprot.readI64();
3853
        else:
4142
        else:
3854
          iprot.skip(ftype)
4143
          iprot.skip(ftype)
3855
      elif fid == 3:
4144
      elif fid == 3:
-
 
4145
        if ftype == TType.I64:
-
 
4146
          self.sourceId = iprot.readI64();
-
 
4147
        else:
-
 
4148
          iprot.skip(ftype)
-
 
4149
      elif fid == 4:
-
 
4150
        if ftype == TType.I64:
-
 
4151
          self.orderId = iprot.readI64();
-
 
4152
        else:
-
 
4153
          iprot.skip(ftype)
-
 
4154
      elif fid == 5:
3856
        if ftype == TType.DOUBLE:
4155
        if ftype == TType.DOUBLE:
3857
          self.quantity = iprot.readDouble();
4156
          self.quantity = iprot.readDouble();
3858
        else:
4157
        else:
3859
          iprot.skip(ftype)
4158
          iprot.skip(ftype)
3860
      else:
4159
      else:
Line 3873... Line 4172...
3873
      oprot.writeFieldEnd()
4172
      oprot.writeFieldEnd()
3874
    if self.warehouseId is not None:
4173
    if self.warehouseId is not None:
3875
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
4174
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
3876
      oprot.writeI64(self.warehouseId)
4175
      oprot.writeI64(self.warehouseId)
3877
      oprot.writeFieldEnd()
4176
      oprot.writeFieldEnd()
-
 
4177
    if self.sourceId is not None:
-
 
4178
      oprot.writeFieldBegin('sourceId', TType.I64, 3)
-
 
4179
      oprot.writeI64(self.sourceId)
-
 
4180
      oprot.writeFieldEnd()
-
 
4181
    if self.orderId is not None:
-
 
4182
      oprot.writeFieldBegin('orderId', TType.I64, 4)
-
 
4183
      oprot.writeI64(self.orderId)
-
 
4184
      oprot.writeFieldEnd()
3878
    if self.quantity is not None:
4185
    if self.quantity is not None:
3879
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 3)
4186
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 5)
3880
      oprot.writeDouble(self.quantity)
4187
      oprot.writeDouble(self.quantity)
3881
      oprot.writeFieldEnd()
4188
      oprot.writeFieldEnd()
3882
    oprot.writeFieldStop()
4189
    oprot.writeFieldStop()
3883
    oprot.writeStructEnd()
4190
    oprot.writeStructEnd()
3884
 
4191