Class: Pago::V2026_04::Models::WebhookSubscriptionUncanceledPayload

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Overview

Sent when a customer revokes a pending cancellation.

When a customer cancels with "at period end", they retain access until the subscription would renew. During this time, they can change their mind and undo the cancellation. This event is triggered when they do so.

Discord & Slack support: Full

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  type: "type",
  timestamp: "timestamp",
  data: "data"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["type", "timestamp", "data"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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:) ⇒ WebhookSubscriptionUncanceledPayload

Returns a new instance of WebhookSubscriptionUncanceledPayload.

Parameters:



46260
46261
46262
46263
46264
46265
46266
46267
46268
46269
# File 'lib/pago/v2026_04/models.rb', line 46260

def initialize(
  type:,
  timestamp:,
  data:
)
  super()
  assign(:type, type)
  assign(:timestamp, timestamp)
  assign(:data, data)
end

Instance Attribute Details

#dataModels::Subscription (readonly)



46258
46259
46260
# File 'lib/pago/v2026_04/models.rb', line 46258

def data
  @data
end

#timestampString (readonly)

Returns:

  • (String)


46255
46256
46257
# File 'lib/pago/v2026_04/models.rb', line 46255

def timestamp
  @timestamp
end

#typeString (readonly)

Returns:

  • (String)


46252
46253
46254
# File 'lib/pago/v2026_04/models.rb', line 46252

def type
  @type
end

Class Method Details

.from_json(data) ⇒ WebhookSubscriptionUncanceledPayload?

Parameters:

  • data (Hash, String, nil)

Returns:



46273
46274
46275
46276
46277
46278
46279
46280
46281
46282
46283
46284
46285
46286
# File 'lib/pago/v2026_04/models.rb', line 46273

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