Class: Pago::V2026_04::Models::ProductPriceSeatTiersOutput

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Overview

List of pricing tiers for seat-based pricing.

The minimum and maximum seat limits are derived from the tiers:

  • minimum_seats = first tier's min_seats
  • maximum_seats = last tier's max_seats (None for unlimited)

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  seat_tier_type: "seat_tier_type",
  tiers: "tiers",
  minimum_seats: "minimum_seats",
  maximum_seats: "maximum_seats"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["tiers", "minimum_seats", "maximum_seats"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw

Constructor Details

#initialize(seat_tier_type: ::Pago::UNSET, tiers:, minimum_seats:, maximum_seats:) ⇒ ProductPriceSeatTiersOutput

Returns a new instance of ProductPriceSeatTiersOutput.

Parameters:

  • seat_tier_type: (String, nil) (defaults to: ::Pago::UNSET)
  • tiers: (Array[Models::ProductPriceSeatTier])
  • minimum_seats: (Integer)
  • maximum_seats: (Integer, nil)


37996
37997
37998
37999
38000
38001
38002
38003
38004
38005
38006
38007
# File 'lib/pago/v2026_04/models.rb', line 37996

def initialize(
  seat_tier_type: ::Pago::UNSET,
  tiers:,
  minimum_seats:,
  maximum_seats:
)
  super()
  assign(:seat_tier_type, seat_tier_type)
  assign(:tiers, tiers)
  assign(:minimum_seats, minimum_seats)
  assign(:maximum_seats, maximum_seats)
end

Instance Attribute Details

#maximum_seatsInteger? (readonly)

Maximum number of seats allowed for purchase, derived from last tier. None for unlimited.

Returns:

  • (Integer, nil)


37994
37995
37996
# File 'lib/pago/v2026_04/models.rb', line 37994

def maximum_seats
  @maximum_seats
end

#minimum_seatsInteger (readonly)

Minimum number of seats required for purchase, derived from first tier.

Returns:

  • (Integer)


37990
37991
37992
# File 'lib/pago/v2026_04/models.rb', line 37990

def minimum_seats
  @minimum_seats
end

#seat_tier_typeString (readonly)

Returns:

  • (String)


37982
37983
37984
# File 'lib/pago/v2026_04/models.rb', line 37982

def seat_tier_type
  @seat_tier_type
end

#tiersArray<Models::ProductPriceSeatTier> (readonly)

List of pricing tiers

Returns:



37986
37987
37988
# File 'lib/pago/v2026_04/models.rb', line 37986

def tiers
  @tiers
end

Class Method Details

.from_json(data) ⇒ ProductPriceSeatTiersOutput?

Parameters:

  • data (Hash, String, nil)

Returns:



38011
38012
38013
38014
38015
38016
38017
38018
38019
38020
38021
38022
38023
38024
38025
# File 'lib/pago/v2026_04/models.rb', line 38011

def self.from_json(data)
  data = ::JSON.parse(data) if data.is_a?(String)
  data = ::Pago::Serde.object(data)
  return nil if data.nil?

  wrap_raw(
    new(
      seat_tier_type: (data.key?("seat_tier_type") ? data["seat_tier_type"] : ::Pago::UNSET),
      tiers: (data.key?("tiers") ? ::Pago::Serde.array(data["tiers"]) { |item0| Models::ProductPriceSeatTier.from_json(item0) } : ::Pago::UNSET),
      minimum_seats: (data.key?("minimum_seats") ? data["minimum_seats"] : ::Pago::UNSET),
      maximum_seats: (data.key?("maximum_seats") ? data["maximum_seats"] : ::Pago::UNSET)
    ),
    data
  )
end