send() public method

Sends an invoice, by ID, to a recipient. Optionally, set the notify_merchant query parameter to send the merchant an invoice update notification. By default, notify_merchant is true.
public send ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : boolean
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
return boolean
 /**
  * @dataProvider mockProvider
  * @param Invoice $obj
  */
 public function testSend($obj, $mockApiContext)
 {
     $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(true));
     $result = $obj->send($mockApiContext, $mockPayPalRestCall);
     $this->assertNotNull($result);
 }