Class: Pago::V2026_04::Models::WebhookOrderPaidPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when an order is paid.
When you receive this event, the order is fully processed and payment has been received.
Discord & Slack support: Full
Constant Summary collapse
- JSON_KEYS =
{ type: "type", timestamp: "timestamp", data: "data" }.freeze
- REQUIRED_KEYS =
["type", "timestamp", "data"].freeze
Instance Attribute Summary collapse
- #data ⇒ Models::Order readonly
- #timestamp ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, timestamp:, data:) ⇒ WebhookOrderPaidPayload
constructor
A new instance of WebhookOrderPaidPayload.
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:) ⇒ WebhookOrderPaidPayload
Returns a new instance of WebhookOrderPaidPayload.
45499 45500 45501 45502 45503 45504 45505 45506 45507 45508 |
# File 'lib/pago/v2026_04/models.rb', line 45499 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Models::Order (readonly)
45497 45498 45499 |
# File 'lib/pago/v2026_04/models.rb', line 45497 def data @data end |
#timestamp ⇒ String (readonly)
45494 45495 45496 |
# File 'lib/pago/v2026_04/models.rb', line 45494 def @timestamp end |
#type ⇒ String (readonly)
45491 45492 45493 |
# File 'lib/pago/v2026_04/models.rb', line 45491 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookOrderPaidPayload?
45512 45513 45514 45515 45516 45517 45518 45519 45520 45521 45522 45523 45524 45525 |
# File 'lib/pago/v2026_04/models.rb', line 45512 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::Order.from_json(data["data"]) : ::Pago::UNSET) ), data ) end |