Class: Podio::OrganizationProfile
Overview
Encapsulates an organization profile, primarily used for in app store
Instance Attribute Summary
#attributes, #error_code, #error_message, #error_parameters, #error_propagate
Class Method Summary
collapse
Instance Method Summary
collapse
#==, #[], #[]=, #api_friendly_ref_type, #as_json, collection, delegate_to_hash, handle_api_errors_for, has_many, has_one, #hash, #initialize, list, member, #new_record?, #persisted?, property, #to_param
Class Method Details
.create(org_id, attributes) ⇒ Object
40
41
42
43
44
45
46
47
|
# File 'lib/podio/models/organization_profile.rb', line 40
def create(org_id, attributes)
response = Podio.connection.post do |req|
req.url "/org/#{org_id}/appstore"
req.body = attributes
end
response.body
end
|
.delete(org_id) ⇒ Object
57
58
59
|
# File 'lib/podio/models/organization_profile.rb', line 57
def delete(org_id)
Podio.connection.delete("/org/#{org_id}/appstore").status
end
|
.find(org_id) ⇒ Object
36
37
38
|
# File 'lib/podio/models/organization_profile.rb', line 36
def find(org_id)
member Podio.connection.get("/org/#{org_id}/appstore").body
end
|
.update(org_id, attributes) ⇒ Object
49
50
51
52
53
54
55
|
# File 'lib/podio/models/organization_profile.rb', line 49
def update(org_id, attributes)
response = Podio.connection.put do |req|
req.url "/org/#{org_id}/appstore"
req.body = attributes
end
response.status
end
|
Instance Method Details
#create ⇒ Object
21
22
23
|
# File 'lib/podio/models/organization_profile.rb', line 21
def create
self.class.create(self.org_id, self.attributes)
end
|
#destroy ⇒ Object
29
30
31
|
# File 'lib/podio/models/organization_profile.rb', line 29
def destroy
self.class.delete(self.org_id)
end
|
#update ⇒ Object
25
26
27
|
# File 'lib/podio/models/organization_profile.rb', line 25
def update
self.class.update(self.org_id, self.attributes)
end
|