Class: EROI::Response::Get
- Inherits:
-
Base
- Object
- Base
- EROI::Response::Get
show all
- Defined in:
- lib/eroi/response.rb
Instance Attribute Summary
Attributes inherited from Base
#data
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
18
19
20
|
# File 'lib/eroi/response.rb', line 18
def contact
@data['Retrieve']['Record']
end
|
#error_message ⇒ Object
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/eroi/response.rb', line 24
def error_message
case @data['ErrorCode'].to_i
when 1
'Invalid username/password was provided.'
when 2
'Invalid mailing list was provided.'
when 3
'Invalid edition was provided.'
end
end
|
#success? ⇒ Boolean
14
15
16
|
# File 'lib/eroi/response.rb', line 14
def success?
(@data['ErrorCode'] || @data['xml']) ? false : true
end
|