module WolfCore::Burnett::CompanyOperations

def create_company(erecruit_token:, erecruit_platform_url:, company:)

def create_company(erecruit_token:, erecruit_platform_url:, company:)
  parsed_http_post(
    headers: { "Authorization" => "Bearer #{erecruit_token}" },
    url: "#{erecruit_platform_url}/Company",
    body: company
  )
end

def create_company!(erecruit_token:, company:, erecruit_platform_url:, error_message:)

def create_company!(erecruit_token:, company:, erecruit_platform_url:, error_message:)
  response = safe_http_post(
    headers: { "Authorization" => "Bearer #{erecruit_token}" },
    url: "#{erecruit_platform_url}/Company",
    body: company,
    error_message: error_message
  )
  response.body
end

def update_company(erecruit_token:, erecruit_platform_url:, company:, company_id:)

def update_company(erecruit_token:, erecruit_platform_url:, company:, company_id:)
  parsed_http_put(
    headers: { "Authorization" => "Bearer #{erecruit_token}" },
    url: "#{erecruit_platform_url}/Company/#{company_id}",
    body: company
  )
end

def update_company!(erecruit_token:, erecruit_platform_url:, company:, company_id:, error_message:)

def update_company!(erecruit_token:, erecruit_platform_url:, company:, company_id:, error_message:)
  response = safe_http_put(
    headers: { "Authorization" => "Bearer #{erecruit_token}" },
    url: "#{erecruit_platform_url}/Company/#{company_id}",
    body: company,
    error_message: error_message
  )
  response.body
end