Class: Pago::V2026_04::Models::CursorPagination

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

Returns:

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

Returns a new instance of CursorPagination.

Parameters:

  • has_next_page: (Boolean)


13122
13123
13124
13125
13126
13127
# File 'lib/pago/v2026_04/models.rb', line 13122

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

Instance Attribute Details

#has_next_pageBoolean (readonly)

Returns:

  • (Boolean)


13120
13121
13122
# File 'lib/pago/v2026_04/models.rb', line 13120

def has_next_page
  @has_next_page
end

Class Method Details

.from_json(data) ⇒ CursorPagination?

Parameters:

  • data (Hash, String, nil)

Returns:



13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
# File 'lib/pago/v2026_04/models.rb', line 13131

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