Class: KaveRestApi::ResponseSelectOutBox
- Inherits:
-
Object
- Object
- KaveRestApi::ResponseSelectOutBox
- Defined in:
- lib/kavenegar-ruby/responds/selectoutbox.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#statusmessage ⇒ Object
readonly
Returns the value of attribute statusmessage.
Instance Method Summary collapse
- #entries(select = nil) ⇒ Object
- #full_message_errors ⇒ Object
- #valid? ⇒ Boolean
- #validate(response = nil) ⇒ Object
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/kavenegar-ruby/responds/selectoutbox.rb', line 3 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/kavenegar-ruby/responds/selectoutbox.rb', line 3 def status @status end |
#statusmessage ⇒ Object (readonly)
Returns the value of attribute statusmessage.
3 4 5 |
# File 'lib/kavenegar-ruby/responds/selectoutbox.rb', line 3 def @statusmessage end |
Instance Method Details
#entries(select = nil) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/kavenegar-ruby/responds/selectoutbox.rb', line 15 def entries(select=nil) if select.nil? return @response['entries'] else return @response['entries'].select { |en| en['status'] == (KaveRestApi::ENTRIES[select].nil? ? select:KaveRestApi::ENTRIES[select]) } end end |
#full_message_errors ⇒ Object
25 26 27 |
# File 'lib/kavenegar-ruby/responds/selectoutbox.rb', line 25 def return KaveRestApi::ERRORS[@response['return']['status'].to_s] end |
#valid? ⇒ Boolean
11 12 13 |
# File 'lib/kavenegar-ruby/responds/selectoutbox.rb', line 11 def valid? @valid end |
#validate(response = nil) ⇒ Object
5 6 7 8 9 |
# File 'lib/kavenegar-ruby/responds/selectoutbox.rb', line 5 def validate(response = nil) @response = response perform_validation return self end |