Subversion Repositories SmartDukaan

Rev

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

Rev 3583 Rev 3616
Line 114... Line 114...
114
     * @param merchantPaymentId
114
     * @param merchantPaymentId
115
     */
115
     */
116
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
116
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
117
 
117
 
118
    /**
118
    /**
-
 
119
     * Initialize the payment pipe for a HDFC EMI payment. The URL the user should be redirected to is returned.
-
 
120
     * In case of any processing error, an exception is raised.
-
 
121
     * 
-
 
122
     * @param merchantPaymentId
-
 
123
     */
-
 
124
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
-
 
125
 
-
 
126
    /**
119
     * Create a refund of the given amount corresponding to the given order to be processed through the same
127
     * Create a refund of the given amount corresponding to the given order to be processed through the same
120
     * payment gateway which processed the payment for the corresponding transaction.
128
     * payment gateway which processed the payment for the corresponding transaction.
121
     * Returns the id of the newly created Refund.
129
     * Returns the id of the newly created Refund.
122
     * 
130
     * 
123
     * @param orderId
131
     * @param orderId
Line 154... Line 162...
154
 
162
 
155
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException;
163
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException;
156
 
164
 
157
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException;
165
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException;
158
 
166
 
-
 
167
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException;
-
 
168
 
159
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
169
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
160
 
170
 
161
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
171
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
162
 
172
 
163
  }
173
  }
Line 431... Line 441...
431
        throw result.pe;
441
        throw result.pe;
432
      }
442
      }
433
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
443
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
434
    }
444
    }
435
 
445
 
-
 
446
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException
-
 
447
    {
-
 
448
      send_initializeHdfcEmiPayment(merchantPaymentId);
-
 
449
      return recv_initializeHdfcEmiPayment();
-
 
450
    }
-
 
451
 
-
 
452
    public void send_initializeHdfcEmiPayment(long merchantPaymentId) throws org.apache.thrift.TException
-
 
453
    {
-
 
454
      initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
-
 
455
      args.setMerchantPaymentId(merchantPaymentId);
-
 
456
      sendBase("initializeHdfcEmiPayment", args);
-
 
457
    }
-
 
458
 
-
 
459
    public String recv_initializeHdfcEmiPayment() throws PaymentException, org.apache.thrift.TException
-
 
460
    {
-
 
461
      initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
-
 
462
      receiveBase(result, "initializeHdfcEmiPayment");
-
 
463
      if (result.isSetSuccess()) {
-
 
464
        return result.success;
-
 
465
      }
-
 
466
      if (result.pe != null) {
-
 
467
        throw result.pe;
-
 
468
      }
-
 
469
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcEmiPayment failed: unknown result");
-
 
470
    }
-
 
471
 
436
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException
472
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException
437
    {
473
    {
438
      send_createRefund(orderId, merchantTxnId, amount);
474
      send_createRefund(orderId, merchantTxnId, amount);
439
      return recv_createRefund();
475
      return recv_createRefund();
440
    }
476
    }
Line 851... Line 887...
851
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
887
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
852
        return (new Client(prot)).recv_initializeHdfcPayment();
888
        return (new Client(prot)).recv_initializeHdfcPayment();
853
      }
889
      }
854
    }
890
    }
855
 
891
 
-
 
892
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException {
-
 
893
      checkReady();
-
 
894
      initializeHdfcEmiPayment_call method_call = new initializeHdfcEmiPayment_call(merchantPaymentId, resultHandler, this, ___protocolFactory, ___transport);
-
 
895
      this.___currentMethod = method_call;
-
 
896
      ___manager.call(method_call);
-
 
897
    }
-
 
898
 
-
 
899
    public static class initializeHdfcEmiPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
900
      private long merchantPaymentId;
-
 
901
      public initializeHdfcEmiPayment_call(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcEmiPayment_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
902
        super(client, protocolFactory, transport, resultHandler, false);
-
 
903
        this.merchantPaymentId = merchantPaymentId;
-
 
904
      }
-
 
905
 
-
 
906
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
907
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeHdfcEmiPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
908
        initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
-
 
909
        args.setMerchantPaymentId(merchantPaymentId);
-
 
910
        args.write(prot);
-
 
911
        prot.writeMessageEnd();
-
 
912
      }
-
 
913
 
-
 
914
      public String getResult() throws PaymentException, org.apache.thrift.TException {
-
 
915
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
916
          throw new IllegalStateException("Method call not finished!");
-
 
917
        }
-
 
918
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
919
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
920
        return (new Client(prot)).recv_initializeHdfcEmiPayment();
-
 
921
      }
-
 
922
    }
-
 
923
 
856
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<createRefund_call> resultHandler) throws org.apache.thrift.TException {
924
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<createRefund_call> resultHandler) throws org.apache.thrift.TException {
857
      checkReady();
925
      checkReady();
858
      createRefund_call method_call = new createRefund_call(orderId, merchantTxnId, amount, resultHandler, this, ___protocolFactory, ___transport);
926
      createRefund_call method_call = new createRefund_call(orderId, merchantTxnId, amount, resultHandler, this, ___protocolFactory, ___transport);
859
      this.___currentMethod = method_call;
927
      this.___currentMethod = method_call;
860
      ___manager.call(method_call);
928
      ___manager.call(method_call);
Line 943... Line 1011...
943
      processMap.put("getPayment", new getPayment());
1011
      processMap.put("getPayment", new getPayment());
944
      processMap.put("getPaymentForTxnId", new getPaymentForTxnId());
1012
      processMap.put("getPaymentForTxnId", new getPaymentForTxnId());
945
      processMap.put("updatePaymentDetails", new updatePaymentDetails());
1013
      processMap.put("updatePaymentDetails", new updatePaymentDetails());
946
      processMap.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
1014
      processMap.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
947
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
1015
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
-
 
1016
      processMap.put("initializeHdfcEmiPayment", new initializeHdfcEmiPayment());
948
      processMap.put("createRefund", new createRefund());
1017
      processMap.put("createRefund", new createRefund());
949
      processMap.put("capturePayment", new capturePayment());
1018
      processMap.put("capturePayment", new capturePayment());
950
      return processMap;
1019
      return processMap;
951
    }
1020
    }
952
 
1021
 
Line 1126... Line 1195...
1126
        }
1195
        }
1127
        return result;
1196
        return result;
1128
      }
1197
      }
1129
    }
1198
    }
1130
 
1199
 
-
 
1200
    private static class initializeHdfcEmiPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeHdfcEmiPayment_args> {
-
 
1201
      public initializeHdfcEmiPayment() {
-
 
1202
        super("initializeHdfcEmiPayment");
-
 
1203
      }
-
 
1204
 
-
 
1205
      protected initializeHdfcEmiPayment_args getEmptyArgsInstance() {
-
 
1206
        return new initializeHdfcEmiPayment_args();
-
 
1207
      }
-
 
1208
 
-
 
1209
      protected initializeHdfcEmiPayment_result getResult(I iface, initializeHdfcEmiPayment_args args) throws org.apache.thrift.TException {
-
 
1210
        initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
-
 
1211
        try {
-
 
1212
          result.success = iface.initializeHdfcEmiPayment(args.merchantPaymentId);
-
 
1213
        } catch (PaymentException pe) {
-
 
1214
          result.pe = pe;
-
 
1215
        }
-
 
1216
        return result;
-
 
1217
      }
-
 
1218
    }
-
 
1219
 
1131
    private static class createRefund<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createRefund_args> {
1220
    private static class createRefund<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createRefund_args> {
1132
      public createRefund() {
1221
      public createRefund() {
1133
        super("createRefund");
1222
        super("createRefund");
1134
      }
1223
      }
1135
 
1224
 
Line 9052... Line 9141...
9052
      boolean first = true;
9141
      boolean first = true;
9053
 
9142
 
9054
      sb.append("success:");
9143
      sb.append("success:");
9055
      if (this.success == null) {
9144
      if (this.success == null) {
9056
        sb.append("null");
9145
        sb.append("null");
-
 
9146
      } else {
-
 
9147
        sb.append(this.success);
-
 
9148
      }
-
 
9149
      first = false;
-
 
9150
      if (!first) sb.append(", ");
-
 
9151
      sb.append("pe:");
-
 
9152
      if (this.pe == null) {
-
 
9153
        sb.append("null");
-
 
9154
      } else {
-
 
9155
        sb.append(this.pe);
-
 
9156
      }
-
 
9157
      first = false;
-
 
9158
      sb.append(")");
-
 
9159
      return sb.toString();
-
 
9160
    }
-
 
9161
 
-
 
9162
    public void validate() throws org.apache.thrift.TException {
-
 
9163
      // check for required fields
-
 
9164
    }
-
 
9165
 
-
 
9166
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
9167
      try {
-
 
9168
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
9169
      } catch (org.apache.thrift.TException te) {
-
 
9170
        throw new java.io.IOException(te);
-
 
9171
      }
-
 
9172
    }
-
 
9173
 
-
 
9174
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
9175
      try {
-
 
9176
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
9177
      } catch (org.apache.thrift.TException te) {
-
 
9178
        throw new java.io.IOException(te);
-
 
9179
      }
-
 
9180
    }
-
 
9181
 
-
 
9182
  }
-
 
9183
 
-
 
9184
  public static class initializeHdfcEmiPayment_args implements org.apache.thrift.TBase<initializeHdfcEmiPayment_args, initializeHdfcEmiPayment_args._Fields>, java.io.Serializable, Cloneable   {
-
 
9185
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_args");
-
 
9186
 
-
 
9187
    private static final org.apache.thrift.protocol.TField MERCHANT_PAYMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("merchantPaymentId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
9188
 
-
 
9189
    private long merchantPaymentId; // required
-
 
9190
 
-
 
9191
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
9192
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
9193
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
-
 
9194
 
-
 
9195
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
9196
 
-
 
9197
      static {
-
 
9198
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
9199
          byName.put(field.getFieldName(), field);
-
 
9200
        }
-
 
9201
      }
-
 
9202
 
-
 
9203
      /**
-
 
9204
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
9205
       */
-
 
9206
      public static _Fields findByThriftId(int fieldId) {
-
 
9207
        switch(fieldId) {
-
 
9208
          case 1: // MERCHANT_PAYMENT_ID
-
 
9209
            return MERCHANT_PAYMENT_ID;
-
 
9210
          default:
-
 
9211
            return null;
-
 
9212
        }
-
 
9213
      }
-
 
9214
 
-
 
9215
      /**
-
 
9216
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
9217
       * if it is not found.
-
 
9218
       */
-
 
9219
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
9220
        _Fields fields = findByThriftId(fieldId);
-
 
9221
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
9222
        return fields;
-
 
9223
      }
-
 
9224
 
-
 
9225
      /**
-
 
9226
       * Find the _Fields constant that matches name, or null if its not found.
-
 
9227
       */
-
 
9228
      public static _Fields findByName(String name) {
-
 
9229
        return byName.get(name);
-
 
9230
      }
-
 
9231
 
-
 
9232
      private final short _thriftId;
-
 
9233
      private final String _fieldName;
-
 
9234
 
-
 
9235
      _Fields(short thriftId, String fieldName) {
-
 
9236
        _thriftId = thriftId;
-
 
9237
        _fieldName = fieldName;
-
 
9238
      }
-
 
9239
 
-
 
9240
      public short getThriftFieldId() {
-
 
9241
        return _thriftId;
-
 
9242
      }
-
 
9243
 
-
 
9244
      public String getFieldName() {
-
 
9245
        return _fieldName;
-
 
9246
      }
-
 
9247
    }
-
 
9248
 
-
 
9249
    // isset id assignments
-
 
9250
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
-
 
9251
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
9252
 
-
 
9253
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
9254
    static {
-
 
9255
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
9256
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
9257
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
9258
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
9259
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_args.class, metaDataMap);
-
 
9260
    }
-
 
9261
 
-
 
9262
    public initializeHdfcEmiPayment_args() {
-
 
9263
    }
-
 
9264
 
-
 
9265
    public initializeHdfcEmiPayment_args(
-
 
9266
      long merchantPaymentId)
-
 
9267
    {
-
 
9268
      this();
-
 
9269
      this.merchantPaymentId = merchantPaymentId;
-
 
9270
      setMerchantPaymentIdIsSet(true);
-
 
9271
    }
-
 
9272
 
-
 
9273
    /**
-
 
9274
     * Performs a deep copy on <i>other</i>.
-
 
9275
     */
-
 
9276
    public initializeHdfcEmiPayment_args(initializeHdfcEmiPayment_args other) {
-
 
9277
      __isset_bit_vector.clear();
-
 
9278
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
9279
      this.merchantPaymentId = other.merchantPaymentId;
-
 
9280
    }
-
 
9281
 
-
 
9282
    public initializeHdfcEmiPayment_args deepCopy() {
-
 
9283
      return new initializeHdfcEmiPayment_args(this);
-
 
9284
    }
-
 
9285
 
-
 
9286
    @Override
-
 
9287
    public void clear() {
-
 
9288
      setMerchantPaymentIdIsSet(false);
-
 
9289
      this.merchantPaymentId = 0;
-
 
9290
    }
-
 
9291
 
-
 
9292
    public long getMerchantPaymentId() {
-
 
9293
      return this.merchantPaymentId;
-
 
9294
    }
-
 
9295
 
-
 
9296
    public void setMerchantPaymentId(long merchantPaymentId) {
-
 
9297
      this.merchantPaymentId = merchantPaymentId;
-
 
9298
      setMerchantPaymentIdIsSet(true);
-
 
9299
    }
-
 
9300
 
-
 
9301
    public void unsetMerchantPaymentId() {
-
 
9302
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
-
 
9303
    }
-
 
9304
 
-
 
9305
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
-
 
9306
    public boolean isSetMerchantPaymentId() {
-
 
9307
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
-
 
9308
    }
-
 
9309
 
-
 
9310
    public void setMerchantPaymentIdIsSet(boolean value) {
-
 
9311
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
-
 
9312
    }
-
 
9313
 
-
 
9314
    public void setFieldValue(_Fields field, Object value) {
-
 
9315
      switch (field) {
-
 
9316
      case MERCHANT_PAYMENT_ID:
-
 
9317
        if (value == null) {
-
 
9318
          unsetMerchantPaymentId();
-
 
9319
        } else {
-
 
9320
          setMerchantPaymentId((Long)value);
-
 
9321
        }
-
 
9322
        break;
-
 
9323
 
-
 
9324
      }
-
 
9325
    }
-
 
9326
 
-
 
9327
    public Object getFieldValue(_Fields field) {
-
 
9328
      switch (field) {
-
 
9329
      case MERCHANT_PAYMENT_ID:
-
 
9330
        return Long.valueOf(getMerchantPaymentId());
-
 
9331
 
-
 
9332
      }
-
 
9333
      throw new IllegalStateException();
-
 
9334
    }
-
 
9335
 
-
 
9336
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
9337
    public boolean isSet(_Fields field) {
-
 
9338
      if (field == null) {
-
 
9339
        throw new IllegalArgumentException();
-
 
9340
      }
-
 
9341
 
-
 
9342
      switch (field) {
-
 
9343
      case MERCHANT_PAYMENT_ID:
-
 
9344
        return isSetMerchantPaymentId();
-
 
9345
      }
-
 
9346
      throw new IllegalStateException();
-
 
9347
    }
-
 
9348
 
-
 
9349
    @Override
-
 
9350
    public boolean equals(Object that) {
-
 
9351
      if (that == null)
-
 
9352
        return false;
-
 
9353
      if (that instanceof initializeHdfcEmiPayment_args)
-
 
9354
        return this.equals((initializeHdfcEmiPayment_args)that);
-
 
9355
      return false;
-
 
9356
    }
-
 
9357
 
-
 
9358
    public boolean equals(initializeHdfcEmiPayment_args that) {
-
 
9359
      if (that == null)
-
 
9360
        return false;
-
 
9361
 
-
 
9362
      boolean this_present_merchantPaymentId = true;
-
 
9363
      boolean that_present_merchantPaymentId = true;
-
 
9364
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
-
 
9365
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
-
 
9366
          return false;
-
 
9367
        if (this.merchantPaymentId != that.merchantPaymentId)
-
 
9368
          return false;
-
 
9369
      }
-
 
9370
 
-
 
9371
      return true;
-
 
9372
    }
-
 
9373
 
-
 
9374
    @Override
-
 
9375
    public int hashCode() {
-
 
9376
      return 0;
-
 
9377
    }
-
 
9378
 
-
 
9379
    public int compareTo(initializeHdfcEmiPayment_args other) {
-
 
9380
      if (!getClass().equals(other.getClass())) {
-
 
9381
        return getClass().getName().compareTo(other.getClass().getName());
-
 
9382
      }
-
 
9383
 
-
 
9384
      int lastComparison = 0;
-
 
9385
      initializeHdfcEmiPayment_args typedOther = (initializeHdfcEmiPayment_args)other;
-
 
9386
 
-
 
9387
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
-
 
9388
      if (lastComparison != 0) {
-
 
9389
        return lastComparison;
-
 
9390
      }
-
 
9391
      if (isSetMerchantPaymentId()) {
-
 
9392
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
-
 
9393
        if (lastComparison != 0) {
-
 
9394
          return lastComparison;
-
 
9395
        }
-
 
9396
      }
-
 
9397
      return 0;
-
 
9398
    }
-
 
9399
 
-
 
9400
    public _Fields fieldForId(int fieldId) {
-
 
9401
      return _Fields.findByThriftId(fieldId);
-
 
9402
    }
-
 
9403
 
-
 
9404
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
9405
      org.apache.thrift.protocol.TField field;
-
 
9406
      iprot.readStructBegin();
-
 
9407
      while (true)
-
 
9408
      {
-
 
9409
        field = iprot.readFieldBegin();
-
 
9410
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
9411
          break;
-
 
9412
        }
-
 
9413
        switch (field.id) {
-
 
9414
          case 1: // MERCHANT_PAYMENT_ID
-
 
9415
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
9416
              this.merchantPaymentId = iprot.readI64();
-
 
9417
              setMerchantPaymentIdIsSet(true);
-
 
9418
            } else { 
-
 
9419
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9420
            }
-
 
9421
            break;
-
 
9422
          default:
-
 
9423
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9424
        }
-
 
9425
        iprot.readFieldEnd();
-
 
9426
      }
-
 
9427
      iprot.readStructEnd();
-
 
9428
      validate();
-
 
9429
    }
-
 
9430
 
-
 
9431
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
9432
      validate();
-
 
9433
 
-
 
9434
      oprot.writeStructBegin(STRUCT_DESC);
-
 
9435
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
-
 
9436
      oprot.writeI64(this.merchantPaymentId);
-
 
9437
      oprot.writeFieldEnd();
-
 
9438
      oprot.writeFieldStop();
-
 
9439
      oprot.writeStructEnd();
-
 
9440
    }
-
 
9441
 
-
 
9442
    @Override
-
 
9443
    public String toString() {
-
 
9444
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_args(");
-
 
9445
      boolean first = true;
-
 
9446
 
-
 
9447
      sb.append("merchantPaymentId:");
-
 
9448
      sb.append(this.merchantPaymentId);
-
 
9449
      first = false;
-
 
9450
      sb.append(")");
-
 
9451
      return sb.toString();
-
 
9452
    }
-
 
9453
 
-
 
9454
    public void validate() throws org.apache.thrift.TException {
-
 
9455
      // check for required fields
-
 
9456
    }
-
 
9457
 
-
 
9458
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
9459
      try {
-
 
9460
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
9461
      } catch (org.apache.thrift.TException te) {
-
 
9462
        throw new java.io.IOException(te);
-
 
9463
      }
-
 
9464
    }
-
 
9465
 
-
 
9466
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
9467
      try {
-
 
9468
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
9469
      } catch (org.apache.thrift.TException te) {
-
 
9470
        throw new java.io.IOException(te);
-
 
9471
      }
-
 
9472
    }
-
 
9473
 
-
 
9474
  }
-
 
9475
 
-
 
9476
  public static class initializeHdfcEmiPayment_result implements org.apache.thrift.TBase<initializeHdfcEmiPayment_result, initializeHdfcEmiPayment_result._Fields>, java.io.Serializable, Cloneable   {
-
 
9477
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_result");
-
 
9478
 
-
 
9479
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
 
9480
    private static final org.apache.thrift.protocol.TField PE_FIELD_DESC = new org.apache.thrift.protocol.TField("pe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
9481
 
-
 
9482
    private String success; // required
-
 
9483
    private PaymentException pe; // required
-
 
9484
 
-
 
9485
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
9486
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
9487
      SUCCESS((short)0, "success"),
-
 
9488
      PE((short)1, "pe");
-
 
9489
 
-
 
9490
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
9491
 
-
 
9492
      static {
-
 
9493
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
9494
          byName.put(field.getFieldName(), field);
-
 
9495
        }
-
 
9496
      }
-
 
9497
 
-
 
9498
      /**
-
 
9499
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
9500
       */
-
 
9501
      public static _Fields findByThriftId(int fieldId) {
-
 
9502
        switch(fieldId) {
-
 
9503
          case 0: // SUCCESS
-
 
9504
            return SUCCESS;
-
 
9505
          case 1: // PE
-
 
9506
            return PE;
-
 
9507
          default:
-
 
9508
            return null;
-
 
9509
        }
-
 
9510
      }
-
 
9511
 
-
 
9512
      /**
-
 
9513
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
9514
       * if it is not found.
-
 
9515
       */
-
 
9516
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
9517
        _Fields fields = findByThriftId(fieldId);
-
 
9518
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
9519
        return fields;
-
 
9520
      }
-
 
9521
 
-
 
9522
      /**
-
 
9523
       * Find the _Fields constant that matches name, or null if its not found.
-
 
9524
       */
-
 
9525
      public static _Fields findByName(String name) {
-
 
9526
        return byName.get(name);
-
 
9527
      }
-
 
9528
 
-
 
9529
      private final short _thriftId;
-
 
9530
      private final String _fieldName;
-
 
9531
 
-
 
9532
      _Fields(short thriftId, String fieldName) {
-
 
9533
        _thriftId = thriftId;
-
 
9534
        _fieldName = fieldName;
-
 
9535
      }
-
 
9536
 
-
 
9537
      public short getThriftFieldId() {
-
 
9538
        return _thriftId;
-
 
9539
      }
-
 
9540
 
-
 
9541
      public String getFieldName() {
-
 
9542
        return _fieldName;
-
 
9543
      }
-
 
9544
    }
-
 
9545
 
-
 
9546
    // isset id assignments
-
 
9547
 
-
 
9548
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
9549
    static {
-
 
9550
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
9551
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
9552
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
9553
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
9554
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
9555
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
9556
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_result.class, metaDataMap);
-
 
9557
    }
-
 
9558
 
-
 
9559
    public initializeHdfcEmiPayment_result() {
-
 
9560
    }
-
 
9561
 
-
 
9562
    public initializeHdfcEmiPayment_result(
-
 
9563
      String success,
-
 
9564
      PaymentException pe)
-
 
9565
    {
-
 
9566
      this();
-
 
9567
      this.success = success;
-
 
9568
      this.pe = pe;
-
 
9569
    }
-
 
9570
 
-
 
9571
    /**
-
 
9572
     * Performs a deep copy on <i>other</i>.
-
 
9573
     */
-
 
9574
    public initializeHdfcEmiPayment_result(initializeHdfcEmiPayment_result other) {
-
 
9575
      if (other.isSetSuccess()) {
-
 
9576
        this.success = other.success;
-
 
9577
      }
-
 
9578
      if (other.isSetPe()) {
-
 
9579
        this.pe = new PaymentException(other.pe);
-
 
9580
      }
-
 
9581
    }
-
 
9582
 
-
 
9583
    public initializeHdfcEmiPayment_result deepCopy() {
-
 
9584
      return new initializeHdfcEmiPayment_result(this);
-
 
9585
    }
-
 
9586
 
-
 
9587
    @Override
-
 
9588
    public void clear() {
-
 
9589
      this.success = null;
-
 
9590
      this.pe = null;
-
 
9591
    }
-
 
9592
 
-
 
9593
    public String getSuccess() {
-
 
9594
      return this.success;
-
 
9595
    }
-
 
9596
 
-
 
9597
    public void setSuccess(String success) {
-
 
9598
      this.success = success;
-
 
9599
    }
-
 
9600
 
-
 
9601
    public void unsetSuccess() {
-
 
9602
      this.success = null;
-
 
9603
    }
-
 
9604
 
-
 
9605
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
9606
    public boolean isSetSuccess() {
-
 
9607
      return this.success != null;
-
 
9608
    }
-
 
9609
 
-
 
9610
    public void setSuccessIsSet(boolean value) {
-
 
9611
      if (!value) {
-
 
9612
        this.success = null;
-
 
9613
      }
-
 
9614
    }
-
 
9615
 
-
 
9616
    public PaymentException getPe() {
-
 
9617
      return this.pe;
-
 
9618
    }
-
 
9619
 
-
 
9620
    public void setPe(PaymentException pe) {
-
 
9621
      this.pe = pe;
-
 
9622
    }
-
 
9623
 
-
 
9624
    public void unsetPe() {
-
 
9625
      this.pe = null;
-
 
9626
    }
-
 
9627
 
-
 
9628
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
-
 
9629
    public boolean isSetPe() {
-
 
9630
      return this.pe != null;
-
 
9631
    }
-
 
9632
 
-
 
9633
    public void setPeIsSet(boolean value) {
-
 
9634
      if (!value) {
-
 
9635
        this.pe = null;
-
 
9636
      }
-
 
9637
    }
-
 
9638
 
-
 
9639
    public void setFieldValue(_Fields field, Object value) {
-
 
9640
      switch (field) {
-
 
9641
      case SUCCESS:
-
 
9642
        if (value == null) {
-
 
9643
          unsetSuccess();
-
 
9644
        } else {
-
 
9645
          setSuccess((String)value);
-
 
9646
        }
-
 
9647
        break;
-
 
9648
 
-
 
9649
      case PE:
-
 
9650
        if (value == null) {
-
 
9651
          unsetPe();
-
 
9652
        } else {
-
 
9653
          setPe((PaymentException)value);
-
 
9654
        }
-
 
9655
        break;
-
 
9656
 
-
 
9657
      }
-
 
9658
    }
-
 
9659
 
-
 
9660
    public Object getFieldValue(_Fields field) {
-
 
9661
      switch (field) {
-
 
9662
      case SUCCESS:
-
 
9663
        return getSuccess();
-
 
9664
 
-
 
9665
      case PE:
-
 
9666
        return getPe();
-
 
9667
 
-
 
9668
      }
-
 
9669
      throw new IllegalStateException();
-
 
9670
    }
-
 
9671
 
-
 
9672
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
9673
    public boolean isSet(_Fields field) {
-
 
9674
      if (field == null) {
-
 
9675
        throw new IllegalArgumentException();
-
 
9676
      }
-
 
9677
 
-
 
9678
      switch (field) {
-
 
9679
      case SUCCESS:
-
 
9680
        return isSetSuccess();
-
 
9681
      case PE:
-
 
9682
        return isSetPe();
-
 
9683
      }
-
 
9684
      throw new IllegalStateException();
-
 
9685
    }
-
 
9686
 
-
 
9687
    @Override
-
 
9688
    public boolean equals(Object that) {
-
 
9689
      if (that == null)
-
 
9690
        return false;
-
 
9691
      if (that instanceof initializeHdfcEmiPayment_result)
-
 
9692
        return this.equals((initializeHdfcEmiPayment_result)that);
-
 
9693
      return false;
-
 
9694
    }
-
 
9695
 
-
 
9696
    public boolean equals(initializeHdfcEmiPayment_result that) {
-
 
9697
      if (that == null)
-
 
9698
        return false;
-
 
9699
 
-
 
9700
      boolean this_present_success = true && this.isSetSuccess();
-
 
9701
      boolean that_present_success = true && that.isSetSuccess();
-
 
9702
      if (this_present_success || that_present_success) {
-
 
9703
        if (!(this_present_success && that_present_success))
-
 
9704
          return false;
-
 
9705
        if (!this.success.equals(that.success))
-
 
9706
          return false;
-
 
9707
      }
-
 
9708
 
-
 
9709
      boolean this_present_pe = true && this.isSetPe();
-
 
9710
      boolean that_present_pe = true && that.isSetPe();
-
 
9711
      if (this_present_pe || that_present_pe) {
-
 
9712
        if (!(this_present_pe && that_present_pe))
-
 
9713
          return false;
-
 
9714
        if (!this.pe.equals(that.pe))
-
 
9715
          return false;
-
 
9716
      }
-
 
9717
 
-
 
9718
      return true;
-
 
9719
    }
-
 
9720
 
-
 
9721
    @Override
-
 
9722
    public int hashCode() {
-
 
9723
      return 0;
-
 
9724
    }
-
 
9725
 
-
 
9726
    public int compareTo(initializeHdfcEmiPayment_result other) {
-
 
9727
      if (!getClass().equals(other.getClass())) {
-
 
9728
        return getClass().getName().compareTo(other.getClass().getName());
-
 
9729
      }
-
 
9730
 
-
 
9731
      int lastComparison = 0;
-
 
9732
      initializeHdfcEmiPayment_result typedOther = (initializeHdfcEmiPayment_result)other;
-
 
9733
 
-
 
9734
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
9735
      if (lastComparison != 0) {
-
 
9736
        return lastComparison;
-
 
9737
      }
-
 
9738
      if (isSetSuccess()) {
-
 
9739
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
9740
        if (lastComparison != 0) {
-
 
9741
          return lastComparison;
-
 
9742
        }
-
 
9743
      }
-
 
9744
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
-
 
9745
      if (lastComparison != 0) {
-
 
9746
        return lastComparison;
-
 
9747
      }
-
 
9748
      if (isSetPe()) {
-
 
9749
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
-
 
9750
        if (lastComparison != 0) {
-
 
9751
          return lastComparison;
-
 
9752
        }
-
 
9753
      }
-
 
9754
      return 0;
-
 
9755
    }
-
 
9756
 
-
 
9757
    public _Fields fieldForId(int fieldId) {
-
 
9758
      return _Fields.findByThriftId(fieldId);
-
 
9759
    }
-
 
9760
 
-
 
9761
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
9762
      org.apache.thrift.protocol.TField field;
-
 
9763
      iprot.readStructBegin();
-
 
9764
      while (true)
-
 
9765
      {
-
 
9766
        field = iprot.readFieldBegin();
-
 
9767
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
9768
          break;
-
 
9769
        }
-
 
9770
        switch (field.id) {
-
 
9771
          case 0: // SUCCESS
-
 
9772
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
9773
              this.success = iprot.readString();
-
 
9774
            } else { 
-
 
9775
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9776
            }
-
 
9777
            break;
-
 
9778
          case 1: // PE
-
 
9779
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
9780
              this.pe = new PaymentException();
-
 
9781
              this.pe.read(iprot);
-
 
9782
            } else { 
-
 
9783
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9784
            }
-
 
9785
            break;
-
 
9786
          default:
-
 
9787
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9788
        }
-
 
9789
        iprot.readFieldEnd();
-
 
9790
      }
-
 
9791
      iprot.readStructEnd();
-
 
9792
      validate();
-
 
9793
    }
-
 
9794
 
-
 
9795
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
9796
      oprot.writeStructBegin(STRUCT_DESC);
-
 
9797
 
-
 
9798
      if (this.isSetSuccess()) {
-
 
9799
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
9800
        oprot.writeString(this.success);
-
 
9801
        oprot.writeFieldEnd();
-
 
9802
      } else if (this.isSetPe()) {
-
 
9803
        oprot.writeFieldBegin(PE_FIELD_DESC);
-
 
9804
        this.pe.write(oprot);
-
 
9805
        oprot.writeFieldEnd();
-
 
9806
      }
-
 
9807
      oprot.writeFieldStop();
-
 
9808
      oprot.writeStructEnd();
-
 
9809
    }
-
 
9810
 
-
 
9811
    @Override
-
 
9812
    public String toString() {
-
 
9813
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_result(");
-
 
9814
      boolean first = true;
-
 
9815
 
-
 
9816
      sb.append("success:");
-
 
9817
      if (this.success == null) {
-
 
9818
        sb.append("null");
9057
      } else {
9819
      } else {
9058
        sb.append(this.success);
9820
        sb.append(this.success);
9059
      }
9821
      }
9060
      first = false;
9822
      first = false;
9061
      if (!first) sb.append(", ");
9823
      if (!first) sb.append(", ");