class Podio::OrganizationProfile

Encapsulates an organization profile, primarily used for in app store @see developers.podio.com/doc/organizations

Public Class Methods

create(org_id, attributes) click to toggle source

@see developers.podio.com/doc/organizations/create-organization-app-store-profile-87819

# File lib/podio/models/organization_profile.rb, line 48
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) click to toggle source

@see developers.podio.com/doc/organizations/delete-organization-app-store-profile-87808

# File lib/podio/models/organization_profile.rb, line 67
def delete(org_id)
  Podio.connection.delete("/org/#{org_id}/appstore").status
end
find(org_id) click to toggle source

@see developers.podio.com/doc/organizations/get-organization-app-store-profile-87799

# File lib/podio/models/organization_profile.rb, line 39
def find(org_id)
  member Podio.connection.get("/org/#{org_id}/appstore").body
end
find_by_url(url_label) click to toggle source
# File lib/podio/models/organization_profile.rb, line 43
def find_by_url(url_label)
  member Podio.connection.get("/app_store/org/#{url_label}/profile").body
end
update(org_id, attributes) click to toggle source

@see developers.podio.com/doc/organizations/update-organization-app-store-profile-87805

# File lib/podio/models/organization_profile.rb, line 58
def update(org_id, attributes)
  response = Podio.connection.put do |req|
    req.url "/org/#{org_id}/appstore"
    req.body = attributes
  end
  response.status
end

Public Instance Methods

create() click to toggle source

@see developers.podio.com/doc/organizations/create-organization-app-store-profile-87819

# File lib/podio/models/organization_profile.rb, line 23
def create
  self.class.create(self.org_id, self.attributes)
end
destroy() click to toggle source

@see developers.podio.com/doc/organizations/delete-organization-app-store-profile-87808

# File lib/podio/models/organization_profile.rb, line 33
def destroy
  self.class.delete(self.org_id)
end
update() click to toggle source

@see developers.podio.com/doc/organizations/update-organization-app-store-profile-87805

# File lib/podio/models/organization_profile.rb, line 28
def update
  self.class.update(self.org_id, self.attributes)
end