getJson() public static method

Gets Json String of Object Refund
public static getJson ( ) : string
return string
Example #1
0
 /**
  * @dataProvider mockProvider
  * @param Refund $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(RefundTest::getJson()));
     $result = $obj->get("refundId", $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }
Example #2
0
 /**
  * Gets Json String of Object RelatedResources
  *
  * @return string
  */
 public static function getJson()
 {
     return '{"sale":' . SaleTest::getJson() . ',"authorization":' . AuthorizationTest::getJson() . ',"order":' . OrderTest::getJson() . ',"capture":' . CaptureTest::getJson() . ',"refund":' . RefundTest::getJson() . '}';
 }