Class: Pago::V2026_04::Models::SubscriptionProductUpdatedMetadata
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::SubscriptionProductUpdatedMetadata
show all
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary
collapse
- JSON_KEYS =
{
subscription_id: "subscription_id",
old_product_id: "old_product_id",
new_product_id: "new_product_id"
}.freeze
- REQUIRED_KEYS =
["subscription_id", "old_product_id", "new_product_id"].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
Returns a new instance of SubscriptionProductUpdatedMetadata.
41508
41509
41510
41511
41512
41513
41514
41515
41516
41517
|
# File 'lib/pago/v2026_04/models.rb', line 41508
def initialize(
subscription_id:,
old_product_id:,
new_product_id:
)
super()
assign(:subscription_id, subscription_id)
assign(:old_product_id, old_product_id)
assign(:new_product_id, new_product_id)
end
|
Instance Attribute Details
#new_product_id ⇒ String
41506
41507
41508
|
# File 'lib/pago/v2026_04/models.rb', line 41506
def new_product_id
@new_product_id
end
|
#old_product_id ⇒ String
41503
41504
41505
|
# File 'lib/pago/v2026_04/models.rb', line 41503
def old_product_id
@old_product_id
end
|
#subscription_id ⇒ String
41500
41501
41502
|
# File 'lib/pago/v2026_04/models.rb', line 41500
def subscription_id
@subscription_id
end
|
Class Method Details
41521
41522
41523
41524
41525
41526
41527
41528
41529
41530
41531
41532
41533
41534
|
# File 'lib/pago/v2026_04/models.rb', line 41521
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(
subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET),
old_product_id: (data.key?("old_product_id") ? data["old_product_id"] : ::Pago::UNSET),
new_product_id: (data.key?("new_product_id") ? data["new_product_id"] : ::Pago::UNSET)
),
data
)
end
|