Class PromotionCodeCreateParams

java.lang.Object
com.stripe.net.ApiRequestParams
com.stripe.param.PromotionCodeCreateParams

public class PromotionCodeCreateParams extends ApiRequestParams
  • Method Details

    • builder

      public static PromotionCodeCreateParams.Builder builder()
    • getActive

      public Boolean getActive()
      Whether the promotion code is currently active.
    • getCode

      public 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 String getCoupon()
      Required. The coupon for this promotion code.
    • getCustomer

      public 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 List<String> getExpand()
      Specifies which fields in the response should be expanded.
    • getExpiresAt

      public Long getExpiresAt()
      The timestamp at which this promotion code will expire. If the coupon has specified a redeems_by, then this value cannot be after the coupon's redeems_by.
    • getExtraParams

      public Map<String,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 Long getMaxRedemptions()
      A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a max_redemptions, then this value cannot be greater than the coupon's max_redemptions.
    • getMetadata

      public Map<String,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 to metadata.
    • getRestrictions

      public PromotionCodeCreateParams.Restrictions getRestrictions()
      Settings that restrict the redemption of the promotion code.