Class: Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule::PercentOff

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

Defined Under Namespace

Classes: MaximumApplications

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, new, #to_h

Constructor Details

#initialize(maximum_applications: nil, percent_off: nil) ⇒ PercentOff

Returns a new instance of PercentOff.



52
53
54
55
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 52

def initialize(maximum_applications: nil, percent_off: nil)
  @maximum_applications = maximum_applications
  @percent_off = percent_off
end

Instance Attribute Details

#maximum_applicationsObject

The maximum number of times this discount can be applied for this cadence.



48
49
50
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 48

def maximum_applications
  @maximum_applications
end

#percent_offObject

Percent that is taken off the amount. For example, a percent_off of 50.0 reduces a 100 USD amount to 50 USD.



50
51
52
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 50

def percent_off
  @percent_off
end

Class Method Details

.field_encodingsObject



57
58
59
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 57

def self.field_encodings
  @field_encodings = { percent_off: :decimal_string }
end