public class Coupon extends ApiResource implements MetadataStore<Coupon>, HasId
ApiResource.RequestMethod, ApiResource.RequestTypeCHARSET, GSONPRETTY_PRINT_GSON| Constructor and Description |
|---|
Coupon() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
static Coupon |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Create a coupon.
|
static Coupon |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Create a coupon.
|
Coupon |
delete()
Delete a coupon.
|
Coupon |
delete(RequestOptions options)
Delete a coupon.
|
boolean |
equals(java.lang.Object o) |
java.lang.Long |
getAmountOff() |
java.lang.Long |
getCreated() |
java.lang.String |
getCurrency() |
java.lang.Boolean |
getDeleted() |
java.lang.String |
getDuration() |
java.lang.Long |
getDurationInMonths() |
java.lang.String |
getId() |
java.lang.Boolean |
getLivemode() |
java.lang.Long |
getMaxRedemptions() |
java.util.Map<java.lang.String,java.lang.String> |
getMetadata() |
java.lang.String |
getName() |
java.lang.String |
getObject() |
java.math.BigDecimal |
getPercentOff() |
java.math.BigDecimal |
getPercentOffPrecise()
Deprecated.
Prefer using the
percentOff attribute instead. |
java.lang.Long |
getRedeemBy() |
java.lang.Long |
getTimesRedeemed() |
java.lang.Boolean |
getValid() |
int |
hashCode() |
static CouponCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
List all coupons.
|
static CouponCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
List all coupons.
|
static Coupon |
retrieve(java.lang.String id)
Retrieve a coupon.
|
static Coupon |
retrieve(java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieve a coupon.
|
static Coupon |
retrieve(java.lang.String id,
RequestOptions options)
Retrieve a coupon.
|
void |
setAmountOff(java.lang.Long amountOff) |
void |
setCreated(java.lang.Long created) |
void |
setCurrency(java.lang.String currency) |
void |
setDeleted(java.lang.Boolean deleted) |
void |
setDuration(java.lang.String duration) |
void |
setDurationInMonths(java.lang.Long durationInMonths) |
void |
setId(java.lang.String id) |
void |
setLivemode(java.lang.Boolean livemode) |
void |
setMaxRedemptions(java.lang.Long maxRedemptions) |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata) |
void |
setName(java.lang.String name) |
void |
setObject(java.lang.String object) |
void |
setPercentOff(java.math.BigDecimal percentOff) |
void |
setPercentOffPrecise(java.math.BigDecimal percentOffPrecise)
Deprecated.
Prefer using the
percentOff attribute instead. |
void |
setRedeemBy(java.lang.Long redeemBy) |
void |
setTimesRedeemed(java.lang.Long timesRedeemed) |
void |
setValid(java.lang.Boolean valid) |
Coupon |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Update a coupon.
|
Coupon |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Update a coupon.
|
classUrl, classUrl, instanceUrl, instanceUrl, multipartRequest, request, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncodeequals, getLastResponse, setLastResponse, toJson, toStringpublic static Coupon create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static Coupon create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic Coupon delete() throws StripeException
StripeExceptionpublic Coupon delete(RequestOptions options) throws StripeException
StripeExceptionpublic static CouponCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static CouponCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static Coupon retrieve(java.lang.String id) throws StripeException
StripeExceptionpublic static Coupon retrieve(java.lang.String id, RequestOptions options) throws StripeException
StripeExceptionpublic static Coupon retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic Coupon update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update in interface MetadataStore<Coupon>StripeExceptionpublic Coupon update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update in interface MetadataStore<Coupon>StripeExceptionpublic java.lang.String getObject()
public java.lang.Long getAmountOff()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.Boolean getDeleted()
public java.lang.String getDuration()
public java.lang.Long getDurationInMonths()
public java.lang.Boolean getLivemode()
public java.lang.Long getMaxRedemptions()
public java.lang.String getName()
public java.math.BigDecimal getPercentOff()
public java.lang.Long getRedeemBy()
public java.lang.Long getTimesRedeemed()
public java.lang.Boolean getValid()
@Deprecated public java.math.BigDecimal getPercentOffPrecise()
percentOff attribute instead.percent_off_precise attribute.percent_off_precise attributepublic void setId(java.lang.String id)
public void setObject(java.lang.String object)
public void setAmountOff(java.lang.Long amountOff)
public void setCreated(java.lang.Long created)
public void setCurrency(java.lang.String currency)
public void setDeleted(java.lang.Boolean deleted)
public void setDuration(java.lang.String duration)
public void setDurationInMonths(java.lang.Long durationInMonths)
public void setLivemode(java.lang.Boolean livemode)
public void setMaxRedemptions(java.lang.Long maxRedemptions)
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setName(java.lang.String name)
public void setPercentOff(java.math.BigDecimal percentOff)
public void setRedeemBy(java.lang.Long redeemBy)
public void setTimesRedeemed(java.lang.Long timesRedeemed)
public void setValid(java.lang.Boolean valid)
@Deprecated public void setPercentOffPrecise(java.math.BigDecimal percentOffPrecise)
percentOff attribute instead.percent_off_precise attribute.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata in interface MetadataStore<Coupon>