Subversion Repositories SmartDukaan

Rev

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

Rev 3956 Rev 4008
Line 176... Line 176...
176
     - xferTxnId
176
     - xferTxnId
177
     - xferDate
177
     - xferDate
178
    """
178
    """
179
    pass
179
    pass
180
 
180
 
-
 
181
  def getPaymentsRequiringExtraProcessing(self, category):
-
 
182
    """
-
 
183
    Returns the list of payments that require some extra processing and
-
 
184
    which belong to a particular category. This is currently used by CRM
-
 
185
    application.
-
 
186
 
-
 
187
    Parameters:
-
 
188
     - category
-
 
189
    """
-
 
190
    pass
-
 
191
 
-
 
192
  def markPaymentAsProcessed(self, paymentId, category):
-
 
193
    """
-
 
194
    Marks a particular payment as processed for a particular cateogory.
-
 
195
    It essentially deletes the payment if it is processed for a particular
-
 
196
    category. This is currently used by CRM application.
-
 
197
 
-
 
198
    Parameters:
-
 
199
     - paymentId
-
 
200
     - category
-
 
201
    """
-
 
202
    pass
-
 
203
 
181
 
204
 
182
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
205
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
183
  def __init__(self, iprot, oprot=None):
206
  def __init__(self, iprot, oprot=None):
184
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
207
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
185
 
208
 
Line 691... Line 714...
691
      return result.success
714
      return result.success
692
    if result.pe is not None:
715
    if result.pe is not None:
693
      raise result.pe
716
      raise result.pe
694
    raise TApplicationException(TApplicationException.MISSING_RESULT, "partiallyCapturePayment failed: unknown result");
717
    raise TApplicationException(TApplicationException.MISSING_RESULT, "partiallyCapturePayment failed: unknown result");
695
 
718
 
-
 
719
  def getPaymentsRequiringExtraProcessing(self, category):
-
 
720
    """
-
 
721
    Returns the list of payments that require some extra processing and
-
 
722
    which belong to a particular category. This is currently used by CRM
-
 
723
    application.
-
 
724
 
-
 
725
    Parameters:
-
 
726
     - category
-
 
727
    """
-
 
728
    self.send_getPaymentsRequiringExtraProcessing(category)
-
 
729
    return self.recv_getPaymentsRequiringExtraProcessing()
-
 
730
 
-
 
731
  def send_getPaymentsRequiringExtraProcessing(self, category):
-
 
732
    self._oprot.writeMessageBegin('getPaymentsRequiringExtraProcessing', TMessageType.CALL, self._seqid)
-
 
733
    args = getPaymentsRequiringExtraProcessing_args()
-
 
734
    args.category = category
-
 
735
    args.write(self._oprot)
-
 
736
    self._oprot.writeMessageEnd()
-
 
737
    self._oprot.trans.flush()
-
 
738
 
-
 
739
  def recv_getPaymentsRequiringExtraProcessing(self, ):
-
 
740
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
741
    if mtype == TMessageType.EXCEPTION:
-
 
742
      x = TApplicationException()
-
 
743
      x.read(self._iprot)
-
 
744
      self._iprot.readMessageEnd()
-
 
745
      raise x
-
 
746
    result = getPaymentsRequiringExtraProcessing_result()
-
 
747
    result.read(self._iprot)
-
 
748
    self._iprot.readMessageEnd()
-
 
749
    if result.success is not None:
-
 
750
      return result.success
-
 
751
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsRequiringExtraProcessing failed: unknown result");
-
 
752
 
-
 
753
  def markPaymentAsProcessed(self, paymentId, category):
-
 
754
    """
-
 
755
    Marks a particular payment as processed for a particular cateogory.
-
 
756
    It essentially deletes the payment if it is processed for a particular
-
 
757
    category. This is currently used by CRM application.
-
 
758
 
-
 
759
    Parameters:
-
 
760
     - paymentId
-
 
761
     - category
-
 
762
    """
-
 
763
    self.send_markPaymentAsProcessed(paymentId, category)
-
 
764
    self.recv_markPaymentAsProcessed()
-
 
765
 
-
 
766
  def send_markPaymentAsProcessed(self, paymentId, category):
-
 
767
    self._oprot.writeMessageBegin('markPaymentAsProcessed', TMessageType.CALL, self._seqid)
-
 
768
    args = markPaymentAsProcessed_args()
-
 
769
    args.paymentId = paymentId
-
 
770
    args.category = category
-
 
771
    args.write(self._oprot)
-
 
772
    self._oprot.writeMessageEnd()
-
 
773
    self._oprot.trans.flush()
-
 
774
 
-
 
775
  def recv_markPaymentAsProcessed(self, ):
-
 
776
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
777
    if mtype == TMessageType.EXCEPTION:
-
 
778
      x = TApplicationException()
-
 
779
      x.read(self._iprot)
-
 
780
      self._iprot.readMessageEnd()
-
 
781
      raise x
-
 
782
    result = markPaymentAsProcessed_result()
-
 
783
    result.read(self._iprot)
-
 
784
    self._iprot.readMessageEnd()
-
 
785
    return
-
 
786
 
696
 
787
 
697
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
788
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
698
  def __init__(self, handler):
789
  def __init__(self, handler):
699
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
790
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
700
    self._processMap["createPayment"] = Processor.process_createPayment
791
    self._processMap["createPayment"] = Processor.process_createPayment
Line 708... Line 799...
708
    self._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPayment
799
    self._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPayment
709
    self._processMap["initializeHdfcEmiPayment"] = Processor.process_initializeHdfcEmiPayment
800
    self._processMap["initializeHdfcEmiPayment"] = Processor.process_initializeHdfcEmiPayment
710
    self._processMap["createRefund"] = Processor.process_createRefund
801
    self._processMap["createRefund"] = Processor.process_createRefund
711
    self._processMap["capturePayment"] = Processor.process_capturePayment
802
    self._processMap["capturePayment"] = Processor.process_capturePayment
712
    self._processMap["partiallyCapturePayment"] = Processor.process_partiallyCapturePayment
803
    self._processMap["partiallyCapturePayment"] = Processor.process_partiallyCapturePayment
-
 
804
    self._processMap["getPaymentsRequiringExtraProcessing"] = Processor.process_getPaymentsRequiringExtraProcessing
-
 
805
    self._processMap["markPaymentAsProcessed"] = Processor.process_markPaymentAsProcessed
713
 
806
 
714
  def process(self, iprot, oprot):
807
  def process(self, iprot, oprot):
715
    (name, type, seqid) = iprot.readMessageBegin()
808
    (name, type, seqid) = iprot.readMessageBegin()
716
    if name not in self._processMap:
809
    if name not in self._processMap:
717
      iprot.skip(TType.STRUCT)
810
      iprot.skip(TType.STRUCT)
Line 903... Line 996...
903
    oprot.writeMessageBegin("partiallyCapturePayment", TMessageType.REPLY, seqid)
996
    oprot.writeMessageBegin("partiallyCapturePayment", TMessageType.REPLY, seqid)
904
    result.write(oprot)
997
    result.write(oprot)
905
    oprot.writeMessageEnd()
998
    oprot.writeMessageEnd()
906
    oprot.trans.flush()
999
    oprot.trans.flush()
907
 
1000
 
-
 
1001
  def process_getPaymentsRequiringExtraProcessing(self, seqid, iprot, oprot):
-
 
1002
    args = getPaymentsRequiringExtraProcessing_args()
-
 
1003
    args.read(iprot)
-
 
1004
    iprot.readMessageEnd()
-
 
1005
    result = getPaymentsRequiringExtraProcessing_result()
-
 
1006
    result.success = self._handler.getPaymentsRequiringExtraProcessing(args.category)
-
 
1007
    oprot.writeMessageBegin("getPaymentsRequiringExtraProcessing", TMessageType.REPLY, seqid)
-
 
1008
    result.write(oprot)
-
 
1009
    oprot.writeMessageEnd()
-
 
1010
    oprot.trans.flush()
-
 
1011
 
-
 
1012
  def process_markPaymentAsProcessed(self, seqid, iprot, oprot):
-
 
1013
    args = markPaymentAsProcessed_args()
-
 
1014
    args.read(iprot)
-
 
1015
    iprot.readMessageEnd()
-
 
1016
    result = markPaymentAsProcessed_result()
-
 
1017
    self._handler.markPaymentAsProcessed(args.paymentId, args.category)
-
 
1018
    oprot.writeMessageBegin("markPaymentAsProcessed", TMessageType.REPLY, seqid)
-
 
1019
    result.write(oprot)
-
 
1020
    oprot.writeMessageEnd()
-
 
1021
    oprot.trans.flush()
-
 
1022
 
908
 
1023
 
909
# HELPER FUNCTIONS AND STRUCTURES
1024
# HELPER FUNCTIONS AND STRUCTURES
910
 
1025
 
911
class createPayment_args:
1026
class createPayment_args:
912
  """
1027
  """
Line 2948... Line 3063...
2948
    oprot.writeFieldStop()
3063
    oprot.writeFieldStop()
2949
    oprot.writeStructEnd()
3064
    oprot.writeStructEnd()
2950
 
3065
 
2951
  def validate(self):
3066
  def validate(self):
2952
    return
3067
    return
-
 
3068
 
-
 
3069
 
-
 
3070
  def __repr__(self):
-
 
3071
    L = ['%s=%r' % (key, value)
-
 
3072
      for key, value in self.__dict__.iteritems()]
-
 
3073
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3074
 
-
 
3075
  def __eq__(self, other):
-
 
3076
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3077
 
-
 
3078
  def __ne__(self, other):
-
 
3079
    return not (self == other)
-
 
3080
 
-
 
3081
class getPaymentsRequiringExtraProcessing_args:
-
 
3082
  """
-
 
3083
  Attributes:
-
 
3084
   - category
-
 
3085
  """
-
 
3086
 
-
 
3087
  thrift_spec = (
-
 
3088
    None, # 0
-
 
3089
    (1, TType.I32, 'category', None, None, ), # 1
-
 
3090
  )
-
 
3091
 
-
 
3092
  def __init__(self, category=None,):
-
 
3093
    self.category = category
-
 
3094
 
-
 
3095
  def read(self, iprot):
-
 
3096
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3097
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3098
      return
-
 
3099
    iprot.readStructBegin()
-
 
3100
    while True:
-
 
3101
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3102
      if ftype == TType.STOP:
-
 
3103
        break
-
 
3104
      if fid == 1:
-
 
3105
        if ftype == TType.I32:
-
 
3106
          self.category = iprot.readI32();
-
 
3107
        else:
-
 
3108
          iprot.skip(ftype)
-
 
3109
      else:
-
 
3110
        iprot.skip(ftype)
-
 
3111
      iprot.readFieldEnd()
-
 
3112
    iprot.readStructEnd()
-
 
3113
 
-
 
3114
  def write(self, oprot):
-
 
3115
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3116
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3117
      return
-
 
3118
    oprot.writeStructBegin('getPaymentsRequiringExtraProcessing_args')
-
 
3119
    if self.category is not None:
-
 
3120
      oprot.writeFieldBegin('category', TType.I32, 1)
-
 
3121
      oprot.writeI32(self.category)
-
 
3122
      oprot.writeFieldEnd()
-
 
3123
    oprot.writeFieldStop()
-
 
3124
    oprot.writeStructEnd()
-
 
3125
 
-
 
3126
  def validate(self):
-
 
3127
    return
-
 
3128
 
-
 
3129
 
-
 
3130
  def __repr__(self):
-
 
3131
    L = ['%s=%r' % (key, value)
-
 
3132
      for key, value in self.__dict__.iteritems()]
-
 
3133
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3134
 
-
 
3135
  def __eq__(self, other):
-
 
3136
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3137
 
-
 
3138
  def __ne__(self, other):
-
 
3139
    return not (self == other)
-
 
3140
 
-
 
3141
class getPaymentsRequiringExtraProcessing_result:
-
 
3142
  """
-
 
3143
  Attributes:
-
 
3144
   - success
-
 
3145
  """
-
 
3146
 
-
 
3147
  thrift_spec = (
-
 
3148
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
-
 
3149
  )
-
 
3150
 
-
 
3151
  def __init__(self, success=None,):
-
 
3152
    self.success = success
-
 
3153
 
-
 
3154
  def read(self, iprot):
-
 
3155
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3156
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3157
      return
-
 
3158
    iprot.readStructBegin()
-
 
3159
    while True:
-
 
3160
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3161
      if ftype == TType.STOP:
-
 
3162
        break
-
 
3163
      if fid == 0:
-
 
3164
        if ftype == TType.LIST:
-
 
3165
          self.success = []
-
 
3166
          (_etype59, _size56) = iprot.readListBegin()
-
 
3167
          for _i60 in xrange(_size56):
-
 
3168
            _elem61 = iprot.readI64();
-
 
3169
            self.success.append(_elem61)
-
 
3170
          iprot.readListEnd()
-
 
3171
        else:
-
 
3172
          iprot.skip(ftype)
-
 
3173
      else:
-
 
3174
        iprot.skip(ftype)
-
 
3175
      iprot.readFieldEnd()
-
 
3176
    iprot.readStructEnd()
-
 
3177
 
-
 
3178
  def write(self, oprot):
-
 
3179
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3180
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3181
      return
-
 
3182
    oprot.writeStructBegin('getPaymentsRequiringExtraProcessing_result')
-
 
3183
    if self.success is not None:
-
 
3184
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
3185
      oprot.writeListBegin(TType.I64, len(self.success))
-
 
3186
      for iter62 in self.success:
-
 
3187
        oprot.writeI64(iter62)
-
 
3188
      oprot.writeListEnd()
-
 
3189
      oprot.writeFieldEnd()
-
 
3190
    oprot.writeFieldStop()
-
 
3191
    oprot.writeStructEnd()
-
 
3192
 
-
 
3193
  def validate(self):
-
 
3194
    return
-
 
3195
 
-
 
3196
 
-
 
3197
  def __repr__(self):
-
 
3198
    L = ['%s=%r' % (key, value)
-
 
3199
      for key, value in self.__dict__.iteritems()]
-
 
3200
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3201
 
-
 
3202
  def __eq__(self, other):
-
 
3203
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3204
 
-
 
3205
  def __ne__(self, other):
-
 
3206
    return not (self == other)
-
 
3207
 
-
 
3208
class markPaymentAsProcessed_args:
-
 
3209
  """
-
 
3210
  Attributes:
-
 
3211
   - paymentId
-
 
3212
   - category
-
 
3213
  """
-
 
3214
 
-
 
3215
  thrift_spec = (
-
 
3216
    None, # 0
-
 
3217
    (1, TType.I64, 'paymentId', None, None, ), # 1
-
 
3218
    (2, TType.I32, 'category', None, None, ), # 2
-
 
3219
  )
-
 
3220
 
-
 
3221
  def __init__(self, paymentId=None, category=None,):
-
 
3222
    self.paymentId = paymentId
-
 
3223
    self.category = category
-
 
3224
 
-
 
3225
  def read(self, iprot):
-
 
3226
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3227
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3228
      return
-
 
3229
    iprot.readStructBegin()
-
 
3230
    while True:
-
 
3231
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3232
      if ftype == TType.STOP:
-
 
3233
        break
-
 
3234
      if fid == 1:
-
 
3235
        if ftype == TType.I64:
-
 
3236
          self.paymentId = iprot.readI64();
-
 
3237
        else:
-
 
3238
          iprot.skip(ftype)
-
 
3239
      elif fid == 2:
-
 
3240
        if ftype == TType.I32:
-
 
3241
          self.category = iprot.readI32();
-
 
3242
        else:
-
 
3243
          iprot.skip(ftype)
-
 
3244
      else:
-
 
3245
        iprot.skip(ftype)
-
 
3246
      iprot.readFieldEnd()
-
 
3247
    iprot.readStructEnd()
-
 
3248
 
-
 
3249
  def write(self, oprot):
-
 
3250
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3251
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3252
      return
-
 
3253
    oprot.writeStructBegin('markPaymentAsProcessed_args')
-
 
3254
    if self.paymentId is not None:
-
 
3255
      oprot.writeFieldBegin('paymentId', TType.I64, 1)
-
 
3256
      oprot.writeI64(self.paymentId)
-
 
3257
      oprot.writeFieldEnd()
-
 
3258
    if self.category is not None:
-
 
3259
      oprot.writeFieldBegin('category', TType.I32, 2)
-
 
3260
      oprot.writeI32(self.category)
-
 
3261
      oprot.writeFieldEnd()
-
 
3262
    oprot.writeFieldStop()
-
 
3263
    oprot.writeStructEnd()
-
 
3264
 
-
 
3265
  def validate(self):
-
 
3266
    return
-
 
3267
 
-
 
3268
 
-
 
3269
  def __repr__(self):
-
 
3270
    L = ['%s=%r' % (key, value)
-
 
3271
      for key, value in self.__dict__.iteritems()]
-
 
3272
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3273
 
-
 
3274
  def __eq__(self, other):
-
 
3275
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3276
 
-
 
3277
  def __ne__(self, other):
-
 
3278
    return not (self == other)
-
 
3279
 
-
 
3280
class markPaymentAsProcessed_result:
-
 
3281
 
-
 
3282
  thrift_spec = (
-
 
3283
  )
-
 
3284
 
-
 
3285
  def read(self, iprot):
-
 
3286
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3287
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3288
      return
-
 
3289
    iprot.readStructBegin()
-
 
3290
    while True:
-
 
3291
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3292
      if ftype == TType.STOP:
-
 
3293
        break
-
 
3294
      else:
-
 
3295
        iprot.skip(ftype)
-
 
3296
      iprot.readFieldEnd()
-
 
3297
    iprot.readStructEnd()
-
 
3298
 
-
 
3299
  def write(self, oprot):
-
 
3300
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3301
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3302
      return
-
 
3303
    oprot.writeStructBegin('markPaymentAsProcessed_result')
-
 
3304
    oprot.writeFieldStop()
-
 
3305
    oprot.writeStructEnd()
-
 
3306
 
-
 
3307
  def validate(self):
-
 
3308
    return
2953
 
3309
 
2954
 
3310
 
2955
  def __repr__(self):
3311
  def __repr__(self):
2956
    L = ['%s=%r' % (key, value)
3312
    L = ['%s=%r' % (key, value)
2957
      for key, value in self.__dict__.iteritems()]
3313
      for key, value in self.__dict__.iteritems()]