Class: Pago::V2026_04::Models::ListResourceCustomerCustomerMeter

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

Returns:

  • (Array[String])
["items", "pagination"].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(items:, pagination:) ⇒ ListResourceCustomerCustomerMeter

Returns a new instance of ListResourceCustomerCustomerMeter.

Parameters:



27681
27682
27683
27684
27685
27686
27687
27688
# File 'lib/pago/v2026_04/models.rb', line 27681

def initialize(
  items:,
  pagination:
)
  super()
  assign(:items, items)
  assign(:pagination, pagination)
end

Instance Attribute Details

#itemsArray<Models::CustomerCustomerMeter> (readonly)

Returns:



27676
27677
27678
# File 'lib/pago/v2026_04/models.rb', line 27676

def items
  @items
end

#paginationModels::Pagination (readonly)

Returns:



27679
27680
27681
# File 'lib/pago/v2026_04/models.rb', line 27679

def pagination
  @pagination
end

Class Method Details

.from_json(data) ⇒ ListResourceCustomerCustomerMeter?

Parameters:

  • data (Hash, String, nil)

Returns:



27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
# File 'lib/pago/v2026_04/models.rb', line 27692

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(
      items: (data.key?("items") ? ::Pago::Serde.array(data["items"]) { |item0| Models::CustomerCustomerMeter.from_json(item0) } : ::Pago::UNSET),
      pagination: (data.key?("pagination") ? Models::Pagination.from_json(data["pagination"]) : ::Pago::UNSET)
    ),
    data
  )
end