Class: Pago::V2026_04::Models::ProductPriceSeatTiersOutput
- 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 =
{ seat_tier_type: "seat_tier_type", tiers: "tiers", minimum_seats: "minimum_seats", maximum_seats: "maximum_seats" }.freeze
- REQUIRED_KEYS =
["tiers", "minimum_seats", "maximum_seats"].freeze
Instance Attribute Summary collapse
-
#maximum_seats ⇒ Integer?
readonly
Maximum number of seats allowed for purchase, derived from last tier.
-
#minimum_seats ⇒ Integer
readonly
Minimum number of seats required for purchase, derived from first tier.
- #seat_tier_type ⇒ String readonly
-
#tiers ⇒ Array<Models::ProductPriceSeatTier>
readonly
List of pricing tiers.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(seat_tier_type: ::Pago::UNSET, tiers:, minimum_seats:, maximum_seats:) ⇒ ProductPriceSeatTiersOutput
constructor
A new instance of ProductPriceSeatTiersOutput.
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.
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_seats ⇒ Integer? (readonly)
Maximum number of seats allowed for purchase, derived from last tier. None for unlimited.
37994 37995 37996 |
# File 'lib/pago/v2026_04/models.rb', line 37994 def maximum_seats @maximum_seats end |
#minimum_seats ⇒ Integer (readonly)
Minimum number of seats required for purchase, derived from first tier.
37990 37991 37992 |
# File 'lib/pago/v2026_04/models.rb', line 37990 def minimum_seats @minimum_seats end |
#seat_tier_type ⇒ String (readonly)
37982 37983 37984 |
# File 'lib/pago/v2026_04/models.rb', line 37982 def seat_tier_type @seat_tier_type end |
#tiers ⇒ Array<Models::ProductPriceSeatTier> (readonly)
List of pricing tiers
37986 37987 37988 |
# File 'lib/pago/v2026_04/models.rb', line 37986 def tiers @tiers end |
Class Method Details
.from_json(data) ⇒ ProductPriceSeatTiersOutput?
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 |