lib/geo_certs/api_object.rb in geocerts-0.0.17 vs lib/geo_certs/api_object.rb in geocerts-0.0.18
- old
+ new
@@ -1,9 +1,11 @@
module GeoCerts
class ApiObject # :nodoc:
+ attr_accessor :response_parameters
+
def initialize(attributes = {}, &block)
update_attributes(attributes)
yield(self) if block_given?
end
@@ -95,9 +97,10 @@
def store_exception_errors_and_warnings(exception)
self.warnings = exception.warnings if exception.respond_to?(:warnings)
self.errors = exception.errors if exception.respond_to?(:errors)
+ self.response_parameters = exception.parameters if exception.respond_to?(:parameters)
end
def update_attributes(attributes) # :nodoc:
attributes.each_pair do |name, value|
send("#{name}=", value) if respond_to?(name)