Skip to content

Commit

Permalink
Добавил indexFrom в объект ParcelInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
iamwildtuna authored May 10, 2018
1 parent 5bba23b commit 9574e1b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/ParcelInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ParcelInfo
private $width = 0; // Линейная ширина (сантиметры)
private $fragile = false; // Отметка 'Осторожно/Хрупко'
private $indexTo = 101000; // Индекс места назначения (по умолчанию Москва)
private $indexFrom = 101000; // Индекс места отправления (по умолчанию Москва)
private $mailCategory = 'SIMPLE'; // Категория РПО https://otpravka.pochta.ru/specification#/enums-base-mail-category
private $mailType = 'POSTAL_PARCEL'; // Вид РПО https://otpravka.pochta.ru/specification#/enums-base-mail-type
private $weight = 0; // Вес отправления в граммах
Expand All @@ -32,6 +33,7 @@ public function getArray()
$array['dimension']['width'] = $this->getWidth();
}
$array['fragile'] = $this->isFragile();
$array['index-from'] = $this->getIndexFrom();
$array['index-to'] = $this->getIndexTo();
$array['mail-category'] = $this->getMailCategory();
$array['mail-type'] = $this->getMailType();
Expand Down Expand Up @@ -154,6 +156,22 @@ public function setIndexTo($indexTo)
{
$this->indexTo = $indexTo;
}

/**
* @return int
*/
public function getIndexFrom()
{
return $this->indexFrom;
}

/**
* @param int $indexFrom
*/
public function setIndexFrom($indexFrom)
{
$this->indexFrom = $indexFrom;
}

/**
* @return string
Expand Down Expand Up @@ -250,4 +268,4 @@ public function setSimpleNotify($simpleNotify)
{
$this->simpleNotify = $simpleNotify;
}
}
}

0 comments on commit 9574e1b

Please sign in to comment.