Class: Stripe::V2::Billing::IntentCreateParams::Action

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/v2/billing/intent_create_params.rb

Defined Under Namespace

Classes: Apply, Deactivate, Modify, Remove, Subscribe

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, new, #to_h

Constructor Details

#initialize(type: nil, apply: nil, deactivate: nil, modify: nil, remove: nil, subscribe: nil) ⇒ Action

Returns a new instance of Action.



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 571

def initialize(
  type: nil,
  apply: nil,
  deactivate: nil,
  modify: nil,
  remove: nil,
  subscribe: nil
)
  @type = type
  @apply = apply
  @deactivate = deactivate
  @modify = modify
  @remove = remove
  @subscribe = subscribe
end

Instance Attribute Details

#applyObject

Details for an apply action.



561
562
563
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 561

def apply
  @apply
end

#deactivateObject

Details for a deactivate action.



563
564
565
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 563

def deactivate
  @deactivate
end

#modifyObject

Details for a modify action.



565
566
567
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 565

def modify
  @modify
end

#removeObject

Details for a remove action.



567
568
569
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 567

def remove
  @remove
end

#subscribeObject

Details for a subscribe action.



569
570
571
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 569

def subscribe
  @subscribe
end

#typeObject

Type of the Billing Intent action.



559
560
561
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 559

def type
  @type
end

Class Method Details

.field_encodingsObject



587
588
589
590
591
592
593
594
595
596
597
598
599
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 587

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