diff --git a/src/API.php b/src/API.php index 296619c..b4a610e 100644 --- a/src/API.php +++ b/src/API.php @@ -428,7 +428,9 @@ final class API { Log::debug(sprintf('%s:Update invoice',static::LOGKEY),['params'=>$parameters]); - return new Invoice($this->execute('invoice',array_merge($parameters,['method'=>'POST']))); + $result = $this->execute('invoice',array_merge($parameters,['method'=>'POST'])); + + return new Invoice($result->Invoice); } /** @@ -442,6 +444,8 @@ final class API { Log::debug(sprintf('%s:Update customer',static::LOGKEY),['params'=>$parameters]); - return new Customer($this->execute('customer',array_merge($parameters,['method'=>'POST']))); + $result = $this->execute('customer',array_merge($parameters,['method'=>'POST'])); + + return new Customer($result->Customer); } } \ No newline at end of file