lib/netsuite/actions/get.rb in netsuite-0.0.33 vs lib/netsuite/actions/get.rb in netsuite-0.0.34

- old
+ new

@@ -56,8 +56,19 @@ def response_hash @response_hash = @response[:get_response][:read_response] end + module Support + def get(options = {}) + response = NetSuite::Actions::Get.call(self, options) + if response.success? + new(response.body) + else + raise RecordNotFound, "#{self} with OPTIONS=#{options.inspect} could not be found" + end + end + end + end end end