Update API to match new end points.

This commit is contained in:
James Cole
2018-12-03 15:57:15 +01:00
parent c13d0da9fa
commit c0d6d0e28e
11 changed files with 123 additions and 159 deletions

View File

@@ -474,6 +474,24 @@ class JournalRepository implements JournalRepositoryInterface
return $value;
}
/**
* Return string value of a meta date (or NULL).
*
* @param TransactionJournal $journal
* @param string $field
*
* @return null|string
*/
public function getMetaDateString(TransactionJournal $journal, string $field): ?string
{
$date = $this->getMetaDate($journal, $field);
if (null === $date) {
return null;
}
return $date->format('Y-m-d');
}
/**
* Return value of a meta field (or NULL) as a string.
*