lib/securetrading/connection.rb in securetrading-0.2.0 vs lib/securetrading/connection.rb in securetrading-0.3.0
- old
+ new
@@ -22,21 +22,21 @@
def doc
@doc ||= XmlDoc.new(request_type, @account_type).doc
end
def request_type
- fail NotImplementedError, 'Implement :request_type method in subclas!'
+ fail NotImplementedError, 'Implement :request_type method in sub-class!'
end
def ox_xml
- fail NotImplementedError, 'Implement :ox_xml method in subclas!'
+ fail NotImplementedError, 'Implement :ox_xml method in sub-class!'
end
def perform_with(method, xml, options = {})
- self.class.public_send(method,
- '/',
- options.merge(body: xml,
- headers: dynamic_headers))
+ party = self.class.public_send(
+ method, '/', options.merge(body: xml, headers: dynamic_headers)
+ )
+ Securetrading::Response.new(party)
end
def dynamic_headers
{ 'Authorization' => "Basic #{Securetrading.config.auth}" }
end