diff --git a/lib/PayPal/Api/Address.php b/lib/PayPal/Api/Address.php index 693fa2d..175db20 100644 --- a/lib/PayPal/Api/Address.php +++ b/lib/PayPal/Api/Address.php @@ -2,7 +2,7 @@ namespace PayPal\Api; -use PayPal\Common\PPModel; +use PayPal\Common\PayPalModel; /** * Class Address diff --git a/lib/PayPal/Api/Agreement.php b/lib/PayPal/Api/Agreement.php index 6509200..843f5e8 100644 --- a/lib/PayPal/Api/Agreement.php +++ b/lib/PayPal/Api/Agreement.php @@ -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) diff --git a/lib/PayPal/Api/AgreementDetails.php b/lib/PayPal/Api/AgreementDetails.php index 6bc33bc..2c6c655 100644 --- a/lib/PayPal/Api/AgreementDetails.php +++ b/lib/PayPal/Api/AgreementDetails.php @@ -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. diff --git a/lib/PayPal/Api/AgreementStateDescriptor.php b/lib/PayPal/Api/AgreementStateDescriptor.php index 59d853d..619da31 100644 --- a/lib/PayPal/Api/AgreementStateDescriptor.php +++ b/lib/PayPal/Api/AgreementStateDescriptor.php @@ -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. diff --git a/lib/PayPal/Api/AgreementTransaction.php b/lib/PayPal/Api/AgreementTransaction.php index b1688c2..012460a 100644 --- a/lib/PayPal/Api/AgreementTransaction.php +++ b/lib/PayPal/Api/AgreementTransaction.php @@ -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. diff --git a/lib/PayPal/Api/AgreementTransactions.php b/lib/PayPal/Api/AgreementTransactions.php index 9299375..91e1177 100644 --- a/lib/PayPal/Api/AgreementTransactions.php +++ b/lib/PayPal/Api/AgreementTransactions.php @@ -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. diff --git a/lib/PayPal/Api/Amount.php b/lib/PayPal/Api/Amount.php index 5a90331..9678b09 100644 --- a/lib/PayPal/Api/Amount.php +++ b/lib/PayPal/Api/Amount.php @@ -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 diff --git a/lib/PayPal/Api/Authorization.php b/lib/PayPal/Api/Authorization.php index 4ef44dd..fe21e7a 100644 --- a/lib/PayPal/Api/Authorization.php +++ b/lib/PayPal/Api/Authorization.php @@ -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; } diff --git a/lib/PayPal/Api/BankAccount.php b/lib/PayPal/Api/BankAccount.php index fb87bc5..3fd2f62 100644 --- a/lib/PayPal/Api/BankAccount.php +++ b/lib/PayPal/Api/BankAccount.php @@ -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) diff --git a/lib/PayPal/Api/BankAccountsList.php b/lib/PayPal/Api/BankAccountsList.php index 540a1f1..a63b3da 100644 --- a/lib/PayPal/Api/BankAccountsList.php +++ b/lib/PayPal/Api/BankAccountsList.php @@ -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 diff --git a/lib/PayPal/Api/BankToken.php b/lib/PayPal/Api/BankToken.php index 93d8dac..1bf4e71 100644 --- a/lib/PayPal/Api/BankToken.php +++ b/lib/PayPal/Api/BankToken.php @@ -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. diff --git a/lib/PayPal/Api/BaseAddress.php b/lib/PayPal/Api/BaseAddress.php index d5ab7cf..b32b180 100644 --- a/lib/PayPal/Api/BaseAddress.php +++ b/lib/PayPal/Api/BaseAddress.php @@ -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). diff --git a/lib/PayPal/Api/BillingInfo.php b/lib/PayPal/Api/BillingInfo.php index fdc1edf..adc33a6 100644 --- a/lib/PayPal/Api/BillingInfo.php +++ b/lib/PayPal/Api/BillingInfo.php @@ -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. diff --git a/lib/PayPal/Api/CancelNotification.php b/lib/PayPal/Api/CancelNotification.php index 2f5c115..3ca09e4 100644 --- a/lib/PayPal/Api/CancelNotification.php +++ b/lib/PayPal/Api/CancelNotification.php @@ -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. diff --git a/lib/PayPal/Api/Capture.php b/lib/PayPal/Api/Capture.php index 1fef9cb..92bb9c2 100644 --- a/lib/PayPal/Api/Capture.php +++ b/lib/PayPal/Api/Capture.php @@ -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; diff --git a/lib/PayPal/Api/CarrierAccountToken.php b/lib/PayPal/Api/CarrierAccountToken.php index 5539ad9..29ba74b 100644 --- a/lib/PayPal/Api/CarrierAccountToken.php +++ b/lib/PayPal/Api/CarrierAccountToken.php @@ -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. diff --git a/lib/PayPal/Api/CartBase.php b/lib/PayPal/Api/CartBase.php index a627b6c..14ca13c 100644 --- a/lib/PayPal/Api/CartBase.php +++ b/lib/PayPal/Api/CartBase.php @@ -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. diff --git a/lib/PayPal/Api/ChargeModel.php b/lib/PayPal/Api/ChargeModel.php index 2a929f3..de486fe 100644 --- a/lib/PayPal/Api/ChargeModel.php +++ b/lib/PayPal/Api/ChargeModel.php @@ -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. diff --git a/lib/PayPal/Api/Cost.php b/lib/PayPal/Api/Cost.php index f6baf37..b1e11a1 100644 --- a/lib/PayPal/Api/Cost.php +++ b/lib/PayPal/Api/Cost.php @@ -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. diff --git a/lib/PayPal/Api/CreateProfileResponse.php b/lib/PayPal/Api/CreateProfileResponse.php index e086ba3..64f79da 100644 --- a/lib/PayPal/Api/CreateProfileResponse.php +++ b/lib/PayPal/Api/CreateProfileResponse.php @@ -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. diff --git a/lib/PayPal/Api/Credit.php b/lib/PayPal/Api/Credit.php index 857233e..2693778 100644 --- a/lib/PayPal/Api/Credit.php +++ b/lib/PayPal/Api/Credit.php @@ -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. diff --git a/lib/PayPal/Api/CreditCard.php b/lib/PayPal/Api/CreditCard.php index 0552c1a..4f28367 100644 --- a/lib/PayPal/Api/CreditCard.php +++ b/lib/PayPal/Api/CreditCard.php @@ -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) diff --git a/lib/PayPal/Api/CreditCardHistory.php b/lib/PayPal/Api/CreditCardHistory.php index 4a666f9..8d60bd8 100644 --- a/lib/PayPal/Api/CreditCardHistory.php +++ b/lib/PayPal/Api/CreditCardHistory.php @@ -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 diff --git a/lib/PayPal/Api/CreditCardList.php b/lib/PayPal/Api/CreditCardList.php index 26cd7db..c567580 100644 --- a/lib/PayPal/Api/CreditCardList.php +++ b/lib/PayPal/Api/CreditCardList.php @@ -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 diff --git a/lib/PayPal/Api/CreditCardToken.php b/lib/PayPal/Api/CreditCardToken.php index 1ee5829..6ff994b 100644 --- a/lib/PayPal/Api/CreditCardToken.php +++ b/lib/PayPal/Api/CreditCardToken.php @@ -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. diff --git a/lib/PayPal/Api/Currency.php b/lib/PayPal/Api/Currency.php index c4018a6..eb53eb9 100644 --- a/lib/PayPal/Api/Currency.php +++ b/lib/PayPal/Api/Currency.php @@ -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. diff --git a/lib/PayPal/Api/CustomAmount.php b/lib/PayPal/Api/CustomAmount.php index 3727a5a..47f9d75 100644 --- a/lib/PayPal/Api/CustomAmount.php +++ b/lib/PayPal/Api/CustomAmount.php @@ -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. diff --git a/lib/PayPal/Api/Details.php b/lib/PayPal/Api/Details.php index b03449e..73f199f 100644 --- a/lib/PayPal/Api/Details.php +++ b/lib/PayPal/Api/Details.php @@ -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. diff --git a/lib/PayPal/Api/Error.php b/lib/PayPal/Api/Error.php index 9f5eac4..cb1e733 100644 --- a/lib/PayPal/Api/Error.php +++ b/lib/PayPal/Api/Error.php @@ -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. diff --git a/lib/PayPal/Api/ErrorDetails.php b/lib/PayPal/Api/ErrorDetails.php index e2fc039..f4e14a0 100644 --- a/lib/PayPal/Api/ErrorDetails.php +++ b/lib/PayPal/Api/ErrorDetails.php @@ -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. diff --git a/lib/PayPal/Api/ExtendedBankAccount.php b/lib/PayPal/Api/ExtendedBankAccount.php index 11e5297..f05c621 100644 --- a/lib/PayPal/Api/ExtendedBankAccount.php +++ b/lib/PayPal/Api/ExtendedBankAccount.php @@ -2,7 +2,7 @@ namespace PayPal\Api; -use PayPal\Common\PPModel; +use PayPal\Common\PayPalModel; /** * Class ExtendedBankAccount diff --git a/lib/PayPal/Api/FlowConfig.php b/lib/PayPal/Api/FlowConfig.php index 471322c..7faf1e8 100644 --- a/lib/PayPal/Api/FlowConfig.php +++ b/lib/PayPal/Api/FlowConfig.php @@ -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. diff --git a/lib/PayPal/Api/FundingInstrument.php b/lib/PayPal/Api/FundingInstrument.php index d2aa844..c563368 100644 --- a/lib/PayPal/Api/FundingInstrument.php +++ b/lib/PayPal/Api/FundingInstrument.php @@ -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. diff --git a/lib/PayPal/Api/FuturePayment.php b/lib/PayPal/Api/FuturePayment.php index 7c3947c..e37d3b5 100644 --- a/lib/PayPal/Api/FuturePayment.php +++ b/lib/PayPal/Api/FuturePayment.php @@ -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, diff --git a/lib/PayPal/Api/HyperSchema.php b/lib/PayPal/Api/HyperSchema.php index 9c2d6f2..7ef5dbb 100644 --- a/lib/PayPal/Api/HyperSchema.php +++ b/lib/PayPal/Api/HyperSchema.php @@ -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 diff --git a/lib/PayPal/Api/Image.php b/lib/PayPal/Api/Image.php index fff9353..71c7d15 100644 --- a/lib/PayPal/Api/Image.php +++ b/lib/PayPal/Api/Image.php @@ -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. diff --git a/lib/PayPal/Api/InputFields.php b/lib/PayPal/Api/InputFields.php index 3e9b247..08a833e 100644 --- a/lib/PayPal/Api/InputFields.php +++ b/lib/PayPal/Api/InputFields.php @@ -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. diff --git a/lib/PayPal/Api/Invoice.php b/lib/PayPal/Api/Invoice.php index 1317160..3340644 100644 --- a/lib/PayPal/Api/Invoice.php +++ b/lib/PayPal/Api/Invoice.php @@ -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) diff --git a/lib/PayPal/Api/InvoiceAddress.php b/lib/PayPal/Api/InvoiceAddress.php index 4f7f5b4..b8cd850 100644 --- a/lib/PayPal/Api/InvoiceAddress.php +++ b/lib/PayPal/Api/InvoiceAddress.php @@ -2,7 +2,7 @@ namespace PayPal\Api; -use PayPal\Common\PPModel; +use PayPal\Common\PayPalModel; /** * Class InvoiceAddress diff --git a/lib/PayPal/Api/InvoiceItem.php b/lib/PayPal/Api/InvoiceItem.php index 49453f1..8ac2b3a 100644 --- a/lib/PayPal/Api/InvoiceItem.php +++ b/lib/PayPal/Api/InvoiceItem.php @@ -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. diff --git a/lib/PayPal/Api/InvoiceSearchResponse.php b/lib/PayPal/Api/InvoiceSearchResponse.php index 9afda6a..667f583 100644 --- a/lib/PayPal/Api/InvoiceSearchResponse.php +++ b/lib/PayPal/Api/InvoiceSearchResponse.php @@ -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. diff --git a/lib/PayPal/Api/InvoicingMetaData.php b/lib/PayPal/Api/InvoicingMetaData.php index b669706..1b39cc9 100644 --- a/lib/PayPal/Api/InvoicingMetaData.php +++ b/lib/PayPal/Api/InvoicingMetaData.php @@ -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. diff --git a/lib/PayPal/Api/InvoicingNotification.php b/lib/PayPal/Api/InvoicingNotification.php index 1e1b0bd..d3599db 100644 --- a/lib/PayPal/Api/InvoicingNotification.php +++ b/lib/PayPal/Api/InvoicingNotification.php @@ -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. diff --git a/lib/PayPal/Api/InvoicingPaymentDetail.php b/lib/PayPal/Api/InvoicingPaymentDetail.php index 11ecc6a..9a71f4f 100644 --- a/lib/PayPal/Api/InvoicingPaymentDetail.php +++ b/lib/PayPal/Api/InvoicingPaymentDetail.php @@ -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. diff --git a/lib/PayPal/Api/InvoicingRefundDetail.php b/lib/PayPal/Api/InvoicingRefundDetail.php index 99ebbaa..3390a2a 100644 --- a/lib/PayPal/Api/InvoicingRefundDetail.php +++ b/lib/PayPal/Api/InvoicingRefundDetail.php @@ -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. diff --git a/lib/PayPal/Api/Item.php b/lib/PayPal/Api/Item.php index 0faf5aa..40c850b 100644 --- a/lib/PayPal/Api/Item.php +++ b/lib/PayPal/Api/Item.php @@ -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. diff --git a/lib/PayPal/Api/ItemList.php b/lib/PayPal/Api/ItemList.php index 3504041..5c8a728 100644 --- a/lib/PayPal/Api/ItemList.php +++ b/lib/PayPal/Api/ItemList.php @@ -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? diff --git a/lib/PayPal/Api/Links.php b/lib/PayPal/Api/Links.php index 64c3841..7e00880 100644 --- a/lib/PayPal/Api/Links.php +++ b/lib/PayPal/Api/Links.php @@ -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 diff --git a/lib/PayPal/Api/MerchantInfo.php b/lib/PayPal/Api/MerchantInfo.php index 2389985..c60363d 100644 --- a/lib/PayPal/Api/MerchantInfo.php +++ b/lib/PayPal/Api/MerchantInfo.php @@ -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. diff --git a/lib/PayPal/Api/MerchantPreferences.php b/lib/PayPal/Api/MerchantPreferences.php index 404eee0..f6a8850 100644 --- a/lib/PayPal/Api/MerchantPreferences.php +++ b/lib/PayPal/Api/MerchantPreferences.php @@ -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. diff --git a/lib/PayPal/Api/Metadata.php b/lib/PayPal/Api/Metadata.php index ffab420..8fb38ac 100644 --- a/lib/PayPal/Api/Metadata.php +++ b/lib/PayPal/Api/Metadata.php @@ -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. diff --git a/lib/PayPal/Api/NameValuePair.php b/lib/PayPal/Api/NameValuePair.php index e62d4fc..2dffd50 100644 --- a/lib/PayPal/Api/NameValuePair.php +++ b/lib/PayPal/Api/NameValuePair.php @@ -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 diff --git a/lib/PayPal/Api/Notification.php b/lib/PayPal/Api/Notification.php index 80f352d..80cc33f 100644 --- a/lib/PayPal/Api/Notification.php +++ b/lib/PayPal/Api/Notification.php @@ -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. diff --git a/lib/PayPal/Auth/Openid/PPOpenIdAddress.php b/lib/PayPal/Api/OpenIdAddress.php similarity index 95% rename from lib/PayPal/Auth/Openid/PPOpenIdAddress.php rename to lib/PayPal/Api/OpenIdAddress.php index 64486e7..925374a 100644 --- a/lib/PayPal/Auth/Openid/PPOpenIdAddress.php +++ b/lib/PayPal/Api/OpenIdAddress.php @@ -1,13 +1,13 @@ 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) { diff --git a/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php b/lib/PayPal/Api/OpenIdUserinfo.php similarity index 97% rename from lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php rename to lib/PayPal/Api/OpenIdUserinfo.php index f49d343..5e10e19 100644 --- a/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php +++ b/lib/PayPal/Api/OpenIdUserinfo.php @@ -1,13 +1,13 @@ fromJson($json); return $ret; diff --git a/lib/PayPal/Api/Order.php b/lib/PayPal/Api/Order.php index 8f82e48..726def1 100644 --- a/lib/PayPal/Api/Order.php +++ b/lib/PayPal/Api/Order.php @@ -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. diff --git a/lib/PayPal/Api/OverrideChargeModel.php b/lib/PayPal/Api/OverrideChargeModel.php index b720222..24eca73 100644 --- a/lib/PayPal/Api/OverrideChargeModel.php +++ b/lib/PayPal/Api/OverrideChargeModel.php @@ -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. diff --git a/lib/PayPal/Api/Patch.php b/lib/PayPal/Api/Patch.php index 5b1974b..0f68c70 100644 --- a/lib/PayPal/Api/Patch.php +++ b/lib/PayPal/Api/Patch.php @@ -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. diff --git a/lib/PayPal/Api/PatchRequest.php b/lib/PayPal/Api/PatchRequest.php index 74b4210..effc105 100644 --- a/lib/PayPal/Api/PatchRequest.php +++ b/lib/PayPal/Api/PatchRequest.php @@ -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 diff --git a/lib/PayPal/Api/Payee.php b/lib/PayPal/Api/Payee.php index 6d4400d..f68df14 100644 --- a/lib/PayPal/Api/Payee.php +++ b/lib/PayPal/Api/Payee.php @@ -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. diff --git a/lib/PayPal/Api/Payer.php b/lib/PayPal/Api/Payer.php index d6d87d7..c3160e3 100644 --- a/lib/PayPal/Api/Payer.php +++ b/lib/PayPal/Api/Payer.php @@ -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. diff --git a/lib/PayPal/Api/PayerInfo.php b/lib/PayPal/Api/PayerInfo.php index 0439117..e84fc93 100644 --- a/lib/PayPal/Api/PayerInfo.php +++ b/lib/PayPal/Api/PayerInfo.php @@ -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. diff --git a/lib/PayPal/Api/Payment.php b/lib/PayPal/Api/Payment.php index 6b7f00c..1781c54 100644 --- a/lib/PayPal/Api/Payment.php +++ b/lib/PayPal/Api/Payment.php @@ -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) diff --git a/lib/PayPal/Api/PaymentCard.php b/lib/PayPal/Api/PaymentCard.php index 9e844b8..fc64c0e 100644 --- a/lib/PayPal/Api/PaymentCard.php +++ b/lib/PayPal/Api/PaymentCard.php @@ -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. diff --git a/lib/PayPal/Api/PaymentCardToken.php b/lib/PayPal/Api/PaymentCardToken.php index aa52cea..f96c45c 100644 --- a/lib/PayPal/Api/PaymentCardToken.php +++ b/lib/PayPal/Api/PaymentCardToken.php @@ -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. diff --git a/lib/PayPal/Api/PaymentDefinition.php b/lib/PayPal/Api/PaymentDefinition.php index e78245e..c6b7734 100644 --- a/lib/PayPal/Api/PaymentDefinition.php +++ b/lib/PayPal/Api/PaymentDefinition.php @@ -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. diff --git a/lib/PayPal/Api/PaymentDetail.php b/lib/PayPal/Api/PaymentDetail.php index c5c12ad..2ff0df0 100644 --- a/lib/PayPal/Api/PaymentDetail.php +++ b/lib/PayPal/Api/PaymentDetail.php @@ -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. diff --git a/lib/PayPal/Api/PaymentExecution.php b/lib/PayPal/Api/PaymentExecution.php index 6eabdef..9a00645 100644 --- a/lib/PayPal/Api/PaymentExecution.php +++ b/lib/PayPal/Api/PaymentExecution.php @@ -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. diff --git a/lib/PayPal/Api/PaymentHistory.php b/lib/PayPal/Api/PaymentHistory.php index 48d9f66..6452acf 100644 --- a/lib/PayPal/Api/PaymentHistory.php +++ b/lib/PayPal/Api/PaymentHistory.php @@ -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 diff --git a/lib/PayPal/Api/PaymentOptions.php b/lib/PayPal/Api/PaymentOptions.php index 79285b9..4211113 100644 --- a/lib/PayPal/Api/PaymentOptions.php +++ b/lib/PayPal/Api/PaymentOptions.php @@ -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 diff --git a/lib/PayPal/Api/PaymentTerm.php b/lib/PayPal/Api/PaymentTerm.php index c5c6ed5..935830c 100644 --- a/lib/PayPal/Api/PaymentTerm.php +++ b/lib/PayPal/Api/PaymentTerm.php @@ -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. diff --git a/lib/PayPal/Api/Phone.php b/lib/PayPal/Api/Phone.php index 1c55e98..07e8ec7 100644 --- a/lib/PayPal/Api/Phone.php +++ b/lib/PayPal/Api/Phone.php @@ -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. diff --git a/lib/PayPal/Api/Plan.php b/lib/PayPal/Api/Plan.php index 9e85ef2..e14cdff 100644 --- a/lib/PayPal/Api/Plan.php +++ b/lib/PayPal/Api/Plan.php @@ -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) diff --git a/lib/PayPal/Api/PlanList.php b/lib/PayPal/Api/PlanList.php index 9f4b3cd..d8cb675 100644 --- a/lib/PayPal/Api/PlanList.php +++ b/lib/PayPal/Api/PlanList.php @@ -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. diff --git a/lib/PayPal/Api/Presentation.php b/lib/PayPal/Api/Presentation.php index a98ed70..4b41858 100644 --- a/lib/PayPal/Api/Presentation.php +++ b/lib/PayPal/Api/Presentation.php @@ -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. diff --git a/lib/PayPal/Api/RedirectUrls.php b/lib/PayPal/Api/RedirectUrls.php index b40921b..3f334c1 100644 --- a/lib/PayPal/Api/RedirectUrls.php +++ b/lib/PayPal/Api/RedirectUrls.php @@ -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. diff --git a/lib/PayPal/Api/Refund.php b/lib/PayPal/Api/Refund.php index 92ad3c7..b0c76c0 100644 --- a/lib/PayPal/Api/Refund.php +++ b/lib/PayPal/Api/Refund.php @@ -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; diff --git a/lib/PayPal/Api/RefundDetail.php b/lib/PayPal/Api/RefundDetail.php index f95f8d7..26023b0 100644 --- a/lib/PayPal/Api/RefundDetail.php +++ b/lib/PayPal/Api/RefundDetail.php @@ -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. diff --git a/lib/PayPal/Api/RelatedResources.php b/lib/PayPal/Api/RelatedResources.php index 761c03e..191a05c 100644 --- a/lib/PayPal/Api/RelatedResources.php +++ b/lib/PayPal/Api/RelatedResources.php @@ -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 diff --git a/lib/PayPal/Api/Sale.php b/lib/PayPal/Api/Sale.php index 1ba5c00..287b0f0 100644 --- a/lib/PayPal/Api/Sale.php +++ b/lib/PayPal/Api/Sale.php @@ -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) diff --git a/lib/PayPal/Api/Search.php b/lib/PayPal/Api/Search.php index 5b3d846..fcde390 100644 --- a/lib/PayPal/Api/Search.php +++ b/lib/PayPal/Api/Search.php @@ -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. diff --git a/lib/PayPal/Api/ShippingAddress.php b/lib/PayPal/Api/ShippingAddress.php index c04e5f1..2ad7a4c 100644 --- a/lib/PayPal/Api/ShippingAddress.php +++ b/lib/PayPal/Api/ShippingAddress.php @@ -2,7 +2,7 @@ namespace PayPal\Api; -use PayPal\Common\PPModel; +use PayPal\Common\PayPalModel; /** * Class ShippingAddress diff --git a/lib/PayPal/Api/ShippingCost.php b/lib/PayPal/Api/ShippingCost.php index e3a1651..b4beeb8 100644 --- a/lib/PayPal/Api/ShippingCost.php +++ b/lib/PayPal/Api/ShippingCost.php @@ -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. diff --git a/lib/PayPal/Api/ShippingInfo.php b/lib/PayPal/Api/ShippingInfo.php index 423f8ff..1a897a3 100644 --- a/lib/PayPal/Api/ShippingInfo.php +++ b/lib/PayPal/Api/ShippingInfo.php @@ -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. diff --git a/lib/PayPal/Api/Tax.php b/lib/PayPal/Api/Tax.php index fc02674..d5b99ab 100644 --- a/lib/PayPal/Api/Tax.php +++ b/lib/PayPal/Api/Tax.php @@ -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. diff --git a/lib/PayPal/Api/Terms.php b/lib/PayPal/Api/Terms.php index 20582ca..f380e85 100644 --- a/lib/PayPal/Api/Terms.php +++ b/lib/PayPal/Api/Terms.php @@ -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. diff --git a/lib/PayPal/Api/Transaction.php b/lib/PayPal/Api/Transaction.php index 33b8c63..c14f6c8 100644 --- a/lib/PayPal/Api/Transaction.php +++ b/lib/PayPal/Api/Transaction.php @@ -2,7 +2,7 @@ namespace PayPal\Api; -use PayPal\Common\PPModel; +use PayPal\Common\PayPalModel; use PayPal\Rest\ApiContext; /** diff --git a/lib/PayPal/Api/TransactionBase.php b/lib/PayPal/Api/TransactionBase.php index 2b477c0..03aded4 100644 --- a/lib/PayPal/Api/TransactionBase.php +++ b/lib/PayPal/Api/TransactionBase.php @@ -2,7 +2,7 @@ namespace PayPal\Api; -use PayPal\Common\PPModel; +use PayPal\Common\PayPalModel; use PayPal\Rest\ApiContext; /** diff --git a/lib/PayPal/Api/Transactions.php b/lib/PayPal/Api/Transactions.php index 8cb6e6a..100fff5 100644 --- a/lib/PayPal/Api/Transactions.php +++ b/lib/PayPal/Api/Transactions.php @@ -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. diff --git a/lib/PayPal/Api/WebProfile.php b/lib/PayPal/Api/WebProfile.php index 292975a..761733c 100644 --- a/lib/PayPal/Api/WebProfile.php +++ b/lib/PayPal/Api/WebProfile.php @@ -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) diff --git a/lib/PayPal/Api/Webhook.php b/lib/PayPal/Api/Webhook.php index fdaa559..b5e485f 100644 --- a/lib/PayPal/Api/Webhook.php +++ b/lib/PayPal/Api/Webhook.php @@ -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) diff --git a/lib/PayPal/Api/WebhookEvent.php b/lib/PayPal/Api/WebhookEvent.php index cc69209..0404577 100644 --- a/lib/PayPal/Api/WebhookEvent.php +++ b/lib/PayPal/Api/WebhookEvent.php @@ -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) diff --git a/lib/PayPal/Api/WebhookEventList.php b/lib/PayPal/Api/WebhookEventList.php index eae4da6..3ad2d8a 100644 --- a/lib/PayPal/Api/WebhookEventList.php +++ b/lib/PayPal/Api/WebhookEventList.php @@ -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 diff --git a/lib/PayPal/Api/WebhookEventType.php b/lib/PayPal/Api/WebhookEventType.php index c0287ff..23dcbb6 100644 --- a/lib/PayPal/Api/WebhookEventType.php +++ b/lib/PayPal/Api/WebhookEventType.php @@ -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) diff --git a/lib/PayPal/Api/WebhookEventTypeList.php b/lib/PayPal/Api/WebhookEventTypeList.php index 867db39..e812c93 100644 --- a/lib/PayPal/Api/WebhookEventTypeList.php +++ b/lib/PayPal/Api/WebhookEventTypeList.php @@ -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 diff --git a/lib/PayPal/Api/WebhookList.php b/lib/PayPal/Api/WebhookList.php index c0aa129..4bb5148 100644 --- a/lib/PayPal/Api/WebhookList.php +++ b/lib/PayPal/Api/WebhookList.php @@ -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 diff --git a/lib/PayPal/Auth/OAuthTokenCredential.php b/lib/PayPal/Auth/OAuthTokenCredential.php index 52e1232..7d3356b 100644 --- a/lib/PayPal/Auth/OAuthTokenCredential.php +++ b/lib/PayPal/Auth/OAuthTokenCredential.php @@ -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); diff --git a/lib/PayPal/Cache/AuthorizationCache.php b/lib/PayPal/Cache/AuthorizationCache.php index c1f7cfd..1da0d0f 100644 --- a/lib/PayPal/Cache/AuthorizationCache.php +++ b/lib/PayPal/Cache/AuthorizationCache.php @@ -2,7 +2,7 @@ namespace PayPal\Cache; -use PayPal\Core\PPConfigManager; +use PayPal\Core\PayPalConfigManager; use PayPal\Validation\JsonValidator; abstract class AuthorizationCache @@ -82,7 +82,7 @@ abstract class AuthorizationCache */ public static function isEnabled($config) { - $config = ($config && is_array($config)) ? $config : PPConfigManager::getInstance()->getConfigHashmap(); + $config = ($config && is_array($config)) ? $config : PayPalConfigManager::getInstance()->getConfigHashmap(); if (array_key_exists("cache.enabled", $config)) { $value = $config['cache.enabled']; return (trim($value) == 'true') ? true : false; diff --git a/lib/PayPal/Common/PPArrayUtil.php b/lib/PayPal/Common/ArrayUtil.php similarity index 90% rename from lib/PayPal/Common/PPArrayUtil.php rename to lib/PayPal/Common/ArrayUtil.php index 6b6342e..f36be34 100644 --- a/lib/PayPal/Common/PPArrayUtil.php +++ b/lib/PayPal/Common/ArrayUtil.php @@ -3,12 +3,12 @@ namespace PayPal\Common; /** - * Class PPArrayUtil + * Class ArrayUtil * Util Class for Arrays * * @package PayPal\Common */ -class PPArrayUtil +class ArrayUtil { /** @@ -25,4 +25,4 @@ class PPArrayUtil } return true; } -} \ No newline at end of file +} diff --git a/lib/PayPal/Common/PPModel.php b/lib/PayPal/Common/PayPalModel.php similarity index 95% rename from lib/PayPal/Common/PPModel.php rename to lib/PayPal/Common/PayPalModel.php index bdcf662..681d89d 100644 --- a/lib/PayPal/Common/PPModel.php +++ b/lib/PayPal/Common/PayPalModel.php @@ -9,7 +9,7 @@ use PayPal\Validation\ModelAccessorValidator; * Stores all member data in a Hashmap that enables easy * JSON encoding/decoding */ -class PPModel +class PayPalModel { private $_propMap = array(); @@ -52,7 +52,7 @@ class PPModel //Convert to Array if Json Data Sent $data = json_decode($data, true); } - if (!PPArrayUtil::isAssocArray($data)) { + if (!ArrayUtil::isAssocArray($data)) { $list = array(); //This means, root element is array foreach ($data as $k => $v) { @@ -136,7 +136,7 @@ class PPModel { $ret = array(); foreach ($param as $k => $v) { - if ($v instanceof PPModel) { + if ($v instanceof PayPalModel) { $ret[$k] = $v->toArray(); } else if (is_array($v)) { $ret[$k] = $this->_convertToArray($v); @@ -158,8 +158,8 @@ class PPModel if (!empty($arr)) { foreach ($arr as $k => $v) { if (is_array($v)) { - $clazz = PPReflectionUtil::getPropertyClass(get_class($this), $k); - if (PPArrayUtil::isAssocArray($v)) { + $clazz = ReflectionUtil::getPropertyClass(get_class($this), $k); + if (ArrayUtil::isAssocArray($v)) { /** @var self $o */ $o = new $clazz(); $o->fromArray($v); diff --git a/lib/PayPal/Common/ResourceModel.php b/lib/PayPal/Common/PayPalResourceModel.php similarity index 78% rename from lib/PayPal/Common/ResourceModel.php rename to lib/PayPal/Common/PayPalResourceModel.php index 97e941c..ec8c4c6 100644 --- a/lib/PayPal/Common/ResourceModel.php +++ b/lib/PayPal/Common/PayPalResourceModel.php @@ -1,19 +1,19 @@ execute($handlers, $url, $method, $payLoad, $headers); diff --git a/lib/PayPal/Common/PPUserAgent.php b/lib/PayPal/Common/PayPalUserAgent.php similarity index 92% rename from lib/PayPal/Common/PPUserAgent.php rename to lib/PayPal/Common/PayPalUserAgent.php index 1ce5655..d6adc47 100644 --- a/lib/PayPal/Common/PPUserAgent.php +++ b/lib/PayPal/Common/PayPalUserAgent.php @@ -3,12 +3,12 @@ namespace PayPal\Common; /** - * Class PPUserAgent - * PPUserAgent generates User Agent for curl requests + * Class PayPalUserAgent + * PayPalUserAgent generates User Agent for curl requests * * @package PayPal\Common */ -class PPUserAgent +class PayPalUserAgent { /** @@ -56,4 +56,4 @@ class PPUserAgent return PHP_INT_SIZE; } } -} \ No newline at end of file +} diff --git a/lib/PayPal/Common/PPReflectionUtil.php b/lib/PayPal/Common/ReflectionUtil.php similarity index 92% rename from lib/PayPal/Common/PPReflectionUtil.php rename to lib/PayPal/Common/ReflectionUtil.php index 9222bf6..b57e242 100644 --- a/lib/PayPal/Common/PPReflectionUtil.php +++ b/lib/PayPal/Common/ReflectionUtil.php @@ -3,11 +3,11 @@ namespace PayPal\Common; /** - * Class PPReflectionUtil + * Class ReflectionUtil * * @package PayPal\Common */ -class PPReflectionUtil +class ReflectionUtil { /** @@ -34,9 +34,9 @@ class PPReflectionUtil */ public static function getPropertyClass($class, $propertyName) { - if ($class == get_class(new PPModel())) { - // Make it generic if PPModel is used for generating this - return get_class(new PPModel()); + if ($class == get_class(new PayPalModel())) { + // Make it generic if PayPalModel is used for generating this + return get_class(new PayPalModel()); } if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['return'])) { diff --git a/lib/PayPal/Common/FormatConverter.php b/lib/PayPal/Converter/FormatConverter.php similarity index 98% rename from lib/PayPal/Common/FormatConverter.php rename to lib/PayPal/Converter/FormatConverter.php index e5db4b5..e9b0a47 100644 --- a/lib/PayPal/Common/FormatConverter.php +++ b/lib/PayPal/Converter/FormatConverter.php @@ -1,6 +1,6 @@ getConfigHashmap() : $config); + self::$instance = new self($config == null ? PayPalConfigManager::getInstance()->getConfigHashmap() : $config); } return self::$instance; } @@ -140,7 +140,7 @@ class PPCredentialManager * * @param null $userId * @return OAuthTokenCredential - * @throws PPInvalidCredentialException + * @throws PayPalInvalidCredentialException */ public function getCredentialObject($userId = null) { @@ -151,7 +151,7 @@ class PPCredentialManager } if (empty($credObj)) { - throw new PPInvalidCredentialException("Credential not found for " . ($userId ? $userId : " default user") . + throw new PayPalInvalidCredentialException("Credential not found for " . ($userId ? $userId : " default user") . ". Please make sure your configuration/APIContext has credential information"); } return $credObj; diff --git a/lib/PayPal/Core/PPHttpConfig.php b/lib/PayPal/Core/PayPalHttpConfig.php similarity index 95% rename from lib/PayPal/Core/PPHttpConfig.php rename to lib/PayPal/Core/PayPalHttpConfig.php index ced08ef..aed127d 100644 --- a/lib/PayPal/Core/PPHttpConfig.php +++ b/lib/PayPal/Core/PayPalHttpConfig.php @@ -2,19 +2,19 @@ namespace PayPal\Core; -use PayPal\Exception\PPConfigurationException; +use PayPal\Exception\PayPalConfigurationException; /** - * Class PPHttpConfig + * Class PayPalHttpConfig * Http Configuration Class * * @package PayPal\Core */ -class PPHttpConfig +class PayPalHttpConfig { /** * Some default options for curl - * These are typically overridden by PPConnectionManager + * These are typically overridden by PayPalConnectionManager * * @var array */ @@ -228,13 +228,13 @@ class PPHttpConfig * Set HTTP proxy information * * @param string $proxy - * @throws PPConfigurationException + * @throws PayPalConfigurationException */ public function setHttpProxy($proxy) { $urlParts = parse_url($proxy); if ($urlParts == false || !array_key_exists("host", $urlParts)) { - throw new PPConfigurationException("Invalid proxy configuration " . $proxy); + throw new PayPalConfigurationException("Invalid proxy configuration " . $proxy); } $this->curlOptions[CURLOPT_PROXY] = $urlParts["host"]; if (isset($urlParts["port"])) { diff --git a/lib/PayPal/Core/PPHttpConnection.php b/lib/PayPal/Core/PayPalHttpConnection.php similarity index 86% rename from lib/PayPal/Core/PPHttpConnection.php rename to lib/PayPal/Core/PayPalHttpConnection.php index 8554686..c3537ee 100644 --- a/lib/PayPal/Core/PPHttpConnection.php +++ b/lib/PayPal/Core/PayPalHttpConnection.php @@ -2,19 +2,19 @@ namespace PayPal\Core; -use PayPal\Exception\PPConfigurationException; -use PayPal\Exception\PPConnectionException; +use PayPal\Exception\PayPalConfigurationException; +use PayPal\Exception\PayPalConnectionException; /** * A wrapper class based on the curl extension. * Requires the PHP curl module to be enabled. * See for full requirements the PHP manual: http://php.net/curl */ -class PPHttpConnection +class PayPalHttpConnection { /** - * @var PPHttpConfig + * @var PayPalHttpConfig */ private $httpConfig; @@ -28,24 +28,24 @@ class PPHttpConnection /** * LoggingManager * - * @var PPLoggingManager + * @var PayPalLoggingManager */ private $logger; /** * Default Constructor * - * @param PPHttpConfig $httpConfig + * @param PayPalHttpConfig $httpConfig * @param array $config - * @throws PPConfigurationException + * @throws PayPalConfigurationException */ - public function __construct(PPHttpConfig $httpConfig, array $config) + public function __construct(PayPalHttpConfig $httpConfig, array $config) { if (!function_exists("curl_init")) { - throw new PPConfigurationException("Curl module is not available on this system"); + throw new PayPalConfigurationException("Curl module is not available on this system"); } $this->httpConfig = $httpConfig; - $this->logger = PPLoggingManager::getInstance(__CLASS__); + $this->logger = PayPalLoggingManager::getInstance(__CLASS__); } /** @@ -67,14 +67,14 @@ class PPHttpConnection * Executes an HTTP request * * @param string $data query string OR POST content as a string - * @throws PPConnectionException + * @throws PayPalConnectionException */ /** * Executes an HTTP request * * @param string $data query string OR POST content as a string * @return mixed - * @throws PPConnectionException + * @throws PayPalConnectionException */ public function execute($data) { @@ -134,7 +134,7 @@ class PPHttpConnection //Throw Exception if Retries and Certificates doenst work if (curl_errno($ch)) { - $ex = new PPConnectionException( + $ex = new PayPalConnectionException( $this->httpConfig->getUrl(), curl_error($ch), curl_errno($ch) @@ -148,7 +148,7 @@ class PPHttpConnection $this->logger->fine(($result && $result != '' ? "Response : " . $result : "No Response Body") . "\n\n"); //More Exceptions based on HttpStatus Code if (in_array($httpStatus, self::$retryCodes)) { - $ex = new PPConnectionException( + $ex = new PayPalConnectionException( $this->httpConfig->getUrl(), "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}. " . "Retried $retries times." @@ -156,7 +156,7 @@ class PPHttpConnection $ex->setData($result); throw $ex; } else if ($httpStatus < 200 || $httpStatus >= 300) { - $ex = new PPConnectionException( + $ex = new PayPalConnectionException( $this->httpConfig->getUrl(), "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}.", $httpStatus diff --git a/lib/PayPal/Core/PPLoggingLevel.php b/lib/PayPal/Core/PayPalLoggingLevel.php similarity index 91% rename from lib/PayPal/Core/PPLoggingLevel.php rename to lib/PayPal/Core/PayPalLoggingLevel.php index af59287..98faad4 100644 --- a/lib/PayPal/Core/PPLoggingLevel.php +++ b/lib/PayPal/Core/PayPalLoggingLevel.php @@ -6,7 +6,7 @@ namespace PayPal\Core; * Logging Levels. * Class containing all the constants for Logging Levels. */ -class PPLoggingLevel +class PayPalLoggingLevel { // FINE Logging Level @@ -20,4 +20,4 @@ class PPLoggingLevel // ERROR Logging Level const ERROR = 0; -} \ No newline at end of file +} diff --git a/lib/PayPal/Core/PPLoggingManager.php b/lib/PayPal/Core/PayPalLoggingManager.php similarity index 80% rename from lib/PayPal/Core/PPLoggingManager.php rename to lib/PayPal/Core/PayPalLoggingManager.php index a2eda13..fc2565a 100644 --- a/lib/PayPal/Core/PPLoggingManager.php +++ b/lib/PayPal/Core/PayPalLoggingManager.php @@ -7,7 +7,7 @@ namespace PayPal\Core; * This does an error_log for now * Potential frameworks to use are PEAR logger, log4php from Apache */ -class PPLoggingManager +class PayPalLoggingManager { /** @@ -75,7 +75,7 @@ class PPLoggingManager date_default_timezone_set('GMT'); } - $config = PPConfigManager::getInstance()->getConfigHashmap(); + $config = PayPalConfigManager::getInstance()->getConfigHashmap(); $this->isLoggingEnabled = (array_key_exists('log.LogEnabled', $config) && $config['log.LogEnabled'] == '1'); @@ -83,9 +83,9 @@ class PPLoggingManager $this->loggerFile = ($config['log.FileName']) ? $config['log.FileName'] : ini_get('error_log'); $loggingLevel = strtoupper($config['log.LogLevel']); $this->loggingLevel = - (isset($loggingLevel) && defined(__NAMESPACE__ . "\\PPLoggingLevel::$loggingLevel")) ? - constant(__NAMESPACE__ . "\\PPLoggingLevel::$loggingLevel") : - PPLoggingManager::DEFAULT_LOGGING_LEVEL; + (isset($loggingLevel) && defined(__NAMESPACE__ . "\\PayPalLoggingLevel::$loggingLevel")) ? + constant(__NAMESPACE__ . "\\PayPalLoggingLevel::$loggingLevel") : + PayPalLoggingManager::DEFAULT_LOGGING_LEVEL; } } @@ -95,7 +95,7 @@ class PPLoggingManager * @param string $message * @param int $level */ - private function log($message, $level = PPLoggingLevel::INFO) + private function log($message, $level = PayPalLoggingLevel::INFO) { if ($this->isLoggingEnabled && ($level <= $this->loggingLevel)) { error_log("[" . date('d-m-Y h:i:s') . "] " . $this->loggerName . ": $message\n", 3, $this->loggerFile); @@ -109,7 +109,7 @@ class PPLoggingManager */ public function error($message) { - $this->log('ERROR: ' . $message, PPLoggingLevel::ERROR); + $this->log('ERROR: ' . $message, PayPalLoggingLevel::ERROR); } /** @@ -119,7 +119,7 @@ class PPLoggingManager */ public function warning($message) { - $this->log('WARNING: ' . $message, PPLoggingLevel::WARN); + $this->log('WARNING: ' . $message, PayPalLoggingLevel::WARN); } /** @@ -129,7 +129,7 @@ class PPLoggingManager */ public function info($message) { - $this->log('INFO: ' . $message, PPLoggingLevel::INFO); + $this->log('INFO: ' . $message, PayPalLoggingLevel::INFO); } /** @@ -139,7 +139,7 @@ class PPLoggingManager */ public function fine($message) { - $this->log('FINE: ' . $message, PPLoggingLevel::FINE); + $this->log('FINE: ' . $message, PayPalLoggingLevel::FINE); } } diff --git a/lib/PayPal/Exception/PPConfigurationException.php b/lib/PayPal/Exception/PayPalConfigurationException.php similarity index 76% rename from lib/PayPal/Exception/PPConfigurationException.php rename to lib/PayPal/Exception/PayPalConfigurationException.php index b17d2eb..5105747 100644 --- a/lib/PayPal/Exception/PPConfigurationException.php +++ b/lib/PayPal/Exception/PayPalConfigurationException.php @@ -3,11 +3,11 @@ namespace PayPal\Exception; /** - * Class PPConfigurationException + * Class PayPalConfigurationException * * @package PayPal\Exception */ -class PPConfigurationException extends \Exception +class PayPalConfigurationException extends \Exception { /** @@ -20,4 +20,4 @@ class PPConfigurationException extends \Exception { parent::__construct($message, $code); } -} \ No newline at end of file +} diff --git a/lib/PayPal/Exception/PPConnectionException.php b/lib/PayPal/Exception/PayPalConnectionException.php similarity index 91% rename from lib/PayPal/Exception/PPConnectionException.php rename to lib/PayPal/Exception/PayPalConnectionException.php index 69740eb..72eeafe 100644 --- a/lib/PayPal/Exception/PPConnectionException.php +++ b/lib/PayPal/Exception/PayPalConnectionException.php @@ -3,11 +3,11 @@ namespace PayPal\Exception; /** - * Class PPConnectionException + * Class PayPalConnectionException * * @package PayPal\Exception */ -class PPConnectionException extends \Exception +class PayPalConnectionException extends \Exception { /** * The url that was being connected to when the exception occured @@ -65,4 +65,4 @@ class PPConnectionException extends \Exception { return $this->url; } -} \ No newline at end of file +} diff --git a/lib/PayPal/Exception/PPInvalidCredentialException.php b/lib/PayPal/Exception/PayPalInvalidCredentialException.php similarity index 85% rename from lib/PayPal/Exception/PPInvalidCredentialException.php rename to lib/PayPal/Exception/PayPalInvalidCredentialException.php index 71b6f59..2531f5b 100644 --- a/lib/PayPal/Exception/PPInvalidCredentialException.php +++ b/lib/PayPal/Exception/PayPalInvalidCredentialException.php @@ -3,11 +3,11 @@ namespace PayPal\Exception; /** - * Class PPInvalidCredentialException + * Class PayPalInvalidCredentialException * * @package PayPal\Exception */ -class PPInvalidCredentialException extends \Exception +class PayPalInvalidCredentialException extends \Exception { /** @@ -33,4 +33,4 @@ class PPInvalidCredentialException extends \Exception return $errorMsg; } -} \ No newline at end of file +} diff --git a/lib/PayPal/Exception/PPMissingCredentialException.php b/lib/PayPal/Exception/PayPalMissingCredentialException.php similarity index 85% rename from lib/PayPal/Exception/PPMissingCredentialException.php rename to lib/PayPal/Exception/PayPalMissingCredentialException.php index a5ecae9..9fac996 100644 --- a/lib/PayPal/Exception/PPMissingCredentialException.php +++ b/lib/PayPal/Exception/PayPalMissingCredentialException.php @@ -3,11 +3,11 @@ namespace PayPal\Exception; /** - * Class PPMissingCredentialException + * Class PayPalMissingCredentialException * * @package PayPal\Exception */ -class PPMissingCredentialException extends \Exception +class PayPalMissingCredentialException extends \Exception { /** @@ -34,4 +34,4 @@ class PPMissingCredentialException extends \Exception return $errorMsg; } -} \ No newline at end of file +} diff --git a/lib/PayPal/Handler/IPPHandler.php b/lib/PayPal/Handler/IPayPalHandler.php similarity index 68% rename from lib/PayPal/Handler/IPPHandler.php rename to lib/PayPal/Handler/IPayPalHandler.php index dc57589..0d1c8ff 100644 --- a/lib/PayPal/Handler/IPPHandler.php +++ b/lib/PayPal/Handler/IPayPalHandler.php @@ -3,18 +3,18 @@ namespace PayPal\Handler; /** - * Interface IPPHandler + * Interface IPayPalHandler * * @package PayPal\Handler */ -interface IPPHandler +interface IPayPalHandler { /** * - * @param \Paypal\Core\PPHttpConfig $httpConfig + * @param \Paypal\Core\PayPalHttpConfig $httpConfig * @param string $request * @param mixed $options * @return mixed */ public function handle($httpConfig, $request, $options); -} \ No newline at end of file +} diff --git a/lib/PayPal/Rest/OauthHandler.php b/lib/PayPal/Handler/OauthHandler.php similarity index 66% rename from lib/PayPal/Rest/OauthHandler.php rename to lib/PayPal/Handler/OauthHandler.php index 1e80557..7469821 100644 --- a/lib/PayPal/Rest/OauthHandler.php +++ b/lib/PayPal/Handler/OauthHandler.php @@ -3,20 +3,20 @@ * API handler for OAuth Token Request REST API calls */ -namespace PayPal\Rest; +namespace PayPal\Handler; -use PayPal\Common\PPUserAgent; -use PayPal\Core\PPConstants; -use PayPal\Core\PPHttpConfig; -use PayPal\Exception\PPConfigurationException; -use PayPal\Exception\PPInvalidCredentialException; -use PayPal\Exception\PPMissingCredentialException; -use PayPal\Handler\IPPHandler; +use PayPal\Common\PayPalUserAgent; +use PayPal\Core\PayPalConstants; +use PayPal\Core\PayPalHttpConfig; +use PayPal\Exception\PayPalConfigurationException; +use PayPal\Exception\PayPalInvalidCredentialException; +use PayPal\Exception\PayPalMissingCredentialException; +use PayPal\Handler\IPayPalHandler; /** * Class OauthHandler */ -class OauthHandler implements IPPHandler +class OauthHandler implements IPayPalHandler { /** * Private Variable @@ -36,13 +36,13 @@ class OauthHandler implements IPPHandler } /** - * @param PPHttpConfig $httpConfig + * @param PayPalHttpConfig $httpConfig * @param string $request * @param mixed $options * @return mixed|void - * @throws PPConfigurationException - * @throws PPInvalidCredentialException - * @throws PPMissingCredentialException + * @throws PayPalConfigurationException + * @throws PayPalInvalidCredentialException + * @throws PayPalMissingCredentialException */ public function handle($httpConfig, $request, $options) { @@ -54,7 +54,7 @@ class OauthHandler implements IPPHandler ); $headers = array( - "User-Agent" => PPUserAgent::getValue(PPConstants::SDK_NAME, PPConstants::SDK_VERSION), + "User-Agent" => PayPalUserAgent::getValue(PayPalConstants::SDK_NAME, PayPalConstants::SDK_VERSION), "Authorization" => "Basic " . base64_encode($options['clientId'] . ":" . $options['clientSecret']), "Accept" => "*/*" ); @@ -72,8 +72,8 @@ class OauthHandler implements IPPHandler * * @param array $config * - * @return PPHttpConfig - * @throws \PayPal\Exception\PPConfigurationException + * @return PayPalHttpConfig + * @throws \PayPal\Exception\PayPalConfigurationException */ private static function _getEndpoint($config) { @@ -84,16 +84,16 @@ class OauthHandler implements IPPHandler } else if (isset($config['mode'])) { switch (strtoupper($config['mode'])) { case 'SANDBOX': - $baseEndpoint = PPConstants::REST_SANDBOX_ENDPOINT; + $baseEndpoint = PayPalConstants::REST_SANDBOX_ENDPOINT; break; case 'LIVE': - $baseEndpoint = PPConstants::REST_LIVE_ENDPOINT; + $baseEndpoint = PayPalConstants::REST_LIVE_ENDPOINT; break; default: - throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live'); + throw new PayPalConfigurationException('The mode config parameter must be set to either sandbox/live'); } } else { - throw new PPConfigurationException( + throw new PayPalConfigurationException( 'You must set one of service.endpoint or mode parameters in your configuration' ); } diff --git a/lib/PayPal/Rest/RestHandler.php b/lib/PayPal/Handler/RestHandler.php similarity index 67% rename from lib/PayPal/Rest/RestHandler.php rename to lib/PayPal/Handler/RestHandler.php index f8c858a..121ece1 100644 --- a/lib/PayPal/Rest/RestHandler.php +++ b/lib/PayPal/Handler/RestHandler.php @@ -3,22 +3,21 @@ * API handler for all REST API calls */ -namespace PayPal\Rest; +namespace PayPal\Handler; use PayPal\Auth\OAuthTokenCredential; -use PayPal\Common\PPUserAgent; -use PayPal\Core\PPConstants; -use PayPal\Core\PPCredentialManager; -use PayPal\Core\PPHttpConfig; -use PayPal\Exception\PPConfigurationException; -use PayPal\Exception\PPInvalidCredentialException; -use PayPal\Exception\PPMissingCredentialException; -use PayPal\Handler\IPPHandler; +use PayPal\Common\PayPalUserAgent; +use PayPal\Core\PayPalConstants; +use PayPal\Core\PayPalCredentialManager; +use PayPal\Core\PayPalHttpConfig; +use PayPal\Exception\PayPalConfigurationException; +use PayPal\Exception\PayPalInvalidCredentialException; +use PayPal\Exception\PayPalMissingCredentialException; /** * Class RestHandler */ -class RestHandler implements IPPHandler +class RestHandler implements IPayPalHandler { /** * Private Variable @@ -38,13 +37,13 @@ class RestHandler implements IPPHandler } /** - * @param PPHttpConfig $httpConfig + * @param PayPalHttpConfig $httpConfig * @param string $request * @param mixed $options * @return mixed|void - * @throws PPConfigurationException - * @throws PPInvalidCredentialException - * @throws PPMissingCredentialException + * @throws PayPalConfigurationException + * @throws PayPalInvalidCredentialException + * @throws PayPalMissingCredentialException */ public function handle($httpConfig, $request, $options) { @@ -54,18 +53,18 @@ class RestHandler implements IPPHandler if ($credential == null) { // Try picking credentials from the config file - $credMgr = PPCredentialManager::getInstance($config); + $credMgr = PayPalCredentialManager::getInstance($config); $credValues = $credMgr->getCredentialObject(); if (!is_array($credValues)) { - throw new PPMissingCredentialException("Empty or invalid credentials passed"); + throw new PayPalMissingCredentialException("Empty or invalid credentials passed"); } $credential = new OAuthTokenCredential($credValues['clientId'], $credValues['clientSecret']); } if ($credential == null || !($credential instanceof OAuthTokenCredential)) { - throw new PPInvalidCredentialException("Invalid credentials passed"); + throw new PayPalInvalidCredentialException("Invalid credentials passed"); } $httpConfig->setUrl( @@ -74,7 +73,7 @@ class RestHandler implements IPPHandler ); if (!array_key_exists("User-Agent", $httpConfig->getHeaders())) { - $httpConfig->addHeader("User-Agent", PPUserAgent::getValue(PPConstants::SDK_NAME, PPConstants::SDK_VERSION)); + $httpConfig->addHeader("User-Agent", PayPalUserAgent::getValue(PayPalConstants::SDK_NAME, PayPalConstants::SDK_VERSION)); } if (!is_null($credential) && $credential instanceof OAuthTokenCredential && is_null($httpConfig->getHeader('Authorization'))) { @@ -97,7 +96,7 @@ class RestHandler implements IPPHandler * @param array $config * * @return string - * @throws \PayPal\Exception\PPConfigurationException + * @throws \PayPal\Exception\PayPalConfigurationException */ private function _getEndpoint($config) { @@ -106,17 +105,17 @@ class RestHandler implements IPPHandler } else if (isset($config['mode'])) { switch (strtoupper($config['mode'])) { case 'SANDBOX': - return PPConstants::REST_SANDBOX_ENDPOINT; + return PayPalConstants::REST_SANDBOX_ENDPOINT; break; case 'LIVE': - return PPConstants::REST_LIVE_ENDPOINT; + return PayPalConstants::REST_LIVE_ENDPOINT; break; default: - throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live'); + throw new PayPalConfigurationException('The mode config parameter must be set to either sandbox/live'); break; } } else { - throw new PPConfigurationException( + throw new PayPalConfigurationException( 'You must set one of service.endpoint or mode parameters in your configuration' ); } diff --git a/lib/PayPal/Rest/ApiContext.php b/lib/PayPal/Rest/ApiContext.php index 3c8a81e..b691571 100644 --- a/lib/PayPal/Rest/ApiContext.php +++ b/lib/PayPal/Rest/ApiContext.php @@ -2,8 +2,8 @@ namespace PayPal\Rest; -use PayPal\Core\PPConfigManager; -use PayPal\Core\PPCredentialManager; +use PayPal\Core\PayPalConfigManager; +use PayPal\Core\PayPalCredentialManager; /** * Class ApiContext @@ -26,7 +26,7 @@ class ApiContext /** * This is a placeholder for holding credential for the request - * If the value is not set, it would get the value from @\PayPal\Core\PPCredentialManager + * If the value is not set, it would get the value from @\PayPal\Core\PayPalCredentialManager * * @var \Paypal\Auth\OAuthTokenCredential */ @@ -53,14 +53,14 @@ class ApiContext public function getCredential() { if ($this->credential == null) { - return PPCredentialManager::getInstance()->getCredentialObject(); + return PayPalCredentialManager::getInstance()->getCredentialObject(); } return $this->credential; } public function getRequestHeaders() { - $result = PPConfigManager::getInstance()->get('http.headers'); + $result = PayPalConfigManager::getInstance()->get('http.headers'); $headers = array(); foreach ($result as $header => $value) { $headerName = ltrim($header, 'http.headers'); @@ -75,7 +75,7 @@ class ApiContext if (!(substr($name, 0, strlen('http.headers')) === 'http.headers')) { $name = 'http.headers.' . $name; } - PPConfigManager::getInstance()->addConfigs(array($name => $value)); + PayPalConfigManager::getInstance()->addConfigs(array($name => $value)); } /** @@ -112,7 +112,7 @@ class ApiContext */ public function setConfig(array $config) { - PPConfigManager::getInstance()->addConfigs($config); + PayPalConfigManager::getInstance()->addConfigs($config); } /** @@ -122,7 +122,7 @@ class ApiContext */ public function getConfig() { - return PPConfigManager::getInstance()->getConfigHashmap(); + return PayPalConfigManager::getInstance()->getConfigHashmap(); } /** @@ -133,7 +133,7 @@ class ApiContext */ public function get($searchKey) { - return PPConfigManager::getInstance()->get($searchKey); + return PayPalConfigManager::getInstance()->get($searchKey); } /** diff --git a/lib/PayPal/Transport/PPRestCall.php b/lib/PayPal/Transport/PayPalRestCall.php similarity index 75% rename from lib/PayPal/Transport/PPRestCall.php rename to lib/PayPal/Transport/PayPalRestCall.php index cf3ad8b..09db90b 100644 --- a/lib/PayPal/Transport/PPRestCall.php +++ b/lib/PayPal/Transport/PayPalRestCall.php @@ -1,24 +1,24 @@ apiContext = $apiContext; - $this->logger = PPLoggingManager::getInstance(__CLASS__); + $this->logger = PayPalLoggingManager::getInstance(__CLASS__); } /** @@ -48,13 +48,13 @@ class PPRestCall * @param string $data Request payload * @param array $headers HTTP headers * @return mixed - * @throws \PayPal\Exception\PPConnectionException + * @throws \PayPal\Exception\PayPalConnectionException */ public function execute($handlers = array(), $path, $method, $data = '', $headers = array()) { $config = $this->apiContext->getConfig(); - $httpConfig = new PPHttpConfig(null, $method); + $httpConfig = new PayPalHttpConfig(null, $method); $headers = $headers ? $headers : array(); $httpConfig->setHeaders($headers + array( @@ -62,7 +62,7 @@ class PPRestCall ) ); - /** @var \Paypal\Handler\IPPHandler $handler */ + /** @var \Paypal\Handler\IPayPalHandler $handler */ foreach ($handlers as $handler) { if (!is_object($handler)) { $fullHandler = "\\" . (string)$handler; @@ -70,7 +70,7 @@ class PPRestCall } $handler->handle($httpConfig, $data, array('path' => $path, 'apiContext' => $this->apiContext)); } - $connection = new PPHttpConnection($httpConfig, $config); + $connection = new PayPalHttpConnection($httpConfig, $config); $response = $connection->execute($data); return $response; diff --git a/lib/PayPal/Validation/ModelAccessorValidator.php b/lib/PayPal/Validation/ModelAccessorValidator.php index b0b73be..15f9fe3 100644 --- a/lib/PayPal/Validation/ModelAccessorValidator.php +++ b/lib/PayPal/Validation/ModelAccessorValidator.php @@ -2,9 +2,9 @@ namespace PayPal\Validation; -use PayPal\Common\PPModel; -use PayPal\Core\PPConfigManager; -use PayPal\Core\PPLoggingManager; +use PayPal\Common\PayPalModel; +use PayPal\Core\PayPalConfigManager; +use PayPal\Core\PayPalLoggingManager; /** * Class ModelAccessorValidator @@ -16,18 +16,18 @@ class ModelAccessorValidator /** * Helper method for validating if the class contains accessor methods (getter and setter) for a given attribute * - * @param PPModel $class An object of PPModel + * @param PayPalModel $class An object of PayPalModel * @param string $attributeName Attribute name * @return bool */ - public static function validate(PPModel $class, $attributeName) + public static function validate(PayPalModel $class, $attributeName) { - $mode = PPConfigManager::getInstance()->get('validation.level'); + $mode = PayPalConfigManager::getInstance()->get('validation.level'); if ($mode != 'disabled') { //If the mode is disabled, bypass the validation foreach (array('set' . $attributeName, 'get' . $attributeName) as $methodName) { - if (get_class($class) == get_class(new PPModel())) { - // Silently return false on cases where you are using PPModel instance directly + if (get_class($class) == get_class(new PayPalModel())) { + // Silently return false on cases where you are using PayPalModel instance directly return false; } //Check if both getter and setter exists for given attribute @@ -35,7 +35,7 @@ class ModelAccessorValidator //Delegate the error based on the choice $className = is_object($class) ? get_class($class) : (string)$class; $errorMessage = "Missing Accessor: $className:$methodName. Please let us know by creating an issue at https://github.com/paypal/PayPal-PHP-SDK/issues"; - PPLoggingManager::getInstance(__CLASS__)->warning($errorMessage); + PayPalLoggingManager::getInstance(__CLASS__)->warning($errorMessage); if ($mode == 'strict') { trigger_error($errorMessage, E_USER_NOTICE); } diff --git a/sample/billing/UpdatePlan.php b/sample/billing/UpdatePlan.php index 90712db..96e2692 100644 --- a/sample/billing/UpdatePlan.php +++ b/sample/billing/UpdatePlan.php @@ -16,11 +16,11 @@ $createdPlan = require 'CreatePlan.php'; use PayPal\Api\Plan; use PayPal\Api\PatchRequest; use PayPal\Api\Patch; -use PayPal\Common\PPModel; +use PayPal\Common\PayPalModel; try { $patch = new Patch(); - $value = new PPModel('{ + $value = new PayPalModel('{ "state":"ACTIVE" }'); diff --git a/sample/common.php b/sample/common.php index 09ccb36..ece651c 100644 --- a/sample/common.php +++ b/sample/common.php @@ -122,7 +122,7 @@ class ResultPrinter public static function printError($title, $objectName, $objectId = null, $request = null, $exception = null) { $data = null; - if ($exception instanceof \PayPal\Exception\PPConnectionException) { + if ($exception instanceof \PayPal\Exception\PayPalConnectionException) { $data = $exception->getData(); } self::printOutput($title, $objectName, $objectId, $request, $data, $exception->getMessage()); @@ -134,8 +134,8 @@ class ResultPrinter echo 'ERROR:'. $error; } if ($object) { - if (is_a($object, 'PayPal\Common\PPModel')) { - /** @var $object \PayPal\Common\PPModel */ + if (is_a($object, 'PayPal\Common\PayPalModel')) { + /** @var $object \PayPal\Common\PayPalModel */ echo $object->toJSON(128); } elseif (is_string($object) && \PayPal\Validation\JsonValidator::validate($object, true)) { echo str_replace('\\/', '/', json_encode(json_decode($object), 128)); @@ -157,8 +157,8 @@ class ResultPrinter '
'; } if ($object) { - if (is_a($object, 'PayPal\Common\PPModel')) { - /** @var $object \PayPal\Common\PPModel */ + if (is_a($object, 'PayPal\Common\PayPalModel')) { + /** @var $object \PayPal\Common\PayPalModel */ echo '' . $object->toJSON(128) . ""; } elseif (is_string($object) && \PayPal\Validation\JsonValidator::validate($object, true)) { echo '
'. str_replace('\\/', '/', json_encode(json_decode($object), 128)) . "";
diff --git a/sample/doc/billing/UpdatePlan.html b/sample/doc/billing/UpdatePlan.html
index 6158cfc..1dc562b 100644
--- a/sample/doc/billing/UpdatePlan.html
+++ b/sample/doc/billing/UpdatePlan.html
@@ -8,11 +8,11 @@ API used: /v1/payments/billing-plans/You can retrieve the refresh token by executing ObtainUserConsent.php and store the refresh token
You can retrieve the refresh token by executing ObtainUserConsent.php and store the refresh token
To obtain User Info, you have to follow three steps in general. +use PayPal\Api\OpenIdUserinfo; +use PayPal\Api\OpenIdTokeninfo;
To obtain User Info, you have to follow three steps in general. First, you need to obtain user's consent to retrieve the information you want. This is explained in the example "ObtainUserConsent.php".
Once you get the user's consent, the end result would be long lived refresh token. This refresh token should be stored in a permanent storage for later use.
Lastly, when you need to retrieve the user information, you need to generate the short lived access token @@ -10,11 +10,11 @@ to retreive the information. The short lived access token can be retrieved using try { - $tokenInfo = new PPOpenIdTokeninfo(); + $tokenInfo = new OpenIdTokeninfo(); $tokenInfo = $tokenInfo->createFromRefreshToken(array('refresh_token' => $refreshToken), $apiContext); $params = array('access_token' => $tokenInfo->getAccessToken()); - $userInfo = PPOpenIdUserinfo::getUserinfo($params, $apiContext); + $userInfo = OpenIdUserinfo::getUserinfo($params, $apiContext); } catch (Exception $ex) { ResultPrinter::printError("User Information", "User Info", null, $params, $ex); diff --git a/sample/doc/lipp/ObtainUserConsent.html b/sample/doc/lipp/ObtainUserConsent.html index 41a31b9..494f607 100644 --- a/sample/doc/lipp/ObtainUserConsent.html +++ b/sample/doc/lipp/ObtainUserConsent.html @@ -2,11 +2,11 @@ require __DIR__ . '/../bootstrap.php'; -use PayPal\Auth\Openid\PPOpenIdSession; +use PayPal\Api\OpenIdSession; $baseUrl = getBaseUrl() . '/UserConsentRedirect.php?success=true';
The clientId is stored in the bootstrap file
PayPal would redirect the user to the redirect_uri mentioned when creating the consent URL. @@ -11,8 +11,8 @@ The user would then able to retrieve the access token by getting the code, which $code = $_GET['code']; - try {
Obtain Authorization Code from Code, Client ID and Client Secret
Obtain Authorization Code from Code, Client ID and Client Secret
For Sample Purposes Only.
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.
The URL on the merchant site for transferring to after a bank transfer payment.
Parameters for style and presentation.
A URL to logo image. Allowed vaues: .gif, .jpg, or .png.
A label that overrides the business name in the PayPal account on the PayPal pages.
Locale of pages displayed by PayPal payment experience.
Parameters for input fields customization.
Enables the buyer to enter a note to the merchant on the PayPal page during checkout.
Determines whether or not PayPal displays shipping address fields on the experience pages. Allowed values: 0, 1, or 2. When set to 0, PayPal displays the shipping address on the PayPal pages. When set to 1, PayPal does not display shipping address fields whatsoever. When set to 2, if you do not pass the shipping address, PayPal obtains it from the buyer’s account profile. For digital goods, this field is required, and you must set it to 1.
Determines whether or not the PayPal pages should display the shipping address and not the shipping address on file with PayPal for this buyer. Displaying the PayPal street address on file does not allow the buyer to edit that address. Allowed values: 0 or 1. When set to 0, the PayPal pages should not display the shipping address. When set to 1, the PayPal pages should display the shipping address.
Name of the web experience profile. Required. Must be unique
Parameters for flow configuration.
Parameters for style and presentation.
Parameters for input field customization.
For Sample Purposes Only.
Use this call to create a profile.
Execute the delete method
If your request is successful, the API returns a web_profile object response that contains the profile details.
get_list method on the WebProfile class.
(See bootstrap.php for more on ApiContext)
Obtain Access Token From Refresh Token