Class PaymentDraftBuilder
- All Implemented Interfaces:
Builder<PaymentDraft>
Example to create an instance using the builder pattern
PaymentDraft paymentDraft = PaymentDraft.builder()
.amountPlanned(amountPlannedBuilder -> amountPlannedBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRepresents information exchange with the payment service, for example, a PSP.Financial transactions of the Payment.amountPlanned
(Money amountPlanned) Money value the Payment intends to receive from the customer.amountPlanned
(Function<MoneyBuilder, MoneyBuilder> builder) Money value the Payment intends to receive from the customer.anonymousId
(String anonymousId) Anonymous session associated with the Payment.build()
builds PaymentDraft with checking for non-null required valuesbuilds PaymentDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the Payment.Custom Fields for the Payment.customer
(CustomerResourceIdentifier customer) Reference to a Customer associated with the Payment.Reference to a Customer associated with the Payment.Money value the Payment intends to receive from the customer.Anonymous session associated with the Payment.Custom Fields for the Payment.Reference to a Customer associated with the Payment.Identifier used by the payment service that processes the Payment (for example, a PSP).Represents information exchange with the payment service, for example, a PSP.getKey()
User-defined unique identifier for the Payment.Information regarding the payment interface (for example, a PSP), and the specific payment method used.Current status of the Payment.Financial transactions of the Payment.interfaceId
(String interfaceId) Identifier used by the payment service that processes the Payment (for example, a PSP).interfaceInteractions
(CustomFieldsDraft... interfaceInteractions) Represents information exchange with the payment service, for example, a PSP.interfaceInteractions
(List<CustomFieldsDraft> interfaceInteractions) Represents information exchange with the payment service, for example, a PSP.User-defined unique identifier for the Payment.static PaymentDraftBuilder
of()
factory method for an instance of PaymentDraftBuilderstatic PaymentDraftBuilder
of
(PaymentDraft template) create builder for PaymentDraft instancepaymentMethodInfo
(PaymentMethodInfo paymentMethodInfo) Information regarding the payment interface (for example, a PSP), and the specific payment method used.Information regarding the payment interface (for example, a PSP), and the specific payment method used.paymentStatus
(PaymentStatusDraft paymentStatus) Current status of the Payment.Current status of the Payment.plusInterfaceInteractions
(CustomFieldsDraft... interfaceInteractions) Represents information exchange with the payment service, for example, a PSP.Represents information exchange with the payment service, for example, a PSP.plusTransactions
(TransactionDraft... transactions) Financial transactions of the Payment.Financial transactions of the Payment.Represents information exchange with the payment service, for example, a PSP.Financial transactions of the Payment.transactions
(TransactionDraft... transactions) Financial transactions of the Payment.transactions
(List<TransactionDraft> transactions) Financial transactions of the Payment.withAmountPlanned
(Function<MoneyBuilder, Money> builder) Money value the Payment intends to receive from the customer.Custom Fields for the Payment.Reference to a Customer associated with the Payment.Represents information exchange with the payment service, for example, a PSP.Information regarding the payment interface (for example, a PSP), and the specific payment method used.Current status of the Payment.Financial transactions of the Payment.
-
Constructor Details
-
PaymentDraftBuilder
public PaymentDraftBuilder()
-
-
Method Details
-
customer
public PaymentDraftBuilder customer(Function<CustomerResourceIdentifierBuilder, CustomerResourceIdentifierBuilder> builder) Reference to a Customer associated with the Payment.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
public PaymentDraftBuilder withCustomer(Function<CustomerResourceIdentifierBuilder, CustomerResourceIdentifier> builder) Reference to a Customer associated with the Payment.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
Reference to a Customer associated with the Payment.
- Parameters:
customer
- value to be set- Returns:
- Builder
-
anonymousId
Anonymous session associated with the Payment.
- Parameters:
anonymousId
- value to be set- Returns:
- Builder
-
interfaceId
Identifier used by the payment service that processes the Payment (for example, a PSP). The combination of
interfaceId
and thepaymentInterface
field on PaymentMethodInfo must be unique. Once set, it cannot be changed.- Parameters:
interfaceId
- value to be set- Returns:
- Builder
-
amountPlanned
Money value the Payment intends to receive from the customer. The value typically matches the Cart or Order gross total.
- Parameters:
builder
- function to build the amountPlanned value- Returns:
- Builder
-
withAmountPlanned
Money value the Payment intends to receive from the customer. The value typically matches the Cart or Order gross total.
- Parameters:
builder
- function to build the amountPlanned value- Returns:
- Builder
-
amountPlanned
Money value the Payment intends to receive from the customer. The value typically matches the Cart or Order gross total.
- Parameters:
amountPlanned
- value to be set- Returns:
- Builder
-
paymentMethodInfo
public PaymentDraftBuilder paymentMethodInfo(Function<PaymentMethodInfoBuilder, PaymentMethodInfoBuilder> builder) Information regarding the payment interface (for example, a PSP), and the specific payment method used.
- Parameters:
builder
- function to build the paymentMethodInfo value- Returns:
- Builder
-
withPaymentMethodInfo
public PaymentDraftBuilder withPaymentMethodInfo(Function<PaymentMethodInfoBuilder, PaymentMethodInfo> builder) Information regarding the payment interface (for example, a PSP), and the specific payment method used.
- Parameters:
builder
- function to build the paymentMethodInfo value- Returns:
- Builder
-
paymentMethodInfo
Information regarding the payment interface (for example, a PSP), and the specific payment method used.
- Parameters:
paymentMethodInfo
- value to be set- Returns:
- Builder
-
paymentStatus
public PaymentDraftBuilder paymentStatus(Function<PaymentStatusDraftBuilder, PaymentStatusDraftBuilder> builder) Current status of the Payment.
- Parameters:
builder
- function to build the paymentStatus value- Returns:
- Builder
-
withPaymentStatus
public PaymentDraftBuilder withPaymentStatus(Function<PaymentStatusDraftBuilder, PaymentStatusDraft> builder) Current status of the Payment.
- Parameters:
builder
- function to build the paymentStatus value- Returns:
- Builder
-
paymentStatus
Current status of the Payment.
- Parameters:
paymentStatus
- value to be set- Returns:
- Builder
-
transactions
Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Parameters:
transactions
- value to be set- Returns:
- Builder
-
transactions
Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Parameters:
transactions
- value to be set- Returns:
- Builder
-
plusTransactions
Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Parameters:
transactions
- value to be set- Returns:
- Builder
-
plusTransactions
public PaymentDraftBuilder plusTransactions(Function<TransactionDraftBuilder, TransactionDraftBuilder> builder) Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Parameters:
builder
- function to build the transactions value- Returns:
- Builder
-
withTransactions
public PaymentDraftBuilder withTransactions(Function<TransactionDraftBuilder, TransactionDraftBuilder> builder) Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Parameters:
builder
- function to build the transactions value- Returns:
- Builder
-
addTransactions
public PaymentDraftBuilder addTransactions(Function<TransactionDraftBuilder, TransactionDraft> builder) Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Parameters:
builder
- function to build the transactions value- Returns:
- Builder
-
setTransactions
public PaymentDraftBuilder setTransactions(Function<TransactionDraftBuilder, TransactionDraft> builder) Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Parameters:
builder
- function to build the transactions value- Returns:
- Builder
-
interfaceInteractions
public PaymentDraftBuilder interfaceInteractions(@Nullable CustomFieldsDraft... interfaceInteractions) Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.
- Parameters:
interfaceInteractions
- value to be set- Returns:
- Builder
-
interfaceInteractions
public PaymentDraftBuilder interfaceInteractions(@Nullable List<CustomFieldsDraft> interfaceInteractions) Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.
- Parameters:
interfaceInteractions
- value to be set- Returns:
- Builder
-
plusInterfaceInteractions
public PaymentDraftBuilder plusInterfaceInteractions(@Nullable CustomFieldsDraft... interfaceInteractions) Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.
- Parameters:
interfaceInteractions
- value to be set- Returns:
- Builder
-
plusInterfaceInteractions
public PaymentDraftBuilder plusInterfaceInteractions(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.
- Parameters:
builder
- function to build the interfaceInteractions value- Returns:
- Builder
-
withInterfaceInteractions
public PaymentDraftBuilder withInterfaceInteractions(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.
- Parameters:
builder
- function to build the interfaceInteractions value- Returns:
- Builder
-
addInterfaceInteractions
public PaymentDraftBuilder addInterfaceInteractions(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.
- Parameters:
builder
- function to build the interfaceInteractions value- Returns:
- Builder
-
setInterfaceInteractions
public PaymentDraftBuilder setInterfaceInteractions(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.
- Parameters:
builder
- function to build the interfaceInteractions value- Returns:
- Builder
-
custom
public PaymentDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Payment.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields for the Payment.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Payment.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier for the Payment.
- Parameters:
key
- value to be set- Returns:
- Builder
-
getCustomer
Reference to a Customer associated with the Payment.
- Returns:
- customer
-
getAnonymousId
Anonymous session associated with the Payment.
- Returns:
- anonymousId
-
getInterfaceId
Identifier used by the payment service that processes the Payment (for example, a PSP). The combination of
interfaceId
and thepaymentInterface
field on PaymentMethodInfo must be unique. Once set, it cannot be changed.- Returns:
- interfaceId
-
getAmountPlanned
Money value the Payment intends to receive from the customer. The value typically matches the Cart or Order gross total.
- Returns:
- amountPlanned
-
getPaymentMethodInfo
Information regarding the payment interface (for example, a PSP), and the specific payment method used.
- Returns:
- paymentMethodInfo
-
getPaymentStatus
Current status of the Payment.
- Returns:
- paymentStatus
-
getTransactions
Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Returns:
- transactions
-
getInterfaceInteractions
Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.
- Returns:
- interfaceInteractions
-
getCustom
Custom Fields for the Payment.
- Returns:
- custom
-
getKey
User-defined unique identifier for the Payment.
- Returns:
- key
-
build
builds PaymentDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<PaymentDraft>
- Returns:
- PaymentDraft
-
buildUnchecked
builds PaymentDraft without checking for non-null required values- Returns:
- PaymentDraft
-
of
factory method for an instance of PaymentDraftBuilder- Returns:
- builder
-
of
create builder for PaymentDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-