Class: Pago::V2026_04::Models::SubscriptionBillingPeriodUpdatedMetadata

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])
{
  subscription_id: "subscription_id",
  old_period_end: "old_period_end",
  new_period_end: "new_period_end"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["subscription_id", "old_period_end", "new_period_end"].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(subscription_id:, old_period_end:, new_period_end:) ⇒ SubscriptionBillingPeriodUpdatedMetadata

Returns a new instance of SubscriptionBillingPeriodUpdatedMetadata.

Parameters:

  • subscription_id: (String)
  • old_period_end: (String)
  • new_period_end: (String)


39717
39718
39719
39720
39721
39722
39723
39724
39725
39726
# File 'lib/pago/v2026_04/models.rb', line 39717

def initialize(
  subscription_id:,
  old_period_end:,
  new_period_end:
)
  super()
  assign(:subscription_id, subscription_id)
  assign(:old_period_end, old_period_end)
  assign(:new_period_end, new_period_end)
end

Instance Attribute Details

#new_period_endString (readonly)

Returns:

  • (String)


39715
39716
39717
# File 'lib/pago/v2026_04/models.rb', line 39715

def new_period_end
  @new_period_end
end

#old_period_endString (readonly)

Returns:

  • (String)


39712
39713
39714
# File 'lib/pago/v2026_04/models.rb', line 39712

def old_period_end
  @old_period_end
end

#subscription_idString (readonly)

Returns:

  • (String)


39709
39710
39711
# File 'lib/pago/v2026_04/models.rb', line 39709

def subscription_id
  @subscription_id
end

Class Method Details

.from_json(data) ⇒ SubscriptionBillingPeriodUpdatedMetadata?

Parameters:

  • data (Hash, String, nil)

Returns:



39730
39731
39732
39733
39734
39735
39736
39737
39738
39739
39740
39741
39742
39743
# File 'lib/pago/v2026_04/models.rb', line 39730

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