コード例 #1
0
  public PosCheckSaleReqType(AttributeContainer inObj, ExtendedSoapSerializationEnvelope envelope) {

    if (inObj == null) return;

    SoapObject soapObject = (SoapObject) inObj;
    if (soapObject.hasProperty("Block1")) {
      Object j = soapObject.getProperty("Block1");
      this.Block1 = (CheckSaleReqBlock1Type) envelope.get(j, CheckSaleReqBlock1Type.class);
    }
  }
コード例 #2
0
  public CheckSaleReqBlock1Type(
      AttributeContainer inObj, ExtendedSoapSerializationEnvelope envelope) {

    if (inObj == null) return;

    SoapObject soapObject = (SoapObject) inObj;
    if (soapObject.hasProperty("CheckAction")) {
      Object obj = soapObject.getProperty("CheckAction");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.CheckAction = Enums.checkActionType.fromString(j.toString());
        }
      } else if (obj != null && obj instanceof Enums.checkActionType) {
        this.CheckAction = (Enums.checkActionType) obj;
      }
    }
    if (soapObject.hasProperty("AccountInfo")) {
      Object j = soapObject.getProperty("AccountInfo");
      this.AccountInfo = (AccountInfoType) envelope.get(j, AccountInfoType.class);
    }
    if (soapObject.hasProperty("DataEntryMode")) {
      Object obj = soapObject.getProperty("DataEntryMode");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.DataEntryMode = Enums.dataEntryModeType.fromString(j.toString());
        }
      } else if (obj != null && obj instanceof Enums.dataEntryModeType) {
        this.DataEntryMode = (Enums.dataEntryModeType) obj;
      }
    }
    if (soapObject.hasProperty("CheckType")) {
      Object obj = soapObject.getProperty("CheckType");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.CheckType = Enums.checkTypeType.fromString(j.toString());
        }
      } else if (obj != null && obj instanceof Enums.checkTypeType) {
        this.CheckType = (Enums.checkTypeType) obj;
      }
    }
    if (soapObject.hasProperty("VerifyInfo")) {
      Object j = soapObject.getProperty("VerifyInfo");
      this.VerifyInfo = (VerifyInfoType) envelope.get(j, VerifyInfoType.class);
    }
    if (soapObject.hasProperty("Amt")) {
      Object obj = soapObject.getProperty("Amt");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.Amt = new BigDecimal(j.toString());
        }
      } else if (obj != null && obj instanceof BigDecimal) {
        this.Amt = (BigDecimal) obj;
      }
    }
    if (soapObject.hasProperty("SECCode")) {
      Object obj = soapObject.getProperty("SECCode");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.SECCode = j.toString();
        }
      } else if (obj != null && obj instanceof String) {
        this.SECCode = (String) obj;
      }
    }
    if (soapObject.hasProperty("ConsumerInfo")) {
      Object j = soapObject.getProperty("ConsumerInfo");
      this.ConsumerInfo = (ConsumerInfoType) envelope.get(j, ConsumerInfoType.class);
    }
    if (soapObject.hasProperty("AdditionalTxnFields")) {
      Object j = soapObject.getProperty("AdditionalTxnFields");
      this.AdditionalTxnFields =
          (AdditionalTxnFieldsType) envelope.get(j, AdditionalTxnFieldsType.class);
    }
    if (soapObject.hasProperty("PaymentMethodKey")) {
      Object obj = soapObject.getProperty("PaymentMethodKey");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.PaymentMethodKey = j.toString();
        }
      } else if (obj != null && obj instanceof String) {
        this.PaymentMethodKey = (String) obj;
      }
    }
    if (soapObject.hasProperty("RecurringData")) {
      Object j = soapObject.getProperty("RecurringData");
      this.RecurringData = (RecurringDataType) envelope.get(j, RecurringDataType.class);
    }
    if (soapObject.hasProperty("TokenValue")) {
      Object obj = soapObject.getProperty("TokenValue");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.TokenValue = j.toString();
        }
      } else if (obj != null && obj instanceof String) {
        this.TokenValue = (String) obj;
      }
    }
  }
  public DebitReturnReqBlock1Type(
      AttributeContainer inObj, ExtendedSoapSerializationEnvelope envelope) {

    if (inObj == null) return;

    SoapObject soapObject = (SoapObject) inObj;
    if (soapObject.hasProperty("GatewayTxnId")) {
      Object obj = soapObject.getProperty("GatewayTxnId");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.GatewayTxnId = Integer.parseInt(j.toString());
        }
      } else if (obj != null && obj instanceof Integer) {
        this.GatewayTxnId = (Integer) obj;
      }
    }
    if (soapObject.hasProperty("TrackData")) {
      Object obj = soapObject.getProperty("TrackData");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.TrackData = j.toString();
        }
      } else if (obj != null && obj instanceof String) {
        this.TrackData = (String) obj;
      }
    }
    if (soapObject.hasProperty("Amt")) {
      Object obj = soapObject.getProperty("Amt");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.Amt = new BigDecimal(j.toString());
        }
      } else if (obj != null && obj instanceof BigDecimal) {
        this.Amt = (BigDecimal) obj;
      }
    }
    if (soapObject.hasProperty("PinBlock")) {
      Object obj = soapObject.getProperty("PinBlock");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.PinBlock = j.toString();
        }
      } else if (obj != null && obj instanceof String) {
        this.PinBlock = (String) obj;
      }
    }
    if (soapObject.hasProperty("TokenValue")) {
      Object obj = soapObject.getProperty("TokenValue");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.TokenValue = j.toString();
        }
      } else if (obj != null && obj instanceof String) {
        this.TokenValue = (String) obj;
      }
    }
    if (soapObject.hasProperty("CardHolderData")) {
      Object j = soapObject.getProperty("CardHolderData");
      this.CardHolderData = (CardHolderDataType) envelope.get(j, CardHolderDataType.class);
    }
    if (soapObject.hasProperty("AllowDup")) {
      Object obj = soapObject.getProperty("AllowDup");
      if (obj != null && obj.getClass().equals(SoapPrimitive.class)) {
        SoapPrimitive j = (SoapPrimitive) obj;
        if (j.toString() != null) {
          this.AllowDup = Enums.booleanType.fromString(j.toString());
        }
      } else if (obj != null && obj instanceof Enums.booleanType) {
        this.AllowDup = (Enums.booleanType) obj;
      }
    }
    if (soapObject.hasProperty("EncryptionData")) {
      Object j = soapObject.getProperty("EncryptionData");
      this.EncryptionData = (EncryptionDataType) envelope.get(j, EncryptionDataType.class);
    }
    if (soapObject.hasProperty("AdditionalTxnFields")) {
      Object j = soapObject.getProperty("AdditionalTxnFields");
      this.AdditionalTxnFields =
          (AdditionalTxnFieldsType) envelope.get(j, AdditionalTxnFieldsType.class);
    }
  }