Class: Podio::ConditionSet

Inherits:
ActivePodio::Base show all
Defined in:
lib/podio/models/condition_set.rb

Instance Attribute Summary

Attributes inherited from ActivePodio::Base

#attributes

Class Method Summary collapse

Methods inherited from ActivePodio::Base

#==, #[], #[]=, #api_friendly_ref_type, #as_json, collection, delegate_to_hash, has_many, has_one, #hash, #initialize, #initialize_attributes, klass_from_string, list, member, #new_record?, output_attribute_as_json, #parent_model, #persisted?, property, #to_param

Constructor Details

This class inherits a constructor from ActivePodio::Base

Class Method Details

.create(attributes) ⇒ Object



21
22
23
24
25
26
# File 'lib/podio/models/condition_set.rb', line 21

def create(attributes)
  member Podio.connection.post { |req|
    req.url("/condition_set/")
    req.body = attributes
  }.body
end

.delete(condition_set_id) ⇒ Object



35
36
37
# File 'lib/podio/models/condition_set.rb', line 35

def delete(condition_set_id)
  Podio.connection.delete("/condition_set/#{condition_set_id}")
end

.find(condition_set_id) ⇒ Object



17
18
19
# File 'lib/podio/models/condition_set.rb', line 17

def find(condition_set_id)
  member Podio.connection.get("/condition_set/#{condition_set_id}").body
end

.find_all(options = {}) ⇒ Object



11
12
13
14
15
# File 'lib/podio/models/condition_set.rb', line 11

def find_all(options={})
  list Podio.connection.get { |req|
    req.url("/condition_set/", options)
  }.body
end

.update(condition_set_id, attributes) ⇒ Object



28
29
30
31
32
33
# File 'lib/podio/models/condition_set.rb', line 28

def update(condition_set_id, attributes)
  member Podio.connection.put { |req|
    req.url("/condition_set/#{condition_set_id}")
    req.body = attributes
  }.body
end