Class: Pago::V2026_04::Models::WebhookSubscriptionResumedPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when a paused subscription resumes, restoring the customer's access.
Resuming starts a new billing period and charges the customer immediately.
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:) ⇒ WebhookSubscriptionResumedPayload
constructor
A new instance of WebhookSubscriptionResumedPayload.
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:) ⇒ WebhookSubscriptionResumedPayload
Returns a new instance of WebhookSubscriptionResumedPayload.
46155 46156 46157 46158 46159 46160 46161 46162 46163 46164 |
# File 'lib/pago/v2026_04/models.rb', line 46155 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Models::Subscription (readonly)
46153 46154 46155 |
# File 'lib/pago/v2026_04/models.rb', line 46153 def data @data end |
#timestamp ⇒ String (readonly)
46150 46151 46152 |
# File 'lib/pago/v2026_04/models.rb', line 46150 def @timestamp end |
#type ⇒ String (readonly)
46147 46148 46149 |
# File 'lib/pago/v2026_04/models.rb', line 46147 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookSubscriptionResumedPayload?
46168 46169 46170 46171 46172 46173 46174 46175 46176 46177 46178 46179 46180 46181 |
# File 'lib/pago/v2026_04/models.rb', line 46168 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 |