[FIX] Datatypes and URL changes from API updates
Fix URL change Fix datatype errors likely due to API changes
This commit is contained in:
@@ -173,7 +173,7 @@ function createAutoSaveTransaction(array $group, array $arguments): void
|
|||||||
'notes' => 'Created to automatically save money.',
|
'notes' => 'Created to automatically save money.',
|
||||||
];
|
];
|
||||||
// create a link between A and B.
|
// create a link between A and B.
|
||||||
postCurlRequest('/api/v1/transaction_links', $relationSubmission);
|
postCurlRequest('/api/v1/transaction-links', $relationSubmission);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ function getTransaction(int $journalId): array
|
|||||||
* @param array $link
|
* @param array $link
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function getOpposingTransaction(int $transactionId, array $link): int
|
function getOpposingTransaction(string $transactionId, array $link): int
|
||||||
{
|
{
|
||||||
$opposingJournal = 0;
|
$opposingJournal = 0;
|
||||||
if ($transactionId === $link['attributes']['inward_id']) {
|
if ($transactionId === $link['attributes']['inward_id']) {
|
||||||
@@ -231,7 +231,7 @@ function getOpposingTransaction(int $transactionId, array $link): int
|
|||||||
if (0 === $opposingJournal) {
|
if (0 === $opposingJournal) {
|
||||||
messageAndExit('No opposing transaction.');
|
messageAndExit('No opposing transaction.');
|
||||||
}
|
}
|
||||||
return $opposingJournal;
|
return (int)$opposingJournal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user