Class: Podio::PromotionGroupMember
Instance Attribute Summary
#attributes
Class Method Summary
collapse
#==, #[], #[]=, #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
Class Method Details
.add_members(promotion_group_id, attributes) ⇒ Object
23
24
25
26
27
28
|
# File 'lib/podio/models/promotion_group_member.rb', line 23
def add_members(promotion_group_id, attributes)
Podio.connection.post { |req|
req.url "/promotion_group/#{promotion_group_id}/members/add"
req.body = attributes
}.status
end
|
.create(attributes) ⇒ Object
10
11
12
13
14
15
|
# File 'lib/podio/models/promotion_group_member.rb', line 10
def create(attributes)
member Podio.connection.post { |req|
req.url("/promotion_group/#{attributes[:promotion_group_id]}/add")
req.body = attributes
}.body
end
|
.find_all(promotion_group_id, options = {}) ⇒ Object
17
18
19
20
21
|
# File 'lib/podio/models/promotion_group_member.rb', line 17
def find_all(promotion_group_id, options = {})
Podio.connection.get { |req|
req.url("/promotion_group/#{promotion_group_id}/members", options)
}.body
end
|