forked from LiveCarta/PayPal-PHP-SDK
More Webhook API Changes
- Updated API Models with Fixes - Updated Samples - Additional Functional Tests
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PPModel;
|
||||
use PayPal\Common\ResourceModel;
|
||||
use PayPal\Validation\ArgumentValidator;
|
||||
use PayPal\Api\WebhookEventList;
|
||||
@@ -218,7 +219,7 @@ class WebhookEvent extends ResourceModel
|
||||
/**
|
||||
* This contains the resource that is identified by resource_type element.
|
||||
*
|
||||
* @param mixed $resource
|
||||
* @param \PayPal\Common\PPModel $resource
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@@ -231,7 +232,7 @@ class WebhookEvent extends ResourceModel
|
||||
/**
|
||||
* This contains the resource that is identified by resource_type element.
|
||||
*
|
||||
* @return mixed
|
||||
* @return \PayPal\Common\PPModel
|
||||
*/
|
||||
public function getResource()
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ class WebhookEventType extends ResourceModel
|
||||
* @param string $webhookId
|
||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||
* @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||
* @return WebhookEventList
|
||||
* @return WebhookEventTypeList
|
||||
*/
|
||||
public static function subscribedEventTypes($webhookId, $apiContext = null, $restCall = null)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ class WebhookEventType extends ResourceModel
|
||||
$apiContext,
|
||||
$restCall
|
||||
);
|
||||
$ret = new WebhookEventList();
|
||||
$ret = new WebhookEventTypeList();
|
||||
$ret->fromJson($json);
|
||||
return $ret;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ class WebhookEventType extends ResourceModel
|
||||
*
|
||||
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
|
||||
* @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
|
||||
* @return WebhookEventList
|
||||
* @return WebhookEventTypeList
|
||||
*/
|
||||
public static function availableEventTypes($apiContext = null, $restCall = null)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ class WebhookEventType extends ResourceModel
|
||||
$apiContext,
|
||||
$restCall
|
||||
);
|
||||
$ret = new WebhookEventList();
|
||||
$ret = new WebhookEventTypeList();
|
||||
$ret->fromJson($json);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,10 @@ class PPReflectionUtil
|
||||
*/
|
||||
public static function getPropertyClass($class, $propertyName)
|
||||
{
|
||||
if ($class == get_class(new PPModel())) {
|
||||
// Make it generic if PPModel is used for generating this
|
||||
return get_class(new PPModel());
|
||||
}
|
||||
|
||||
if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['return'])) {
|
||||
$param = $annotations['return'];
|
||||
|
||||
Reference in New Issue
Block a user