Renaming Namespaces and Organizing Classes

- Updated OpenId classes to be in API namespace
- Updated PP Naming Convention to PayPal Naming Convention
- FormatConverter Class got its own namespace
- Handlers are grouped in Handler namespace
- Samples and Tests Updated Accordingly
This commit is contained in:
japatel
2014-12-17 17:15:01 -06:00
parent 4cb951f8b2
commit 9c0827643b
246 changed files with 1067 additions and 1057 deletions

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Address

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\AgreementTransactions;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class Agreement
@@ -30,7 +30,7 @@ use PayPal\Transport\PPRestCall;
* @property \PayPal\Api\AgreementDetails agreement_details
* @property \PayPal\Api\Links[] links
*/
class Agreement extends ResourceModel
class Agreement extends PayPalResourceModel
{
/**
* Identifier of the agreement.
@@ -593,7 +593,7 @@ class Agreement extends ResourceModel
* Create a new billing agreement by passing the details for the agreement, including the name, description, start date, payer, and billing plan in the request JSON.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Agreement
*/
public function create($apiContext = null, $restCall = null)
@@ -616,7 +616,7 @@ class Agreement extends ResourceModel
*
* @param $paymentToken
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Agreement
*/
public function execute($paymentToken, $apiContext = null, $restCall = null)
@@ -640,7 +640,7 @@ class Agreement extends ResourceModel
*
* @param string $agreementId
* @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
* @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)
@@ -665,7 +665,7 @@ class Agreement extends ResourceModel
*
* @param PatchRequest $patchRequest
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function update($patchRequest, $apiContext = null, $restCall = null)
@@ -689,7 +689,7 @@ class Agreement extends ResourceModel
*
* @param AgreementStateDescriptor $agreementStateDescriptor
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function suspend($agreementStateDescriptor, $apiContext = null, $restCall = null)
@@ -713,7 +713,7 @@ class Agreement extends ResourceModel
*
* @param AgreementStateDescriptor $agreementStateDescriptor
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function reActivate($agreementStateDescriptor, $apiContext = null, $restCall = null)
@@ -737,7 +737,7 @@ class Agreement extends ResourceModel
*
* @param AgreementStateDescriptor $agreementStateDescriptor
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function cancel($agreementStateDescriptor, $apiContext = null, $restCall = null)
@@ -761,7 +761,7 @@ class Agreement extends ResourceModel
*
* @param AgreementStateDescriptor $agreementStateDescriptor
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function billBalance($agreementStateDescriptor, $apiContext = null, $restCall = null)
@@ -785,7 +785,7 @@ class Agreement extends ResourceModel
*
* @param Currency $currency
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function setBalance($currency, $apiContext = null, $restCall = null)
@@ -809,7 +809,7 @@ class Agreement extends ResourceModel
*
* @param string $agreementId
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return AgreementTransactions
*/
public static function transactions($agreementId, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class AgreementDetails
@@ -20,7 +20,7 @@ use PayPal\Common\PPModel;
* @property string final_payment_date
* @property string failed_payment_count
*/
class AgreementDetails extends PPModel
class AgreementDetails extends PayPalModel
{
/**
* The outstanding balance for this agreement.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class AgreementStateDescriptor
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string note
* @property \PayPal\Api\Currency amount
*/
class AgreementStateDescriptor extends PPModel
class AgreementStateDescriptor extends PayPalModel
{
/**
* Reason for changing the state of the agreement.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class AgreementTransaction
@@ -22,7 +22,7 @@ use PayPal\Common\PPModel;
* @property string time_updated
* @property string time_zone
*/
class AgreementTransaction extends PPModel
class AgreementTransaction extends PayPalModel
{
/**
* Id corresponding to this transaction.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class AgreementTransactions
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property \PayPal\Api\AgreementTransaction[] agreement_transaction_list
*/
class AgreementTransactions extends PPModel
class AgreementTransactions extends PayPalModel
{
/**
* Array of agreement_transaction object.

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\NumericValidator;
use PayPal\Common\FormatConverter;
use PayPal\Converter\FormatConverter;
/**
* Class Amount
@@ -18,7 +18,7 @@ use PayPal\Common\FormatConverter;
* @property string total
* @property \PayPal\Api\Details details
*/
class Amount extends PPModel
class Amount extends PayPalModel
{
/**
* 3 letter currency code

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\Capture;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -29,7 +29,7 @@ use PayPal\Validation\ArgumentValidator;
* @property string valid_until
* @property \PayPal\Api\Links links
*/
class Authorization extends PPModel implements IResource
class Authorization extends PayPalModel implements IResource
{
/**
* OAuth Credentials to use for this call
@@ -552,8 +552,8 @@ class Authorization extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/authorization/$authorizationId", "GET", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/authorization/$authorizationId", "GET", $payLoad);
$ret = new Authorization();
$ret->fromJson($json);
return $ret;
@@ -575,8 +575,8 @@ class Authorization extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/authorization/{$this->getId()}/capture", "POST", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/authorization/{$this->getId()}/capture", "POST", $payLoad);
$ret = new Capture();
$ret->fromJson($json);
return $ret;
@@ -596,8 +596,8 @@ class Authorization extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/authorization/{$this->getId()}/void", "POST", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/authorization/{$this->getId()}/void", "POST", $payLoad);
$this->fromJson($json);
return $this;
}
@@ -616,8 +616,8 @@ class Authorization extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/authorization/{$this->getId()}/reauthorize", "POST", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/authorization/{$this->getId()}/reauthorize", "POST", $payLoad);
$this->fromJson($json);
return $this;
}

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class BankAccount
@@ -39,7 +39,7 @@ use PayPal\Transport\PPRestCall;
* @property string valid_until
* @property \PayPal\Api\Links[] links
*/
class BankAccount extends ResourceModel
class BankAccount extends PayPalResourceModel
{
/**
* ID of the bank account being saved for later use.
@@ -1158,7 +1158,7 @@ class BankAccount extends ResourceModel
* Creates a new Bank Account Resource.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return BankAccount
*/
public function create($apiContext = null, $restCall = null)
@@ -1181,7 +1181,7 @@ class BankAccount extends ResourceModel
*
* @param string $bankAccountId
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return BankAccount
*/
public static function get($bankAccountId, $apiContext = null, $restCall = null)
@@ -1205,7 +1205,7 @@ class BankAccount extends ResourceModel
* Delete the bank account resource for the given identifier.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
@@ -1228,7 +1228,7 @@ class BankAccount extends ResourceModel
*
* @param PatchRequest $patchRequest
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return BankAccount
*/
public function update($patchRequest, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class BankAccountsList
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int count
* @property string next_id
*/
class BankAccountsList extends PPModel
class BankAccountsList extends PayPalModel
{
/**
* A list of bank account resources

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class BankToken
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string external_customer_id
* @property string mandate_reference_number
*/
class BankToken extends PPModel
class BankToken extends PayPalModel
{
/**
* ID of a previously saved Bank resource using /vault/bank API.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class BaseAddress
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string postal_code
* @property string state
*/
class BaseAddress extends PPModel
class BaseAddress extends PayPalModel
{
/**
* Line 1 of the Address (eg. number, street, etc).

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class BillingInfo
@@ -21,7 +21,7 @@ use PayPal\Common\PPModel;
* @property string notification_channel
* @property \PayPal\Api\Phone phone
*/
class BillingInfo extends PPModel
class BillingInfo extends PayPalModel
{
/**
* Email address of the invoice recipient. 260 characters max.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class CancelNotification
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property bool send_to_merchant
* @property bool send_to_payer
*/
class CancelNotification extends PPModel
class CancelNotification extends PayPalModel
{
/**
* Subject of the notification.

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\Refund;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -25,7 +25,7 @@ use PayPal\Validation\ArgumentValidator;
* @property string parent_payment
* @property \PayPal\Api\Links links
*/
class Capture extends PPModel implements IResource
class Capture extends PayPalModel implements IResource
{
/**
* OAuth Credentials to use for this call
@@ -352,8 +352,8 @@ class Capture extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/capture/$captureId", "GET", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/capture/$captureId", "GET", $payLoad);
$ret = new Capture();
$ret->fromJson($json);
return $ret;
@@ -375,8 +375,8 @@ class Capture extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/capture/{$this->getId()}/refund", "POST", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/capture/{$this->getId()}/refund", "POST", $payLoad);
$ret = new Refund();
$ret->fromJson($json);
return $ret;

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property string carrier_account_id
* @property string external_customer_id
*/
class CarrierAccountToken extends PPModel
class CarrierAccountToken extends PayPalModel
{
/**
* ID of a previously saved carrier account resource.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -22,7 +22,7 @@ use PayPal\Rest\ApiContext;
* @property \PayPal\Api\PaymentOptions payment_options
* @property \PayPal\Api\ItemList item_list
*/
class CartBase extends PPModel
class CartBase extends PayPalModel
{
/**
* Amount being collected.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class ChargeModel
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string type
* @property \PayPal\Api\Currency amount
*/
class ChargeModel extends PPModel
class ChargeModel extends PayPalModel
{
/**
* Identifier of the charge model. 128 characters max.

View File

@@ -2,9 +2,9 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Validation\NumericValidator;
use PayPal\Common\FormatConverter;
use PayPal\Converter\FormatConverter;
/**
* Class Cost
@@ -16,7 +16,7 @@ use PayPal\Common\FormatConverter;
* @property string percent
* @property \PayPal\Api\Currency amount
*/
class Cost extends PPModel
class Cost extends PayPalModel
{
/**
* Cost in percent. Range of 0 to 100.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class CreateProfileResponse
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property string id
*/
class CreateProfileResponse extends PPModel
class CreateProfileResponse extends PayPalModel
{
/**
* ID of the payment web experience profile.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Credit
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string type
* @property string terms
*/
class Credit extends PPModel
class Credit extends PayPalModel
{
/**
* Unique identifier of credit resource.

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class CreditCard
@@ -30,7 +30,7 @@ use PayPal\Transport\PPRestCall;
* @property string update_time
* @property \PayPal\Api\Links[] links
*/
class CreditCard extends ResourceModel
class CreditCard extends PayPalResourceModel
{
/**
* ID of the credit card being saved for later use.
@@ -637,7 +637,7 @@ class CreditCard extends ResourceModel
* Creates a new Credit Card Resource (aka Tokenize).
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return CreditCard
*/
public function create($apiContext = null, $restCall = null)
@@ -660,7 +660,7 @@ class CreditCard extends ResourceModel
*
* @param string $creditCardId
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return CreditCard
*/
public static function get($creditCardId, $apiContext = null, $restCall = null)
@@ -684,7 +684,7 @@ class CreditCard extends ResourceModel
* Delete the Credit Card resource for the given identifier.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
@@ -706,7 +706,7 @@ class CreditCard extends ResourceModel
* Update information in a previously saved card. Only the modified fields need to be passed in the request.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return CreditCard
*/
public function update($apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property int count
* @property string next_id
*/
class CreditCardHistory extends PPModel
class CreditCardHistory extends PayPalModel
{
/**
* A list of credit card resources

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class CreditCardList
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int count
* @property string next_id
*/
class CreditCardList extends PPModel
class CreditCardList extends PayPalModel
{
/**
* A list of credit card resources

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class CreditCardToken
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property int expire_month
* @property int expire_year
*/
class CreditCardToken extends PPModel
class CreditCardToken extends PayPalModel
{
/**
* ID of a previously saved Credit Card resource using /vault/credit-card API.

View File

@@ -2,8 +2,8 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\FormatConverter;
use PayPal\Common\PayPalModel;
use PayPal\Converter\FormatConverter;
use PayPal\Validation\NumericValidator;
/**
@@ -16,7 +16,7 @@ use PayPal\Validation\NumericValidator;
* @property string currency
* @property string value
*/
class Currency extends PPModel
class Currency extends PayPalModel
{
/**
* 3 letter currency code as defined by ISO 4217.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class CustomAmount
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string label
* @property \PayPal\Api\Currency amount
*/
class CustomAmount extends PPModel
class CustomAmount extends PayPalModel
{
/**
* Custom amount label. 25 characters max.

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\NumericValidator;
use PayPal\Common\FormatConverter;
use PayPal\Converter\FormatConverter;
/**
* Class Details
@@ -23,7 +23,7 @@ use PayPal\Common\FormatConverter;
* @property string handling_fee
* @property string gift_wrap
*/
class Details extends PPModel
class Details extends PayPalModel
{
/**
* Amount being charged for shipping.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Error
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\ErrorDetails[] details
* @property \PayPal\Api\Links[] links
*/
class Error extends PPModel
class Error extends PayPalModel
{
/**
* Human readable, unique name of the error.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class ErrorDetails
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string field
* @property string issue
*/
class ErrorDetails extends PPModel
class ErrorDetails extends PayPalModel
{
/**
* Name of the field that caused the error.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class ExtendedBankAccount

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -15,7 +15,7 @@ use PayPal\Validation\UrlValidator;
* @property string landing_page_type
* @property string bank_txn_pending_url
*/
class FlowConfig extends PPModel
class FlowConfig extends PayPalModel
{
/**
* Type of PayPal page to be displayed when a user lands on the PayPal site for checkout. Allowed values: `Billing` or `Login`. When set to `Billing`, the Non-PayPal account landing page is used. When set to `Login`, the PayPal account login landing page is used.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class FundingInstrument
@@ -19,7 +19,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\BankToken bank_account_token
* @property \PayPal\Api\Credit credit
*/
class FundingInstrument extends PPModel
class FundingInstrument extends PayPalModel
{
/**
* Credit Card information.

View File

@@ -2,9 +2,9 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class FuturePayment
@@ -33,9 +33,9 @@ class FuturePayment extends Payment
);
}
$payLoad = $this->toJSON();
$call = new PPRestCall($apiContext);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(
array('PayPal\Rest\RestHandler'),
array('PayPal\Handler\RestHandler'),
"/v1/payments/payment",
"POST",
$payLoad,

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class HyperSchema
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string pathStart
* @property string mediaType
*/
class HyperSchema extends PPModel
class HyperSchema extends PayPalModel
{
/**
* Sets Links

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Image
@@ -11,7 +11,7 @@ use PayPal\Common\PPModel;
*
* @property string image
*/
class Image extends PPModel
class Image extends PayPalModel
{
/**
* List of invoices belonging to a merchant.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InputFields
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int no_shipping
* @property int address_override
*/
class InputFields extends PPModel
class InputFields extends PayPalModel
{
/**
* Enables the buyer to enter a note to the merchant on the PayPal page during checkout.

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\UrlValidator;
/**
@@ -40,7 +40,7 @@ use PayPal\Validation\UrlValidator;
* @property \PayPal\Api\Metadata metadata
* @property string additional_data
*/
class Invoice extends ResourceModel
class Invoice extends PayPalResourceModel
{
/**
* Unique invoice resource identifier.
@@ -1070,7 +1070,7 @@ class Invoice extends ResourceModel
* Create a new invoice by passing the details for the invoice, including the merchant_info, to the request URI.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Invoice
*/
public function create($apiContext = null, $restCall = null)
@@ -1093,7 +1093,7 @@ class Invoice extends ResourceModel
*
* @param Search $search
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return InvoiceSearchResponse
*/
public static function search($search, $apiContext = null, $restCall = null)
@@ -1117,7 +1117,7 @@ class Invoice extends ResourceModel
* Send a specific invoice to its intended recipient by passing the invoice ID to the request URI. Optionally, you can specify whether to send the merchant an invoice update notification by using the notify_merchant query parameter. By default, notify_merchant is true.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function send($apiContext = null, $restCall = null)
@@ -1140,7 +1140,7 @@ class Invoice extends ResourceModel
*
* @param Notification $notification
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function remind($notification, $apiContext = null, $restCall = null)
@@ -1164,7 +1164,7 @@ class Invoice extends ResourceModel
*
* @param CancelNotification $cancelNotification
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function cancel($cancelNotification, $apiContext = null, $restCall = null)
@@ -1188,7 +1188,7 @@ class Invoice extends ResourceModel
*
* @param PaymentDetail $paymentDetail
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function recordPayment($paymentDetail, $apiContext = null, $restCall = null)
@@ -1212,7 +1212,7 @@ class Invoice extends ResourceModel
*
* @param RefundDetail $refundDetail
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function recordRefund($refundDetail, $apiContext = null, $restCall = null)
@@ -1236,7 +1236,7 @@ class Invoice extends ResourceModel
*
* @param string $invoiceId
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Invoice
*/
public static function get($invoiceId, $apiContext = null, $restCall = null)
@@ -1261,7 +1261,7 @@ class Invoice extends ResourceModel
*
* @param array $params
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return InvoiceSearchResponse
*/
public static function getAll($params = array(), $apiContext = null, $restCall = null)
@@ -1294,7 +1294,7 @@ class Invoice extends ResourceModel
* List some or all invoices for a merchant according to optional query string parameters specified.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return InvoiceSearchResponse
*/
public static function get_all($apiContext = null, $restCall = null)
@@ -1306,7 +1306,7 @@ class Invoice extends ResourceModel
* Fully update an invoice by passing the invoice ID to the request URI. In addition, pass a complete invoice object in the request JSON. Partial updates are not supported.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Invoice
*/
public function update($apiContext = null, $restCall = null)
@@ -1329,7 +1329,7 @@ class Invoice extends ResourceModel
* Delete a particular invoice by passing the invoice ID to the request URI.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
@@ -1353,7 +1353,7 @@ class Invoice extends ResourceModel
* @param array $params
* @param string $invoiceId
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Image
*/
public static function qrCode($invoiceId, $params = array(), $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoiceAddress

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoiceItem
@@ -19,7 +19,7 @@ use PayPal\Common\PPModel;
* @property string date
* @property \PayPal\Api\Cost discount
*/
class InvoiceItem extends PPModel
class InvoiceItem extends PayPalModel
{
/**
* Name of the item. 60 characters max.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoiceSearchResponse
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property int total_count
* @property \PayPal\Api\Invoice[] invoices
*/
class InvoiceSearchResponse extends PPModel
class InvoiceSearchResponse extends PayPalModel
{
/**
* Total number of invoices.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -23,7 +23,7 @@ use PayPal\Validation\UrlValidator;
* @property string last_sent_by
* @property string payer_view_url
*/
class InvoicingMetaData extends PPModel
class InvoicingMetaData extends PayPalModel
{
/**
* Date when the resource was created.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoicingNotification
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string note
* @property bool send_to_merchant
*/
class InvoicingNotification extends PPModel
class InvoicingNotification extends PayPalModel
{
/**
* Subject of the notification.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoicingPaymentDetail
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string method
* @property string note
*/
class InvoicingPaymentDetail extends PPModel
class InvoicingPaymentDetail extends PayPalModel
{
/**
* PayPal payment detail indicating whether payment was made in an invoicing flow via PayPal or externally. In the case of the mark-as-paid API, payment type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoicingRefundDetail
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string date
* @property string note
*/
class InvoicingRefundDetail extends PPModel
class InvoicingRefundDetail extends PayPalModel
{
/**
* PayPal refund type indicating whether refund was done in invoicing flow via PayPal or externally. In the case of the mark-as-refunded API, refund type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\UrlValidator;
use PayPal\Validation\NumericValidator;
use PayPal\Common\FormatConverter;
use PayPal\Converter\FormatConverter;
/**
* Class Item
@@ -27,7 +27,7 @@ use PayPal\Common\FormatConverter;
* @property \PayPal\Api\NameValuePair supplementary_data
* @property \PayPal\Api\NameValuePair postback_data
*/
class Item extends PPModel
class Item extends PayPalModel
{
/**
* Number of items.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -15,7 +15,7 @@ use PayPal\Rest\ApiContext;
* @property \PayPal\Api\Item[] items
* @property \PayPal\Api\ShippingAddress shipping_address
*/
class ItemList extends PPModel
class ItemList extends PayPalModel
{
/**
* Is this list empty?

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Links
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string enctype
* @property \PayPal\Api\HyperSchema schema
*/
class Links extends PPModel
class Links extends PayPalModel
{
/**
* Sets Href

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class MerchantInfo
@@ -22,7 +22,7 @@ use PayPal\Common\PPModel;
* @property string tax_id
* @property string additional_info
*/
class MerchantInfo extends PPModel
class MerchantInfo extends PayPalModel
{
/**
* Email address of the merchant. 260 characters max.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -23,7 +23,7 @@ use PayPal\Validation\UrlValidator;
* @property string accepted_payment_type
* @property string char_set
*/
class MerchantPreferences extends PPModel
class MerchantPreferences extends PayPalModel
{
/**
* Identifier of the merchant_preferences. 128 characters max.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -23,7 +23,7 @@ use PayPal\Validation\UrlValidator;
* @property string last_sent_by
* @property string payer_view_url
*/
class Metadata extends PPModel
class Metadata extends PayPalModel
{
/**
* Date when the resource was created.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -15,7 +15,7 @@ use PayPal\Rest\ApiContext;
* @property string name
* @property string value
*/
class NameValuePair extends PPModel
class NameValuePair extends PayPalModel
{
/**
* Key for the name value pair. The value name types should be correlated

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Notification
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string note
* @property bool send_to_merchant
*/
class Notification extends PPModel
class Notification extends PayPalModel
{
/**
* Subject of the notification.

View File

@@ -0,0 +1,119 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalModel;
/**
* End-User's preferred address.
*/
class OpenIdAddress extends PayPalModel
{
/**
* Full street address component, which may include house number, street name.
*
* @param string $street_address
*/
public function setStreetAddress($street_address)
{
$this->street_address = $street_address;
return $this;
}
/**
* Full street address component, which may include house number, street name.
*
* @return string
*/
public function getStreetAddress()
{
return $this->street_address;
}
/**
* City or locality component.
*
* @param string $locality
*/
public function setLocality($locality)
{
$this->locality = $locality;
return $this;
}
/**
* City or locality component.
*
* @return string
*/
public function getLocality()
{
return $this->locality;
}
/**
* State, province, prefecture or region component.
*
* @param string $region
*/
public function setRegion($region)
{
$this->region = $region;
return $this;
}
/**
* State, province, prefecture or region component.
*
* @return string
*/
public function getRegion()
{
return $this->region;
}
/**
* Zip code or postal code component.
*
* @param string $postal_code
*/
public function setPostalCode($postal_code)
{
$this->postal_code = $postal_code;
return $this;
}
/**
* Zip code or postal code component.
*
* @return string
*/
public function getPostalCode()
{
return $this->postal_code;
}
/**
* Country name component.
*
* @param string $country
*/
public function setCountry($country)
{
$this->country = $country;
return $this;
}
/**
* Country name component.
*
* @return string
*/
public function getCountry()
{
return $this->country;
}
}

View File

@@ -0,0 +1,76 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalModel;
/**
* Error resource
*/
class OpenIdError extends PayPalModel
{
/**
* A single ASCII error code from the following enum.
*
* @param string $error
*/
public function setError($error)
{
$this->error = $error;
return $this;
}
/**
* A single ASCII error code from the following enum.
*
* @return string
*/
public function getError()
{
return $this->error;
}
/**
* A resource ID that indicates the starting resource in the returned results.
*
* @param string $error_description
*/
public function setErrorDescription($error_description)
{
$this->error_description = $error_description;
return $this;
}
/**
* A resource ID that indicates the starting resource in the returned results.
*
* @return string
*/
public function getErrorDescription()
{
return $this->error_description;
}
/**
* A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
*
* @param string $error_uri
*/
public function setErrorUri($error_uri)
{
$this->error_uri = $error_uri;
return $this;
}
/**
* A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
*
* @return string
*/
public function getErrorUri()
{
return $this->error_uri;
}
}

View File

@@ -0,0 +1,104 @@
<?php
namespace PayPal\Api;
use PayPal\Core\PayPalConstants;
use PayPal\Rest\ApiContext;
class OpenIdSession
{
/**
* Returns the PayPal URL to which the user must be redirected to
* start the authentication / authorization process.
*
* @param string $redirectUri Uri on merchant website to where
* the user must be redirected to post paypal login
* @param array $scope The access privilges that you are requesting for
* from the user. Pass empty array for all scopes.
* @param string $clientId client id from developer portal
* See https://developer.paypal.com/webapps/developer/docs/integration/direct/log-in-with-paypal/detailed/#attributes for more
* @param ApiContext $apiContext Optional API Context
*/
public static function getAuthorizationUrl($redirectUri, $scope, $clientId, $nonce = null, $state = null, $apiContext = null)
{
$apiContext = $apiContext ? $apiContext : new ApiContext();
$config = $apiContext->getConfig();
if ($apiContext->get($clientId)) {
$clientId = $apiContext->get($clientId);
}
$clientId = $clientId ? $clientId : $apiContext->getCredential()->getClientId();
$scope = count($scope) != 0 ? $scope : array('openid', 'profile', 'address', 'email', 'phone',
'https://uri.paypal.com/services/paypalattributes', 'https://uri.paypal.com/services/expresscheckout');
if (!in_array('openid', $scope)) {
$scope[] = 'openid';
}
$params = array(
'client_id' => $clientId,
'response_type' => 'code',
'scope' => implode(" ", $scope),
'redirect_uri' => $redirectUri
);
if ($nonce) {
$params['nonce'] = $nonce;
}
if ($state) {
$params['state'] = $state;
}
return sprintf("%s/v1/authorize?%s", self::getBaseUrl($config), http_build_query($params));
}
/**
* Returns the URL to which the user must be redirected to
* logout from the OpenID provider (i.e. PayPal)
*
* @param string $redirectUri Uri on merchant website to where
* the user must be redirected to post logout
* @param string $idToken id_token from the TokenInfo object
* @param ApiContext $apiContext Optional API Context
* @return string logout URL
*/
public static function getLogoutUrl($redirectUri, $idToken, $apiContext = null)
{
if (is_null($apiContext)) {
$apiContext = new ApiContext();
}
$config = $apiContext->getConfig();
$params = array(
'id_token' => $idToken,
'redirect_uri' => $redirectUri,
'logout' => 'true'
);
return sprintf("%s/v1/endsession?%s", self::getBaseUrl($config), http_build_query($params));
}
/**
* Gets the base URL for the Redirect URI
*
* @param $config
* @return null|string
*/
private static function getBaseUrl($config)
{
if (array_key_exists('openid.RedirectUri', $config)) {
return $config['openid.RedirectUri'];
} else if (array_key_exists('mode', $config)) {
switch (strtoupper($config['mode'])) {
case 'SANDBOX':
return PayPalConstants::OPENID_REDIRECT_SANDBOX_URL;
case 'LIVE':
return PayPalConstants::OPENID_REDIRECT_LIVE_URL;
}
}
return null;
}
}

View File

@@ -0,0 +1,239 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PayPalRestCall;
/**
* Token grant resource
*/
class OpenIdTokeninfo extends PayPalResourceModel
{
/**
* OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
*
* @param string $scope
*/
public function setScope($scope)
{
$this->scope = $scope;
return $this;
}
/**
* OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
*
* @return string
*/
public function getScope()
{
return $this->scope;
}
/**
* The access token issued by the authorization server.
*
* @param string $access_token
*/
public function setAccessToken($access_token)
{
$this->access_token = $access_token;
return $this;
}
/**
* The access token issued by the authorization server.
*
* @return string
*/
public function getAccessToken()
{
return $this->access_token;
}
/**
* The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6.
*
* @param string $refresh_token
*/
public function setRefreshToken($refresh_token)
{
$this->refresh_token = $refresh_token;
return $this;
}
/**
* The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6.
*
* @return string
*/
public function getRefreshToken()
{
return $this->refresh_token;
}
/**
* The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1). Value is case insensitive.
*
* @param string $token_type
*/
public function setTokenType($token_type)
{
$this->token_type = $token_type;
return $this;
}
/**
* The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1). Value is case insensitive.
*
* @return string
*/
public function getTokenType()
{
return $this->token_type;
}
/**
* The id_token is a session token assertion that denotes the user's authentication status
*
* @param string $id_token
*/
public function setIdToken($id_token)
{
$this->id_token = $id_token;
return $this;
}
/**
* The id_token is a session token assertion that denotes the user's authentication status
*
* @return string
*/
public function getIdToken()
{
return $this->id_token;
}
/**
* The lifetime in seconds of the access token.
*
* @param integer $expires_in
*/
public function setExpiresIn($expires_in)
{
$this->expires_in = $expires_in;
return $this;
}
/**
* The lifetime in seconds of the access token.
*
* @return integer
*/
public function getExpiresIn()
{
return $this->expires_in;
}
/**
* Creates an Access Token from an Authorization Code.
*
* @path /v1/identity/openidconnect/tokenservice
* @method POST
* @param array $params (allowed values are client_id, client_secret, grant_type, code and redirect_uri)
* (required) client_id from developer portal
* (required) client_secret from developer portal
* (required) code is Authorization code previously received from the authorization server
* (required) redirect_uri Redirection endpoint that must match the one provided during the
* authorization request that ended in receiving the authorization code.
* (optional) grant_type is the Token grant type. Defaults to authorization_code
* @param string $clientId
* @param string $clientSecret
* @param ApiContext $apiContext Optional API Context
* @param PayPalRestCall $restCall
* @return OpenIdTokeninfo
*/
public static function createFromAuthorizationCode($params, $clientId = null, $clientSecret = null, $apiContext = null, $restCall = null)
{
static $allowedParams = array('grant_type' => 1, 'code' => 1, 'redirect_uri' => 1);
if (!array_key_exists('grant_type', $params)) {
$params['grant_type'] = 'authorization_code';
}
$apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential);
if (sizeof($apiContext->get($clientId)) > 0) {
$clientId = $apiContext->get($clientId);
}
if (sizeof($apiContext->get($clientSecret)) > 0) {
$clientSecret = $apiContext->get($clientSecret);
}
$clientId = $clientId ? $clientId : $apiContext->getCredential()->getClientId();
$clientSecret = $clientSecret ? $clientSecret : $apiContext->getCredential()->getClientSecret();
$json = self::executeCall(
"/v1/identity/openidconnect/tokenservice",
"POST",
http_build_query(array_intersect_key($params, $allowedParams)),
array(
'Content-Type' => 'application/x-www-form-urlencoded',
'Authorization' => 'Basic ' . base64_encode($clientId . ":" . $clientSecret)
),
$apiContext,
$restCall
);
$token = new OpenIdTokeninfo();
$token->fromJson($json);
return $token;
}
/**
* Creates an Access Token from an Refresh Token.
*
* @path /v1/identity/openidconnect/tokenservice
* @method POST
* @param array $params (allowed values are grant_type and scope)
* (required) client_id from developer portal
* (required) client_secret from developer portal
* (optional) refresh_token refresh token. If one is not passed, refresh token from the current object is used.
* (optional) grant_type is the Token grant type. Defaults to refresh_token
* (optional) scope is an array that either the same or a subset of the scope passed to the authorization request
* @param APIContext $apiContext Optional API Context
* @return OpenIdTokeninfo
*/
public function createFromRefreshToken($params, $apiContext = null)
{
static $allowedParams = array('grant_type' => 1, 'refresh_token' => 1, 'scope' => 1);
$apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential);
if (!array_key_exists('grant_type', $params)) {
$params['grant_type'] = 'refresh_token';
}
if (!array_key_exists('refresh_token', $params)) {
$params['refresh_token'] = $this->getRefreshToken();
}
$clientId = isset($params['client_id']) ? $params['client_id'] : $apiContext->getCredential()->getClientId();
$clientSecret = isset($params['client_secret']) ? $params['client_secret'] : $apiContext->getCredential()->getClientSecret();
$json = self::executeCall(
"/v1/identity/openidconnect/tokenservice",
"POST",
http_build_query(array_intersect_key($params, $allowedParams)),
array(
'Content-Type' => 'application/x-www-form-urlencoded',
'Authorization' => 'Basic ' . base64_encode($clientId . ":" . $clientSecret)
),
$apiContext
);
$this->fromJson($json);
return $this;
}
}

View File

@@ -0,0 +1,493 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
/**
* OpenIdConnect UserInfo Resource
*/
class OpenIdUserinfo extends PayPalResourceModel
{
/**
* Subject - Identifier for the End-User at the Issuer.
*
* @param string $user_id
*/
public function setUserId($user_id)
{
$this->user_id = $user_id;
return $this;
}
/**
* Subject - Identifier for the End-User at the Issuer.
*
* @return string
*/
public function getUserId()
{
return $this->user_id;
}
/**
* Subject - Identifier for the End-User at the Issuer.
*
* @param string $sub
*/
public function setSub($sub)
{
$this->sub = $sub;
return $this;
}
/**
* Subject - Identifier for the End-User at the Issuer.
*
* @return string
*/
public function getSub()
{
return $this->sub;
}
/**
* End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Given name(s) or first name(s) of the End-User
*
* @param string $given_name
*/
public function setGivenName($given_name)
{
$this->given_name = $given_name;
return $this;
}
/**
* Given name(s) or first name(s) of the End-User
*
* @return string
*/
public function getGivenName()
{
return $this->given_name;
}
/**
* Surname(s) or last name(s) of the End-User.
*
* @param string $family_name
*/
public function setFamilyName($family_name)
{
$this->family_name = $family_name;
return $this;
}
/**
* Surname(s) or last name(s) of the End-User.
*
* @return string
*/
public function getFamilyName()
{
return $this->family_name;
}
/**
* Middle name(s) of the End-User.
*
* @param string $middle_name
*/
public function setMiddleName($middle_name)
{
$this->middle_name = $middle_name;
return $this;
}
/**
* Middle name(s) of the End-User.
*
* @return string
*/
public function getMiddleName()
{
return $this->middle_name;
}
/**
* URL of the End-User's profile picture.
*
* @param string $picture
*/
public function setPicture($picture)
{
$this->picture = $picture;
return $this;
}
/**
* URL of the End-User's profile picture.
*
* @return string
*/
public function getPicture()
{
return $this->picture;
}
/**
* End-User's preferred e-mail address.
*
* @param string $email
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* End-User's preferred e-mail address.
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* True if the End-User's e-mail address has been verified; otherwise false.
*
* @param boolean $email_verified
*/
public function setEmailVerified($email_verified)
{
$this->email_verified = $email_verified;
return $this;
}
/**
* True if the End-User's e-mail address has been verified; otherwise false.
*
* @return boolean
*/
public function getEmailVerified()
{
return $this->email_verified;
}
/**
* End-User's gender.
*
* @param string $gender
*/
public function setGender($gender)
{
$this->gender = $gender;
return $this;
}
/**
* End-User's gender.
*
* @return string
*/
public function getGender()
{
return $this->gender;
}
/**
* End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used.
*
* @param string $birthday
*/
public function setBirthday($birthday)
{
$this->birthday = $birthday;
return $this;
}
/**
* End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used.
*
* @return string
*/
public function getBirthday()
{
return $this->birthday;
}
/**
* Time zone database representing the End-User's time zone
*
* @param string $zoneinfo
*/
public function setZoneinfo($zoneinfo)
{
$this->zoneinfo = $zoneinfo;
return $this;
}
/**
* Time zone database representing the End-User's time zone
*
* @return string
*/
public function getZoneinfo()
{
return $this->zoneinfo;
}
/**
* End-User's locale.
*
* @param string $locale
*/
public function setLocale($locale)
{
$this->locale = $locale;
return $this;
}
/**
* End-User's locale.
*
* @return string
*/
public function getLocale()
{
return $this->locale;
}
/**
* End-User's language.
*
* @param string $language
*/
public function setLanguage($language)
{
$this->language = $language;
return $this;
}
/**
* End-User's language.
*
* @return string
*/
public function getLanguage()
{
return $this->language;
}
/**
* End-User's verified status.
*
* @param boolean $verified
*/
public function setVerified($verified)
{
$this->verified = $verified;
return $this;
}
/**
* End-User's verified status.
*
* @return boolean
*/
public function getVerified()
{
return $this->verified;
}
/**
* End-User's preferred telephone number.
*
* @param string $phone_number
*/
public function setPhoneNumber($phone_number)
{
$this->phone_number = $phone_number;
return $this;
}
/**
* End-User's preferred telephone number.
*
* @return string
*/
public function getPhoneNumber()
{
return $this->phone_number;
}
/**
* End-User's preferred address.
*
* @param \PayPal\Api\OpenIdAddress $address
*/
public function setAddress($address)
{
$this->address = $address;
return $this;
}
/**
* End-User's preferred address.
*
* @return \PayPal\Api\OpenIdAddress
*/
public function getAddress()
{
return $this->address;
}
/**
* Verified account status.
*
* @param boolean $verified_account
*/
public function setVerifiedAccount($verified_account)
{
$this->verified_account = $verified_account;
return $this;
}
/**
* Verified account status.
*
* @return boolean
*/
public function getVerifiedAccount()
{
return $this->verified_account;
}
/**
* Account type.
*
* @param string $account_type
*/
public function setAccountType($account_type)
{
$this->account_type = $account_type;
return $this;
}
/**
* Account type.
*
* @return string
*/
public function getAccountType()
{
return $this->account_type;
}
/**
* Account holder age range.
*
* @param string $age_range
*/
public function setAgeRange($age_range)
{
$this->age_range = $age_range;
return $this;
}
/**
* Account holder age range.
*
* @return string
*/
public function getAgeRange()
{
return $this->age_range;
}
/**
* Account payer identifier.
*
* @param string $payer_id
*/
public function setPayerId($payer_id)
{
$this->payer_id = $payer_id;
return $this;
}
/**
* Account payer identifier.
*
* @return string
*/
public function getPayerId()
{
return $this->payer_id;
}
/**
* returns user details
*
* @path /v1/identity/openidconnect/userinfo
* @method GET
* @param array $params (allowed values are access_token)
* access_token - access token from the createFromAuthorizationCode / createFromRefreshToken calls
* @param ApiContext $apiContext Optional API Context
* @return OpenIdUserinfo
*/
public static function getUserinfo($params, $apiContext = null)
{
static $allowedParams = array('schema' => 1);
$params = is_array($params) ? $params : array();
if (!array_key_exists('schema', $params)) {
$params['schema'] = 'openid';
}
$requestUrl = "/v1/identity/openidconnect/userinfo?"
. http_build_query(array_intersect_key($params, $allowedParams));
$json = self::executeCall(
$requestUrl,
"GET",
"",
array(
'Authorization' => "Bearer " . $params['access_token'],
'Content-Type' => 'x-www-form-urlencoded'
),
$apiContext
);
$ret = new OpenIdUserinfo();
$ret->fromJson($json);
return $ret;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -24,7 +24,7 @@ use PayPal\Rest\ApiContext;
* @property string protection_eligibility_type
* @property \PayPal\Api\Links links
*/
class Order extends PPModel
class Order extends PayPalModel
{
/**
* Identifier of the order transaction.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class OverrideChargeModel
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string charge_id
* @property \PayPal\Api\Currency amount
*/
class OverrideChargeModel extends PPModel
class OverrideChargeModel extends PayPalModel
{
/**
* ID of charge model.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Patch
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property mixed value
* @property string from
*/
class Patch extends PPModel
class Patch extends PayPalModel
{
/**
* The operation to perform.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PatchRequest
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property \PayPal\Api\Patch[] patches
*/
class PatchRequest extends PPModel
class PatchRequest extends PayPalModel
{
/**
* Placeholder for holding array of patch objects

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property string merchant_id
* @property \PayPal\Api\Phone phone
*/
class Payee extends PPModel
class Payee extends PayPalModel
{
/**
* Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receiver PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Payer
@@ -17,7 +17,7 @@ use PayPal\Common\PPModel;
* @property string funding_option_id
* @property \PayPal\Api\PayerInfo payer_info
*/
class Payer extends PPModel
class Payer extends PayPalModel
{
/**
* Payment method being used - PayPal Wallet payment, Bank Direct Debit, or Direct Credit card.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PayerInfo
@@ -25,7 +25,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Address billing_address
* @property \PayPal\Api\ShippingAddress shipping_address
*/
class PayerInfo extends PPModel
class PayerInfo extends PayPalModel
{
/**
* Email address representing the Payer.

View File

@@ -2,12 +2,12 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\PaymentHistory;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -29,7 +29,7 @@ use PayPal\Validation\ArgumentValidator;
* @property \PayPal\Api\Links links
* @property string experience_profile_id
*/
class Payment extends ResourceModel
class Payment extends PayPalResourceModel
{
/**
* OAuth Credentials to use for this call
@@ -393,7 +393,7 @@ class Payment extends ResourceModel
* Creates (and processes) a new Payment Resource.
*
* @param \PayPal\Rest\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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Payment
*/
public function create($apiContext = null, $restCall = null)
@@ -417,7 +417,7 @@ class Payment extends ResourceModel
*
* @param string $paymentId
* @param \PayPal\Rest\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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Payment
*/
public static function get($paymentId, $apiContext = null, $restCall = null)
@@ -443,7 +443,7 @@ class Payment extends ResourceModel
*
* @param PatchRequest $patchRequest
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return boolean
*/
public function update($patchRequest, $apiContext = null, $restCall = null)
@@ -467,7 +467,7 @@ class Payment extends ResourceModel
*
* @param PaymentExecution $paymentExecution
* @param \PayPal\Rest\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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Payment
*/
public function execute($paymentExecution, $apiContext = null, $restCall = null)
@@ -493,7 +493,7 @@ class Payment extends ResourceModel
*
* @param array $params
* @param \PayPal\Rest\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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return PaymentHistory
*/
public static function all($params, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentCard
@@ -27,7 +27,7 @@ use PayPal\Common\PPModel;
* @property string valid_until
* @property \PayPal\Api\Links[] links
*/
class PaymentCard extends PPModel
class PaymentCard extends PayPalModel
{
/**
* ID of the credit card being saved for later use.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentCardToken
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property int expire_month
* @property int expire_year
*/
class PaymentCardToken extends PPModel
class PaymentCardToken extends PayPalModel
{
/**
* ID of a previously saved Payment Card resource.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentDefinition
@@ -20,7 +20,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Currency amount
* @property \PayPal\Api\ChargeModel[] charge_models
*/
class PaymentDefinition extends PPModel
class PaymentDefinition extends PayPalModel
{
/**
* Identifier of the payment_definition. 128 characters max.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentDetail
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string method
* @property string note
*/
class PaymentDetail extends PPModel
class PaymentDetail extends PayPalModel
{
/**
* PayPal payment detail indicating whether payment was made in an invoicing flow via PayPal or externally. In the case of the mark-as-paid API, payment type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -15,7 +15,7 @@ use PayPal\Rest\ApiContext;
* @property string payer_id
* @property \PayPal\Api\Transactions transactions
*/
class PaymentExecution extends PPModel
class PaymentExecution extends PayPalModel
{
/**
* PayPal assigned Payer ID returned in the approval return url.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property int count
* @property string next_id
*/
class PaymentHistory extends PPModel
class PaymentHistory extends PayPalModel
{
/**
* A list of Payment resources

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -14,7 +14,7 @@ use PayPal\Rest\ApiContext;
*
* @property string allowed_payment_method
*/
class PaymentOptions extends PPModel
class PaymentOptions extends PayPalModel
{
/**
* Payment method requested for this purchase unit

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentTerm
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string term_type
* @property string due_date
*/
class PaymentTerm extends PPModel
class PaymentTerm extends PayPalModel
{
/**
* Terms by which the invoice payment is due.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Phone
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string national_number
* @property string extension
*/
class Phone extends PPModel
class Phone extends PayPalModel
{
/**
* Country code (in E.164 format). Assume length is n.

View File

@@ -2,12 +2,12 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\PlanList;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class Plan
@@ -28,7 +28,7 @@ use PayPal\Transport\PPRestCall;
* @property \PayPal\Api\MerchantPreferences merchant_preferences
* @property \PayPal\Api\Links[] links
*/
class Plan extends ResourceModel
class Plan extends PayPalResourceModel
{
/**
* Identifier of the billing plan. 128 characters max.
@@ -478,7 +478,7 @@ class Plan extends ResourceModel
*
* @param string $planId
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Plan
*/
public static function get($planId, $apiContext = null, $restCall = null)
@@ -502,7 +502,7 @@ class Plan extends ResourceModel
* Create a new billing plan by passing the details for the plan, including the plan name, description, and type, to the request URI.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Plan
*/
public function create($apiContext = null, $restCall = null)
@@ -525,7 +525,7 @@ class Plan extends ResourceModel
*
* @param PatchRequest $patchRequest
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function update($patchRequest, $apiContext = null, $restCall = null)
@@ -548,7 +548,7 @@ class Plan extends ResourceModel
* Delete a billing plan by passing the ID of the billing plan to the request URI.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
@@ -556,7 +556,7 @@ class Plan extends ResourceModel
ArgumentValidator::validate($this->getId(), "Id");
$patchRequest = new PatchRequest();
$patch = new Patch();
$value = new PPModel('{
$value = new PayPalModel('{
"state":"DELETED"
}');
$patch->setOp('replace')
@@ -571,7 +571,7 @@ class Plan extends ResourceModel
*
* @param array $params
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return PlanList
*/
public static function all($params, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PlanList
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property string total_pages
* @property \PayPal\Api\Links[] links
*/
class PlanList extends PPModel
class PlanList extends PayPalModel
{
/**
* Array of billing plans.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Presentation
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string logo_image
* @property string locale_code
*/
class Presentation extends PPModel
class Presentation extends PayPalModel
{
/**
* A label that overrides the business name in the PayPal account on the PayPal pages.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\UrlValidator;
@@ -16,7 +16,7 @@ use PayPal\Validation\UrlValidator;
* @property string return_url
* @property string cancel_url
*/
class RedirectUrls extends PPModel
class RedirectUrls extends PayPalModel
{
/**
* Url where the payer would be redirected to after approving the payment.

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -26,7 +26,7 @@ use PayPal\Validation\ArgumentValidator;
* @property string description
* @property \PayPal\Api\Links links
*/
class Refund extends PPModel implements IResource
class Refund extends PayPalModel implements IResource
{
/**
* OAuth Credentials to use for this call
@@ -426,8 +426,8 @@ class Refund extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/refund/$refundId", "GET", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/refund/$refundId", "GET", $payLoad);
$ret = new Refund();
$ret->fromJson($json);
return $ret;

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class RefundDetail
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string date
* @property string note
*/
class RefundDetail extends PPModel
class RefundDetail extends PayPalModel
{
/**
* PayPal refund type indicating whether refund was done in invoicing flow via PayPal or externally. In the case of the mark-as-refunded API, refund type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -18,7 +18,7 @@ use PayPal\Rest\ApiContext;
* @property \PayPal\Api\Capture capture
* @property \PayPal\Api\Refund refund
*/
class RelatedResources extends PPModel
class RelatedResources extends PayPalModel
{
/**
* A sale transaction

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
use PayPal\Api\Refund;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -29,7 +29,7 @@ use PayPal\Validation\ArgumentValidator;
* @property string parent_payment
* @property \PayPal\Api\Links links
*/
class Sale extends ResourceModel
class Sale extends PayPalResourceModel
{
/**
* OAuth Credentials to use for this call
@@ -591,7 +591,7 @@ class Sale extends ResourceModel
*
* @param string $saleId
* @param \PayPal\Rest\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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Sale
*/
public static function get($saleId, $apiContext = null, $restCall = null)
@@ -617,7 +617,7 @@ class Sale extends ResourceModel
*
* @param Refund $refund
* @param \PayPal\Rest\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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Refund
*/
public function refund($refund, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Search
@@ -31,7 +31,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\number page_size
* @property bool total_count_required
*/
class Search extends PPModel
class Search extends PayPalModel
{
/**
* Initial letters of the email address.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class ShippingAddress

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class ShippingCost
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Currency amount
* @property \PayPal\Api\Tax tax
*/
class ShippingCost extends PPModel
class ShippingCost extends PayPalModel
{
/**
* Shipping cost in amount. Range of 0 to 999999.99.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class ShippingInfo
@@ -17,7 +17,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Phone phone
* @property \PayPal\Api\InvoiceAddress address
*/
class ShippingInfo extends PPModel
class ShippingInfo extends PayPalModel
{
/**
* First name of the invoice recipient. 30 characters max.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Tax
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\number percent
* @property \PayPal\Api\Currency amount
*/
class Tax extends PPModel
class Tax extends PayPalModel
{
/**
* Identifier of the resource.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Terms
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Currency amount_range
* @property string buyer_editable
*/
class Terms extends PPModel
class Terms extends PayPalModel
{
/**
* Identifier of the terms. 128 characters max.

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -14,7 +14,7 @@ use PayPal\Rest\ApiContext;
*
* @property \PayPal\Api\Amount amount
*/
class Transactions extends PPModel
class Transactions extends PayPalModel
{
/**
* Amount being collected.

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\CreateProfileResponse;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class WebProfile
@@ -21,7 +21,7 @@ use PayPal\Transport\PPRestCall;
* @property \PayPal\Api\InputFields input_fields
* @property \PayPal\Api\Presentation presentation
*/
class WebProfile extends ResourceModel
class WebProfile extends PayPalResourceModel
{
/**
* ID of the web experience profile.
@@ -197,7 +197,7 @@ class WebProfile extends ResourceModel
* Create a web experience profile by passing the name of the profile and other profile details in the request JSON to the request URI.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return CreateProfileResponse
*/
public function create($apiContext = null, $restCall = null)
@@ -220,7 +220,7 @@ class WebProfile extends ResourceModel
* Update a web experience profile by passing the ID of the profile to the request URI. In addition, pass the profile details in the request JSON. If your request does not include values for all profile detail fields, the previously set values for the omitted fields are removed by this operation.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function update($apiContext = null, $restCall = null)
@@ -243,7 +243,7 @@ class WebProfile extends ResourceModel
*
* @param Patch[] $patch
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function partial_update($patch, $apiContext = null, $restCall = null)
@@ -271,7 +271,7 @@ class WebProfile extends ResourceModel
*
* @param string $profileId
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebProfile
*/
public static function get($profileId, $apiContext = null, $restCall = null)
@@ -295,7 +295,7 @@ class WebProfile extends ResourceModel
* Lists all web experience profiles that exist for a merchant (or subject).
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebProfile[]
*/
public static function get_list($apiContext = null, $restCall = null)
@@ -316,7 +316,7 @@ class WebProfile extends ResourceModel
* Delete an existing web experience profile by passing the profile ID to the request URI.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookList;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\UrlValidator;
/**
@@ -21,7 +21,7 @@ use PayPal\Validation\UrlValidator;
* @property \PayPal\Api\WebhookEventType[] event_types
* @property \PayPal\Api\Links[] links
*/
class Webhook extends ResourceModel
class Webhook extends PayPalResourceModel
{
/**
* Identifier of the webhook resource.
@@ -205,7 +205,7 @@ class Webhook extends ResourceModel
* Creates the Webhook for the application associated with the access token.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Webhook
*/
public function create($apiContext = null, $restCall = null)
@@ -228,7 +228,7 @@ class Webhook 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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Webhook
*/
public static function get($webhookId, $apiContext = null, $restCall = null)
@@ -252,7 +252,7 @@ class Webhook extends ResourceModel
* Retrieves all Webhooks for the application associated with access token.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookList
*/
public static function getAll($apiContext = null, $restCall = null)
@@ -276,7 +276,7 @@ class Webhook extends ResourceModel
*
* @param PatchRequest $patchRequest
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Webhook
*/
public function update($patchRequest, $apiContext = null, $restCall = null)
@@ -300,7 +300,7 @@ class Webhook extends ResourceModel
* Deletes the Webhook identified by webhook_id for the application associated with access token.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)

View File

@@ -2,12 +2,12 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookEventList;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class WebhookEvent
@@ -24,7 +24,7 @@ use PayPal\Transport\PPRestCall;
* @property mixed resource
* @property \PayPal\Api\Links[] links
*/
class WebhookEvent extends ResourceModel
class WebhookEvent extends PayPalResourceModel
{
/**
* Identifier of the Webhooks event resource.
@@ -219,7 +219,7 @@ class WebhookEvent extends ResourceModel
/**
* This contains the resource that is identified by resource_type element.
*
* @param \PayPal\Common\PPModel $resource
* @param \PayPal\Common\PayPalModel $resource
*
* @return $this
*/
@@ -232,7 +232,7 @@ class WebhookEvent extends ResourceModel
/**
* This contains the resource that is identified by resource_type element.
*
* @return \PayPal\Common\PPModel
* @return \PayPal\Common\PayPalModel
*/
public function getResource()
{
@@ -297,7 +297,7 @@ class WebhookEvent extends ResourceModel
*
* @param string $eventId
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEvent
*/
public static function get($eventId, $apiContext = null, $restCall = null)
@@ -321,7 +321,7 @@ class WebhookEvent extends ResourceModel
* Resends the Webhooks event resource identified by event_id.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEvent
*/
public function resend($apiContext = null, $restCall = null)
@@ -345,7 +345,7 @@ class WebhookEvent extends ResourceModel
*
* @param array $params
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEventList
*/
public static function all($params, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class WebhookEventList
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int count
* @property \PayPal\Api\Links[] links
*/
class WebhookEventList extends PPModel
class WebhookEventList extends PayPalModel
{
/**
* A list of Webhooks event resources

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookEventList;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class WebhookEventType
@@ -18,7 +18,7 @@ use PayPal\Transport\PPRestCall;
* @property string name
* @property string description
*/
class WebhookEventType extends ResourceModel
class WebhookEventType extends PayPalResourceModel
{
/**
* Unique event-type name.
@@ -71,7 +71,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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEventTypeList
*/
public static function subscribedEventTypes($webhookId, $apiContext = null, $restCall = null)
@@ -95,7 +95,7 @@ class WebhookEventType extends ResourceModel
* Retrieves the master list of available Webhooks events-types resources for any webhook to subscribe to.
*
* @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
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEventTypeList
*/
public static function availableEventTypes($apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class WebhookEventTypeList
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property \PayPal\Api\WebhookEventType[] event_types
*/
class WebhookEventTypeList extends PPModel
class WebhookEventTypeList extends PayPalModel
{
/**
* A list of Webhooks event-types

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class WebhookList
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property \PayPal\Api\Webhook[] webhooks
*/
class WebhookList extends PPModel
class WebhookList extends PayPalModel
{
/**
* A list of Webhooks