Skip to content

Commit

Permalink
Added: getDocumentList method
Browse files Browse the repository at this point in the history
  • Loading branch information
lis-dev committed Mar 18, 2015
1 parent dca5ea9 commit fd02a03
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Delivery/NovaPoshtaApi2.php
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,16 @@ function getDocumentDeliveryDate($citySender, $cityRecipient, $serviceType, $dat
'DateTime' => $dateTime,
));
}

/**
* Get documents list
*
* @param array $params List of params
* @return mixed
*/
function getDocumentList($params = NULL) {
return $this->request('InternetDocument', 'getDocumentList', $params ? $params : NULL);
}

/**
* Check required fields for new InternetDocument and set defaults
Expand Down
8 changes: 8 additions & 0 deletions tests/NovaPoshtaApi2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ function testGetDocumentDeliveryDate() {
$this->assertTrue($result['success']);
}

/**
* getDocumentList()
*/
function testGetDocumentList($params = NULL) {
$result = $this->np->getDocumentList();
$this->assertTrue($result['success']);
}

/**
* Get first existing sender
*/
Expand Down

0 comments on commit fd02a03

Please sign in to comment.