Class: Pago::V2026_04::Models::WebhookCheckoutExpiredPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when a checkout expires.
This event fires when a checkout reaches its expiration time without being completed. Developers can use this to send reminder emails or track checkout abandonment.
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::Checkout readonly
- #timestamp ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, timestamp:, data:) ⇒ WebhookCheckoutExpiredPayload
constructor
A new instance of WebhookCheckoutExpiredPayload.
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:) ⇒ WebhookCheckoutExpiredPayload
Returns a new instance of WebhookCheckoutExpiredPayload.
44823 44824 44825 44826 44827 44828 44829 44830 44831 44832 |
# File 'lib/pago/v2026_04/models.rb', line 44823 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Models::Checkout (readonly)
44821 44822 44823 |
# File 'lib/pago/v2026_04/models.rb', line 44821 def data @data end |
#timestamp ⇒ String (readonly)
44818 44819 44820 |
# File 'lib/pago/v2026_04/models.rb', line 44818 def @timestamp end |
#type ⇒ String (readonly)
44815 44816 44817 |
# File 'lib/pago/v2026_04/models.rb', line 44815 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookCheckoutExpiredPayload?
44836 44837 44838 44839 44840 44841 44842 44843 44844 44845 44846 44847 44848 44849 |
# File 'lib/pago/v2026_04/models.rb', line 44836 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::Checkout.from_json(data["data"]) : ::Pago::UNSET) ), data ) end |