Class: Stripe::V2::Billing::ContractCreateParams::PricingOverride

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

Defined Under Namespace

Classes: EndsAt, Multiplier, OverwritePrice, StartsAt

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(ends_at: nil, lookup_key: nil, multiplier: nil, overwrite_price: nil, priority: nil, starts_at: nil, type: nil) ⇒ PricingOverride

Returns a new instance of PricingOverride.



718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 718

def initialize(
  ends_at: nil,
  lookup_key: nil,
  multiplier: nil,
  overwrite_price: nil,
  priority: nil,
  starts_at: nil,
  type: nil
)
  @ends_at = ends_at
  @lookup_key = lookup_key
  @multiplier = multiplier
  @overwrite_price = overwrite_price
  @priority = priority
  @starts_at = starts_at
  @type = type
end

Instance Attribute Details

#ends_atObject

When the pricing override ends.



704
705
706
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 704

def ends_at
  @ends_at
end

#lookup_keyObject

A user-provided lookup key to reference this pricing override.



706
707
708
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 706

def lookup_key
  @lookup_key
end

#multiplierObject

Parameters for a multiplier override. Required if ‘type` is `multiplier`.



708
709
710
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 708

def multiplier
  @multiplier
end

#overwrite_priceObject

Parameters for an overwrite_price override. Required if ‘type` is `overwrite_price`.



710
711
712
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 710

def overwrite_price
  @overwrite_price
end

#priorityObject

The priority of this override relative to others. Lower number = higher priority.



712
713
714
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 712

def priority
  @priority
end

#starts_atObject

When the pricing override starts.



714
715
716
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 714

def starts_at
  @starts_at
end

#typeObject

The type of pricing override.



716
717
718
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 716

def type
  @type
end

Class Method Details

.field_encodingsObject



736
737
738
739
740
741
742
743
744
745
746
747
748
# File 'lib/stripe/params/v2/billing/contract_create_params.rb', line 736

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