Class: Pago::V2026_04::Models::WebhookDelivery
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A webhook delivery for a webhook event.
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", succeeded: "succeeded", http_code: "http_code", response: "response", webhook_event: "webhook_event" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "succeeded", "http_code", "response", "webhook_event"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#http_code ⇒ Integer?
readonly
The HTTP code returned by the URL.
-
#id ⇒ String
readonly
The ID of the object.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#response ⇒ String?
readonly
The response body returned by the URL, or the error message if the endpoint was unreachable.
-
#succeeded ⇒ Boolean
readonly
Whether the delivery was successful.
- #webhook_event ⇒ Models::WebhookEvent readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, succeeded:, http_code:, response:, webhook_event:) ⇒ WebhookDelivery
constructor
A new instance of WebhookDelivery.
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:, succeeded:, http_code:, response:, webhook_event:) ⇒ WebhookDelivery
Returns a new instance of WebhookDelivery.
44079 44080 44081 44082 44083 44084 44085 44086 44087 44088 44089 44090 44091 44092 44093 44094 44095 44096 |
# File 'lib/pago/v2026_04/models.rb', line 44079 def initialize( created_at:, modified_at:, id:, succeeded:, http_code:, response:, webhook_event: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:succeeded, succeeded) assign(:http_code, http_code) assign(:response, response) assign(:webhook_event, webhook_event) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
44054 44055 44056 |
# File 'lib/pago/v2026_04/models.rb', line 44054 def created_at @created_at end |
#http_code ⇒ Integer? (readonly)
The HTTP code returned by the URL. null if the endpoint was unreachable.
44070 44071 44072 |
# File 'lib/pago/v2026_04/models.rb', line 44070 def http_code @http_code end |
#id ⇒ String (readonly)
The ID of the object.
44062 44063 44064 |
# File 'lib/pago/v2026_04/models.rb', line 44062 def id @id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
44058 44059 44060 |
# File 'lib/pago/v2026_04/models.rb', line 44058 def modified_at @modified_at end |
#response ⇒ String? (readonly)
The response body returned by the URL, or the error message if the endpoint was unreachable.
44074 44075 44076 |
# File 'lib/pago/v2026_04/models.rb', line 44074 def response @response end |
#succeeded ⇒ Boolean (readonly)
Whether the delivery was successful.
44066 44067 44068 |
# File 'lib/pago/v2026_04/models.rb', line 44066 def succeeded @succeeded end |
#webhook_event ⇒ Models::WebhookEvent (readonly)
44077 44078 44079 |
# File 'lib/pago/v2026_04/models.rb', line 44077 def webhook_event @webhook_event end |
Class Method Details
.from_json(data) ⇒ WebhookDelivery?
44100 44101 44102 44103 44104 44105 44106 44107 44108 44109 44110 44111 44112 44113 44114 44115 44116 44117 |
# File 'lib/pago/v2026_04/models.rb', line 44100 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), succeeded: (data.key?("succeeded") ? data["succeeded"] : ::Pago::UNSET), http_code: (data.key?("http_code") ? data["http_code"] : ::Pago::UNSET), response: (data.key?("response") ? data["response"] : ::Pago::UNSET), webhook_event: (data.key?("webhook_event") ? Models::WebhookEvent.from_json(data["webhook_event"]) : ::Pago::UNSET) ), data ) end |