Interface MyTransactionDraft
- All Superinterfaces:
CustomizableDraft<MyTransactionDraft>,Draft<MyTransactionDraft>
Example to create an instance using the builder pattern
MyTransactionDraft myTransactionDraft = MyTransactionDraft.builder()
.type(TransactionType.AUTHORIZATION)
.amount(amountBuilder -> amountBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic MyTransactionDraftBuilderbuilder()builder factory method for MyTransactionDraftstatic MyTransactionDraftBuilderbuilder(MyTransactionDraft template) create builder for MyTransactionDraft instancecopyDeep()static MyTransactionDraftdeepCopy(MyTransactionDraft template) factory method to create a deep copy of MyTransactionDraft@NotNull @Valid MoneyMoney value for the Transaction.@Valid CustomFieldsDraftCustom Fields of the Transaction.Identifier used by the payment service that manages the Transaction.Identifier used by the payment service that processes the Payment (for example, a PSP) in the current transaction.Date and time (UTC) the Transaction took place.@NotNull TransactionTypegetType()Type of the Transaction.static MyTransactionDraftof()factory methodstatic MyTransactionDraftof(MyTransactionDraft template) factory method to create a shallow copy MyTransactionDraftvoidMoney value for the Transaction.voidsetCustom(CustomFieldsDraft custom) Custom Fields of the Transaction.voidsetInteractionId(String interactionId) Identifier used by the payment service that manages the Transaction.voidsetInterfaceId(String interfaceId) Identifier used by the payment service that processes the Payment (for example, a PSP) in the current transaction.voidsetTimestamp(ZonedDateTime timestamp) Date and time (UTC) the Transaction took place.voidsetType(TransactionType type) Type of the Transaction.static com.fasterxml.jackson.core.type.TypeReference<MyTransactionDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithMyTransactionDraft(Function<MyTransactionDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getTimestamp
ZonedDateTime getTimestamp()Date and time (UTC) the Transaction took place.
- Returns:
- timestamp
-
getType
Type of the Transaction. Only
AuthorizationorChargeis allowed.- Returns:
- type
-
getAmount
Money value for the Transaction.
- Returns:
- amount
-
getInteractionId
String getInteractionId()Identifier used by the payment service that manages the Transaction. Can be used to correlate the Transaction to an interface interaction.
- Returns:
- interactionId
-
getCustom
Custom Fields of the Transaction.
- Specified by:
getCustomin interfaceCustomizableDraft<MyTransactionDraft>- Returns:
- custom
-
getInterfaceId
String getInterfaceId()Identifier used by the payment service that processes the Payment (for example, a PSP) in the current transaction.
- Returns:
- interfaceId
-
setTimestamp
Date and time (UTC) the Transaction took place.
- Parameters:
timestamp- value to be set
-
setType
Type of the Transaction. Only
AuthorizationorChargeis allowed.- Parameters:
type- value to be set
-
setAmount
Money value for the Transaction.
- Parameters:
amount- value to be set
-
setInteractionId
Identifier used by the payment service that manages the Transaction. Can be used to correlate the Transaction to an interface interaction.
- Parameters:
interactionId- value to be set
-
setCustom
Custom Fields of the Transaction.
- Specified by:
setCustomin interfaceCustomizableDraft<MyTransactionDraft>- Parameters:
custom- value to be set
-
setInterfaceId
Identifier used by the payment service that processes the Payment (for example, a PSP) in the current transaction.
- Parameters:
interfaceId- value to be set
-
of
factory method- Returns:
- instance of MyTransactionDraft
-
of
factory method to create a shallow copy MyTransactionDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
MyTransactionDraft copyDeep() -
deepCopy
factory method to create a deep copy of MyTransactionDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MyTransactionDraft- Returns:
- builder
-
builder
create builder for MyTransactionDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withMyTransactionDraft
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
-