Closed baikho closed 3 years ago
Hi @baikho, thanks for the patch.
In general, looks good but since $localeWorkflows
is an array of { targetLocaleId: "...", workflowUid: "..." }
defined structure I would like to introduce ExecuteBatchParameters
class with addLocaleWorkflowPair(targetLocaleId, workflowUid)
method (or something like this) and pass instance of parameters class to executeBatch
method (just to avoid invalid request payload). I expect client code to be like:
$executeBatchParameters = new ExecuteBatchParameters();
$executeBatchParameters
->addLocaleWorkflowPair("fr-FR", "test_wf_uid_1")
->addLocaleWorkflowPair("de-DE", "test_wf_uid_2");
$response = $batchApi->executeBatch($batchUid, $executeBatchParameters);
Also, we would need to add a unit test once the signature of executeBatch
is changed.
Thanks @PavelLoparev, see updates as per your feedback.
Thanks @baikho. Merged and released
Added
localeWorkflows
parameter tostartJobBatchV1
call as per: Smartling API Specification - Execute batch