Class: Pago::V2026_04::Models::CustomerSubscriptionMeterMeter
- 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:) ⇒ CustomerSubscriptionMeterMeter
constructor
A new instance of CustomerSubscriptionMeterMeter.
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:) ⇒ CustomerSubscriptionMeterMeter
Returns a new instance of CustomerSubscriptionMeterMeter.
21188 21189 21190 21191 21192 21193 21194 21195 21196 21197 21198 21199 |
# File 'lib/pago/v2026_04/models.rb', line 21188 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.
21174 21175 21176 |
# File 'lib/pago/v2026_04/models.rb', line 21174 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the object.
21182 21183 21184 |
# File 'lib/pago/v2026_04/models.rb', line 21182 def id @id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
21178 21179 21180 |
# File 'lib/pago/v2026_04/models.rb', line 21178 def modified_at @modified_at end |
#name ⇒ String (readonly)
The name of the meter. Will be shown on customer's invoices and usage.
21186 21187 21188 |
# File 'lib/pago/v2026_04/models.rb', line 21186 def name @name end |
Class Method Details
.from_json(data) ⇒ CustomerSubscriptionMeterMeter?
21203 21204 21205 21206 21207 21208 21209 21210 21211 21212 21213 21214 21215 21216 21217 |
# File 'lib/pago/v2026_04/models.rb', line 21203 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 |