Class QuoteRequestDraftBuilder
- All Implemented Interfaces:
Builder<QuoteRequestDraft>
Example to create an instance using the builder pattern
QuoteRequestDraft quoteRequestDraft = QuoteRequestDraft.builder()
.cart(cartBuilder -> cartBuilder)
.cartVersion(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds QuoteRequestDraft with checking for non-null required valuesbuilds QuoteRequestDraft without checking for non-null required valuescart
(CartResourceIdentifier cart) Cart for which a Quote is requested.Cart for which a Quote is requested.cartVersion
(Long cartVersion) Current version of the referenced Cart.Message from the Buyer included in the Quote Request.custom
(CustomFieldsDraft custom) Custom Fields to be added to the Quote Request.Custom Fields to be added to the Quote Request.getCart()
Cart for which a Quote is requested.Current version of the referenced Cart.Message from the Buyer included in the Quote Request.Custom Fields to be added to the Quote Request.getKey()
User-defined unique identifier for the QuoteRequest.Identifier for a purchase order, usually in a B2B context.getState()
State of the Quote Request.User-defined unique identifier for the QuoteRequest.static QuoteRequestDraftBuilder
of()
factory method for an instance of QuoteRequestDraftBuilderstatic QuoteRequestDraftBuilder
of
(QuoteRequestDraft template) create builder for QuoteRequestDraft instancepurchaseOrderNumber
(String purchaseOrderNumber) Identifier for a purchase order, usually in a B2B context.state
(StateReference state) State of the Quote Request.State of the Quote Request.Cart for which a Quote is requested.Custom Fields to be added to the Quote Request.withState
(Function<StateReferenceBuilder, StateReference> builder) State of the Quote Request.
-
Constructor Details
-
QuoteRequestDraftBuilder
public QuoteRequestDraftBuilder()
-
-
Method Details
-
cart
public QuoteRequestDraftBuilder cart(Function<CartResourceIdentifierBuilder, CartResourceIdentifierBuilder> builder) Cart for which a Quote is requested. Anonymous Carts, Carts with Discount Codes, and Carts with
Multiple
ShippingMode are not supported. The Cart must have ashippingAddress
defined, otherwise an InvalidOperation error is returned when creating a Quote Request.- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
withCart
public QuoteRequestDraftBuilder withCart(Function<CartResourceIdentifierBuilder, CartResourceIdentifier> builder) Cart for which a Quote is requested. Anonymous Carts, Carts with Discount Codes, and Carts with
Multiple
ShippingMode are not supported. The Cart must have ashippingAddress
defined, otherwise an InvalidOperation error is returned when creating a Quote Request.- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
cart
Cart for which a Quote is requested. Anonymous Carts, Carts with Discount Codes, and Carts with
Multiple
ShippingMode are not supported. The Cart must have ashippingAddress
defined, otherwise an InvalidOperation error is returned when creating a Quote Request.- Parameters:
cart
- value to be set- Returns:
- Builder
-
cartVersion
Current version of the referenced Cart.
- Parameters:
cartVersion
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier for the QuoteRequest.
- Parameters:
key
- value to be set- Returns:
- Builder
-
comment
Message from the Buyer included in the Quote Request.
- Parameters:
comment
- value to be set- Returns:
- Builder
-
custom
public QuoteRequestDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields to be added to the Quote Request.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public QuoteRequestDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields to be added to the Quote Request.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields to be added to the Quote Request.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
state
public QuoteRequestDraftBuilder state(Function<StateReferenceBuilder, StateReferenceBuilder> builder) State of the Quote Request. This reference can point to a State in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
State of the Quote Request. This reference can point to a State in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
State of the Quote Request. This reference can point to a State in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
purchaseOrderNumber
Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer.
- Parameters:
purchaseOrderNumber
- value to be set- Returns:
- Builder
-
getCart
Cart for which a Quote is requested. Anonymous Carts, Carts with Discount Codes, and Carts with
Multiple
ShippingMode are not supported. The Cart must have ashippingAddress
defined, otherwise an InvalidOperation error is returned when creating a Quote Request.- Returns:
- cart
-
getCartVersion
Current version of the referenced Cart.
- Returns:
- cartVersion
-
getKey
User-defined unique identifier for the QuoteRequest.
- Returns:
- key
-
getComment
Message from the Buyer included in the Quote Request.
- Returns:
- comment
-
getCustom
Custom Fields to be added to the Quote Request.
- Returns:
- custom
-
getState
State of the Quote Request. This reference can point to a State in a custom workflow.
- Returns:
- state
-
getPurchaseOrderNumber
Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer.
- Returns:
- purchaseOrderNumber
-
build
builds QuoteRequestDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<QuoteRequestDraft>
- Returns:
- QuoteRequestDraft
-
buildUnchecked
builds QuoteRequestDraft without checking for non-null required values- Returns:
- QuoteRequestDraft
-
of
factory method for an instance of QuoteRequestDraftBuilder- Returns:
- builder
-
of
create builder for QuoteRequestDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-