Class: Pago::V2026_04::Models::WebhookRefundUpdatedPayload

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Overview

Sent when a refund is updated.

Discord & Slack support: Full

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  type: "type",
  timestamp: "timestamp",
  data: "data"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["type", "timestamp", "data"].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

#initialize(type:, timestamp:, data:) ⇒ WebhookRefundUpdatedPayload

Returns a new instance of WebhookRefundUpdatedPayload.

Parameters:



45847
45848
45849
45850
45851
45852
45853
45854
45855
45856
# File 'lib/pago/v2026_04/models.rb', line 45847

def initialize(
  type:,
  timestamp:,
  data:
)
  super()
  assign(:type, type)
  assign(:timestamp, timestamp)
  assign(:data, data)
end

Instance Attribute Details

#dataModels::Refund (readonly)

Returns:



45845
45846
45847
# File 'lib/pago/v2026_04/models.rb', line 45845

def data
  @data
end

#timestampString (readonly)

Returns:

  • (String)


45842
45843
45844
# File 'lib/pago/v2026_04/models.rb', line 45842

def timestamp
  @timestamp
end

#typeString (readonly)

Returns:

  • (String)


45839
45840
45841
# File 'lib/pago/v2026_04/models.rb', line 45839

def type
  @type
end

Class Method Details

.from_json(data) ⇒ WebhookRefundUpdatedPayload?

Parameters:

  • data (Hash, String, nil)

Returns:



45860
45861
45862
45863
45864
45865
45866
45867
45868
45869
45870
45871
45872
45873
# File 'lib/pago/v2026_04/models.rb', line 45860

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