Class: FedexWebServices::Response
- Inherits:
-
Object
- Object
- FedexWebServices::Response
- Defined in:
- lib/fedex_web_services/response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(contents) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(contents) ⇒ Response
Returns a new instance of Response.
5 6 7 |
# File 'lib/fedex_web_services/response.rb', line 5 def initialize(contents) @contents = contents end |
Instance Attribute Details
#contents ⇒ Object (readonly)
Returns the value of attribute contents.
3 4 5 |
# File 'lib/fedex_web_services/response.rb', line 3 def contents @contents end |
Instance Method Details
#errors ⇒ Object
9 10 11 12 13 |
# File 'lib/fedex_web_services/response.rb', line 9 def errors contents.notifications.reject do |notification| [ "SUCCESS", "NOTE", "WARNING" ].include?(notification.severity) end end |