Class: PPC::Operation::Plan
Instance Attribute Summary
#id
Instance Method Summary
collapse
#delete_group, #get_group, #update_group
#call, #download, #get_obj, #initialize, #qihu_refresh_token
Instance Method Details
#add_group(groups) ⇒ Object
Overwirte add_group method to provide more function
31
32
33
|
# File 'lib/ppc/operation/plan.rb', line 31
def add_group( groups )
call('group').add( @auth, add_plan_id( groups ) )
end
|
#group_ids ⇒ Object
21
22
23
24
25
|
# File 'lib/ppc/operation/plan.rb', line 21
def group_ids()
result = call('group').search_id_by_plan_id(@auth, @id)
result[:result] = result[:result][0][:group_ids]
return result
end
|
#groups ⇒ Object
15
16
17
18
19
|
# File 'lib/ppc/operation/plan.rb', line 15
def groups()
result = call('group').search_by_plan_id(@auth, @id)
result[:result] = result[:result][0][:groups]
return result
end
|
#info ⇒ Object
7
8
9
|
# File 'lib/ppc/operation/plan.rb', line 7
def info
call('plan').get(@auth,@id)
end
|
#update(plan) ⇒ Object
11
12
13
|
# File 'lib/ppc/operation/plan.rb', line 11
def update( plan )
call('plan').update( @auth, plan.merge( id:@id ) )
end
|