Class: Assistant::TechnicalSupport::CaseCandidateSelector::Selection

Inherits:
Data
  • Object
show all
Defined in:
app/services/assistant/technical_support/case_candidate_selector.rb

Overview

Single selected case with its audit metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(support_case_id: nil, case_number: nil, product_family: nil, closed_reason: nil, evidence_events: 0, evidence_chars: 0, semantic_distance: nil, selection_score: nil) ⇒ Selection

Parameters:

  • support_case_id (Integer, nil) (defaults to: nil)

    source SupportCase primary key

  • case_number (String, nil) (defaults to: nil)

    human-readable case identifier

  • product_family (String, nil) (defaults to: nil)

    normalized product family assigned to the selection

  • closed_reason (String, nil) (defaults to: nil)

    resolution reason from the source case

  • evidence_events (Integer) (defaults to: 0)

    count of evidence-bearing events

  • evidence_chars (Integer) (defaults to: 0)

    count of evidence characters

  • semantic_distance (Float, nil) (defaults to: nil)

    minimum cosine distance to any prior selection

  • selection_score (Float, nil) (defaults to: nil)

    combined quality/diversity score



58
59
60
61
62
63
64
# File 'app/services/assistant/technical_support/case_candidate_selector.rb', line 58

def initialize(
  support_case_id: nil, case_number: nil, product_family: nil,
  closed_reason: nil, evidence_events: 0, evidence_chars: 0,
  semantic_distance: nil, selection_score: nil
)
  super
end

Instance Attribute Details

#case_numberObject (readonly)

Returns the value of attribute case_number

Returns:

  • (Object)

    the current value of case_number



39
40
41
# File 'app/services/assistant/technical_support/case_candidate_selector.rb', line 39

def case_number
  @case_number
end

#closed_reasonObject (readonly)

Returns the value of attribute closed_reason

Returns:

  • (Object)

    the current value of closed_reason



39
40
41
# File 'app/services/assistant/technical_support/case_candidate_selector.rb', line 39

def closed_reason
  @closed_reason
end

#evidence_charsObject (readonly)

Returns the value of attribute evidence_chars

Returns:

  • (Object)

    the current value of evidence_chars



39
40
41
# File 'app/services/assistant/technical_support/case_candidate_selector.rb', line 39

def evidence_chars
  @evidence_chars
end

#evidence_eventsObject (readonly)

Returns the value of attribute evidence_events

Returns:

  • (Object)

    the current value of evidence_events



39
40
41
# File 'app/services/assistant/technical_support/case_candidate_selector.rb', line 39

def evidence_events
  @evidence_events
end

#product_familyObject (readonly)

Returns the value of attribute product_family

Returns:

  • (Object)

    the current value of product_family



39
40
41
# File 'app/services/assistant/technical_support/case_candidate_selector.rb', line 39

def product_family
  @product_family
end

#selection_scoreObject (readonly)

Returns the value of attribute selection_score

Returns:

  • (Object)

    the current value of selection_score



39
40
41
# File 'app/services/assistant/technical_support/case_candidate_selector.rb', line 39

def selection_score
  @selection_score
end

#semantic_distanceObject (readonly)

Returns the value of attribute semantic_distance

Returns:

  • (Object)

    the current value of semantic_distance



39
40
41
# File 'app/services/assistant/technical_support/case_candidate_selector.rb', line 39

def semantic_distance
  @semantic_distance
end

#support_case_idObject (readonly)

Returns the value of attribute support_case_id

Returns:

  • (Object)

    the current value of support_case_id



39
40
41
# File 'app/services/assistant/technical_support/case_candidate_selector.rb', line 39

def support_case_id
  @support_case_id
end