Subversion Repositories SmartDukaan

Rev

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

Rev 483 Rev 494
Line 80... Line 80...
80
     - status
80
     - status
81
     - description
81
     - description
82
    """
82
    """
83
    pass
83
    pass
84
 
84
 
-
 
85
  def addBillingDetails(self, orderId, invoice_number, billed_by):
-
 
86
    """
-
 
87
    Parameters:
-
 
88
     - orderId
-
 
89
     - invoice_number
-
 
90
     - billed_by
-
 
91
    """
-
 
92
    pass
-
 
93
 
85
  def getOrdersForTransaction(self, transactionId):
94
  def getOrdersForTransaction(self, transactionId):
86
    """
95
    """
87
    Parameters:
96
    Parameters:
88
     - transactionId
97
     - transactionId
89
    """
98
    """
Line 420... Line 429...
420
      return result.success
429
      return result.success
421
    if result.ex != None:
430
    if result.ex != None:
422
      raise result.ex
431
      raise result.ex
423
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
432
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
424
 
433
 
-
 
434
  def addBillingDetails(self, orderId, invoice_number, billed_by):
-
 
435
    """
-
 
436
    Parameters:
-
 
437
     - orderId
-
 
438
     - invoice_number
-
 
439
     - billed_by
-
 
440
    """
-
 
441
    self.send_addBillingDetails(orderId, invoice_number, billed_by)
-
 
442
    return self.recv_addBillingDetails()
-
 
443
 
-
 
444
  def send_addBillingDetails(self, orderId, invoice_number, billed_by):
-
 
445
    self._oprot.writeMessageBegin('addBillingDetails', TMessageType.CALL, self._seqid)
-
 
446
    args = addBillingDetails_args()
-
 
447
    args.orderId = orderId
-
 
448
    args.invoice_number = invoice_number
-
 
449
    args.billed_by = billed_by
-
 
450
    args.write(self._oprot)
-
 
451
    self._oprot.writeMessageEnd()
-
 
452
    self._oprot.trans.flush()
-
 
453
 
-
 
454
  def recv_addBillingDetails(self, ):
-
 
455
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
456
    if mtype == TMessageType.EXCEPTION:
-
 
457
      x = TApplicationException()
-
 
458
      x.read(self._iprot)
-
 
459
      self._iprot.readMessageEnd()
-
 
460
      raise x
-
 
461
    result = addBillingDetails_result()
-
 
462
    result.read(self._iprot)
-
 
463
    self._iprot.readMessageEnd()
-
 
464
    if result.success != None:
-
 
465
      return result.success
-
 
466
    if result.ex != None:
-
 
467
      raise result.ex
-
 
468
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
-
 
469
 
425
  def getOrdersForTransaction(self, transactionId):
470
  def getOrdersForTransaction(self, transactionId):
426
    """
471
    """
427
    Parameters:
472
    Parameters:
428
     - transactionId
473
     - transactionId
429
    """
474
    """
Line 665... Line 710...
665
    self._processMap["getTransactionsForShoppingCartId"] = Processor.process_getTransactionsForShoppingCartId
710
    self._processMap["getTransactionsForShoppingCartId"] = Processor.process_getTransactionsForShoppingCartId
666
    self._processMap["getTransactionStatus"] = Processor.process_getTransactionStatus
711
    self._processMap["getTransactionStatus"] = Processor.process_getTransactionStatus
667
    self._processMap["changeTransactionStatus"] = Processor.process_changeTransactionStatus
712
    self._processMap["changeTransactionStatus"] = Processor.process_changeTransactionStatus
668
    self._processMap["getAllOrders"] = Processor.process_getAllOrders
713
    self._processMap["getAllOrders"] = Processor.process_getAllOrders
669
    self._processMap["changeOrderStatus"] = Processor.process_changeOrderStatus
714
    self._processMap["changeOrderStatus"] = Processor.process_changeOrderStatus
-
 
715
    self._processMap["addBillingDetails"] = Processor.process_addBillingDetails
670
    self._processMap["getOrdersForTransaction"] = Processor.process_getOrdersForTransaction
716
    self._processMap["getOrdersForTransaction"] = Processor.process_getOrdersForTransaction
671
    self._processMap["getOrdersForCustomer"] = Processor.process_getOrdersForCustomer
717
    self._processMap["getOrdersForCustomer"] = Processor.process_getOrdersForCustomer
672
    self._processMap["createOrder"] = Processor.process_createOrder
718
    self._processMap["createOrder"] = Processor.process_createOrder
673
    self._processMap["getOrder"] = Processor.process_getOrder
719
    self._processMap["getOrder"] = Processor.process_getOrder
674
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
720
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
Line 800... Line 846...
800
    oprot.writeMessageBegin("changeOrderStatus", TMessageType.REPLY, seqid)
846
    oprot.writeMessageBegin("changeOrderStatus", TMessageType.REPLY, seqid)
801
    result.write(oprot)
847
    result.write(oprot)
802
    oprot.writeMessageEnd()
848
    oprot.writeMessageEnd()
803
    oprot.trans.flush()
849
    oprot.trans.flush()
804
 
850
 
-
 
851
  def process_addBillingDetails(self, seqid, iprot, oprot):
-
 
852
    args = addBillingDetails_args()
-
 
853
    args.read(iprot)
-
 
854
    iprot.readMessageEnd()
-
 
855
    result = addBillingDetails_result()
-
 
856
    try:
-
 
857
      result.success = self._handler.addBillingDetails(args.orderId, args.invoice_number, args.billed_by)
-
 
858
    except TransactionServiceException, ex:
-
 
859
      result.ex = ex
-
 
860
    oprot.writeMessageBegin("addBillingDetails", TMessageType.REPLY, seqid)
-
 
861
    result.write(oprot)
-
 
862
    oprot.writeMessageEnd()
-
 
863
    oprot.trans.flush()
-
 
864
 
805
  def process_getOrdersForTransaction(self, seqid, iprot, oprot):
865
  def process_getOrdersForTransaction(self, seqid, iprot, oprot):
806
    args = getOrdersForTransaction_args()
866
    args = getOrdersForTransaction_args()
807
    args.read(iprot)
867
    args.read(iprot)
808
    iprot.readMessageEnd()
868
    iprot.readMessageEnd()
809
    result = getOrdersForTransaction_result()
869
    result = getOrdersForTransaction_result()
Line 2019... Line 2079...
2019
    if self.success != None:
2079
    if self.success != None:
2020
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2080
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2021
      oprot.writeBool(self.success)
2081
      oprot.writeBool(self.success)
2022
      oprot.writeFieldEnd()
2082
      oprot.writeFieldEnd()
2023
    if self.ex != None:
2083
    if self.ex != None:
-
 
2084
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
2085
      self.ex.write(oprot)
-
 
2086
      oprot.writeFieldEnd()
-
 
2087
    oprot.writeFieldStop()
-
 
2088
    oprot.writeStructEnd()
-
 
2089
 
-
 
2090
  def __repr__(self):
-
 
2091
    L = ['%s=%r' % (key, value)
-
 
2092
      for key, value in self.__dict__.iteritems()]
-
 
2093
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2094
 
-
 
2095
  def __eq__(self, other):
-
 
2096
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2097
 
-
 
2098
  def __ne__(self, other):
-
 
2099
    return not (self == other)
-
 
2100
 
-
 
2101
class addBillingDetails_args:
-
 
2102
  """
-
 
2103
  Attributes:
-
 
2104
   - orderId
-
 
2105
   - invoice_number
-
 
2106
   - billed_by
-
 
2107
  """
-
 
2108
 
-
 
2109
  thrift_spec = (
-
 
2110
    None, # 0
-
 
2111
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
2112
    (2, TType.STRING, 'invoice_number', None, None, ), # 2
-
 
2113
    (3, TType.STRING, 'billed_by', None, None, ), # 3
-
 
2114
  )
-
 
2115
 
-
 
2116
  def __init__(self, orderId=None, invoice_number=None, billed_by=None,):
-
 
2117
    self.orderId = orderId
-
 
2118
    self.invoice_number = invoice_number
-
 
2119
    self.billed_by = billed_by
-
 
2120
 
-
 
2121
  def read(self, iprot):
-
 
2122
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2123
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2124
      return
-
 
2125
    iprot.readStructBegin()
-
 
2126
    while True:
-
 
2127
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2128
      if ftype == TType.STOP:
-
 
2129
        break
-
 
2130
      if fid == 1:
-
 
2131
        if ftype == TType.I64:
-
 
2132
          self.orderId = iprot.readI64();
-
 
2133
        else:
-
 
2134
          iprot.skip(ftype)
-
 
2135
      elif fid == 2:
-
 
2136
        if ftype == TType.STRING:
-
 
2137
          self.invoice_number = iprot.readString();
-
 
2138
        else:
-
 
2139
          iprot.skip(ftype)
-
 
2140
      elif fid == 3:
-
 
2141
        if ftype == TType.STRING:
-
 
2142
          self.billed_by = iprot.readString();
-
 
2143
        else:
-
 
2144
          iprot.skip(ftype)
-
 
2145
      else:
-
 
2146
        iprot.skip(ftype)
-
 
2147
      iprot.readFieldEnd()
-
 
2148
    iprot.readStructEnd()
-
 
2149
 
-
 
2150
  def write(self, oprot):
-
 
2151
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2152
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2153
      return
-
 
2154
    oprot.writeStructBegin('addBillingDetails_args')
-
 
2155
    if self.orderId != None:
-
 
2156
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
2157
      oprot.writeI64(self.orderId)
-
 
2158
      oprot.writeFieldEnd()
-
 
2159
    if self.invoice_number != None:
-
 
2160
      oprot.writeFieldBegin('invoice_number', TType.STRING, 2)
-
 
2161
      oprot.writeString(self.invoice_number)
-
 
2162
      oprot.writeFieldEnd()
-
 
2163
    if self.billed_by != None:
-
 
2164
      oprot.writeFieldBegin('billed_by', TType.STRING, 3)
-
 
2165
      oprot.writeString(self.billed_by)
-
 
2166
      oprot.writeFieldEnd()
-
 
2167
    oprot.writeFieldStop()
-
 
2168
    oprot.writeStructEnd()
-
 
2169
 
-
 
2170
  def __repr__(self):
-
 
2171
    L = ['%s=%r' % (key, value)
-
 
2172
      for key, value in self.__dict__.iteritems()]
-
 
2173
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2174
 
-
 
2175
  def __eq__(self, other):
-
 
2176
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2177
 
-
 
2178
  def __ne__(self, other):
-
 
2179
    return not (self == other)
-
 
2180
 
-
 
2181
class addBillingDetails_result:
-
 
2182
  """
-
 
2183
  Attributes:
-
 
2184
   - success
-
 
2185
   - ex
-
 
2186
  """
-
 
2187
 
-
 
2188
  thrift_spec = (
-
 
2189
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
2190
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
2191
  )
-
 
2192
 
-
 
2193
  def __init__(self, success=None, ex=None,):
-
 
2194
    self.success = success
-
 
2195
    self.ex = ex
-
 
2196
 
-
 
2197
  def read(self, iprot):
-
 
2198
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2199
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2200
      return
-
 
2201
    iprot.readStructBegin()
-
 
2202
    while True:
-
 
2203
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2204
      if ftype == TType.STOP:
-
 
2205
        break
-
 
2206
      if fid == 0:
-
 
2207
        if ftype == TType.BOOL:
-
 
2208
          self.success = iprot.readBool();
-
 
2209
        else:
-
 
2210
          iprot.skip(ftype)
-
 
2211
      elif fid == 1:
-
 
2212
        if ftype == TType.STRUCT:
-
 
2213
          self.ex = TransactionServiceException()
-
 
2214
          self.ex.read(iprot)
-
 
2215
        else:
-
 
2216
          iprot.skip(ftype)
-
 
2217
      else:
-
 
2218
        iprot.skip(ftype)
-
 
2219
      iprot.readFieldEnd()
-
 
2220
    iprot.readStructEnd()
-
 
2221
 
-
 
2222
  def write(self, oprot):
-
 
2223
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2224
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2225
      return
-
 
2226
    oprot.writeStructBegin('addBillingDetails_result')
-
 
2227
    if self.success != None:
-
 
2228
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
2229
      oprot.writeBool(self.success)
-
 
2230
      oprot.writeFieldEnd()
-
 
2231
    if self.ex != None:
2024
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2232
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2025
      self.ex.write(oprot)
2233
      self.ex.write(oprot)
2026
      oprot.writeFieldEnd()
2234
      oprot.writeFieldEnd()
2027
    oprot.writeFieldStop()
2235
    oprot.writeFieldStop()
2028
    oprot.writeStructEnd()
2236
    oprot.writeStructEnd()