Package com.stripe.param
Class QuoteCreateParams.Line.Action.AddDiscount.Builder
java.lang.Object
com.stripe.param.QuoteCreateParams.Line.Action.AddDiscount.Builder
- Enclosing class:
- QuoteCreateParams.Line.Action.AddDiscount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.The coupon code to redeem.setDiscount
(String discount) An ID of an existing discount for a coupon that was already redeemed.Details to determine how long the discount should be applied for.The index, starting at 0, at which to position the new discount.setPromotionCode
(String promotionCode) The promotion code to redeem.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setCoupon
The coupon code to redeem. -
setDiscount
An ID of an existing discount for a coupon that was already redeemed. -
setDiscountEnd
public QuoteCreateParams.Line.Action.AddDiscount.Builder setDiscountEnd(QuoteCreateParams.Line.Action.AddDiscount.DiscountEnd discountEnd) Details to determine how long the discount should be applied for. -
putExtraParam
Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeQuoteCreateParams.Line.Action.AddDiscount.extraParams
for the field documentation. -
putAllExtraParam
Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeQuoteCreateParams.Line.Action.AddDiscount.extraParams
for the field documentation. -
setIndex
The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of thediscounts
array. -
setPromotionCode
The promotion code to redeem.
-