Class: Stripe::SubscriptionScheduleUpdateParams::Phase::Item::Discount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/subscription_schedule_update_params.rb

Defined Under Namespace

Classes: DiscountEnd, Settings

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, new, #to_h

Constructor Details

#initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil, settings: nil) ⇒ Discount

Returns a new instance of Discount.



579
580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 579

def initialize(
  coupon: nil,
  discount: nil,
  discount_end: nil,
  promotion_code: nil,
  settings: nil
)
  @coupon = coupon
  @discount = discount
  @discount_end = discount_end
  @promotion_code = promotion_code
  @settings = settings
end

Instance Attribute Details

#couponObject

ID of the coupon to create a new discount for.



569
570
571
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 569

def coupon
  @coupon
end

#discountObject

ID of an existing discount on the object (or one of its ancestors) to reuse.



571
572
573
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 571

def discount
  @discount
end

#discount_endObject

Details to determine how long the discount should be applied for.



573
574
575
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 573

def discount_end
  @discount_end
end

#promotion_codeObject

ID of the promotion code to create a new discount for.



575
576
577
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 575

def promotion_code
  @promotion_code
end

#settingsObject

Settings for discount application including service period anchoring.



577
578
579
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 577

def settings
  @settings
end