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 MyPaymentBuilderbuilder()builder factory method for MyPaymentstatic MyPaymentBuildercreate builder for MyPayment instancecopyDeep()static MyPaymentfactory method to create a deep copy of MyPayment@NotNull @Valid CentPrecisionMoneyMoney value the Payment intends to receive from the customer.Anonymous session associated with the Payment.@Valid CustomFieldsCustom Fields defined for the Payment.@Valid CustomerReferenceReference to a Customer associated with the Payment.@NotNull StringgetId()Unique identifier of the Payment.@NotNull @Valid PaymentMethodInfoInformation regarding the payment interface (for example, a PSP), and the specific payment method used.@NotNull @Valid List<Transaction>Financial transactions of the Payment.@NotNull LongCurrent version of the Payment.static MyPaymentof()factory methodstatic MyPaymentfactory method to create a shallow copy MyPaymentvoidsetAmountPlanned(CentPrecisionMoney amountPlanned) Money value the Payment intends to receive from the customer.voidsetAnonymousId(String anonymousId) Anonymous session associated with the Payment.voidsetCustom(CustomFields custom) Custom Fields defined for the Payment.voidsetCustomer(CustomerReference customer) Reference to a Customer associated with the Payment.voidUnique identifier of the Payment.voidsetPaymentMethodInfo(PaymentMethodInfo paymentMethodInfo) Information regarding the payment interface (for example, a PSP), and the specific payment method used.voidsetTransactions(Transaction... transactions) Financial transactions of the Payment.voidsetTransactions(List<Transaction> transactions) Financial transactions of the Payment.voidsetVersion(Long version) Current version of the Payment.static com.fasterxml.jackson.core.type.TypeReference<MyPayment>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithMyPayment(Function<MyPayment, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Unique identifier of the Payment.
- Specified by:
getIdin interfaceDomainResource<MyPayment>- Specified by:
getIdin interfaceIdentifiable<MyPayment>- Specified by:
getIdin interfaceVersioned<MyPayment>- Returns:
- id
-
getVersion
Current version of the Payment.
- Specified by:
getVersionin interfaceDomainResource<MyPayment>- Specified by:
getVersionin interfaceVersioned<MyPayment>- Returns:
- version
-
getCustomer
Reference to a Customer associated with the Payment. Set automatically with a password flow token. Either
customeroranonymousIdis present.- Returns:
- customer
-
getAnonymousId
String getAnonymousId()Anonymous session associated with the Payment. Set automatically with a token for an anonymous session. Either
customeroranonymousIdis 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:
getCustomin 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
customeroranonymousIdis present.- Parameters:
customer- value to be set
-
setAnonymousId
Anonymous session associated with the Payment. Set automatically with a token for an anonymous session. Either
customeroranonymousIdis 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:
setCustomin 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
-
copyDeep
MyPayment copyDeep() -
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
-