PayPal\Api\PayoutItem::get PHP Метод

get() публичный статический Метод

Obtain the status of a payout item by passing the item ID to the request URI.
public static get ( string $payoutItemId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : PayoutItemDetails
$payoutItemId 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
Результат PayoutItemDetails
    public static function get($payoutItemId, $apiContext = null, $restCall = null)
    {
        ArgumentValidator::validate($payoutItemId, 'payoutItemId');
        $payLoad = "";
        $json = self::executeCall("/v1/payments/payouts-item/{$payoutItemId}", "GET", $payLoad, null, $apiContext, $restCall);
        $ret = new PayoutItemDetails();
        $ret->fromJson($json);
        return $ret;
    }

Usage Example

Пример #1
0
 /**
  * @dataProvider mockProvider
  * @param PayoutItem $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(PayoutItemDetailsTest::getJson()));
     $result = $obj->get("payoutItemId", $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }
All Usage Examples Of PayPal\Api\PayoutItem::get