Class: Paymongo::Entities::Webhook
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- Paymongo::Entities::Webhook
- Defined in:
- lib/paymongo/entities/webhook.rb
Instance Attribute Summary collapse
-
#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.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#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.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/paymongo/entities/webhook.rb', line 13 def initialize(api_resource) @id = api_resource.id @events = api_resource.attributes['events'] @livemode = api_resource.attributes['livemode'] @status = api_resource.attributes['status'] @secret_key = api_resource.attributes['secret_key'] @url = api_resource.attributes['url'] @created_at = api_resource.attributes['created_at'] @updated_at = api_resource.attributes['updated_at'] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/paymongo/entities/webhook.rb', line 4 def created_at @created_at end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
4 5 6 |
# File 'lib/paymongo/entities/webhook.rb', line 4 def events @events end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/paymongo/entities/webhook.rb', line 4 def id @id end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/paymongo/entities/webhook.rb', line 4 def livemode @livemode end |
#secret_key ⇒ Object (readonly)
Returns the value of attribute secret_key.
4 5 6 |
# File 'lib/paymongo/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/paymongo/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/paymongo/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/paymongo/entities/webhook.rb', line 4 def url @url end |