Class: Pago::V2026_04::Models::Pagination
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::Pagination
show all
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary
collapse
- JSON_KEYS =
{
total_count: "total_count",
max_page: "max_page"
}.freeze
- REQUIRED_KEYS =
["total_count", "max_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(total_count:, max_page:) ⇒ Pagination
Returns a new instance of Pagination.
35300
35301
35302
35303
35304
35305
35306
35307
|
# File 'lib/pago/v2026_04/models.rb', line 35300
def initialize(
total_count:,
max_page:
)
super()
assign(:total_count, total_count)
assign(:max_page, max_page)
end
|
Instance Attribute Details
#max_page ⇒ Integer
35298
35299
35300
|
# File 'lib/pago/v2026_04/models.rb', line 35298
def max_page
@max_page
end
|
#total_count ⇒ Integer
35295
35296
35297
|
# File 'lib/pago/v2026_04/models.rb', line 35295
def total_count
@total_count
end
|
Class Method Details
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
|
# File 'lib/pago/v2026_04/models.rb', line 35311
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(
total_count: (data.key?("total_count") ? data["total_count"] : ::Pago::UNSET),
max_page: (data.key?("max_page") ? data["max_page"] : ::Pago::UNSET)
),
data
)
end
|