lib/sorenson/services/group.rb in 360_services-0.0.8 vs lib/sorenson/services/group.rb in 360_services-1.0.0
- old
+ new
@@ -1,22 +1,11 @@
module Sorenson
module Services
class Group < Base
attr_accessor :name, :description, :account_id, :id, :guid
- def self.presets(group_id)
- get_from("/groups/#{group_id}/presets")
- end
-
def self.create(name, attributes={})
data = post_to("/groups", :group => attributes.merge(:name => name))
- new(data['group'])
- end
-
- def self.update(name, attributes={})
- attributes[:preset_ids] = (attributes[:preset_ids] || []).join(",")
- guid = attributes.delete(:group_id)
- data = put_to("/groups/#{guid}", :group => attributes.merge({:name => name, :id => guid}))
new(data['group'])
end
def self.all
collection = Base.get_from("/groups")
\ No newline at end of file