Class: Outbound::Result

Inherits:
Object
  • Object
show all
Includes:
Defaults
Defined in:
lib/outbound.rb

Constant Summary

Constants included from Defaults

Defaults::HEADERS

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, received_call) ⇒ Result

Returns a new instance of Result.



52
53
54
55
# File 'lib/outbound.rb', line 52

def initialize error, received_call
  @error = error
  @received_call = received_call
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



57
58
59
# File 'lib/outbound.rb', line 57

def error
  @error
end

#received_callObject

Returns the value of attribute received_call.



58
59
60
# File 'lib/outbound.rb', line 58

def received_call
  @received_call
end

Instance Method Details

#connection_error?Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/outbound.rb', line 72

def connection_error?
  return @error == Outbound::ERROR_CONNECTION
end

#event_name_error?Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/outbound.rb', line 68

def event_name_error?
  return @error == Outbound::ERROR_EVENT_NAME
end

#init_error?Boolean

Returns:

  • (Boolean)


76
77
78
# File 'lib/outbound.rb', line 76

def init_error?
  return @error == Outbound::ERROR_INIT
end

#success?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/outbound.rb', line 60

def success?
  return @received_call && @error == nil
end

#user_id_error?Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/outbound.rb', line 64

def user_id_error?
  return @error == Outbound::ERROR_USER_ID
end