Class: Pago::V2026_04::Models::WebhookRefundCreatedPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when a refund is created regardless of status.
Discord & Slack support: Full
Constant Summary collapse
- JSON_KEYS =
{ type: "type", timestamp: "timestamp", data: "data" }.freeze
- REQUIRED_KEYS =
["type", "timestamp", "data"].freeze
Instance Attribute Summary collapse
- #data ⇒ Models::Refund readonly
- #timestamp ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, timestamp:, data:) ⇒ WebhookRefundCreatedPayload
constructor
A new instance of WebhookRefundCreatedPayload.
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:) ⇒ WebhookRefundCreatedPayload
Returns a new instance of WebhookRefundCreatedPayload.
45798 45799 45800 45801 45802 45803 45804 45805 45806 45807 |
# File 'lib/pago/v2026_04/models.rb', line 45798 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Models::Refund (readonly)
45796 45797 45798 |
# File 'lib/pago/v2026_04/models.rb', line 45796 def data @data end |
#timestamp ⇒ String (readonly)
45793 45794 45795 |
# File 'lib/pago/v2026_04/models.rb', line 45793 def @timestamp end |
#type ⇒ String (readonly)
45790 45791 45792 |
# File 'lib/pago/v2026_04/models.rb', line 45790 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookRefundCreatedPayload?
45811 45812 45813 45814 45815 45816 45817 45818 45819 45820 45821 45822 45823 45824 |
# File 'lib/pago/v2026_04/models.rb', line 45811 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::Refund.from_json(data["data"]) : ::Pago::UNSET) ), data ) end |