Interface PaymentDraft
- All Superinterfaces:
CustomizableDraft<PaymentDraft>,Draft<PaymentDraft>,PaymentDraftMixin,WithKey
Example to create an instance using the builder pattern
PaymentDraft paymentDraft = PaymentDraft.builder()
.amountPlanned(amountPlannedBuilder -> amountPlannedBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic PaymentDraftBuilderbuilder()builder factory method for PaymentDraftstatic PaymentDraftBuilderbuilder(PaymentDraft template) create builder for PaymentDraft instancecopyDeep()static PaymentDraftdeepCopy(PaymentDraft template) factory method to create a deep copy of PaymentDraft@NotNull @Valid MoneyMoney value the Payment intends to receive from the customer.Anonymous session associated with the Payment.@Valid CustomFieldsDraftCustom Fields for the Payment.@Valid CustomerResourceIdentifierReference to a Customer associated with the Payment.Identifier used by the payment service that processes the Payment (for example, a PSP).@Valid List<CustomFieldsDraft>Represents information exchange with the payment service, for example, a PSP.getKey()User-defined unique identifier for the Payment.@Valid PaymentMethodInfoDraftInformation regarding the payment interface (for example, a PSP), and the specific payment method used.@Valid PaymentStatusDraftCurrent status of the Payment.@Valid List<TransactionDraft>Financial transactions of the Payment.static PaymentDraftof()factory methodstatic PaymentDraftof(PaymentDraft template) factory method to create a shallow copy PaymentDraftvoidsetAmountPlanned(Money amountPlanned) Money value the Payment intends to receive from the customer.voidsetAnonymousId(String anonymousId) Anonymous session associated with the Payment.voidsetCustom(CustomFieldsDraft custom) Custom Fields for the Payment.voidsetCustomer(CustomerResourceIdentifier customer) Reference to a Customer associated with the Payment.voidsetInterfaceId(String interfaceId) Identifier used by the payment service that processes the Payment (for example, a PSP).voidsetInterfaceInteractions(CustomFieldsDraft... interfaceInteractions) Represents information exchange with the payment service, for example, a PSP.voidsetInterfaceInteractions(List<CustomFieldsDraft> interfaceInteractions) Represents information exchange with the payment service, for example, a PSP.voidUser-defined unique identifier for the Payment.voidsetPaymentMethodInfo(PaymentMethodInfoDraft paymentMethodInfo) Information regarding the payment interface (for example, a PSP), and the specific payment method used.voidsetPaymentStatus(PaymentStatusDraft paymentStatus) Current status of the Payment.voidsetTransactions(TransactionDraft... transactions) Financial transactions of the Payment.voidsetTransactions(List<TransactionDraft> transactions) Financial transactions of the Payment.static com.fasterxml.jackson.core.type.TypeReference<PaymentDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithPaymentDraft(Function<PaymentDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraftMethods inherited from interface com.commercetools.api.models.payment.PaymentDraftMixin
setCustom, setPaymentMethodInfo, toResourceIdentifier
-
Method Details
-
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
interfaceIdand thepaymentInterfacefield on PaymentMethodInfo must be unique. Once set, it cannot be changed.- 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:
getCustomin interfaceCustomizableDraft<PaymentDraft>- Returns:
- custom
-
getKey
String getKey()User-defined unique identifier for the Payment.
-
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
interfaceIdand thepaymentInterfacefield on PaymentMethodInfo must be unique. Once set, it cannot be changed.- 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.
- Specified by:
setPaymentMethodInfoin interfacePaymentDraftMixin- 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:
setCustomin interfaceCustomizableDraft<PaymentDraft>- Specified by:
setCustomin interfacePaymentDraftMixin- Parameters:
custom- value to be set
-
setKey
User-defined unique identifier for the Payment.
- Parameters:
key- value to be set
-
of
factory method- Returns:
- instance of PaymentDraft
-
of
factory method to create a shallow copy PaymentDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
PaymentDraft copyDeep() -
deepCopy
factory method to create a deep copy of PaymentDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for PaymentDraft- Returns:
- builder
-
builder
create builder for PaymentDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withPaymentDraft
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
-