Class: Rerout::Models::CreatedWebhook
- Inherits:
-
Object
- Object
- Rerout::Models::CreatedWebhook
- Defined in:
- lib/rerout/models.rb
Overview
Result of creating a webhook. The ‘signing_secret` (`whsec_…`) is returned once — store it now; it is never shown again.
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#signing_secret ⇒ Object
readonly
Returns the value of attribute signing_secret.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(endpoint:, signing_secret:) ⇒ CreatedWebhook
constructor
A new instance of CreatedWebhook.
- #to_h ⇒ Object
Constructor Details
#initialize(endpoint:, signing_secret:) ⇒ CreatedWebhook
Returns a new instance of CreatedWebhook.
357 358 359 360 361 |
# File 'lib/rerout/models.rb', line 357 def initialize(endpoint:, signing_secret:) @endpoint = endpoint @signing_secret = signing_secret freeze end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
355 356 357 |
# File 'lib/rerout/models.rb', line 355 def endpoint @endpoint end |
#signing_secret ⇒ Object (readonly)
Returns the value of attribute signing_secret.
355 356 357 |
# File 'lib/rerout/models.rb', line 355 def signing_secret @signing_secret end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
374 375 376 |
# File 'lib/rerout/models.rb', line 374 def ==(other) other.is_a?(CreatedWebhook) && other.to_h == to_h end |
#hash ⇒ Object
379 380 381 |
# File 'lib/rerout/models.rb', line 379 def hash to_h.hash end |
#to_h ⇒ Object
370 371 372 |
# File 'lib/rerout/models.rb', line 370 def to_h { endpoint: endpoint.to_h, signing_secret: signing_secret } end |