Class: Pago::V2026_04::Models::SubscriptionResume

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])
{
  resume: "resume"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["resume"].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(resume:) ⇒ SubscriptionResume

Returns a new instance of SubscriptionResume.

Parameters:

  • resume: (Boolean)


41751
41752
41753
41754
41755
41756
# File 'lib/pago/v2026_04/models.rb', line 41751

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

Instance Attribute Details

#resumeBoolean (readonly)

Resume a paused subscription immediately, starting a new billing period and charging the customer.

Returns:

  • (Boolean)


41749
41750
41751
# File 'lib/pago/v2026_04/models.rb', line 41749

def resume
  @resume
end

Class Method Details

.from_json(data) ⇒ SubscriptionResume?

Parameters:

  • data (Hash, String, nil)

Returns:



41760
41761
41762
41763
41764
41765
41766
41767
41768
41769
41770
41771
# File 'lib/pago/v2026_04/models.rb', line 41760

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