Subversion Repositories SmartDukaan

Rev

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

Rev 3616 Rev 3956
Line 140... Line 140...
140
     * 
140
     * 
141
     * @param merchantTxnId
141
     * @param merchantTxnId
142
     */
142
     */
143
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException;
143
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException;
144
 
144
 
-
 
145
    /**
-
 
146
     * Adds the given amount to the captured amount of a COD payment.
-
 
147
     * Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
-
 
148
     * If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
-
 
149
     * Also sets the name of the entity which transferred the money, the date on which it was transferred
-
 
150
     * and the corresponding transaction id.
-
 
151
     * 
-
 
152
     * Returns false if the payment couldn't be captured.
-
 
153
     * Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.
-
 
154
     * 
-
 
155
     * @param merchantTxnId
-
 
156
     * @param amount
-
 
157
     * @param xferBy
-
 
158
     * @param xferTxnId
-
 
159
     * @param xferDate
-
 
160
     */
-
 
161
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException;
-
 
162
 
145
  }
163
  }
146
 
164
 
147
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
165
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
148
 
166
 
149
    public void createPayment(long userId, double amount, long gatewayId, long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPayment_call> resultHandler) throws org.apache.thrift.TException;
167
    public void createPayment(long userId, double amount, long gatewayId, long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPayment_call> resultHandler) throws org.apache.thrift.TException;
Line 168... Line 186...
168
 
186
 
169
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
187
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
170
 
188
 
171
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
189
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
172
 
190
 
-
 
191
    public void partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.partiallyCapturePayment_call> resultHandler) throws org.apache.thrift.TException;
-
 
192
 
173
  }
193
  }
174
 
194
 
175
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
195
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
176
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
196
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
177
      public Factory() {}
197
      public Factory() {}
Line 521... Line 541...
521
        throw result.pe;
541
        throw result.pe;
522
      }
542
      }
523
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
543
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
524
    }
544
    }
525
 
545
 
-
 
546
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException
-
 
547
    {
-
 
548
      send_partiallyCapturePayment(merchantTxnId, amount, xferBy, xferTxnId, xferDate);
-
 
549
      return recv_partiallyCapturePayment();
-
 
550
    }
-
 
551
 
-
 
552
    public void send_partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws org.apache.thrift.TException
-
 
553
    {
-
 
554
      partiallyCapturePayment_args args = new partiallyCapturePayment_args();
-
 
555
      args.setMerchantTxnId(merchantTxnId);
-
 
556
      args.setAmount(amount);
-
 
557
      args.setXferBy(xferBy);
-
 
558
      args.setXferTxnId(xferTxnId);
-
 
559
      args.setXferDate(xferDate);
-
 
560
      sendBase("partiallyCapturePayment", args);
-
 
561
    }
-
 
562
 
-
 
563
    public boolean recv_partiallyCapturePayment() throws PaymentException, org.apache.thrift.TException
-
 
564
    {
-
 
565
      partiallyCapturePayment_result result = new partiallyCapturePayment_result();
-
 
566
      receiveBase(result, "partiallyCapturePayment");
-
 
567
      if (result.isSetSuccess()) {
-
 
568
        return result.success;
-
 
569
      }
-
 
570
      if (result.pe != null) {
-
 
571
        throw result.pe;
-
 
572
      }
-
 
573
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partiallyCapturePayment failed: unknown result");
-
 
574
    }
-
 
575
 
526
  }
576
  }
527
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
577
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
528
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
578
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
529
      private org.apache.thrift.async.TAsyncClientManager clientManager;
579
      private org.apache.thrift.async.TAsyncClientManager clientManager;
530
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
580
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 989... Line 1039...
989
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1039
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
990
        return (new Client(prot)).recv_capturePayment();
1040
        return (new Client(prot)).recv_capturePayment();
991
      }
1041
      }
992
    }
1042
    }
993
 
1043
 
-
 
1044
    public void partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate, org.apache.thrift.async.AsyncMethodCallback<partiallyCapturePayment_call> resultHandler) throws org.apache.thrift.TException {
-
 
1045
      checkReady();
-
 
1046
      partiallyCapturePayment_call method_call = new partiallyCapturePayment_call(merchantTxnId, amount, xferBy, xferTxnId, xferDate, resultHandler, this, ___protocolFactory, ___transport);
-
 
1047
      this.___currentMethod = method_call;
-
 
1048
      ___manager.call(method_call);
-
 
1049
    }
-
 
1050
 
-
 
1051
    public static class partiallyCapturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1052
      private long merchantTxnId;
-
 
1053
      private double amount;
-
 
1054
      private String xferBy;
-
 
1055
      private String xferTxnId;
-
 
1056
      private long xferDate;
-
 
1057
      public partiallyCapturePayment_call(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate, org.apache.thrift.async.AsyncMethodCallback<partiallyCapturePayment_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 {
-
 
1058
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1059
        this.merchantTxnId = merchantTxnId;
-
 
1060
        this.amount = amount;
-
 
1061
        this.xferBy = xferBy;
-
 
1062
        this.xferTxnId = xferTxnId;
-
 
1063
        this.xferDate = xferDate;
-
 
1064
      }
-
 
1065
 
-
 
1066
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1067
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partiallyCapturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1068
        partiallyCapturePayment_args args = new partiallyCapturePayment_args();
-
 
1069
        args.setMerchantTxnId(merchantTxnId);
-
 
1070
        args.setAmount(amount);
-
 
1071
        args.setXferBy(xferBy);
-
 
1072
        args.setXferTxnId(xferTxnId);
-
 
1073
        args.setXferDate(xferDate);
-
 
1074
        args.write(prot);
-
 
1075
        prot.writeMessageEnd();
-
 
1076
      }
-
 
1077
 
-
 
1078
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
-
 
1079
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1080
          throw new IllegalStateException("Method call not finished!");
-
 
1081
        }
-
 
1082
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1083
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1084
        return (new Client(prot)).recv_partiallyCapturePayment();
-
 
1085
      }
-
 
1086
    }
-
 
1087
 
994
  }
1088
  }
995
 
1089
 
996
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1090
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
997
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1091
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
998
    public Processor(I iface) {
1092
    public Processor(I iface) {
Line 1014... Line 1108...
1014
      processMap.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
1108
      processMap.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
1015
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
1109
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
1016
      processMap.put("initializeHdfcEmiPayment", new initializeHdfcEmiPayment());
1110
      processMap.put("initializeHdfcEmiPayment", new initializeHdfcEmiPayment());
1017
      processMap.put("createRefund", new createRefund());
1111
      processMap.put("createRefund", new createRefund());
1018
      processMap.put("capturePayment", new capturePayment());
1112
      processMap.put("capturePayment", new capturePayment());
-
 
1113
      processMap.put("partiallyCapturePayment", new partiallyCapturePayment());
1019
      return processMap;
1114
      return processMap;
1020
    }
1115
    }
1021
 
1116
 
1022
    private static class createPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPayment_args> {
1117
    private static class createPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPayment_args> {
1023
      public createPayment() {
1118
      public createPayment() {
Line 1257... Line 1352...
1257
        }
1352
        }
1258
        return result;
1353
        return result;
1259
      }
1354
      }
1260
    }
1355
    }
1261
 
1356
 
-
 
1357
    private static class partiallyCapturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partiallyCapturePayment_args> {
-
 
1358
      public partiallyCapturePayment() {
-
 
1359
        super("partiallyCapturePayment");
-
 
1360
      }
-
 
1361
 
-
 
1362
      protected partiallyCapturePayment_args getEmptyArgsInstance() {
-
 
1363
        return new partiallyCapturePayment_args();
-
 
1364
      }
-
 
1365
 
-
 
1366
      protected partiallyCapturePayment_result getResult(I iface, partiallyCapturePayment_args args) throws org.apache.thrift.TException {
-
 
1367
        partiallyCapturePayment_result result = new partiallyCapturePayment_result();
-
 
1368
        try {
-
 
1369
          result.success = iface.partiallyCapturePayment(args.merchantTxnId, args.amount, args.xferBy, args.xferTxnId, args.xferDate);
-
 
1370
          result.setSuccessIsSet(true);
-
 
1371
        } catch (PaymentException pe) {
-
 
1372
          result.pe = pe;
-
 
1373
        }
-
 
1374
        return result;
-
 
1375
      }
-
 
1376
    }
-
 
1377
 
1262
  }
1378
  }
1263
 
1379
 
1264
  public static class createPayment_args implements org.apache.thrift.TBase<createPayment_args, createPayment_args._Fields>, java.io.Serializable, Cloneable   {
1380
  public static class createPayment_args implements org.apache.thrift.TBase<createPayment_args, createPayment_args._Fields>, java.io.Serializable, Cloneable   {
1265
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_args");
1381
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_args");
1266
 
1382
 
Line 11330... Line 11446...
11330
      boolean first = true;
11446
      boolean first = true;
11331
 
11447
 
11332
      sb.append("success:");
11448
      sb.append("success:");
11333
      sb.append(this.success);
11449
      sb.append(this.success);
11334
      first = false;
11450
      first = false;
-
 
11451
      if (!first) sb.append(", ");
-
 
11452
      sb.append("pe:");
-
 
11453
      if (this.pe == null) {
-
 
11454
        sb.append("null");
-
 
11455
      } else {
-
 
11456
        sb.append(this.pe);
-
 
11457
      }
-
 
11458
      first = false;
-
 
11459
      sb.append(")");
-
 
11460
      return sb.toString();
-
 
11461
    }
-
 
11462
 
-
 
11463
    public void validate() throws org.apache.thrift.TException {
-
 
11464
      // check for required fields
-
 
11465
    }
-
 
11466
 
-
 
11467
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
11468
      try {
-
 
11469
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
11470
      } catch (org.apache.thrift.TException te) {
-
 
11471
        throw new java.io.IOException(te);
-
 
11472
      }
-
 
11473
    }
-
 
11474
 
-
 
11475
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
11476
      try {
-
 
11477
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
11478
      } catch (org.apache.thrift.TException te) {
-
 
11479
        throw new java.io.IOException(te);
-
 
11480
      }
-
 
11481
    }
-
 
11482
 
-
 
11483
  }
-
 
11484
 
-
 
11485
  public static class partiallyCapturePayment_args implements org.apache.thrift.TBase<partiallyCapturePayment_args, partiallyCapturePayment_args._Fields>, java.io.Serializable, Cloneable   {
-
 
11486
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_args");
-
 
11487
 
-
 
11488
    private static final org.apache.thrift.protocol.TField MERCHANT_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("merchantTxnId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
11489
    private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
-
 
11490
    private static final org.apache.thrift.protocol.TField XFER_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("xferBy", org.apache.thrift.protocol.TType.STRING, (short)3);
-
 
11491
    private static final org.apache.thrift.protocol.TField XFER_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("xferTxnId", org.apache.thrift.protocol.TType.STRING, (short)4);
-
 
11492
    private static final org.apache.thrift.protocol.TField XFER_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("xferDate", org.apache.thrift.protocol.TType.I64, (short)5);
-
 
11493
 
-
 
11494
    private long merchantTxnId; // required
-
 
11495
    private double amount; // required
-
 
11496
    private String xferBy; // required
-
 
11497
    private String xferTxnId; // required
-
 
11498
    private long xferDate; // required
-
 
11499
 
-
 
11500
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11501
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
11502
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
-
 
11503
      AMOUNT((short)2, "amount"),
-
 
11504
      XFER_BY((short)3, "xferBy"),
-
 
11505
      XFER_TXN_ID((short)4, "xferTxnId"),
-
 
11506
      XFER_DATE((short)5, "xferDate");
-
 
11507
 
-
 
11508
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11509
 
-
 
11510
      static {
-
 
11511
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11512
          byName.put(field.getFieldName(), field);
-
 
11513
        }
-
 
11514
      }
-
 
11515
 
-
 
11516
      /**
-
 
11517
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11518
       */
-
 
11519
      public static _Fields findByThriftId(int fieldId) {
-
 
11520
        switch(fieldId) {
-
 
11521
          case 1: // MERCHANT_TXN_ID
-
 
11522
            return MERCHANT_TXN_ID;
-
 
11523
          case 2: // AMOUNT
-
 
11524
            return AMOUNT;
-
 
11525
          case 3: // XFER_BY
-
 
11526
            return XFER_BY;
-
 
11527
          case 4: // XFER_TXN_ID
-
 
11528
            return XFER_TXN_ID;
-
 
11529
          case 5: // XFER_DATE
-
 
11530
            return XFER_DATE;
-
 
11531
          default:
-
 
11532
            return null;
-
 
11533
        }
-
 
11534
      }
-
 
11535
 
-
 
11536
      /**
-
 
11537
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11538
       * if it is not found.
-
 
11539
       */
-
 
11540
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11541
        _Fields fields = findByThriftId(fieldId);
-
 
11542
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11543
        return fields;
-
 
11544
      }
-
 
11545
 
-
 
11546
      /**
-
 
11547
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11548
       */
-
 
11549
      public static _Fields findByName(String name) {
-
 
11550
        return byName.get(name);
-
 
11551
      }
-
 
11552
 
-
 
11553
      private final short _thriftId;
-
 
11554
      private final String _fieldName;
-
 
11555
 
-
 
11556
      _Fields(short thriftId, String fieldName) {
-
 
11557
        _thriftId = thriftId;
-
 
11558
        _fieldName = fieldName;
-
 
11559
      }
-
 
11560
 
-
 
11561
      public short getThriftFieldId() {
-
 
11562
        return _thriftId;
-
 
11563
      }
-
 
11564
 
-
 
11565
      public String getFieldName() {
-
 
11566
        return _fieldName;
-
 
11567
      }
-
 
11568
    }
-
 
11569
 
-
 
11570
    // isset id assignments
-
 
11571
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
-
 
11572
    private static final int __AMOUNT_ISSET_ID = 1;
-
 
11573
    private static final int __XFERDATE_ISSET_ID = 2;
-
 
11574
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
11575
 
-
 
11576
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
11577
    static {
-
 
11578
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
11579
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11580
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
11581
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11582
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
11583
      tmpMap.put(_Fields.XFER_BY, new org.apache.thrift.meta_data.FieldMetaData("xferBy", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11584
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
11585
      tmpMap.put(_Fields.XFER_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("xferTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11586
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
11587
      tmpMap.put(_Fields.XFER_DATE, new org.apache.thrift.meta_data.FieldMetaData("xferDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11588
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
11589
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
11590
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_args.class, metaDataMap);
-
 
11591
    }
-
 
11592
 
-
 
11593
    public partiallyCapturePayment_args() {
-
 
11594
    }
-
 
11595
 
-
 
11596
    public partiallyCapturePayment_args(
-
 
11597
      long merchantTxnId,
-
 
11598
      double amount,
-
 
11599
      String xferBy,
-
 
11600
      String xferTxnId,
-
 
11601
      long xferDate)
-
 
11602
    {
-
 
11603
      this();
-
 
11604
      this.merchantTxnId = merchantTxnId;
-
 
11605
      setMerchantTxnIdIsSet(true);
-
 
11606
      this.amount = amount;
-
 
11607
      setAmountIsSet(true);
-
 
11608
      this.xferBy = xferBy;
-
 
11609
      this.xferTxnId = xferTxnId;
-
 
11610
      this.xferDate = xferDate;
-
 
11611
      setXferDateIsSet(true);
-
 
11612
    }
-
 
11613
 
-
 
11614
    /**
-
 
11615
     * Performs a deep copy on <i>other</i>.
-
 
11616
     */
-
 
11617
    public partiallyCapturePayment_args(partiallyCapturePayment_args other) {
-
 
11618
      __isset_bit_vector.clear();
-
 
11619
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
11620
      this.merchantTxnId = other.merchantTxnId;
-
 
11621
      this.amount = other.amount;
-
 
11622
      if (other.isSetXferBy()) {
-
 
11623
        this.xferBy = other.xferBy;
-
 
11624
      }
-
 
11625
      if (other.isSetXferTxnId()) {
-
 
11626
        this.xferTxnId = other.xferTxnId;
-
 
11627
      }
-
 
11628
      this.xferDate = other.xferDate;
-
 
11629
    }
-
 
11630
 
-
 
11631
    public partiallyCapturePayment_args deepCopy() {
-
 
11632
      return new partiallyCapturePayment_args(this);
-
 
11633
    }
-
 
11634
 
-
 
11635
    @Override
-
 
11636
    public void clear() {
-
 
11637
      setMerchantTxnIdIsSet(false);
-
 
11638
      this.merchantTxnId = 0;
-
 
11639
      setAmountIsSet(false);
-
 
11640
      this.amount = 0.0;
-
 
11641
      this.xferBy = null;
-
 
11642
      this.xferTxnId = null;
-
 
11643
      setXferDateIsSet(false);
-
 
11644
      this.xferDate = 0;
-
 
11645
    }
-
 
11646
 
-
 
11647
    public long getMerchantTxnId() {
-
 
11648
      return this.merchantTxnId;
-
 
11649
    }
-
 
11650
 
-
 
11651
    public void setMerchantTxnId(long merchantTxnId) {
-
 
11652
      this.merchantTxnId = merchantTxnId;
-
 
11653
      setMerchantTxnIdIsSet(true);
-
 
11654
    }
-
 
11655
 
-
 
11656
    public void unsetMerchantTxnId() {
-
 
11657
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
-
 
11658
    }
-
 
11659
 
-
 
11660
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
-
 
11661
    public boolean isSetMerchantTxnId() {
-
 
11662
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
-
 
11663
    }
-
 
11664
 
-
 
11665
    public void setMerchantTxnIdIsSet(boolean value) {
-
 
11666
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
-
 
11667
    }
-
 
11668
 
-
 
11669
    public double getAmount() {
-
 
11670
      return this.amount;
-
 
11671
    }
-
 
11672
 
-
 
11673
    public void setAmount(double amount) {
-
 
11674
      this.amount = amount;
-
 
11675
      setAmountIsSet(true);
-
 
11676
    }
-
 
11677
 
-
 
11678
    public void unsetAmount() {
-
 
11679
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
-
 
11680
    }
-
 
11681
 
-
 
11682
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
-
 
11683
    public boolean isSetAmount() {
-
 
11684
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
-
 
11685
    }
-
 
11686
 
-
 
11687
    public void setAmountIsSet(boolean value) {
-
 
11688
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
-
 
11689
    }
-
 
11690
 
-
 
11691
    public String getXferBy() {
-
 
11692
      return this.xferBy;
-
 
11693
    }
-
 
11694
 
-
 
11695
    public void setXferBy(String xferBy) {
-
 
11696
      this.xferBy = xferBy;
-
 
11697
    }
-
 
11698
 
-
 
11699
    public void unsetXferBy() {
-
 
11700
      this.xferBy = null;
-
 
11701
    }
-
 
11702
 
-
 
11703
    /** Returns true if field xferBy is set (has been assigned a value) and false otherwise */
-
 
11704
    public boolean isSetXferBy() {
-
 
11705
      return this.xferBy != null;
-
 
11706
    }
-
 
11707
 
-
 
11708
    public void setXferByIsSet(boolean value) {
-
 
11709
      if (!value) {
-
 
11710
        this.xferBy = null;
-
 
11711
      }
-
 
11712
    }
-
 
11713
 
-
 
11714
    public String getXferTxnId() {
-
 
11715
      return this.xferTxnId;
-
 
11716
    }
-
 
11717
 
-
 
11718
    public void setXferTxnId(String xferTxnId) {
-
 
11719
      this.xferTxnId = xferTxnId;
-
 
11720
    }
-
 
11721
 
-
 
11722
    public void unsetXferTxnId() {
-
 
11723
      this.xferTxnId = null;
-
 
11724
    }
-
 
11725
 
-
 
11726
    /** Returns true if field xferTxnId is set (has been assigned a value) and false otherwise */
-
 
11727
    public boolean isSetXferTxnId() {
-
 
11728
      return this.xferTxnId != null;
-
 
11729
    }
-
 
11730
 
-
 
11731
    public void setXferTxnIdIsSet(boolean value) {
-
 
11732
      if (!value) {
-
 
11733
        this.xferTxnId = null;
-
 
11734
      }
-
 
11735
    }
-
 
11736
 
-
 
11737
    public long getXferDate() {
-
 
11738
      return this.xferDate;
-
 
11739
    }
-
 
11740
 
-
 
11741
    public void setXferDate(long xferDate) {
-
 
11742
      this.xferDate = xferDate;
-
 
11743
      setXferDateIsSet(true);
-
 
11744
    }
-
 
11745
 
-
 
11746
    public void unsetXferDate() {
-
 
11747
      __isset_bit_vector.clear(__XFERDATE_ISSET_ID);
-
 
11748
    }
-
 
11749
 
-
 
11750
    /** Returns true if field xferDate is set (has been assigned a value) and false otherwise */
-
 
11751
    public boolean isSetXferDate() {
-
 
11752
      return __isset_bit_vector.get(__XFERDATE_ISSET_ID);
-
 
11753
    }
-
 
11754
 
-
 
11755
    public void setXferDateIsSet(boolean value) {
-
 
11756
      __isset_bit_vector.set(__XFERDATE_ISSET_ID, value);
-
 
11757
    }
-
 
11758
 
-
 
11759
    public void setFieldValue(_Fields field, Object value) {
-
 
11760
      switch (field) {
-
 
11761
      case MERCHANT_TXN_ID:
-
 
11762
        if (value == null) {
-
 
11763
          unsetMerchantTxnId();
-
 
11764
        } else {
-
 
11765
          setMerchantTxnId((Long)value);
-
 
11766
        }
-
 
11767
        break;
-
 
11768
 
-
 
11769
      case AMOUNT:
-
 
11770
        if (value == null) {
-
 
11771
          unsetAmount();
-
 
11772
        } else {
-
 
11773
          setAmount((Double)value);
-
 
11774
        }
-
 
11775
        break;
-
 
11776
 
-
 
11777
      case XFER_BY:
-
 
11778
        if (value == null) {
-
 
11779
          unsetXferBy();
-
 
11780
        } else {
-
 
11781
          setXferBy((String)value);
-
 
11782
        }
-
 
11783
        break;
-
 
11784
 
-
 
11785
      case XFER_TXN_ID:
-
 
11786
        if (value == null) {
-
 
11787
          unsetXferTxnId();
-
 
11788
        } else {
-
 
11789
          setXferTxnId((String)value);
-
 
11790
        }
-
 
11791
        break;
-
 
11792
 
-
 
11793
      case XFER_DATE:
-
 
11794
        if (value == null) {
-
 
11795
          unsetXferDate();
-
 
11796
        } else {
-
 
11797
          setXferDate((Long)value);
-
 
11798
        }
-
 
11799
        break;
-
 
11800
 
-
 
11801
      }
-
 
11802
    }
-
 
11803
 
-
 
11804
    public Object getFieldValue(_Fields field) {
-
 
11805
      switch (field) {
-
 
11806
      case MERCHANT_TXN_ID:
-
 
11807
        return Long.valueOf(getMerchantTxnId());
-
 
11808
 
-
 
11809
      case AMOUNT:
-
 
11810
        return Double.valueOf(getAmount());
-
 
11811
 
-
 
11812
      case XFER_BY:
-
 
11813
        return getXferBy();
-
 
11814
 
-
 
11815
      case XFER_TXN_ID:
-
 
11816
        return getXferTxnId();
-
 
11817
 
-
 
11818
      case XFER_DATE:
-
 
11819
        return Long.valueOf(getXferDate());
-
 
11820
 
-
 
11821
      }
-
 
11822
      throw new IllegalStateException();
-
 
11823
    }
-
 
11824
 
-
 
11825
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
11826
    public boolean isSet(_Fields field) {
-
 
11827
      if (field == null) {
-
 
11828
        throw new IllegalArgumentException();
-
 
11829
      }
-
 
11830
 
-
 
11831
      switch (field) {
-
 
11832
      case MERCHANT_TXN_ID:
-
 
11833
        return isSetMerchantTxnId();
-
 
11834
      case AMOUNT:
-
 
11835
        return isSetAmount();
-
 
11836
      case XFER_BY:
-
 
11837
        return isSetXferBy();
-
 
11838
      case XFER_TXN_ID:
-
 
11839
        return isSetXferTxnId();
-
 
11840
      case XFER_DATE:
-
 
11841
        return isSetXferDate();
-
 
11842
      }
-
 
11843
      throw new IllegalStateException();
-
 
11844
    }
-
 
11845
 
-
 
11846
    @Override
-
 
11847
    public boolean equals(Object that) {
-
 
11848
      if (that == null)
-
 
11849
        return false;
-
 
11850
      if (that instanceof partiallyCapturePayment_args)
-
 
11851
        return this.equals((partiallyCapturePayment_args)that);
-
 
11852
      return false;
-
 
11853
    }
-
 
11854
 
-
 
11855
    public boolean equals(partiallyCapturePayment_args that) {
-
 
11856
      if (that == null)
-
 
11857
        return false;
-
 
11858
 
-
 
11859
      boolean this_present_merchantTxnId = true;
-
 
11860
      boolean that_present_merchantTxnId = true;
-
 
11861
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
-
 
11862
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
-
 
11863
          return false;
-
 
11864
        if (this.merchantTxnId != that.merchantTxnId)
-
 
11865
          return false;
-
 
11866
      }
-
 
11867
 
-
 
11868
      boolean this_present_amount = true;
-
 
11869
      boolean that_present_amount = true;
-
 
11870
      if (this_present_amount || that_present_amount) {
-
 
11871
        if (!(this_present_amount && that_present_amount))
-
 
11872
          return false;
-
 
11873
        if (this.amount != that.amount)
-
 
11874
          return false;
-
 
11875
      }
-
 
11876
 
-
 
11877
      boolean this_present_xferBy = true && this.isSetXferBy();
-
 
11878
      boolean that_present_xferBy = true && that.isSetXferBy();
-
 
11879
      if (this_present_xferBy || that_present_xferBy) {
-
 
11880
        if (!(this_present_xferBy && that_present_xferBy))
-
 
11881
          return false;
-
 
11882
        if (!this.xferBy.equals(that.xferBy))
-
 
11883
          return false;
-
 
11884
      }
-
 
11885
 
-
 
11886
      boolean this_present_xferTxnId = true && this.isSetXferTxnId();
-
 
11887
      boolean that_present_xferTxnId = true && that.isSetXferTxnId();
-
 
11888
      if (this_present_xferTxnId || that_present_xferTxnId) {
-
 
11889
        if (!(this_present_xferTxnId && that_present_xferTxnId))
-
 
11890
          return false;
-
 
11891
        if (!this.xferTxnId.equals(that.xferTxnId))
-
 
11892
          return false;
-
 
11893
      }
-
 
11894
 
-
 
11895
      boolean this_present_xferDate = true;
-
 
11896
      boolean that_present_xferDate = true;
-
 
11897
      if (this_present_xferDate || that_present_xferDate) {
-
 
11898
        if (!(this_present_xferDate && that_present_xferDate))
-
 
11899
          return false;
-
 
11900
        if (this.xferDate != that.xferDate)
-
 
11901
          return false;
-
 
11902
      }
-
 
11903
 
-
 
11904
      return true;
-
 
11905
    }
-
 
11906
 
-
 
11907
    @Override
-
 
11908
    public int hashCode() {
-
 
11909
      return 0;
-
 
11910
    }
-
 
11911
 
-
 
11912
    public int compareTo(partiallyCapturePayment_args other) {
-
 
11913
      if (!getClass().equals(other.getClass())) {
-
 
11914
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11915
      }
-
 
11916
 
-
 
11917
      int lastComparison = 0;
-
 
11918
      partiallyCapturePayment_args typedOther = (partiallyCapturePayment_args)other;
-
 
11919
 
-
 
11920
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
-
 
11921
      if (lastComparison != 0) {
-
 
11922
        return lastComparison;
-
 
11923
      }
-
 
11924
      if (isSetMerchantTxnId()) {
-
 
11925
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
-
 
11926
        if (lastComparison != 0) {
-
 
11927
          return lastComparison;
-
 
11928
        }
-
 
11929
      }
-
 
11930
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
-
 
11931
      if (lastComparison != 0) {
-
 
11932
        return lastComparison;
-
 
11933
      }
-
 
11934
      if (isSetAmount()) {
-
 
11935
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
-
 
11936
        if (lastComparison != 0) {
-
 
11937
          return lastComparison;
-
 
11938
        }
-
 
11939
      }
-
 
11940
      lastComparison = Boolean.valueOf(isSetXferBy()).compareTo(typedOther.isSetXferBy());
-
 
11941
      if (lastComparison != 0) {
-
 
11942
        return lastComparison;
-
 
11943
      }
-
 
11944
      if (isSetXferBy()) {
-
 
11945
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferBy, typedOther.xferBy);
-
 
11946
        if (lastComparison != 0) {
-
 
11947
          return lastComparison;
-
 
11948
        }
-
 
11949
      }
-
 
11950
      lastComparison = Boolean.valueOf(isSetXferTxnId()).compareTo(typedOther.isSetXferTxnId());
-
 
11951
      if (lastComparison != 0) {
-
 
11952
        return lastComparison;
-
 
11953
      }
-
 
11954
      if (isSetXferTxnId()) {
-
 
11955
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferTxnId, typedOther.xferTxnId);
-
 
11956
        if (lastComparison != 0) {
-
 
11957
          return lastComparison;
-
 
11958
        }
-
 
11959
      }
-
 
11960
      lastComparison = Boolean.valueOf(isSetXferDate()).compareTo(typedOther.isSetXferDate());
-
 
11961
      if (lastComparison != 0) {
-
 
11962
        return lastComparison;
-
 
11963
      }
-
 
11964
      if (isSetXferDate()) {
-
 
11965
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferDate, typedOther.xferDate);
-
 
11966
        if (lastComparison != 0) {
-
 
11967
          return lastComparison;
-
 
11968
        }
-
 
11969
      }
-
 
11970
      return 0;
-
 
11971
    }
-
 
11972
 
-
 
11973
    public _Fields fieldForId(int fieldId) {
-
 
11974
      return _Fields.findByThriftId(fieldId);
-
 
11975
    }
-
 
11976
 
-
 
11977
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11978
      org.apache.thrift.protocol.TField field;
-
 
11979
      iprot.readStructBegin();
-
 
11980
      while (true)
-
 
11981
      {
-
 
11982
        field = iprot.readFieldBegin();
-
 
11983
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11984
          break;
-
 
11985
        }
-
 
11986
        switch (field.id) {
-
 
11987
          case 1: // MERCHANT_TXN_ID
-
 
11988
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
11989
              this.merchantTxnId = iprot.readI64();
-
 
11990
              setMerchantTxnIdIsSet(true);
-
 
11991
            } else { 
-
 
11992
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11993
            }
-
 
11994
            break;
-
 
11995
          case 2: // AMOUNT
-
 
11996
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
11997
              this.amount = iprot.readDouble();
-
 
11998
              setAmountIsSet(true);
-
 
11999
            } else { 
-
 
12000
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12001
            }
-
 
12002
            break;
-
 
12003
          case 3: // XFER_BY
-
 
12004
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
12005
              this.xferBy = iprot.readString();
-
 
12006
            } else { 
-
 
12007
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12008
            }
-
 
12009
            break;
-
 
12010
          case 4: // XFER_TXN_ID
-
 
12011
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
12012
              this.xferTxnId = iprot.readString();
-
 
12013
            } else { 
-
 
12014
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12015
            }
-
 
12016
            break;
-
 
12017
          case 5: // XFER_DATE
-
 
12018
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
12019
              this.xferDate = iprot.readI64();
-
 
12020
              setXferDateIsSet(true);
-
 
12021
            } else { 
-
 
12022
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12023
            }
-
 
12024
            break;
-
 
12025
          default:
-
 
12026
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12027
        }
-
 
12028
        iprot.readFieldEnd();
-
 
12029
      }
-
 
12030
      iprot.readStructEnd();
-
 
12031
      validate();
-
 
12032
    }
-
 
12033
 
-
 
12034
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
12035
      validate();
-
 
12036
 
-
 
12037
      oprot.writeStructBegin(STRUCT_DESC);
-
 
12038
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
-
 
12039
      oprot.writeI64(this.merchantTxnId);
-
 
12040
      oprot.writeFieldEnd();
-
 
12041
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
-
 
12042
      oprot.writeDouble(this.amount);
-
 
12043
      oprot.writeFieldEnd();
-
 
12044
      if (this.xferBy != null) {
-
 
12045
        oprot.writeFieldBegin(XFER_BY_FIELD_DESC);
-
 
12046
        oprot.writeString(this.xferBy);
-
 
12047
        oprot.writeFieldEnd();
-
 
12048
      }
-
 
12049
      if (this.xferTxnId != null) {
-
 
12050
        oprot.writeFieldBegin(XFER_TXN_ID_FIELD_DESC);
-
 
12051
        oprot.writeString(this.xferTxnId);
-
 
12052
        oprot.writeFieldEnd();
-
 
12053
      }
-
 
12054
      oprot.writeFieldBegin(XFER_DATE_FIELD_DESC);
-
 
12055
      oprot.writeI64(this.xferDate);
-
 
12056
      oprot.writeFieldEnd();
-
 
12057
      oprot.writeFieldStop();
-
 
12058
      oprot.writeStructEnd();
-
 
12059
    }
-
 
12060
 
-
 
12061
    @Override
-
 
12062
    public String toString() {
-
 
12063
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_args(");
-
 
12064
      boolean first = true;
-
 
12065
 
-
 
12066
      sb.append("merchantTxnId:");
-
 
12067
      sb.append(this.merchantTxnId);
-
 
12068
      first = false;
-
 
12069
      if (!first) sb.append(", ");
-
 
12070
      sb.append("amount:");
-
 
12071
      sb.append(this.amount);
-
 
12072
      first = false;
-
 
12073
      if (!first) sb.append(", ");
-
 
12074
      sb.append("xferBy:");
-
 
12075
      if (this.xferBy == null) {
-
 
12076
        sb.append("null");
-
 
12077
      } else {
-
 
12078
        sb.append(this.xferBy);
-
 
12079
      }
-
 
12080
      first = false;
-
 
12081
      if (!first) sb.append(", ");
-
 
12082
      sb.append("xferTxnId:");
-
 
12083
      if (this.xferTxnId == null) {
-
 
12084
        sb.append("null");
-
 
12085
      } else {
-
 
12086
        sb.append(this.xferTxnId);
-
 
12087
      }
-
 
12088
      first = false;
-
 
12089
      if (!first) sb.append(", ");
-
 
12090
      sb.append("xferDate:");
-
 
12091
      sb.append(this.xferDate);
-
 
12092
      first = false;
-
 
12093
      sb.append(")");
-
 
12094
      return sb.toString();
-
 
12095
    }
-
 
12096
 
-
 
12097
    public void validate() throws org.apache.thrift.TException {
-
 
12098
      // check for required fields
-
 
12099
    }
-
 
12100
 
-
 
12101
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
12102
      try {
-
 
12103
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
12104
      } catch (org.apache.thrift.TException te) {
-
 
12105
        throw new java.io.IOException(te);
-
 
12106
      }
-
 
12107
    }
-
 
12108
 
-
 
12109
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
12110
      try {
-
 
12111
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
12112
      } catch (org.apache.thrift.TException te) {
-
 
12113
        throw new java.io.IOException(te);
-
 
12114
      }
-
 
12115
    }
-
 
12116
 
-
 
12117
  }
-
 
12118
 
-
 
12119
  public static class partiallyCapturePayment_result implements org.apache.thrift.TBase<partiallyCapturePayment_result, partiallyCapturePayment_result._Fields>, java.io.Serializable, Cloneable   {
-
 
12120
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_result");
-
 
12121
 
-
 
12122
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
 
12123
    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);
-
 
12124
 
-
 
12125
    private boolean success; // required
-
 
12126
    private PaymentException pe; // required
-
 
12127
 
-
 
12128
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
12129
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
12130
      SUCCESS((short)0, "success"),
-
 
12131
      PE((short)1, "pe");
-
 
12132
 
-
 
12133
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
12134
 
-
 
12135
      static {
-
 
12136
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
12137
          byName.put(field.getFieldName(), field);
-
 
12138
        }
-
 
12139
      }
-
 
12140
 
-
 
12141
      /**
-
 
12142
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
12143
       */
-
 
12144
      public static _Fields findByThriftId(int fieldId) {
-
 
12145
        switch(fieldId) {
-
 
12146
          case 0: // SUCCESS
-
 
12147
            return SUCCESS;
-
 
12148
          case 1: // PE
-
 
12149
            return PE;
-
 
12150
          default:
-
 
12151
            return null;
-
 
12152
        }
-
 
12153
      }
-
 
12154
 
-
 
12155
      /**
-
 
12156
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
12157
       * if it is not found.
-
 
12158
       */
-
 
12159
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
12160
        _Fields fields = findByThriftId(fieldId);
-
 
12161
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
12162
        return fields;
-
 
12163
      }
-
 
12164
 
-
 
12165
      /**
-
 
12166
       * Find the _Fields constant that matches name, or null if its not found.
-
 
12167
       */
-
 
12168
      public static _Fields findByName(String name) {
-
 
12169
        return byName.get(name);
-
 
12170
      }
-
 
12171
 
-
 
12172
      private final short _thriftId;
-
 
12173
      private final String _fieldName;
-
 
12174
 
-
 
12175
      _Fields(short thriftId, String fieldName) {
-
 
12176
        _thriftId = thriftId;
-
 
12177
        _fieldName = fieldName;
-
 
12178
      }
-
 
12179
 
-
 
12180
      public short getThriftFieldId() {
-
 
12181
        return _thriftId;
-
 
12182
      }
-
 
12183
 
-
 
12184
      public String getFieldName() {
-
 
12185
        return _fieldName;
-
 
12186
      }
-
 
12187
    }
-
 
12188
 
-
 
12189
    // isset id assignments
-
 
12190
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
12191
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
12192
 
-
 
12193
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
12194
    static {
-
 
12195
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
12196
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
12197
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
12198
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
12199
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
12200
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
12201
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_result.class, metaDataMap);
-
 
12202
    }
-
 
12203
 
-
 
12204
    public partiallyCapturePayment_result() {
-
 
12205
    }
-
 
12206
 
-
 
12207
    public partiallyCapturePayment_result(
-
 
12208
      boolean success,
-
 
12209
      PaymentException pe)
-
 
12210
    {
-
 
12211
      this();
-
 
12212
      this.success = success;
-
 
12213
      setSuccessIsSet(true);
-
 
12214
      this.pe = pe;
-
 
12215
    }
-
 
12216
 
-
 
12217
    /**
-
 
12218
     * Performs a deep copy on <i>other</i>.
-
 
12219
     */
-
 
12220
    public partiallyCapturePayment_result(partiallyCapturePayment_result other) {
-
 
12221
      __isset_bit_vector.clear();
-
 
12222
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
12223
      this.success = other.success;
-
 
12224
      if (other.isSetPe()) {
-
 
12225
        this.pe = new PaymentException(other.pe);
-
 
12226
      }
-
 
12227
    }
-
 
12228
 
-
 
12229
    public partiallyCapturePayment_result deepCopy() {
-
 
12230
      return new partiallyCapturePayment_result(this);
-
 
12231
    }
-
 
12232
 
-
 
12233
    @Override
-
 
12234
    public void clear() {
-
 
12235
      setSuccessIsSet(false);
-
 
12236
      this.success = false;
-
 
12237
      this.pe = null;
-
 
12238
    }
-
 
12239
 
-
 
12240
    public boolean isSuccess() {
-
 
12241
      return this.success;
-
 
12242
    }
-
 
12243
 
-
 
12244
    public void setSuccess(boolean success) {
-
 
12245
      this.success = success;
-
 
12246
      setSuccessIsSet(true);
-
 
12247
    }
-
 
12248
 
-
 
12249
    public void unsetSuccess() {
-
 
12250
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
12251
    }
-
 
12252
 
-
 
12253
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
12254
    public boolean isSetSuccess() {
-
 
12255
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
12256
    }
-
 
12257
 
-
 
12258
    public void setSuccessIsSet(boolean value) {
-
 
12259
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
12260
    }
-
 
12261
 
-
 
12262
    public PaymentException getPe() {
-
 
12263
      return this.pe;
-
 
12264
    }
-
 
12265
 
-
 
12266
    public void setPe(PaymentException pe) {
-
 
12267
      this.pe = pe;
-
 
12268
    }
-
 
12269
 
-
 
12270
    public void unsetPe() {
-
 
12271
      this.pe = null;
-
 
12272
    }
-
 
12273
 
-
 
12274
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
-
 
12275
    public boolean isSetPe() {
-
 
12276
      return this.pe != null;
-
 
12277
    }
-
 
12278
 
-
 
12279
    public void setPeIsSet(boolean value) {
-
 
12280
      if (!value) {
-
 
12281
        this.pe = null;
-
 
12282
      }
-
 
12283
    }
-
 
12284
 
-
 
12285
    public void setFieldValue(_Fields field, Object value) {
-
 
12286
      switch (field) {
-
 
12287
      case SUCCESS:
-
 
12288
        if (value == null) {
-
 
12289
          unsetSuccess();
-
 
12290
        } else {
-
 
12291
          setSuccess((Boolean)value);
-
 
12292
        }
-
 
12293
        break;
-
 
12294
 
-
 
12295
      case PE:
-
 
12296
        if (value == null) {
-
 
12297
          unsetPe();
-
 
12298
        } else {
-
 
12299
          setPe((PaymentException)value);
-
 
12300
        }
-
 
12301
        break;
-
 
12302
 
-
 
12303
      }
-
 
12304
    }
-
 
12305
 
-
 
12306
    public Object getFieldValue(_Fields field) {
-
 
12307
      switch (field) {
-
 
12308
      case SUCCESS:
-
 
12309
        return Boolean.valueOf(isSuccess());
-
 
12310
 
-
 
12311
      case PE:
-
 
12312
        return getPe();
-
 
12313
 
-
 
12314
      }
-
 
12315
      throw new IllegalStateException();
-
 
12316
    }
-
 
12317
 
-
 
12318
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
12319
    public boolean isSet(_Fields field) {
-
 
12320
      if (field == null) {
-
 
12321
        throw new IllegalArgumentException();
-
 
12322
      }
-
 
12323
 
-
 
12324
      switch (field) {
-
 
12325
      case SUCCESS:
-
 
12326
        return isSetSuccess();
-
 
12327
      case PE:
-
 
12328
        return isSetPe();
-
 
12329
      }
-
 
12330
      throw new IllegalStateException();
-
 
12331
    }
-
 
12332
 
-
 
12333
    @Override
-
 
12334
    public boolean equals(Object that) {
-
 
12335
      if (that == null)
-
 
12336
        return false;
-
 
12337
      if (that instanceof partiallyCapturePayment_result)
-
 
12338
        return this.equals((partiallyCapturePayment_result)that);
-
 
12339
      return false;
-
 
12340
    }
-
 
12341
 
-
 
12342
    public boolean equals(partiallyCapturePayment_result that) {
-
 
12343
      if (that == null)
-
 
12344
        return false;
-
 
12345
 
-
 
12346
      boolean this_present_success = true;
-
 
12347
      boolean that_present_success = true;
-
 
12348
      if (this_present_success || that_present_success) {
-
 
12349
        if (!(this_present_success && that_present_success))
-
 
12350
          return false;
-
 
12351
        if (this.success != that.success)
-
 
12352
          return false;
-
 
12353
      }
-
 
12354
 
-
 
12355
      boolean this_present_pe = true && this.isSetPe();
-
 
12356
      boolean that_present_pe = true && that.isSetPe();
-
 
12357
      if (this_present_pe || that_present_pe) {
-
 
12358
        if (!(this_present_pe && that_present_pe))
-
 
12359
          return false;
-
 
12360
        if (!this.pe.equals(that.pe))
-
 
12361
          return false;
-
 
12362
      }
-
 
12363
 
-
 
12364
      return true;
-
 
12365
    }
-
 
12366
 
-
 
12367
    @Override
-
 
12368
    public int hashCode() {
-
 
12369
      return 0;
-
 
12370
    }
-
 
12371
 
-
 
12372
    public int compareTo(partiallyCapturePayment_result other) {
-
 
12373
      if (!getClass().equals(other.getClass())) {
-
 
12374
        return getClass().getName().compareTo(other.getClass().getName());
-
 
12375
      }
-
 
12376
 
-
 
12377
      int lastComparison = 0;
-
 
12378
      partiallyCapturePayment_result typedOther = (partiallyCapturePayment_result)other;
-
 
12379
 
-
 
12380
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
12381
      if (lastComparison != 0) {
-
 
12382
        return lastComparison;
-
 
12383
      }
-
 
12384
      if (isSetSuccess()) {
-
 
12385
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
12386
        if (lastComparison != 0) {
-
 
12387
          return lastComparison;
-
 
12388
        }
-
 
12389
      }
-
 
12390
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
-
 
12391
      if (lastComparison != 0) {
-
 
12392
        return lastComparison;
-
 
12393
      }
-
 
12394
      if (isSetPe()) {
-
 
12395
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
-
 
12396
        if (lastComparison != 0) {
-
 
12397
          return lastComparison;
-
 
12398
        }
-
 
12399
      }
-
 
12400
      return 0;
-
 
12401
    }
-
 
12402
 
-
 
12403
    public _Fields fieldForId(int fieldId) {
-
 
12404
      return _Fields.findByThriftId(fieldId);
-
 
12405
    }
-
 
12406
 
-
 
12407
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
12408
      org.apache.thrift.protocol.TField field;
-
 
12409
      iprot.readStructBegin();
-
 
12410
      while (true)
-
 
12411
      {
-
 
12412
        field = iprot.readFieldBegin();
-
 
12413
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
12414
          break;
-
 
12415
        }
-
 
12416
        switch (field.id) {
-
 
12417
          case 0: // SUCCESS
-
 
12418
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
12419
              this.success = iprot.readBool();
-
 
12420
              setSuccessIsSet(true);
-
 
12421
            } else { 
-
 
12422
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12423
            }
-
 
12424
            break;
-
 
12425
          case 1: // PE
-
 
12426
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
12427
              this.pe = new PaymentException();
-
 
12428
              this.pe.read(iprot);
-
 
12429
            } else { 
-
 
12430
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12431
            }
-
 
12432
            break;
-
 
12433
          default:
-
 
12434
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12435
        }
-
 
12436
        iprot.readFieldEnd();
-
 
12437
      }
-
 
12438
      iprot.readStructEnd();
-
 
12439
      validate();
-
 
12440
    }
-
 
12441
 
-
 
12442
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
12443
      oprot.writeStructBegin(STRUCT_DESC);
-
 
12444
 
-
 
12445
      if (this.isSetSuccess()) {
-
 
12446
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
12447
        oprot.writeBool(this.success);
-
 
12448
        oprot.writeFieldEnd();
-
 
12449
      } else if (this.isSetPe()) {
-
 
12450
        oprot.writeFieldBegin(PE_FIELD_DESC);
-
 
12451
        this.pe.write(oprot);
-
 
12452
        oprot.writeFieldEnd();
-
 
12453
      }
-
 
12454
      oprot.writeFieldStop();
-
 
12455
      oprot.writeStructEnd();
-
 
12456
    }
-
 
12457
 
-
 
12458
    @Override
-
 
12459
    public String toString() {
-
 
12460
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_result(");
-
 
12461
      boolean first = true;
-
 
12462
 
-
 
12463
      sb.append("success:");
-
 
12464
      sb.append(this.success);
-
 
12465
      first = false;
11335
      if (!first) sb.append(", ");
12466
      if (!first) sb.append(", ");
11336
      sb.append("pe:");
12467
      sb.append("pe:");
11337
      if (this.pe == null) {
12468
      if (this.pe == null) {
11338
        sb.append("null");
12469
        sb.append("null");
11339
      } else {
12470
      } else {