Class: Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule
- Defined in:
- lib/stripe/params/v2/billing/intent_create_params.rb
Defined Under Namespace
Classes: PercentOff
Instance Attribute Summary collapse
-
#applies_to ⇒ Object
The entity that the discount rule applies to, for example, the cadence.
-
#percent_off ⇒ Object
Configuration for percentage off discount.
-
#type ⇒ Object
Type of the discount rule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(applies_to: nil, percent_off: nil, type: nil) ⇒ InvoiceDiscountRule
constructor
A new instance of InvoiceDiscountRule.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(applies_to: nil, percent_off: nil, type: nil) ⇒ InvoiceDiscountRule
Returns a new instance of InvoiceDiscountRule.
68 69 70 71 72 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 68 def initialize(applies_to: nil, percent_off: nil, type: nil) @applies_to = applies_to @percent_off = percent_off @type = type end |
Instance Attribute Details
#applies_to ⇒ Object
The entity that the discount rule applies to, for example, the cadence.
62 63 64 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 62 def applies_to @applies_to end |
#percent_off ⇒ Object
Configuration for percentage off discount.
64 65 66 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 64 def percent_off @percent_off end |
#type ⇒ Object
Type of the discount rule.
66 67 68 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 66 def type @type end |
Class Method Details
.field_encodings ⇒ Object
74 75 76 77 78 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 74 def self.field_encodings @field_encodings = { percent_off: { kind: :object, fields: { percent_off: :decimal_string } }, } end |