Class: Eventbrite::Webhook

Inherits:
APIArrayResource show all
Defined in:
lib/eventbrite/resources/webhook.rb

Instance Attribute Summary

Attributes inherited from EventbriteObject

#token

Class Method Summary collapse

Methods inherited from APIArrayResource

all

Methods inherited from APIResource

class_name, #refresh, retrieve, url, #url

Methods inherited from EventbriteObject

#[], #[]=, #as_json, construct_from, #each, #initialize, #inspect, #keys, #next?, #next_page, #paginated?, #refresh_from, #to_hash, #to_json, #to_s, #values

Constructor Details

This class inherits a constructor from Eventbrite::EventbriteObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Eventbrite::EventbriteObject

Class Method Details

.create(body, token = nil) ⇒ Object



3
4
5
6
# File 'lib/eventbrite/resources/webhook.rb', line 3

def self.create(body, token=nil)
  response, token = Eventbrite.request(:post, url, token, body)
  Util.convert_to_eventbrite_object(response, token)
end

.delete(id, token = nil) ⇒ Object



8
9
10
11
12
# File 'lib/eventbrite/resources/webhook.rb', line 8

def self.delete(id, token=nil)
  instance = self.new(id, token)
  response, token = Eventbrite.request(:delete, instance.url, token)
  Util.convert_to_eventbrite_object(response, token)
end