Class: Unresponsys::Event
- Extended by:
- Forwardable
- Defined in:
- lib/unresponsys/event.rb
Instance Attribute Summary collapse
-
#member ⇒ Object
readonly
Returns the value of attribute member.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Event
constructor
A new instance of Event.
- #save ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Event
Returns a new instance of Event.
7 8 9 10 11 |
# File 'lib/unresponsys/event.rb', line 7 def initialize( = {}) @event_name = [:event] @member = [:member] @properties = [:properties] end |
Instance Attribute Details
#member ⇒ Object (readonly)
Returns the value of attribute member.
5 6 7 |
# File 'lib/unresponsys/event.rb', line 5 def member @member end |
Instance Method Details
#save ⇒ Object
13 14 15 16 17 18 |
# File 'lib/unresponsys/event.rb', line 13 def save build_body build_properties response = client.post("/events/#{@event_name}", body: @body.to_json) response.first['errorMessage'].blank? end |