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 booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.StringgetCheckoutSession()The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.CoupongetCoupon()A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer.java.lang.StringgetCustomer()Get ID of expandablecustomerobject.CustomergetCustomerObject()Get expandedcustomer.java.lang.BooleangetDeleted()Always true for a deleted object.java.lang.LonggetEnd()If the coupon has a duration ofrepeating, the date that this discount will end.java.lang.StringgetId()The ID of the discount object.java.lang.StringgetInvoice()The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.java.lang.StringgetInvoiceItem()The invoice itemid(or invoice line itemidfor 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.StringgetObject()String representing the object's type.java.lang.StringgetPromotionCode()Get ID of expandablepromotionCodeobject.PromotionCodegetPromotionCodeObject()Get expandedpromotionCode.java.lang.LonggetStart()Date that the coupon was applied.java.lang.StringgetSubscription()The subscription that this coupon is applied to, if it is applied to a particular subscription.inthashCode()voidsetCheckoutSession(java.lang.String checkoutSession)The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.voidsetCoupon(Coupon coupon)A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer.voidsetCustomer(java.lang.String id)voidsetCustomerObject(Customer expandableObject)voidsetDeleted(java.lang.Boolean deleted)Always true for a deleted object.voidsetEnd(java.lang.Long end)If the coupon has a duration ofrepeating, the date that this discount will end.voidsetId(java.lang.String id)The ID of the discount object.voidsetInvoice(java.lang.String invoice)The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.voidsetInvoiceItem(java.lang.String invoiceItem)The invoice itemid(or invoice line itemidfor 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.voidsetObject(java.lang.String object)String representing the object's type.voidsetPromotionCode(java.lang.String id)voidsetPromotionCodeObject(PromotionCode expandableObject)voidsetStart(java.lang.Long start)Date that the coupon was applied.voidsetSubscription(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 expandablecustomerobject.
-
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 expandablepromotionCodeobject.
-
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 ofonceorforever, 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 itemidfor 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 ofonceorforever, 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[]=discountsin 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 itemidfor 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:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-