Class: Pago::V2026_04::Models::WebhookProductUpdatedPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when a product is updated.
Discord & Slack support: Basic
Constant Summary collapse
- JSON_KEYS =
{ type: "type", timestamp: "timestamp", data: "data" }.freeze
- REQUIRED_KEYS =
["type", "timestamp", "data"].freeze
Instance Attribute Summary collapse
- #data ⇒ Models::Product readonly
- #timestamp ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, timestamp:, data:) ⇒ WebhookProductUpdatedPayload
constructor
A new instance of WebhookProductUpdatedPayload.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(type:, timestamp:, data:) ⇒ WebhookProductUpdatedPayload
Returns a new instance of WebhookProductUpdatedPayload.
45749 45750 45751 45752 45753 45754 45755 45756 45757 45758 |
# File 'lib/pago/v2026_04/models.rb', line 45749 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Models::Product (readonly)
45747 45748 45749 |
# File 'lib/pago/v2026_04/models.rb', line 45747 def data @data end |
#timestamp ⇒ String (readonly)
45744 45745 45746 |
# File 'lib/pago/v2026_04/models.rb', line 45744 def @timestamp end |
#type ⇒ String (readonly)
45741 45742 45743 |
# File 'lib/pago/v2026_04/models.rb', line 45741 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookProductUpdatedPayload?
45762 45763 45764 45765 45766 45767 45768 45769 45770 45771 45772 45773 45774 45775 |
# File 'lib/pago/v2026_04/models.rb', line 45762 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( type: (data.key?("type") ? data["type"] : ::Pago::UNSET), timestamp: (data.key?("timestamp") ? data["timestamp"] : ::Pago::UNSET), data: (data.key?("data") ? Models::Product.from_json(data["data"]) : ::Pago::UNSET) ), data ) end |