Class: Pago::V2026_04::Models::WebhookCustomerSeatClaimedPayload

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 claimed.

This event is triggered when a customer accepts the seat invitation and claims their access.

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

Returns a new instance of WebhookCustomerSeatClaimedPayload.

Parameters:



45074
45075
45076
45077
45078
45079
45080
45081
45082
45083
# File 'lib/pago/v2026_04/models.rb', line 45074

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

Instance Attribute Details

#dataModels::CustomerSeat (readonly)



45072
45073
45074
# File 'lib/pago/v2026_04/models.rb', line 45072

def data
  @data
end

#timestampString (readonly)

Returns:

  • (String)


45069
45070
45071
# File 'lib/pago/v2026_04/models.rb', line 45069

def timestamp
  @timestamp
end

#typeString (readonly)

Returns:

  • (String)


45066
45067
45068
# File 'lib/pago/v2026_04/models.rb', line 45066

def type
  @type
end

Class Method Details

.from_json(data) ⇒ WebhookCustomerSeatClaimedPayload?

Parameters:

  • data (Hash, String, nil)

Returns:



45087
45088
45089
45090
45091
45092
45093
45094
45095
45096
45097
45098
45099
45100
# File 'lib/pago/v2026_04/models.rb', line 45087

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