get() public static method

Retrieve the details for a particular template by passing the template ID to the request URI.
See also: Template::get
Deprecation: Please use `Template::get()` instead.
public static get ( string $templateId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Template
$templateId string
$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 Template
示例#1
0
 /**
  * @dataProvider mockProvider
  * @param Templates $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(TemplateTest::getJson()));
     $result = $obj->get("templateId", $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }