Class: Pago::V2026_04::Models::WebhookCustomerUpdatedPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when a customer is updated.
This event is fired when the customer details are updated.
If you want to be notified when a customer subscription or benefit state changes, you should listen to the customer_state_changed event.
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 ⇒ Object readonly
- #timestamp ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, timestamp:, data:) ⇒ WebhookCustomerUpdatedPayload
constructor
A new instance of WebhookCustomerUpdatedPayload.
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:) ⇒ WebhookCustomerUpdatedPayload
Returns a new instance of WebhookCustomerUpdatedPayload.
45231 45232 45233 45234 45235 45236 45237 45238 45239 45240 |
# File 'lib/pago/v2026_04/models.rb', line 45231 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Object (readonly)
45229 45230 45231 |
# File 'lib/pago/v2026_04/models.rb', line 45229 def data @data end |
#timestamp ⇒ String (readonly)
45226 45227 45228 |
# File 'lib/pago/v2026_04/models.rb', line 45226 def @timestamp end |
#type ⇒ String (readonly)
45223 45224 45225 |
# File 'lib/pago/v2026_04/models.rb', line 45223 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookCustomerUpdatedPayload?
45244 45245 45246 45247 45248 45249 45250 45251 45252 45253 45254 45255 45256 45257 |
# File 'lib/pago/v2026_04/models.rb', line 45244 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") ? Unions::Customer.from_json(data["data"]) : ::Pago::UNSET) ), data ) end |