Class: Pago::V2026_04::Models::WebhookMemberCreatedPayload

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

Overview

Sent when a new member is created.

A member represents an individual within a customer (team). This event is triggered when a member is added to a customer, either programmatically via the API or when an owner is automatically created for a new customer.

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

Returns a new instance of WebhookMemberCreatedPayload.

Parameters:



45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
# File 'lib/pago/v2026_04/models.rb', line 45285

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

Instance Attribute Details

#dataModels::Member (readonly)

Returns:



45283
45284
45285
# File 'lib/pago/v2026_04/models.rb', line 45283

def data
  @data
end

#timestampString (readonly)

Returns:

  • (String)


45280
45281
45282
# File 'lib/pago/v2026_04/models.rb', line 45280

def timestamp
  @timestamp
end

#typeString (readonly)

Returns:

  • (String)


45277
45278
45279
# File 'lib/pago/v2026_04/models.rb', line 45277

def type
  @type
end

Class Method Details

.from_json(data) ⇒ WebhookMemberCreatedPayload?

Parameters:

  • data (Hash, String, nil)

Returns:



45298
45299
45300
45301
45302
45303
45304
45305
45306
45307
45308
45309
45310
45311
# File 'lib/pago/v2026_04/models.rb', line 45298

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