Class: Paid::Event

Inherits:
APIResource show all
Defined in:
lib/paid/event.rb

Instance Attribute Summary collapse

Attributes inherited from APIResource

#api_method, #json

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from APIResource

add_api_attribute, api_attribute_names, #api_attributes, api_subclass_fetch, api_subclasses, #changed_api_attributes, #clear_api_attributes, determine_api_attribute_value, #determine_api_attribute_value, #initialize, #inspect, #inspect_api_attributes, #inspect_nested, #refresh_from, register_api_subclass, #to_json

Constructor Details

This class inherits a constructor from Paid::APIResource

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



5
6
7
# File 'lib/paid/event.rb', line 5

def created_at
  @created_at
end

#dataObject (readonly)

Returns the value of attribute data.



7
8
9
# File 'lib/paid/event.rb', line 7

def data
  @data
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/paid/event.rb', line 3

def id
  @id
end

#objectObject (readonly)

Returns the value of attribute object.



4
5
6
# File 'lib/paid/event.rb', line 4

def object
  @object
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/paid/event.rb', line 6

def type
  @type
end

Class Method Details

.all(params = {}, headers = {}) ⇒ Object



9
10
11
12
# File 'lib/paid/event.rb', line 9

def self.all(params={}, headers={})
  method = APIMethod.new(:get, "/events", params, headers, self)
  APIList.new(self, method.execute, method)
end

.retrieve(id, params = {}, headers = {}) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/paid/event.rb', line 14

def self.retrieve(id, params={}, headers={})
  params = ParamsBuilder.merge(params, {
    :id => id
  })
  method = APIMethod.new(:get, "/events/:id", params, headers, self)
  self.new(method.execute, method)
end

Instance Method Details

#refresh(params = {}, headers = {}) ⇒ Object



22
23
24
25
# File 'lib/paid/event.rb', line 22

def refresh(params={}, headers={})
  method = APIMethod.new(:get, "/events/:id", params, headers, self)
  self.refresh_from(method.execute, method)
end