Class: Edi::Wayfair::RecordCatalogParentCoverage::ScanValidator
- Inherits:
-
Object
- Object
- Edi::Wayfair::RecordCatalogParentCoverage::ScanValidator
- Defined in:
- app/services/edi/wayfair/record_catalog_parent_coverage/scan_validator.rb
Overview
Validates the shape and pagination boundary of a Supplier Catalog v1 scan.
Instance Method Summary collapse
- #errors ⇒ Array<String>
-
#initialize(pages) ⇒ ScanValidator
constructor
A new instance of ScanValidator.
Constructor Details
#initialize(pages) ⇒ ScanValidator
Returns a new instance of ScanValidator.
6 7 8 |
# File 'app/services/edi/wayfair/record_catalog_parent_coverage/scan_validator.rb', line 6 def initialize(pages) @pages = pages end |
Instance Method Details
#errors ⇒ Array<String>
11 12 13 14 15 16 |
# File 'app/services/edi/wayfair/record_catalog_parent_coverage/scan_validator.rb', line 11 def errors structural_errors = [empty_error, graphql_error, shape_error].compact return structural_errors if structural_errors.any? [page_sequence_error, termination_error, total_pages_error].compact end |