Class: Mindee::V2::Parsing::Search::ModelWebhook
- Inherits:
-
Object
- Object
- Mindee::V2::Parsing::Search::ModelWebhook
- Defined in:
- lib/mindee/v2/parsing/search/model_webhook.rb
Overview
Individual webhook information.
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
ID of the webhook.
-
#name ⇒ String
readonly
Name of the webhook.
-
#url ⇒ String
readonly
URL of the webhook.
Instance Method Summary collapse
-
#initialize(payload) ⇒ ModelWebhook
constructor
A new instance of ModelWebhook.
-
#to_s ⇒ String
String representation of the model.
Constructor Details
#initialize(payload) ⇒ ModelWebhook
Returns a new instance of ModelWebhook.
19 20 21 22 23 |
# File 'lib/mindee/v2/parsing/search/model_webhook.rb', line 19 def initialize(payload) @id = payload['id'] @name = payload['name'] @url = payload['url'] end |
Instance Attribute Details
#id ⇒ String (readonly)
Returns ID of the webhook.
10 11 12 |
# File 'lib/mindee/v2/parsing/search/model_webhook.rb', line 10 def id @id end |
#name ⇒ String (readonly)
Returns Name of the webhook.
13 14 15 |
# File 'lib/mindee/v2/parsing/search/model_webhook.rb', line 13 def name @name end |
#url ⇒ String (readonly)
Returns URL of the webhook.
16 17 18 |
# File 'lib/mindee/v2/parsing/search/model_webhook.rb', line 16 def url @url end |
Instance Method Details
#to_s ⇒ String
String representation of the model.
27 28 29 30 31 32 33 |
# File 'lib/mindee/v2/parsing/search/model_webhook.rb', line 27 def to_s [ ":Name: #{@name}", ":ID: #{@id}", ":URL: #{@url}", ].join("\n") end |