Class: Pago::V2026_04::Models::WebhookCustomerSeatRevokedPayload

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

Overview

Sent when a customer seat is revoked.

This event is triggered when access to a seat is revoked, either manually by the organization or automatically when a subscription is canceled.

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

Returns a new instance of WebhookCustomerSeatRevokedPayload.

Parameters:



45123
45124
45125
45126
45127
45128
45129
45130
45131
45132
# File 'lib/pago/v2026_04/models.rb', line 45123

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

Instance Attribute Details

#dataModels::CustomerSeat (readonly)



45121
45122
45123
# File 'lib/pago/v2026_04/models.rb', line 45121

def data
  @data
end

#timestampString (readonly)

Returns:

  • (String)


45118
45119
45120
# File 'lib/pago/v2026_04/models.rb', line 45118

def timestamp
  @timestamp
end

#typeString (readonly)

Returns:

  • (String)


45115
45116
45117
# File 'lib/pago/v2026_04/models.rb', line 45115

def type
  @type
end

Class Method Details

.from_json(data) ⇒ WebhookCustomerSeatRevokedPayload?

Parameters:

  • data (Hash, String, nil)

Returns:



45136
45137
45138
45139
45140
45141
45142
45143
45144
45145
45146
45147
45148
45149
# File 'lib/pago/v2026_04/models.rb', line 45136

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