Class: Payrex::Entities::Webhook
- Inherits:
-
Object
- Object
- Payrex::Entities::Webhook
- Defined in:
- lib/entities/webhook.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#secret_key ⇒ Object
readonly
Returns the value of attribute secret_key.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#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(api_resource) ⇒ Webhook
constructor
A new instance of Webhook.
Constructor Details
#initialize(api_resource) ⇒ Webhook
Returns a new instance of Webhook.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/entities/webhook.rb', line 15 def initialize(api_resource) @id = api_resource.data["id"] @resource = api_resource.data["resource"] @secret_key = api_resource.data["secret_key"] @status = api_resource.data["status"] @description = api_resource.data["description"] @livemode = api_resource.data["livemode"] @url = api_resource.data["url"] @events = api_resource.data["events"] @created_at = api_resource.data["created_at"] @updated_at = api_resource.data["updated_at"] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def description @description end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def events @events end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def id @id end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def livemode @livemode end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def resource @resource end |
#secret_key ⇒ Object (readonly)
Returns the value of attribute secret_key.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def secret_key @secret_key end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def status @status end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def updated_at @updated_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/entities/webhook.rb', line 4 def url @url end |