Class: Zferral::Event
- Defined in:
- lib/zferral/resources/event.rb
Overview
A Zferral Event Resource
Class Method Summary collapse
-
.call(params = {}) ⇒ Object
The event/call API method, used to register an event (i.e. sale).
-
.call_recurring(params = {}) ⇒ Object
A special invocation of the event/call API method, used to register recurring revenue events.
-
.fetch(id) ⇒ Object
Not supported by Event.
-
.list ⇒ Object
Not supported by Event.
Methods inherited from Resource
api_token, connect, find, resource_name, resource_names, subdomain
Class Method Details
.call(params = {}) ⇒ Object
The event/call API method, used to register an event (i.e. sale)
7 8 9 10 |
# File 'lib/zferral/resources/event.rb', line 7 def self.call(params = {}) response = post("/event/call.json", :body => {:event => params}.to_json).parsed_response handle_fetch response end |
.call_recurring(params = {}) ⇒ Object
A special invocation of the event/call API method, used to register recurring revenue events.
These calls add the ignore_cookie
flag, so that an affiliate ID or cookie is not needed. Instead, the affiliate to credit is identified by the customer_id
attribute, assuming that the customer_id
has been associated with the Affiliate already via a normal .call method or via the Zferral tracking code (img tag or javascript).
18 19 20 21 |
# File 'lib/zferral/resources/event.rb', line 18 def self.call_recurring(params = {}) params.merge!(:ignore_cookie => '1') call(params) end |
.fetch(id) ⇒ Object
Not supported by Event
29 30 31 |
# File 'lib/zferral/resources/event.rb', line 29 def self.fetch(id) raise MethodNotSupported, "Event does not support the .fetch method" end |
.list ⇒ Object
Not supported by Event
24 25 26 |
# File 'lib/zferral/resources/event.rb', line 24 def self.list raise MethodNotSupported, "Event does not support the .list method" end |