public class CouponCreateParams extends ApiRequestParams
Modifier and Type | Class and Description |
---|---|
static class |
CouponCreateParams.Builder |
static class |
CouponCreateParams.Duration |
ApiRequestParams.EnumParam
EXTRA_PARAMS_KEY
Modifier and Type | Method and Description |
---|---|
static CouponCreateParams.Builder |
builder() |
java.lang.Long |
getAmountOff()
A positive integer representing the amount to subtract from an invoice total (required if
`percent_off` is not passed).
|
java.lang.String |
getCurrency()
Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the
`amount_off` parameter (required if `amount_off` is passed).
|
CouponCreateParams.Duration |
getDuration()
Specifies how long the discount will be in effect.
|
java.lang.Long |
getDurationInMonths()
Required only if `duration` is `repeating`, in which case it must be a positive integer that
specifies the number of months the discount will be in effect.
|
java.util.List<java.lang.String> |
getExpand()
Specifies which fields in the response should be expanded.
|
java.util.Map<java.lang.String,java.lang.Object> |
getExtraParams()
Map of extra parameters for custom features not available in this client library.
|
java.lang.String |
getId()
Unique string of your choice that will be used to identify this coupon when applying it to a
customer.
|
java.lang.Long |
getMaxRedemptions()
A positive integer specifying the number of times the coupon can be redeemed before it's no
longer valid.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
A set of key-value pairs that you can attach to a coupon object.
|
java.lang.String |
getName()
Name of the coupon displayed to customers on, for instance invoices, or receipts.
|
java.math.BigDecimal |
getPercentOff()
A positive float larger than 0, and smaller or equal to 100, that represents the discount the
coupon will apply (required if `amount_off` is not passed).
|
java.lang.Long |
getRedeemBy()
Unix timestamp specifying the last time at which the coupon can be redeemed.
|
toMap
public static CouponCreateParams.Builder builder()
public java.lang.Long getAmountOff()
public java.lang.String getCurrency()
public CouponCreateParams.Duration getDuration()
public java.lang.Long getDurationInMonths()
public java.util.List<java.lang.String> getExpand()
public java.util.Map<java.lang.String,java.lang.Object> getExtraParams()
@SerializedName
value. Instead, each
key/value pair is serialized as if the key is a root-level field (serialized) name in this
param object. Effectively, this map is flattened to its parent instance.public java.lang.String getId()
public java.lang.Long getMaxRedemptions()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
public java.lang.String getName()
public java.math.BigDecimal getPercentOff()
public java.lang.Long getRedeemBy()