Class: Pago::V2026_04::Models::CustomerPortalSubscriptionSettings

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])
{
  update_seats: "update_seats",
  update_plan: "update_plan",
  pause: "pause"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["update_seats", "update_plan"].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(update_seats:, update_plan:, pause: ::Pago::UNSET) ⇒ CustomerPortalSubscriptionSettings

Returns a new instance of CustomerPortalSubscriptionSettings.

Parameters:

  • update_seats: (Boolean)
  • update_plan: (Boolean)
  • pause: (Boolean, nil) (defaults to: ::Pago::UNSET)


19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
# File 'lib/pago/v2026_04/models.rb', line 19192

def initialize(
  update_seats:,
  update_plan:,
  pause: ::Pago::UNSET
)
  super()
  assign(:update_seats, update_seats)
  assign(:update_plan, update_plan)
  assign(:pause, pause)
end

Instance Attribute Details

#pauseBoolean (readonly)

Returns:

  • (Boolean)


19190
19191
19192
# File 'lib/pago/v2026_04/models.rb', line 19190

def pause
  @pause
end

#update_planBoolean (readonly)

Returns:

  • (Boolean)


19187
19188
19189
# File 'lib/pago/v2026_04/models.rb', line 19187

def update_plan
  @update_plan
end

#update_seatsBoolean (readonly)

Returns:

  • (Boolean)


19184
19185
19186
# File 'lib/pago/v2026_04/models.rb', line 19184

def update_seats
  @update_seats
end

Class Method Details

.from_json(data) ⇒ CustomerPortalSubscriptionSettings?

Parameters:

  • data (Hash, String, nil)

Returns:



19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
# File 'lib/pago/v2026_04/models.rb', line 19205

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