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(effective_at: nil, type: nil, discount: nil, invoice_discount_rule: nil, spend_modifier_rule: nil) ⇒ Apply
constructor
A new instance of Apply.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(effective_at: nil, type: nil, discount: nil, invoice_discount_rule: nil, spend_modifier_rule: nil) ⇒ Apply
Returns a new instance of Apply.
145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 145 def initialize( effective_at: nil, type: nil, discount: nil, invoice_discount_rule: nil, spend_modifier_rule: nil ) @effective_at = effective_at @type = type @discount = discount @invoice_discount_rule = invoice_discount_rule @spend_modifier_rule = spend_modifier_rule end |
Instance Attribute Details
#discount ⇒ Object
Details for applying a discount.
139 140 141 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 139 def discount @discount end |
#effective_at ⇒ Object
When the apply action will take effect. If not specified, defaults to on_reserve.
135 136 137 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 135 def effective_at @effective_at end |
#invoice_discount_rule ⇒ Object
Details for applying a discount rule to future invoices.
141 142 143 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 141 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.
143 144 145 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 143 def spend_modifier_rule @spend_modifier_rule end |
#type ⇒ Object
Type of the apply action details.
137 138 139 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 137 def type @type end |
Class Method Details
.field_encodings ⇒ Object
159 160 161 162 163 164 165 166 |
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 159 def self.field_encodings @field_encodings = { invoice_discount_rule: { kind: :object, fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } }, }, } end |