Class: Edi::Amazon::ShipWithAmazon::TrackingResult

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

Overview

Service object: tracking result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success: nil, tracking_id: nil, status: nil, event_history: nil, promised_delivery_date: nil, error: nil) ⇒ TrackingResult

Returns a new instance of TrackingResult.

Parameters:

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

    whether the operation succeeded

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

    carrier tracking number

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

    shipment status

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

    tracking events

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

    promised delivery date

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

    error message if the operation failed



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

def initialize(success: nil, tracking_id: nil, status: nil, event_history: nil, promised_delivery_date: nil, error: nil) = super

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



58
59
60
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 58

def error
  @error
end

#event_historyObject (readonly)

Returns the value of attribute event_history

Returns:

  • (Object)

    the current value of event_history



58
59
60
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 58

def event_history
  @event_history
end

#promised_delivery_dateObject (readonly)

Returns the value of attribute promised_delivery_date

Returns:

  • (Object)

    the current value of promised_delivery_date



58
59
60
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 58

def promised_delivery_date
  @promised_delivery_date
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



58
59
60
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 58

def status
  @status
end

#successObject (readonly)

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success



58
59
60
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 58

def success
  @success
end

#tracking_idObject (readonly)

Returns the value of attribute tracking_id

Returns:

  • (Object)

    the current value of tracking_id



58
59
60
# File 'app/services/edi/amazon/ship_with_amazon.rb', line 58

def tracking_id
  @tracking_id
end