Hi.
When I try to call the Packages\Edit function through the API, it fails with the following error:
{
"response": null,
"error": {
"name": {
"empty": "Please enter a package name."
},
"email_content[0][lang]": {
"empty": "Please enter a language."
},
"pricing[0][currency]": {
"format": "Currency code must be 3 characters."
}
}
}
Here's my code which calls the API:
public function deactivatePackage($id = null)
{
global $blestaapi;
$response = $blestaapi->put("packages", "edit", array("package_id" => $id, "vars" => array("status" => "restricted")));
$responseParsed = array("response" => $response->response(), "error" => $response->errors());
return $responseParsed;
}
I'm quite confused, because it seems that I call the Packages\Add function because it complains about the missing options that are a optional in Packages\Edit but not in Packages\Add.