Class: Payrex::Entities::Webhook

Inherits:
Object
  • Object
show all
Defined in:
lib/entities/webhook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#eventsObject (readonly)

Returns the value of attribute events.



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

def events
  @events
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



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

def livemode
  @livemode
end

#resourceObject (readonly)

Returns the value of attribute resource.



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

def resource
  @resource
end

#secret_keyObject (readonly)

Returns the value of attribute secret_key.



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

def secret_key
  @secret_key
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#urlObject (readonly)

Returns the value of attribute url.



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

def url
  @url
end