Class: Pago::V2026_04::Models::ExistingProductPrice
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A price that already exists for this product.
Useful when updating a product if you want to keep an existing price.
Constant Summary collapse
- JSON_KEYS =
{ id: "id" }.freeze
- REQUIRED_KEYS =
["id"].freeze
Instance Attribute Summary collapse
- #id ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:) ⇒ ExistingProductPrice
constructor
A new instance of ExistingProductPrice.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(id:) ⇒ ExistingProductPrice
Returns a new instance of ExistingProductPrice.
25390 25391 25392 25393 25394 25395 |
# File 'lib/pago/v2026_04/models.rb', line 25390 def initialize( id: ) super() assign(:id, id) end |
Instance Attribute Details
#id ⇒ String (readonly)
25388 25389 25390 |
# File 'lib/pago/v2026_04/models.rb', line 25388 def id @id end |
Class Method Details
.from_json(data) ⇒ ExistingProductPrice?
25399 25400 25401 25402 25403 25404 25405 25406 25407 25408 25409 25410 |
# File 'lib/pago/v2026_04/models.rb', line 25399 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( id: (data.key?("id") ? data["id"] : ::Pago::UNSET) ), data ) end |