Class: Stripe::V2::Billing::IntentAction::Apply

Inherits:
StripeObject
  • Object
show all
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

Attributes inherited from StripeObject

#last_response

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

#discountObject (readonly)

Details for applying a discount.



185
186
187
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 185

def discount
  @discount
end

#effective_atObject (readonly)

When the apply action will take effect. If not specified, defaults to on_reserve.



181
182
183
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 181

def effective_at
  @effective_at
end

#invoice_discount_ruleObject (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_ruleObject (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

#typeObject (readonly)

Type of the apply action details.



183
184
185
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 183

def type
  @type
end

Class Method Details

.field_encodingsObject



204
205
206
207
208
209
210
211
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 204

def self.field_encodings
  @field_encodings = {
    invoice_discount_rule: {
      kind: :object,
      fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } },
    },
  }
end

.field_remappingsObject



200
201
202
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 200

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



191
192
193
194
195
196
197
198
# File 'lib/stripe/resources/v2/billing/intent_action.rb', line 191

def self.inner_class_types
  @inner_class_types = {
    effective_at: EffectiveAt,
    discount: Discount,
    invoice_discount_rule: InvoiceDiscountRule,
    spend_modifier_rule: SpendModifierRule,
  }
end