Class: Pago::V2026_04::Models::WebhookEndpoint
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A webhook endpoint.
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", url: "url", name: "name", format: "format", secret: "secret", organization_id: "organization_id", events: "events", enabled: "enabled" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "url", "format", "secret", "organization_id", "events", "enabled"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#enabled ⇒ Boolean
readonly
Whether the webhook endpoint is enabled and will receive events.
-
#events ⇒ Array<String>
readonly
The events that will trigger the webhook.
- #format ⇒ String readonly
-
#id ⇒ String
readonly
The ID of the object.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#name ⇒ String?
readonly
An optional name for the webhook endpoint to help organize and identify it.
-
#organization_id ⇒ String
readonly
The organization ID associated with the webhook endpoint.
-
#secret ⇒ String
readonly
The secret used to sign the webhook events.
-
#url ⇒ String
readonly
The URL where the webhook events will be sent.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, url:, name: ::Pago::UNSET, format:, secret:, organization_id:, events:, enabled:) ⇒ WebhookEndpoint
constructor
A new instance of WebhookEndpoint.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, url:, name: ::Pago::UNSET, format:, secret:, organization_id:, events:, enabled:) ⇒ WebhookEndpoint
Returns a new instance of WebhookEndpoint.
44175 44176 44177 44178 44179 44180 44181 44182 44183 44184 44185 44186 44187 44188 44189 44190 44191 44192 44193 44194 44195 44196 44197 44198 |
# File 'lib/pago/v2026_04/models.rb', line 44175 def initialize( created_at:, modified_at:, id:, url:, name: ::Pago::UNSET, format:, secret:, organization_id:, events:, enabled: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:url, url) assign(:name, name) assign(:format, format) assign(:secret, secret) assign(:organization_id, organization_id) assign(:events, events) assign(:enabled, enabled) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
44138 44139 44140 |
# File 'lib/pago/v2026_04/models.rb', line 44138 def created_at @created_at end |
#enabled ⇒ Boolean (readonly)
Whether the webhook endpoint is enabled and will receive events.
44173 44174 44175 |
# File 'lib/pago/v2026_04/models.rb', line 44173 def enabled @enabled end |
#events ⇒ Array<String> (readonly)
The events that will trigger the webhook.
44169 44170 44171 |
# File 'lib/pago/v2026_04/models.rb', line 44169 def events @events end |
#format ⇒ String (readonly)
44157 44158 44159 |
# File 'lib/pago/v2026_04/models.rb', line 44157 def format @format end |
#id ⇒ String (readonly)
The ID of the object.
44146 44147 44148 |
# File 'lib/pago/v2026_04/models.rb', line 44146 def id @id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
44142 44143 44144 |
# File 'lib/pago/v2026_04/models.rb', line 44142 def modified_at @modified_at end |
#name ⇒ String? (readonly)
An optional name for the webhook endpoint to help organize and identify it.
44154 44155 44156 |
# File 'lib/pago/v2026_04/models.rb', line 44154 def name @name end |
#organization_id ⇒ String (readonly)
The organization ID associated with the webhook endpoint.
44165 44166 44167 |
# File 'lib/pago/v2026_04/models.rb', line 44165 def organization_id @organization_id end |
#secret ⇒ String (readonly)
The secret used to sign the webhook events.
44161 44162 44163 |
# File 'lib/pago/v2026_04/models.rb', line 44161 def secret @secret end |
#url ⇒ String (readonly)
The URL where the webhook events will be sent.
44150 44151 44152 |
# File 'lib/pago/v2026_04/models.rb', line 44150 def url @url end |
Class Method Details
.from_json(data) ⇒ WebhookEndpoint?
44202 44203 44204 44205 44206 44207 44208 44209 44210 44211 44212 44213 44214 44215 44216 44217 44218 44219 44220 44221 44222 |
# File 'lib/pago/v2026_04/models.rb', line 44202 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( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), url: (data.key?("url") ? data["url"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), format: (data.key?("format") ? data["format"] : ::Pago::UNSET), secret: (data.key?("secret") ? data["secret"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), events: (data.key?("events") ? data["events"] : ::Pago::UNSET), enabled: (data.key?("enabled") ? data["enabled"] : ::Pago::UNSET) ), data ) end |