Class: Pago::V2026_04::Models::WebhookCheckoutCreatedPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when a new checkout is created.
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:) ⇒ WebhookCheckoutCreatedPayload
constructor
A new instance of WebhookCheckoutCreatedPayload.
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:) ⇒ WebhookCheckoutCreatedPayload
Returns a new instance of WebhookCheckoutCreatedPayload.
44771 44772 44773 44774 44775 44776 44777 44778 44779 44780 |
# File 'lib/pago/v2026_04/models.rb', line 44771 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Models::Checkout (readonly)
44769 44770 44771 |
# File 'lib/pago/v2026_04/models.rb', line 44769 def data @data end |
#timestamp ⇒ String (readonly)
44766 44767 44768 |
# File 'lib/pago/v2026_04/models.rb', line 44766 def @timestamp end |
#type ⇒ String (readonly)
44763 44764 44765 |
# File 'lib/pago/v2026_04/models.rb', line 44763 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookCheckoutCreatedPayload?
44784 44785 44786 44787 44788 44789 44790 44791 44792 44793 44794 44795 44796 44797 |
# File 'lib/pago/v2026_04/models.rb', line 44784 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 |