Subversion Repositories SmartDukaan

Rev

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

Rev 7330 Rev 8618
Line 178... Line 178...
178
     * code 104 is	thrown in case no payments are found for the transaction id passed. PaymentException is also
178
     * code 104 is	thrown in case no payments are found for the transaction id passed. PaymentException is also
179
     * thrown with error code 106 in case capture was not possible due to connection
179
     * thrown with error code 106 in case capture was not possible due to connection
180
     * issue.
180
     * issue.
181
     * 
181
     * 
182
     * @param merchantTxnId
182
     * @param merchantTxnId
-
 
183
     * @param isDigital
183
     */
184
     */
184
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException;
185
    public boolean capturePayment(long merchantTxnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
185
 
186
 
186
    /**
187
    /**
187
     * Refund the payment for the given merchant transaction id. It processes the last payment for the given
188
     * Refund the payment for the given merchant transaction id. It processes the last payment for the given
188
     * transaction. If refund will be failed nothing will be updated in database.
189
     * transaction. If refund will be failed nothing will be updated in database.
189
     * 
190
     * 
Line 264... Line 265...
264
 
265
 
265
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException;
266
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException;
266
 
267
 
267
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
268
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
268
 
269
 
269
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
270
    public void capturePayment(long merchantTxnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
270
 
271
 
271
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.refundPayment_call> resultHandler) throws org.apache.thrift.TException;
272
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.refundPayment_call> resultHandler) throws org.apache.thrift.TException;
272
 
273
 
273
    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;
274
    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;
274
 
275
 
Line 735... Line 736...
735
        throw result.pe;
736
        throw result.pe;
736
      }
737
      }
737
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");
738
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");
738
    }
739
    }
739
 
740
 
740
    public boolean capturePayment(long merchantTxnId) throws PaymentException, org.apache.thrift.TException
741
    public boolean capturePayment(long merchantTxnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException
741
    {
742
    {
742
      send_capturePayment(merchantTxnId);
743
      send_capturePayment(merchantTxnId, isDigital);
743
      return recv_capturePayment();
744
      return recv_capturePayment();
744
    }
745
    }
745
 
746
 
746
    public void send_capturePayment(long merchantTxnId) throws org.apache.thrift.TException
747
    public void send_capturePayment(long merchantTxnId, boolean isDigital) throws org.apache.thrift.TException
747
    {
748
    {
748
      capturePayment_args args = new capturePayment_args();
749
      capturePayment_args args = new capturePayment_args();
749
      args.setMerchantTxnId(merchantTxnId);
750
      args.setMerchantTxnId(merchantTxnId);
-
 
751
      args.setIsDigital(isDigital);
750
      sendBase("capturePayment", args);
752
      sendBase("capturePayment", args);
751
    }
753
    }
752
 
754
 
753
    public boolean recv_capturePayment() throws PaymentException, org.apache.thrift.TException
755
    public boolean recv_capturePayment() throws PaymentException, org.apache.thrift.TException
754
    {
756
    {
Line 1471... Line 1473...
1471
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1473
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1472
        return (new Client(prot)).recv_createRefund();
1474
        return (new Client(prot)).recv_createRefund();
1473
      }
1475
      }
1474
    }
1476
    }
1475
 
1477
 
1476
    public void capturePayment(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<capturePayment_call> resultHandler) throws org.apache.thrift.TException {
1478
    public void capturePayment(long merchantTxnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<capturePayment_call> resultHandler) throws org.apache.thrift.TException {
1477
      checkReady();
1479
      checkReady();
1478
      capturePayment_call method_call = new capturePayment_call(merchantTxnId, resultHandler, this, ___protocolFactory, ___transport);
1480
      capturePayment_call method_call = new capturePayment_call(merchantTxnId, isDigital, resultHandler, this, ___protocolFactory, ___transport);
1479
      this.___currentMethod = method_call;
1481
      this.___currentMethod = method_call;
1480
      ___manager.call(method_call);
1482
      ___manager.call(method_call);
1481
    }
1483
    }
1482
 
1484
 
1483
    public static class capturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1485
    public static class capturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1484
      private long merchantTxnId;
1486
      private long merchantTxnId;
-
 
1487
      private boolean isDigital;
1485
      public capturePayment_call(long merchantTxnId, org.apache.thrift.async.AsyncMethodCallback<capturePayment_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 {
1488
      public capturePayment_call(long merchantTxnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<capturePayment_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 {
1486
        super(client, protocolFactory, transport, resultHandler, false);
1489
        super(client, protocolFactory, transport, resultHandler, false);
1487
        this.merchantTxnId = merchantTxnId;
1490
        this.merchantTxnId = merchantTxnId;
-
 
1491
        this.isDigital = isDigital;
1488
      }
1492
      }
1489
 
1493
 
1490
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1494
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1491
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("capturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1495
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("capturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1492
        capturePayment_args args = new capturePayment_args();
1496
        capturePayment_args args = new capturePayment_args();
1493
        args.setMerchantTxnId(merchantTxnId);
1497
        args.setMerchantTxnId(merchantTxnId);
-
 
1498
        args.setIsDigital(isDigital);
1494
        args.write(prot);
1499
        args.write(prot);
1495
        prot.writeMessageEnd();
1500
        prot.writeMessageEnd();
1496
      }
1501
      }
1497
 
1502
 
1498
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1503
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
Line 2020... Line 2025...
2020
      }
2025
      }
2021
 
2026
 
2022
      protected capturePayment_result getResult(I iface, capturePayment_args args) throws org.apache.thrift.TException {
2027
      protected capturePayment_result getResult(I iface, capturePayment_args args) throws org.apache.thrift.TException {
2023
        capturePayment_result result = new capturePayment_result();
2028
        capturePayment_result result = new capturePayment_result();
2024
        try {
2029
        try {
2025
          result.success = iface.capturePayment(args.merchantTxnId);
2030
          result.success = iface.capturePayment(args.merchantTxnId, args.isDigital);
2026
          result.setSuccessIsSet(true);
2031
          result.setSuccessIsSet(true);
2027
        } catch (PaymentException pe) {
2032
        } catch (PaymentException pe) {
2028
          result.pe = pe;
2033
          result.pe = pe;
2029
        }
2034
        }
2030
        return result;
2035
        return result;
Line 15353... Line 15358...
15353
 
15358
 
15354
  public static class capturePayment_args implements org.apache.thrift.TBase<capturePayment_args, capturePayment_args._Fields>, java.io.Serializable, Cloneable   {
15359
  public static class capturePayment_args implements org.apache.thrift.TBase<capturePayment_args, capturePayment_args._Fields>, java.io.Serializable, Cloneable   {
15355
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_args");
15360
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_args");
15356
 
15361
 
15357
    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);
15362
    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);
-
 
15363
    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)2);
15358
 
15364
 
15359
    private long merchantTxnId; // required
15365
    private long merchantTxnId; // required
-
 
15366
    private boolean isDigital; // required
15360
 
15367
 
15361
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15368
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15362
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15369
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15363
      MERCHANT_TXN_ID((short)1, "merchantTxnId");
15370
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
-
 
15371
      IS_DIGITAL((short)2, "isDigital");
15364
 
15372
 
15365
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15373
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15366
 
15374
 
15367
      static {
15375
      static {
15368
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15376
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 15375... Line 15383...
15375
       */
15383
       */
15376
      public static _Fields findByThriftId(int fieldId) {
15384
      public static _Fields findByThriftId(int fieldId) {
15377
        switch(fieldId) {
15385
        switch(fieldId) {
15378
          case 1: // MERCHANT_TXN_ID
15386
          case 1: // MERCHANT_TXN_ID
15379
            return MERCHANT_TXN_ID;
15387
            return MERCHANT_TXN_ID;
-
 
15388
          case 2: // IS_DIGITAL
-
 
15389
            return IS_DIGITAL;
15380
          default:
15390
          default:
15381
            return null;
15391
            return null;
15382
        }
15392
        }
15383
      }
15393
      }
15384
 
15394
 
Line 15416... Line 15426...
15416
      }
15426
      }
15417
    }
15427
    }
15418
 
15428
 
15419
    // isset id assignments
15429
    // isset id assignments
15420
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
15430
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
-
 
15431
    private static final int __ISDIGITAL_ISSET_ID = 1;
15421
    private BitSet __isset_bit_vector = new BitSet(1);
15432
    private BitSet __isset_bit_vector = new BitSet(2);
15422
 
15433
 
15423
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15434
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15424
    static {
15435
    static {
15425
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15436
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15426
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15437
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15427
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15438
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
15439
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
15440
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
15428
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15441
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15429
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_args.class, metaDataMap);
15442
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_args.class, metaDataMap);
15430
    }
15443
    }
15431
 
15444
 
15432
    public capturePayment_args() {
15445
    public capturePayment_args() {
15433
    }
15446
    }
15434
 
15447
 
15435
    public capturePayment_args(
15448
    public capturePayment_args(
15436
      long merchantTxnId)
15449
      long merchantTxnId,
-
 
15450
      boolean isDigital)
15437
    {
15451
    {
15438
      this();
15452
      this();
15439
      this.merchantTxnId = merchantTxnId;
15453
      this.merchantTxnId = merchantTxnId;
15440
      setMerchantTxnIdIsSet(true);
15454
      setMerchantTxnIdIsSet(true);
-
 
15455
      this.isDigital = isDigital;
-
 
15456
      setIsDigitalIsSet(true);
15441
    }
15457
    }
15442
 
15458
 
15443
    /**
15459
    /**
15444
     * Performs a deep copy on <i>other</i>.
15460
     * Performs a deep copy on <i>other</i>.
15445
     */
15461
     */
15446
    public capturePayment_args(capturePayment_args other) {
15462
    public capturePayment_args(capturePayment_args other) {
15447
      __isset_bit_vector.clear();
15463
      __isset_bit_vector.clear();
15448
      __isset_bit_vector.or(other.__isset_bit_vector);
15464
      __isset_bit_vector.or(other.__isset_bit_vector);
15449
      this.merchantTxnId = other.merchantTxnId;
15465
      this.merchantTxnId = other.merchantTxnId;
-
 
15466
      this.isDigital = other.isDigital;
15450
    }
15467
    }
15451
 
15468
 
15452
    public capturePayment_args deepCopy() {
15469
    public capturePayment_args deepCopy() {
15453
      return new capturePayment_args(this);
15470
      return new capturePayment_args(this);
15454
    }
15471
    }
15455
 
15472
 
15456
    @Override
15473
    @Override
15457
    public void clear() {
15474
    public void clear() {
15458
      setMerchantTxnIdIsSet(false);
15475
      setMerchantTxnIdIsSet(false);
15459
      this.merchantTxnId = 0;
15476
      this.merchantTxnId = 0;
-
 
15477
      setIsDigitalIsSet(false);
-
 
15478
      this.isDigital = false;
15460
    }
15479
    }
15461
 
15480
 
15462
    public long getMerchantTxnId() {
15481
    public long getMerchantTxnId() {
15463
      return this.merchantTxnId;
15482
      return this.merchantTxnId;
15464
    }
15483
    }
Line 15479... Line 15498...
15479
 
15498
 
15480
    public void setMerchantTxnIdIsSet(boolean value) {
15499
    public void setMerchantTxnIdIsSet(boolean value) {
15481
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
15500
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
15482
    }
15501
    }
15483
 
15502
 
-
 
15503
    public boolean isIsDigital() {
-
 
15504
      return this.isDigital;
-
 
15505
    }
-
 
15506
 
-
 
15507
    public void setIsDigital(boolean isDigital) {
-
 
15508
      this.isDigital = isDigital;
-
 
15509
      setIsDigitalIsSet(true);
-
 
15510
    }
-
 
15511
 
-
 
15512
    public void unsetIsDigital() {
-
 
15513
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
-
 
15514
    }
-
 
15515
 
-
 
15516
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
-
 
15517
    public boolean isSetIsDigital() {
-
 
15518
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
-
 
15519
    }
-
 
15520
 
-
 
15521
    public void setIsDigitalIsSet(boolean value) {
-
 
15522
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
-
 
15523
    }
-
 
15524
 
15484
    public void setFieldValue(_Fields field, Object value) {
15525
    public void setFieldValue(_Fields field, Object value) {
15485
      switch (field) {
15526
      switch (field) {
15486
      case MERCHANT_TXN_ID:
15527
      case MERCHANT_TXN_ID:
15487
        if (value == null) {
15528
        if (value == null) {
15488
          unsetMerchantTxnId();
15529
          unsetMerchantTxnId();
15489
        } else {
15530
        } else {
15490
          setMerchantTxnId((Long)value);
15531
          setMerchantTxnId((Long)value);
15491
        }
15532
        }
15492
        break;
15533
        break;
15493
 
15534
 
-
 
15535
      case IS_DIGITAL:
-
 
15536
        if (value == null) {
-
 
15537
          unsetIsDigital();
-
 
15538
        } else {
-
 
15539
          setIsDigital((Boolean)value);
-
 
15540
        }
-
 
15541
        break;
-
 
15542
 
15494
      }
15543
      }
15495
    }
15544
    }
15496
 
15545
 
15497
    public Object getFieldValue(_Fields field) {
15546
    public Object getFieldValue(_Fields field) {
15498
      switch (field) {
15547
      switch (field) {
15499
      case MERCHANT_TXN_ID:
15548
      case MERCHANT_TXN_ID:
15500
        return Long.valueOf(getMerchantTxnId());
15549
        return Long.valueOf(getMerchantTxnId());
15501
 
15550
 
-
 
15551
      case IS_DIGITAL:
-
 
15552
        return Boolean.valueOf(isIsDigital());
-
 
15553
 
15502
      }
15554
      }
15503
      throw new IllegalStateException();
15555
      throw new IllegalStateException();
15504
    }
15556
    }
15505
 
15557
 
15506
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15558
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 15510... Line 15562...
15510
      }
15562
      }
15511
 
15563
 
15512
      switch (field) {
15564
      switch (field) {
15513
      case MERCHANT_TXN_ID:
15565
      case MERCHANT_TXN_ID:
15514
        return isSetMerchantTxnId();
15566
        return isSetMerchantTxnId();
-
 
15567
      case IS_DIGITAL:
-
 
15568
        return isSetIsDigital();
15515
      }
15569
      }
15516
      throw new IllegalStateException();
15570
      throw new IllegalStateException();
15517
    }
15571
    }
15518
 
15572
 
15519
    @Override
15573
    @Override
Line 15536... Line 15590...
15536
          return false;
15590
          return false;
15537
        if (this.merchantTxnId != that.merchantTxnId)
15591
        if (this.merchantTxnId != that.merchantTxnId)
15538
          return false;
15592
          return false;
15539
      }
15593
      }
15540
 
15594
 
-
 
15595
      boolean this_present_isDigital = true;
-
 
15596
      boolean that_present_isDigital = true;
-
 
15597
      if (this_present_isDigital || that_present_isDigital) {
-
 
15598
        if (!(this_present_isDigital && that_present_isDigital))
-
 
15599
          return false;
-
 
15600
        if (this.isDigital != that.isDigital)
-
 
15601
          return false;
-
 
15602
      }
-
 
15603
 
15541
      return true;
15604
      return true;
15542
    }
15605
    }
15543
 
15606
 
15544
    @Override
15607
    @Override
15545
    public int hashCode() {
15608
    public int hashCode() {
Line 15562... Line 15625...
15562
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
15625
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
15563
        if (lastComparison != 0) {
15626
        if (lastComparison != 0) {
15564
          return lastComparison;
15627
          return lastComparison;
15565
        }
15628
        }
15566
      }
15629
      }
-
 
15630
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
-
 
15631
      if (lastComparison != 0) {
-
 
15632
        return lastComparison;
-
 
15633
      }
-
 
15634
      if (isSetIsDigital()) {
-
 
15635
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
-
 
15636
        if (lastComparison != 0) {
-
 
15637
          return lastComparison;
-
 
15638
        }
-
 
15639
      }
15567
      return 0;
15640
      return 0;
15568
    }
15641
    }
15569
 
15642
 
15570
    public _Fields fieldForId(int fieldId) {
15643
    public _Fields fieldForId(int fieldId) {
15571
      return _Fields.findByThriftId(fieldId);
15644
      return _Fields.findByThriftId(fieldId);
Line 15587... Line 15660...
15587
              setMerchantTxnIdIsSet(true);
15660
              setMerchantTxnIdIsSet(true);
15588
            } else { 
15661
            } else { 
15589
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15662
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15590
            }
15663
            }
15591
            break;
15664
            break;
-
 
15665
          case 2: // IS_DIGITAL
-
 
15666
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
15667
              this.isDigital = iprot.readBool();
-
 
15668
              setIsDigitalIsSet(true);
-
 
15669
            } else { 
-
 
15670
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
15671
            }
-
 
15672
            break;
15592
          default:
15673
          default:
15593
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15674
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15594
        }
15675
        }
15595
        iprot.readFieldEnd();
15676
        iprot.readFieldEnd();
15596
      }
15677
      }
Line 15603... Line 15684...
15603
 
15684
 
15604
      oprot.writeStructBegin(STRUCT_DESC);
15685
      oprot.writeStructBegin(STRUCT_DESC);
15605
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
15686
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
15606
      oprot.writeI64(this.merchantTxnId);
15687
      oprot.writeI64(this.merchantTxnId);
15607
      oprot.writeFieldEnd();
15688
      oprot.writeFieldEnd();
-
 
15689
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
-
 
15690
      oprot.writeBool(this.isDigital);
-
 
15691
      oprot.writeFieldEnd();
15608
      oprot.writeFieldStop();
15692
      oprot.writeFieldStop();
15609
      oprot.writeStructEnd();
15693
      oprot.writeStructEnd();
15610
    }
15694
    }
15611
 
15695
 
15612
    @Override
15696
    @Override
Line 15615... Line 15699...
15615
      boolean first = true;
15699
      boolean first = true;
15616
 
15700
 
15617
      sb.append("merchantTxnId:");
15701
      sb.append("merchantTxnId:");
15618
      sb.append(this.merchantTxnId);
15702
      sb.append(this.merchantTxnId);
15619
      first = false;
15703
      first = false;
-
 
15704
      if (!first) sb.append(", ");
-
 
15705
      sb.append("isDigital:");
-
 
15706
      sb.append(this.isDigital);
-
 
15707
      first = false;
15620
      sb.append(")");
15708
      sb.append(")");
15621
      return sb.toString();
15709
      return sb.toString();
15622
    }
15710
    }
15623
 
15711
 
15624
    public void validate() throws org.apache.thrift.TException {
15712
    public void validate() throws org.apache.thrift.TException {
Line 17487... Line 17575...
17487
      }
17575
      }
17488
    }
17576
    }
17489
 
17577
 
17490
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17578
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17491
      try {
17579
      try {
17492
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
17493
        __isset_bit_vector = new BitSet(1);
-
 
17494
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17580
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17495
      } catch (org.apache.thrift.TException te) {
17581
      } catch (org.apache.thrift.TException te) {
17496
        throw new java.io.IOException(te);
17582
        throw new java.io.IOException(te);
17497
      }
17583
      }
17498
    }
17584
    }