Class: Pago::V2026_04::Models::WebhookMemberDeletedPayload

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

Overview

Sent when a member is deleted.

This event is triggered when a member is removed from a customer. Any active seats assigned to the member will be automatically revoked.

Discord & Slack support: Basic

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:) ⇒ WebhookMemberDeletedPayload

Returns a new instance of WebhookMemberDeletedPayload.

Parameters:



45337
45338
45339
45340
45341
45342
45343
45344
45345
45346
# File 'lib/pago/v2026_04/models.rb', line 45337

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

Instance Attribute Details

#dataModels::Member (readonly)

Returns:



45335
45336
45337
# File 'lib/pago/v2026_04/models.rb', line 45335

def data
  @data
end

#timestampString (readonly)

Returns:

  • (String)


45332
45333
45334
# File 'lib/pago/v2026_04/models.rb', line 45332

def timestamp
  @timestamp
end

#typeString (readonly)

Returns:

  • (String)


45329
45330
45331
# File 'lib/pago/v2026_04/models.rb', line 45329

def type
  @type
end

Class Method Details

.from_json(data) ⇒ WebhookMemberDeletedPayload?

Parameters:

  • data (Hash, String, nil)

Returns:



45350
45351
45352
45353
45354
45355
45356
45357
45358
45359
45360
45361
45362
45363
# File 'lib/pago/v2026_04/models.rb', line 45350

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::Member.from_json(data["data"]) : ::Pago::UNSET)
    ),
    data
  )
end