module Ecoportal module API class Internal class Person def reset_account! doc["account"] = JSON.parse(original_doc["account"]) end def consolidate_account! original_doc["account"] = JSON.parse(doc["account"]) end def new? !initial_doc["details"] && !initial_doc["account"] end def account_added? person.account && !initial_doc["account"] end end end end end