Package com.stripe.model
Class Discount
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.model.Discount
-
- All Implemented Interfaces:
HasId
,StripeObjectInterface
public class Discount extends StripeObject implements HasId
-
-
Field Summary
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description Discount()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.lang.String
getCheckoutSession()
The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.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 expandablecustomer
object.Customer
getCustomerObject()
Get expandedcustomer
.java.lang.Boolean
getDeleted()
Always true for a deleted object.java.lang.Long
getEnd()
If the coupon has a duration ofrepeating
, 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 itemid
(or invoice line itemid
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 expandablepromotionCode
object.PromotionCode
getPromotionCodeObject()
Get expandedpromotionCode
.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
setCheckoutSession(java.lang.String checkoutSession)
The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.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 ofrepeating
, 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 itemid
(or invoice line itemid
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.-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
getCustomer
public java.lang.String getCustomer()
Get ID of expandablecustomer
object.
-
setCustomer
public void setCustomer(java.lang.String id)
-
getCustomerObject
public Customer getCustomerObject()
Get expandedcustomer
.
-
setCustomerObject
public void setCustomerObject(Customer expandableObject)
-
getPromotionCode
public java.lang.String getPromotionCode()
Get ID of expandablepromotionCode
object.
-
setPromotionCode
public void setPromotionCode(java.lang.String id)
-
getPromotionCodeObject
public PromotionCode getPromotionCodeObject()
Get expandedpromotionCode
.
-
setPromotionCodeObject
public void setPromotionCodeObject(PromotionCode expandableObject)
-
getCheckoutSession
public java.lang.String getCheckoutSession()
The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
-
getCoupon
public Coupon getCoupon()
-
getDeleted
public java.lang.Boolean getDeleted()
Always true for a deleted object.
-
getEnd
public java.lang.Long getEnd()
If the coupon has a duration ofrepeating
, the date that this discount will end. If the coupon has a duration ofonce
orforever
, this attribute will be null.
-
getInvoice
public java.lang.String getInvoice()
The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
-
getInvoiceItem
public java.lang.String getInvoiceItem()
The invoice itemid
(or invoice line itemid
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.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
discount
.
-
getStart
public java.lang.Long getStart()
Date that the coupon was applied.
-
getSubscription
public java.lang.String getSubscription()
The subscription that this coupon is applied to, if it is applied to a particular subscription.
-
setCheckoutSession
public void setCheckoutSession(java.lang.String checkoutSession)
The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
-
setCoupon
public void setCoupon(Coupon coupon)
-
setDeleted
public void setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.
-
setEnd
public void setEnd(java.lang.Long end)
If the coupon has a duration ofrepeating
, the date that this discount will end. If the coupon has a duration ofonce
orforever
, this attribute will be null.
-
setId
public void setId(java.lang.String id)
The ID of the discount object. Discounts cannot be fetched by ID. Useexpand[]=discounts
in API calls to expand discount IDs in an array.
-
setInvoice
public 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.
-
setInvoiceItem
public void setInvoiceItem(java.lang.String invoiceItem)
The invoice itemid
(or invoice line itemid
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.
-
setObject
public void setObject(java.lang.String object)
String representing the object's type. Objects of the same type share the same value.Equal to
discount
.
-
setStart
public void setStart(java.lang.Long start)
Date that the coupon was applied.
-
setSubscription
public void setSubscription(java.lang.String subscription)
The subscription that this coupon is applied to, if it is applied to a particular subscription.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-