Interface PaymentMethod
- All Superinterfaces:
BaseResource
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()
-
Method Summary
Modifier and TypeMethodDescriptionstatic PaymentMethodBuilderbuilder()builder factory method for PaymentMethodstatic PaymentMethodBuilderbuilder(PaymentMethod template) create builder for PaymentMethod instancecopyDeep()static PaymentMethoddeepCopy(PaymentMethod template) factory method to create a deep copy of PaymentMethod@Valid BusinessUnitKeyReferenceReference to a BusinessUnit associated with the PaymentMethod.@NotNull ZonedDateTimeDate and time (UTC) the PaymentMethod was initially created.@Valid CreatedByIDs and references that created the PaymentMethod.@Valid CustomFieldsCustom Fields of the PaymentMethod.@Valid CustomerReferenceReference to a Customer associated with the PaymentMethod.@NotNull BooleanIndicates if the PaymentMethod is the default.@NotNull StringgetId()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.@NotNull ZonedDateTimeDate and time (UTC) the PaymentMethod was last updated.@Valid LastModifiedByIDs and references that last modified the PaymentMethod.Payment Method used for the Payment—for example, a credit card or direct debit.@Valid LocalizedStringgetName()Name of the PaymentMethod.Payment service that processes the Payment—for example, a PSP.@NotNull PaymentMethodStatusStatus of the PaymentMethod.@Valid PaymentMethodTokengetToken()Tokenized representation of the PaymentMethod used by the payment interface.@NotNull LongCurrent version of the PaymentMethod.static PaymentMethodof()factory methodstatic PaymentMethodof(PaymentMethod template) factory method to create a shallow copy PaymentMethodvoidsetBusinessUnit(BusinessUnitKeyReference businessUnit) Reference to a BusinessUnit associated with the PaymentMethod.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the PaymentMethod was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the PaymentMethod.voidsetCustom(CustomFields custom) Custom Fields of the PaymentMethod.voidsetCustomer(CustomerReference customer) Reference to a Customer associated with the PaymentMethod.voidsetDefault(Boolean _default) Indicates if the PaymentMethod is the default.voidUnique identifier of the PaymentMethod.voidsetInterfaceAccount(String interfaceAccount) Account or instance of the payment interface when multiple accounts are used (per interface).voidUser-defined unique identifier of the PaymentMethod.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the PaymentMethod was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the PaymentMethod.voidPayment Method used for the Payment—for example, a credit card or direct debit.voidsetName(LocalizedString name) Name of the PaymentMethod.voidsetPaymentInterface(String paymentInterface) Payment service that processes the Payment—for example, a PSP.voidsetPaymentMethodStatus(PaymentMethodStatus paymentMethodStatus) Status of the PaymentMethod.voidsetToken(PaymentMethodToken token) Tokenized representation of the PaymentMethod used by the payment interface.voidsetVersion(Long version) Current version of the PaymentMethod.static com.fasterxml.jackson.core.type.TypeReference<PaymentMethod>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithPaymentMethod(Function<PaymentMethod, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
-
Method Details
-
getId
Unique identifier of the PaymentMethod.
- Specified by:
getIdin interfaceBaseResource- Returns:
- id
-
getVersion
Current version of the PaymentMethod.
- Specified by:
getVersionin interfaceBaseResource- Returns:
- version
-
getKey
String 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
businessUnitis 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
String getMethod()Payment Method used for the Payment—for example, a credit card or direct debit.
- Returns:
- method
-
getPaymentInterface
String getPaymentInterface()Payment service that processes the Payment—for example, a PSP.
- Returns:
- paymentInterface
-
getInterfaceAccount
String 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
-
getCreatedAt
Date and time (UTC) the PaymentMethod was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the PaymentMethod was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the PaymentMethod.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the PaymentMethod.
- Returns:
- createdBy
-
setId
Unique identifier of the PaymentMethod.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the PaymentMethod.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setKey
User-defined unique identifier of the PaymentMethod.
- Parameters:
key- value to be set
-
setName
Name of the PaymentMethod.
- Parameters:
name- value to be set
-
setCustomer
Reference to a Customer associated with the PaymentMethod.
If
businessUnitis set, the Customer is an Associate of the Business Unit.- Parameters:
customer- value to be set
-
setBusinessUnit
Reference to a BusinessUnit associated with the PaymentMethod.
Only available for B2B-enabled Projects.
- Parameters:
businessUnit- value to be set
-
setMethod
Payment Method used for the Payment—for example, a credit card or direct debit.
- Parameters:
method- value to be set
-
setPaymentInterface
Payment service that processes the Payment—for example, a PSP.
- Parameters:
paymentInterface- value to be set
-
setInterfaceAccount
Account or instance of the payment interface when multiple accounts are used (per interface).
- Parameters:
interfaceAccount- value to be set
-
setToken
Tokenized representation of the PaymentMethod used by the payment interface.
- Parameters:
token- value to be set
-
setPaymentMethodStatus
Status of the PaymentMethod.
- Parameters:
paymentMethodStatus- value to be set
-
setDefault
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
-
setCustom
Custom Fields of the PaymentMethod.
- Parameters:
custom- value to be set
-
setCreatedAt
Date and time (UTC) the PaymentMethod was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the PaymentMethod was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the PaymentMethod.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the PaymentMethod.
- Parameters:
createdBy- value to be set
-
of
factory method- Returns:
- instance of PaymentMethod
-
of
factory method to create a shallow copy PaymentMethod- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
PaymentMethod copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of PaymentMethod- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for PaymentMethod- Returns:
- builder
-
builder
create builder for PaymentMethod instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withPaymentMethod
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-