public static get ( string $invoiceId, |
||
$invoiceId | string | |
$apiContext | is the APIContext for this call. It can be used to pass dynamic configuration and credentials. | |
$restCall | is the Rest Call Service that is used to make rest calls | |
Результат |
public static function get($invoiceId, $apiContext = null, $restCall = null)
{
ArgumentValidator::validate($invoiceId, 'invoiceId');
$payLoad = "";
$json = self::executeCall("/v1/invoicing/invoices/{$invoiceId}", "GET", $payLoad, null, $apiContext, $restCall);
$ret = new Invoice();
$ret->fromJson($json);
return $ret;
}
/** * @depends testCreate * @param $invoice Invoice * @return Invoice */ public function testGet($invoice) { $result = Invoice::get($invoice->getId(), null, $this->mockPayPalRestCall); $this->assertNotNull($result); $this->assertEquals($invoice->getId(), $result->getId()); return $result; }