Subversion Repositories SmartDukaan

Rev

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

Rev 6228 Rev 6486
Line 164... Line 164...
164
     */
164
     */
165
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException;
165
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException;
166
 
166
 
167
    /**
167
    /**
168
     * Capture the payment for the given merchant transaction id. It processes the last payment for the given
168
     * Capture the payment for the given merchant transaction id. It processes the last payment for the given
169
     * transaction. If the capture attempt failed, the payment is marked as failed. PaymentException with error
-
 
170
     * code 104 is	thrown in case no payments are found for the transaction id passed.
169
     * transaction. PaymentException with error code 104 is thrown in case no payments are found for the transaction id passed.
171
     * PaymentException is also thrown with error code 106 in case capture was not possible due to connection
170
     * PaymentException is also thrown with error code 106 in case capture was not possible due to connection
172
     * issue. Here, we	payment also gets updated to CAPTURE_INPROCESS state
171
     * issue. Here, we	payment also gets updated to CAPTURE_INPROCESS state
173
     * 
172
     * 
174
     * @param merchantTxnId
173
     * @param merchantTxnId
175
     */
174
     */
176
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException;
175
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException;
177
 
176
 
178
    /**
177
    /**
-
 
178
     * Capture the payment for the given merchant transaction id. It processes the last payment for the given
-
 
179
     * transaction. If the capture attempt failed, the payment is marked as failed. PaymentException with error
-
 
180
     * code 104 is	thrown in case no payments are found for the transaction id passed. PaymentException is also
-
 
181
     * thrown with error code 106 in case capture was not possible due to connection
-
 
182
     * issue.
-
 
183
     * 
-
 
184
     * @param merchantTxnId
-
 
185
     * @param amount
-
 
186
     * @param isDigital
-
 
187
     */
-
 
188
    public boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
-
 
189
 
-
 
190
    /**
179
     * Adds the given amount to the captured amount of a COD payment.
191
     * Adds the given amount to the captured amount of a COD payment.
180
     * Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
192
     * Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
181
     * If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
193
     * If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
182
     * Also sets the name of the entity which transferred the money, the date on which it was transferred
194
     * Also sets the name of the entity which transferred the money, the date on which it was transferred
183
     * and the corresponding transaction id.
195
     * and the corresponding transaction id.
Line 246... Line 258...
246
 
258
 
247
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
259
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
248
 
260
 
249
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
261
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
250
 
262
 
-
 
263
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.refundPayment_call> resultHandler) throws org.apache.thrift.TException;
-
 
264
 
251
    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;
265
    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;
252
 
266
 
253
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException;
267
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException;
254
 
268
 
255
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException;
269
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException;
Line 713... Line 727...
713
        throw result.pe;
727
        throw result.pe;
714
      }
728
      }
715
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
729
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
716
    }
730
    }
717
 
731
 
-
 
732
    public boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException
-
 
733
    {
-
 
734
      send_refundPayment(merchantTxnId, amount, isDigital);
-
 
735
      return recv_refundPayment();
-
 
736
    }
-
 
737
 
-
 
738
    public void send_refundPayment(long merchantTxnId, double amount, boolean isDigital) throws org.apache.thrift.TException
-
 
739
    {
-
 
740
      refundPayment_args args = new refundPayment_args();
-
 
741
      args.setMerchantTxnId(merchantTxnId);
-
 
742
      args.setAmount(amount);
-
 
743
      args.setIsDigital(isDigital);
-
 
744
      sendBase("refundPayment", args);
-
 
745
    }
-
 
746
 
-
 
747
    public boolean recv_refundPayment() throws PaymentException, org.apache.thrift.TException
-
 
748
    {
-
 
749
      refundPayment_result result = new refundPayment_result();
-
 
750
      receiveBase(result, "refundPayment");
-
 
751
      if (result.isSetSuccess()) {
-
 
752
        return result.success;
-
 
753
      }
-
 
754
      if (result.pe != null) {
-
 
755
        throw result.pe;
-
 
756
      }
-
 
757
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "refundPayment failed: unknown result");
-
 
758
    }
-
 
759
 
718
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException
760
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException
719
    {
761
    {
720
      send_partiallyCapturePayment(merchantTxnId, amount, xferBy, xferTxnId, xferDate);
762
      send_partiallyCapturePayment(merchantTxnId, amount, xferBy, xferTxnId, xferDate);
721
      return recv_partiallyCapturePayment();
763
      return recv_partiallyCapturePayment();
722
    }
764
    }
Line 1395... Line 1437...
1395
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1437
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1396
        return (new Client(prot)).recv_capturePayment();
1438
        return (new Client(prot)).recv_capturePayment();
1397
      }
1439
      }
1398
    }
1440
    }
1399
 
1441
 
-
 
1442
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<refundPayment_call> resultHandler) throws org.apache.thrift.TException {
-
 
1443
      checkReady();
-
 
1444
      refundPayment_call method_call = new refundPayment_call(merchantTxnId, amount, isDigital, resultHandler, this, ___protocolFactory, ___transport);
-
 
1445
      this.___currentMethod = method_call;
-
 
1446
      ___manager.call(method_call);
-
 
1447
    }
-
 
1448
 
-
 
1449
    public static class refundPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1450
      private long merchantTxnId;
-
 
1451
      private double amount;
-
 
1452
      private boolean isDigital;
-
 
1453
      public refundPayment_call(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<refundPayment_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 {
-
 
1454
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1455
        this.merchantTxnId = merchantTxnId;
-
 
1456
        this.amount = amount;
-
 
1457
        this.isDigital = isDigital;
-
 
1458
      }
-
 
1459
 
-
 
1460
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1461
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("refundPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1462
        refundPayment_args args = new refundPayment_args();
-
 
1463
        args.setMerchantTxnId(merchantTxnId);
-
 
1464
        args.setAmount(amount);
-
 
1465
        args.setIsDigital(isDigital);
-
 
1466
        args.write(prot);
-
 
1467
        prot.writeMessageEnd();
-
 
1468
      }
-
 
1469
 
-
 
1470
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
-
 
1471
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1472
          throw new IllegalStateException("Method call not finished!");
-
 
1473
        }
-
 
1474
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1475
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1476
        return (new Client(prot)).recv_refundPayment();
-
 
1477
      }
-
 
1478
    }
-
 
1479
 
1400
    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 {
1480
    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 {
1401
      checkReady();
1481
      checkReady();
1402
      partiallyCapturePayment_call method_call = new partiallyCapturePayment_call(merchantTxnId, amount, xferBy, xferTxnId, xferDate, resultHandler, this, ___protocolFactory, ___transport);
1482
      partiallyCapturePayment_call method_call = new partiallyCapturePayment_call(merchantTxnId, amount, xferBy, xferTxnId, xferDate, resultHandler, this, ___protocolFactory, ___transport);
1403
      this.___currentMethod = method_call;
1483
      this.___currentMethod = method_call;
1404
      ___manager.call(method_call);
1484
      ___manager.call(method_call);
Line 1535... Line 1615...
1535
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
1615
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
1536
      processMap.put("doHdfcPaymentForDigitalOrder", new doHdfcPaymentForDigitalOrder());
1616
      processMap.put("doHdfcPaymentForDigitalOrder", new doHdfcPaymentForDigitalOrder());
1537
      processMap.put("initializeHdfcEmiPayment", new initializeHdfcEmiPayment());
1617
      processMap.put("initializeHdfcEmiPayment", new initializeHdfcEmiPayment());
1538
      processMap.put("createRefund", new createRefund());
1618
      processMap.put("createRefund", new createRefund());
1539
      processMap.put("capturePayment", new capturePayment());
1619
      processMap.put("capturePayment", new capturePayment());
-
 
1620
      processMap.put("refundPayment", new refundPayment());
1540
      processMap.put("partiallyCapturePayment", new partiallyCapturePayment());
1621
      processMap.put("partiallyCapturePayment", new partiallyCapturePayment());
1541
      processMap.put("getPaymentsRequiringExtraProcessing", new getPaymentsRequiringExtraProcessing());
1622
      processMap.put("getPaymentsRequiringExtraProcessing", new getPaymentsRequiringExtraProcessing());
1542
      processMap.put("markPaymentAsProcessed", new markPaymentAsProcessed());
1623
      processMap.put("markPaymentAsProcessed", new markPaymentAsProcessed());
1543
      return processMap;
1624
      return processMap;
1544
    }
1625
    }
Line 1861... Line 1942...
1861
        }
1942
        }
1862
        return result;
1943
        return result;
1863
      }
1944
      }
1864
    }
1945
    }
1865
 
1946
 
-
 
1947
    private static class refundPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, refundPayment_args> {
-
 
1948
      public refundPayment() {
-
 
1949
        super("refundPayment");
-
 
1950
      }
-
 
1951
 
-
 
1952
      protected refundPayment_args getEmptyArgsInstance() {
-
 
1953
        return new refundPayment_args();
-
 
1954
      }
-
 
1955
 
-
 
1956
      protected refundPayment_result getResult(I iface, refundPayment_args args) throws org.apache.thrift.TException {
-
 
1957
        refundPayment_result result = new refundPayment_result();
-
 
1958
        try {
-
 
1959
          result.success = iface.refundPayment(args.merchantTxnId, args.amount, args.isDigital);
-
 
1960
          result.setSuccessIsSet(true);
-
 
1961
        } catch (PaymentException pe) {
-
 
1962
          result.pe = pe;
-
 
1963
        }
-
 
1964
        return result;
-
 
1965
      }
-
 
1966
    }
-
 
1967
 
1866
    private static class partiallyCapturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partiallyCapturePayment_args> {
1968
    private static class partiallyCapturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partiallyCapturePayment_args> {
1867
      public partiallyCapturePayment() {
1969
      public partiallyCapturePayment() {
1868
        super("partiallyCapturePayment");
1970
        super("partiallyCapturePayment");
1869
      }
1971
      }
1870
 
1972
 
Line 15086... Line 15188...
15086
      boolean first = true;
15188
      boolean first = true;
15087
 
15189
 
15088
      sb.append("success:");
15190
      sb.append("success:");
15089
      sb.append(this.success);
15191
      sb.append(this.success);
15090
      first = false;
15192
      first = false;
-
 
15193
      if (!first) sb.append(", ");
-
 
15194
      sb.append("pe:");
-
 
15195
      if (this.pe == null) {
-
 
15196
        sb.append("null");
-
 
15197
      } else {
-
 
15198
        sb.append(this.pe);
-
 
15199
      }
-
 
15200
      first = false;
-
 
15201
      sb.append(")");
-
 
15202
      return sb.toString();
-
 
15203
    }
-
 
15204
 
-
 
15205
    public void validate() throws org.apache.thrift.TException {
-
 
15206
      // check for required fields
-
 
15207
    }
-
 
15208
 
-
 
15209
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
15210
      try {
-
 
15211
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
15212
      } catch (org.apache.thrift.TException te) {
-
 
15213
        throw new java.io.IOException(te);
-
 
15214
      }
-
 
15215
    }
-
 
15216
 
-
 
15217
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
15218
      try {
-
 
15219
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
15220
      } catch (org.apache.thrift.TException te) {
-
 
15221
        throw new java.io.IOException(te);
-
 
15222
      }
-
 
15223
    }
-
 
15224
 
-
 
15225
  }
-
 
15226
 
-
 
15227
  public static class refundPayment_args implements org.apache.thrift.TBase<refundPayment_args, refundPayment_args._Fields>, java.io.Serializable, Cloneable   {
-
 
15228
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("refundPayment_args");
-
 
15229
 
-
 
15230
    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);
-
 
15231
    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);
-
 
15232
    private static final org.apache.thrift.protocol.TField IS_DIGITAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isDigital", org.apache.thrift.protocol.TType.BOOL, (short)3);
-
 
15233
 
-
 
15234
    private long merchantTxnId; // required
-
 
15235
    private double amount; // required
-
 
15236
    private boolean isDigital; // required
-
 
15237
 
-
 
15238
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
15239
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
15240
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
-
 
15241
      AMOUNT((short)2, "amount"),
-
 
15242
      IS_DIGITAL((short)3, "isDigital");
-
 
15243
 
-
 
15244
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
15245
 
-
 
15246
      static {
-
 
15247
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
15248
          byName.put(field.getFieldName(), field);
-
 
15249
        }
-
 
15250
      }
-
 
15251
 
-
 
15252
      /**
-
 
15253
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
15254
       */
-
 
15255
      public static _Fields findByThriftId(int fieldId) {
-
 
15256
        switch(fieldId) {
-
 
15257
          case 1: // MERCHANT_TXN_ID
-
 
15258
            return MERCHANT_TXN_ID;
-
 
15259
          case 2: // AMOUNT
-
 
15260
            return AMOUNT;
-
 
15261
          case 3: // IS_DIGITAL
-
 
15262
            return IS_DIGITAL;
-
 
15263
          default:
-
 
15264
            return null;
-
 
15265
        }
-
 
15266
      }
-
 
15267
 
-
 
15268
      /**
-
 
15269
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
15270
       * if it is not found.
-
 
15271
       */
-
 
15272
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
15273
        _Fields fields = findByThriftId(fieldId);
-
 
15274
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
15275
        return fields;
-
 
15276
      }
-
 
15277
 
-
 
15278
      /**
-
 
15279
       * Find the _Fields constant that matches name, or null if its not found.
-
 
15280
       */
-
 
15281
      public static _Fields findByName(String name) {
-
 
15282
        return byName.get(name);
-
 
15283
      }
-
 
15284
 
-
 
15285
      private final short _thriftId;
-
 
15286
      private final String _fieldName;
-
 
15287
 
-
 
15288
      _Fields(short thriftId, String fieldName) {
-
 
15289
        _thriftId = thriftId;
-
 
15290
        _fieldName = fieldName;
-
 
15291
      }
-
 
15292
 
-
 
15293
      public short getThriftFieldId() {
-
 
15294
        return _thriftId;
-
 
15295
      }
-
 
15296
 
-
 
15297
      public String getFieldName() {
-
 
15298
        return _fieldName;
-
 
15299
      }
-
 
15300
    }
-
 
15301
 
-
 
15302
    // isset id assignments
-
 
15303
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
-
 
15304
    private static final int __AMOUNT_ISSET_ID = 1;
-
 
15305
    private static final int __ISDIGITAL_ISSET_ID = 2;
-
 
15306
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
15307
 
-
 
15308
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
15309
    static {
-
 
15310
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
15311
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
15312
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
15313
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
15314
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
15315
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
15316
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
15317
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
15318
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(refundPayment_args.class, metaDataMap);
-
 
15319
    }
-
 
15320
 
-
 
15321
    public refundPayment_args() {
-
 
15322
    }
-
 
15323
 
-
 
15324
    public refundPayment_args(
-
 
15325
      long merchantTxnId,
-
 
15326
      double amount,
-
 
15327
      boolean isDigital)
-
 
15328
    {
-
 
15329
      this();
-
 
15330
      this.merchantTxnId = merchantTxnId;
-
 
15331
      setMerchantTxnIdIsSet(true);
-
 
15332
      this.amount = amount;
-
 
15333
      setAmountIsSet(true);
-
 
15334
      this.isDigital = isDigital;
-
 
15335
      setIsDigitalIsSet(true);
-
 
15336
    }
-
 
15337
 
-
 
15338
    /**
-
 
15339
     * Performs a deep copy on <i>other</i>.
-
 
15340
     */
-
 
15341
    public refundPayment_args(refundPayment_args other) {
-
 
15342
      __isset_bit_vector.clear();
-
 
15343
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
15344
      this.merchantTxnId = other.merchantTxnId;
-
 
15345
      this.amount = other.amount;
-
 
15346
      this.isDigital = other.isDigital;
-
 
15347
    }
-
 
15348
 
-
 
15349
    public refundPayment_args deepCopy() {
-
 
15350
      return new refundPayment_args(this);
-
 
15351
    }
-
 
15352
 
-
 
15353
    @Override
-
 
15354
    public void clear() {
-
 
15355
      setMerchantTxnIdIsSet(false);
-
 
15356
      this.merchantTxnId = 0;
-
 
15357
      setAmountIsSet(false);
-
 
15358
      this.amount = 0.0;
-
 
15359
      setIsDigitalIsSet(false);
-
 
15360
      this.isDigital = false;
-
 
15361
    }
-
 
15362
 
-
 
15363
    public long getMerchantTxnId() {
-
 
15364
      return this.merchantTxnId;
-
 
15365
    }
-
 
15366
 
-
 
15367
    public void setMerchantTxnId(long merchantTxnId) {
-
 
15368
      this.merchantTxnId = merchantTxnId;
-
 
15369
      setMerchantTxnIdIsSet(true);
-
 
15370
    }
-
 
15371
 
-
 
15372
    public void unsetMerchantTxnId() {
-
 
15373
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
-
 
15374
    }
-
 
15375
 
-
 
15376
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
-
 
15377
    public boolean isSetMerchantTxnId() {
-
 
15378
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
-
 
15379
    }
-
 
15380
 
-
 
15381
    public void setMerchantTxnIdIsSet(boolean value) {
-
 
15382
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
-
 
15383
    }
-
 
15384
 
-
 
15385
    public double getAmount() {
-
 
15386
      return this.amount;
-
 
15387
    }
-
 
15388
 
-
 
15389
    public void setAmount(double amount) {
-
 
15390
      this.amount = amount;
-
 
15391
      setAmountIsSet(true);
-
 
15392
    }
-
 
15393
 
-
 
15394
    public void unsetAmount() {
-
 
15395
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
-
 
15396
    }
-
 
15397
 
-
 
15398
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
-
 
15399
    public boolean isSetAmount() {
-
 
15400
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
-
 
15401
    }
-
 
15402
 
-
 
15403
    public void setAmountIsSet(boolean value) {
-
 
15404
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
-
 
15405
    }
-
 
15406
 
-
 
15407
    public boolean isIsDigital() {
-
 
15408
      return this.isDigital;
-
 
15409
    }
-
 
15410
 
-
 
15411
    public void setIsDigital(boolean isDigital) {
-
 
15412
      this.isDigital = isDigital;
-
 
15413
      setIsDigitalIsSet(true);
-
 
15414
    }
-
 
15415
 
-
 
15416
    public void unsetIsDigital() {
-
 
15417
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
-
 
15418
    }
-
 
15419
 
-
 
15420
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
-
 
15421
    public boolean isSetIsDigital() {
-
 
15422
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
-
 
15423
    }
-
 
15424
 
-
 
15425
    public void setIsDigitalIsSet(boolean value) {
-
 
15426
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
-
 
15427
    }
-
 
15428
 
-
 
15429
    public void setFieldValue(_Fields field, Object value) {
-
 
15430
      switch (field) {
-
 
15431
      case MERCHANT_TXN_ID:
-
 
15432
        if (value == null) {
-
 
15433
          unsetMerchantTxnId();
-
 
15434
        } else {
-
 
15435
          setMerchantTxnId((Long)value);
-
 
15436
        }
-
 
15437
        break;
-
 
15438
 
-
 
15439
      case AMOUNT:
-
 
15440
        if (value == null) {
-
 
15441
          unsetAmount();
-
 
15442
        } else {
-
 
15443
          setAmount((Double)value);
-
 
15444
        }
-
 
15445
        break;
-
 
15446
 
-
 
15447
      case IS_DIGITAL:
-
 
15448
        if (value == null) {
-
 
15449
          unsetIsDigital();
-
 
15450
        } else {
-
 
15451
          setIsDigital((Boolean)value);
-
 
15452
        }
-
 
15453
        break;
-
 
15454
 
-
 
15455
      }
-
 
15456
    }
-
 
15457
 
-
 
15458
    public Object getFieldValue(_Fields field) {
-
 
15459
      switch (field) {
-
 
15460
      case MERCHANT_TXN_ID:
-
 
15461
        return Long.valueOf(getMerchantTxnId());
-
 
15462
 
-
 
15463
      case AMOUNT:
-
 
15464
        return Double.valueOf(getAmount());
-
 
15465
 
-
 
15466
      case IS_DIGITAL:
-
 
15467
        return Boolean.valueOf(isIsDigital());
-
 
15468
 
-
 
15469
      }
-
 
15470
      throw new IllegalStateException();
-
 
15471
    }
-
 
15472
 
-
 
15473
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
15474
    public boolean isSet(_Fields field) {
-
 
15475
      if (field == null) {
-
 
15476
        throw new IllegalArgumentException();
-
 
15477
      }
-
 
15478
 
-
 
15479
      switch (field) {
-
 
15480
      case MERCHANT_TXN_ID:
-
 
15481
        return isSetMerchantTxnId();
-
 
15482
      case AMOUNT:
-
 
15483
        return isSetAmount();
-
 
15484
      case IS_DIGITAL:
-
 
15485
        return isSetIsDigital();
-
 
15486
      }
-
 
15487
      throw new IllegalStateException();
-
 
15488
    }
-
 
15489
 
-
 
15490
    @Override
-
 
15491
    public boolean equals(Object that) {
-
 
15492
      if (that == null)
-
 
15493
        return false;
-
 
15494
      if (that instanceof refundPayment_args)
-
 
15495
        return this.equals((refundPayment_args)that);
-
 
15496
      return false;
-
 
15497
    }
-
 
15498
 
-
 
15499
    public boolean equals(refundPayment_args that) {
-
 
15500
      if (that == null)
-
 
15501
        return false;
-
 
15502
 
-
 
15503
      boolean this_present_merchantTxnId = true;
-
 
15504
      boolean that_present_merchantTxnId = true;
-
 
15505
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
-
 
15506
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
-
 
15507
          return false;
-
 
15508
        if (this.merchantTxnId != that.merchantTxnId)
-
 
15509
          return false;
-
 
15510
      }
-
 
15511
 
-
 
15512
      boolean this_present_amount = true;
-
 
15513
      boolean that_present_amount = true;
-
 
15514
      if (this_present_amount || that_present_amount) {
-
 
15515
        if (!(this_present_amount && that_present_amount))
-
 
15516
          return false;
-
 
15517
        if (this.amount != that.amount)
-
 
15518
          return false;
-
 
15519
      }
-
 
15520
 
-
 
15521
      boolean this_present_isDigital = true;
-
 
15522
      boolean that_present_isDigital = true;
-
 
15523
      if (this_present_isDigital || that_present_isDigital) {
-
 
15524
        if (!(this_present_isDigital && that_present_isDigital))
-
 
15525
          return false;
-
 
15526
        if (this.isDigital != that.isDigital)
-
 
15527
          return false;
-
 
15528
      }
-
 
15529
 
-
 
15530
      return true;
-
 
15531
    }
-
 
15532
 
-
 
15533
    @Override
-
 
15534
    public int hashCode() {
-
 
15535
      return 0;
-
 
15536
    }
-
 
15537
 
-
 
15538
    public int compareTo(refundPayment_args other) {
-
 
15539
      if (!getClass().equals(other.getClass())) {
-
 
15540
        return getClass().getName().compareTo(other.getClass().getName());
-
 
15541
      }
-
 
15542
 
-
 
15543
      int lastComparison = 0;
-
 
15544
      refundPayment_args typedOther = (refundPayment_args)other;
-
 
15545
 
-
 
15546
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
-
 
15547
      if (lastComparison != 0) {
-
 
15548
        return lastComparison;
-
 
15549
      }
-
 
15550
      if (isSetMerchantTxnId()) {
-
 
15551
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
-
 
15552
        if (lastComparison != 0) {
-
 
15553
          return lastComparison;
-
 
15554
        }
-
 
15555
      }
-
 
15556
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
-
 
15557
      if (lastComparison != 0) {
-
 
15558
        return lastComparison;
-
 
15559
      }
-
 
15560
      if (isSetAmount()) {
-
 
15561
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
-
 
15562
        if (lastComparison != 0) {
-
 
15563
          return lastComparison;
-
 
15564
        }
-
 
15565
      }
-
 
15566
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
-
 
15567
      if (lastComparison != 0) {
-
 
15568
        return lastComparison;
-
 
15569
      }
-
 
15570
      if (isSetIsDigital()) {
-
 
15571
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
-
 
15572
        if (lastComparison != 0) {
-
 
15573
          return lastComparison;
-
 
15574
        }
-
 
15575
      }
-
 
15576
      return 0;
-
 
15577
    }
-
 
15578
 
-
 
15579
    public _Fields fieldForId(int fieldId) {
-
 
15580
      return _Fields.findByThriftId(fieldId);
-
 
15581
    }
-
 
15582
 
-
 
15583
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
15584
      org.apache.thrift.protocol.TField field;
-
 
15585
      iprot.readStructBegin();
-
 
15586
      while (true)
-
 
15587
      {
-
 
15588
        field = iprot.readFieldBegin();
-
 
15589
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
15590
          break;
-
 
15591
        }
-
 
15592
        switch (field.id) {
-
 
15593
          case 1: // MERCHANT_TXN_ID
-
 
15594
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
15595
              this.merchantTxnId = iprot.readI64();
-
 
15596
              setMerchantTxnIdIsSet(true);
-
 
15597
            } else { 
-
 
15598
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
15599
            }
-
 
15600
            break;
-
 
15601
          case 2: // AMOUNT
-
 
15602
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
15603
              this.amount = iprot.readDouble();
-
 
15604
              setAmountIsSet(true);
-
 
15605
            } else { 
-
 
15606
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
15607
            }
-
 
15608
            break;
-
 
15609
          case 3: // IS_DIGITAL
-
 
15610
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
15611
              this.isDigital = iprot.readBool();
-
 
15612
              setIsDigitalIsSet(true);
-
 
15613
            } else { 
-
 
15614
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
15615
            }
-
 
15616
            break;
-
 
15617
          default:
-
 
15618
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
15619
        }
-
 
15620
        iprot.readFieldEnd();
-
 
15621
      }
-
 
15622
      iprot.readStructEnd();
-
 
15623
      validate();
-
 
15624
    }
-
 
15625
 
-
 
15626
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
15627
      validate();
-
 
15628
 
-
 
15629
      oprot.writeStructBegin(STRUCT_DESC);
-
 
15630
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
-
 
15631
      oprot.writeI64(this.merchantTxnId);
-
 
15632
      oprot.writeFieldEnd();
-
 
15633
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
-
 
15634
      oprot.writeDouble(this.amount);
-
 
15635
      oprot.writeFieldEnd();
-
 
15636
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
-
 
15637
      oprot.writeBool(this.isDigital);
-
 
15638
      oprot.writeFieldEnd();
-
 
15639
      oprot.writeFieldStop();
-
 
15640
      oprot.writeStructEnd();
-
 
15641
    }
-
 
15642
 
-
 
15643
    @Override
-
 
15644
    public String toString() {
-
 
15645
      StringBuilder sb = new StringBuilder("refundPayment_args(");
-
 
15646
      boolean first = true;
-
 
15647
 
-
 
15648
      sb.append("merchantTxnId:");
-
 
15649
      sb.append(this.merchantTxnId);
-
 
15650
      first = false;
-
 
15651
      if (!first) sb.append(", ");
-
 
15652
      sb.append("amount:");
-
 
15653
      sb.append(this.amount);
-
 
15654
      first = false;
-
 
15655
      if (!first) sb.append(", ");
-
 
15656
      sb.append("isDigital:");
-
 
15657
      sb.append(this.isDigital);
-
 
15658
      first = false;
-
 
15659
      sb.append(")");
-
 
15660
      return sb.toString();
-
 
15661
    }
-
 
15662
 
-
 
15663
    public void validate() throws org.apache.thrift.TException {
-
 
15664
      // check for required fields
-
 
15665
    }
-
 
15666
 
-
 
15667
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
15668
      try {
-
 
15669
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
15670
      } catch (org.apache.thrift.TException te) {
-
 
15671
        throw new java.io.IOException(te);
-
 
15672
      }
-
 
15673
    }
-
 
15674
 
-
 
15675
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
15676
      try {
-
 
15677
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
15678
      } catch (org.apache.thrift.TException te) {
-
 
15679
        throw new java.io.IOException(te);
-
 
15680
      }
-
 
15681
    }
-
 
15682
 
-
 
15683
  }
-
 
15684
 
-
 
15685
  public static class refundPayment_result implements org.apache.thrift.TBase<refundPayment_result, refundPayment_result._Fields>, java.io.Serializable, Cloneable   {
-
 
15686
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("refundPayment_result");
-
 
15687
 
-
 
15688
    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);
-
 
15689
    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);
-
 
15690
 
-
 
15691
    private boolean success; // required
-
 
15692
    private PaymentException pe; // required
-
 
15693
 
-
 
15694
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
15695
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
15696
      SUCCESS((short)0, "success"),
-
 
15697
      PE((short)1, "pe");
-
 
15698
 
-
 
15699
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
15700
 
-
 
15701
      static {
-
 
15702
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
15703
          byName.put(field.getFieldName(), field);
-
 
15704
        }
-
 
15705
      }
-
 
15706
 
-
 
15707
      /**
-
 
15708
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
15709
       */
-
 
15710
      public static _Fields findByThriftId(int fieldId) {
-
 
15711
        switch(fieldId) {
-
 
15712
          case 0: // SUCCESS
-
 
15713
            return SUCCESS;
-
 
15714
          case 1: // PE
-
 
15715
            return PE;
-
 
15716
          default:
-
 
15717
            return null;
-
 
15718
        }
-
 
15719
      }
-
 
15720
 
-
 
15721
      /**
-
 
15722
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
15723
       * if it is not found.
-
 
15724
       */
-
 
15725
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
15726
        _Fields fields = findByThriftId(fieldId);
-
 
15727
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
15728
        return fields;
-
 
15729
      }
-
 
15730
 
-
 
15731
      /**
-
 
15732
       * Find the _Fields constant that matches name, or null if its not found.
-
 
15733
       */
-
 
15734
      public static _Fields findByName(String name) {
-
 
15735
        return byName.get(name);
-
 
15736
      }
-
 
15737
 
-
 
15738
      private final short _thriftId;
-
 
15739
      private final String _fieldName;
-
 
15740
 
-
 
15741
      _Fields(short thriftId, String fieldName) {
-
 
15742
        _thriftId = thriftId;
-
 
15743
        _fieldName = fieldName;
-
 
15744
      }
-
 
15745
 
-
 
15746
      public short getThriftFieldId() {
-
 
15747
        return _thriftId;
-
 
15748
      }
-
 
15749
 
-
 
15750
      public String getFieldName() {
-
 
15751
        return _fieldName;
-
 
15752
      }
-
 
15753
    }
-
 
15754
 
-
 
15755
    // isset id assignments
-
 
15756
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
15757
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
15758
 
-
 
15759
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
15760
    static {
-
 
15761
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
15762
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
15763
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
15764
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
15765
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
15766
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
15767
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(refundPayment_result.class, metaDataMap);
-
 
15768
    }
-
 
15769
 
-
 
15770
    public refundPayment_result() {
-
 
15771
    }
-
 
15772
 
-
 
15773
    public refundPayment_result(
-
 
15774
      boolean success,
-
 
15775
      PaymentException pe)
-
 
15776
    {
-
 
15777
      this();
-
 
15778
      this.success = success;
-
 
15779
      setSuccessIsSet(true);
-
 
15780
      this.pe = pe;
-
 
15781
    }
-
 
15782
 
-
 
15783
    /**
-
 
15784
     * Performs a deep copy on <i>other</i>.
-
 
15785
     */
-
 
15786
    public refundPayment_result(refundPayment_result other) {
-
 
15787
      __isset_bit_vector.clear();
-
 
15788
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
15789
      this.success = other.success;
-
 
15790
      if (other.isSetPe()) {
-
 
15791
        this.pe = new PaymentException(other.pe);
-
 
15792
      }
-
 
15793
    }
-
 
15794
 
-
 
15795
    public refundPayment_result deepCopy() {
-
 
15796
      return new refundPayment_result(this);
-
 
15797
    }
-
 
15798
 
-
 
15799
    @Override
-
 
15800
    public void clear() {
-
 
15801
      setSuccessIsSet(false);
-
 
15802
      this.success = false;
-
 
15803
      this.pe = null;
-
 
15804
    }
-
 
15805
 
-
 
15806
    public boolean isSuccess() {
-
 
15807
      return this.success;
-
 
15808
    }
-
 
15809
 
-
 
15810
    public void setSuccess(boolean success) {
-
 
15811
      this.success = success;
-
 
15812
      setSuccessIsSet(true);
-
 
15813
    }
-
 
15814
 
-
 
15815
    public void unsetSuccess() {
-
 
15816
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
15817
    }
-
 
15818
 
-
 
15819
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
15820
    public boolean isSetSuccess() {
-
 
15821
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
15822
    }
-
 
15823
 
-
 
15824
    public void setSuccessIsSet(boolean value) {
-
 
15825
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
15826
    }
-
 
15827
 
-
 
15828
    public PaymentException getPe() {
-
 
15829
      return this.pe;
-
 
15830
    }
-
 
15831
 
-
 
15832
    public void setPe(PaymentException pe) {
-
 
15833
      this.pe = pe;
-
 
15834
    }
-
 
15835
 
-
 
15836
    public void unsetPe() {
-
 
15837
      this.pe = null;
-
 
15838
    }
-
 
15839
 
-
 
15840
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
-
 
15841
    public boolean isSetPe() {
-
 
15842
      return this.pe != null;
-
 
15843
    }
-
 
15844
 
-
 
15845
    public void setPeIsSet(boolean value) {
-
 
15846
      if (!value) {
-
 
15847
        this.pe = null;
-
 
15848
      }
-
 
15849
    }
-
 
15850
 
-
 
15851
    public void setFieldValue(_Fields field, Object value) {
-
 
15852
      switch (field) {
-
 
15853
      case SUCCESS:
-
 
15854
        if (value == null) {
-
 
15855
          unsetSuccess();
-
 
15856
        } else {
-
 
15857
          setSuccess((Boolean)value);
-
 
15858
        }
-
 
15859
        break;
-
 
15860
 
-
 
15861
      case PE:
-
 
15862
        if (value == null) {
-
 
15863
          unsetPe();
-
 
15864
        } else {
-
 
15865
          setPe((PaymentException)value);
-
 
15866
        }
-
 
15867
        break;
-
 
15868
 
-
 
15869
      }
-
 
15870
    }
-
 
15871
 
-
 
15872
    public Object getFieldValue(_Fields field) {
-
 
15873
      switch (field) {
-
 
15874
      case SUCCESS:
-
 
15875
        return Boolean.valueOf(isSuccess());
-
 
15876
 
-
 
15877
      case PE:
-
 
15878
        return getPe();
-
 
15879
 
-
 
15880
      }
-
 
15881
      throw new IllegalStateException();
-
 
15882
    }
-
 
15883
 
-
 
15884
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
15885
    public boolean isSet(_Fields field) {
-
 
15886
      if (field == null) {
-
 
15887
        throw new IllegalArgumentException();
-
 
15888
      }
-
 
15889
 
-
 
15890
      switch (field) {
-
 
15891
      case SUCCESS:
-
 
15892
        return isSetSuccess();
-
 
15893
      case PE:
-
 
15894
        return isSetPe();
-
 
15895
      }
-
 
15896
      throw new IllegalStateException();
-
 
15897
    }
-
 
15898
 
-
 
15899
    @Override
-
 
15900
    public boolean equals(Object that) {
-
 
15901
      if (that == null)
-
 
15902
        return false;
-
 
15903
      if (that instanceof refundPayment_result)
-
 
15904
        return this.equals((refundPayment_result)that);
-
 
15905
      return false;
-
 
15906
    }
-
 
15907
 
-
 
15908
    public boolean equals(refundPayment_result that) {
-
 
15909
      if (that == null)
-
 
15910
        return false;
-
 
15911
 
-
 
15912
      boolean this_present_success = true;
-
 
15913
      boolean that_present_success = true;
-
 
15914
      if (this_present_success || that_present_success) {
-
 
15915
        if (!(this_present_success && that_present_success))
-
 
15916
          return false;
-
 
15917
        if (this.success != that.success)
-
 
15918
          return false;
-
 
15919
      }
-
 
15920
 
-
 
15921
      boolean this_present_pe = true && this.isSetPe();
-
 
15922
      boolean that_present_pe = true && that.isSetPe();
-
 
15923
      if (this_present_pe || that_present_pe) {
-
 
15924
        if (!(this_present_pe && that_present_pe))
-
 
15925
          return false;
-
 
15926
        if (!this.pe.equals(that.pe))
-
 
15927
          return false;
-
 
15928
      }
-
 
15929
 
-
 
15930
      return true;
-
 
15931
    }
-
 
15932
 
-
 
15933
    @Override
-
 
15934
    public int hashCode() {
-
 
15935
      return 0;
-
 
15936
    }
-
 
15937
 
-
 
15938
    public int compareTo(refundPayment_result other) {
-
 
15939
      if (!getClass().equals(other.getClass())) {
-
 
15940
        return getClass().getName().compareTo(other.getClass().getName());
-
 
15941
      }
-
 
15942
 
-
 
15943
      int lastComparison = 0;
-
 
15944
      refundPayment_result typedOther = (refundPayment_result)other;
-
 
15945
 
-
 
15946
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
15947
      if (lastComparison != 0) {
-
 
15948
        return lastComparison;
-
 
15949
      }
-
 
15950
      if (isSetSuccess()) {
-
 
15951
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
15952
        if (lastComparison != 0) {
-
 
15953
          return lastComparison;
-
 
15954
        }
-
 
15955
      }
-
 
15956
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
-
 
15957
      if (lastComparison != 0) {
-
 
15958
        return lastComparison;
-
 
15959
      }
-
 
15960
      if (isSetPe()) {
-
 
15961
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
-
 
15962
        if (lastComparison != 0) {
-
 
15963
          return lastComparison;
-
 
15964
        }
-
 
15965
      }
-
 
15966
      return 0;
-
 
15967
    }
-
 
15968
 
-
 
15969
    public _Fields fieldForId(int fieldId) {
-
 
15970
      return _Fields.findByThriftId(fieldId);
-
 
15971
    }
-
 
15972
 
-
 
15973
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
15974
      org.apache.thrift.protocol.TField field;
-
 
15975
      iprot.readStructBegin();
-
 
15976
      while (true)
-
 
15977
      {
-
 
15978
        field = iprot.readFieldBegin();
-
 
15979
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
15980
          break;
-
 
15981
        }
-
 
15982
        switch (field.id) {
-
 
15983
          case 0: // SUCCESS
-
 
15984
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
15985
              this.success = iprot.readBool();
-
 
15986
              setSuccessIsSet(true);
-
 
15987
            } else { 
-
 
15988
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
15989
            }
-
 
15990
            break;
-
 
15991
          case 1: // PE
-
 
15992
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
15993
              this.pe = new PaymentException();
-
 
15994
              this.pe.read(iprot);
-
 
15995
            } else { 
-
 
15996
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
15997
            }
-
 
15998
            break;
-
 
15999
          default:
-
 
16000
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
16001
        }
-
 
16002
        iprot.readFieldEnd();
-
 
16003
      }
-
 
16004
      iprot.readStructEnd();
-
 
16005
      validate();
-
 
16006
    }
-
 
16007
 
-
 
16008
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
16009
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16010
 
-
 
16011
      if (this.isSetSuccess()) {
-
 
16012
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
16013
        oprot.writeBool(this.success);
-
 
16014
        oprot.writeFieldEnd();
-
 
16015
      } else if (this.isSetPe()) {
-
 
16016
        oprot.writeFieldBegin(PE_FIELD_DESC);
-
 
16017
        this.pe.write(oprot);
-
 
16018
        oprot.writeFieldEnd();
-
 
16019
      }
-
 
16020
      oprot.writeFieldStop();
-
 
16021
      oprot.writeStructEnd();
-
 
16022
    }
-
 
16023
 
-
 
16024
    @Override
-
 
16025
    public String toString() {
-
 
16026
      StringBuilder sb = new StringBuilder("refundPayment_result(");
-
 
16027
      boolean first = true;
-
 
16028
 
-
 
16029
      sb.append("success:");
-
 
16030
      sb.append(this.success);
-
 
16031
      first = false;
15091
      if (!first) sb.append(", ");
16032
      if (!first) sb.append(", ");
15092
      sb.append("pe:");
16033
      sb.append("pe:");
15093
      if (this.pe == null) {
16034
      if (this.pe == null) {
15094
        sb.append("null");
16035
        sb.append("null");
15095
      } else {
16036
      } else {