PayPal\Test\Api\MeasurementTest::getJson PHP Method

getJson() public static method

Gets Json String of Object Measurement
public static getJson ( ) : string
return string
    public static function getJson()
    {
        return '{"value":"TestSample","unit":"TestSample"}';
    }

Usage Example

 /**
  * Gets Json String of Object Item
  * @return string
  */
 public static function getJson()
 {
     return '{"quantity":"TestSample","name":"TestSample","description":"TestSample","price":"12.34","tax":"12.34","currency":"TestSample","sku":"TestSample","url":"http://www.google.com","category":"TestSample","weight":' . MeasurementTest::getJson() . ',"length":' . MeasurementTest::getJson() . ',"height":' . MeasurementTest::getJson() . ',"width":' . MeasurementTest::getJson() . ',"supplementary_data":' . NameValuePairTest::getJson() . ',"postback_data":' . NameValuePairTest::getJson() . '}';
 }