Class: Pago::V2026_04::Models::WebhookSubscriptionRevokedPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when a subscription is revoked and the user loses access immediately.
Happens when the subscription is canceled or payment retries are exhausted (status becomes unpaid).
For payment failures that can still be recovered, see subscription.past_due.
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::Subscription readonly
- #timestamp ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, timestamp:, data:) ⇒ WebhookSubscriptionRevokedPayload
constructor
A new instance of WebhookSubscriptionRevokedPayload.
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:) ⇒ WebhookSubscriptionRevokedPayload
Returns a new instance of WebhookSubscriptionRevokedPayload.
46207 46208 46209 46210 46211 46212 46213 46214 46215 46216 |
# File 'lib/pago/v2026_04/models.rb', line 46207 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Models::Subscription (readonly)
46205 46206 46207 |
# File 'lib/pago/v2026_04/models.rb', line 46205 def data @data end |
#timestamp ⇒ String (readonly)
46202 46203 46204 |
# File 'lib/pago/v2026_04/models.rb', line 46202 def @timestamp end |
#type ⇒ String (readonly)
46199 46200 46201 |
# File 'lib/pago/v2026_04/models.rb', line 46199 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookSubscriptionRevokedPayload?
46220 46221 46222 46223 46224 46225 46226 46227 46228 46229 46230 46231 46232 46233 |
# File 'lib/pago/v2026_04/models.rb', line 46220 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::Subscription.from_json(data["data"]) : ::Pago::UNSET) ), data ) end |