From 05105f1d88fbe215ca876d54ddbb5578efa06185 Mon Sep 17 00:00:00 2001 From: Kamron Brooks Date: Fri, 16 Sep 2022 11:04:03 +1000 Subject: [PATCH] Update Model.php Add a static constructor so can more cleanly chain after instantiation Remove the EARNINGTYPE_FIXED rate because it's definitely not valid in Xero anymore --- src/XeroPHP/Remote/Model.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/XeroPHP/Remote/Model.php b/src/XeroPHP/Remote/Model.php index a384fa1d..01a042ff 100644 --- a/src/XeroPHP/Remote/Model.php +++ b/src/XeroPHP/Remote/Model.php @@ -77,6 +77,11 @@ public function __construct(Application $application = null) $this->_data = []; $this->_associated_objects = []; } + + public static function make(Application $application = null) + { + return new static($application); + } /** * This should be compulsory in the constructor in the future,