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

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

Defined Under Namespace

Classes: Action, CadenceData

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(actions: nil, currency: nil, cadence: nil, cadence_data: nil) ⇒ IntentCreateParams

Returns a new instance of IntentCreateParams.



866
867
868
869
870
871
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 866

def initialize(actions: nil, currency: nil, cadence: nil, cadence_data: nil)
  @actions = actions
  @currency = currency
  @cadence = cadence
  @cadence_data = cadence_data
end

Instance Attribute Details

#actionsObject

Actions to be performed by this Billing Intent.



858
859
860
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 858

def actions
  @actions
end

#cadenceObject

ID of an existing Cadence to use.



862
863
864
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 862

def cadence
  @cadence
end

#cadence_dataObject

Data for creating a new Cadence.



864
865
866
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 864

def cadence_data
  @cadence_data
end

#currencyObject

Three-letter ISO currency code, in lowercase. Must be a supported currency.



860
861
862
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 860

def currency
  @currency
end

Class Method Details

.field_encodingsObject



873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 873

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