public class Discount extends StripeObject implements HasId
PRETTY_PRINT_GSON
Constructor and Description |
---|
Discount() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(java.lang.Object other) |
boolean |
equals(java.lang.Object o) |
Coupon |
getCoupon()
A coupon contains information about a percent-off or amount-off discount you might want to
apply to a customer.
|
java.lang.String |
getCustomer()
Get ID of expandable
customer object. |
Customer |
getCustomerObject()
Get expanded
customer . |
java.lang.Boolean |
getDeleted()
Always true for a deleted object.
|
java.lang.Long |
getEnd()
If the coupon has a duration of
repeating , the date that this discount will end. |
java.lang.String |
getId()
The ID of the discount object.
|
java.lang.String |
getInvoice()
The invoice that the discount's coupon was applied to, if it was applied directly to a
particular invoice.
|
java.lang.String |
getInvoiceItem()
The invoice item
id (or invoice line item id for invoice line items of
type='subscription') that the discount's coupon was applied to, if it was applied directly to a
particular invoice item or invoice line item. |
java.lang.String |
getObject()
String representing the object's type.
|
java.lang.String |
getPromotionCode()
Get ID of expandable
promotionCode object. |
PromotionCode |
getPromotionCodeObject()
Get expanded
promotionCode . |
java.lang.Long |
getStart()
Date that the coupon was applied.
|
java.lang.String |
getSubscription()
The subscription that this coupon is applied to, if it is applied to a particular subscription.
|
int |
hashCode() |
void |
setCoupon(Coupon coupon)
A coupon contains information about a percent-off or amount-off discount you might want to
apply to a customer.
|
void |
setCustomer(java.lang.String id) |
void |
setCustomerObject(Customer expandableObject) |
void |
setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.
|
void |
setEnd(java.lang.Long end)
If the coupon has a duration of
repeating , the date that this discount will end. |
void |
setId(java.lang.String id)
The ID of the discount object.
|
void |
setInvoice(java.lang.String invoice)
The invoice that the discount's coupon was applied to, if it was applied directly to a
particular invoice.
|
void |
setInvoiceItem(java.lang.String invoiceItem)
The invoice item
id (or invoice line item id for invoice line items of
type='subscription') that the discount's coupon was applied to, if it was applied directly to a
particular invoice item or invoice line item. |
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setPromotionCode(java.lang.String id) |
void |
setPromotionCodeObject(PromotionCode expandableObject) |
void |
setStart(java.lang.Long start)
Date that the coupon was applied.
|
void |
setSubscription(java.lang.String subscription)
The subscription that this coupon is applied to, if it is applied to a particular subscription.
|
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public java.lang.String getCustomer()
customer
object.public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
customer
.public void setCustomerObject(Customer expandableObject)
public java.lang.String getPromotionCode()
promotionCode
object.public void setPromotionCode(java.lang.String id)
public PromotionCode getPromotionCodeObject()
promotionCode
.public void setPromotionCodeObject(PromotionCode expandableObject)
public Coupon getCoupon()
public java.lang.Boolean getDeleted()
public java.lang.Long getEnd()
repeating
, the date that this discount will end. If the
coupon has a duration of once
or forever
, this attribute will be null.public java.lang.String getInvoice()
public java.lang.String getInvoiceItem()
id
(or invoice line item id
for invoice line items of
type='subscription') that the discount's coupon was applied to, if it was applied directly to a
particular invoice item or invoice line item.public java.lang.String getObject()
Equal to discount
.
public java.lang.Long getStart()
public java.lang.String getSubscription()
public void setCoupon(Coupon coupon)
public void setDeleted(java.lang.Boolean deleted)
public void setEnd(java.lang.Long end)
repeating
, the date that this discount will end. If the
coupon has a duration of once
or forever
, this attribute will be null.public void setId(java.lang.String id)
expand[]=discounts
in API calls to expand discount IDs in an array.public void setInvoice(java.lang.String invoice)
public void setInvoiceItem(java.lang.String invoiceItem)
id
(or invoice line item id
for invoice line items of
type='subscription') that the discount's coupon was applied to, if it was applied directly to a
particular invoice item or invoice line item.public void setObject(java.lang.String object)
Equal to discount
.
public void setStart(java.lang.Long start)
public void setSubscription(java.lang.String subscription)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object