Class PaymentMethodBuilder
- All Implemented Interfaces:
Builder<PaymentMethod>
Example to create an instance using the builder pattern
PaymentMethod paymentMethod = PaymentMethod.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.paymentMethodStatus(PaymentMethodStatus.ACTIVE)
.default(true)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIndicates if the PaymentMethod is the default.build()
builds PaymentMethod with checking for non-null required valuesbuilds PaymentMethod without checking for non-null required valuesbusinessUnit
(BusinessUnitKeyReference businessUnit) Reference to a BusinessUnit associated with the PaymentMethod.Reference to a BusinessUnit associated with the PaymentMethod.createdAt
(ZonedDateTime createdAt) Date and time (UTC) the PaymentMethod was initially created.IDs and references that created the PaymentMethod.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the PaymentMethod.custom
(CustomFields custom) Custom Fields of the PaymentMethod.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of the PaymentMethod.customer
(CustomerReference customer) Reference to a Customer associated with the PaymentMethod.Reference to a Customer associated with the PaymentMethod.Reference to a BusinessUnit associated with the PaymentMethod.Date and time (UTC) the PaymentMethod was initially created.IDs and references that created the PaymentMethod.Custom Fields of the PaymentMethod.Reference to a Customer associated with the PaymentMethod.Indicates if the PaymentMethod is the default.getId()
Unique identifier of the PaymentMethod.Account or instance of the payment interface when multiple accounts are used (per interface).getKey()
User-defined unique identifier of the PaymentMethod.Date and time (UTC) the PaymentMethod was last updated.IDs and references that last modified the PaymentMethod.Payment Method used 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.Current version of the PaymentMethod.Unique identifier of the PaymentMethod.interfaceAccount
(String interfaceAccount) Account or instance of the payment interface when multiple accounts are used (per interface).User-defined unique identifier of the PaymentMethod.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the PaymentMethod was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the PaymentMethod.IDs and references that last modified the PaymentMethod.Payment Method used for the Payment—for example, a credit card or direct debit.name
(LocalizedString name) Name of the PaymentMethod.Name of the PaymentMethod.static PaymentMethodBuilder
of()
factory method for an instance of PaymentMethodBuilderstatic PaymentMethodBuilder
of
(PaymentMethod template) create builder for PaymentMethod 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.Current version of the PaymentMethod.Reference to a BusinessUnit associated with the PaymentMethod.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the PaymentMethod.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the PaymentMethod.Reference to a Customer associated with the PaymentMethod.IDs and references that last modified the PaymentMethod.Name of the PaymentMethod.Tokenized representation of the PaymentMethod used by the payment interface.
-
Constructor Details
-
PaymentMethodBuilder
public PaymentMethodBuilder()
-
-
Method Details
-
id
Unique identifier of the PaymentMethod.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the PaymentMethod.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the PaymentMethod was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the PaymentMethod was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the PaymentMethod.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
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 PaymentMethodBuilder customer(Function<CustomerReferenceBuilder, CustomerReferenceBuilder> builder) Reference to a Customer associated with the PaymentMethod.
If
businessUnit
is set, the Customer is an Associate of the Business Unit.- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
public PaymentMethodBuilder withCustomer(Function<CustomerReferenceBuilder, CustomerReference> builder) Reference to a Customer associated with the PaymentMethod.
If
businessUnit
is set, the Customer is an Associate of the Business Unit.- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
Reference to a Customer associated with the PaymentMethod.
If
businessUnit
is set, the Customer is an Associate of the Business Unit.- Parameters:
customer
- value to be set- Returns:
- Builder
-
businessUnit
public PaymentMethodBuilder businessUnit(Function<BusinessUnitKeyReferenceBuilder, BusinessUnitKeyReferenceBuilder> builder) Reference to a BusinessUnit associated with the PaymentMethod.
Only available for B2B-enabled Projects.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
withBusinessUnit
public PaymentMethodBuilder withBusinessUnit(Function<BusinessUnitKeyReferenceBuilder, BusinessUnitKeyReference> builder) Reference to a BusinessUnit associated with the PaymentMethod.
Only available for B2B-enabled Projects.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
businessUnit
Reference to a BusinessUnit associated with the PaymentMethod.
Only available for B2B-enabled Projects.
- Parameters:
businessUnit
- value to be set- Returns:
- Builder
-
method
Payment Method used 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 PaymentMethodBuilder 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 PaymentMethodBuilder 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
Status of the PaymentMethod.
- Parameters:
paymentMethodStatus
- value to be set- Returns:
- Builder
-
_default
Indicates if the PaymentMethod is the default.
The default applies per Customer, Business Unit, or the combination of both (Associate).
- Parameters:
_default
- value to be set- Returns:
- Builder
-
custom
Custom Fields of the PaymentMethod.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields of the PaymentMethod.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the PaymentMethod.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
lastModifiedBy
public PaymentMethodBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the PaymentMethod.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public PaymentMethodBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) IDs and references that last modified the PaymentMethod.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the PaymentMethod.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the PaymentMethod.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the PaymentMethod.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the PaymentMethod.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the PaymentMethod.
- Returns:
- id
-
getVersion
Current version of the PaymentMethod.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the PaymentMethod was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the PaymentMethod was last updated.
- Returns:
- lastModifiedAt
-
getKey
User-defined unique identifier of the PaymentMethod.
- Returns:
- key
-
getName
Name of the PaymentMethod.
- Returns:
- name
-
getCustomer
Reference to a Customer associated with the PaymentMethod.
If
businessUnit
is set, the Customer is an Associate of the Business Unit.- Returns:
- customer
-
getBusinessUnit
Reference to a BusinessUnit associated with the PaymentMethod.
Only available for B2B-enabled Projects.
- Returns:
- businessUnit
-
getMethod
Payment Method used 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
Indicates if the PaymentMethod is the default.
The default applies per Customer, Business Unit, or the combination of both (Associate).
- Returns:
- default
-
getCustom
Custom Fields of the PaymentMethod.
- Returns:
- custom
-
getLastModifiedBy
IDs and references that last modified the PaymentMethod.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the PaymentMethod.
- Returns:
- createdBy
-
build
builds PaymentMethod with checking for non-null required values- Specified by:
build
in interfaceBuilder<PaymentMethod>
- Returns:
- PaymentMethod
-
buildUnchecked
builds PaymentMethod without checking for non-null required values- Returns:
- PaymentMethod
-
of
factory method for an instance of PaymentMethodBuilder- Returns:
- builder
-
of
create builder for PaymentMethod instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-