diff --git a/lib/recurly/general_ledger_account.php b/lib/recurly/general_ledger_account.php index 0f9eb671..69eb238c 100644 --- a/lib/recurly/general_ledger_account.php +++ b/lib/recurly/general_ledger_account.php @@ -26,12 +26,17 @@ public static function get($id, $client = null) { return Recurly_Base::_get(Recurly_GeneralLedgerAccount::uriForGeneralLedgerAccount($id), $client); } + public function update() { + return $this->_save(Recurly_Client::PUT, $this->uri()); + } + protected function uri() { if (!empty($this->_href)) return $this->getHref(); else return Recurly_GeneralLedgerAccount::uriForGeneralLedgerAccount($this->id); } + protected static function uriForGeneralLedgerAccount($id) { return self::_safeUri(Recurly_Client::PATH_GENERAL_LEDGER_ACCOUNTS, $id); } @@ -39,9 +44,10 @@ protected static function uriForGeneralLedgerAccount($id) { protected function getNodeName() { return 'general_ledger_account'; } + protected function getWriteableAttributes() { return array( - 'code', 'account_type', 'description' + 'code', 'account_type', 'description', 'created_at', 'updated_at' ); } }