private static function getPrintLink($typePrint, MethodParameters $data = null)
 {
     $refs = isset($data->DocumentRefs) ? $data->DocumentRefs : null;
     if (empty($refs)) {
         return '';
     }
     $link = '';
     $link .= Config::getUrlMyNovaPoshta() . '/orders/' . $typePrint;
     foreach ($refs as $ref) {
         if (isset($data->Copies) && $data->Copies == self::PRINT_COPIES_FOURFOLD) {
             $link .= '/orders[]/' . $ref;
         }
         $link .= '/orders[]/' . $ref;
     }
     if (isset($data->Type)) {
         $link .= '/type/' . $data->Type;
     }
     $link .= '/apiKey/' . Config::getApiKey();
     return $link;
 }
Exemple #2
0
 /**
  * Вызвать метод printScanSheet() - загрузка печатной формы реестра
  *
  * @param MethodParameters $data
  * @return string
  */
 public static function printScanSheet(MethodParameters $data = null)
 {
     $refs = isset($data->DocumentRefs) ? $data->DocumentRefs : null;
     if (empty($refs)) {
         return '';
     }
     $link = '';
     $link .= Config::getUrlMyNovaPoshta() . '/scanSheet/printScanSheet';
     foreach ($refs as $ref) {
         $link .= '/refs[]/' . $ref;
     }
     if (isset($data->Type)) {
         $link .= '/type/' . $data->Type;
     }
     $link .= '/apiKey/' . Config::getApiKey();
     return $link;
 }