/** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static TransactionDraftBuilder of(final TransactionDraft template) { return new TransactionDraftBuilder(template.getAmount(), template.getInteractionId(), template.getState(), template.getTimestamp(), template.getType()); } }
/** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static TransactionDraftDsl of(final TransactionDraft template) { return new TransactionDraftDsl(template.getAmount(), template.getInteractionId(), template.getState(), template.getTimestamp(), template.getType()); } }
/** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static PaymentDraftDsl of(final PaymentDraft template) { return new PaymentDraftDsl(template.getAmountAuthorized(), template.getAmountPaid(), template.getAmountPlanned(), template.getAmountRefunded(), template.getAnonymousId(), template.getAuthorizedUntil(), template.getCustom(), template.getCustomer(), template.getExternalId(), template.getInterfaceId(), template.getInterfaceInteractions(), template.getKey(), template.getPaymentMethodInfo(), template.getPaymentStatus(), template.getTransactions()); } }
public PaymentDraftDsl withAmountPlanned(final MonetaryAmount amountPlanned) { return newBuilder().amountPlanned(amountPlanned).build(); }
/** * Creates a new object initialized with the given values. * * @param amountPlanned initial value for the {@link PaymentDraft#getAmountPlanned()} property * @return new object initialized with the given values */ public static PaymentDraftBuilder of(final MonetaryAmount amountPlanned) { return new PaymentDraftBuilder(null, null, amountPlanned, null, null, null, null, null, null, null, null, null, null, null, null); }
/** * Creates a new builder with the values of this object. * * @return new builder */ public TransactionDraftBuilder newBuilder() { return new TransactionDraftBuilder(amount, interactionId, state, timestamp, type); }
@Override public PaymentStatus build() { return new PaymentStatusImpl(interfaceCode, interfaceText, state); } }
/** * Creates a new instance of {@code TransactionDraftDsl} with the values of this builder. * * @return the instance */ public TransactionDraftDsl build() { return new TransactionDraftDsl(amount, interactionId, state, timestamp, type); }
/** * Creates a new object initialized with the given values. * * @param amountPlanned initial value for the {@link PaymentDraft#getAmountPlanned()} property * @return new object initialized with the given values */ public static PaymentDraftDsl of(final MonetaryAmount amountPlanned) { return new PaymentDraftDsl(null, null, amountPlanned, null, null, null, null, null, null, null, null, null, null, null, null); }
@Override public PaymentMethodInfo build() { return new PaymentMethodInfoImpl(paymentInterface, method, name); }
@Override public PaymentStatus build() { return new PaymentStatus(interfaceCode, interfaceText, state); } }
@Override public PaymentDraft build() { return new PaymentDraftImpl(amountAuthorized, customer, externalId, interfaceId, amountPlanned, authorizedUntil, amountPaid, amountRefunded, paymentMethodInfo, custom, paymentStatus, transactions, interfaceInteractions); } }
@Override public TransactionDraft build() { return new TransactionDraft(timestamp, type, amount, interactionId, state); } }
/** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static PaymentDraftBuilder of(final PaymentDraft template) { return new PaymentDraftBuilder(template.getAmountAuthorized(), template.getAmountPaid(), template.getAmountPlanned(), template.getAmountRefunded(), template.getAnonymousId(), template.getAuthorizedUntil(), template.getCustom(), template.getCustomer(), template.getExternalId(), template.getInterfaceId(), template.getInterfaceInteractions(), template.getKey(), template.getPaymentMethodInfo(), template.getPaymentStatus(), template.getTransactions()); } }
/** * Creates a new builder with the values of this object. * * @return new builder */ public PaymentDraftBuilder newBuilder() { return new PaymentDraftBuilder(amountAuthorized, amountPaid, amountPlanned, amountRefunded, anonymousId, authorizedUntil, custom, customer, externalId, interfaceId, interfaceInteractions, key, paymentMethodInfo, paymentStatus, transactions); }
/** * Creates a new object initialized with the given values. * * @param type initial value for the {@link TransactionDraft#getType()} property * @param amount initial value for the {@link TransactionDraft#getAmount()} property * @return new object initialized with the given values */ public static TransactionDraftBuilder of(final TransactionType type, final MonetaryAmount amount) { return new TransactionDraftBuilder(amount, null, null, null, type); }
@Override public PaymentStatus build() { return new PaymentStatusImpl(interfaceCode, interfaceText, state); } }
/** * Creates a new object initialized with the given values. * * @param type initial value for the {@link TransactionDraft#getType()} property * @param amount initial value for the {@link TransactionDraft#getAmount()} property * @return new object initialized with the given values */ public static TransactionDraftDsl of(final TransactionType type, final MonetaryAmount amount) { return new TransactionDraftDsl(amount, null, null, null, type); }
/** * Creates a new instance of {@code PaymentDraftDsl} with the values of this builder. * * @return the instance */ public PaymentDraftDsl build() { return new PaymentDraftDsl(amountAuthorized, amountPaid, amountPlanned, amountRefunded, anonymousId, authorizedUntil, custom, customer, externalId, interfaceId, interfaceInteractions, key, paymentMethodInfo, paymentStatus, transactions); }
@Override public PaymentMethodInfo build() { return new PaymentMethodInfoImpl(paymentInterface, method, name); }