Package com.stripe.param
Class PromotionCodeCreateParams
- java.lang.Object
-
- com.stripe.net.ApiRequestParams
-
- com.stripe.param.PromotionCodeCreateParams
-
public class PromotionCodeCreateParams extends ApiRequestParams
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PromotionCodeCreateParams.Builder
static class
PromotionCodeCreateParams.Restrictions
-
Nested classes/interfaces inherited from class com.stripe.net.ApiRequestParams
ApiRequestParams.EnumParam
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiRequestParams
EXTRA_PARAMS_KEY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PromotionCodeCreateParams.Builder
builder()
java.lang.Boolean
getActive()
Whether the promotion code is currently active.java.lang.String
getCode()
The customer-facing code.java.lang.String
getCoupon()
The coupon for this promotion code.java.lang.String
getCustomer()
The customer that this promotion code can be used by.java.util.List<java.lang.String>
getExpand()
Specifies which fields in the response should be expanded.java.lang.Long
getExpiresAt()
The timestamp at which this promotion code will expire.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.Long
getMaxRedemptions()
A positive integer specifying the number of times the promotion code can be redeemed.java.util.Map<java.lang.String,java.lang.String>
getMetadata()
Set of key-value pairs that you can attach to an object.PromotionCodeCreateParams.Restrictions
getRestrictions()
Settings that restrict the redemption of the promotion code.-
Methods inherited from class com.stripe.net.ApiRequestParams
toMap
-
-
-
-
Method Detail
-
builder
public static PromotionCodeCreateParams.Builder builder()
-
getActive
public java.lang.Boolean getActive()
Whether the promotion code is currently active.
-
getCode
public java.lang.String getCode()
The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.
-
getCoupon
public java.lang.String getCoupon()
The coupon for this promotion code.
-
getCustomer
public java.lang.String getCustomer()
The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
-
getExpand
public java.util.List<java.lang.String> getExpand()
Specifies which fields in the response should be expanded.
-
getExpiresAt
public java.lang.Long getExpiresAt()
The timestamp at which this promotion code will expire. If the coupon has specified aredeems_by
, then this value cannot be after the coupon'sredeems_by
.
-
getExtraParams
public java.util.Map<java.lang.String,java.lang.Object> getExtraParams()
Map of extra parameters for custom features not available in this client library. The content in this map is not serialized under this field's@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.
-
getMaxRedemptions
public java.lang.Long getMaxRedemptions()
A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified amax_redemptions
, then this value cannot be greater than the coupon'smax_redemptions
.
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
.
-
getRestrictions
public PromotionCodeCreateParams.Restrictions getRestrictions()
Settings that restrict the redemption of the promotion code.
-
-