Class: FedexWebServices::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/fedex_web_services/response.rb

Direct Known Subclasses

ProcessShipmentResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentsObject (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

#errorsObject



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