Class: Stripe::QuoteService::CreateParams::Line::Action::SetDiscount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/quote_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(coupon: nil, discount: nil, promotion_code: nil) ⇒ SetDiscount

Returns a new instance of SetDiscount.



317
318
319
320
321
# File 'lib/stripe/services/quote_service.rb', line 317

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

Instance Attribute Details

#couponObject

The coupon code to replace the ‘discounts` array with.



311
312
313
# File 'lib/stripe/services/quote_service.rb', line 311

def coupon
  @coupon
end

#discountObject

An ID of an existing discount to replace the ‘discounts` array with.



313
314
315
# File 'lib/stripe/services/quote_service.rb', line 313

def discount
  @discount
end

#promotion_codeObject

An ID of an existing promotion code to replace the ‘discounts` array with.



315
316
317
# File 'lib/stripe/services/quote_service.rb', line 315

def promotion_code
  @promotion_code
end