update() public method

Update information in a previously saved card. Only the modified fields need to be passed in the request.
public update ( PatchRequest $patchRequest, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : CreditCard
$patchRequest PatchRequest
$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 CreditCard
 /**
  * @dataProvider mockProvider
  * @param CreditCard $obj
  */
 public function testUpdate($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(self::getJson()));
     $patchRequest = PatchRequestTest::getObject();
     $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }