Class: Paymongo::Entities::Webhook

Inherits:
BaseEntity show all
Defined in:
lib/paymongo/entities/webhook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atObject (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

#eventsObject (readonly)

Returns the value of attribute events.



4
5
6
# File 'lib/paymongo/entities/webhook.rb', line 4

def events
  @events
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/paymongo/entities/webhook.rb', line 4

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



4
5
6
# File 'lib/paymongo/entities/webhook.rb', line 4

def livemode
  @livemode
end

#secret_keyObject (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

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/paymongo/entities/webhook.rb', line 4

def status
  @status
end

#updated_atObject (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

#urlObject (readonly)

Returns the value of attribute url.



4
5
6
# File 'lib/paymongo/entities/webhook.rb', line 4

def url
  @url
end