Class: Pago::V2026_04::Models::CustomerCustomerSession

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

Returns:

  • (Array[String])
["expires_at", "return_url"].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(expires_at:, return_url:) ⇒ CustomerCustomerSession

Returns a new instance of CustomerCustomerSession.

Parameters:

  • expires_at: (String)
  • return_url: (String, nil)


16564
16565
16566
16567
16568
16569
16570
16571
# File 'lib/pago/v2026_04/models.rb', line 16564

def initialize(
  expires_at:,
  return_url:
)
  super()
  assign(:expires_at, expires_at)
  assign(:return_url, return_url)
end

Instance Attribute Details

#expires_atString (readonly)

Returns:

  • (String)


16559
16560
16561
# File 'lib/pago/v2026_04/models.rb', line 16559

def expires_at
  @expires_at
end

#return_urlString? (readonly)

Returns:

  • (String, nil)


16562
16563
16564
# File 'lib/pago/v2026_04/models.rb', line 16562

def return_url
  @return_url
end

Class Method Details

.from_json(data) ⇒ CustomerCustomerSession?

Parameters:

  • data (Hash, String, nil)

Returns:



16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
# File 'lib/pago/v2026_04/models.rb', line 16575

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