class

Stripe::DeletedDiscount

Inherits OpenApi::Json < OpenApi::Validatable < JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object

Constants

ERROR_MESSAGE_FOR_OBJECT = "invalid value for \"object\", must be one of [discount]."
MAX_LENGTH_FOR_CHECKOUT_SESSION = 5000
MAX_LENGTH_FOR_ID = 5000
MAX_LENGTH_FOR_INVOICE = 5000
MAX_LENGTH_FOR_INVOICE_ITEM = 5000
MAX_LENGTH_FOR_SUBSCRIPTION = 5000
MAX_LENGTH_FOR_SUBSCRIPTION_ITEM = 5000
VALID_VALUES_FOR_OBJECT = String.static_array("discount")

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, checkout_session : String | Nil = nil, coupon : Stripe::Coupon | Nil = nil, customer : Stripe::DeletedDiscountCustomer | Nil = nil, deleted : Bool | Nil = nil, id : String | Nil = nil, invoice : String | Nil = nil, invoice_item : String | Nil = nil, object : String | Nil = nil, promotion_code : Stripe::DeletedDiscountPromotionCode | Nil = nil, start : Int64 | Nil = nil, subscription : String | Nil = nil, subscription_item : String | Nil = nil)

Initializes the object @param [Hash] attributes Model attributes in the form of hash

Source

Instance methods

==(other : self)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

checkout_session

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.

Source
checkout_session=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] checkout_session Object to be assigned

Source
coupon
Source
coupon=(new_value : Stripe::Coupon | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] coupon Object to be assigned

Source
customer
Source
customer=(new_value : Stripe::DeletedDiscountCustomer | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] customer Object to be assigned

Source
deleted

Always true for a deleted object

Source
deleted=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] deleted Object to be assigned

Source
hash(hasher)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

id

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.

Source
id=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned

Source
invoice

The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.

Source
invoice=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] invoice Object to be assigned

Source
invoice_item

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.

Source
invoice_item=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] invoice_item Object to be assigned

Source
list_invalid_properties

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

Source
object

String representing the object's type. Objects of the same type share the same value.

Source
object=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned

Source
promotion_code
Source
promotion_code=(new_value : Stripe::DeletedDiscountPromotionCode | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] promotion_code Object to be assigned

Source
start

Date that the coupon was applied.

Source
start=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] start Object to be assigned

Source
subscription

The subscription that this coupon is applied to, if it is applied to a particular subscription.

Source
subscription=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] subscription Object to be assigned

Source
subscription_item

The subscription item that this coupon is applied to, if it is applied to a particular subscription item.

Source
subscription_item=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] subscription_item Object to be assigned

Source
valid?

Check to see if the all the properties in the model are valid @return true if the model is valid

Source