Class: Pago::V2026_04::Models::CustomerCustomerMeterMeter
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", name: "name" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "name"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#id ⇒ String
readonly
The ID of the object.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#name ⇒ String
readonly
The name of the meter.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, name:) ⇒ CustomerCustomerMeterMeter
constructor
A new instance of CustomerCustomerMeterMeter.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, name:) ⇒ CustomerCustomerMeterMeter
Returns a new instance of CustomerCustomerMeterMeter.
16519 16520 16521 16522 16523 16524 16525 16526 16527 16528 16529 16530 |
# File 'lib/pago/v2026_04/models.rb', line 16519 def initialize( created_at:, modified_at:, id:, name: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:name, name) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
16505 16506 16507 |
# File 'lib/pago/v2026_04/models.rb', line 16505 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the object.
16513 16514 16515 |
# File 'lib/pago/v2026_04/models.rb', line 16513 def id @id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
16509 16510 16511 |
# File 'lib/pago/v2026_04/models.rb', line 16509 def modified_at @modified_at end |
#name ⇒ String (readonly)
The name of the meter. Will be shown on customer's invoices and usage.
16517 16518 16519 |
# File 'lib/pago/v2026_04/models.rb', line 16517 def name @name end |
Class Method Details
.from_json(data) ⇒ CustomerCustomerMeterMeter?
16534 16535 16536 16537 16538 16539 16540 16541 16542 16543 16544 16545 16546 16547 16548 |
# File 'lib/pago/v2026_04/models.rb', line 16534 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( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET) ), data ) end |