Class: Edi::Wayfair::ProductAdditionSender::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/edi/wayfair/product_addition_sender.rb

Overview

Service object: submit result. skipped lists identifiers of catalog items
dropped before submission (no Wayfair class, or attribute generation
failed/yielded nothing), so a partial batch never succeeds silently.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success: nil, request_id: nil, batch_id: nil, status: nil, product_results: nil, errors: nil, skipped: nil) ⇒ Result

Returns a new instance of Result.

Parameters:

  • success (Boolean, nil) (defaults to: nil)

    whether the batch submitted without ERROR flaws

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

    Wayfair's productAdditionRequestId

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

    Wayfair's batchId

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

    Wayfair's submission status

  • product_results (Array<Hash>, nil) (defaults to: nil)

    per-product status/validationFlaws

  • errors (Array<String>, nil) (defaults to: nil)

    transport/parse/validation error messages

  • skipped (Array<String>, nil) (defaults to: nil)

    identifiers of items dropped before submission



85
# File 'app/services/edi/wayfair/product_addition_sender.rb', line 85

def initialize(success: nil, request_id: nil, batch_id: nil, status: nil, product_results: nil, errors: nil, skipped: nil) = super

Instance Attribute Details

#batch_idObject (readonly)

Returns the value of attribute batch_id

Returns:

  • (Object)

    the current value of batch_id



77
78
79
# File 'app/services/edi/wayfair/product_addition_sender.rb', line 77

def batch_id
  @batch_id
end

#errorsObject (readonly)

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



77
78
79
# File 'app/services/edi/wayfair/product_addition_sender.rb', line 77

def errors
  @errors
end

#product_resultsObject (readonly)

Returns the value of attribute product_results

Returns:

  • (Object)

    the current value of product_results



77
78
79
# File 'app/services/edi/wayfair/product_addition_sender.rb', line 77

def product_results
  @product_results
end

#request_idObject (readonly)

Returns the value of attribute request_id

Returns:

  • (Object)

    the current value of request_id



77
78
79
# File 'app/services/edi/wayfair/product_addition_sender.rb', line 77

def request_id
  @request_id
end

#skippedObject (readonly)

Returns the value of attribute skipped

Returns:

  • (Object)

    the current value of skipped



77
78
79
# File 'app/services/edi/wayfair/product_addition_sender.rb', line 77

def skipped
  @skipped
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



77
78
79
# File 'app/services/edi/wayfair/product_addition_sender.rb', line 77

def status
  @status
end

#successObject (readonly)

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success



77
78
79
# File 'app/services/edi/wayfair/product_addition_sender.rb', line 77

def success
  @success
end