Class: Stripe::V2::Billing::IntentAction::Apply
- Inherits:
-
StripeObject
- Object
- StripeObject
- Stripe::V2::Billing::IntentAction::Apply
- Defined in:
- lib/stripe/resources/v2/billing/intent_action.rb
Defined Under Namespace
Classes: Discount, EffectiveAt, InvoiceDiscountRule, SpendModifierRule
Constant Summary
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#discount ⇒ Object
readonly
Details for applying a discount.
-
#effective_at ⇒ Object
readonly
When the apply action takes effect.
-
#invoice_discount_rule ⇒ Object
readonly
Details for applying a discount rule to future invoices.
-
#spend_modifier_rule ⇒ Object
readonly
Details for applying a spend modifier rule.
-
#type ⇒ Object
readonly
Type of the apply action details.
Attributes inherited from StripeObject
Class Method Summary collapse
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#discount ⇒ Object (readonly)
Details for applying a discount.
183 184 185 |
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 183 def discount @discount end |
#effective_at ⇒ Object (readonly)
When the apply action takes effect. If not specified, defaults to on_reserve.
185 186 187 |
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 185 def effective_at @effective_at end |
#invoice_discount_rule ⇒ Object (readonly)
Details for applying a discount rule to future invoices.
187 188 189 |
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 187 def invoice_discount_rule @invoice_discount_rule end |
#spend_modifier_rule ⇒ Object (readonly)
Details for applying a spend modifier rule. Only present if type is spend_modifier_rule.
189 190 191 |
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 189 def spend_modifier_rule @spend_modifier_rule end |
#type ⇒ Object (readonly)
Type of the apply action details.
191 192 193 |
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 191 def type @type end |
Class Method Details
.field_encodings ⇒ Object
206 207 208 209 210 211 212 213 |
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 206 def self.field_encodings @field_encodings = { invoice_discount_rule: { kind: :object, fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } }, }, } end |
.field_remappings ⇒ Object
202 203 204 |
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 202 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
193 194 195 196 197 198 199 200 |
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 193 def self.inner_class_types @inner_class_types = { discount: Discount, effective_at: EffectiveAt, invoice_discount_rule: InvoiceDiscountRule, spend_modifier_rule: SpendModifierRule, } end |