Class: Pago::V2026_04::Models::WebhookOrderUpdatedPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when an order is updated.
An order is updated when:
- Its status changes, e.g. from
pendingtopaid. - It's refunded, partially or fully.
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:) ⇒ WebhookOrderUpdatedPayload
constructor
A new instance of WebhookOrderUpdatedPayload.
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:) ⇒ WebhookOrderUpdatedPayload
Returns a new instance of WebhookOrderUpdatedPayload.
45602 45603 45604 45605 45606 45607 45608 45609 45610 45611 |
# File 'lib/pago/v2026_04/models.rb', line 45602 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Models::Order (readonly)
45600 45601 45602 |
# File 'lib/pago/v2026_04/models.rb', line 45600 def data @data end |
#timestamp ⇒ String (readonly)
45597 45598 45599 |
# File 'lib/pago/v2026_04/models.rb', line 45597 def @timestamp end |
#type ⇒ String (readonly)
45594 45595 45596 |
# File 'lib/pago/v2026_04/models.rb', line 45594 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookOrderUpdatedPayload?
45615 45616 45617 45618 45619 45620 45621 45622 45623 45624 45625 45626 45627 45628 |
# File 'lib/pago/v2026_04/models.rb', line 45615 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 |