コード例 #1
0
 /**
  * Retrieve details for a particular billing agreement by passing the ID of the agreement to the request URI.
  *
  * @param string $agreementId
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return Agreement
  */
 public static function get($agreementId, $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($agreementId, 'agreementId');
     $payLoad = "";
     $json = self::executeCall("/v1/payments/billing-agreements/{$agreementId}", "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new Agreement();
     $ret->fromJson($json);
     return $ret;
 }