Class: Stripe::V2::Billing::IntentCreateParams::Action::Apply
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::V2::Billing::IntentCreateParams::Action::Apply
- Defined in:
- lib/stripe/params/v2/billing/intent_create_params.rb
Defined Under Namespace
Classes: Discount, EffectiveAt, InvoiceDiscountRule, SpendModifierRule
Instance Attribute Summary collapse
-
#discount ⇒ Object
Details for applying a discount.
-
#effective_at ⇒ Object
When the apply action will take effect.
-
#invoice_discount_rule ⇒ Object
Details for applying a discount rule to future invoices.
-
#spend_modifier_rule ⇒ Object
Details for applying a spend modifier rule.
-
#type ⇒ Object
Type of the apply action details.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(discount: nil, effective_at: nil, invoice_discount_rule: nil, spend_modifier_rule: nil, type: nil) ⇒ Apply
constructor
A new instance of Apply.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(discount: nil, effective_at: nil, invoice_discount_rule: nil, spend_modifier_rule: nil, type: nil) ⇒ Apply
Returns a new instance of Apply.
148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 148 def initialize( discount: nil, effective_at: nil, invoice_discount_rule: nil, spend_modifier_rule: nil, type: nil ) @discount = discount @effective_at = effective_at @invoice_discount_rule = invoice_discount_rule @spend_modifier_rule = spend_modifier_rule @type = type end |
Instance Attribute Details
#discount ⇒ Object
Details for applying a discount.
138 139 140 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 138 def discount @discount end |
#effective_at ⇒ Object
When the apply action will take effect. If not specified, defaults to on_reserve.
140 141 142 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 140 def effective_at @effective_at end |
#invoice_discount_rule ⇒ Object
Details for applying a discount rule to future invoices.
142 143 144 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 142 def invoice_discount_rule @invoice_discount_rule end |
#spend_modifier_rule ⇒ Object
Details for applying a spend modifier rule. Only present if type is spend_modifier_rule.
144 145 146 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 144 def spend_modifier_rule @spend_modifier_rule end |
#type ⇒ Object
Type of the apply action details.
146 147 148 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 146 def type @type end |
Class Method Details
.field_encodings ⇒ Object
162 163 164 165 166 167 168 169 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 162 def self.field_encodings @field_encodings = { invoice_discount_rule: { kind: :object, fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } }, }, } end |