Class: Edi::Amazon::ReturnsReportProcessor::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/edi/amazon/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, rows_quarantined: 0, items_upgraded: 0, notes_written: 0, duplicates_skipped: 0, quarantined_rows: []) ⇒ Result

Returns a new instance of Result.

Parameters:

  • rows_processed (Integer) (defaults to: 0)

    rows applied from the report (blank-order rows are dropped at parse time).

  • rows_matched (Integer) (defaults to: 0)

    rows matched to an order + RMA.

  • rows_unmatched (Integer) (defaults to: 0)

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

  • rows_quarantined (Integer) (defaults to: 0)

    rows with an unsafe Merchant RMA ID match.

  • 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)

    rows skipped because the note was already recorded.

  • quarantined_rows (Array<Hash>) (defaults to: [])

    identifiers and reasons retained in the EDI log for review.



41
42
43
44
# File 'app/services/edi/amazon/returns_report_processor.rb', line 41

def initialize(rows_processed: 0, rows_matched: 0, rows_unmatched: 0, rows_quarantined: 0, items_upgraded: 0,
               notes_written: 0, duplicates_skipped: 0, quarantined_rows: [])
  super
end

Instance Attribute Details

#duplicates_skippedObject (readonly)

Returns the value of attribute duplicates_skipped

Returns:

  • (Object)

    the current value of duplicates_skipped



31
32
33
# File 'app/services/edi/amazon/returns_report_processor.rb', line 31

def duplicates_skipped
  @duplicates_skipped
end

#items_upgradedObject (readonly)

Returns the value of attribute items_upgraded

Returns:

  • (Object)

    the current value of items_upgraded



31
32
33
# File 'app/services/edi/amazon/returns_report_processor.rb', line 31

def items_upgraded
  @items_upgraded
end

#notes_writtenObject (readonly)

Returns the value of attribute notes_written

Returns:

  • (Object)

    the current value of notes_written



31
32
33
# File 'app/services/edi/amazon/returns_report_processor.rb', line 31

def notes_written
  @notes_written
end

#quarantined_rowsObject (readonly)

Returns the value of attribute quarantined_rows

Returns:

  • (Object)

    the current value of quarantined_rows



31
32
33
# File 'app/services/edi/amazon/returns_report_processor.rb', line 31

def quarantined_rows
  @quarantined_rows
end

#rows_matchedObject (readonly)

Returns the value of attribute rows_matched

Returns:

  • (Object)

    the current value of rows_matched



31
32
33
# File 'app/services/edi/amazon/returns_report_processor.rb', line 31

def rows_matched
  @rows_matched
end

#rows_processedObject (readonly)

Returns the value of attribute rows_processed

Returns:

  • (Object)

    the current value of rows_processed



31
32
33
# File 'app/services/edi/amazon/returns_report_processor.rb', line 31

def rows_processed
  @rows_processed
end

#rows_quarantinedObject (readonly)

Returns the value of attribute rows_quarantined

Returns:

  • (Object)

    the current value of rows_quarantined



31
32
33
# File 'app/services/edi/amazon/returns_report_processor.rb', line 31

def rows_quarantined
  @rows_quarantined
end

#rows_unmatchedObject (readonly)

Returns the value of attribute rows_unmatched

Returns:

  • (Object)

    the current value of rows_unmatched



31
32
33
# File 'app/services/edi/amazon/returns_report_processor.rb', line 31

def rows_unmatched
  @rows_unmatched
end