Stripe::Discount
Inherits OpenApi::Json < OpenApi::Validatable < JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object
A discount represents the actual application of a coupon or promotion code. It contains information about when the discount began, when it will end, and what it is applied to. Related guide: Applying discounts to subscriptions
Constants
Constructors
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance methods
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null.
Custom attribute writer method checking allowed values (enum). @param [Object] _end Object to be assigned
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.
Custom attribute writer method checking allowed values (enum). @param [Object] checkout_session Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] coupon Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] customer Object to be assigned
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
The ID of the discount object. Discounts cannot be fetched by ID. Use expand[]=discounts in API calls to expand discount IDs in an array.
Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned
The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
Custom attribute writer method checking allowed values (enum). @param [Object] invoice Object to be assigned
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.
Custom attribute writer method checking allowed values (enum). @param [Object] invoice_item Object to be assigned
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] promotion_code Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] start Object to be assigned
The subscription that this coupon is applied to, if it is applied to a particular subscription.
Custom attribute writer method checking allowed values (enum). @param [Object] subscription Object to be assigned
The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
Custom attribute writer method checking allowed values (enum). @param [Object] subscription_item Object to be assigned
Check to see if the all the properties in the model are valid @return true if the model is valid