voucherifyClient = createVoucherifyClient(); } /** * @param UpdateVoucherifyOrderObject $obj * @return null|object * @throws \Voucherify\ClientException */ public function execute(UpdateVoucherifyOrderObject $obj) { try { $result = $this->voucherifyClient->orders->update([ "id" => $obj->getId(), "status" => $obj->getStatus(), ]); return $result; } catch (\Voucherify\ClientException $e) { Log::error($e); return null; } } }