@Generated(value="io.sphere.sdk.annotations.processors.generators.DraftBuilderGenerator", comments="Generated from: io.sphere.sdk.payments.TransactionDraft") public final class TransactionDraftBuilder extends Base implements Builder<TransactionDraftDsl>
TransactionDraft
.Modifier and Type | Method and Description |
---|---|
TransactionDraftBuilder |
amount(javax.money.MonetaryAmount amount)
Sets the
amount property of this builder. |
TransactionDraftDsl |
build()
Creates a new instance of
TransactionDraftDsl with the values of this builder. |
TransactionDraftBuilder |
custom(CustomFields custom)
Sets the
custom property of this builder. |
javax.money.MonetaryAmount |
getAmount() |
CustomFields |
getCustom() |
String |
getInteractionId() |
TransactionState |
getState() |
ZonedDateTime |
getTimestamp() |
TransactionType |
getType() |
TransactionDraftBuilder |
interactionId(String interactionId)
Sets the
interactionId property of this builder. |
static TransactionDraftBuilder |
of(TransactionDraft template)
Creates a new object initialized with the fields of the template parameter.
|
static TransactionDraftBuilder |
of(TransactionType type,
javax.money.MonetaryAmount amount)
Creates a new object initialized with the given values.
|
static TransactionDraftBuilder |
of(TransactionType type,
javax.money.MonetaryAmount amount,
ZonedDateTime timestamp)
Creates a new object initialized with the given values.
|
TransactionDraftBuilder |
state(TransactionState state)
Sets the
state property of this builder. |
TransactionDraftBuilder |
timestamp(ZonedDateTime timestamp)
Sets the
timestamp property of this builder. |
TransactionDraftBuilder |
type(TransactionType type)
Sets the
type property of this builder. |
public TransactionDraftBuilder amount(javax.money.MonetaryAmount amount)
amount
property of this builder.amount
- the value for TransactionDraft.getAmount()
public TransactionDraftBuilder custom(@Nullable CustomFields custom)
custom
property of this builder.custom
- the value for TransactionDraft.getCustom()
public TransactionDraftBuilder interactionId(@Nullable String interactionId)
interactionId
property of this builder.interactionId
- the value for TransactionDraft.getInteractionId()
public TransactionDraftBuilder state(@Nullable TransactionState state)
state
property of this builder.state
- the value for TransactionDraft.getState()
public TransactionDraftBuilder timestamp(@Nullable ZonedDateTime timestamp)
timestamp
property of this builder.timestamp
- the value for TransactionDraft.getTimestamp()
public TransactionDraftBuilder type(TransactionType type)
type
property of this builder.type
- the value for TransactionDraft.getType()
public javax.money.MonetaryAmount getAmount()
@Nullable public CustomFields getCustom()
@Nullable public TransactionState getState()
@Nullable public ZonedDateTime getTimestamp()
public TransactionType getType()
public TransactionDraftDsl build()
TransactionDraftDsl
with the values of this builder.build
in interface Builder<TransactionDraftDsl>
public static TransactionDraftBuilder of(TransactionType type, javax.money.MonetaryAmount amount)
type
- initial value for the TransactionDraft.getType()
propertyamount
- initial value for the TransactionDraft.getAmount()
propertypublic static TransactionDraftBuilder of(TransactionType type, javax.money.MonetaryAmount amount, @Nullable ZonedDateTime timestamp)
type
- initial value for the TransactionDraft.getType()
propertyamount
- initial value for the TransactionDraft.getAmount()
propertytimestamp
- initial value for the TransactionDraft.getTimestamp()
propertypublic static TransactionDraftBuilder of(TransactionDraft template)
template
- the template