public class Coupon extends APIResource implements MetadataStore<Coupon>, HasId
APIResource.RequestMethod, APIResource.RequestType
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
Coupon() |
classURL, classURL, instanceURL, instanceURL, multipartRequest, request, requestCollection, setExpandableFieldID, setStripeResponseGetter, singleClassURL, singleClassURL, urlEncode
equals, toJson, toString
public void setId(String id)
public String getObject()
public void setObject(String object)
public Long getAmountOff()
public void setAmountOff(Long amountOff)
public Long getCreated()
public void setCreated(Long created)
public String getCurrency()
public void setCurrency(String currency)
public String getDuration()
public void setDuration(String duration)
public Integer getDurationInMonths()
public void setDurationInMonths(Integer durationInMonths)
public Boolean getLivemode()
public void setLivemode(Boolean livemode)
public Long getMaxRedemptions()
public void setMaxRedemptions(Long maxRedemptions)
public Map<String,String> getMetadata()
getMetadata
in interface MetadataStore<Coupon>
public Integer getPercentOff()
public void setPercentOff(Integer percentOff)
public Long getRedeemBy()
public void setRedeemBy(Long redeemBy)
public Integer getTimesRedeemed()
public void setTimesRedeemed(Integer timesRedeemed)
public Boolean getValid()
public void setValid(Boolean valid)
public static Coupon create(Map<String,Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Coupon retrieve(String id) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public Coupon update(Map<String,Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update
in interface MetadataStore<Coupon>
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
@Deprecated public Coupon update(Map<String,Object> params, String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public Coupon update(Map<String,Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update
in interface MetadataStore<Coupon>
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
@Deprecated public static Coupon create(Map<String,Object> params, String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Coupon create(Map<String,Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static Coupon retrieve(String id, String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Coupon retrieve(String id, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static CouponCollection list(Map<String,Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static CouponCollection list(Map<String,Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static CouponCollection all(Map<String,Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static CouponCollection all(Map<String,Object> params, String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static CouponCollection all(Map<String,Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public DeletedCoupon delete() throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public DeletedCoupon delete(String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public DeletedCoupon delete(RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Copyright © 2017 Stripe. All rights reserved.