lib/cartodb/central.rb
def create_organization(organization_name, organization_attributes)
      options = { body: { organization: organization_attributes }, basic_auth: @auth, verify: Rails.env.production? }

      response = self.class.send :post, "#{ @host }/api/organizations", options

      unless response.code == 201
        raise CartoDB::CentralCommunicationFailure, "Application server responded with http #{ response.code }"
      end
      response.parsed_response
    end
# Returns remote organization attributes if response code is 201
# otherwise returns nil
Returns remote organization attributes if response code is 201
otherwise returns nil
Returns remote organization attributes if response code is 201 otherwise returns nil
def create_organization(organization_name, organization_attributes)
      options = { body: { organization: organization_attributes }, basic_auth: @auth, verify: Rails.env.production? }
      response = self.class.send :post, "#{ @host }/api/organizations", options
      unless response.code == 201
        raise CartoDB::CentralCommunicationFailure, "Application server responded with http #{ response.code }"
      end
      response.parsed_response
    end
def create_organization ( organization_name , organization_attributes ) options = { body : { organization : organization_attributes } , basic_auth : @auth , verify : Rails . env . production? } response = self . class . send :post , "#{ @host }/api/organizations" , options unless response . code == 201 raise CartoDB :: CentralCommunicationFailure , "Application server responded with http #{ response.code }" end response . parsed_response end
Returns remote organization attributes if response code is 201
otherwise returns nil
Returns remote organization attributes if response code is 201 otherwise returns nil
organization_name
organization_attributes