Class: Pago::V2026_04::Models::WebhookEndpointCreate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema to create a webhook endpoint.
Constant Summary collapse
- JSON_KEYS =
{ url: "url", name: "name", format: "format", events: "events", organization_id: "organization_id" }.freeze
- REQUIRED_KEYS =
["url", "format", "events"].freeze
Instance Attribute Summary collapse
-
#events ⇒ Array<String>
readonly
The events that will trigger the webhook.
- #format ⇒ String readonly
-
#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.
-
#url ⇒ String
readonly
The URL where the webhook events will be sent.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url:, name: ::Pago::UNSET, format:, events:, organization_id: ::Pago::UNSET) ⇒ WebhookEndpointCreate
constructor
A new instance of WebhookEndpointCreate.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(url:, name: ::Pago::UNSET, format:, events:, organization_id: ::Pago::UNSET) ⇒ WebhookEndpointCreate
Returns a new instance of WebhookEndpointCreate.
44255 44256 44257 44258 44259 44260 44261 44262 44263 44264 44265 44266 44267 44268 |
# File 'lib/pago/v2026_04/models.rb', line 44255 def initialize( url:, name: ::Pago::UNSET, format:, events:, organization_id: ::Pago::UNSET ) super() assign(:url, url) assign(:name, name) assign(:format, format) assign(:events, events) assign(:organization_id, organization_id) end |
Instance Attribute Details
#events ⇒ Array<String> (readonly)
The events that will trigger the webhook.
44249 44250 44251 |
# File 'lib/pago/v2026_04/models.rb', line 44249 def events @events end |
#format ⇒ String (readonly)
44245 44246 44247 |
# File 'lib/pago/v2026_04/models.rb', line 44245 def format @format end |
#name ⇒ String? (readonly)
An optional name for the webhook endpoint to help organize and identify it.
44242 44243 44244 |
# File 'lib/pago/v2026_04/models.rb', line 44242 def name @name end |
#organization_id ⇒ String? (readonly)
The organization ID associated with the webhook endpoint. Required unless you use an organization token.
44253 44254 44255 |
# File 'lib/pago/v2026_04/models.rb', line 44253 def organization_id @organization_id end |
#url ⇒ String (readonly)
The URL where the webhook events will be sent.
44238 44239 44240 |
# File 'lib/pago/v2026_04/models.rb', line 44238 def url @url end |
Class Method Details
.from_json(data) ⇒ WebhookEndpointCreate?
44272 44273 44274 44275 44276 44277 44278 44279 44280 44281 44282 44283 44284 44285 44286 44287 |
# File 'lib/pago/v2026_04/models.rb', line 44272 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( url: (data.key?("url") ? data["url"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), format: (data.key?("format") ? data["format"] : ::Pago::UNSET), events: (data.key?("events") ? data["events"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET) ), data ) end |