class Newgistics::ResponseHandlers::PostManifest
Attributes
manifest[R]
Public Class Methods
new(manifest)
click to toggle source
# File lib/newgistics/response_handlers/post_manifest.rb, line 6 def initialize(manifest) @manifest = manifest end
Public Instance Methods
handle(response)
click to toggle source
# File lib/newgistics/response_handlers/post_manifest.rb, line 10 def handle(response) PostErrors.new(manifest).handle(response) handle_successful_response(response) if manifest.errors.empty? end
Private Instance Methods
handle_successful_response(response)
click to toggle source
# File lib/newgistics/response_handlers/post_manifest.rb, line 17 def handle_successful_response(response) xml = Nokogiri::XML(response.body) manifest.id = xml.at_css('manifest')['id'] end