Class: Pago::V2026_04::Models::CustomerSubscriptionUpdateSeats

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

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  seats: "seats"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["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(seats:) ⇒ CustomerSubscriptionUpdateSeats

Returns a new instance of CustomerSubscriptionUpdateSeats.

Parameters:

  • seats: (Integer)


21548
21549
21550
21551
21552
21553
# File 'lib/pago/v2026_04/models.rb', line 21548

def initialize(
  seats:
)
  super()
  assign(:seats, seats)
end

Instance Attribute Details

#seatsInteger (readonly)

Update the number of seats for this subscription.

Returns:

  • (Integer)


21546
21547
21548
# File 'lib/pago/v2026_04/models.rb', line 21546

def seats
  @seats
end

Class Method Details

.from_json(data) ⇒ CustomerSubscriptionUpdateSeats?

Parameters:

  • data (Hash, String, nil)

Returns:



21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
# File 'lib/pago/v2026_04/models.rb', line 21557

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(
      seats: (data.key?("seats") ? data["seats"] : ::Pago::UNSET)
    ),
    data
  )
end