module Bugsnag::Api::Client::Organizations

Methods for the Organizations API

@see docs.bugsnagapiv2.apiary.io/#reference/organizations

Public Instance Methods

create_organization(name, options = {}) click to toggle source

Create an Organization

@return [Sawyer::Resource] New Organization @see docs.bugsnagapiv2.apiary.io/#reference/organizations/organizations/create-an-organization

# File lib/bugsnag/api/client/organizations.rb, line 13
def create_organization(name, options = {})
  post "organizations", options.merge({:name => name})
end
delete_organization(id, options = {}) click to toggle source

Delete an Organization

@return @see docs.bugsnagapiv2.apiary.io/#reference/organizations/organizations/delete-an-organization

# File lib/bugsnag/api/client/organizations.rb, line 39
def delete_organization(id, options = {})
  boolean_from_response :delete, "organizations/#{id}", options
end
organization(id, options = {}) click to toggle source

View an Organization

@return [Sawyer::Resource] Requested Organization @see docs.bugsnagapiv2.apiary.io/#reference/organizations/organizations/view-an-organization

# File lib/bugsnag/api/client/organizations.rb, line 21
def organization(id, options = {})
  get "organizations/#{id}", options
end
update_organization(id, name, auto_upgrade, options = {}) click to toggle source

Update an Organization

@option invoice_address [String] Additional information to print on your invoice @option billing_emails [Array<String>] List of billing emails @return [Sawyer::Resource] Updated Organization @see docs.bugsnagapiv2.apiary.io/#reference/organizations/organizations/update-an-organization

# File lib/bugsnag/api/client/organizations.rb, line 31
def update_organization(id, name, auto_upgrade, options = {})
  patch "organizations/#{id}", options.merge({:name => name, :auto_upgrade => auto_upgrade})
end