lib/wolf_core/application/burnett/positions_operations/positions_operations.rb
module WolfCore module Burnett module PositionsOperations include WolfCore::HttpOperations def create_position!(erecruit_token:, erecruit_platform_url:, position_id:, candidate_id:, error_message:) response = safe_http_post( headers: { "Authorization" => "Bearer #{erecruit_token}" }, url: "#{erecruit_platform_url}/", query: { tenant: tenant }, error_message: error_message ) nil if response.code == 200 end def create_position(erecruit_token:, erecruit_platform_url:, position_id:, candidate_id:) response = http_get( headers: { "Authorization" => "Bearer #{erecruit_token}" }, url: "#{erecruit_platform_url}/", query: { tenant: tenant } ) nil if response.code == 200 end def update_position!(erecruit_token:, erecruit_platform_url:, position_id:, candidate_id:, error_message:) response = safe_http_post( headers: { "Authorization" => "Bearer #{erecruit_token}" }, url: "#{erecruit_platform_url}/", query: { tenant: tenant }, error_message: error_message ) nil if response.code == 200 end def update_position(erecruit_token:, erecruit_platform_url:, position_id:, candidate_id:) response = http_get( headers: { "Authorization" => "Bearer #{erecruit_token}" }, url: "#{erecruit_platform_url}/", query: { tenant: tenant } ) nil if response.code == 200 end end end end