Class: Stripe::V2::Billing::IntentService::CreateParams::Action::Apply::InvoiceDiscountRule

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/v2/billing/intent_service.rb

Defined Under Namespace

Classes: PercentOff

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(applies_to: nil, type: nil, percent_off: nil) ⇒ InvoiceDiscountRule

Returns a new instance of InvoiceDiscountRule.



54
55
56
57
58
# File 'lib/stripe/services/v2/billing/intent_service.rb', line 54

def initialize(applies_to: nil, type: nil, percent_off: nil)
  @applies_to = applies_to
  @type = type
  @percent_off = percent_off
end

Instance Attribute Details

#applies_toObject

The entity that the discount rule applies to, for example, the cadence.



48
49
50
# File 'lib/stripe/services/v2/billing/intent_service.rb', line 48

def applies_to
  @applies_to
end

#percent_offObject

Configuration for percentage off discount.



52
53
54
# File 'lib/stripe/services/v2/billing/intent_service.rb', line 52

def percent_off
  @percent_off
end

#typeObject

Type of the discount rule.



50
51
52
# File 'lib/stripe/services/v2/billing/intent_service.rb', line 50

def type
  @type
end