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 PaymentMethodBuilder
builder()
builder factory method for PaymentMethodstatic PaymentMethodBuilder
builder
(PaymentMethod template) create builder for PaymentMethod instancecopyDeep()
static PaymentMethod
deepCopy
(PaymentMethod template) factory method to create a deep copy of PaymentMethod@Valid BusinessUnitKeyReference
Reference to a BusinessUnit associated with the PaymentMethod.@NotNull ZonedDateTime
Date and time (UTC) the PaymentMethod was initially created.@Valid CreatedBy
IDs and references that created the PaymentMethod.@Valid CustomFields
Custom Fields of the PaymentMethod.@Valid CustomerReference
Reference to a Customer associated with the PaymentMethod.@NotNull Boolean
Indicates if the PaymentMethod is the default.@NotNull String
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.@NotNull ZonedDateTime
Date and time (UTC) the PaymentMethod was last updated.@Valid LastModifiedBy
IDs and references that last modified the PaymentMethod.Payment Method used for the Payment—for example, a credit card or direct debit.@Valid LocalizedString
getName()
Name of the PaymentMethod.Payment service that processes the Payment—for example, a PSP.@NotNull PaymentMethodStatus
Status of the PaymentMethod.@Valid PaymentMethodToken
getToken()
Tokenized representation of the PaymentMethod used by the payment interface.@NotNull Long
Current version of the PaymentMethod.static PaymentMethod
of()
factory methodstatic PaymentMethod
of
(PaymentMethod template) factory method to create a shallow copy PaymentMethodvoid
setBusinessUnit
(BusinessUnitKeyReference businessUnit) Reference to a BusinessUnit associated with the PaymentMethod.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the PaymentMethod was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the PaymentMethod.void
setCustom
(CustomFields custom) Custom Fields of the PaymentMethod.void
setCustomer
(CustomerReference customer) Reference to a Customer associated with the PaymentMethod.void
setDefault
(Boolean _default) Indicates if the PaymentMethod is the default.void
Unique identifier of the PaymentMethod.void
setInterfaceAccount
(String interfaceAccount) Account or instance of the payment interface when multiple accounts are used (per interface).void
User-defined unique identifier of the PaymentMethod.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the PaymentMethod was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the PaymentMethod.void
Payment Method used for the Payment—for example, a credit card or direct debit.void
setName
(LocalizedString name) Name of the PaymentMethod.void
setPaymentInterface
(String paymentInterface) Payment service that processes the Payment—for example, a PSP.void
setPaymentMethodStatus
(PaymentMethodStatus paymentMethodStatus) Status of the PaymentMethod.void
setToken
(PaymentMethodToken token) Tokenized representation of the PaymentMethod used by the payment interface.void
setVersion
(Long version) Current version of the PaymentMethod.static com.fasterxml.jackson.core.type.TypeReference<PaymentMethod>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withPaymentMethod
(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:
getId
in interfaceBaseResource
- Returns:
- id
-
getVersion
Current version of the PaymentMethod.
- Specified by:
getVersion
in 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
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
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:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the PaymentMethod was last updated.
- Specified by:
getLastModifiedAt
in 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:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the PaymentMethod.
- Specified by:
setVersion
in 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
businessUnit
is 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:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the PaymentMethod was last updated.
- Specified by:
setLastModifiedAt
in 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:
copyDeep
in 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
-