Class: ChargeBee::Event
Defined Under Namespace
Classes: Content
Instance Attribute Summary collapse
-
#event_type ⇒ Object
Returns the value of attribute event_type.
-
#id ⇒ Object
Returns the value of attribute id.
-
#occurred_at ⇒ Object
Returns the value of attribute occurred_at.
-
#source ⇒ Object
Returns the value of attribute source.
-
#webhook_failure_reason ⇒ Object
Returns the value of attribute webhook_failure_reason.
-
#webhook_status ⇒ Object
Returns the value of attribute webhook_status.
Class Method Summary collapse
- .deserialize(json) ⇒ Object
-
.list(params = {}, env = nil) ⇒ Object
OPERATIONS ———–.
- .retrieve(id, env = nil) ⇒ Object
Instance Method Summary collapse
Methods inherited from Model
construct, #initialize, #inspect, #load, #method_missing, #to_s, uri_path
Constructor Details
This class inherits a constructor from ChargeBee::Model
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ChargeBee::Model
Instance Attribute Details
#event_type ⇒ Object
Returns the value of attribute event_type.
4 5 6 |
# File 'lib/chargebee/models/event.rb', line 4 def event_type @event_type end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/chargebee/models/event.rb', line 4 def id @id end |
#occurred_at ⇒ Object
Returns the value of attribute occurred_at.
4 5 6 |
# File 'lib/chargebee/models/event.rb', line 4 def occurred_at @occurred_at end |
#source ⇒ Object
Returns the value of attribute source.
4 5 6 |
# File 'lib/chargebee/models/event.rb', line 4 def source @source end |
#webhook_failure_reason ⇒ Object
Returns the value of attribute webhook_failure_reason.
4 5 6 |
# File 'lib/chargebee/models/event.rb', line 4 def webhook_failure_reason @webhook_failure_reason end |
#webhook_status ⇒ Object
Returns the value of attribute webhook_status.
4 5 6 |
# File 'lib/chargebee/models/event.rb', line 4 def webhook_status @webhook_status end |
Class Method Details
.deserialize(json) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/chargebee/models/event.rb', line 13 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 |