public function testDeposit()
    {
        // Valid deposits list with single deposit.
        $json = <<<'JSON'
{"returnCode":1,"description":"Successful call","timestampGenerated":"2016-04-21T16:08:12+03:00","data":{"allDepositsCount":"1","selectedDepositsCount":1,"limit":100,"offset":0,"deposits":[{"leadID":"1","dateDeposited":"2016-04-20T13:52:19+00:00","currency":"EUR","amount":"500.00","amountUSD":"574.71","isFirstTimeDeposit":"1","isValid":"1"}]}}
JSON;
        $response = new GetDeposits(new Payload($json));
        $deposits = $response->getDeposits();
        foreach ($deposits as $deposit) {
            $this->assertEquals(1, $deposit->getLeadId());
            $this->assertEquals(strtotime('2016-04-20T13:52:19+00:00'), $deposit->getDateDeposited());
            $this->assertEquals('EUR', $deposit->getCurrency());
            $this->assertEquals(500, $deposit->getAmount());
            $this->assertEquals(574.71, $deposit->getAmountUSD());
            $this->assertTrue($deposit->getIsFirstTimeDeposit());
            $this->assertTrue($deposit->getIsValid());
        }
    }
 /**
  * Returns list of deposits made in the specified date range.
  *
  * @param int $fromTimestamp UNIX timestamp
  * @param int $toTimestamp   UNIX timestamp
  *
  * @return \Opteck\Entities\Deposit[]
  */
 public function getDeposits($fromTimestamp, $toTimestamp = null)
 {
     $toTimestamp = !is_null($toTimestamp) ? $toTimestamp : time();
     $data = ['affiliateID' => $this->affiliateId, 'dateFrom' => date('c', intval($fromTimestamp)), 'dateTo' => date('c', intval($toTimestamp))];
     $data['checksum'] = $this->getChecksum($data);
     $payload = new Payload($this->postRequest($this->getUrl() . '/lead/getDeposits', $data));
     $response = new GetDepositsResponse($payload);
     return $response->getDeposits();
 }