Class: Pago::V2026_04::Models::WebhookBenefitGrantCycledPayload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Sent when a benefit grant is cycled, meaning the related subscription has been renewed for another period.
Discord & Slack support: Basic
Constant Summary collapse
- JSON_KEYS =
{ type: "type", timestamp: "timestamp", data: "data" }.freeze
- REQUIRED_KEYS =
["type", "timestamp", "data"].freeze
Instance Attribute Summary collapse
- #data ⇒ Object readonly
- #timestamp ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, timestamp:, data:) ⇒ WebhookBenefitGrantCycledPayload
constructor
A new instance of WebhookBenefitGrantCycledPayload.
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:) ⇒ WebhookBenefitGrantCycledPayload
Returns a new instance of WebhookBenefitGrantCycledPayload.
44575 44576 44577 44578 44579 44580 44581 44582 44583 44584 |
# File 'lib/pago/v2026_04/models.rb', line 44575 def initialize( type:, timestamp:, data: ) super() assign(:type, type) assign(:timestamp, ) assign(:data, data) end |
Instance Attribute Details
#data ⇒ Object (readonly)
44573 44574 44575 |
# File 'lib/pago/v2026_04/models.rb', line 44573 def data @data end |
#timestamp ⇒ String (readonly)
44570 44571 44572 |
# File 'lib/pago/v2026_04/models.rb', line 44570 def @timestamp end |
#type ⇒ String (readonly)
44567 44568 44569 |
# File 'lib/pago/v2026_04/models.rb', line 44567 def type @type end |
Class Method Details
.from_json(data) ⇒ WebhookBenefitGrantCycledPayload?
44588 44589 44590 44591 44592 44593 44594 44595 44596 44597 44598 44599 44600 44601 |
# File 'lib/pago/v2026_04/models.rb', line 44588 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") ? Unions::BenefitGrantWebhook.from_json(data["data"]) : ::Pago::UNSET) ), data ) end |