Class: Serwersms::Groups

Inherits:
Object
  • Object
show all
Defined in:
lib/library/groups.rb

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Groups

Returns a new instance of Groups.



2
3
4
# File 'lib/library/groups.rb', line 2

def initialize(obj)
    @serwersms = obj
end

Instance Method Details

#add(name) ⇒ Object



14
15
16
17
18
# File 'lib/library/groups.rb', line 14

def add(name)
  params = {}
  params['name']  = name
  @serwersms.call('groups/add',params);
end

#check(phone) ⇒ Object



97
98
99
100
101
# File 'lib/library/groups.rb', line 97

def check(phone)
  params = {}
  params['phone']  = phone
  @serwersms.call('groups/check',params);
end

#delete(id) ⇒ Object



82
83
84
85
86
# File 'lib/library/groups.rb', line 82

def delete(id)
  params = {}
  params['id']  = id
  @serwersms.call('groups/delete',params);
end

#edit(id, name) ⇒ Object



68
69
70
71
72
73
# File 'lib/library/groups.rb', line 68

def edit(id, name)
  params = {}
  params['id']  = id
  params['name']  = name
  @serwersms.call('groups/edit',params);
end

#index(search = nil, params = {}) ⇒ Object



38
39
40
41
42
# File 'lib/library/groups.rb', line 38

def index(search = nil,params = {})

  params['search']     = search
  @serwersms.call('groups/index',params);
end

#view(id) ⇒ Object



53
54
55
56
57
# File 'lib/library/groups.rb', line 53

def view(id)
  params = {}
  params['id']  = id
  @serwersms.call('groups/view',params);
end