Module: NgpVan::Client::SupporterGroups

Included in:
NgpVan::Client
Defined in:
lib/ngp_van/client/supporter_groups.rb

Instance Method Summary collapse

Instance Method Details

#add_person_to_supporter_group(supporter_group_id:, id:) ⇒ Object



24
25
26
27
# File 'lib/ngp_van/client/supporter_groups.rb', line 24

def add_person_to_supporter_group(supporter_group_id:, id:)
  verify_ids(id, supporter_group_id)
  put(path: "supporterGroups/#{supporter_group_id}/people/#{id}")
end

#create_supporter_group(body: {}) ⇒ Object



6
7
8
# File 'lib/ngp_van/client/supporter_groups.rb', line 6

def create_supporter_group(body: {})
  post(path: 'supporterGroups', body: body)
end

#delete_supporter_group(id:, params: {}) ⇒ Object



19
20
21
22
# File 'lib/ngp_van/client/supporter_groups.rb', line 19

def delete_supporter_group(id:, params: {})
  verify_id(id)
  delete(path: "supporterGroups/#{id}", params: params)
end

#remove_person_from_supporter_group(supporter_group_id:, id:) ⇒ Object



29
30
31
32
# File 'lib/ngp_van/client/supporter_groups.rb', line 29

def remove_person_from_supporter_group(supporter_group_id:, id:)
  verify_ids(id, supporter_group_id)
  delete(path: "supporterGroups/#{supporter_group_id}/people/#{id}")
end

#supporter_group(id:, params: {}) ⇒ Object



10
11
12
13
# File 'lib/ngp_van/client/supporter_groups.rb', line 10

def supporter_group(id:, params: {})
  verify_id(id)
  get(path: "supporterGroups/#{id}", params: params)
end

#supporter_groups(params: {}) ⇒ Object



15
16
17
# File 'lib/ngp_van/client/supporter_groups.rb', line 15

def supporter_groups(params: {})
  get(path: 'supporterGroups', params: params)
end