Class: DuffelAPI::Resources::Webhook
- Inherits:
-
BaseResource
- Object
- BaseResource
- DuffelAPI::Resources::Webhook
- Defined in:
- lib/duffel_api/resources/webhook.rb
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.
-
#live_mode ⇒ Object
readonly
Returns the value of attribute live_mode.
-
#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.
Instance Method Summary collapse
-
#initialize(object, response = nil) ⇒ Webhook
constructor
A new instance of Webhook.
Methods inherited from BaseResource
Constructor Details
#initialize(object, response = nil) ⇒ Webhook
Returns a new instance of Webhook.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/duffel_api/resources/webhook.rb', line 16 def initialize(object, response = nil) @object = object @active = object["active"] @created_at = object["created_at"] @events = object["events"] @id = object["id"] @live_mode = object["live_mode"] @secret = object["secret"] @updated_at = object["updated_at"] @url = object["url"] super(object, response) end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
7 8 9 |
# File 'lib/duffel_api/resources/webhook.rb', line 7 def active @active end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/duffel_api/resources/webhook.rb', line 8 def created_at @created_at end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
9 10 11 |
# File 'lib/duffel_api/resources/webhook.rb', line 9 def events @events end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/duffel_api/resources/webhook.rb', line 10 def id @id end |
#live_mode ⇒ Object (readonly)
Returns the value of attribute live_mode.
11 12 13 |
# File 'lib/duffel_api/resources/webhook.rb', line 11 def live_mode @live_mode end |
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
12 13 14 |
# File 'lib/duffel_api/resources/webhook.rb', line 12 def secret @secret end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
13 14 15 |
# File 'lib/duffel_api/resources/webhook.rb', line 13 def updated_at @updated_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
14 15 16 |
# File 'lib/duffel_api/resources/webhook.rb', line 14 def url @url end |