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
#==, #[], #[]=, #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
39
40
41
42
43
44
45
46
|
# File 'lib/podio/models/organization_profile.rb', line 39
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
56
57
58
|
# File 'lib/podio/models/organization_profile.rb', line 56
def delete(org_id)
Podio.connection.delete("/org/#{org_id}/appstore").status
end
|
.find(org_id) ⇒ Object
35
36
37
|
# File 'lib/podio/models/organization_profile.rb', line 35
def find(org_id)
member Podio.connection.get("/org/#{org_id}/appstore").body
end
|
.update(org_id, attributes) ⇒ Object
48
49
50
51
52
53
54
|
# File 'lib/podio/models/organization_profile.rb', line 48
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
20
21
22
|
# File 'lib/podio/models/organization_profile.rb', line 20
def create
self.class.create(self.org_id, self.attributes)
end
|
#destroy ⇒ Object
28
29
30
|
# File 'lib/podio/models/organization_profile.rb', line 28
def destroy
self.class.delete(self.org_id)
end
|
#update ⇒ Object
24
25
26
|
# File 'lib/podio/models/organization_profile.rb', line 24
def update
self.class.update(self.org_id, self.attributes)
end
|