class ChargeBee::Event
Attributes
api_version[RW]
event_type[RW]
id[RW]
occurred_at[RW]
source[RW]
user[RW]
webhook_failure_reason[RW]
webhook_status[RW]
webhooks[RW]
Public Class Methods
deserialize(json)
click to toggle source
# File lib/chargebee/models/event.rb, line 18 def self.deserialize(json) begin webhook_data = JSON.parse(json) rescue JSON::ParserError => e raise Error.new("Invalid webhook object to deserialize. #{e}",e) end api_version = webhook_data["api_version"] if api_version != nil && api_version.casecmp(Environment::API_VERSION) != 0 raise Error.new("API version [#{api_version.upcase}] in response does not match with client library API version [#{Environment::API_VERSION.upcase}]") end webhook_data = Util.symbolize_keys(webhook_data) Event.construct(webhook_data) end
list(params={}, env=nil, headers={})
click to toggle source
OPERATIONS
# File lib/chargebee/models/event.rb, line 37 def self.list(params={}, env=nil, headers={}) Request.send_list_request('get', uri_path("events"), params, env, headers) end
retrieve(id, env=nil, headers={})
click to toggle source
# File lib/chargebee/models/event.rb, line 41 def self.retrieve(id, env=nil, headers={}) Request.send('get', uri_path("events",id.to_s), {}, env, headers) end
Public Instance Methods
content()
click to toggle source
# File lib/chargebee/models/event.rb, line 14 def content Content.new(@values[:content]) end