Class: EasyPost::Event
- Inherits:
-
Resource
- Object
- EasyPostObject
- Resource
- EasyPost::Event
- Defined in:
- lib/easypost/event.rb
Overview
Webhook Events are triggered by changes in objects you've created via the API.
Instance Attribute Summary
Attributes inherited from EasyPostObject
#api_key, #name, #parent, #unsaved_values
Class Method Summary collapse
-
.receive(values) ⇒ Object
Converts a raw webhook event into an EasyPost object.
Methods inherited from Resource
all, class_name, create, #delete, each, #refresh, retrieve, #save, url, #url
Methods inherited from EasyPostObject
#[], #[]=, #as_json, construct_from, #deconstruct_keys, #each, #id, #id=, #initialize, #inspect, #keys, #refresh_from, #to_hash, #to_json, #to_s, #values
Constructor Details
This class inherits a constructor from EasyPost::EasyPostObject
Class Method Details
.receive(values) ⇒ Object
Converts a raw webhook event into an EasyPost object.
8 9 10 |
# File 'lib/easypost/event.rb', line 8 def self.receive(values) EasyPost::Util.convert_to_easypost_object(JSON.parse(values), nil) end |