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 |
|---|---|
static CouponCollection |
all(java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Use the
list(Map) method instead.
This method will be removed in the next major version. |
static CouponCollection |
all(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Deprecated.
Use the
list(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
static CouponCollection |
all(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use the
list(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
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.
|
static Coupon |
create(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use the
create(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
DeletedCoupon |
delete()
Delete a coupon.
|
DeletedCoupon |
delete(RequestOptions options)
Delete a coupon.
|
DeletedCoupon |
delete(java.lang.String apiKey)
Deprecated.
Use the
delete(RequestOptions) method instead.
This method will be removed in the next major version. |
boolean |
equals(java.lang.Object o) |
java.lang.Long |
getAmountOff() |
java.lang.Long |
getCreated() |
java.lang.String |
getCurrency() |
java.lang.String |
getDuration() |
java.lang.Integer |
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.lang.Integer |
getPercentOff() |
java.lang.Long |
getRedeemBy() |
java.lang.Integer |
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,
RequestOptions options)
Retrieve a coupon.
|
static Coupon |
retrieve(java.lang.String id,
java.lang.String apiKey)
Deprecated.
Use the
retrieve(String, RequestOptions) method instead.
This method will be removed in the next major version. |
void |
setAmountOff(java.lang.Long amountOff) |
void |
setCreated(java.lang.Long created) |
void |
setCurrency(java.lang.String currency) |
void |
setDuration(java.lang.String duration) |
void |
setDurationInMonths(java.lang.Integer 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.lang.Integer percentOff) |
void |
setRedeemBy(java.lang.Long redeemBy) |
void |
setTimesRedeemed(java.lang.Integer 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.
|
Coupon |
update(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use the
update(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
classURL, classURL, instanceURL, instanceURL, multipartRequest, request, requestCollection, setExpandableFieldID, setStripeResponseGetter, singleClassURL, singleClassURL, subresourceURL, urlEncodeequals, getLastResponse, setLastResponse, toJson, toString@Deprecated public static CouponCollection all(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
list(Map) method instead.
This method will be removed in the next major version.@Deprecated public static CouponCollection all(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
list(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public static CouponCollection all(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
list(Map, RequestOptions) method instead.
This method will be removed in the next major version.public static Coupon create(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Coupon create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static Coupon create(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
create(Map, RequestOptions) method instead.
This method will be removed in the next major version.public DeletedCoupon delete() throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public DeletedCoupon delete(RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public DeletedCoupon delete(java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
delete(RequestOptions) method instead.
This method will be removed in the next major version.public static CouponCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static CouponCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Coupon retrieve(java.lang.String id) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Coupon retrieve(java.lang.String id, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static Coupon retrieve(java.lang.String id, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
retrieve(String, RequestOptions) method instead.
This method will be removed in the next major version.public Coupon update(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update in interface MetadataStore<Coupon>AuthenticationExceptionInvalidRequestExceptionAPIConnectionExceptionCardExceptionAPIExceptionpublic Coupon update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update in interface MetadataStore<Coupon>AuthenticationExceptionInvalidRequestExceptionAPIConnectionExceptionCardExceptionAPIException@Deprecated public Coupon update(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update(Map, RequestOptions) method instead.
This method will be removed in the next major version.public java.lang.String getObject()
public java.lang.Long getAmountOff()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.String getDuration()
public java.lang.Integer getDurationInMonths()
public java.lang.Boolean getLivemode()
public java.lang.Long getMaxRedemptions()
public java.lang.String getName()
public java.lang.Integer getPercentOff()
public java.lang.Long getRedeemBy()
public java.lang.Integer getTimesRedeemed()
public java.lang.Boolean getValid()
public 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 setDuration(java.lang.String duration)
public void setDurationInMonths(java.lang.Integer 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.lang.Integer percentOff)
public void setRedeemBy(java.lang.Long redeemBy)
public void setTimesRedeemed(java.lang.Integer timesRedeemed)
public void setValid(java.lang.Boolean valid)
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>