Interface Payment
- All Superinterfaces:
BaseResource
,Customizable<Payment>
,DomainResource<Payment>
,Identifiable<Payment>
,PaymentMixin
,Referencable<Payment>
,ResourceIdentifiable<Payment>
,Versioned<Payment>
,WithKey
Example to create an instance using the builder pattern
Payment payment = Payment.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.amountPlanned(amountPlannedBuilder -> amountPlannedBuilder)
.paymentMethodInfo(paymentMethodInfoBuilder -> paymentMethodInfoBuilder)
.paymentStatus(paymentStatusBuilder -> paymentStatusBuilder)
.plusTransactions(transactionsBuilder -> transactionsBuilder)
.plusInterfaceInteractions(interfaceInteractionsBuilder -> interfaceInteractionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic PaymentBuilder
builder()
builder factory method for Paymentstatic PaymentBuilder
create builder for Payment instancestatic Payment
factory method to create a deep copy of Payment@NotNull @Valid CentPrecisionMoney
Money value the Payment intends to receive from the customer.Anonymous session associated with the Payment.@NotNull ZonedDateTime
Date and time (UTC) the Payment was initially created.@Valid CreatedBy
IDs and references that created the Payment.@Valid CustomFields
Custom Fields for the Payment.@Valid CustomerReference
Reference to a Customer associated with the Payment.@NotNull String
getId()
Unique identifier of the Payment.Identifier used by the payment service that processes the Payment (for example, a PSP).@NotNull @Valid List<CustomFields>
Represents information exchange with the payment service, for example, a PSP.getKey()
User-defined unique identifier of the Payment.@NotNull ZonedDateTime
Date and time (UTC) the Payment was last updated.@Valid LastModifiedBy
IDs and references that last modified the Payment.@NotNull @Valid PaymentMethodInfo
Information regarding the payment interface (for example, a PSP), and the specific payment method used.@NotNull @Valid PaymentStatus
Current status of the Payment.@NotNull @Valid List<Transaction>
Financial transactions of the Payment.@NotNull Long
Current version of the Payment.static Payment
of()
factory methodstatic Payment
factory method to create a shallow copy Paymentstatic ReferenceTypeId
void
setAmountPlanned
(CentPrecisionMoney amountPlanned) Money value the Payment intends to receive from the customer.void
setAnonymousId
(String anonymousId) Anonymous session associated with the Payment.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Payment was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the Payment.void
setCustom
(CustomFields custom) Custom Fields for the Payment.void
setCustomer
(CustomerReference customer) Reference to a Customer associated with the Payment.void
Unique identifier of the Payment.void
setInterfaceId
(String interfaceId) Identifier used by the payment service that processes the Payment (for example, a PSP).void
setInterfaceInteractions
(CustomFields... interfaceInteractions) Represents information exchange with the payment service, for example, a PSP.void
setInterfaceInteractions
(List<CustomFields> interfaceInteractions) Represents information exchange with the payment service, for example, a PSP.void
User-defined unique identifier of the Payment.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Payment was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Payment.void
setPaymentMethodInfo
(PaymentMethodInfo paymentMethodInfo) Information regarding the payment interface (for example, a PSP), and the specific payment method used.void
setPaymentStatus
(PaymentStatus paymentStatus) Current status of the Payment.void
setTransactions
(Transaction... transactions) Financial transactions of the Payment.void
setTransactions
(List<Transaction> transactions) Financial transactions of the Payment.void
setVersion
(Long version) Current version of the Payment.static com.fasterxml.jackson.core.type.TypeReference<Payment>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withPayment
(Function<Payment, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.payment.PaymentMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the Payment.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<Payment>
- Specified by:
getId
in interfaceIdentifiable<Payment>
- Specified by:
getId
in interfaceVersioned<Payment>
- Returns:
- id
-
getVersion
Current version of the Payment.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<Payment>
- Specified by:
getVersion
in interfaceVersioned<Payment>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Payment was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Payment was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Payment.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Payment.
- Returns:
- createdBy
-
getCustomer
Reference to a Customer associated with the Payment.
- Returns:
- customer
-
getAnonymousId
String getAnonymousId()Anonymous session associated with the Payment.
- Returns:
- anonymousId
-
getInterfaceId
String 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.- 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.
- Specified by:
getCustom
in interfaceCustomizable<Payment>
- Returns:
- custom
-
getKey
String getKey()User-defined unique identifier of the Payment.
-
setId
Unique identifier of the Payment.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the Payment.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the Payment was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the Payment was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
IDs and references that last modified the Payment.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
IDs and references that created the Payment.
- Parameters:
createdBy
- value to be set
-
setCustomer
Reference to a Customer associated with the Payment.
- Parameters:
customer
- value to be set
-
setAnonymousId
Anonymous session associated with the Payment.
- Parameters:
anonymousId
- value to be set
-
setInterfaceId
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.- Parameters:
interfaceId
- value to be set
-
setAmountPlanned
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
-
setPaymentMethodInfo
Information regarding the payment interface (for example, a PSP), and the specific payment method used.
- Parameters:
paymentMethodInfo
- value to be set
-
setPaymentStatus
Current status of the Payment.
- Parameters:
paymentStatus
- value to be set
-
setTransactions
Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Parameters:
transactions
- values to be set
-
setTransactions
Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Parameters:
transactions
- values to be set
-
setInterfaceInteractions
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
- values to be set
-
setInterfaceInteractions
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
- values to be set
-
setCustom
Custom Fields for the Payment.
- Specified by:
setCustom
in interfaceCustomizable<Payment>
- Parameters:
custom
- value to be set
-
setKey
User-defined unique identifier of the Payment.
- Parameters:
key
- value to be set
-
of
factory method- Returns:
- instance of Payment
-
of
factory method to create a shallow copy Payment- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Payment- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Payment- Returns:
- builder
-
builder
create builder for Payment instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withPayment
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-