public class PromotionCodeCreateParams extends ApiRequestParams
Modifier and Type | Class and Description |
---|---|
static class |
PromotionCodeCreateParams.Builder |
static class |
PromotionCodeCreateParams.Restrictions |
ApiRequestParams.EnumParam
EXTRA_PARAMS_KEY
Modifier and Type | Method and 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.
|
toMap
public static PromotionCodeCreateParams.Builder builder()
public java.lang.Boolean getActive()
public java.lang.String getCode()
public java.lang.String getCoupon()
public java.lang.String getCustomer()
public java.util.List<java.lang.String> getExpand()
public java.lang.Long getExpiresAt()
redeems_by
, then this value cannot be after the coupon's redeems_by
.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.Long getMaxRedemptions()
max_redemptions
, then this value cannot be greater than the
coupon's max_redemptions
.public java.util.Map<java.lang.String,java.lang.String> getMetadata()
metadata
.public PromotionCodeCreateParams.Restrictions getRestrictions()