Class PaymentMethodDraftBuilder
- All Implemented Interfaces:
Builder<PaymentMethodDraft>
Example to create an instance using the builder pattern
PaymentMethodDraft paymentMethodDraft = PaymentMethodDraft.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet totrue
if the PaymentMethod should be the default.build()
builds PaymentMethodDraft with checking for non-null required valuesbuilds PaymentMethodDraft without checking for non-null required valuesbusinessUnit
(BusinessUnitResourceIdentifier businessUnit) Reference to a BusinessUnit the PaymentMethod should belong to.businessUnit
(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) Reference to a BusinessUnit the PaymentMethod should belong to.custom
(CustomFieldsDraft custom) Custom Fields for the PaymentMethod.Custom Fields for the PaymentMethod.customer
(CustomerResourceIdentifier customer) Reference to a Customer the PaymentMethod should belong to.Reference to a Customer the PaymentMethod should belong to.Reference to a BusinessUnit the PaymentMethod should belong to.Custom Fields for the PaymentMethod.Reference to a Customer the PaymentMethod should belong to.Set totrue
if the PaymentMethod should be the default.Account or instance of the payment interface when multiple accounts are used (per interface).getKey()
User-defined unique identifier for the PaymentMethod.Payment method to use for the Payment—for example, a credit card or direct debit.getName()
Name of the PaymentMethod.Payment service that processes the Payment—for example, a PSP.Status of the PaymentMethod.getToken()
Tokenized representation of the PaymentMethod used by the payment interface.interfaceAccount
(String interfaceAccount) Account or instance of the payment interface when multiple accounts are used (per interface).User-defined unique identifier for the PaymentMethod.Payment method to use for the Payment—for example, a credit card or direct debit.name
(LocalizedString name) Name of the PaymentMethod.Name of the PaymentMethod.static PaymentMethodDraftBuilder
of()
factory method for an instance of PaymentMethodDraftBuilderstatic PaymentMethodDraftBuilder
of
(PaymentMethodDraft template) create builder for PaymentMethodDraft instancepaymentInterface
(String paymentInterface) Payment service that processes the Payment—for example, a PSP.paymentMethodStatus
(PaymentMethodStatus paymentMethodStatus) Status of the PaymentMethod.token
(PaymentMethodToken token) Tokenized representation of the PaymentMethod used by the payment interface.Tokenized representation of the PaymentMethod used by the payment interface.withBusinessUnit
(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) Reference to a BusinessUnit the PaymentMethod should belong to.Custom Fields for the PaymentMethod.Reference to a Customer the PaymentMethod should belong to.Name of the PaymentMethod.Tokenized representation of the PaymentMethod used by the payment interface.
-
Constructor Details
-
PaymentMethodDraftBuilder
public PaymentMethodDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the PaymentMethod.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
public PaymentMethodDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the PaymentMethod.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the PaymentMethod.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the PaymentMethod.
- Parameters:
name
- value to be set- Returns:
- Builder
-
customer
public PaymentMethodDraftBuilder customer(Function<CustomerResourceIdentifierBuilder, CustomerResourceIdentifierBuilder> builder) Reference to a Customer the PaymentMethod should belong to.
If
businessUnit
is set, the Customer must be an Associate of the Business Unit.- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
public PaymentMethodDraftBuilder withCustomer(Function<CustomerResourceIdentifierBuilder, CustomerResourceIdentifier> builder) Reference to a Customer the PaymentMethod should belong to.
If
businessUnit
is set, the Customer must be an Associate of the Business Unit.- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
Reference to a Customer the PaymentMethod should belong to.
If
businessUnit
is set, the Customer must be an Associate of the Business Unit.- Parameters:
customer
- value to be set- Returns:
- Builder
-
businessUnit
public PaymentMethodDraftBuilder businessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) Reference to a BusinessUnit the PaymentMethod should belong to.
Only available for B2B-enabled Projects.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
withBusinessUnit
public PaymentMethodDraftBuilder withBusinessUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) Reference to a BusinessUnit the PaymentMethod should belong to.
Only available for B2B-enabled Projects.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
businessUnit
public PaymentMethodDraftBuilder businessUnit(@Nullable BusinessUnitResourceIdentifier businessUnit) Reference to a BusinessUnit the PaymentMethod should belong to.
Only available for B2B-enabled Projects.
- Parameters:
businessUnit
- value to be set- Returns:
- Builder
-
method
Payment method to use for the Payment—for example, a credit card or direct debit.
- Parameters:
method
- value to be set- Returns:
- Builder
-
paymentInterface
Payment service that processes the Payment—for example, a PSP.
- Parameters:
paymentInterface
- value to be set- Returns:
- Builder
-
interfaceAccount
Account or instance of the payment interface when multiple accounts are used (per interface).
- Parameters:
interfaceAccount
- value to be set- Returns:
- Builder
-
token
public PaymentMethodDraftBuilder token(Function<PaymentMethodTokenBuilder, PaymentMethodTokenBuilder> builder) Tokenized representation of the PaymentMethod used by the payment interface.
- Parameters:
builder
- function to build the token value- Returns:
- Builder
-
withToken
public PaymentMethodDraftBuilder withToken(Function<PaymentMethodTokenBuilder, PaymentMethodToken> builder) Tokenized representation of the PaymentMethod used by the payment interface.
- Parameters:
builder
- function to build the token value- Returns:
- Builder
-
token
Tokenized representation of the PaymentMethod used by the payment interface.
- Parameters:
token
- value to be set- Returns:
- Builder
-
paymentMethodStatus
public PaymentMethodDraftBuilder paymentMethodStatus(@Nullable PaymentMethodStatus paymentMethodStatus) Status of the PaymentMethod.
- Parameters:
paymentMethodStatus
- value to be set- Returns:
- Builder
-
_default
Set to
true
if the PaymentMethod should be the default.The default applies per Customer, Business Unit, or the combination of both (Associate).
- Parameters:
_default
- value to be set- Returns:
- Builder
-
custom
public PaymentMethodDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the PaymentMethod.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public PaymentMethodDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the PaymentMethod.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the PaymentMethod.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier for the PaymentMethod.
- Returns:
- key
-
getName
Name of the PaymentMethod.
- Returns:
- name
-
getCustomer
Reference to a Customer the PaymentMethod should belong to.
If
businessUnit
is set, the Customer must be an Associate of the Business Unit.- Returns:
- customer
-
getBusinessUnit
Reference to a BusinessUnit the PaymentMethod should belong to.
Only available for B2B-enabled Projects.
- Returns:
- businessUnit
-
getMethod
Payment method to use for the Payment—for example, a credit card or direct debit.
- Returns:
- method
-
getPaymentInterface
Payment service that processes the Payment—for example, a PSP.
- Returns:
- paymentInterface
-
getInterfaceAccount
Account or instance of the payment interface when multiple accounts are used (per interface).
- Returns:
- interfaceAccount
-
getToken
Tokenized representation of the PaymentMethod used by the payment interface.
- Returns:
- token
-
getPaymentMethodStatus
Status of the PaymentMethod.
- Returns:
- paymentMethodStatus
-
getDefault
Set to
true
if the PaymentMethod should be the default.The default applies per Customer, Business Unit, or the combination of both (Associate).
- Returns:
- default
-
getCustom
Custom Fields for the PaymentMethod.
- Returns:
- custom
-
build
builds PaymentMethodDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<PaymentMethodDraft>
- Returns:
- PaymentMethodDraft
-
buildUnchecked
builds PaymentMethodDraft without checking for non-null required values- Returns:
- PaymentMethodDraft
-
of
factory method for an instance of PaymentMethodDraftBuilder- Returns:
- builder
-
of
create builder for PaymentMethodDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-