Sha256: 9a86238c3fd1692f16dd5e61117b95962aadd0139210d4934f92c6d09a449c86
Contents?: true
Size: 765 Bytes
Versions: 15
Compression:
Stored size: 765 Bytes
Contents
module ChargeBee class Event < Model attr_accessor :id, :occurred_at, :source, :webhook_status, :webhook_failure_reason, :event_type class Content < Result end def content Content.new(@values[:content]) end def self.deserialize(json) begin webhook_data = JSON.parse(json) rescue JSON::ParserError raise APIError.new("Invalid webhook object to deserialize") end webhook_data = Util.symbolize_keys(webhook_data) Event.construct(webhook_data) end # OPERATIONS #----------- def self.list(params={}, env=nil) Request.send('get', "/events", params, env) end def self.retrieve(id, env=nil) Request.send('get', "/events/#{id.to_s}", {}, env) end end # ~Event end # ~ChargeBee
Version data entries
15 entries across 15 versions & 1 rubygems