Class: Pago::V2026_04::Models::ProductPriceSeatTier
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A pricing tier for seat-based pricing.
Constant Summary collapse
- JSON_KEYS =
{ min_seats: "min_seats", max_seats: "max_seats", price_per_seat: "price_per_seat" }.freeze
- REQUIRED_KEYS =
["min_seats", "price_per_seat"].freeze
Instance Attribute Summary collapse
-
#max_seats ⇒ Integer?
readonly
Maximum number of seats (inclusive).
-
#min_seats ⇒ Integer
readonly
Minimum number of seats (inclusive).
-
#price_per_seat ⇒ Integer
readonly
Price per seat in cents for this tier.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(min_seats:, max_seats: ::Pago::UNSET, price_per_seat:) ⇒ ProductPriceSeatTier
constructor
A new instance of ProductPriceSeatTier.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(min_seats:, max_seats: ::Pago::UNSET, price_per_seat:) ⇒ ProductPriceSeatTier
Returns a new instance of ProductPriceSeatTier.
37893 37894 37895 37896 37897 37898 37899 37900 37901 37902 |
# File 'lib/pago/v2026_04/models.rb', line 37893 def initialize( min_seats:, max_seats: ::Pago::UNSET, price_per_seat: ) super() assign(:min_seats, min_seats) assign(:max_seats, max_seats) assign(:price_per_seat, price_per_seat) end |
Instance Attribute Details
#max_seats ⇒ Integer? (readonly)
Maximum number of seats (inclusive). None for unlimited.
37887 37888 37889 |
# File 'lib/pago/v2026_04/models.rb', line 37887 def max_seats @max_seats end |
#min_seats ⇒ Integer (readonly)
Minimum number of seats (inclusive)
37883 37884 37885 |
# File 'lib/pago/v2026_04/models.rb', line 37883 def min_seats @min_seats end |
#price_per_seat ⇒ Integer (readonly)
Price per seat in cents for this tier
37891 37892 37893 |
# File 'lib/pago/v2026_04/models.rb', line 37891 def price_per_seat @price_per_seat end |
Class Method Details
.from_json(data) ⇒ ProductPriceSeatTier?
37906 37907 37908 37909 37910 37911 37912 37913 37914 37915 37916 37917 37918 37919 |
# File 'lib/pago/v2026_04/models.rb', line 37906 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( min_seats: (data.key?("min_seats") ? data["min_seats"] : ::Pago::UNSET), max_seats: (data.key?("max_seats") ? data["max_seats"] : ::Pago::UNSET), price_per_seat: (data.key?("price_per_seat") ? data["price_per_seat"] : ::Pago::UNSET) ), data ) end |