Skip to content

Commit 60e8caa

Browse files
committed
Update printMarkings method to print with size 85x85 (or 100x100)
1 parent 5686f76 commit 60e8caa

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/Delivery/NovaPoshtaApi2.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,6 @@ public function newInternetDocument($sender, $recipient, $params)
929929
$sender['CitySender'] = $senderCity['data'][0]['Ref'];
930930
}
931931
$sender['CityRef'] = $sender['CitySender'];
932-
// var_dump($sender['CityRef']);die;
933932
if (!$sender['SenderAddress'] and $sender['CitySender'] and $sender['Warehouse']) {
934933
$senderWarehouse = $this->getWarehouse($sender['CitySender'], $sender['Warehouse']);
935934
$sender['SenderAddress'] = $senderWarehouse['data'][0]['Ref'];
@@ -1029,14 +1028,16 @@ public function printDocument($documentRefs, $type = 'html')
10291028
*
10301029
* @return mixed
10311030
*/
1032-
public function printMarkings($documentRefs, $type = 'new_html')
1031+
public function printMarkings($documentRefs, $type = 'new_html', $size = '85x85')
10331032
{
10341033
$documentRefs = (array) $documentRefs;
1034+
$documentSize = $size === '85x85' ? '85x85' : '100x100';
1035+
$method = 'printMarking' . $documentSize;
10351036
// If needs link
10361037
if ('html_link' == $type or 'pdf_link' == $type) {
1037-
return $this->printGetLink('printMarkings', $documentRefs, $type);
1038+
return $this->printGetLink($method, $documentRefs, $type);
10381039
}
10391040
// If needs data
1040-
return $this->request('InternetDocument', 'printMarkings', array('DocumentRefs' => $documentRefs, 'Type' => $type));
1041+
return $this->request('InternetDocument', $method, array('DocumentRefs' => $documentRefs, 'Type' => $type));
10411042
}
10421043
}

0 commit comments

Comments
 (0)