Class: Edi::Amazon::ShipWithAmazon::DocumentResult

Inherits:
Data
  • Object
show all
Defined in:
app/services/edi/amazon/ship_with_amazon.rb

Overview

Service object: document result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success: nil, label_data: nil, format: nil, error: nil) ⇒ DocumentResult

Returns a new instance of DocumentResult.

Parameters:

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

    whether the operation succeeded

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

    Base64-decoded label bytes

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

    document format (e.g. PDF, PNG, ZPL)

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

    error message if the operation failed



49
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 49

def initialize(success: nil, label_data: nil, format: nil, error: nil) = super

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



44
45
46
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 44

def error
  @error
end

#formatObject (readonly)

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



44
45
46
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 44

def format
  @format
end

#label_dataObject (readonly)

Returns the value of attribute label_data

Returns:

  • (Object)

    the current value of label_data



44
45
46
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 44

def label_data
  @label_data
end

#successObject (readonly)

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success



44
45
46
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 44

def success
  @success
end