com.stripe.model
Class Coupon
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.APIResource
com.stripe.model.Coupon
- All Implemented Interfaces:
- MetadataStore<Coupon>
public class Coupon
- extends APIResource
- implements MetadataStore<Coupon>
|
Method Summary |
static CouponCollection |
all(Map<String,Object> params)
|
static CouponCollection |
all(Map<String,Object> params,
String apiKey)
|
static Coupon |
create(Map<String,Object> params)
|
static Coupon |
create(Map<String,Object> params,
String apiKey)
|
DeletedCoupon |
delete()
|
DeletedCoupon |
delete(String apiKey)
|
Integer |
getAmountOff()
|
String |
getCurrency()
|
String |
getDuration()
|
Integer |
getDurationInMonths()
|
String |
getId()
|
Boolean |
getLivemode()
|
Long |
getMaxRedemptions()
|
Map<String,String> |
getMetadata()
|
Integer |
getPercentOff()
|
Long |
getRedeemBy()
|
Integer |
getTimesRedeemed()
|
Boolean |
getValid()
|
static Coupon |
retrieve(String id)
|
static Coupon |
retrieve(String id,
String apiKey)
|
void |
setAmountOff(Integer amountOff)
|
void |
setCurrency(String currency)
|
void |
setDuration(String duration)
|
void |
setDurationInMonths(Integer durationInMonths)
|
void |
setId(String id)
|
void |
setLivemode(Boolean livemode)
|
void |
setMaxRedemptions(Long maxRedemptions)
|
void |
setMetadata(Map<String,String> metadata)
|
void |
setPercentOff(Integer percentOff)
|
void |
setRedeemBy(Long redeemBy)
|
void |
setTimesRedeemed(Integer timesRedeemed)
|
void |
setValid(Boolean valid)
|
Coupon |
update(Map<String,Object> params)
|
Coupon |
update(Map<String,Object> params,
String apiKey)
|
Coupon
public Coupon()
getMetadata
public Map<String,String> getMetadata()
- Specified by:
getMetadata in interface MetadataStore<Coupon>
setMetadata
public void setMetadata(Map<String,String> metadata)
- Specified by:
setMetadata in interface MetadataStore<Coupon>
create
public static Coupon create(Map<String,Object> params)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
retrieve
public static Coupon retrieve(String id)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
update
public Coupon update(Map<String,Object> params)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Specified by:
update in interface MetadataStore<Coupon>
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
update
public Coupon update(Map<String,Object> params,
String apiKey)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Specified by:
update in interface MetadataStore<Coupon>
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
all
public static CouponCollection all(Map<String,Object> params)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
delete
public DeletedCoupon delete()
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
create
public static Coupon create(Map<String,Object> params,
String apiKey)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
retrieve
public static Coupon retrieve(String id,
String apiKey)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
all
public static CouponCollection all(Map<String,Object> params,
String apiKey)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
delete
public DeletedCoupon delete(String apiKey)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
- Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
getPercentOff
public Integer getPercentOff()
setPercentOff
public void setPercentOff(Integer percentOff)
getAmountOff
public Integer getAmountOff()
setAmountOff
public void setAmountOff(Integer amountOff)
getCurrency
public String getCurrency()
setCurrency
public void setCurrency(String currency)
getDuration
public String getDuration()
setDuration
public void setDuration(String duration)
getId
public String getId()
setId
public void setId(String id)
getLivemode
public Boolean getLivemode()
setLivemode
public void setLivemode(Boolean livemode)
getDurationInMonths
public Integer getDurationInMonths()
setDurationInMonths
public void setDurationInMonths(Integer durationInMonths)
getMaxRedemptions
public Long getMaxRedemptions()
setMaxRedemptions
public void setMaxRedemptions(Long maxRedemptions)
getRedeemBy
public Long getRedeemBy()
setRedeemBy
public void setRedeemBy(Long redeemBy)
getTimesRedeemed
public Integer getTimesRedeemed()
setTimesRedeemed
public void setTimesRedeemed(Integer timesRedeemed)
getValid
public Boolean getValid()
setValid
public void setValid(Boolean valid)
Copyright © 2014 Stripe. All rights reserved.