Subversion Repositories SmartDukaan

Rev

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

Rev 8282 Rev 8303
Line 82... Line 82...
82
     - to_date
82
     - to_date
83
     - warehouse_id
83
     - warehouse_id
84
    """
84
    """
85
    pass
85
    pass
86
 
86
 
87
  def getOrdersInBatch(self, statuses, offset, limit, warehouse_id):
87
  def getOrdersInBatch(self, statuses, offset, limit, warehouse_id, source):
88
    """
88
    """
89
    Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
89
    Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
90
    Pass the status as null and the limit as 0 to ignore them.
90
    Pass the status as null and the limit as 0 to ignore them.
91
 
91
 
92
    Parameters:
92
    Parameters:
93
     - statuses
93
     - statuses
94
     - offset
94
     - offset
95
     - limit
95
     - limit
96
     - warehouse_id
96
     - warehouse_id
-
 
97
     - source
97
    """
98
    """
98
    pass
99
    pass
99
 
100
 
100
  def getOrderCount(self, statuses, warehouseId):
101
  def getOrderCount(self, statuses, warehouseId, source):
101
    """
102
    """
102
    Returns the count of orders with the given statuses assigned to the given warehouse.
103
    Returns the count of orders with the given statuses assigned to the given warehouse.
103
 
104
 
104
    Parameters:
105
    Parameters:
105
     - statuses
106
     - statuses
106
     - warehouseId
107
     - warehouseId
-
 
108
     - source
107
    """
109
    """
108
    pass
110
    pass
109
 
111
 
110
  def getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
112
  def getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
111
    """
113
    """
Line 2175... Line 2177...
2175
      return result.success
2177
      return result.success
2176
    if result.ex is not None:
2178
    if result.ex is not None:
2177
      raise result.ex
2179
      raise result.ex
2178
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
2180
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
2179
 
2181
 
2180
  def getOrdersInBatch(self, statuses, offset, limit, warehouse_id):
2182
  def getOrdersInBatch(self, statuses, offset, limit, warehouse_id, source):
2181
    """
2183
    """
2182
    Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
2184
    Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
2183
    Pass the status as null and the limit as 0 to ignore them.
2185
    Pass the status as null and the limit as 0 to ignore them.
2184
 
2186
 
2185
    Parameters:
2187
    Parameters:
2186
     - statuses
2188
     - statuses
2187
     - offset
2189
     - offset
2188
     - limit
2190
     - limit
2189
     - warehouse_id
2191
     - warehouse_id
-
 
2192
     - source
2190
    """
2193
    """
2191
    self.send_getOrdersInBatch(statuses, offset, limit, warehouse_id)
2194
    self.send_getOrdersInBatch(statuses, offset, limit, warehouse_id, source)
2192
    return self.recv_getOrdersInBatch()
2195
    return self.recv_getOrdersInBatch()
2193
 
2196
 
2194
  def send_getOrdersInBatch(self, statuses, offset, limit, warehouse_id):
2197
  def send_getOrdersInBatch(self, statuses, offset, limit, warehouse_id, source):
2195
    self._oprot.writeMessageBegin('getOrdersInBatch', TMessageType.CALL, self._seqid)
2198
    self._oprot.writeMessageBegin('getOrdersInBatch', TMessageType.CALL, self._seqid)
2196
    args = getOrdersInBatch_args()
2199
    args = getOrdersInBatch_args()
2197
    args.statuses = statuses
2200
    args.statuses = statuses
2198
    args.offset = offset
2201
    args.offset = offset
2199
    args.limit = limit
2202
    args.limit = limit
2200
    args.warehouse_id = warehouse_id
2203
    args.warehouse_id = warehouse_id
-
 
2204
    args.source = source
2201
    args.write(self._oprot)
2205
    args.write(self._oprot)
2202
    self._oprot.writeMessageEnd()
2206
    self._oprot.writeMessageEnd()
2203
    self._oprot.trans.flush()
2207
    self._oprot.trans.flush()
2204
 
2208
 
2205
  def recv_getOrdersInBatch(self, ):
2209
  def recv_getOrdersInBatch(self, ):
Line 2216... Line 2220...
2216
      return result.success
2220
      return result.success
2217
    if result.ex is not None:
2221
    if result.ex is not None:
2218
      raise result.ex
2222
      raise result.ex
2219
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersInBatch failed: unknown result");
2223
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersInBatch failed: unknown result");
2220
 
2224
 
2221
  def getOrderCount(self, statuses, warehouseId):
2225
  def getOrderCount(self, statuses, warehouseId, source):
2222
    """
2226
    """
2223
    Returns the count of orders with the given statuses assigned to the given warehouse.
2227
    Returns the count of orders with the given statuses assigned to the given warehouse.
2224
 
2228
 
2225
    Parameters:
2229
    Parameters:
2226
     - statuses
2230
     - statuses
2227
     - warehouseId
2231
     - warehouseId
-
 
2232
     - source
2228
    """
2233
    """
2229
    self.send_getOrderCount(statuses, warehouseId)
2234
    self.send_getOrderCount(statuses, warehouseId, source)
2230
    return self.recv_getOrderCount()
2235
    return self.recv_getOrderCount()
2231
 
2236
 
2232
  def send_getOrderCount(self, statuses, warehouseId):
2237
  def send_getOrderCount(self, statuses, warehouseId, source):
2233
    self._oprot.writeMessageBegin('getOrderCount', TMessageType.CALL, self._seqid)
2238
    self._oprot.writeMessageBegin('getOrderCount', TMessageType.CALL, self._seqid)
2234
    args = getOrderCount_args()
2239
    args = getOrderCount_args()
2235
    args.statuses = statuses
2240
    args.statuses = statuses
2236
    args.warehouseId = warehouseId
2241
    args.warehouseId = warehouseId
-
 
2242
    args.source = source
2237
    args.write(self._oprot)
2243
    args.write(self._oprot)
2238
    self._oprot.writeMessageEnd()
2244
    self._oprot.writeMessageEnd()
2239
    self._oprot.trans.flush()
2245
    self._oprot.trans.flush()
2240
 
2246
 
2241
  def recv_getOrderCount(self, ):
2247
  def recv_getOrderCount(self, ):
Line 9210... Line 9216...
9210
    args = getOrdersInBatch_args()
9216
    args = getOrdersInBatch_args()
9211
    args.read(iprot)
9217
    args.read(iprot)
9212
    iprot.readMessageEnd()
9218
    iprot.readMessageEnd()
9213
    result = getOrdersInBatch_result()
9219
    result = getOrdersInBatch_result()
9214
    try:
9220
    try:
9215
      result.success = self._handler.getOrdersInBatch(args.statuses, args.offset, args.limit, args.warehouse_id)
9221
      result.success = self._handler.getOrdersInBatch(args.statuses, args.offset, args.limit, args.warehouse_id, args.source)
9216
    except TransactionServiceException, ex:
9222
    except TransactionServiceException, ex:
9217
      result.ex = ex
9223
      result.ex = ex
9218
    oprot.writeMessageBegin("getOrdersInBatch", TMessageType.REPLY, seqid)
9224
    oprot.writeMessageBegin("getOrdersInBatch", TMessageType.REPLY, seqid)
9219
    result.write(oprot)
9225
    result.write(oprot)
9220
    oprot.writeMessageEnd()
9226
    oprot.writeMessageEnd()
Line 9224... Line 9230...
9224
    args = getOrderCount_args()
9230
    args = getOrderCount_args()
9225
    args.read(iprot)
9231
    args.read(iprot)
9226
    iprot.readMessageEnd()
9232
    iprot.readMessageEnd()
9227
    result = getOrderCount_result()
9233
    result = getOrderCount_result()
9228
    try:
9234
    try:
9229
      result.success = self._handler.getOrderCount(args.statuses, args.warehouseId)
9235
      result.success = self._handler.getOrderCount(args.statuses, args.warehouseId, args.source)
9230
    except TransactionServiceException, ex:
9236
    except TransactionServiceException, ex:
9231
      result.ex = ex
9237
      result.ex = ex
9232
    oprot.writeMessageBegin("getOrderCount", TMessageType.REPLY, seqid)
9238
    oprot.writeMessageBegin("getOrderCount", TMessageType.REPLY, seqid)
9233
    result.write(oprot)
9239
    result.write(oprot)
9234
    oprot.writeMessageEnd()
9240
    oprot.writeMessageEnd()
Line 12915... Line 12921...
12915
  Attributes:
12921
  Attributes:
12916
   - statuses
12922
   - statuses
12917
   - offset
12923
   - offset
12918
   - limit
12924
   - limit
12919
   - warehouse_id
12925
   - warehouse_id
-
 
12926
   - source
12920
  """
12927
  """
12921
 
12928
 
12922
  thrift_spec = (
12929
  thrift_spec = (
12923
    None, # 0
12930
    None, # 0
12924
    (1, TType.LIST, 'statuses', (TType.I32,None), None, ), # 1
12931
    (1, TType.LIST, 'statuses', (TType.I32,None), None, ), # 1
12925
    (2, TType.I64, 'offset', None, None, ), # 2
12932
    (2, TType.I64, 'offset', None, None, ), # 2
12926
    (3, TType.I64, 'limit', None, None, ), # 3
12933
    (3, TType.I64, 'limit', None, None, ), # 3
12927
    (4, TType.I64, 'warehouse_id', None, None, ), # 4
12934
    (4, TType.I64, 'warehouse_id', None, None, ), # 4
-
 
12935
    (5, TType.I64, 'source', None, None, ), # 5
12928
  )
12936
  )
12929
 
12937
 
12930
  def __init__(self, statuses=None, offset=None, limit=None, warehouse_id=None,):
12938
  def __init__(self, statuses=None, offset=None, limit=None, warehouse_id=None, source=None,):
12931
    self.statuses = statuses
12939
    self.statuses = statuses
12932
    self.offset = offset
12940
    self.offset = offset
12933
    self.limit = limit
12941
    self.limit = limit
12934
    self.warehouse_id = warehouse_id
12942
    self.warehouse_id = warehouse_id
-
 
12943
    self.source = source
12935
 
12944
 
12936
  def read(self, iprot):
12945
  def read(self, iprot):
12937
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
12946
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
12938
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
12947
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
12939
      return
12948
      return
Line 12965... Line 12974...
12965
      elif fid == 4:
12974
      elif fid == 4:
12966
        if ftype == TType.I64:
12975
        if ftype == TType.I64:
12967
          self.warehouse_id = iprot.readI64();
12976
          self.warehouse_id = iprot.readI64();
12968
        else:
12977
        else:
12969
          iprot.skip(ftype)
12978
          iprot.skip(ftype)
-
 
12979
      elif fid == 5:
-
 
12980
        if ftype == TType.I64:
-
 
12981
          self.source = iprot.readI64();
-
 
12982
        else:
-
 
12983
          iprot.skip(ftype)
12970
      else:
12984
      else:
12971
        iprot.skip(ftype)
12985
        iprot.skip(ftype)
12972
      iprot.readFieldEnd()
12986
      iprot.readFieldEnd()
12973
    iprot.readStructEnd()
12987
    iprot.readStructEnd()
12974
 
12988
 
Line 12994... Line 13008...
12994
      oprot.writeFieldEnd()
13008
      oprot.writeFieldEnd()
12995
    if self.warehouse_id is not None:
13009
    if self.warehouse_id is not None:
12996
      oprot.writeFieldBegin('warehouse_id', TType.I64, 4)
13010
      oprot.writeFieldBegin('warehouse_id', TType.I64, 4)
12997
      oprot.writeI64(self.warehouse_id)
13011
      oprot.writeI64(self.warehouse_id)
12998
      oprot.writeFieldEnd()
13012
      oprot.writeFieldEnd()
-
 
13013
    if self.source is not None:
-
 
13014
      oprot.writeFieldBegin('source', TType.I64, 5)
-
 
13015
      oprot.writeI64(self.source)
-
 
13016
      oprot.writeFieldEnd()
12999
    oprot.writeFieldStop()
13017
    oprot.writeFieldStop()
13000
    oprot.writeStructEnd()
13018
    oprot.writeStructEnd()
13001
 
13019
 
13002
  def validate(self):
13020
  def validate(self):
13003
    return
13021
    return
Line 13098... Line 13116...
13098
class getOrderCount_args:
13116
class getOrderCount_args:
13099
  """
13117
  """
13100
  Attributes:
13118
  Attributes:
13101
   - statuses
13119
   - statuses
13102
   - warehouseId
13120
   - warehouseId
-
 
13121
   - source
13103
  """
13122
  """
13104
 
13123
 
13105
  thrift_spec = (
13124
  thrift_spec = (
13106
    None, # 0
13125
    None, # 0
13107
    (1, TType.LIST, 'statuses', (TType.I32,None), None, ), # 1
13126
    (1, TType.LIST, 'statuses', (TType.I32,None), None, ), # 1
13108
    (2, TType.I64, 'warehouseId', None, None, ), # 2
13127
    (2, TType.I64, 'warehouseId', None, None, ), # 2
-
 
13128
    (3, TType.I64, 'source', None, None, ), # 3
13109
  )
13129
  )
13110
 
13130
 
13111
  def __init__(self, statuses=None, warehouseId=None,):
13131
  def __init__(self, statuses=None, warehouseId=None, source=None,):
13112
    self.statuses = statuses
13132
    self.statuses = statuses
13113
    self.warehouseId = warehouseId
13133
    self.warehouseId = warehouseId
-
 
13134
    self.source = source
13114
 
13135
 
13115
  def read(self, iprot):
13136
  def read(self, iprot):
13116
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
13137
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
13117
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
13138
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
13118
      return
13139
      return
Line 13134... Line 13155...
13134
      elif fid == 2:
13155
      elif fid == 2:
13135
        if ftype == TType.I64:
13156
        if ftype == TType.I64:
13136
          self.warehouseId = iprot.readI64();
13157
          self.warehouseId = iprot.readI64();
13137
        else:
13158
        else:
13138
          iprot.skip(ftype)
13159
          iprot.skip(ftype)
-
 
13160
      elif fid == 3:
-
 
13161
        if ftype == TType.I64:
-
 
13162
          self.source = iprot.readI64();
-
 
13163
        else:
-
 
13164
          iprot.skip(ftype)
13139
      else:
13165
      else:
13140
        iprot.skip(ftype)
13166
        iprot.skip(ftype)
13141
      iprot.readFieldEnd()
13167
      iprot.readFieldEnd()
13142
    iprot.readStructEnd()
13168
    iprot.readStructEnd()
13143
 
13169
 
Line 13155... Line 13181...
13155
      oprot.writeFieldEnd()
13181
      oprot.writeFieldEnd()
13156
    if self.warehouseId is not None:
13182
    if self.warehouseId is not None:
13157
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
13183
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
13158
      oprot.writeI64(self.warehouseId)
13184
      oprot.writeI64(self.warehouseId)
13159
      oprot.writeFieldEnd()
13185
      oprot.writeFieldEnd()
-
 
13186
    if self.source is not None:
-
 
13187
      oprot.writeFieldBegin('source', TType.I64, 3)
-
 
13188
      oprot.writeI64(self.source)
-
 
13189
      oprot.writeFieldEnd()
13160
    oprot.writeFieldStop()
13190
    oprot.writeFieldStop()
13161
    oprot.writeStructEnd()
13191
    oprot.writeStructEnd()
13162
 
13192
 
13163
  def validate(self):
13193
  def validate(self):
13164
    return
13194
    return