public DefaultPaymentControlContext(
     final Account account,
     final UUID paymentMethodId,
     final UUID attemptId,
     @Nullable final UUID paymentId,
     final String paymentExternalKey,
     @Nullable final UUID transactionId,
     final String transactionExternalKey,
     final PaymentApiType paymentApiType,
     final TransactionType transactionType,
     final HPPType hppType,
     final BigDecimal amount,
     final Currency currency,
     @Nullable final BigDecimal processedAmount,
     @Nullable final Currency processedCurrency,
     final boolean isApiPayment,
     final CallContext callContext) {
   super(
       callContext.getTenantId(),
       callContext.getUserName(),
       callContext.getCallOrigin(),
       callContext.getUserType(),
       callContext.getReasonCode(),
       callContext.getComments(),
       callContext.getUserToken(),
       callContext.getCreatedDate(),
       callContext.getUpdatedDate());
   this.account = account;
   this.paymentMethodId = paymentMethodId;
   this.attemptId = attemptId;
   this.paymentId = paymentId;
   this.paymentExternalKey = paymentExternalKey;
   this.transactionId = transactionId;
   this.transactionExternalKey = transactionExternalKey;
   this.paymentApiType = paymentApiType;
   this.hppType = hppType;
   this.transactionType = transactionType;
   this.amount = amount;
   this.currency = currency;
   this.processedAmount = processedAmount;
   this.processedCurrency = processedCurrency;
   this.isApiPayment = isApiPayment;
 }
示例#2
0
 @Override
 public void addTag(
     final UUID objectId,
     final ObjectType objectType,
     final UUID tagDefinitionId,
     final CallContext context)
     throws TagApiException {
   final InternalCallContext internalContext =
       internalCallContextFactory.createInternalCallContext(objectId, objectType, context);
   final TagModelDao tag =
       new TagModelDao(context.getCreatedDate(), tagDefinitionId, objectId, objectType);
   try {
     tagDao.create(tag, internalContext);
   } catch (TagApiException e) {
     // Be lenient here and make the addTag method idempotent
     if (ErrorCode.TAG_ALREADY_EXISTS.getCode() != e.getCode()) {
       throw e;
     }
   }
 }