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.



114
115
116
117
# File 'lib/outbound.rb', line 114

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

Instance Attribute Details

#errorObject

Returns the value of attribute error.



119
120
121
# File 'lib/outbound.rb', line 119

def error
  @error
end

#received_callObject

Returns the value of attribute received_call.



120
121
122
# File 'lib/outbound.rb', line 120

def received_call
  @received_call
end

Instance Method Details

#campaign_id_error?Boolean

Returns:

  • (Boolean)


150
151
152
# File 'lib/outbound.rb', line 150

def campaign_id_error?
  return @error == Outbound::ERROR_CAMPAIGN_IDS
end

#connection_error?Boolean

Returns:

  • (Boolean)


134
135
136
# File 'lib/outbound.rb', line 134

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

#event_name_error?Boolean

Returns:

  • (Boolean)


130
131
132
# File 'lib/outbound.rb', line 130

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

#init_error?Boolean

Returns:

  • (Boolean)


138
139
140
# File 'lib/outbound.rb', line 138

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

#platform_error?Boolean

Returns:

  • (Boolean)


146
147
148
# File 'lib/outbound.rb', line 146

def platform_error?
  return @error == Outbound::ERROR_PLATFORM
end

#success?Boolean

Returns:

  • (Boolean)


122
123
124
# File 'lib/outbound.rb', line 122

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

#token_error?Boolean

Returns:

  • (Boolean)


142
143
144
# File 'lib/outbound.rb', line 142

def token_error?
  return @error == Outbound::ERROR_TOKEN
end

#user_id_error?Boolean

Returns:

  • (Boolean)


126
127
128
# File 'lib/outbound.rb', line 126

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