Class: Upkeep::Delivery::Transport::Outcome

Inherits:
Data
  • Object
show all
Defined in:
lib/upkeep/delivery/transport.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attemptsObject (readonly)

Returns the value of attribute attempts

Returns:

  • (Object)

    the current value of attempts



8
9
10
# File 'lib/upkeep/delivery/transport.rb', line 8

def attempts
  @attempts
end

#envelope_digestObject (readonly)

Returns the value of attribute envelope_digest

Returns:

  • (Object)

    the current value of envelope_digest



8
9
10
# File 'lib/upkeep/delivery/transport.rb', line 8

def envelope_digest
  @envelope_digest
end

#error_classObject (readonly)

Returns the value of attribute error_class

Returns:

  • (Object)

    the current value of error_class



8
9
10
# File 'lib/upkeep/delivery/transport.rb', line 8

def error_class
  @error_class
end

#error_messageObject (readonly)

Returns the value of attribute error_message

Returns:

  • (Object)

    the current value of error_message



8
9
10
# File 'lib/upkeep/delivery/transport.rb', line 8

def error_message
  @error_message
end

#queue_depthObject (readonly)

Returns the value of attribute queue_depth

Returns:

  • (Object)

    the current value of queue_depth



8
9
10
# File 'lib/upkeep/delivery/transport.rb', line 8

def queue_depth
  @queue_depth
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



8
9
10
# File 'lib/upkeep/delivery/transport.rb', line 8

def status
  @status
end

#subscriber_idObject (readonly)

Returns the value of attribute subscriber_id

Returns:

  • (Object)

    the current value of subscriber_id



8
9
10
# File 'lib/upkeep/delivery/transport.rb', line 8

def subscriber_id
  @subscriber_id
end

Instance Method Details

#delivered?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/upkeep/delivery/transport.rb', line 17

def delivered?
  status == :delivered
end

#reportObject



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/upkeep/delivery/transport.rb', line 21

def report
  {
    subscriber_id: subscriber_id,
    status: status,
    attempts: attempts,
    queue_depth: queue_depth,
    envelope_digest: envelope_digest,
    error_class: error_class,
    error_message: error_message
  }.compact
end