Stripe::Coupon
Inherits OpenApi::Json < OpenApi::Validatable < JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object
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.
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
Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer.
Custom attribute writer method checking allowed values (enum). @param [Object] amount_off Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] applies_to Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] created Object to be assigned
If amount_off has been set, the three-letter ISO code for the currency of the amount to take off.
Custom attribute writer method checking allowed values (enum). @param [Object] currency Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] currency_options Object to be assigned
One of forever, once, and repeating. Describes how long a customer who applies this coupon will get the discount.
Custom attribute writer method checking allowed values (enum). @param [Object] duration Object to be assigned
If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once.
Custom attribute writer method checking allowed values (enum). @param [Object] duration_in_months 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
Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
Custom attribute writer method checking allowed values (enum). @param [Object] livemode Object to be assigned
Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
Custom attribute writer method checking allowed values (enum). @param [Object] max_redemptions Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] name Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned
Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
Custom attribute writer method checking allowed values (enum). @param [Object] percent_off Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] redeem_by Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] times_redeemed Object to be assigned
Taking account of the above properties, whether this coupon can still be applied to a customer.
Custom attribute writer method checking allowed values (enum). @param [Object] valid Object to be assigned
Check to see if the all the properties in the model are valid @return true if the model is valid