コード例 #1
0
 public function testResetTimeLimit()
 {
     $this->object->setTimeLimits('-1 min', '-1 min');
     $o = $this->object->getOptions();
     $this->assertArrayHasKey('SubmittedFromDate', $o);
     $this->assertArrayHasKey('SubmittedToDate', $o);
     $this->object->resetTimeLimits();
     $check = $this->object->getOptions();
     $this->assertArrayNotHasKey('SubmittedFromDate', $check);
     $this->assertArrayNotHasKey('SubmittedToDate', $check);
 }
コード例 #2
0
ファイル: feed_examples.php プロジェクト: mycrom/phpAmazonMWS
/**
 * This function will retrieve a list of all items with quantity that was adjusted within the past 24 hours.
 * The entire list of items is returned, with each item contained in an array.
 * Note that this does not relay whether or not the feed had any errors.
 * To get this information, the feed's results must be retrieved.
 */
function getAmazonFeedStatus()
{
    try {
        $amz = new AmazonFeedList("myStore");
        $amz->setTimeLimits('- 24 hours');
        //limit time frame for feeds to any updated since the given time
        $amz->setFeedStatuses(array("_SUBMITTED_", "_IN_PROGRESS_", "_DONE_"));
        //exclude cancelled feeds
        $amz->fetchFeedSubmissions();
        //this is what actually sends the request
        return $amz->getFeedList();
    } catch (\Exception $ex) {
        echo 'There was a problem with the Amazon library. Error: ' . $ex->getMessage();
    }
}