Class: Pago::V2026_04::Models::BenefitLicenseKeyExpirationProperties

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

Returns:

  • (Array[String])
["ttl", "timeframe"].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(ttl:, timeframe:) ⇒ BenefitLicenseKeyExpirationProperties

Returns a new instance of BenefitLicenseKeyExpirationProperties.

Parameters:

  • ttl: (Integer)
  • timeframe: (String)


6736
6737
6738
6739
6740
6741
6742
6743
# File 'lib/pago/v2026_04/models.rb', line 6736

def initialize(
  ttl:,
  timeframe:
)
  super()
  assign(:ttl, ttl)
  assign(:timeframe, timeframe)
end

Instance Attribute Details

#timeframeString (readonly)

Returns:

  • (String)


6734
6735
6736
# File 'lib/pago/v2026_04/models.rb', line 6734

def timeframe
  @timeframe
end

#ttlInteger (readonly)

Returns:

  • (Integer)


6731
6732
6733
# File 'lib/pago/v2026_04/models.rb', line 6731

def ttl
  @ttl
end

Class Method Details

.from_json(data) ⇒ BenefitLicenseKeyExpirationProperties?

Parameters:

  • data (Hash, String, nil)

Returns:



6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
# File 'lib/pago/v2026_04/models.rb', line 6747

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