Class: Pago::V2026_04::Models::WebhookMemberCreatedPayload
- 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 =
{ type: "type", timestamp: "timestamp", data: "data" }.freeze
- REQUIRED_KEYS =
["type", "timestamp", "data"].freeze
Instance Attribute Summary collapse
- #data ⇒ Models::Member readonly
- #timestamp ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, timestamp:, data:) ⇒ WebhookMemberCreatedPayload
constructor
A new instance of WebhookMemberCreatedPayload.
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.
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, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Models::Member (readonly)
45283 45284 45285 |
# File 'lib/pago/v2026_04/models.rb', line 45283 def data @data end |
#timestamp ⇒ String (readonly)
45280 45281 45282 |
# File 'lib/pago/v2026_04/models.rb', line 45280 def @timestamp end |
#type ⇒ String (readonly)
45277 45278 45279 |
# File 'lib/pago/v2026_04/models.rb', line 45277 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookMemberCreatedPayload?
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 |