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

@@ -1,13 +1,13 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* End-User's preferred address.
*/
class PPOpenIdAddress extends PPModel
class OpenIdAddress extends PayPalModel
{
/**

View File

@@ -1,12 +1,12 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Error resource
*/
class PPOpenIdError extends PPModel
class OpenIdError extends PayPalModel
{
/**

View File

@@ -1,11 +1,11 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Core\PPConstants;
use PayPal\Core\PayPalConstants;
use PayPal\Rest\ApiContext;
class PPOpenIdSession
class OpenIdSession
{
/**
@@ -94,9 +94,9 @@ class PPOpenIdSession
} else if (array_key_exists('mode', $config)) {
switch (strtoupper($config['mode'])) {
case 'SANDBOX':
return PPConstants::OPENID_REDIRECT_SANDBOX_URL;
return PayPalConstants::OPENID_REDIRECT_SANDBOX_URL;
case 'LIVE':
return PPConstants::OPENID_REDIRECT_LIVE_URL;
return PayPalConstants::OPENID_REDIRECT_LIVE_URL;
}
}
return null;

View File

@@ -1,15 +1,15 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Token grant resource
*/
class PPOpenIdTokeninfo extends ResourceModel
class OpenIdTokeninfo extends PayPalResourceModel
{
/**
@@ -154,8 +154,8 @@ class PPOpenIdTokeninfo extends ResourceModel
* @param string $clientId
* @param string $clientSecret
* @param ApiContext $apiContext Optional API Context
* @param PPRestCall $restCall
* @return PPOpenIdTokeninfo
* @param PayPalRestCall $restCall
* @return OpenIdTokeninfo
*/
public static function createFromAuthorizationCode($params, $clientId = null, $clientSecret = null, $apiContext = null, $restCall = null)
{
@@ -188,7 +188,7 @@ class PPOpenIdTokeninfo extends ResourceModel
$apiContext,
$restCall
);
$token = new PPOpenIdTokeninfo();
$token = new OpenIdTokeninfo();
$token->fromJson($json);
return $token;
}
@@ -205,7 +205,7 @@ class PPOpenIdTokeninfo extends ResourceModel
* (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 PPOpenIdTokeninfo
* @return OpenIdTokeninfo
*/
public function createFromRefreshToken($params, $apiContext = null)
{

View File

@@ -1,13 +1,13 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
/**
* OpenIdConnect UserInfo Resource
*/
class PPOpenIdUserinfo extends ResourceModel
class OpenIdUserinfo extends PayPalResourceModel
{
/**
@@ -349,7 +349,7 @@ class PPOpenIdUserinfo extends ResourceModel
/**
* End-User's preferred address.
*
* @param \PayPal\Auth\Openid\PPOpenIdAddress $address
* @param \PayPal\Api\OpenIdAddress $address
*/
public function setAddress($address)
{
@@ -360,7 +360,7 @@ class PPOpenIdUserinfo extends ResourceModel
/**
* End-User's preferred address.
*
* @return \PayPal\Auth\Openid\PPOpenIdAddress
* @return \PayPal\Api\OpenIdAddress
*/
public function getAddress()
{
@@ -460,7 +460,7 @@ class PPOpenIdUserinfo extends ResourceModel
* @param array $params (allowed values are access_token)
* access_token - access token from the createFromAuthorizationCode / createFromRefreshToken calls
* @param ApiContext $apiContext Optional API Context
* @return PPOpenIdUserinfo
* @return OpenIdUserinfo
*/
public static function getUserinfo($params, $apiContext = null)
{
@@ -485,7 +485,7 @@ class PPOpenIdUserinfo extends ResourceModel
$apiContext
);
$ret = new PPOpenIdUserinfo();
$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

View File

@@ -3,18 +3,18 @@
namespace PayPal\Auth;
use PayPal\Cache\AuthorizationCache;
use PayPal\Common\ResourceModel;
use PayPal\Core\PPHttpConfig;
use PayPal\Core\PPHttpConnection;
use PayPal\Core\PPLoggingManager;
use PayPal\Exception\PPConfigurationException;
use PayPal\Handler\IPPHandler;
use PayPal\Common\PayPalResourceModel;
use PayPal\Core\PayPalHttpConfig;
use PayPal\Core\PayPalHttpConnection;
use PayPal\Core\PayPalLoggingManager;
use PayPal\Exception\PayPalConfigurationException;
use PayPal\Handler\IPayPalHandler;
use PayPal\Rest\ApiContext;
/**
* Class OAuthTokenCredential
*/
class OAuthTokenCredential extends ResourceModel
class OAuthTokenCredential extends PayPalResourceModel
{
public static $CACHE_PATH = '/../../../var/auth.cache';
@@ -22,7 +22,7 @@ class OAuthTokenCredential extends ResourceModel
/**
* @var string Default Auth Handler
*/
public static $AUTH_HANDLER = 'PayPal\Rest\OauthHandler';
public static $AUTH_HANDLER = 'PayPal\Handler\OauthHandler';
/**
* Private Variable
@@ -34,7 +34,7 @@ class OAuthTokenCredential extends ResourceModel
/**
* Private Variable
*
* @var \PayPal\Core\PPLoggingManager $logger
* @var \PayPal\Core\PayPalLoggingManager $logger
*/
private $logger;
@@ -83,7 +83,7 @@ class OAuthTokenCredential extends ResourceModel
{
$this->clientId = $clientId;
$this->clientSecret = $clientSecret;
$this->logger = PPLoggingManager::getInstance(__CLASS__);
$this->logger = PayPalLoggingManager::getInstance(__CLASS__);
}
/**
@@ -199,16 +199,16 @@ class OAuthTokenCredential extends ResourceModel
* @param string $clientSecret
* @param string $payload
* @return mixed
* @throws PPConfigurationException
* @throws \PayPal\Exception\PPConnectionException
* @throws PayPalConfigurationException
* @throws \PayPal\Exception\PayPalConnectionException
*/
private function getToken($config, $clientId, $clientSecret, $payload)
{
$httpConfig = new PPHttpConfig(null, 'POST');
$httpConfig = new PayPalHttpConfig(null, 'POST');
$handlers = array(self::$AUTH_HANDLER);
/** @var IPPHandler $handler */
/** @var IPayPalHandler $handler */
foreach ($handlers as $handler) {
if (!is_object($handler)) {
$fullHandler = "\\" . (string)$handler;
@@ -217,7 +217,7 @@ class OAuthTokenCredential extends ResourceModel
$handler->handle($httpConfig, $payload, array('clientId' => $clientId, 'clientSecret' => $clientSecret));
}
$connection = new PPHttpConnection($httpConfig, $config);
$connection = new PayPalHttpConnection($httpConfig, $config);
$res = $connection->execute($payload);
$response = json_decode($res, true);

Some files were not shown because too many files have changed in this diff Show More