/**
  * @Req\Route("/info-sms/update-resell-package/{id}")
  * @Req\Method({"POST"})
  *
  * @param string  $id
  * @param Request $request
  *
  * @return JsonResponse
  */
 public function updateAction($id, Request $request)
 {
     $data = $request->request->all();
     foreach (array('amount', 'price') as $key) {
         Assertion::keyExists($data, $key);
     }
     $this->updateResellPackageApiWorker->update($id, (int) $data['amount'], (int) $data['price'], $data['description']);
     return new JsonResponse($this->collectResellPackagesApiWorker->collect());
 }
 /**
  * @Req\Route("/info-sms/collect-resell-packages")
  * @Req\Method({"GET"})
  *
  * @return JsonResponse
  */
 public function collectAction()
 {
     return new JsonResponse($this->collectResellPackagesApiWorker->collect());
 }