Class: Stripe::V2::Billing::ContractUpdateParams::PricingOverrideAction

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

Defined Under Namespace

Classes: Add, Remove, Update

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(add: nil, remove: nil, type: nil, update: nil) ⇒ PricingOverrideAction

Returns a new instance of PricingOverrideAction.



446
447
448
449
450
451
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 446

def initialize(add: nil, remove: nil, type: nil, update: nil)
  @add = add
  @remove = remove
  @type = type
  @update = update
end

Instance Attribute Details

#addObject

Parameters for adding a pricing override.



438
439
440
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 438

def add
  @add
end

#removeObject

Parameters for removing a pricing override.



440
441
442
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 440

def remove
  @remove
end

#typeObject

The type of pricing override action.



442
443
444
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 442

def type
  @type
end

#updateObject

Parameters for updating a pricing override.



444
445
446
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 444

def update
  @update
end

Class Method Details

.field_encodingsObject



453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 453

def self.field_encodings
  @field_encodings = {
    add: {
      kind: :object,
      fields: {
        overwrite_price: {
          kind: :object,
          fields: {
            tiers: {
              kind: :array,
              element: { kind: :object, fields: { up_to_decimal: :decimal_string } },
            },
          },
        },
      },
    },
  }
end