Subversion Repositories SmartDukaan

Rev

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

Rev 2690 Rev 2708
Line 122... Line 122...
122
     * @param paymentParams
122
     * @param paymentParams
123
     */
123
     */
124
    public Payment updateAndCaptureEbsPayment(Map<String,String> paymentParams) throws PaymentException, TException;
124
    public Payment updateAndCaptureEbsPayment(Map<String,String> paymentParams) throws PaymentException, TException;
125
 
125
 
126
    /**
126
    /**
-
 
127
     * Captures an already authorized EBS Payment and returns a map containing the details of the captured transaction
-
 
128
     * 
-
 
129
     * @param merchantPaymentId
-
 
130
     */
-
 
131
    public Map<String,String> captureEbsPayment(long merchantPaymentId) throws PaymentException, TException;
-
 
132
 
-
 
133
    /**
127
     * Captures an already authorized Hdfc Payment and returns a map containing the details of the capture transaction
134
     * Captures an already authorized Hdfc Payment and returns a map containing the details of the captured transaction
128
     * 
135
     * 
129
     * @param merchantPaymentId
136
     * @param merchantPaymentId
130
     */
137
     */
131
    public Map<String,String> captureHdfcPayment(long merchantPaymentId) throws PaymentException, TException;
138
    public Map<String,String> captureHdfcPayment(long merchantPaymentId) throws PaymentException, TException;
132
 
139
 
Line 546... Line 553...
546
        throw result.pe;
553
        throw result.pe;
547
      }
554
      }
548
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateAndCaptureEbsPayment failed: unknown result");
555
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateAndCaptureEbsPayment failed: unknown result");
549
    }
556
    }
550
 
557
 
-
 
558
    public Map<String,String> captureEbsPayment(long merchantPaymentId) throws PaymentException, TException
-
 
559
    {
-
 
560
      send_captureEbsPayment(merchantPaymentId);
-
 
561
      return recv_captureEbsPayment();
-
 
562
    }
-
 
563
 
-
 
564
    public void send_captureEbsPayment(long merchantPaymentId) throws TException
-
 
565
    {
-
 
566
      oprot_.writeMessageBegin(new TMessage("captureEbsPayment", TMessageType.CALL, seqid_));
-
 
567
      captureEbsPayment_args args = new captureEbsPayment_args();
-
 
568
      args.merchantPaymentId = merchantPaymentId;
-
 
569
      args.write(oprot_);
-
 
570
      oprot_.writeMessageEnd();
-
 
571
      oprot_.getTransport().flush();
-
 
572
    }
-
 
573
 
-
 
574
    public Map<String,String> recv_captureEbsPayment() throws PaymentException, TException
-
 
575
    {
-
 
576
      TMessage msg = iprot_.readMessageBegin();
-
 
577
      if (msg.type == TMessageType.EXCEPTION) {
-
 
578
        TApplicationException x = TApplicationException.read(iprot_);
-
 
579
        iprot_.readMessageEnd();
-
 
580
        throw x;
-
 
581
      }
-
 
582
      captureEbsPayment_result result = new captureEbsPayment_result();
-
 
583
      result.read(iprot_);
-
 
584
      iprot_.readMessageEnd();
-
 
585
      if (result.isSetSuccess()) {
-
 
586
        return result.success;
-
 
587
      }
-
 
588
      if (result.pe != null) {
-
 
589
        throw result.pe;
-
 
590
      }
-
 
591
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "captureEbsPayment failed: unknown result");
-
 
592
    }
-
 
593
 
551
    public Map<String,String> captureHdfcPayment(long merchantPaymentId) throws PaymentException, TException
594
    public Map<String,String> captureHdfcPayment(long merchantPaymentId) throws PaymentException, TException
552
    {
595
    {
553
      send_captureHdfcPayment(merchantPaymentId);
596
      send_captureHdfcPayment(merchantPaymentId);
554
      return recv_captureHdfcPayment();
597
      return recv_captureHdfcPayment();
555
    }
598
    }
Line 672... Line 715...
672
      processMap_.put("getPayment", new getPayment());
715
      processMap_.put("getPayment", new getPayment());
673
      processMap_.put("getPaymentForTxnId", new getPaymentForTxnId());
716
      processMap_.put("getPaymentForTxnId", new getPaymentForTxnId());
674
      processMap_.put("updatePaymentDetails", new updatePaymentDetails());
717
      processMap_.put("updatePaymentDetails", new updatePaymentDetails());
675
      processMap_.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
718
      processMap_.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
676
      processMap_.put("updateAndCaptureEbsPayment", new updateAndCaptureEbsPayment());
719
      processMap_.put("updateAndCaptureEbsPayment", new updateAndCaptureEbsPayment());
-
 
720
      processMap_.put("captureEbsPayment", new captureEbsPayment());
677
      processMap_.put("captureHdfcPayment", new captureHdfcPayment());
721
      processMap_.put("captureHdfcPayment", new captureHdfcPayment());
678
      processMap_.put("initializeHdfcPayment", new initializeHdfcPayment());
722
      processMap_.put("initializeHdfcPayment", new initializeHdfcPayment());
679
      processMap_.put("createRefund", new createRefund());
723
      processMap_.put("createRefund", new createRefund());
680
    }
724
    }
681
 
725
 
Line 960... Line 1004...
960
        oprot.getTransport().flush();
1004
        oprot.getTransport().flush();
961
      }
1005
      }
962
 
1006
 
963
    }
1007
    }
964
 
1008
 
-
 
1009
    private class captureEbsPayment implements ProcessFunction {
-
 
1010
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
1011
      {
-
 
1012
        captureEbsPayment_args args = new captureEbsPayment_args();
-
 
1013
        args.read(iprot);
-
 
1014
        iprot.readMessageEnd();
-
 
1015
        captureEbsPayment_result result = new captureEbsPayment_result();
-
 
1016
        try {
-
 
1017
          result.success = iface_.captureEbsPayment(args.merchantPaymentId);
-
 
1018
        } catch (PaymentException pe) {
-
 
1019
          result.pe = pe;
-
 
1020
        } catch (Throwable th) {
-
 
1021
          LOGGER.error("Internal error processing captureEbsPayment", th);
-
 
1022
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing captureEbsPayment");
-
 
1023
          oprot.writeMessageBegin(new TMessage("captureEbsPayment", TMessageType.EXCEPTION, seqid));
-
 
1024
          x.write(oprot);
-
 
1025
          oprot.writeMessageEnd();
-
 
1026
          oprot.getTransport().flush();
-
 
1027
          return;
-
 
1028
        }
-
 
1029
        oprot.writeMessageBegin(new TMessage("captureEbsPayment", TMessageType.REPLY, seqid));
-
 
1030
        result.write(oprot);
-
 
1031
        oprot.writeMessageEnd();
-
 
1032
        oprot.getTransport().flush();
-
 
1033
      }
-
 
1034
 
-
 
1035
    }
-
 
1036
 
965
    private class captureHdfcPayment implements ProcessFunction {
1037
    private class captureHdfcPayment implements ProcessFunction {
966
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1038
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
967
      {
1039
      {
968
        captureHdfcPayment_args args = new captureHdfcPayment_args();
1040
        captureHdfcPayment_args args = new captureHdfcPayment_args();
969
        args.read(iprot);
1041
        args.read(iprot);
Line 9030... Line 9102...
9030
      // check for required fields
9102
      // check for required fields
9031
    }
9103
    }
9032
 
9104
 
9033
  }
9105
  }
9034
 
9106
 
-
 
9107
  public static class captureEbsPayment_args implements TBase<captureEbsPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<captureEbsPayment_args>   {
-
 
9108
    private static final TStruct STRUCT_DESC = new TStruct("captureEbsPayment_args");
-
 
9109
 
-
 
9110
    private static final TField MERCHANT_PAYMENT_ID_FIELD_DESC = new TField("merchantPaymentId", TType.I64, (short)1);
-
 
9111
 
-
 
9112
    private long merchantPaymentId;
-
 
9113
 
-
 
9114
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
9115
    public enum _Fields implements TFieldIdEnum {
-
 
9116
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
-
 
9117
 
-
 
9118
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
9119
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
9120
 
-
 
9121
      static {
-
 
9122
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
9123
          byId.put((int)field._thriftId, field);
-
 
9124
          byName.put(field.getFieldName(), field);
-
 
9125
        }
-
 
9126
      }
-
 
9127
 
-
 
9128
      /**
-
 
9129
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
9130
       */
-
 
9131
      public static _Fields findByThriftId(int fieldId) {
-
 
9132
        return byId.get(fieldId);
-
 
9133
      }
-
 
9134
 
-
 
9135
      /**
-
 
9136
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
9137
       * if it is not found.
-
 
9138
       */
-
 
9139
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
9140
        _Fields fields = findByThriftId(fieldId);
-
 
9141
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
9142
        return fields;
-
 
9143
      }
-
 
9144
 
-
 
9145
      /**
-
 
9146
       * Find the _Fields constant that matches name, or null if its not found.
-
 
9147
       */
-
 
9148
      public static _Fields findByName(String name) {
-
 
9149
        return byName.get(name);
-
 
9150
      }
-
 
9151
 
-
 
9152
      private final short _thriftId;
-
 
9153
      private final String _fieldName;
-
 
9154
 
-
 
9155
      _Fields(short thriftId, String fieldName) {
-
 
9156
        _thriftId = thriftId;
-
 
9157
        _fieldName = fieldName;
-
 
9158
      }
-
 
9159
 
-
 
9160
      public short getThriftFieldId() {
-
 
9161
        return _thriftId;
-
 
9162
      }
-
 
9163
 
-
 
9164
      public String getFieldName() {
-
 
9165
        return _fieldName;
-
 
9166
      }
-
 
9167
    }
-
 
9168
 
-
 
9169
    // isset id assignments
-
 
9170
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
-
 
9171
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
9172
 
-
 
9173
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
9174
      put(_Fields.MERCHANT_PAYMENT_ID, new FieldMetaData("merchantPaymentId", TFieldRequirementType.DEFAULT, 
-
 
9175
          new FieldValueMetaData(TType.I64)));
-
 
9176
    }});
-
 
9177
 
-
 
9178
    static {
-
 
9179
      FieldMetaData.addStructMetaDataMap(captureEbsPayment_args.class, metaDataMap);
-
 
9180
    }
-
 
9181
 
-
 
9182
    public captureEbsPayment_args() {
-
 
9183
    }
-
 
9184
 
-
 
9185
    public captureEbsPayment_args(
-
 
9186
      long merchantPaymentId)
-
 
9187
    {
-
 
9188
      this();
-
 
9189
      this.merchantPaymentId = merchantPaymentId;
-
 
9190
      setMerchantPaymentIdIsSet(true);
-
 
9191
    }
-
 
9192
 
-
 
9193
    /**
-
 
9194
     * Performs a deep copy on <i>other</i>.
-
 
9195
     */
-
 
9196
    public captureEbsPayment_args(captureEbsPayment_args other) {
-
 
9197
      __isset_bit_vector.clear();
-
 
9198
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
9199
      this.merchantPaymentId = other.merchantPaymentId;
-
 
9200
    }
-
 
9201
 
-
 
9202
    public captureEbsPayment_args deepCopy() {
-
 
9203
      return new captureEbsPayment_args(this);
-
 
9204
    }
-
 
9205
 
-
 
9206
    @Deprecated
-
 
9207
    public captureEbsPayment_args clone() {
-
 
9208
      return new captureEbsPayment_args(this);
-
 
9209
    }
-
 
9210
 
-
 
9211
    public long getMerchantPaymentId() {
-
 
9212
      return this.merchantPaymentId;
-
 
9213
    }
-
 
9214
 
-
 
9215
    public captureEbsPayment_args setMerchantPaymentId(long merchantPaymentId) {
-
 
9216
      this.merchantPaymentId = merchantPaymentId;
-
 
9217
      setMerchantPaymentIdIsSet(true);
-
 
9218
      return this;
-
 
9219
    }
-
 
9220
 
-
 
9221
    public void unsetMerchantPaymentId() {
-
 
9222
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
-
 
9223
    }
-
 
9224
 
-
 
9225
    /** Returns true if field merchantPaymentId is set (has been asigned a value) and false otherwise */
-
 
9226
    public boolean isSetMerchantPaymentId() {
-
 
9227
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
-
 
9228
    }
-
 
9229
 
-
 
9230
    public void setMerchantPaymentIdIsSet(boolean value) {
-
 
9231
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
-
 
9232
    }
-
 
9233
 
-
 
9234
    public void setFieldValue(_Fields field, Object value) {
-
 
9235
      switch (field) {
-
 
9236
      case MERCHANT_PAYMENT_ID:
-
 
9237
        if (value == null) {
-
 
9238
          unsetMerchantPaymentId();
-
 
9239
        } else {
-
 
9240
          setMerchantPaymentId((Long)value);
-
 
9241
        }
-
 
9242
        break;
-
 
9243
 
-
 
9244
      }
-
 
9245
    }
-
 
9246
 
-
 
9247
    public void setFieldValue(int fieldID, Object value) {
-
 
9248
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
9249
    }
-
 
9250
 
-
 
9251
    public Object getFieldValue(_Fields field) {
-
 
9252
      switch (field) {
-
 
9253
      case MERCHANT_PAYMENT_ID:
-
 
9254
        return new Long(getMerchantPaymentId());
-
 
9255
 
-
 
9256
      }
-
 
9257
      throw new IllegalStateException();
-
 
9258
    }
-
 
9259
 
-
 
9260
    public Object getFieldValue(int fieldId) {
-
 
9261
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
9262
    }
-
 
9263
 
-
 
9264
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
9265
    public boolean isSet(_Fields field) {
-
 
9266
      switch (field) {
-
 
9267
      case MERCHANT_PAYMENT_ID:
-
 
9268
        return isSetMerchantPaymentId();
-
 
9269
      }
-
 
9270
      throw new IllegalStateException();
-
 
9271
    }
-
 
9272
 
-
 
9273
    public boolean isSet(int fieldID) {
-
 
9274
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
9275
    }
-
 
9276
 
-
 
9277
    @Override
-
 
9278
    public boolean equals(Object that) {
-
 
9279
      if (that == null)
-
 
9280
        return false;
-
 
9281
      if (that instanceof captureEbsPayment_args)
-
 
9282
        return this.equals((captureEbsPayment_args)that);
-
 
9283
      return false;
-
 
9284
    }
-
 
9285
 
-
 
9286
    public boolean equals(captureEbsPayment_args that) {
-
 
9287
      if (that == null)
-
 
9288
        return false;
-
 
9289
 
-
 
9290
      boolean this_present_merchantPaymentId = true;
-
 
9291
      boolean that_present_merchantPaymentId = true;
-
 
9292
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
-
 
9293
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
-
 
9294
          return false;
-
 
9295
        if (this.merchantPaymentId != that.merchantPaymentId)
-
 
9296
          return false;
-
 
9297
      }
-
 
9298
 
-
 
9299
      return true;
-
 
9300
    }
-
 
9301
 
-
 
9302
    @Override
-
 
9303
    public int hashCode() {
-
 
9304
      return 0;
-
 
9305
    }
-
 
9306
 
-
 
9307
    public int compareTo(captureEbsPayment_args other) {
-
 
9308
      if (!getClass().equals(other.getClass())) {
-
 
9309
        return getClass().getName().compareTo(other.getClass().getName());
-
 
9310
      }
-
 
9311
 
-
 
9312
      int lastComparison = 0;
-
 
9313
      captureEbsPayment_args typedOther = (captureEbsPayment_args)other;
-
 
9314
 
-
 
9315
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(isSetMerchantPaymentId());
-
 
9316
      if (lastComparison != 0) {
-
 
9317
        return lastComparison;
-
 
9318
      }
-
 
9319
      lastComparison = TBaseHelper.compareTo(merchantPaymentId, typedOther.merchantPaymentId);
-
 
9320
      if (lastComparison != 0) {
-
 
9321
        return lastComparison;
-
 
9322
      }
-
 
9323
      return 0;
-
 
9324
    }
-
 
9325
 
-
 
9326
    public void read(TProtocol iprot) throws TException {
-
 
9327
      TField field;
-
 
9328
      iprot.readStructBegin();
-
 
9329
      while (true)
-
 
9330
      {
-
 
9331
        field = iprot.readFieldBegin();
-
 
9332
        if (field.type == TType.STOP) { 
-
 
9333
          break;
-
 
9334
        }
-
 
9335
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
9336
        if (fieldId == null) {
-
 
9337
          TProtocolUtil.skip(iprot, field.type);
-
 
9338
        } else {
-
 
9339
          switch (fieldId) {
-
 
9340
            case MERCHANT_PAYMENT_ID:
-
 
9341
              if (field.type == TType.I64) {
-
 
9342
                this.merchantPaymentId = iprot.readI64();
-
 
9343
                setMerchantPaymentIdIsSet(true);
-
 
9344
              } else { 
-
 
9345
                TProtocolUtil.skip(iprot, field.type);
-
 
9346
              }
-
 
9347
              break;
-
 
9348
          }
-
 
9349
          iprot.readFieldEnd();
-
 
9350
        }
-
 
9351
      }
-
 
9352
      iprot.readStructEnd();
-
 
9353
      validate();
-
 
9354
    }
-
 
9355
 
-
 
9356
    public void write(TProtocol oprot) throws TException {
-
 
9357
      validate();
-
 
9358
 
-
 
9359
      oprot.writeStructBegin(STRUCT_DESC);
-
 
9360
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
-
 
9361
      oprot.writeI64(this.merchantPaymentId);
-
 
9362
      oprot.writeFieldEnd();
-
 
9363
      oprot.writeFieldStop();
-
 
9364
      oprot.writeStructEnd();
-
 
9365
    }
-
 
9366
 
-
 
9367
    @Override
-
 
9368
    public String toString() {
-
 
9369
      StringBuilder sb = new StringBuilder("captureEbsPayment_args(");
-
 
9370
      boolean first = true;
-
 
9371
 
-
 
9372
      sb.append("merchantPaymentId:");
-
 
9373
      sb.append(this.merchantPaymentId);
-
 
9374
      first = false;
-
 
9375
      sb.append(")");
-
 
9376
      return sb.toString();
-
 
9377
    }
-
 
9378
 
-
 
9379
    public void validate() throws TException {
-
 
9380
      // check for required fields
-
 
9381
    }
-
 
9382
 
-
 
9383
  }
-
 
9384
 
-
 
9385
  public static class captureEbsPayment_result implements TBase<captureEbsPayment_result._Fields>, java.io.Serializable, Cloneable   {
-
 
9386
    private static final TStruct STRUCT_DESC = new TStruct("captureEbsPayment_result");
-
 
9387
 
-
 
9388
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
-
 
9389
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
-
 
9390
 
-
 
9391
    private Map<String,String> success;
-
 
9392
    private PaymentException pe;
-
 
9393
 
-
 
9394
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
9395
    public enum _Fields implements TFieldIdEnum {
-
 
9396
      SUCCESS((short)0, "success"),
-
 
9397
      PE((short)1, "pe");
-
 
9398
 
-
 
9399
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
9400
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
9401
 
-
 
9402
      static {
-
 
9403
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
9404
          byId.put((int)field._thriftId, field);
-
 
9405
          byName.put(field.getFieldName(), field);
-
 
9406
        }
-
 
9407
      }
-
 
9408
 
-
 
9409
      /**
-
 
9410
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
9411
       */
-
 
9412
      public static _Fields findByThriftId(int fieldId) {
-
 
9413
        return byId.get(fieldId);
-
 
9414
      }
-
 
9415
 
-
 
9416
      /**
-
 
9417
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
9418
       * if it is not found.
-
 
9419
       */
-
 
9420
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
9421
        _Fields fields = findByThriftId(fieldId);
-
 
9422
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
9423
        return fields;
-
 
9424
      }
-
 
9425
 
-
 
9426
      /**
-
 
9427
       * Find the _Fields constant that matches name, or null if its not found.
-
 
9428
       */
-
 
9429
      public static _Fields findByName(String name) {
-
 
9430
        return byName.get(name);
-
 
9431
      }
-
 
9432
 
-
 
9433
      private final short _thriftId;
-
 
9434
      private final String _fieldName;
-
 
9435
 
-
 
9436
      _Fields(short thriftId, String fieldName) {
-
 
9437
        _thriftId = thriftId;
-
 
9438
        _fieldName = fieldName;
-
 
9439
      }
-
 
9440
 
-
 
9441
      public short getThriftFieldId() {
-
 
9442
        return _thriftId;
-
 
9443
      }
-
 
9444
 
-
 
9445
      public String getFieldName() {
-
 
9446
        return _fieldName;
-
 
9447
      }
-
 
9448
    }
-
 
9449
 
-
 
9450
    // isset id assignments
-
 
9451
 
-
 
9452
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
9453
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
9454
          new MapMetaData(TType.MAP, 
-
 
9455
              new FieldValueMetaData(TType.STRING), 
-
 
9456
              new FieldValueMetaData(TType.STRING))));
-
 
9457
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
-
 
9458
          new FieldValueMetaData(TType.STRUCT)));
-
 
9459
    }});
-
 
9460
 
-
 
9461
    static {
-
 
9462
      FieldMetaData.addStructMetaDataMap(captureEbsPayment_result.class, metaDataMap);
-
 
9463
    }
-
 
9464
 
-
 
9465
    public captureEbsPayment_result() {
-
 
9466
    }
-
 
9467
 
-
 
9468
    public captureEbsPayment_result(
-
 
9469
      Map<String,String> success,
-
 
9470
      PaymentException pe)
-
 
9471
    {
-
 
9472
      this();
-
 
9473
      this.success = success;
-
 
9474
      this.pe = pe;
-
 
9475
    }
-
 
9476
 
-
 
9477
    /**
-
 
9478
     * Performs a deep copy on <i>other</i>.
-
 
9479
     */
-
 
9480
    public captureEbsPayment_result(captureEbsPayment_result other) {
-
 
9481
      if (other.isSetSuccess()) {
-
 
9482
        Map<String,String> __this__success = new HashMap<String,String>();
-
 
9483
        for (Map.Entry<String, String> other_element : other.success.entrySet()) {
-
 
9484
 
-
 
9485
          String other_element_key = other_element.getKey();
-
 
9486
          String other_element_value = other_element.getValue();
-
 
9487
 
-
 
9488
          String __this__success_copy_key = other_element_key;
-
 
9489
 
-
 
9490
          String __this__success_copy_value = other_element_value;
-
 
9491
 
-
 
9492
          __this__success.put(__this__success_copy_key, __this__success_copy_value);
-
 
9493
        }
-
 
9494
        this.success = __this__success;
-
 
9495
      }
-
 
9496
      if (other.isSetPe()) {
-
 
9497
        this.pe = new PaymentException(other.pe);
-
 
9498
      }
-
 
9499
    }
-
 
9500
 
-
 
9501
    public captureEbsPayment_result deepCopy() {
-
 
9502
      return new captureEbsPayment_result(this);
-
 
9503
    }
-
 
9504
 
-
 
9505
    @Deprecated
-
 
9506
    public captureEbsPayment_result clone() {
-
 
9507
      return new captureEbsPayment_result(this);
-
 
9508
    }
-
 
9509
 
-
 
9510
    public int getSuccessSize() {
-
 
9511
      return (this.success == null) ? 0 : this.success.size();
-
 
9512
    }
-
 
9513
 
-
 
9514
    public void putToSuccess(String key, String val) {
-
 
9515
      if (this.success == null) {
-
 
9516
        this.success = new HashMap<String,String>();
-
 
9517
      }
-
 
9518
      this.success.put(key, val);
-
 
9519
    }
-
 
9520
 
-
 
9521
    public Map<String,String> getSuccess() {
-
 
9522
      return this.success;
-
 
9523
    }
-
 
9524
 
-
 
9525
    public captureEbsPayment_result setSuccess(Map<String,String> success) {
-
 
9526
      this.success = success;
-
 
9527
      return this;
-
 
9528
    }
-
 
9529
 
-
 
9530
    public void unsetSuccess() {
-
 
9531
      this.success = null;
-
 
9532
    }
-
 
9533
 
-
 
9534
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
9535
    public boolean isSetSuccess() {
-
 
9536
      return this.success != null;
-
 
9537
    }
-
 
9538
 
-
 
9539
    public void setSuccessIsSet(boolean value) {
-
 
9540
      if (!value) {
-
 
9541
        this.success = null;
-
 
9542
      }
-
 
9543
    }
-
 
9544
 
-
 
9545
    public PaymentException getPe() {
-
 
9546
      return this.pe;
-
 
9547
    }
-
 
9548
 
-
 
9549
    public captureEbsPayment_result setPe(PaymentException pe) {
-
 
9550
      this.pe = pe;
-
 
9551
      return this;
-
 
9552
    }
-
 
9553
 
-
 
9554
    public void unsetPe() {
-
 
9555
      this.pe = null;
-
 
9556
    }
-
 
9557
 
-
 
9558
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
-
 
9559
    public boolean isSetPe() {
-
 
9560
      return this.pe != null;
-
 
9561
    }
-
 
9562
 
-
 
9563
    public void setPeIsSet(boolean value) {
-
 
9564
      if (!value) {
-
 
9565
        this.pe = null;
-
 
9566
      }
-
 
9567
    }
-
 
9568
 
-
 
9569
    public void setFieldValue(_Fields field, Object value) {
-
 
9570
      switch (field) {
-
 
9571
      case SUCCESS:
-
 
9572
        if (value == null) {
-
 
9573
          unsetSuccess();
-
 
9574
        } else {
-
 
9575
          setSuccess((Map<String,String>)value);
-
 
9576
        }
-
 
9577
        break;
-
 
9578
 
-
 
9579
      case PE:
-
 
9580
        if (value == null) {
-
 
9581
          unsetPe();
-
 
9582
        } else {
-
 
9583
          setPe((PaymentException)value);
-
 
9584
        }
-
 
9585
        break;
-
 
9586
 
-
 
9587
      }
-
 
9588
    }
-
 
9589
 
-
 
9590
    public void setFieldValue(int fieldID, Object value) {
-
 
9591
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
9592
    }
-
 
9593
 
-
 
9594
    public Object getFieldValue(_Fields field) {
-
 
9595
      switch (field) {
-
 
9596
      case SUCCESS:
-
 
9597
        return getSuccess();
-
 
9598
 
-
 
9599
      case PE:
-
 
9600
        return getPe();
-
 
9601
 
-
 
9602
      }
-
 
9603
      throw new IllegalStateException();
-
 
9604
    }
-
 
9605
 
-
 
9606
    public Object getFieldValue(int fieldId) {
-
 
9607
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
9608
    }
-
 
9609
 
-
 
9610
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
9611
    public boolean isSet(_Fields field) {
-
 
9612
      switch (field) {
-
 
9613
      case SUCCESS:
-
 
9614
        return isSetSuccess();
-
 
9615
      case PE:
-
 
9616
        return isSetPe();
-
 
9617
      }
-
 
9618
      throw new IllegalStateException();
-
 
9619
    }
-
 
9620
 
-
 
9621
    public boolean isSet(int fieldID) {
-
 
9622
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
9623
    }
-
 
9624
 
-
 
9625
    @Override
-
 
9626
    public boolean equals(Object that) {
-
 
9627
      if (that == null)
-
 
9628
        return false;
-
 
9629
      if (that instanceof captureEbsPayment_result)
-
 
9630
        return this.equals((captureEbsPayment_result)that);
-
 
9631
      return false;
-
 
9632
    }
-
 
9633
 
-
 
9634
    public boolean equals(captureEbsPayment_result that) {
-
 
9635
      if (that == null)
-
 
9636
        return false;
-
 
9637
 
-
 
9638
      boolean this_present_success = true && this.isSetSuccess();
-
 
9639
      boolean that_present_success = true && that.isSetSuccess();
-
 
9640
      if (this_present_success || that_present_success) {
-
 
9641
        if (!(this_present_success && that_present_success))
-
 
9642
          return false;
-
 
9643
        if (!this.success.equals(that.success))
-
 
9644
          return false;
-
 
9645
      }
-
 
9646
 
-
 
9647
      boolean this_present_pe = true && this.isSetPe();
-
 
9648
      boolean that_present_pe = true && that.isSetPe();
-
 
9649
      if (this_present_pe || that_present_pe) {
-
 
9650
        if (!(this_present_pe && that_present_pe))
-
 
9651
          return false;
-
 
9652
        if (!this.pe.equals(that.pe))
-
 
9653
          return false;
-
 
9654
      }
-
 
9655
 
-
 
9656
      return true;
-
 
9657
    }
-
 
9658
 
-
 
9659
    @Override
-
 
9660
    public int hashCode() {
-
 
9661
      return 0;
-
 
9662
    }
-
 
9663
 
-
 
9664
    public void read(TProtocol iprot) throws TException {
-
 
9665
      TField field;
-
 
9666
      iprot.readStructBegin();
-
 
9667
      while (true)
-
 
9668
      {
-
 
9669
        field = iprot.readFieldBegin();
-
 
9670
        if (field.type == TType.STOP) { 
-
 
9671
          break;
-
 
9672
        }
-
 
9673
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
9674
        if (fieldId == null) {
-
 
9675
          TProtocolUtil.skip(iprot, field.type);
-
 
9676
        } else {
-
 
9677
          switch (fieldId) {
-
 
9678
            case SUCCESS:
-
 
9679
              if (field.type == TType.MAP) {
-
 
9680
                {
-
 
9681
                  TMap _map33 = iprot.readMapBegin();
-
 
9682
                  this.success = new HashMap<String,String>(2*_map33.size);
-
 
9683
                  for (int _i34 = 0; _i34 < _map33.size; ++_i34)
-
 
9684
                  {
-
 
9685
                    String _key35;
-
 
9686
                    String _val36;
-
 
9687
                    _key35 = iprot.readString();
-
 
9688
                    _val36 = iprot.readString();
-
 
9689
                    this.success.put(_key35, _val36);
-
 
9690
                  }
-
 
9691
                  iprot.readMapEnd();
-
 
9692
                }
-
 
9693
              } else { 
-
 
9694
                TProtocolUtil.skip(iprot, field.type);
-
 
9695
              }
-
 
9696
              break;
-
 
9697
            case PE:
-
 
9698
              if (field.type == TType.STRUCT) {
-
 
9699
                this.pe = new PaymentException();
-
 
9700
                this.pe.read(iprot);
-
 
9701
              } else { 
-
 
9702
                TProtocolUtil.skip(iprot, field.type);
-
 
9703
              }
-
 
9704
              break;
-
 
9705
          }
-
 
9706
          iprot.readFieldEnd();
-
 
9707
        }
-
 
9708
      }
-
 
9709
      iprot.readStructEnd();
-
 
9710
      validate();
-
 
9711
    }
-
 
9712
 
-
 
9713
    public void write(TProtocol oprot) throws TException {
-
 
9714
      oprot.writeStructBegin(STRUCT_DESC);
-
 
9715
 
-
 
9716
      if (this.isSetSuccess()) {
-
 
9717
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
9718
        {
-
 
9719
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size()));
-
 
9720
          for (Map.Entry<String, String> _iter37 : this.success.entrySet())
-
 
9721
          {
-
 
9722
            oprot.writeString(_iter37.getKey());
-
 
9723
            oprot.writeString(_iter37.getValue());
-
 
9724
          }
-
 
9725
          oprot.writeMapEnd();
-
 
9726
        }
-
 
9727
        oprot.writeFieldEnd();
-
 
9728
      } else if (this.isSetPe()) {
-
 
9729
        oprot.writeFieldBegin(PE_FIELD_DESC);
-
 
9730
        this.pe.write(oprot);
-
 
9731
        oprot.writeFieldEnd();
-
 
9732
      }
-
 
9733
      oprot.writeFieldStop();
-
 
9734
      oprot.writeStructEnd();
-
 
9735
    }
-
 
9736
 
-
 
9737
    @Override
-
 
9738
    public String toString() {
-
 
9739
      StringBuilder sb = new StringBuilder("captureEbsPayment_result(");
-
 
9740
      boolean first = true;
-
 
9741
 
-
 
9742
      sb.append("success:");
-
 
9743
      if (this.success == null) {
-
 
9744
        sb.append("null");
-
 
9745
      } else {
-
 
9746
        sb.append(this.success);
-
 
9747
      }
-
 
9748
      first = false;
-
 
9749
      if (!first) sb.append(", ");
-
 
9750
      sb.append("pe:");
-
 
9751
      if (this.pe == null) {
-
 
9752
        sb.append("null");
-
 
9753
      } else {
-
 
9754
        sb.append(this.pe);
-
 
9755
      }
-
 
9756
      first = false;
-
 
9757
      sb.append(")");
-
 
9758
      return sb.toString();
-
 
9759
    }
-
 
9760
 
-
 
9761
    public void validate() throws TException {
-
 
9762
      // check for required fields
-
 
9763
    }
-
 
9764
 
-
 
9765
  }
-
 
9766
 
9035
  public static class captureHdfcPayment_args implements TBase<captureHdfcPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<captureHdfcPayment_args>   {
9767
  public static class captureHdfcPayment_args implements TBase<captureHdfcPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<captureHdfcPayment_args>   {
9036
    private static final TStruct STRUCT_DESC = new TStruct("captureHdfcPayment_args");
9768
    private static final TStruct STRUCT_DESC = new TStruct("captureHdfcPayment_args");
9037
 
9769
 
9038
    private static final TField MERCHANT_PAYMENT_ID_FIELD_DESC = new TField("merchantPaymentId", TType.I64, (short)1);
9770
    private static final TField MERCHANT_PAYMENT_ID_FIELD_DESC = new TField("merchantPaymentId", TType.I64, (short)1);
9039
 
9771
 
Line 9604... Line 10336...
9604
        } else {
10336
        } else {
9605
          switch (fieldId) {
10337
          switch (fieldId) {
9606
            case SUCCESS:
10338
            case SUCCESS:
9607
              if (field.type == TType.MAP) {
10339
              if (field.type == TType.MAP) {
9608
                {
10340
                {
9609
                  TMap _map33 = iprot.readMapBegin();
10341
                  TMap _map38 = iprot.readMapBegin();
9610
                  this.success = new HashMap<String,String>(2*_map33.size);
10342
                  this.success = new HashMap<String,String>(2*_map38.size);
9611
                  for (int _i34 = 0; _i34 < _map33.size; ++_i34)
10343
                  for (int _i39 = 0; _i39 < _map38.size; ++_i39)
9612
                  {
10344
                  {
9613
                    String _key35;
10345
                    String _key40;
9614
                    String _val36;
10346
                    String _val41;
9615
                    _key35 = iprot.readString();
10347
                    _key40 = iprot.readString();
9616
                    _val36 = iprot.readString();
10348
                    _val41 = iprot.readString();
9617
                    this.success.put(_key35, _val36);
10349
                    this.success.put(_key40, _val41);
9618
                  }
10350
                  }
9619
                  iprot.readMapEnd();
10351
                  iprot.readMapEnd();
9620
                }
10352
                }
9621
              } else { 
10353
              } else { 
9622
                TProtocolUtil.skip(iprot, field.type);
10354
                TProtocolUtil.skip(iprot, field.type);
Line 9643... Line 10375...
9643
 
10375
 
9644
      if (this.isSetSuccess()) {
10376
      if (this.isSetSuccess()) {
9645
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10377
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9646
        {
10378
        {
9647
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size()));
10379
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size()));
9648
          for (Map.Entry<String, String> _iter37 : this.success.entrySet())
10380
          for (Map.Entry<String, String> _iter42 : this.success.entrySet())
9649
          {
10381
          {
9650
            oprot.writeString(_iter37.getKey());
10382
            oprot.writeString(_iter42.getKey());
9651
            oprot.writeString(_iter37.getValue());
10383
            oprot.writeString(_iter42.getValue());
9652
          }
10384
          }
9653
          oprot.writeMapEnd();
10385
          oprot.writeMapEnd();
9654
        }
10386
        }
9655
        oprot.writeFieldEnd();
10387
        oprot.writeFieldEnd();
9656
      } else if (this.isSetPe()) {
10388
      } else if (this.isSetPe()) {