Class: Edi::Wayfair::CatalogReadV2Retriever::Result
- Inherits:
-
Data
- Object
- Data
- Edi::Wayfair::CatalogReadV2Retriever::Result
- Defined in:
- app/services/edi/wayfair/catalog_read_v2_retriever.rb
Overview
Service object: pull result.
unreturned is what we asked about and Wayfair did not hand back even on
the retry pass — the closest thing the API gives us to "no such SKU".
Instance Attribute Summary collapse
-
#batches ⇒ Object
readonly
Returns the value of attribute batches.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#matched ⇒ Object
readonly
Returns the value of attribute matched.
-
#requested ⇒ Object
readonly
Returns the value of attribute requested.
-
#unreturned ⇒ Object
readonly
Returns the value of attribute unreturned.
-
#updated ⇒ Object
readonly
Returns the value of attribute updated.
Instance Method Summary collapse
- #initialize(batches: 0, requested: 0, matched: 0, updated: 0, unreturned: [], errors: []) ⇒ Result constructor
-
#to_h ⇒ Hash
Tally with
unreturnedcollapsed to its size.
Constructor Details
#initialize(batches: 0, requested: 0, matched: 0, updated: 0, unreturned: [], errors: []) ⇒ Result
75 |
# File 'app/services/edi/wayfair/catalog_read_v2_retriever.rb', line 75 def initialize(batches: 0, requested: 0, matched: 0, updated: 0, unreturned: [], errors: []) = super |
Instance Attribute Details
#batches ⇒ Object (readonly)
Returns the value of attribute batches
67 68 69 |
# File 'app/services/edi/wayfair/catalog_read_v2_retriever.rb', line 67 def batches @batches end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors
67 68 69 |
# File 'app/services/edi/wayfair/catalog_read_v2_retriever.rb', line 67 def errors @errors end |
#matched ⇒ Object (readonly)
Returns the value of attribute matched
67 68 69 |
# File 'app/services/edi/wayfair/catalog_read_v2_retriever.rb', line 67 def matched @matched end |
#requested ⇒ Object (readonly)
Returns the value of attribute requested
67 68 69 |
# File 'app/services/edi/wayfair/catalog_read_v2_retriever.rb', line 67 def requested @requested end |
#unreturned ⇒ Object (readonly)
Returns the value of attribute unreturned
67 68 69 |
# File 'app/services/edi/wayfair/catalog_read_v2_retriever.rb', line 67 def unreturned @unreturned end |
#updated ⇒ Object (readonly)
Returns the value of attribute updated
67 68 69 |
# File 'app/services/edi/wayfair/catalog_read_v2_retriever.rb', line 67 def updated @updated end |
Instance Method Details
#to_h ⇒ Hash
Returns tally with unreturned collapsed to its size.
78 |
# File 'app/services/edi/wayfair/catalog_read_v2_retriever.rb', line 78 def to_h = { batches:, requested:, matched:, updated:, unreturned: unreturned.size, errors: } |