Package com.stripe.model
Class Discount
java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.Discount
- All Implemented Interfaces:
HasId,StripeObjectInterface
-
Field Summary
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer.Get ID of expandablecustomerobject.Get expandedcustomer.Always true for a deleted object.getEnd()If the coupon has a duration ofrepeating, the date that this discount will end.getId()The ID of the discount object.The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.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.String representing the object's type.Get ID of expandablepromotionCodeobject.Get expandedpromotionCode.getStart()Date that the coupon was applied.The subscription that this coupon is applied to, if it is applied to a particular subscription.inthashCode()voidsetCheckoutSession(String checkoutSession) The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.voidA coupon contains information about a percent-off or amount-off discount you might want to apply to a customer.voidsetCustomer(String id) voidsetCustomerObject(Customer expandableObject) voidsetDeleted(Boolean deleted) Always true for a deleted object.voidIf the coupon has a duration ofrepeating, the date that this discount will end.voidThe ID of the discount object.voidsetInvoice(String invoice) The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.voidsetInvoiceItem(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.voidString representing the object's type.voidvoidsetPromotionCodeObject(PromotionCode expandableObject) voidDate that the coupon was applied.voidsetSubscription(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
-
Constructor Details
-
Discount
public Discount()
-
-
Method Details
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
getPromotionCode
Get ID of expandablepromotionCodeobject. -
setPromotionCode
-
getPromotionCodeObject
Get expandedpromotionCode. -
setPromotionCodeObject
-
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
A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents. -
getDeleted
Always true for a deleted object. -
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
The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. -
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
String representing the object's type. Objects of the same type share the same value.Equal to
discount. -
getStart
Date that the coupon was applied. -
getSubscription
The subscription that this coupon is applied to, if it is applied to a particular subscription. -
setCheckoutSession
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
A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents. -
setDeleted
Always true for a deleted object. -
setEnd
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
The ID of the discount object. Discounts cannot be fetched by ID. Useexpand[]=discountsin API calls to expand discount IDs in an array. -
setInvoice
The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. -
setInvoiceItem
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
String representing the object's type. Objects of the same type share the same value.Equal to
discount. -
setStart
Date that the coupon was applied. -
setSubscription
The subscription that this coupon is applied to, if it is applied to a particular subscription. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
The ID of the discount object. Discounts cannot be fetched by ID. Useexpand[]=discountsin API calls to expand discount IDs in an array.
-