Class: Edi::Walmart::ReturnsReportProcessor::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/edi/walmart/returns_report_processor.rb

Overview

Value object: per-log processing counters returned by #process.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rows_processed: 0, rows_matched: 0, rows_unmatched: 0, items_upgraded: 0, notes_written: 0, duplicates_skipped: 0) ⇒ Result

Returns a new instance of Result.

Parameters:

  • rows_processed (Integer) (defaults to: 0)

    lines applied from the payload (lines without any order id are dropped at parse time).

  • rows_matched (Integer) (defaults to: 0)

    lines matched to an order + RMA.

  • rows_unmatched (Integer) (defaults to: 0)

    lines with no matching order/RMA (warn-logged).

  • items_upgraded (Integer) (defaults to: 0)

    RmaItems whose TBD reason was upgraded via the alias map.

  • notes_written (Integer) (defaults to: 0)

    return-reason note activities written.

  • duplicates_skipped (Integer) (defaults to: 0)

    lines skipped because the note was already recorded.



35
# File 'app/services/edi/walmart/returns_report_processor.rb', line 35

def initialize(rows_processed: 0, rows_matched: 0, rows_unmatched: 0, items_upgraded: 0, notes_written: 0, duplicates_skipped: 0) = super

Instance Attribute Details

#duplicates_skippedObject (readonly)

Returns the value of attribute duplicates_skipped

Returns:

  • (Object)

    the current value of duplicates_skipped



28
29
30
# File 'app/services/edi/walmart/returns_report_processor.rb', line 28

def duplicates_skipped
  @duplicates_skipped
end

#items_upgradedObject (readonly)

Returns the value of attribute items_upgraded

Returns:

  • (Object)

    the current value of items_upgraded



28
29
30
# File 'app/services/edi/walmart/returns_report_processor.rb', line 28

def items_upgraded
  @items_upgraded
end

#notes_writtenObject (readonly)

Returns the value of attribute notes_written

Returns:

  • (Object)

    the current value of notes_written



28
29
30
# File 'app/services/edi/walmart/returns_report_processor.rb', line 28

def notes_written
  @notes_written
end

#rows_matchedObject (readonly)

Returns the value of attribute rows_matched

Returns:

  • (Object)

    the current value of rows_matched



28
29
30
# File 'app/services/edi/walmart/returns_report_processor.rb', line 28

def rows_matched
  @rows_matched
end

#rows_processedObject (readonly)

Returns the value of attribute rows_processed

Returns:

  • (Object)

    the current value of rows_processed



28
29
30
# File 'app/services/edi/walmart/returns_report_processor.rb', line 28

def rows_processed
  @rows_processed
end

#rows_unmatchedObject (readonly)

Returns the value of attribute rows_unmatched

Returns:

  • (Object)

    the current value of rows_unmatched



28
29
30
# File 'app/services/edi/walmart/returns_report_processor.rb', line 28

def rows_unmatched
  @rows_unmatched
end