Interface MyPayment
- All Superinterfaces:
Customizable<MyPayment>
,DomainResource<MyPayment>
,Identifiable<MyPayment>
,Versioned<MyPayment>
Example to create an instance using the builder pattern
MyPayment myPayment = MyPayment.builder()
.id("{id}")
.version(0.3)
.amountPlanned(amountPlannedBuilder -> amountPlannedBuilder)
.paymentMethodInfo(paymentMethodInfoBuilder -> paymentMethodInfoBuilder)
.plusTransactions(transactionsBuilder -> transactionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic MyPaymentBuilder
builder()
builder factory method for MyPaymentstatic MyPaymentBuilder
create builder for MyPayment instancestatic MyPayment
factory method to create a deep copy of MyPayment@NotNull @Valid CentPrecisionMoney
Money value the Payment intends to receive from the customer.Anonymous session associated with the Payment.@Valid CustomFields
Custom Fields defined for the Payment.@Valid CustomerReference
Reference to a Customer associated with the Payment.@NotNull String
getId()
Unique identifier of the Payment.@NotNull @Valid PaymentMethodInfo
Information regarding the payment interface (for example, a PSP), and the specific payment method used.@NotNull @Valid List<Transaction>
Financial transactions of the Payment.@NotNull Long
Current version of the Payment.static MyPayment
of()
factory methodstatic MyPayment
factory method to create a shallow copy MyPaymentvoid
setAmountPlanned
(CentPrecisionMoney amountPlanned) Money value the Payment intends to receive from the customer.void
setAnonymousId
(String anonymousId) Anonymous session associated with the Payment.void
setCustom
(CustomFields custom) Custom Fields defined for the Payment.void
setCustomer
(CustomerReference customer) Reference to a Customer associated with the Payment.void
Unique identifier of the Payment.void
setPaymentMethodInfo
(PaymentMethodInfo paymentMethodInfo) Information regarding the payment interface (for example, a PSP), and the specific payment method used.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<MyPayment>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withMyPayment
(Function<MyPayment, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Unique identifier of the Payment.
- Specified by:
getId
in interfaceDomainResource<MyPayment>
- Specified by:
getId
in interfaceIdentifiable<MyPayment>
- Specified by:
getId
in interfaceVersioned<MyPayment>
- Returns:
- id
-
getVersion
Current version of the Payment.
- Specified by:
getVersion
in interfaceDomainResource<MyPayment>
- Specified by:
getVersion
in interfaceVersioned<MyPayment>
- Returns:
- version
-
getCustomer
Reference to a Customer associated with the Payment. Set automatically with a password flow token. Either
customer
oranonymousId
is present.- Returns:
- customer
-
getAnonymousId
String getAnonymousId()Anonymous session associated with the Payment. Set automatically with a token for an anonymous session. Either
customer
oranonymousId
is present.- Returns:
- anonymousId
-
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
-
getTransactions
Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.
- Returns:
- transactions
-
getCustom
Custom Fields defined for the Payment.
- Specified by:
getCustom
in interfaceCustomizable<MyPayment>
- Returns:
- custom
-
setId
Unique identifier of the Payment.
- Parameters:
id
- value to be set
-
setVersion
Current version of the Payment.
- Parameters:
version
- value to be set
-
setCustomer
Reference to a Customer associated with the Payment. Set automatically with a password flow token. Either
customer
oranonymousId
is present.- Parameters:
customer
- value to be set
-
setAnonymousId
Anonymous session associated with the Payment. Set automatically with a token for an anonymous session. Either
customer
oranonymousId
is present.- Parameters:
anonymousId
- 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
-
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
-
setCustom
Custom Fields defined for the Payment.
- Specified by:
setCustom
in interfaceCustomizable<MyPayment>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of MyPayment
-
of
factory method to create a shallow copy MyPayment- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of MyPayment- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MyPayment- Returns:
- builder
-
builder
create builder for MyPayment instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMyPayment
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
-