Class: TrueTrial::Types::WebhookSubscription
- Inherits:
-
Object
- Object
- TrueTrial::Types::WebhookSubscription
- Defined in:
- lib/truetrial/types/webhook_subscription.rb
Overview
Represents a webhook subscription returned from the TrueTrial API.
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
-
.from_hash(hash) ⇒ WebhookSubscription
Builds a WebhookSubscription from an API response hash.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ WebhookSubscription
constructor
A new instance of WebhookSubscription.
Constructor Details
#initialize(attributes = {}) ⇒ WebhookSubscription
Returns a new instance of WebhookSubscription.
10 11 12 13 14 15 16 17 18 |
# File 'lib/truetrial/types/webhook_subscription.rb', line 10 def initialize(attributes = {}) @id = attributes["id"] @url = attributes["url"] @events = attributes["events"] @secret = attributes["secret"] @active = attributes["active"] @created_at = attributes["created_at"] @updated_at = attributes["updated_at"] end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
7 8 9 |
# File 'lib/truetrial/types/webhook_subscription.rb', line 7 def active @active end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/truetrial/types/webhook_subscription.rb', line 7 def created_at @created_at end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
7 8 9 |
# File 'lib/truetrial/types/webhook_subscription.rb', line 7 def events @events end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/truetrial/types/webhook_subscription.rb', line 7 def id @id end |
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
7 8 9 |
# File 'lib/truetrial/types/webhook_subscription.rb', line 7 def secret @secret end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
7 8 9 |
# File 'lib/truetrial/types/webhook_subscription.rb', line 7 def updated_at @updated_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/truetrial/types/webhook_subscription.rb', line 7 def url @url end |
Class Method Details
.from_hash(hash) ⇒ WebhookSubscription
Builds a WebhookSubscription from an API response hash.
24 25 26 |
# File 'lib/truetrial/types/webhook_subscription.rb', line 24 def self.from_hash(hash) new(hash) end |