Class: Pago::V2026_04::Models::WebhookCustomerSeatAssignedPayload

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

Overview

Sent when a new customer seat is assigned.

This event is triggered when a seat is assigned to a customer by the organization. The customer will receive an invitation email to claim the seat.

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

Returns a new instance of WebhookCustomerSeatAssignedPayload.

Parameters:



45025
45026
45027
45028
45029
45030
45031
45032
45033
45034
# File 'lib/pago/v2026_04/models.rb', line 45025

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

Instance Attribute Details

#dataModels::CustomerSeat (readonly)



45023
45024
45025
# File 'lib/pago/v2026_04/models.rb', line 45023

def data
  @data
end

#timestampString (readonly)

Returns:

  • (String)


45020
45021
45022
# File 'lib/pago/v2026_04/models.rb', line 45020

def timestamp
  @timestamp
end

#typeString (readonly)

Returns:

  • (String)


45017
45018
45019
# File 'lib/pago/v2026_04/models.rb', line 45017

def type
  @type
end

Class Method Details

.from_json(data) ⇒ WebhookCustomerSeatAssignedPayload?

Parameters:

  • data (Hash, String, nil)

Returns:



45038
45039
45040
45041
45042
45043
45044
45045
45046
45047
45048
45049
45050
45051
# File 'lib/pago/v2026_04/models.rb', line 45038

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