Class: Pago::V2026_04::Models::CustomerSubscriptionUpdateProduct
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ product_id: "product_id" }.freeze
- REQUIRED_KEYS =
["product_id"].freeze
Instance Attribute Summary collapse
-
#product_id ⇒ String
readonly
Update subscription to another product.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(product_id:) ⇒ CustomerSubscriptionUpdateProduct
constructor
A new instance of CustomerSubscriptionUpdateProduct.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(product_id:) ⇒ CustomerSubscriptionUpdateProduct
Returns a new instance of CustomerSubscriptionUpdateProduct.
21515 21516 21517 21518 21519 21520 |
# File 'lib/pago/v2026_04/models.rb', line 21515 def initialize( product_id: ) super() assign(:product_id, product_id) end |
Instance Attribute Details
#product_id ⇒ String (readonly)
Update subscription to another product.
21513 21514 21515 |
# File 'lib/pago/v2026_04/models.rb', line 21513 def product_id @product_id end |
Class Method Details
.from_json(data) ⇒ CustomerSubscriptionUpdateProduct?
21524 21525 21526 21527 21528 21529 21530 21531 21532 21533 21534 21535 |
# File 'lib/pago/v2026_04/models.rb', line 21524 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( product_id: (data.key?("product_id") ? data["product_id"] : ::Pago::UNSET) ), data ) end |