Merge pull request #210 from paypal/1.0.0-beta

1.0.0
This commit is contained in:
Jay
2015-01-08 23:09:52 -06:00
283 changed files with 5389 additions and 12859 deletions

View File

@@ -11,6 +11,33 @@ This repository contains PayPal's PHP SDK and samples for REST API.
- PHP 5.3 or above
- [curl](http://php.net/manual/en/book.curl.php), [json](http://php.net/manual/en/book.json.php) & [openssl](http://php.net/manual/en/book.openssl.php) extensions must be enabled
## Breaking Changes to 1.* Release
* Removed Deprecated Getter Setters from all Model Classes
* All Camelcase getters and setters are removed. Please use first letter uppercase syntax
* E.g. instead of using get_notify_url(), use getNotifyUrl() instead
* Renamed Classes
* PayPal\Common\PPModel => PayPal\Common\PayPalModel
* PayPal\Common\ResourceModel => PayPal\Common\PayPalResourceModel
* PayPal\Common\PPUserAgent => PayPal\Common\PayPalUserAgent
* PayPal\Core\PPConfigManager => PayPal\Core\PayPalConfigManager
* PayPal\Core\PPConstants => PayPal\Core\PayPalConstants
* PayPal\Core\PPCredentialManager => PayPal\Core\PayPalCredentialManager
* PayPal\Core\PPHttpConfig => PayPal\Core\PayPalHttpConfig
* PayPal\Core\PPHttpConnection => PayPal\Core\PayPalHttpConnection
* PayPal\Core\PPLoggingLevel => PayPal\Core\PayPalLoggingLevel
* PayPal\Core\PPLoggingManager => PayPal\Core\PayPalLoggingManager
* PayPal\Exception\PPConfigurationException => PayPal\Exception\PayPalConfigurationException
* PayPal\Exception\PPConnectionException => PayPal\Exception\PayPalConnectionException
* PayPal\Exception\PPInvalidCredentialException => PayPal\Exception\PayPalInvalidCredentialException
* PayPal\Exception\PPMissingCredentialException => PayPal\Exception\PayPalMissingCredentialException
* PayPal\Handler\IPPHandler => PayPal\Handler\IPayPalHandler
* PayPal\Transport\PPRestCall => PayPal\Transport\PayPalRestCall
* Namespace Changes and Class Naming Convention
* PayPal\Common\FormatConverter => PayPal\Converter\FormatConverter
* PayPal\Rest\RestHandler => PayPal\Handler\RestHandler
* PayPal\Rest\OauthHandler => PayPal\Handler\OauthHandler
## Installation
### - Using Composer
@@ -144,16 +171,22 @@ Please visit our [sample sdk_config.ini](https://github.com/paypal/PayPal-PHP-SD
;Caching Configuration
[cache]
; If Cache is enabled, it stores the access token retrieved from ClientId and Secret from the
; server into a file provided in constant $CACHE_PATH in PayPal/Cache/AuthorizationCache.
; server into a file provided by the cache.FileName option or by using
; the constant $CACHE_PATH value in PayPal/Cache/AuthorizationCache if the option is omitted/empty.
; If the value is set to 'true', it would try to create a file and store the information.
; For any other value, it would disable it
; Please note, this is a very good performance improvement, and we would encourage you to
; set this up properly to reduce the number of calls, to almost 50% on normal use cases
; PLEASE NOTE: You may need to provide proper write permissions to /var directory under PayPal-PHP-SDK on
; your hosting server
; your hosting server or whichever custom directory you choose
cache.enabled=true
; When using a relative path, the cache file is created
; relative to the .php file that is the entry point
; for this request. You can also provide an absolute
; path here
cache.FileName=../auth.cache
```
##### PLEASE NOTE: You may need to provide proper write permissions to /var directory under PayPal-PHP-SDK on your hosting server
##### PLEASE NOTE: You may need to provide proper write permissions to /var directory under PayPal-PHP-SDK (or your custom directory) on your hosting server
### API Model Constructor

View File

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

View File

@@ -2,11 +2,12 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Core\PayPalConstants;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\AgreementTransactions;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class Agreement
@@ -28,9 +29,8 @@ use PayPal\Transport\PPRestCall;
* @property string create_time
* @property string update_time
* @property \PayPal\Api\AgreementDetails agreement_details
* @property \PayPal\Api\Links[] links
*/
class Agreement extends ResourceModel
class Agreement extends PayPalResourceModel
{
/**
* Identifier of the agreement.
@@ -147,31 +147,6 @@ class Agreement extends ResourceModel
return $this->start_date;
}
/**
* Start date of the agreement. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setStartDate
*
* @param string $start_date
* @return $this
*/
public function setStart_date($start_date)
{
$this->start_date = $start_date;
return $this;
}
/**
* Start date of the agreement. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getStartDate
*
* @return string
*/
public function getStart_date()
{
return $this->start_date;
}
/**
* Details of the buyer who is enrolling in this agreement. This information is gathered from execution of the approval URL.
*
@@ -218,31 +193,6 @@ class Agreement extends ResourceModel
return $this->shipping_address;
}
/**
* Shipping address object of the agreement, which should be provided if it is different from the default address.
*
* @deprecated Instead use setShippingAddress
*
* @param \PayPal\Api\Address $shipping_address
* @return $this
*/
public function setShipping_address($shipping_address)
{
$this->shipping_address = $shipping_address;
return $this;
}
/**
* Shipping address object of the agreement, which should be provided if it is different from the default address.
* @deprecated Instead use getShippingAddress
*
* @return \PayPal\Api\Address
*/
public function getShipping_address()
{
return $this->shipping_address;
}
/**
* Default merchant preferences from the billing plan are used, unless override preferences are provided here.
*
@@ -266,31 +216,6 @@ class Agreement extends ResourceModel
return $this->override_merchant_preferences;
}
/**
* Default merchant preferences from the billing plan are used, unless override preferences are provided here.
*
* @deprecated Instead use setOverrideMerchantPreferences
*
* @param \PayPal\Api\MerchantPreferences $override_merchant_preferences
* @return $this
*/
public function setOverride_merchant_preferences($override_merchant_preferences)
{
$this->override_merchant_preferences = $override_merchant_preferences;
return $this;
}
/**
* Default merchant preferences from the billing plan are used, unless override preferences are provided here.
* @deprecated Instead use getOverrideMerchantPreferences
*
* @return \PayPal\Api\MerchantPreferences
*/
public function getOverride_merchant_preferences()
{
return $this->override_merchant_preferences;
}
/**
* Array of override_charge_model for this agreement if needed to change the default models from the billing plan.
*
@@ -344,31 +269,6 @@ class Agreement extends ResourceModel
);
}
/**
* Array of override_charge_model for this agreement if needed to change the default models from the billing plan.
*
* @deprecated Instead use setOverrideChargeModels
*
* @param \PayPal\Api\OverrideChargeModel $override_charge_models
* @return $this
*/
public function setOverride_charge_models($override_charge_models)
{
$this->override_charge_models = $override_charge_models;
return $this;
}
/**
* Array of override_charge_model for this agreement if needed to change the default models from the billing plan.
* @deprecated Instead use getOverrideChargeModels
*
* @return \PayPal\Api\OverrideChargeModel
*/
public function getOverride_charge_models()
{
return $this->override_charge_models;
}
/**
* Plan details for this agreement.
*
@@ -415,31 +315,6 @@ class Agreement extends ResourceModel
return $this->create_time;
}
/**
* Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -463,31 +338,6 @@ class Agreement extends ResourceModel
return $this->update_time;
}
/**
* Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Agreement Details
*
@@ -512,88 +362,20 @@ class Agreement extends ResourceModel
}
/**
* Agreement Details
* Get Approval Link
*
* @deprecated Instead use setAgreementDetails
*
* @param \PayPal\Api\AgreementDetails $agreement-details
* @return $this
* @return null|string
*/
public function setAgreement_details($agreement_details)
public function getApprovalLink()
{
$this->{"agreement-details"} = $agreement_details;
return $this;
}
/**
* Agreement Details
* @deprecated Instead use getAgreementDetails
*
* @return \PayPal\Api\AgreementDetails
*/
public function getAgreement_details()
{
return $this->{"agreement-details"};
}
/**
* Sets Links
*
* @param \PayPal\Api\Links[] $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
/**
* Append Links to the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function addLink($links)
{
if (!$this->getLinks()) {
return $this->setLinks(array($links));
} else {
return $this->setLinks(
array_merge($this->getLinks(), array($links))
);
}
}
/**
* Remove Links from the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function removeLink($links)
{
return $this->setLinks(
array_diff($this->getLinks(), array($links))
);
return $this->getLink(PayPalConstants::APPROVAL_URL);
}
/**
* 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 +398,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 +422,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 +447,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 +471,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 +495,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 +519,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 +543,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 +567,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 +591,7 @@ class Agreement extends ResourceModel
*
* @param string $agreementId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return AgreementTransactions
*/
public static function transactions($agreementId, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class AgreementDetails
@@ -20,7 +20,7 @@ use PayPal\Common\PPModel;
* @property string final_payment_date
* @property string failed_payment_count
*/
class AgreementDetails extends PPModel
class AgreementDetails extends PayPalModel
{
/**
* The outstanding balance for this agreement.
@@ -45,31 +45,6 @@ class AgreementDetails extends PPModel
return $this->outstanding_balance;
}
/**
* The outstanding balance for this agreement.
*
* @deprecated Instead use setOutstandingBalance
*
* @param \PayPal\Api\Currency $outstanding_balance
* @return $this
*/
public function setOutstanding_balance($outstanding_balance)
{
$this->outstanding_balance = $outstanding_balance;
return $this;
}
/**
* The outstanding balance for this agreement.
* @deprecated Instead use getOutstandingBalance
*
* @return \PayPal\Api\Currency
*/
public function getOutstanding_balance()
{
return $this->outstanding_balance;
}
/**
* Number of cycles remaining for this agreement.
*
@@ -93,31 +68,6 @@ class AgreementDetails extends PPModel
return $this->cycles_remaining;
}
/**
* Number of cycles remaining for this agreement.
*
* @deprecated Instead use setCyclesRemaining
*
* @param string $cycles_remaining
* @return $this
*/
public function setCycles_remaining($cycles_remaining)
{
$this->cycles_remaining = $cycles_remaining;
return $this;
}
/**
* Number of cycles remaining for this agreement.
* @deprecated Instead use getCyclesRemaining
*
* @return string
*/
public function getCycles_remaining()
{
return $this->cycles_remaining;
}
/**
* Number of cycles completed for this agreement.
*
@@ -141,31 +91,6 @@ class AgreementDetails extends PPModel
return $this->cycles_completed;
}
/**
* Number of cycles completed for this agreement.
*
* @deprecated Instead use setCyclesCompleted
*
* @param string $cycles_completed
* @return $this
*/
public function setCycles_completed($cycles_completed)
{
$this->cycles_completed = $cycles_completed;
return $this;
}
/**
* Number of cycles completed for this agreement.
* @deprecated Instead use getCyclesCompleted
*
* @return string
*/
public function getCycles_completed()
{
return $this->cycles_completed;
}
/**
* The next billing date for this agreement, represented as 2014-02-19T10:00:00Z format.
*
@@ -189,31 +114,6 @@ class AgreementDetails extends PPModel
return $this->next_billing_date;
}
/**
* The next billing date for this agreement, represented as 2014-02-19T10:00:00Z format.
*
* @deprecated Instead use setNextBillingDate
*
* @param string $next_billing_date
* @return $this
*/
public function setNext_billing_date($next_billing_date)
{
$this->next_billing_date = $next_billing_date;
return $this;
}
/**
* The next billing date for this agreement, represented as 2014-02-19T10:00:00Z format.
* @deprecated Instead use getNextBillingDate
*
* @return string
*/
public function getNext_billing_date()
{
return $this->next_billing_date;
}
/**
* Last payment date for this agreement, represented as 2014-06-09T09:42:31Z format.
*
@@ -237,31 +137,6 @@ class AgreementDetails extends PPModel
return $this->last_payment_date;
}
/**
* Last payment date for this agreement, represented as 2014-06-09T09:42:31Z format.
*
* @deprecated Instead use setLastPaymentDate
*
* @param string $last_payment_date
* @return $this
*/
public function setLast_payment_date($last_payment_date)
{
$this->last_payment_date = $last_payment_date;
return $this;
}
/**
* Last payment date for this agreement, represented as 2014-06-09T09:42:31Z format.
* @deprecated Instead use getLastPaymentDate
*
* @return string
*/
public function getLast_payment_date()
{
return $this->last_payment_date;
}
/**
* Last payment amount for this agreement.
*
@@ -285,31 +160,6 @@ class AgreementDetails extends PPModel
return $this->last_payment_amount;
}
/**
* Last payment amount for this agreement.
*
* @deprecated Instead use setLastPaymentAmount
*
* @param \PayPal\Api\Currency $last_payment_amount
* @return $this
*/
public function setLast_payment_amount($last_payment_amount)
{
$this->last_payment_amount = $last_payment_amount;
return $this;
}
/**
* Last payment amount for this agreement.
* @deprecated Instead use getLastPaymentAmount
*
* @return \PayPal\Api\Currency
*/
public function getLast_payment_amount()
{
return $this->last_payment_amount;
}
/**
* Last payment date for this agreement, represented as 2015-02-19T10:00:00Z format.
*
@@ -333,31 +183,6 @@ class AgreementDetails extends PPModel
return $this->final_payment_date;
}
/**
* Last payment date for this agreement, represented as 2015-02-19T10:00:00Z format.
*
* @deprecated Instead use setFinalPaymentDate
*
* @param string $final_payment_date
* @return $this
*/
public function setFinal_payment_date($final_payment_date)
{
$this->final_payment_date = $final_payment_date;
return $this;
}
/**
* Last payment date for this agreement, represented as 2015-02-19T10:00:00Z format.
* @deprecated Instead use getFinalPaymentDate
*
* @return string
*/
public function getFinal_payment_date()
{
return $this->final_payment_date;
}
/**
* Total number of failed payments for this agreement.
*
@@ -381,29 +206,4 @@ class AgreementDetails extends PPModel
return $this->failed_payment_count;
}
/**
* Total number of failed payments for this agreement.
*
* @deprecated Instead use setFailedPaymentCount
*
* @param string $failed_payment_count
* @return $this
*/
public function setFailed_payment_count($failed_payment_count)
{
$this->failed_payment_count = $failed_payment_count;
return $this;
}
/**
* Total number of failed payments for this agreement.
* @deprecated Instead use getFailedPaymentCount
*
* @return string
*/
public function getFailed_payment_count()
{
return $this->failed_payment_count;
}
}

View File

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

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class AgreementTransaction
@@ -22,7 +22,7 @@ use PayPal\Common\PPModel;
* @property string time_updated
* @property string time_zone
*/
class AgreementTransaction extends PPModel
class AgreementTransaction extends PayPalModel
{
/**
* Id corresponding to this transaction.
@@ -47,31 +47,6 @@ class AgreementTransaction extends PPModel
return $this->transaction_id;
}
/**
* Id corresponding to this transaction.
*
* @deprecated Instead use setTransactionId
*
* @param string $transaction_id
* @return $this
*/
public function setTransaction_id($transaction_id)
{
$this->transaction_id = $transaction_id;
return $this;
}
/**
* Id corresponding to this transaction.
* @deprecated Instead use getTransactionId
*
* @return string
*/
public function getTransaction_id()
{
return $this->transaction_id;
}
/**
* State of the subscription at this time.
*
@@ -118,31 +93,6 @@ class AgreementTransaction extends PPModel
return $this->transaction_type;
}
/**
* Type of transaction, usually Recurring Payment.
*
* @deprecated Instead use setTransactionType
*
* @param string $transaction_type
* @return $this
*/
public function setTransaction_type($transaction_type)
{
$this->transaction_type = $transaction_type;
return $this;
}
/**
* Type of transaction, usually Recurring Payment.
* @deprecated Instead use getTransactionType
*
* @return string
*/
public function getTransaction_type()
{
return $this->transaction_type;
}
/**
* Amount for this transaction.
*
@@ -189,31 +139,6 @@ class AgreementTransaction extends PPModel
return $this->fee_amount;
}
/**
* Fee amount for this transaction.
*
* @deprecated Instead use setFeeAmount
*
* @param \PayPal\Api\Currency $fee_amount
* @return $this
*/
public function setFee_amount($fee_amount)
{
$this->fee_amount = $fee_amount;
return $this;
}
/**
* Fee amount for this transaction.
* @deprecated Instead use getFeeAmount
*
* @return \PayPal\Api\Currency
*/
public function getFee_amount()
{
return $this->fee_amount;
}
/**
* Net amount for this transaction.
*
@@ -237,31 +162,6 @@ class AgreementTransaction extends PPModel
return $this->net_amount;
}
/**
* Net amount for this transaction.
*
* @deprecated Instead use setNetAmount
*
* @param \PayPal\Api\Currency $net_amount
* @return $this
*/
public function setNet_amount($net_amount)
{
$this->net_amount = $net_amount;
return $this;
}
/**
* Net amount for this transaction.
* @deprecated Instead use getNetAmount
*
* @return \PayPal\Api\Currency
*/
public function getNet_amount()
{
return $this->net_amount;
}
/**
* Email id of payer.
*
@@ -285,31 +185,6 @@ class AgreementTransaction extends PPModel
return $this->payer_email;
}
/**
* Email id of payer.
*
* @deprecated Instead use setPayerEmail
*
* @param string $payer_email
* @return $this
*/
public function setPayer_email($payer_email)
{
$this->payer_email = $payer_email;
return $this;
}
/**
* Email id of payer.
* @deprecated Instead use getPayerEmail
*
* @return string
*/
public function getPayer_email()
{
return $this->payer_email;
}
/**
* Business name of payer.
*
@@ -333,31 +208,6 @@ class AgreementTransaction extends PPModel
return $this->payer_name;
}
/**
* Business name of payer.
*
* @deprecated Instead use setPayerName
*
* @param string $payer_name
* @return $this
*/
public function setPayer_name($payer_name)
{
$this->payer_name = $payer_name;
return $this;
}
/**
* Business name of payer.
* @deprecated Instead use getPayerName
*
* @return string
*/
public function getPayer_name()
{
return $this->payer_name;
}
/**
* Time at which this transaction happened.
*
@@ -381,31 +231,6 @@ class AgreementTransaction extends PPModel
return $this->time_updated;
}
/**
* Time at which this transaction happened.
*
* @deprecated Instead use setTimeUpdated
*
* @param string $time_updated
* @return $this
*/
public function setTime_updated($time_updated)
{
$this->time_updated = $time_updated;
return $this;
}
/**
* Time at which this transaction happened.
* @deprecated Instead use getTimeUpdated
*
* @return string
*/
public function getTime_updated()
{
return $this->time_updated;
}
/**
* Time zone of time_updated field.
*
@@ -429,29 +254,4 @@ class AgreementTransaction extends PPModel
return $this->time_zone;
}
/**
* Time zone of time_updated field.
*
* @deprecated Instead use setTimeZone
*
* @param string $time_zone
* @return $this
*/
public function setTime_zone($time_zone)
{
$this->time_zone = $time_zone;
return $this;
}
/**
* Time zone of time_updated field.
* @deprecated Instead use getTimeZone
*
* @return string
*/
public function getTime_zone()
{
return $this->time_zone;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class AgreementTransactions
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property \PayPal\Api\AgreementTransaction[] agreement_transaction_list
*/
class AgreementTransactions extends PPModel
class AgreementTransactions extends PayPalModel
{
/**
* Array of agreement_transaction object.
@@ -68,29 +68,4 @@ class AgreementTransactions extends PPModel
);
}
/**
* Array of agreement_transaction object.
*
* @deprecated Instead use setAgreementTransactionList
*
* @param \PayPal\Api\AgreementTransaction $agreement_transaction_list
* @return $this
*/
public function setAgreement_transaction_list($agreement_transaction_list)
{
$this->agreement_transaction_list = $agreement_transaction_list;
return $this;
}
/**
* Array of agreement_transaction object.
* @deprecated Instead use getAgreementTransactionList
*
* @return \PayPal\Api\AgreementTransaction
*/
public function getAgreement_transaction_list()
{
return $this->agreement_transaction_list;
}
}

View File

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

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\Capture;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -29,26 +29,8 @@ 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
*
* @var \PayPal\Auth\OAuthTokenCredential $credential
*/
protected static $credential;
/**
* Sets Credential
*
* @deprecated Pass ApiContext to create/get methods instead
* @param \PayPal\Auth\OAuthTokenCredential $credential
*/
public static function setCredential($credential)
{
self::$credential = $credential;
}
/**
* Identifier of the authorization transaction.
*
@@ -97,31 +79,6 @@ class Authorization extends PPModel implements IResource
return $this->create_time;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Time the resource was created in UTC ISO8601 format.
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
@@ -146,31 +103,6 @@ class Authorization extends PPModel implements IResource
return $this->update_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Amount being authorized for.
*
@@ -219,31 +151,6 @@ class Authorization extends PPModel implements IResource
return $this->payment_mode;
}
/**
* specifies payment mode of the transaction
*
* @deprecated Instead use setPaymentMode
*
* @param string $payment_mode
* @return $this
*/
public function setPayment_mode($payment_mode)
{
$this->payment_mode = $payment_mode;
return $this;
}
/**
* specifies payment mode of the transaction
* @deprecated Instead use getPaymentMode
*
* @return string
*/
public function getPayment_mode()
{
return $this->payment_mode;
}
/**
* State of the authorization transaction.
* Valid Values: ["pending", "authorized", "partially_captured", "captured", "expired", "voided"]
@@ -292,31 +199,6 @@ class Authorization extends PPModel implements IResource
return $this->protection_eligibility;
}
/**
* Protection Eligibility of the Payer
*
* @deprecated Instead use setProtectionEligibility
*
* @param string $protection_eligibility
* @return $this
*/
public function setProtection_eligibility($protection_eligibility)
{
$this->protection_eligibility = $protection_eligibility;
return $this;
}
/**
* Protection Eligibility of the Payer
* @deprecated Instead use getProtectionEligibility
*
* @return string
*/
public function getProtection_eligibility()
{
return $this->protection_eligibility;
}
/**
* Protection Eligibility Type of the Payer
* Valid Values: ["ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE", "INELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE"]
@@ -341,31 +223,6 @@ class Authorization extends PPModel implements IResource
return $this->protection_eligibility_type;
}
/**
* Protection Eligibility Type of the Payer
*
* @deprecated Instead use setProtectionEligibilityType
*
* @param string $protection_eligibility_type
* @return $this
*/
public function setProtection_eligibility_type($protection_eligibility_type)
{
$this->protection_eligibility_type = $protection_eligibility_type;
return $this;
}
/**
* Protection Eligibility Type of the Payer
* @deprecated Instead use getProtectionEligibilityType
*
* @return string
*/
public function getProtection_eligibility_type()
{
return $this->protection_eligibility_type;
}
/**
* ID of the Payment resource that this transaction is based on.
*
@@ -390,31 +247,6 @@ class Authorization extends PPModel implements IResource
return $this->parent_payment;
}
/**
* ID of the Payment resource that this transaction is based on.
*
* @deprecated Instead use setParentPayment
*
* @param string $parent_payment
* @return $this
*/
public function setParent_payment($parent_payment)
{
$this->parent_payment = $parent_payment;
return $this;
}
/**
* ID of the Payment resource that this transaction is based on.
* @deprecated Instead use getParentPayment
*
* @return string
*/
public function getParent_payment()
{
return $this->parent_payment;
}
/**
* Expected clearing time for eCheck Transactions
*
@@ -439,31 +271,6 @@ class Authorization extends PPModel implements IResource
return $this->clearing_time;
}
/**
* Expected clearing time for eCheck Transactions
*
* @deprecated Instead use setClearingTime
*
* @param string $clearing_time
* @return $this
*/
public function setClearing_time($clearing_time)
{
$this->clearing_time = $clearing_time;
return $this;
}
/**
* Expected clearing time for eCheck Transactions
* @deprecated Instead use getClearingTime
*
* @return string
*/
public function getClearing_time()
{
return $this->clearing_time;
}
/**
* Date/Time until which funds may be captured against this resource.
*
@@ -488,31 +295,6 @@ class Authorization extends PPModel implements IResource
return $this->valid_until;
}
/**
* Date/Time until which funds may be captured against this resource.
*
* @deprecated Instead use setValidUntil
*
* @param string $valid_until
* @return $this
*/
public function setValid_until($valid_until)
{
$this->valid_until = $valid_until;
return $this;
}
/**
* Date/Time until which funds may be captured against this resource.
* @deprecated Instead use getValidUntil
*
* @return string
*/
public function getValid_until()
{
return $this->valid_until;
}
/**
* Sets Links
*
@@ -552,8 +334,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 +357,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 +378,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 +398,8 @@ class Authorization extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/authorization/{$this->getId()}/reauthorize", "POST", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/authorization/{$this->getId()}/reauthorize", "POST", $payLoad);
$this->fromJson($json);
return $this;
}

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class BankAccount
@@ -37,9 +37,8 @@ use PayPal\Transport\PPRestCall;
* @property string create_time
* @property string update_time
* @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.
@@ -87,31 +86,6 @@ class BankAccount extends ResourceModel
return $this->account_number;
}
/**
* Account number in either IBAN (max length 34) or BBAN (max length 17) format.
*
* @deprecated Instead use setAccountNumber
*
* @param string $account_number
* @return $this
*/
public function setAccount_number($account_number)
{
$this->account_number = $account_number;
return $this;
}
/**
* Account number in either IBAN (max length 34) or BBAN (max length 17) format.
* @deprecated Instead use getAccountNumber
*
* @return string
*/
public function getAccount_number()
{
return $this->account_number;
}
/**
* Type of the bank account number (International or Basic Bank Account Number). For more information refer to http://en.wikipedia.org/wiki/International_Bank_Account_Number.
* Valid Values: ["BBAN", "IBAN"]
@@ -136,31 +110,6 @@ class BankAccount extends ResourceModel
return $this->account_number_type;
}
/**
* Type of the bank account number (International or Basic Bank Account Number). For more information refer to http://en.wikipedia.org/wiki/International_Bank_Account_Number.
*
* @deprecated Instead use setAccountNumberType
*
* @param string $account_number_type
* @return $this
*/
public function setAccount_number_type($account_number_type)
{
$this->account_number_type = $account_number_type;
return $this;
}
/**
* Type of the bank account number (International or Basic Bank Account Number). For more information refer to http://en.wikipedia.org/wiki/International_Bank_Account_Number.
* @deprecated Instead use getAccountNumberType
*
* @return string
*/
public function getAccount_number_type()
{
return $this->account_number_type;
}
/**
* Routing transit number (aka Bank Code) of the bank (typically for domestic use only - for international use, IBAN includes bank code). For more information refer to http://en.wikipedia.org/wiki/Bank_code.
*
@@ -184,31 +133,6 @@ class BankAccount extends ResourceModel
return $this->routing_number;
}
/**
* Routing transit number (aka Bank Code) of the bank (typically for domestic use only - for international use, IBAN includes bank code). For more information refer to http://en.wikipedia.org/wiki/Bank_code.
*
* @deprecated Instead use setRoutingNumber
*
* @param string $routing_number
* @return $this
*/
public function setRouting_number($routing_number)
{
$this->routing_number = $routing_number;
return $this;
}
/**
* Routing transit number (aka Bank Code) of the bank (typically for domestic use only - for international use, IBAN includes bank code). For more information refer to http://en.wikipedia.org/wiki/Bank_code.
* @deprecated Instead use getRoutingNumber
*
* @return string
*/
public function getRouting_number()
{
return $this->routing_number;
}
/**
* Type of the bank account.
* Valid Values: ["CHECKING", "SAVINGS"]
@@ -233,31 +157,6 @@ class BankAccount extends ResourceModel
return $this->account_type;
}
/**
* Type of the bank account.
*
* @deprecated Instead use setAccountType
*
* @param string $account_type
* @return $this
*/
public function setAccount_type($account_type)
{
$this->account_type = $account_type;
return $this;
}
/**
* Type of the bank account.
* @deprecated Instead use getAccountType
*
* @return string
*/
public function getAccount_type()
{
return $this->account_type;
}
/**
* A customer designated name.
*
@@ -281,31 +180,6 @@ class BankAccount extends ResourceModel
return $this->account_name;
}
/**
* A customer designated name.
*
* @deprecated Instead use setAccountName
*
* @param string $account_name
* @return $this
*/
public function setAccount_name($account_name)
{
$this->account_name = $account_name;
return $this;
}
/**
* A customer designated name.
* @deprecated Instead use getAccountName
*
* @return string
*/
public function getAccount_name()
{
return $this->account_name;
}
/**
* Type of the check when this information was obtained through a check by the facilitator or merchant.
* Valid Values: ["PERSONAL", "COMPANY"]
@@ -330,31 +204,6 @@ class BankAccount extends ResourceModel
return $this->check_type;
}
/**
* Type of the check when this information was obtained through a check by the facilitator or merchant.
*
* @deprecated Instead use setCheckType
*
* @param string $check_type
* @return $this
*/
public function setCheck_type($check_type)
{
$this->check_type = $check_type;
return $this;
}
/**
* Type of the check when this information was obtained through a check by the facilitator or merchant.
* @deprecated Instead use getCheckType
*
* @return string
*/
public function getCheck_type()
{
return $this->check_type;
}
/**
* How the check was obtained from the customer, if check was the source of the information provided.
* Valid Values: ["CCD", "PPD", "TEL", "POP", "ARC", "RCK", "WEB"]
@@ -379,31 +228,6 @@ class BankAccount extends ResourceModel
return $this->auth_type;
}
/**
* How the check was obtained from the customer, if check was the source of the information provided.
*
* @deprecated Instead use setAuthType
*
* @param string $auth_type
* @return $this
*/
public function setAuth_type($auth_type)
{
$this->auth_type = $auth_type;
return $this;
}
/**
* How the check was obtained from the customer, if check was the source of the information provided.
* @deprecated Instead use getAuthType
*
* @return string
*/
public function getAuth_type()
{
return $this->auth_type;
}
/**
* Time at which the authorization (or check) was captured. Use this field if the user authorization needs to be captured due to any privacy requirements.
*
@@ -427,31 +251,6 @@ class BankAccount extends ResourceModel
return $this->auth_capture_timestamp;
}
/**
* Time at which the authorization (or check) was captured. Use this field if the user authorization needs to be captured due to any privacy requirements.
*
* @deprecated Instead use setAuthCaptureTimestamp
*
* @param string $auth_capture_timestamp
* @return $this
*/
public function setAuth_capture_timestamp($auth_capture_timestamp)
{
$this->auth_capture_timestamp = $auth_capture_timestamp;
return $this;
}
/**
* Time at which the authorization (or check) was captured. Use this field if the user authorization needs to be captured due to any privacy requirements.
* @deprecated Instead use getAuthCaptureTimestamp
*
* @return string
*/
public function getAuth_capture_timestamp()
{
return $this->auth_capture_timestamp;
}
/**
* Name of the bank.
*
@@ -475,31 +274,6 @@ class BankAccount extends ResourceModel
return $this->bank_name;
}
/**
* Name of the bank.
*
* @deprecated Instead use setBankName
*
* @param string $bank_name
* @return $this
*/
public function setBank_name($bank_name)
{
$this->bank_name = $bank_name;
return $this;
}
/**
* Name of the bank.
* @deprecated Instead use getBankName
*
* @return string
*/
public function getBank_name()
{
return $this->bank_name;
}
/**
* 2 letter country code of the Bank.
*
@@ -523,31 +297,6 @@ class BankAccount extends ResourceModel
return $this->country_code;
}
/**
* 2 letter country code of the Bank.
*
* @deprecated Instead use setCountryCode
*
* @param string $country_code
* @return $this
*/
public function setCountry_code($country_code)
{
$this->country_code = $country_code;
return $this;
}
/**
* 2 letter country code of the Bank.
* @deprecated Instead use getCountryCode
*
* @return string
*/
public function getCountry_code()
{
return $this->country_code;
}
/**
* Account holder's first name.
*
@@ -571,31 +320,6 @@ class BankAccount extends ResourceModel
return $this->first_name;
}
/**
* Account holder's first name.
*
* @deprecated Instead use setFirstName
*
* @param string $first_name
* @return $this
*/
public function setFirst_name($first_name)
{
$this->first_name = $first_name;
return $this;
}
/**
* Account holder's first name.
* @deprecated Instead use getFirstName
*
* @return string
*/
public function getFirst_name()
{
return $this->first_name;
}
/**
* Account holder's last name.
*
@@ -619,31 +343,6 @@ class BankAccount extends ResourceModel
return $this->last_name;
}
/**
* Account holder's last name.
*
* @deprecated Instead use setLastName
*
* @param string $last_name
* @return $this
*/
public function setLast_name($last_name)
{
$this->last_name = $last_name;
return $this;
}
/**
* Account holder's last name.
* @deprecated Instead use getLastName
*
* @return string
*/
public function getLast_name()
{
return $this->last_name;
}
/**
* Birth date of the bank account holder.
*
@@ -667,31 +366,6 @@ class BankAccount extends ResourceModel
return $this->birth_date;
}
/**
* Birth date of the bank account holder.
*
* @deprecated Instead use setBirthDate
*
* @param string $birth_date
* @return $this
*/
public function setBirth_date($birth_date)
{
$this->birth_date = $birth_date;
return $this;
}
/**
* Birth date of the bank account holder.
* @deprecated Instead use getBirthDate
*
* @return string
*/
public function getBirth_date()
{
return $this->birth_date;
}
/**
* Billing address.
*
@@ -715,31 +389,6 @@ class BankAccount extends ResourceModel
return $this->billing_address;
}
/**
* Billing address.
*
* @deprecated Instead use setBillingAddress
*
* @param \PayPal\Api\Address $billing_address
* @return $this
*/
public function setBilling_address($billing_address)
{
$this->billing_address = $billing_address;
return $this;
}
/**
* Billing address.
* @deprecated Instead use getBillingAddress
*
* @return \PayPal\Api\Address
*/
public function getBilling_address()
{
return $this->billing_address;
}
/**
* State of this funding instrument.
* Valid Values: ["ACTIVE", "INACTIVE", "DELETED"]
@@ -788,31 +437,6 @@ class BankAccount extends ResourceModel
return $this->confirmation_status;
}
/**
* Confirmation status of a bank account.
*
* @deprecated Instead use setConfirmationStatus
*
* @param string $confirmation_status
* @return $this
*/
public function setConfirmation_status($confirmation_status)
{
$this->confirmation_status = $confirmation_status;
return $this;
}
/**
* Confirmation status of a bank account.
* @deprecated Instead use getConfirmationStatus
*
* @return string
*/
public function getConfirmation_status()
{
return $this->confirmation_status;
}
/**
* Deprecated - Use external_customer_id instead.
*
@@ -836,31 +460,6 @@ class BankAccount extends ResourceModel
return $this->payer_id;
}
/**
* Deprecated - Use external_customer_id instead.
*
* @deprecated Instead use setPayerId
*
* @param string $payer_id
* @return $this
*/
public function setPayer_id($payer_id)
{
$this->payer_id = $payer_id;
return $this;
}
/**
* Deprecated - Use external_customer_id instead.
* @deprecated Instead use getPayerId
*
* @return string
*/
public function getPayer_id()
{
return $this->payer_id;
}
/**
* A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
*
@@ -884,30 +483,6 @@ class BankAccount extends ResourceModel
return $this->external_customer_id;
}
/**
* A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
*
* @deprecated Instead use setExternalCustomerId
*
* @param string $external_customer_id
* @return $this
*/
public function setExternal_customer_id($external_customer_id)
{
$this->external_customer_id = $external_customer_id;
return $this;
}
/**
* A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
* @deprecated Instead use getExternalCustomerId
*
* @return string
*/
public function getExternal_customer_id()
{
return $this->external_customer_id;
}
/**
* A unique identifier of the merchant for which this bank account has been stored for. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchnt.
@@ -932,31 +507,6 @@ class BankAccount extends ResourceModel
return $this->merchant_id;
}
/**
* A unique identifier of the merchant for which this bank account has been stored for. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchnt.
*
* @deprecated Instead use setMerchantId
*
* @param string $merchant_id
* @return $this
*/
public function setMerchant_id($merchant_id)
{
$this->merchant_id = $merchant_id;
return $this;
}
/**
* A unique identifier of the merchant for which this bank account has been stored for. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchnt.
* @deprecated Instead use getMerchantId
*
* @return string
*/
public function getMerchant_id()
{
return $this->merchant_id;
}
/**
* Time the resource was created.
*
@@ -980,31 +530,6 @@ class BankAccount extends ResourceModel
return $this->create_time;
}
/**
* Time the resource was created.
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Time the resource was created.
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Time the resource was last updated.
*
@@ -1028,31 +553,6 @@ class BankAccount extends ResourceModel
return $this->update_time;
}
/**
* Time the resource was last updated.
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Time the resource was last updated.
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Date/Time until this resource can be used to fund a payment.
*
@@ -1076,89 +576,11 @@ class BankAccount extends ResourceModel
return $this->valid_until;
}
/**
* Date/Time until this resource can be used to fund a payment.
*
* @deprecated Instead use setValidUntil
*
* @param string $valid_until
* @return $this
*/
public function setValid_until($valid_until)
{
$this->valid_until = $valid_until;
return $this;
}
/**
* Date/Time until this resource can be used to fund a payment.
* @deprecated Instead use getValidUntil
*
* @return string
*/
public function getValid_until()
{
return $this->valid_until;
}
/**
* Sets Links
*
* @param \PayPal\Api\Links[] $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
/**
* Append Links to the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function addLink($links)
{
if (!$this->getLinks()) {
return $this->setLinks(array($links));
} else {
return $this->setLinks(
array_merge($this->getLinks(), array($links))
);
}
}
/**
* Remove Links from the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function removeLink($links)
{
return $this->setLinks(
array_diff($this->getLinks(), array($links))
);
}
/**
* 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 +603,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 +627,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 +650,7 @@ class BankAccount extends ResourceModel
*
* @param PatchRequest $patchRequest
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return BankAccount
*/
public function update($patchRequest, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class BankAccountsList
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int count
* @property string next_id
*/
class BankAccountsList extends PPModel
class BankAccountsList extends PayPalModel
{
/**
* A list of bank account resources
@@ -70,31 +70,6 @@ class BankAccountsList extends PPModel
);
}
/**
* A list of bank account resources
*
* @deprecated Instead use setBankAccounts
*
* @param \PayPal\Api\BankAccount $bank-accounts
* @return $this
*/
public function setBank_accounts($bank_accounts)
{
$this->{"bank-accounts"} = $bank_accounts;
return $this;
}
/**
* A list of bank account resources
* @deprecated Instead use getBankAccounts
*
* @return \PayPal\Api\BankAccount
*/
public function getBank_accounts()
{
return $this->{"bank-accounts"};
}
/**
* Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
*
@@ -141,29 +116,4 @@ class BankAccountsList extends PPModel
return $this->next_id;
}
/**
* Identifier of the next element to get the next range of results.
*
* @deprecated Instead use setNextId
*
* @param string $next_id
* @return $this
*/
public function setNext_id($next_id)
{
$this->next_id = $next_id;
return $this;
}
/**
* Identifier of the next element to get the next range of results.
* @deprecated Instead use getNextId
*
* @return string
*/
public function getNext_id()
{
return $this->next_id;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class BankToken
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string external_customer_id
* @property string mandate_reference_number
*/
class BankToken extends PPModel
class BankToken extends PayPalModel
{
/**
* ID of a previously saved Bank resource using /vault/bank API.
@@ -40,31 +40,6 @@ class BankToken extends PPModel
return $this->bank_id;
}
/**
* ID of a previously saved Bank resource using /vault/bank API.
*
* @deprecated Instead use setBankId
*
* @param string $bank_id
* @return $this
*/
public function setBank_id($bank_id)
{
$this->bank_id = $bank_id;
return $this;
}
/**
* ID of a previously saved Bank resource using /vault/bank API.
* @deprecated Instead use getBankId
*
* @return string
*/
public function getBank_id()
{
return $this->bank_id;
}
/**
* The unique identifier of the payer used when saving this bank using /vault/bank API.
*
@@ -88,31 +63,6 @@ class BankToken extends PPModel
return $this->external_customer_id;
}
/**
* The unique identifier of the payer used when saving this bank using /vault/bank API.
*
* @deprecated Instead use setExternalCustomerId
*
* @param string $external_customer_id
* @return $this
*/
public function setExternal_customer_id($external_customer_id)
{
$this->external_customer_id = $external_customer_id;
return $this;
}
/**
* The unique identifier of the payer used when saving this bank using /vault/bank API.
* @deprecated Instead use getExternalCustomerId
*
* @return string
*/
public function getExternal_customer_id()
{
return $this->external_customer_id;
}
/**
* Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA).
*
@@ -136,29 +86,4 @@ class BankToken extends PPModel
return $this->mandate_reference_number;
}
/**
* Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA).
*
* @deprecated Instead use setMandateReferenceNumber
*
* @param string $mandate_reference_number
* @return $this
*/
public function setMandate_reference_number($mandate_reference_number)
{
$this->mandate_reference_number = $mandate_reference_number;
return $this;
}
/**
* Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA).
* @deprecated Instead use getMandateReferenceNumber
*
* @return string
*/
public function getMandate_reference_number()
{
return $this->mandate_reference_number;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class BaseAddress
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string postal_code
* @property string state
*/
class BaseAddress extends PPModel
class BaseAddress extends PayPalModel
{
/**
* Line 1 of the Address (eg. number, street, etc).
@@ -112,31 +112,6 @@ class BaseAddress extends PPModel
return $this->country_code;
}
/**
* 2 letter country code.
*
* @deprecated Instead use setCountryCode
*
* @param string $country_code
* @return $this
*/
public function setCountry_code($country_code)
{
$this->country_code = $country_code;
return $this;
}
/**
* 2 letter country code.
* @deprecated Instead use getCountryCode
*
* @return string
*/
public function getCountry_code()
{
return $this->country_code;
}
/**
* Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
*
@@ -160,31 +135,6 @@ class BaseAddress extends PPModel
return $this->postal_code;
}
/**
* Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
*
* @deprecated Instead use setPostalCode
*
* @param string $postal_code
* @return $this
*/
public function setPostal_code($postal_code)
{
$this->postal_code = $postal_code;
return $this;
}
/**
* Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
* @deprecated Instead use getPostalCode
*
* @return string
*/
public function getPostal_code()
{
return $this->postal_code;
}
/**
* 2 letter code for US states, and the equivalent for other countries.
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class BillingInfo
@@ -21,7 +21,7 @@ use PayPal\Common\PPModel;
* @property string notification_channel
* @property \PayPal\Api\Phone phone
*/
class BillingInfo extends PPModel
class BillingInfo extends PayPalModel
{
/**
* Email address of the invoice recipient. 260 characters max.
@@ -69,31 +69,6 @@ class BillingInfo extends PPModel
return $this->first_name;
}
/**
* First name of the invoice recipient. 30 characters max.
*
* @deprecated Instead use setFirstName
*
* @param string $first_name
* @return $this
*/
public function setFirst_name($first_name)
{
$this->first_name = $first_name;
return $this;
}
/**
* First name of the invoice recipient. 30 characters max.
* @deprecated Instead use getFirstName
*
* @return string
*/
public function getFirst_name()
{
return $this->first_name;
}
/**
* Last name of the invoice recipient. 30 characters max.
*
@@ -117,31 +92,6 @@ class BillingInfo extends PPModel
return $this->last_name;
}
/**
* Last name of the invoice recipient. 30 characters max.
*
* @deprecated Instead use setLastName
*
* @param string $last_name
* @return $this
*/
public function setLast_name($last_name)
{
$this->last_name = $last_name;
return $this;
}
/**
* Last name of the invoice recipient. 30 characters max.
* @deprecated Instead use getLastName
*
* @return string
*/
public function getLast_name()
{
return $this->last_name;
}
/**
* Company business name of the invoice recipient. 100 characters max.
*
@@ -165,31 +115,6 @@ class BillingInfo extends PPModel
return $this->business_name;
}
/**
* Company business name of the invoice recipient. 100 characters max.
*
* @deprecated Instead use setBusinessName
*
* @param string $business_name
* @return $this
*/
public function setBusiness_name($business_name)
{
$this->business_name = $business_name;
return $this;
}
/**
* Company business name of the invoice recipient. 100 characters max.
* @deprecated Instead use getBusinessName
*
* @return string
*/
public function getBusiness_name()
{
return $this->business_name;
}
/**
* Address of the invoice recipient.
*
@@ -260,31 +185,6 @@ class BillingInfo extends PPModel
return $this->additional_info;
}
/**
* Option to display additional information such as business hours. 40 characters max.
*
* @deprecated Instead use setAdditionalInfo
*
* @param string $additional_info
* @return $this
*/
public function setAdditional_info($additional_info)
{
$this->additional_info = $additional_info;
return $this;
}
/**
* Option to display additional information such as business hours. 40 characters max.
* @deprecated Instead use getAdditionalInfo
*
* @return string
*/
public function getAdditional_info()
{
return $this->additional_info;
}
/**
* Preferred notification channel of the payer. Email by default.
* Valid Values: ["SMS", "EMAIL"]
@@ -309,31 +209,6 @@ class BillingInfo extends PPModel
return $this->notification_channel;
}
/**
* Preferred notification channel of the payer. Email by default.
*
* @deprecated Instead use setNotificationChannel
*
* @param string $notification_channel
* @return $this
*/
public function setNotification_channel($notification_channel)
{
$this->notification_channel = $notification_channel;
return $this;
}
/**
* Preferred notification channel of the payer. Email by default.
* @deprecated Instead use getNotificationChannel
*
* @return string
*/
public function getNotification_channel()
{
return $this->notification_channel;
}
/**
* Mobile Phone number of the recipient to which SMS will be sent if notification_channel is SMS.
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class CancelNotification
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property bool send_to_merchant
* @property bool send_to_payer
*/
class CancelNotification extends PPModel
class CancelNotification extends PayPalModel
{
/**
* Subject of the notification.
@@ -87,31 +87,6 @@ class CancelNotification extends PPModel
return $this->send_to_merchant;
}
/**
* A flag indicating whether a copy of the email has to be sent to the merchant.
*
* @deprecated Instead use setSendToMerchant
*
* @param bool $send_to_merchant
* @return $this
*/
public function setSend_to_merchant($send_to_merchant)
{
$this->send_to_merchant = $send_to_merchant;
return $this;
}
/**
* A flag indicating whether a copy of the email has to be sent to the merchant.
* @deprecated Instead use getSendToMerchant
*
* @return bool
*/
public function getSend_to_merchant()
{
return $this->send_to_merchant;
}
/**
* A flag indicating whether a copy of the email has to be sent to the payer.
*
@@ -135,29 +110,4 @@ class CancelNotification extends PPModel
return $this->send_to_payer;
}
/**
* A flag indicating whether a copy of the email has to be sent to the payer.
*
* @deprecated Instead use setSendToPayer
*
* @param bool $send_to_payer
* @return $this
*/
public function setSend_to_payer($send_to_payer)
{
$this->send_to_payer = $send_to_payer;
return $this;
}
/**
* A flag indicating whether a copy of the email has to be sent to the payer.
* @deprecated Instead use getSendToPayer
*
* @return bool
*/
public function getSend_to_payer()
{
return $this->send_to_payer;
}
}

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\Refund;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -25,26 +25,8 @@ 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
*
* @var \PayPal\Auth\OAuthTokenCredential $credential
*/
protected static $credential;
/**
* Sets Credential
*
* @deprecated Pass ApiContext to create/get methods instead
* @param \PayPal\Auth\OAuthTokenCredential $credential
*/
public static function setCredential($credential)
{
self::$credential = $credential;
}
/**
* Identifier of the Capture transaction.
*
@@ -93,31 +75,6 @@ class Capture extends PPModel implements IResource
return $this->create_time;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Time the resource was created in UTC ISO8601 format.
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
@@ -142,31 +99,6 @@ class Capture extends PPModel implements IResource
return $this->update_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Amount being captured. If no amount is specified, amount is used from the authorization being captured. If amount is same as the amount that's authorized for, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured. Alternatively, you could indicate a final capture by seting the is_final_capture flag to true.
*
@@ -215,31 +147,6 @@ class Capture extends PPModel implements IResource
return $this->is_final_capture;
}
/**
* whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
*
* @deprecated Instead use setIsFinalCapture
*
* @param bool $is_final_capture
* @return $this
*/
public function setIs_final_capture($is_final_capture)
{
$this->is_final_capture = $is_final_capture;
return $this;
}
/**
* whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
* @deprecated Instead use getIsFinalCapture
*
* @return bool
*/
public function getIs_final_capture()
{
return $this->is_final_capture;
}
/**
* State of the capture transaction.
* Valid Values: ["pending", "completed", "refunded", "partially_refunded"]
@@ -288,31 +195,6 @@ class Capture extends PPModel implements IResource
return $this->parent_payment;
}
/**
* ID of the Payment resource that this transaction is based on.
*
* @deprecated Instead use setParentPayment
*
* @param string $parent_payment
* @return $this
*/
public function setParent_payment($parent_payment)
{
$this->parent_payment = $parent_payment;
return $this;
}
/**
* ID of the Payment resource that this transaction is based on.
* @deprecated Instead use getParentPayment
*
* @return string
*/
public function getParent_payment()
{
return $this->parent_payment;
}
/**
* Sets Links
*
@@ -352,8 +234,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 +257,8 @@ class Capture extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/capture/{$this->getId()}/refund", "POST", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/capture/{$this->getId()}/refund", "POST", $payLoad);
$ret = new Refund();
$ret->fromJson($json);
return $ret;

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property string carrier_account_id
* @property string external_customer_id
*/
class CarrierAccountToken extends PPModel
class CarrierAccountToken extends PayPalModel
{
/**
* ID of a previously saved carrier account resource.
@@ -41,31 +41,6 @@ class CarrierAccountToken extends PPModel
return $this->carrier_account_id;
}
/**
* ID of a previously saved carrier account resource.
*
* @deprecated Instead use setCarrierAccountId
*
* @param string $carrier_account_id
* @return $this
*/
public function setCarrier_account_id($carrier_account_id)
{
$this->carrier_account_id = $carrier_account_id;
return $this;
}
/**
* ID of a previously saved carrier account resource.
* @deprecated Instead use getCarrierAccountId
*
* @return string
*/
public function getCarrier_account_id()
{
return $this->carrier_account_id;
}
/**
* The unique identifier of the payer used when saving this carrier account instrument.
*
@@ -89,29 +64,4 @@ class CarrierAccountToken extends PPModel
return $this->external_customer_id;
}
/**
* The unique identifier of the payer used when saving this carrier account instrument.
*
* @deprecated Instead use setExternalCustomerId
*
* @param string $external_customer_id
* @return $this
*/
public function setExternal_customer_id($external_customer_id)
{
$this->external_customer_id = $external_customer_id;
return $this;
}
/**
* The unique identifier of the payer used when saving this carrier account instrument.
* @deprecated Instead use getExternalCustomerId
*
* @return string
*/
public function getExternal_customer_id()
{
return $this->external_customer_id;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -22,7 +22,7 @@ use PayPal\Rest\ApiContext;
* @property \PayPal\Api\PaymentOptions payment_options
* @property \PayPal\Api\ItemList item_list
*/
class CartBase extends PPModel
class CartBase extends PayPalModel
{
/**
* Amount being collected.
@@ -120,31 +120,6 @@ class CartBase extends PPModel
return $this->note_to_payee;
}
/**
* Note to the recipient of the funds in this transaction.
*
* @deprecated Instead use setNoteToPayee
*
* @param string $note_to_payee
* @return $this
*/
public function setNote_to_payee($note_to_payee)
{
$this->note_to_payee = $note_to_payee;
return $this;
}
/**
* Note to the recipient of the funds in this transaction.
* @deprecated Instead use getNoteToPayee
*
* @return string
*/
public function getNote_to_payee()
{
return $this->note_to_payee;
}
/**
* free-form field for the use of clients
*
@@ -193,31 +168,6 @@ class CartBase extends PPModel
return $this->invoice_number;
}
/**
* invoice number to track this payment
*
* @deprecated Instead use setInvoiceNumber
*
* @param string $invoice_number
* @return $this
*/
public function setInvoice_number($invoice_number)
{
$this->invoice_number = $invoice_number;
return $this;
}
/**
* invoice number to track this payment
* @deprecated Instead use getInvoiceNumber
*
* @return string
*/
public function getInvoice_number()
{
return $this->invoice_number;
}
/**
* Soft descriptor used when charging this funding source.
*
@@ -242,31 +192,6 @@ class CartBase extends PPModel
return $this->soft_descriptor;
}
/**
* Soft descriptor used when charging this funding source.
*
* @deprecated Instead use setSoftDescriptor
*
* @param string $soft_descriptor
* @return $this
*/
public function setSoft_descriptor($soft_descriptor)
{
$this->soft_descriptor = $soft_descriptor;
return $this;
}
/**
* Soft descriptor used when charging this funding source.
* @deprecated Instead use getSoftDescriptor
*
* @return string
*/
public function getSoft_descriptor()
{
return $this->soft_descriptor;
}
/**
* Payment options requested for this purchase unit
*
@@ -291,31 +216,6 @@ class CartBase extends PPModel
return $this->payment_options;
}
/**
* Payment options requested for this purchase unit
*
* @deprecated Instead use setPaymentOptions
*
* @param \PayPal\Api\PaymentOptions $payment_options
* @return $this
*/
public function setPayment_options($payment_options)
{
$this->payment_options = $payment_options;
return $this;
}
/**
* Payment options requested for this purchase unit
* @deprecated Instead use getPaymentOptions
*
* @return \PayPal\Api\PaymentOptions
*/
public function getPayment_options()
{
return $this->payment_options;
}
/**
* List of items being paid for.
*
@@ -340,29 +240,4 @@ class CartBase extends PPModel
return $this->item_list;
}
/**
* List of items being paid for.
*
* @deprecated Instead use setItemList
*
* @param \PayPal\Api\ItemList $item_list
* @return $this
*/
public function setItem_list($item_list)
{
$this->item_list = $item_list;
return $this;
}
/**
* List of items being paid for.
* @deprecated Instead use getItemList
*
* @return \PayPal\Api\ItemList
*/
public function getItem_list()
{
return $this->item_list;
}
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class CreditCard
@@ -28,9 +28,8 @@ use PayPal\Transport\PPRestCall;
* @property string valid_until
* @property string create_time
* @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.
@@ -124,31 +123,6 @@ class CreditCard extends ResourceModel
return $this->expire_month;
}
/**
* 2 digit card expiry month.
*
* @deprecated Instead use setExpireMonth
*
* @param int $expire_month
* @return $this
*/
public function setExpire_month($expire_month)
{
$this->expire_month = $expire_month;
return $this;
}
/**
* 2 digit card expiry month.
* @deprecated Instead use getExpireMonth
*
* @return int
*/
public function getExpire_month()
{
return $this->expire_month;
}
/**
* 4 digit card expiry year
*
@@ -172,31 +146,6 @@ class CreditCard extends ResourceModel
return $this->expire_year;
}
/**
* 4 digit card expiry year
*
* @deprecated Instead use setExpireYear
*
* @param int $expire_year
* @return $this
*/
public function setExpire_year($expire_year)
{
$this->expire_year = $expire_year;
return $this;
}
/**
* 4 digit card expiry year
* @deprecated Instead use getExpireYear
*
* @return int
*/
public function getExpire_year()
{
return $this->expire_year;
}
/**
* Card validation code. Only supported when making a Payment but not when saving a credit card for future use.
*
@@ -243,31 +192,6 @@ class CreditCard extends ResourceModel
return $this->first_name;
}
/**
* Card holder's first name.
*
* @deprecated Instead use setFirstName
*
* @param string $first_name
* @return $this
*/
public function setFirst_name($first_name)
{
$this->first_name = $first_name;
return $this;
}
/**
* Card holder's first name.
* @deprecated Instead use getFirstName
*
* @return string
*/
public function getFirst_name()
{
return $this->first_name;
}
/**
* Card holder's last name.
*
@@ -291,31 +215,6 @@ class CreditCard extends ResourceModel
return $this->last_name;
}
/**
* Card holder's last name.
*
* @deprecated Instead use setLastName
*
* @param string $last_name
* @return $this
*/
public function setLast_name($last_name)
{
$this->last_name = $last_name;
return $this;
}
/**
* Card holder's last name.
* @deprecated Instead use getLastName
*
* @return string
*/
public function getLast_name()
{
return $this->last_name;
}
/**
* Billing Address associated with this card.
*
@@ -339,31 +238,6 @@ class CreditCard extends ResourceModel
return $this->billing_address;
}
/**
* Billing Address associated with this card.
*
* @deprecated Instead use setBillingAddress
*
* @param \PayPal\Api\Address $billing_address
* @return $this
*/
public function setBilling_address($billing_address)
{
$this->billing_address = $billing_address;
return $this;
}
/**
* Billing Address associated with this card.
* @deprecated Instead use getBillingAddress
*
* @return \PayPal\Api\Address
*/
public function getBilling_address()
{
return $this->billing_address;
}
/**
* A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
*
@@ -387,31 +261,6 @@ class CreditCard extends ResourceModel
return $this->external_customer_id;
}
/**
* A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
*
* @deprecated Instead use setExternalCustomerId
*
* @param string $external_customer_id
* @return $this
*/
public function setExternal_customer_id($external_customer_id)
{
$this->external_customer_id = $external_customer_id;
return $this;
}
/**
* A unique identifier of the customer to whom this bank account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
* @deprecated Instead use getExternalCustomerId
*
* @return string
*/
public function getExternal_customer_id()
{
return $this->external_customer_id;
}
/**
* State of the funding instrument.
* Valid Values: ["expired", "ok"]
@@ -459,31 +308,6 @@ class CreditCard extends ResourceModel
return $this->valid_until;
}
/**
* Date/Time until this resource can be used fund a payment.
*
* @deprecated Instead use setValidUntil
*
* @param string $valid_until
* @return $this
*/
public function setValid_until($valid_until)
{
$this->valid_until = $valid_until;
return $this;
}
/**
* Date/Time until this resource can be used fund a payment.
* @deprecated Instead use getValidUntil
*
* @return string
*/
public function getValid_until()
{
return $this->valid_until;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
@@ -507,31 +331,6 @@ class CreditCard extends ResourceModel
return $this->create_time;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Time the resource was created in UTC ISO8601 format.
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
@@ -555,89 +354,11 @@ class CreditCard extends ResourceModel
return $this->update_time;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Time the resource was created in UTC ISO8601 format.
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Sets Links
*
* @param \PayPal\Api\Links[] $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
/**
* Append Links to the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function addLink($links)
{
if (!$this->getLinks()) {
return $this->setLinks(array($links));
} else {
return $this->setLinks(
array_merge($this->getLinks(), array($links))
);
}
}
/**
* Remove Links from the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function removeLink($links)
{
return $this->setLinks(
array_diff($this->getLinks(), array($links))
);
}
/**
* 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 +381,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 +405,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 +427,7 @@ class CreditCard extends ResourceModel
* Update information in a previously saved card. Only the modified fields need to be passed in the request.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return CreditCard
*/
public function update($apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property int count
* @property string next_id
*/
class CreditCardHistory extends PPModel
class CreditCardHistory extends PayPalModel
{
/**
* A list of credit card resources
@@ -42,31 +42,6 @@ class CreditCardHistory extends PPModel
return $this->{"credit-cards"};
}
/**
* A list of credit card resources
*
* @deprecated Instead use setCreditCards
*
* @param \PayPal\Api\CreditCard $credit-cards
* @return $this
*/
public function setCredit_cards($credit_cards)
{
$this->{"credit-cards"} = $credit_cards;
return $this;
}
/**
* A list of credit card resources
* @deprecated Instead use getCreditCards
*
* @return \PayPal\Api\CreditCard
*/
public function getCredit_cards()
{
return $this->{"credit-cards"};
}
/**
* Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
*
@@ -115,29 +90,4 @@ class CreditCardHistory extends PPModel
return $this->next_id;
}
/**
* Identifier of the next element to get the next range of results.
*
* @deprecated Instead use setNextId
*
* @param string $next_id
* @return $this
*/
public function setNext_id($next_id)
{
$this->next_id = $next_id;
return $this;
}
/**
* Identifier of the next element to get the next range of results.
* @deprecated Instead use getNextId
*
* @return string
*/
public function getNext_id()
{
return $this->next_id;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class CreditCardList
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int count
* @property string next_id
*/
class CreditCardList extends PPModel
class CreditCardList extends PayPalModel
{
/**
* A list of credit card resources
@@ -70,31 +70,6 @@ class CreditCardList extends PPModel
);
}
/**
* A list of credit card resources
*
* @deprecated Instead use setCreditCards
*
* @param \PayPal\Api\CreditCard $credit-cards
* @return $this
*/
public function setCredit_cards($credit_cards)
{
$this->{"credit-cards"} = $credit_cards;
return $this;
}
/**
* A list of credit card resources
* @deprecated Instead use getCreditCards
*
* @return \PayPal\Api\CreditCard
*/
public function getCredit_cards()
{
return $this->{"credit-cards"};
}
/**
* Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
*
@@ -141,29 +116,4 @@ class CreditCardList extends PPModel
return $this->next_id;
}
/**
* Identifier of the next element to get the next range of results.
*
* @deprecated Instead use setNextId
*
* @param string $next_id
* @return $this
*/
public function setNext_id($next_id)
{
$this->next_id = $next_id;
return $this;
}
/**
* Identifier of the next element to get the next range of results.
* @deprecated Instead use getNextId
*
* @return string
*/
public function getNext_id()
{
return $this->next_id;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class CreditCardToken
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property int expire_month
* @property int expire_year
*/
class CreditCardToken extends PPModel
class CreditCardToken extends PayPalModel
{
/**
* ID of a previously saved Credit Card resource using /vault/credit-card API.
@@ -43,31 +43,6 @@ class CreditCardToken extends PPModel
return $this->credit_card_id;
}
/**
* ID of a previously saved Credit Card resource using /vault/credit-card API.
*
* @deprecated Instead use setCreditCardId
*
* @param string $credit_card_id
* @return $this
*/
public function setCredit_card_id($credit_card_id)
{
$this->credit_card_id = $credit_card_id;
return $this;
}
/**
* ID of a previously saved Credit Card resource using /vault/credit-card API.
* @deprecated Instead use getCreditCardId
*
* @return string
*/
public function getCredit_card_id()
{
return $this->credit_card_id;
}
/**
* The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
*
@@ -91,31 +66,6 @@ class CreditCardToken extends PPModel
return $this->payer_id;
}
/**
* The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
*
* @deprecated Instead use setPayerId
*
* @param string $payer_id
* @return $this
*/
public function setPayer_id($payer_id)
{
$this->payer_id = $payer_id;
return $this;
}
/**
* The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
* @deprecated Instead use getPayerId
*
* @return string
*/
public function getPayer_id()
{
return $this->payer_id;
}
/**
* Last 4 digits of the card number from the saved card.
*
@@ -185,31 +135,6 @@ class CreditCardToken extends PPModel
return $this->expire_month;
}
/**
* Expiry month from the saved card, represented as 1 - 12.
*
* @deprecated Instead use setExpireMonth
*
* @param int $expire_month
* @return $this
*/
public function setExpire_month($expire_month)
{
$this->expire_month = $expire_month;
return $this;
}
/**
* Expiry month from the saved card, represented as 1 - 12.
* @deprecated Instead use getExpireMonth
*
* @return int
*/
public function getExpire_month()
{
return $this->expire_month;
}
/**
* Expiry year from the saved card, represented as YYYY format.
*
@@ -233,29 +158,4 @@ class CreditCardToken extends PPModel
return $this->expire_year;
}
/**
* Expiry year from the saved card, represented as YYYY format.
*
* @deprecated Instead use setExpireYear
*
* @param int $expire_year
* @return $this
*/
public function setExpire_year($expire_year)
{
$this->expire_year = $expire_year;
return $this;
}
/**
* Expiry year from the saved card, represented as YYYY format.
* @deprecated Instead use getExpireYear
*
* @return int
*/
public function getExpire_year()
{
return $this->expire_year;
}
}

View File

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

View File

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

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\NumericValidator;
use PayPal\Common\FormatConverter;
use PayPal\Converter\FormatConverter;
/**
* Class Details
@@ -23,7 +23,7 @@ use PayPal\Common\FormatConverter;
* @property string handling_fee
* @property string gift_wrap
*/
class Details extends PPModel
class Details extends PayPalModel
{
/**
* Amount being charged for shipping.
@@ -156,31 +156,6 @@ class Details extends PPModel
return $this->shipping_discount;
}
/**
* Amount being charged as shipping discount.
*
* @deprecated Instead use setShippingDiscount
*
* @param string $shipping_discount
* @return $this
*/
public function setShipping_discount($shipping_discount)
{
$this->shipping_discount = $shipping_discount;
return $this;
}
/**
* Amount being charged as shipping discount.
* @deprecated Instead use getShippingDiscount
*
* @return string
*/
public function getShipping_discount()
{
return $this->shipping_discount;
}
/**
* Amount being charged as insurance.
*
@@ -233,31 +208,6 @@ class Details extends PPModel
return $this->handling_fee;
}
/**
* Amount being charged as handling fee.
*
* @deprecated Instead use setHandlingFee
*
* @param string $handling_fee
* @return $this
*/
public function setHandling_fee($handling_fee)
{
$this->handling_fee = $handling_fee;
return $this;
}
/**
* Amount being charged as handling fee.
* @deprecated Instead use getHandlingFee
*
* @return string
*/
public function getHandling_fee()
{
return $this->handling_fee;
}
/**
* Amount being charged as gift wrap fee.
*
@@ -283,29 +233,4 @@ class Details extends PPModel
return $this->gift_wrap;
}
/**
* Amount being charged as gift wrap fee.
*
* @deprecated Instead use setGiftWrap
*
* @param string $gift_wrap
* @return $this
*/
public function setGift_wrap($gift_wrap)
{
$this->gift_wrap = $gift_wrap;
return $this;
}
/**
* Amount being charged as gift wrap fee.
* @deprecated Instead use getGiftWrap
*
* @return string
*/
public function getGift_wrap()
{
return $this->gift_wrap;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Error
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\ErrorDetails[] details
* @property \PayPal\Api\Links[] links
*/
class Error extends PPModel
class Error extends PayPalModel
{
/**
* Human readable, unique name of the error.
@@ -66,31 +66,6 @@ class Error extends PPModel
return $this->debug_id;
}
/**
* PayPal internal identifier used for correlation purposes.
*
* @deprecated Instead use setDebugId
*
* @param string $debug_id
* @return $this
*/
public function setDebug_id($debug_id)
{
$this->debug_id = $debug_id;
return $this;
}
/**
* PayPal internal identifier used for correlation purposes.
* @deprecated Instead use getDebugId
*
* @return string
*/
public function getDebug_id()
{
return $this->debug_id;
}
/**
* Message describing the error.
*
@@ -137,31 +112,6 @@ class Error extends PPModel
return $this->information_link;
}
/**
* URI for detailed information related to this error for the developer.
*
* @deprecated Instead use setInformationLink
*
* @param string $information_link
* @return $this
*/
public function setInformation_link($information_link)
{
$this->information_link = $information_link;
return $this;
}
/**
* URI for detailed information related to this error for the developer.
* @deprecated Instead use getInformationLink
*
* @return string
*/
public function getInformation_link()
{
return $this->information_link;
}
/**
* Additional details of the error
*

View File

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

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class ExtendedBankAccount
@@ -38,29 +38,4 @@ class ExtendedBankAccount extends BankAccount
return $this->mandate_reference_number;
}
/**
* Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA).
*
* @deprecated Instead use setMandateReferenceNumber
*
* @param string $mandate_reference_number
* @return $this
*/
public function setMandate_reference_number($mandate_reference_number)
{
$this->mandate_reference_number = $mandate_reference_number;
return $this;
}
/**
* Identifier of the direct debit mandate to validate. Currently supported only for EU bank accounts(SEPA).
* @deprecated Instead use getMandateReferenceNumber
*
* @return string
*/
public function getMandate_reference_number()
{
return $this->mandate_reference_number;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -15,7 +15,7 @@ use PayPal\Validation\UrlValidator;
* @property string landing_page_type
* @property string bank_txn_pending_url
*/
class FlowConfig extends PPModel
class FlowConfig extends PayPalModel
{
/**
* Type of PayPal page to be displayed when a user lands on the PayPal site for checkout. Allowed values: `Billing` or `Login`. When set to `Billing`, the Non-PayPal account landing page is used. When set to `Login`, the PayPal account login landing page is used.
@@ -41,31 +41,6 @@ class FlowConfig extends PPModel
return $this->landing_page_type;
}
/**
* 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.
*
* @deprecated Instead use setLandingPageType
*
* @param string $landing_page_type
* @return $this
*/
public function setLanding_page_type($landing_page_type)
{
$this->landing_page_type = $landing_page_type;
return $this;
}
/**
* 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.
* @deprecated Instead use getLandingPageType
*
* @return string
*/
public function getLanding_page_type()
{
return $this->landing_page_type;
}
/**
* The URL on the merchant site for transferring to after a bank transfer payment.
*
@@ -91,29 +66,4 @@ class FlowConfig extends PPModel
return $this->bank_txn_pending_url;
}
/**
* The URL on the merchant site for transferring to after a bank transfer payment.
*
* @deprecated Instead use setBankTxnPendingUrl
*
* @param string $bank_txn_pending_url
* @return $this
*/
public function setBank_txn_pending_url($bank_txn_pending_url)
{
$this->bank_txn_pending_url = $bank_txn_pending_url;
return $this;
}
/**
* The URL on the merchant site for transferring to after a bank transfer payment.
* @deprecated Instead use getBankTxnPendingUrl
*
* @return string
*/
public function getBank_txn_pending_url()
{
return $this->bank_txn_pending_url;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class FundingInstrument
@@ -19,7 +19,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\BankToken bank_account_token
* @property \PayPal\Api\Credit credit
*/
class FundingInstrument extends PPModel
class FundingInstrument extends PayPalModel
{
/**
* Credit Card information.
@@ -44,31 +44,6 @@ class FundingInstrument extends PPModel
return $this->credit_card;
}
/**
* Credit Card information.
*
* @deprecated Instead use setCreditCard
*
* @param \PayPal\Api\CreditCard $credit_card
* @return $this
*/
public function setCredit_card($credit_card)
{
$this->credit_card = $credit_card;
return $this;
}
/**
* Credit Card information.
* @deprecated Instead use getCreditCard
*
* @return \PayPal\Api\CreditCard
*/
public function getCredit_card()
{
return $this->credit_card;
}
/**
* Credit Card information.
*
@@ -92,31 +67,6 @@ class FundingInstrument extends PPModel
return $this->credit_card_token;
}
/**
* Credit Card information.
*
* @deprecated Instead use setCreditCardToken
*
* @param \PayPal\Api\CreditCardToken $credit_card_token
* @return $this
*/
public function setCredit_card_token($credit_card_token)
{
$this->credit_card_token = $credit_card_token;
return $this;
}
/**
* Credit Card information.
* @deprecated Instead use getCreditCardToken
*
* @return \PayPal\Api\CreditCardToken
*/
public function getCredit_card_token()
{
return $this->credit_card_token;
}
/**
* Payment Card information.
*
@@ -140,31 +90,6 @@ class FundingInstrument extends PPModel
return $this->payment_card;
}
/**
* Payment Card information.
*
* @deprecated Instead use setPaymentCard
*
* @param \PayPal\Api\PaymentCard $payment_card
* @return $this
*/
public function setPayment_card($payment_card)
{
$this->payment_card = $payment_card;
return $this;
}
/**
* Payment Card information.
* @deprecated Instead use getPaymentCard
*
* @return \PayPal\Api\PaymentCard
*/
public function getPayment_card()
{
return $this->payment_card;
}
/**
* Payment card token information.
*
@@ -188,31 +113,6 @@ class FundingInstrument extends PPModel
return $this->payment_card_token;
}
/**
* Payment card token information.
*
* @deprecated Instead use setPaymentCardToken
*
* @param \PayPal\Api\PaymentCardToken $payment_card_token
* @return $this
*/
public function setPayment_card_token($payment_card_token)
{
$this->payment_card_token = $payment_card_token;
return $this;
}
/**
* Payment card token information.
* @deprecated Instead use getPaymentCardToken
*
* @return \PayPal\Api\PaymentCardToken
*/
public function getPayment_card_token()
{
return $this->payment_card_token;
}
/**
* Bank Account information.
*
@@ -236,31 +136,6 @@ class FundingInstrument extends PPModel
return $this->bank_account;
}
/**
* Bank Account information.
*
* @deprecated Instead use setBankAccount
*
* @param \PayPal\Api\ExtendedBankAccount $bank_account
* @return $this
*/
public function setBank_account($bank_account)
{
$this->bank_account = $bank_account;
return $this;
}
/**
* Bank Account information.
* @deprecated Instead use getBankAccount
*
* @return \PayPal\Api\ExtendedBankAccount
*/
public function getBank_account()
{
return $this->bank_account;
}
/**
* Bank Account information.
*
@@ -284,31 +159,6 @@ class FundingInstrument extends PPModel
return $this->bank_account_token;
}
/**
* Bank Account information.
*
* @deprecated Instead use setBankAccountToken
*
* @param \PayPal\Api\BankToken $bank_account_token
* @return $this
*/
public function setBank_account_token($bank_account_token)
{
$this->bank_account_token = $bank_account_token;
return $this;
}
/**
* Bank Account information.
* @deprecated Instead use getBankAccountToken
*
* @return \PayPal\Api\BankToken
*/
public function getBank_account_token()
{
return $this->bank_account_token;
}
/**
* Credit funding information.
*

View File

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

View File

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

View File

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

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InputFields
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int no_shipping
* @property int address_override
*/
class InputFields extends PPModel
class InputFields extends PayPalModel
{
/**
* Enables the buyer to enter a note to the merchant on the PayPal page during checkout.
@@ -41,31 +41,6 @@ class InputFields extends PPModel
return $this->allow_note;
}
/**
* Enables the buyer to enter a note to the merchant on the PayPal page during checkout.
*
* @deprecated Instead use setAllowNote
*
* @param bool $allow_note
* @return $this
*/
public function setAllow_note($allow_note)
{
$this->allow_note = $allow_note;
return $this;
}
/**
* Enables the buyer to enter a note to the merchant on the PayPal page during checkout.
* @deprecated Instead use getAllowNote
*
* @return bool
*/
public function getAllow_note()
{
return $this->allow_note;
}
/**
* 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`.
*
@@ -90,31 +65,6 @@ class InputFields extends PPModel
return $this->no_shipping;
}
/**
* 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`.
*
* @deprecated Instead use setNoShipping
*
* @param int $no_shipping
* @return $this
*/
public function setNo_shipping($no_shipping)
{
$this->no_shipping = $no_shipping;
return $this;
}
/**
* 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`.
* @deprecated Instead use getNoShipping
*
* @return int
*/
public function getNo_shipping()
{
return $this->no_shipping;
}
/**
* 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.
*
@@ -139,29 +89,4 @@ class InputFields extends PPModel
return $this->address_override;
}
/**
* 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.
*
* @deprecated Instead use setAddressOverride
*
* @param int $address_override
* @return $this
*/
public function setAddress_override($address_override)
{
$this->address_override = $address_override;
return $this;
}
/**
* 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.
* @deprecated Instead use getAddressOverride
*
* @return int
*/
public function getAddress_override()
{
return $this->address_override;
}
}

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\UrlValidator;
/**
@@ -40,7 +40,7 @@ use PayPal\Validation\UrlValidator;
* @property \PayPal\Api\Metadata metadata
* @property string additional_data
*/
class Invoice extends ResourceModel
class Invoice extends PayPalResourceModel
{
/**
* Unique invoice resource identifier.
@@ -158,31 +158,6 @@ class Invoice extends ResourceModel
return $this->merchant_info;
}
/**
* Information about the merchant who is sending the invoice.
*
* @deprecated Instead use setMerchantInfo
*
* @param \PayPal\Api\MerchantInfo $merchant_info
* @return $this
*/
public function setMerchant_info($merchant_info)
{
$this->merchant_info = $merchant_info;
return $this;
}
/**
* Information about the merchant who is sending the invoice.
* @deprecated Instead use getMerchantInfo
*
* @return \PayPal\Api\MerchantInfo
*/
public function getMerchant_info()
{
return $this->merchant_info;
}
/**
* Email address of invoice recipient (required) and optional billing information. (Note: We currently only allow one recipient).
*
@@ -236,31 +211,6 @@ class Invoice extends ResourceModel
);
}
/**
* Email address of invoice recipient (required) and optional billing information. (Note: We currently only allow one recipient).
*
* @deprecated Instead use setBillingInfo
*
* @param \PayPal\Api\BillingInfo $billing_info
* @return $this
*/
public function setBilling_info($billing_info)
{
$this->billing_info = $billing_info;
return $this;
}
/**
* Email address of invoice recipient (required) and optional billing information. (Note: We currently only allow one recipient).
* @deprecated Instead use getBillingInfo
*
* @return \PayPal\Api\BillingInfo
*/
public function getBilling_info()
{
return $this->billing_info;
}
/**
* Shipping information for entities to whom items are being shipped.
*
@@ -284,31 +234,6 @@ class Invoice extends ResourceModel
return $this->shipping_info;
}
/**
* Shipping information for entities to whom items are being shipped.
*
* @deprecated Instead use setShippingInfo
*
* @param \PayPal\Api\ShippingInfo $shipping_info
* @return $this
*/
public function setShipping_info($shipping_info)
{
$this->shipping_info = $shipping_info;
return $this;
}
/**
* Shipping information for entities to whom items are being shipped.
* @deprecated Instead use getShippingInfo
*
* @return \PayPal\Api\ShippingInfo
*/
public function getShipping_info()
{
return $this->shipping_info;
}
/**
* List of items included in the invoice. 100 items max per invoice.
*
@@ -385,31 +310,6 @@ class Invoice extends ResourceModel
return $this->invoice_date;
}
/**
* Date on which the invoice was enabled. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setInvoiceDate
*
* @param string $invoice_date
* @return $this
*/
public function setInvoice_date($invoice_date)
{
$this->invoice_date = $invoice_date;
return $this;
}
/**
* Date on which the invoice was enabled. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getInvoiceDate
*
* @return string
*/
public function getInvoice_date()
{
return $this->invoice_date;
}
/**
* Optional field to pass payment deadline for the invoice. Either term_type or due_date can be passed, but not both.
*
@@ -433,31 +333,6 @@ class Invoice extends ResourceModel
return $this->payment_term;
}
/**
* Optional field to pass payment deadline for the invoice. Either term_type or due_date can be passed, but not both.
*
* @deprecated Instead use setPaymentTerm
*
* @param \PayPal\Api\PaymentTerm $payment_term
* @return $this
*/
public function setPayment_term($payment_term)
{
$this->payment_term = $payment_term;
return $this;
}
/**
* Optional field to pass payment deadline for the invoice. Either term_type or due_date can be passed, but not both.
* @deprecated Instead use getPaymentTerm
*
* @return \PayPal\Api\PaymentTerm
*/
public function getPayment_term()
{
return $this->payment_term;
}
/**
* Invoice level discount in percent or amount.
*
@@ -504,31 +379,6 @@ class Invoice extends ResourceModel
return $this->shipping_cost;
}
/**
* Shipping cost in percent or amount.
*
* @deprecated Instead use setShippingCost
*
* @param \PayPal\Api\ShippingCost $shipping_cost
* @return $this
*/
public function setShipping_cost($shipping_cost)
{
$this->shipping_cost = $shipping_cost;
return $this;
}
/**
* Shipping cost in percent or amount.
* @deprecated Instead use getShippingCost
*
* @return \PayPal\Api\ShippingCost
*/
public function getShipping_cost()
{
return $this->shipping_cost;
}
/**
* Custom amount applied on an invoice. If a label is included then the amount cannot be empty.
*
@@ -575,31 +425,6 @@ class Invoice extends ResourceModel
return $this->tax_calculated_after_discount;
}
/**
* Indicates whether tax is calculated before or after a discount. If false (the default), the tax is calculated before a discount. If true, the tax is calculated after a discount.
*
* @deprecated Instead use setTaxCalculatedAfterDiscount
*
* @param bool $tax_calculated_after_discount
* @return $this
*/
public function setTax_calculated_after_discount($tax_calculated_after_discount)
{
$this->tax_calculated_after_discount = $tax_calculated_after_discount;
return $this;
}
/**
* Indicates whether tax is calculated before or after a discount. If false (the default), the tax is calculated before a discount. If true, the tax is calculated after a discount.
* @deprecated Instead use getTaxCalculatedAfterDiscount
*
* @return bool
*/
public function getTax_calculated_after_discount()
{
return $this->tax_calculated_after_discount;
}
/**
* A flag indicating whether the unit price includes tax. Default is false
*
@@ -623,31 +448,6 @@ class Invoice extends ResourceModel
return $this->tax_inclusive;
}
/**
* A flag indicating whether the unit price includes tax. Default is false
*
* @deprecated Instead use setTaxInclusive
*
* @param bool $tax_inclusive
* @return $this
*/
public function setTax_inclusive($tax_inclusive)
{
$this->tax_inclusive = $tax_inclusive;
return $this;
}
/**
* A flag indicating whether the unit price includes tax. Default is false
* @deprecated Instead use getTaxInclusive
*
* @return bool
*/
public function getTax_inclusive()
{
return $this->tax_inclusive;
}
/**
* General terms of the invoice. 4000 characters max.
*
@@ -717,31 +517,6 @@ class Invoice extends ResourceModel
return $this->merchant_memo;
}
/**
* Bookkeeping memo that is private to the merchant. 150 characters max.
*
* @deprecated Instead use setMerchantMemo
*
* @param string $merchant_memo
* @return $this
*/
public function setMerchant_memo($merchant_memo)
{
$this->merchant_memo = $merchant_memo;
return $this;
}
/**
* Bookkeeping memo that is private to the merchant. 150 characters max.
* @deprecated Instead use getMerchantMemo
*
* @return string
*/
public function getMerchant_memo()
{
return $this->merchant_memo;
}
/**
* Full URL of an external image to use as the logo. 4000 characters max.
*
@@ -766,31 +541,6 @@ class Invoice extends ResourceModel
return $this->logo_url;
}
/**
* Full URL of an external image to use as the logo. 4000 characters max.
*
* @deprecated Instead use setLogoUrl
*
* @param string $logo_url
* @return $this
*/
public function setLogo_url($logo_url)
{
$this->logo_url = $logo_url;
return $this;
}
/**
* Full URL of an external image to use as the logo. 4000 characters max.
* @deprecated Instead use getLogoUrl
*
* @return string
*/
public function getLogo_url()
{
return $this->logo_url;
}
/**
* The total amount of the invoice.
*
@@ -814,31 +564,6 @@ class Invoice extends ResourceModel
return $this->total_amount;
}
/**
* The total amount of the invoice.
*
* @deprecated Instead use setTotalAmount
*
* @param \PayPal\Api\Currency $total_amount
* @return $this
*/
public function setTotal_amount($total_amount)
{
$this->total_amount = $total_amount;
return $this;
}
/**
* The total amount of the invoice.
* @deprecated Instead use getTotalAmount
*
* @return \PayPal\Api\Currency
*/
public function getTotal_amount()
{
return $this->total_amount;
}
/**
* List of payment details for the invoice.
*
@@ -892,31 +617,6 @@ class Invoice extends ResourceModel
);
}
/**
* List of payment details for the invoice.
*
* @deprecated Instead use setPaymentDetails
*
* @param \PayPal\Api\PaymentDetail $payment_details
* @return $this
*/
public function setPayment_details($payment_details)
{
$this->payment_details = $payment_details;
return $this;
}
/**
* List of payment details for the invoice.
* @deprecated Instead use getPaymentDetails
*
* @return \PayPal\Api\PaymentDetail
*/
public function getPayment_details()
{
return $this->payment_details;
}
/**
* List of refund details for the invoice.
*
@@ -970,31 +670,6 @@ class Invoice extends ResourceModel
);
}
/**
* List of refund details for the invoice.
*
* @deprecated Instead use setRefundDetails
*
* @param \PayPal\Api\RefundDetail $refund_details
* @return $this
*/
public function setRefund_details($refund_details)
{
$this->refund_details = $refund_details;
return $this;
}
/**
* List of refund details for the invoice.
* @deprecated Instead use getRefundDetails
*
* @return \PayPal\Api\RefundDetail
*/
public function getRefund_details()
{
return $this->refund_details;
}
/**
* Audit information for the invoice.
*
@@ -1041,36 +716,11 @@ class Invoice extends ResourceModel
return $this->additional_data;
}
/**
* Any miscellaneous invoice data. 4000 characters max.
*
* @deprecated Instead use setAdditionalData
*
* @param string $additional_data
* @return $this
*/
public function setAdditional_data($additional_data)
{
$this->additional_data = $additional_data;
return $this;
}
/**
* Any miscellaneous invoice data. 4000 characters max.
* @deprecated Instead use getAdditionalData
*
* @return string
*/
public function getAdditional_data()
{
return $this->additional_data;
}
/**
* 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 +743,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 +767,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 +790,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 +814,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 +838,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 +862,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 +886,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 +911,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)
@@ -1288,25 +938,11 @@ class Invoice extends ResourceModel
return $ret;
}
/**
* @deprecated Use getAll instead
*
* 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
* @return InvoiceSearchResponse
*/
public static function get_all($apiContext = null, $restCall = null)
{
return self::getAll(null, $apiContext, $restCall);
}
/**
* 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 +965,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 +989,7 @@ class Invoice extends ResourceModel
* @param array $params
* @param string $invoiceId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Image
*/
public static function qrCode($invoiceId, $params = array(), $apiContext = null, $restCall = null)

View File

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

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoiceItem
@@ -19,7 +19,7 @@ use PayPal\Common\PPModel;
* @property string date
* @property \PayPal\Api\Cost discount
*/
class InvoiceItem extends PPModel
class InvoiceItem extends PayPalModel
{
/**
* Name of the item. 60 characters max.
@@ -113,31 +113,6 @@ class InvoiceItem extends PPModel
return $this->unit_price;
}
/**
* Unit price of the item. Range of -999999.99 to 999999.99.
*
* @deprecated Instead use setUnitPrice
*
* @param \PayPal\Api\Currency $unit_price
* @return $this
*/
public function setUnit_price($unit_price)
{
$this->unit_price = $unit_price;
return $this;
}
/**
* Unit price of the item. Range of -999999.99 to 999999.99.
* @deprecated Instead use getUnitPrice
*
* @return \PayPal\Api\Currency
*/
public function getUnit_price()
{
return $this->unit_price;
}
/**
* Tax associated with the item.
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoiceSearchResponse
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property int total_count
* @property \PayPal\Api\Invoice[] invoices
*/
class InvoiceSearchResponse extends PPModel
class InvoiceSearchResponse extends PayPalModel
{
/**
* Total number of invoices.
@@ -39,31 +39,6 @@ class InvoiceSearchResponse extends PPModel
return $this->total_count;
}
/**
* Total number of invoices.
*
* @deprecated Instead use setTotalCount
*
* @param int $total_count
* @return $this
*/
public function setTotal_count($total_count)
{
$this->total_count = $total_count;
return $this;
}
/**
* Total number of invoices.
* @deprecated Instead use getTotalCount
*
* @return int
*/
public function getTotal_count()
{
return $this->total_count;
}
/**
* List of invoices belonging to a merchant.
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -23,7 +23,7 @@ use PayPal\Validation\UrlValidator;
* @property string last_sent_by
* @property string payer_view_url
*/
class InvoicingMetaData extends PPModel
class InvoicingMetaData extends PayPalModel
{
/**
* Date when the resource was created.
@@ -48,31 +48,6 @@ class InvoicingMetaData extends PPModel
return $this->created_date;
}
/**
* Date when the resource was created.
*
* @deprecated Instead use setCreatedDate
*
* @param string $created_date
* @return $this
*/
public function setCreated_date($created_date)
{
$this->created_date = $created_date;
return $this;
}
/**
* Date when the resource was created.
* @deprecated Instead use getCreatedDate
*
* @return string
*/
public function getCreated_date()
{
return $this->created_date;
}
/**
* Email address of the account that created the resource.
*
@@ -96,31 +71,6 @@ class InvoicingMetaData extends PPModel
return $this->created_by;
}
/**
* Email address of the account that created the resource.
*
* @deprecated Instead use setCreatedBy
*
* @param string $created_by
* @return $this
*/
public function setCreated_by($created_by)
{
$this->created_by = $created_by;
return $this;
}
/**
* Email address of the account that created the resource.
* @deprecated Instead use getCreatedBy
*
* @return string
*/
public function getCreated_by()
{
return $this->created_by;
}
/**
* Date when the resource was cancelled.
*
@@ -144,31 +94,6 @@ class InvoicingMetaData extends PPModel
return $this->cancelled_date;
}
/**
* Date when the resource was cancelled.
*
* @deprecated Instead use setCancelledDate
*
* @param string $cancelled_date
* @return $this
*/
public function setCancelled_date($cancelled_date)
{
$this->cancelled_date = $cancelled_date;
return $this;
}
/**
* Date when the resource was cancelled.
* @deprecated Instead use getCancelledDate
*
* @return string
*/
public function getCancelled_date()
{
return $this->cancelled_date;
}
/**
* Actor who cancelled the resource.
*
@@ -192,31 +117,6 @@ class InvoicingMetaData extends PPModel
return $this->cancelled_by;
}
/**
* Actor who cancelled the resource.
*
* @deprecated Instead use setCancelledBy
*
* @param string $cancelled_by
* @return $this
*/
public function setCancelled_by($cancelled_by)
{
$this->cancelled_by = $cancelled_by;
return $this;
}
/**
* Actor who cancelled the resource.
* @deprecated Instead use getCancelledBy
*
* @return string
*/
public function getCancelled_by()
{
return $this->cancelled_by;
}
/**
* Date when the resource was last edited.
*
@@ -240,31 +140,6 @@ class InvoicingMetaData extends PPModel
return $this->last_updated_date;
}
/**
* Date when the resource was last edited.
*
* @deprecated Instead use setLastUpdatedDate
*
* @param string $last_updated_date
* @return $this
*/
public function setLast_updated_date($last_updated_date)
{
$this->last_updated_date = $last_updated_date;
return $this;
}
/**
* Date when the resource was last edited.
* @deprecated Instead use getLastUpdatedDate
*
* @return string
*/
public function getLast_updated_date()
{
return $this->last_updated_date;
}
/**
* Email address of the account that last edited the resource.
*
@@ -288,31 +163,6 @@ class InvoicingMetaData extends PPModel
return $this->last_updated_by;
}
/**
* Email address of the account that last edited the resource.
*
* @deprecated Instead use setLastUpdatedBy
*
* @param string $last_updated_by
* @return $this
*/
public function setLast_updated_by($last_updated_by)
{
$this->last_updated_by = $last_updated_by;
return $this;
}
/**
* Email address of the account that last edited the resource.
* @deprecated Instead use getLastUpdatedBy
*
* @return string
*/
public function getLast_updated_by()
{
return $this->last_updated_by;
}
/**
* Date when the resource was first sent.
*
@@ -336,31 +186,6 @@ class InvoicingMetaData extends PPModel
return $this->first_sent_date;
}
/**
* Date when the resource was first sent.
*
* @deprecated Instead use setFirstSentDate
*
* @param string $first_sent_date
* @return $this
*/
public function setFirst_sent_date($first_sent_date)
{
$this->first_sent_date = $first_sent_date;
return $this;
}
/**
* Date when the resource was first sent.
* @deprecated Instead use getFirstSentDate
*
* @return string
*/
public function getFirst_sent_date()
{
return $this->first_sent_date;
}
/**
* Date when the resource was last sent.
*
@@ -384,31 +209,6 @@ class InvoicingMetaData extends PPModel
return $this->last_sent_date;
}
/**
* Date when the resource was last sent.
*
* @deprecated Instead use setLastSentDate
*
* @param string $last_sent_date
* @return $this
*/
public function setLast_sent_date($last_sent_date)
{
$this->last_sent_date = $last_sent_date;
return $this;
}
/**
* Date when the resource was last sent.
* @deprecated Instead use getLastSentDate
*
* @return string
*/
public function getLast_sent_date()
{
return $this->last_sent_date;
}
/**
* Email address of the account that last sent the resource.
*
@@ -432,31 +232,6 @@ class InvoicingMetaData extends PPModel
return $this->last_sent_by;
}
/**
* Email address of the account that last sent the resource.
*
* @deprecated Instead use setLastSentBy
*
* @param string $last_sent_by
* @return $this
*/
public function setLast_sent_by($last_sent_by)
{
$this->last_sent_by = $last_sent_by;
return $this;
}
/**
* Email address of the account that last sent the resource.
* @deprecated Instead use getLastSentBy
*
* @return string
*/
public function getLast_sent_by()
{
return $this->last_sent_by;
}
/**
* URL representing the payer's view of the invoice.
*
@@ -481,29 +256,4 @@ class InvoicingMetaData extends PPModel
return $this->payer_view_url;
}
/**
* URL representing the payer's view of the invoice.
*
* @deprecated Instead use setPayerViewUrl
*
* @param string $payer_view_url
* @return $this
*/
public function setPayer_view_url($payer_view_url)
{
$this->payer_view_url = $payer_view_url;
return $this;
}
/**
* URL representing the payer's view of the invoice.
* @deprecated Instead use getPayerViewUrl
*
* @return string
*/
public function getPayer_view_url()
{
return $this->payer_view_url;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoicingNotification
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string note
* @property bool send_to_merchant
*/
class InvoicingNotification extends PPModel
class InvoicingNotification extends PayPalModel
{
/**
* Subject of the notification.
@@ -86,29 +86,4 @@ class InvoicingNotification extends PPModel
return $this->send_to_merchant;
}
/**
* A flag indicating whether a copy of the email has to be sent to the merchant.
*
* @deprecated Instead use setSendToMerchant
*
* @param bool $send_to_merchant
* @return $this
*/
public function setSend_to_merchant($send_to_merchant)
{
$this->send_to_merchant = $send_to_merchant;
return $this;
}
/**
* A flag indicating whether a copy of the email has to be sent to the merchant.
* @deprecated Instead use getSendToMerchant
*
* @return bool
*/
public function getSend_to_merchant()
{
return $this->send_to_merchant;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class InvoicingPaymentDetail
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string method
* @property string note
*/
class InvoicingPaymentDetail extends PPModel
class InvoicingPaymentDetail extends PayPalModel
{
/**
* PayPal payment detail indicating whether payment was made in an invoicing flow via PayPal or externally. In the case of the mark-as-paid API, payment type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.
@@ -67,31 +67,6 @@ class InvoicingPaymentDetail extends PPModel
return $this->transaction_id;
}
/**
* PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
*
* @deprecated Instead use setTransactionId
*
* @param string $transaction_id
* @return $this
*/
public function setTransaction_id($transaction_id)
{
$this->transaction_id = $transaction_id;
return $this;
}
/**
* PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
* @deprecated Instead use getTransactionId
*
* @return string
*/
public function getTransaction_id()
{
return $this->transaction_id;
}
/**
* Type of the transaction.
* Valid Values: ["SALE", "AUTHORIZATION", "CAPTURE"]
@@ -116,31 +91,6 @@ class InvoicingPaymentDetail extends PPModel
return $this->transaction_type;
}
/**
* Type of the transaction.
*
* @deprecated Instead use setTransactionType
*
* @param string $transaction_type
* @return $this
*/
public function setTransaction_type($transaction_type)
{
$this->transaction_type = $transaction_type;
return $this;
}
/**
* Type of the transaction.
* @deprecated Instead use getTransactionType
*
* @return string
*/
public function getTransaction_type()
{
return $this->transaction_type;
}
/**
* Date when the invoice was paid. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*

View File

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

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\UrlValidator;
use PayPal\Validation\NumericValidator;
use PayPal\Common\FormatConverter;
use PayPal\Converter\FormatConverter;
/**
* Class Item
@@ -27,7 +27,7 @@ use PayPal\Common\FormatConverter;
* @property \PayPal\Api\NameValuePair supplementary_data
* @property \PayPal\Api\NameValuePair postback_data
*/
class Item extends PPModel
class Item extends PayPalModel
{
/**
* Number of items.
@@ -275,31 +275,6 @@ class Item extends PPModel
return $this->supplementary_data;
}
/**
* Set of optional data used for PayPal risk determination.
*
* @deprecated Instead use setSupplementaryData
*
* @param \PayPal\Api\NameValuePair $supplementary_data
* @return $this
*/
public function setSupplementary_data($supplementary_data)
{
$this->supplementary_data = $supplementary_data;
return $this;
}
/**
* Set of optional data used for PayPal risk determination.
* @deprecated Instead use getSupplementaryData
*
* @return \PayPal\Api\NameValuePair
*/
public function getSupplementary_data()
{
return $this->supplementary_data;
}
/**
* Set of optional data used for PayPal post-transaction notifications.
*
@@ -324,29 +299,4 @@ class Item extends PPModel
return $this->postback_data;
}
/**
* Set of optional data used for PayPal post-transaction notifications.
*
* @deprecated Instead use setPostbackData
*
* @param \PayPal\Api\NameValuePair $postback_data
* @return $this
*/
public function setPostback_data($postback_data)
{
$this->postback_data = $postback_data;
return $this;
}
/**
* Set of optional data used for PayPal post-transaction notifications.
* @deprecated Instead use getPostbackData
*
* @return \PayPal\Api\NameValuePair
*/
public function getPostback_data()
{
return $this->postback_data;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -15,7 +15,7 @@ use PayPal\Rest\ApiContext;
* @property \PayPal\Api\Item[] items
* @property \PayPal\Api\ShippingAddress shipping_address
*/
class ItemList extends PPModel
class ItemList extends PayPalModel
{
/**
* Is this list empty?
@@ -100,30 +100,4 @@ class ItemList extends PPModel
return $this->shipping_address;
}
/**
* Shipping address.
*
* @deprecated Instead use setShippingAddress
*
* @param \PayPal\Api\ShippingAddress $shipping_address
* @return $this
*/
public function setShipping_address($shipping_address)
{
$this->shipping_address = $shipping_address;
return $this;
}
/**
* Shipping address.
*
* @deprecated Instead use getShippingAddress
*
* @return \PayPal\Api\ShippingAddress
*/
public function getShipping_address()
{
return $this->shipping_address;
}
}

View File

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

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class MerchantInfo
@@ -22,7 +22,7 @@ use PayPal\Common\PPModel;
* @property string tax_id
* @property string additional_info
*/
class MerchantInfo extends PPModel
class MerchantInfo extends PayPalModel
{
/**
* Email address of the merchant. 260 characters max.
@@ -70,31 +70,6 @@ class MerchantInfo extends PPModel
return $this->first_name;
}
/**
* First name of the merchant. 30 characters max.
*
* @deprecated Instead use setFirstName
*
* @param string $first_name
* @return $this
*/
public function setFirst_name($first_name)
{
$this->first_name = $first_name;
return $this;
}
/**
* First name of the merchant. 30 characters max.
* @deprecated Instead use getFirstName
*
* @return string
*/
public function getFirst_name()
{
return $this->first_name;
}
/**
* Last name of the merchant. 30 characters max.
*
@@ -118,31 +93,6 @@ class MerchantInfo extends PPModel
return $this->last_name;
}
/**
* Last name of the merchant. 30 characters max.
*
* @deprecated Instead use setLastName
*
* @param string $last_name
* @return $this
*/
public function setLast_name($last_name)
{
$this->last_name = $last_name;
return $this;
}
/**
* Last name of the merchant. 30 characters max.
* @deprecated Instead use getLastName
*
* @return string
*/
public function getLast_name()
{
return $this->last_name;
}
/**
* Address of the merchant.
*
@@ -189,31 +139,6 @@ class MerchantInfo extends PPModel
return $this->business_name;
}
/**
* Company business name of the merchant. 100 characters max.
*
* @deprecated Instead use setBusinessName
*
* @param string $business_name
* @return $this
*/
public function setBusiness_name($business_name)
{
$this->business_name = $business_name;
return $this;
}
/**
* Company business name of the merchant. 100 characters max.
* @deprecated Instead use getBusinessName
*
* @return string
*/
public function getBusiness_name()
{
return $this->business_name;
}
/**
* Phone number of the merchant.
*
@@ -306,31 +231,6 @@ class MerchantInfo extends PPModel
return $this->tax_id;
}
/**
* Tax ID of the merchant. 100 characters max.
*
* @deprecated Instead use setTaxId
*
* @param string $tax_id
* @return $this
*/
public function setTax_id($tax_id)
{
$this->tax_id = $tax_id;
return $this;
}
/**
* Tax ID of the merchant. 100 characters max.
* @deprecated Instead use getTaxId
*
* @return string
*/
public function getTax_id()
{
return $this->tax_id;
}
/**
* Option to display additional information such as business hours. 40 characters max.
*
@@ -354,29 +254,4 @@ class MerchantInfo extends PPModel
return $this->additional_info;
}
/**
* Option to display additional information such as business hours. 40 characters max.
*
* @deprecated Instead use setAdditionalInfo
*
* @param string $additional_info
* @return $this
*/
public function setAdditional_info($additional_info)
{
$this->additional_info = $additional_info;
return $this;
}
/**
* Option to display additional information such as business hours. 40 characters max.
* @deprecated Instead use getAdditionalInfo
*
* @return string
*/
public function getAdditional_info()
{
return $this->additional_info;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -23,7 +23,7 @@ use PayPal\Validation\UrlValidator;
* @property string accepted_payment_type
* @property string char_set
*/
class MerchantPreferences extends PPModel
class MerchantPreferences extends PayPalModel
{
/**
* Identifier of the merchant_preferences. 128 characters max.
@@ -71,31 +71,6 @@ class MerchantPreferences extends PPModel
return $this->setup_fee;
}
/**
* Setup fee amount. Default is 0.
*
* @deprecated Instead use setSetupFee
*
* @param \PayPal\Api\Currency $setup_fee
* @return $this
*/
public function setSetup_fee($setup_fee)
{
$this->setup_fee = $setup_fee;
return $this;
}
/**
* Setup fee amount. Default is 0.
* @deprecated Instead use getSetupFee
*
* @return \PayPal\Api\Currency
*/
public function getSetup_fee()
{
return $this->setup_fee;
}
/**
* Redirect URL on cancellation of agreement request. 1000 characters max.
*
@@ -120,31 +95,6 @@ class MerchantPreferences extends PPModel
return $this->cancel_url;
}
/**
* Redirect URL on cancellation of agreement request. 1000 characters max.
*
* @deprecated Instead use setCancelUrl
*
* @param string $cancel_url
* @return $this
*/
public function setCancel_url($cancel_url)
{
$this->cancel_url = $cancel_url;
return $this;
}
/**
* Redirect URL on cancellation of agreement request. 1000 characters max.
* @deprecated Instead use getCancelUrl
*
* @return string
*/
public function getCancel_url()
{
return $this->cancel_url;
}
/**
* Redirect URL on creation of agreement request. 1000 characters max.
*
@@ -169,31 +119,6 @@ class MerchantPreferences extends PPModel
return $this->return_url;
}
/**
* Redirect URL on creation of agreement request. 1000 characters max.
*
* @deprecated Instead use setReturnUrl
*
* @param string $return_url
* @return $this
*/
public function setReturn_url($return_url)
{
$this->return_url = $return_url;
return $this;
}
/**
* Redirect URL on creation of agreement request. 1000 characters max.
* @deprecated Instead use getReturnUrl
*
* @return string
*/
public function getReturn_url()
{
return $this->return_url;
}
/**
* Notify URL on agreement creation. 1000 characters max.
*
@@ -218,31 +143,6 @@ class MerchantPreferences extends PPModel
return $this->notify_url;
}
/**
* Notify URL on agreement creation. 1000 characters max.
*
* @deprecated Instead use setNotifyUrl
*
* @param string $notify_url
* @return $this
*/
public function setNotify_url($notify_url)
{
$this->notify_url = $notify_url;
return $this;
}
/**
* Notify URL on agreement creation. 1000 characters max.
* @deprecated Instead use getNotifyUrl
*
* @return string
*/
public function getNotify_url()
{
return $this->notify_url;
}
/**
* Total number of failed attempts allowed. Default is 0, representing an infinite number of failed attempts.
*
@@ -266,31 +166,6 @@ class MerchantPreferences extends PPModel
return $this->max_fail_attempts;
}
/**
* Total number of failed attempts allowed. Default is 0, representing an infinite number of failed attempts.
*
* @deprecated Instead use setMaxFailAttempts
*
* @param string $max_fail_attempts
* @return $this
*/
public function setMax_fail_attempts($max_fail_attempts)
{
$this->max_fail_attempts = $max_fail_attempts;
return $this;
}
/**
* Total number of failed attempts allowed. Default is 0, representing an infinite number of failed attempts.
* @deprecated Instead use getMaxFailAttempts
*
* @return string
*/
public function getMax_fail_attempts()
{
return $this->max_fail_attempts;
}
/**
* Allow auto billing for the outstanding amount of the agreement in the next cycle. Allowed values: `YES`, `NO`. Default is `NO`.
*
@@ -314,31 +189,6 @@ class MerchantPreferences extends PPModel
return $this->auto_bill_amount;
}
/**
* Allow auto billing for the outstanding amount of the agreement in the next cycle. Allowed values: `YES`, `NO`. Default is `NO`.
*
* @deprecated Instead use setAutoBillAmount
*
* @param string $auto_bill_amount
* @return $this
*/
public function setAuto_bill_amount($auto_bill_amount)
{
$this->auto_bill_amount = $auto_bill_amount;
return $this;
}
/**
* Allow auto billing for the outstanding amount of the agreement in the next cycle. Allowed values: `YES`, `NO`. Default is `NO`.
* @deprecated Instead use getAutoBillAmount
*
* @return string
*/
public function getAuto_bill_amount()
{
return $this->auto_bill_amount;
}
/**
* Action to take if a failure occurs during initial payment. Allowed values: `CONTINUE`, `CANCEL`. Default is continue.
*
@@ -362,31 +212,6 @@ class MerchantPreferences extends PPModel
return $this->initial_fail_amount_action;
}
/**
* Action to take if a failure occurs during initial payment. Allowed values: `CONTINUE`, `CANCEL`. Default is continue.
*
* @deprecated Instead use setInitialFailAmountAction
*
* @param string $initial_fail_amount_action
* @return $this
*/
public function setInitial_fail_amount_action($initial_fail_amount_action)
{
$this->initial_fail_amount_action = $initial_fail_amount_action;
return $this;
}
/**
* Action to take if a failure occurs during initial payment. Allowed values: `CONTINUE`, `CANCEL`. Default is continue.
* @deprecated Instead use getInitialFailAmountAction
*
* @return string
*/
public function getInitial_fail_amount_action()
{
return $this->initial_fail_amount_action;
}
/**
* Payment types that are accepted for this plan.
*
@@ -410,31 +235,6 @@ class MerchantPreferences extends PPModel
return $this->accepted_payment_type;
}
/**
* Payment types that are accepted for this plan.
*
* @deprecated Instead use setAcceptedPaymentType
*
* @param string $accepted_payment_type
* @return $this
*/
public function setAccepted_payment_type($accepted_payment_type)
{
$this->accepted_payment_type = $accepted_payment_type;
return $this;
}
/**
* Payment types that are accepted for this plan.
* @deprecated Instead use getAcceptedPaymentType
*
* @return string
*/
public function getAccepted_payment_type()
{
return $this->accepted_payment_type;
}
/**
* char_set for this plan.
*
@@ -458,29 +258,4 @@ class MerchantPreferences extends PPModel
return $this->char_set;
}
/**
* char_set for this plan.
*
* @deprecated Instead use setCharSet
*
* @param string $char_set
* @return $this
*/
public function setChar_set($char_set)
{
$this->char_set = $char_set;
return $this;
}
/**
* char_set for this plan.
* @deprecated Instead use getCharSet
*
* @return string
*/
public function getChar_set()
{
return $this->char_set;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -23,7 +23,7 @@ use PayPal\Validation\UrlValidator;
* @property string last_sent_by
* @property string payer_view_url
*/
class Metadata extends PPModel
class Metadata extends PayPalModel
{
/**
* Date when the resource was created.
@@ -48,31 +48,6 @@ class Metadata extends PPModel
return $this->created_date;
}
/**
* Date when the resource was created.
*
* @deprecated Instead use setCreatedDate
*
* @param string $created_date
* @return $this
*/
public function setCreated_date($created_date)
{
$this->created_date = $created_date;
return $this;
}
/**
* Date when the resource was created.
* @deprecated Instead use getCreatedDate
*
* @return string
*/
public function getCreated_date()
{
return $this->created_date;
}
/**
* Email address of the account that created the resource.
*
@@ -96,31 +71,6 @@ class Metadata extends PPModel
return $this->created_by;
}
/**
* Email address of the account that created the resource.
*
* @deprecated Instead use setCreatedBy
*
* @param string $created_by
* @return $this
*/
public function setCreated_by($created_by)
{
$this->created_by = $created_by;
return $this;
}
/**
* Email address of the account that created the resource.
* @deprecated Instead use getCreatedBy
*
* @return string
*/
public function getCreated_by()
{
return $this->created_by;
}
/**
* Date when the resource was cancelled.
*
@@ -144,31 +94,6 @@ class Metadata extends PPModel
return $this->cancelled_date;
}
/**
* Date when the resource was cancelled.
*
* @deprecated Instead use setCancelledDate
*
* @param string $cancelled_date
* @return $this
*/
public function setCancelled_date($cancelled_date)
{
$this->cancelled_date = $cancelled_date;
return $this;
}
/**
* Date when the resource was cancelled.
* @deprecated Instead use getCancelledDate
*
* @return string
*/
public function getCancelled_date()
{
return $this->cancelled_date;
}
/**
* Actor who cancelled the resource.
*
@@ -192,31 +117,6 @@ class Metadata extends PPModel
return $this->cancelled_by;
}
/**
* Actor who cancelled the resource.
*
* @deprecated Instead use setCancelledBy
*
* @param string $cancelled_by
* @return $this
*/
public function setCancelled_by($cancelled_by)
{
$this->cancelled_by = $cancelled_by;
return $this;
}
/**
* Actor who cancelled the resource.
* @deprecated Instead use getCancelledBy
*
* @return string
*/
public function getCancelled_by()
{
return $this->cancelled_by;
}
/**
* Date when the resource was last edited.
*
@@ -240,31 +140,6 @@ class Metadata extends PPModel
return $this->last_updated_date;
}
/**
* Date when the resource was last edited.
*
* @deprecated Instead use setLastUpdatedDate
*
* @param string $last_updated_date
* @return $this
*/
public function setLast_updated_date($last_updated_date)
{
$this->last_updated_date = $last_updated_date;
return $this;
}
/**
* Date when the resource was last edited.
* @deprecated Instead use getLastUpdatedDate
*
* @return string
*/
public function getLast_updated_date()
{
return $this->last_updated_date;
}
/**
* Email address of the account that last edited the resource.
*
@@ -288,31 +163,6 @@ class Metadata extends PPModel
return $this->last_updated_by;
}
/**
* Email address of the account that last edited the resource.
*
* @deprecated Instead use setLastUpdatedBy
*
* @param string $last_updated_by
* @return $this
*/
public function setLast_updated_by($last_updated_by)
{
$this->last_updated_by = $last_updated_by;
return $this;
}
/**
* Email address of the account that last edited the resource.
* @deprecated Instead use getLastUpdatedBy
*
* @return string
*/
public function getLast_updated_by()
{
return $this->last_updated_by;
}
/**
* Date when the resource was first sent.
*
@@ -336,31 +186,6 @@ class Metadata extends PPModel
return $this->first_sent_date;
}
/**
* Date when the resource was first sent.
*
* @deprecated Instead use setFirstSentDate
*
* @param string $first_sent_date
* @return $this
*/
public function setFirst_sent_date($first_sent_date)
{
$this->first_sent_date = $first_sent_date;
return $this;
}
/**
* Date when the resource was first sent.
* @deprecated Instead use getFirstSentDate
*
* @return string
*/
public function getFirst_sent_date()
{
return $this->first_sent_date;
}
/**
* Date when the resource was last sent.
*
@@ -384,31 +209,6 @@ class Metadata extends PPModel
return $this->last_sent_date;
}
/**
* Date when the resource was last sent.
*
* @deprecated Instead use setLastSentDate
*
* @param string $last_sent_date
* @return $this
*/
public function setLast_sent_date($last_sent_date)
{
$this->last_sent_date = $last_sent_date;
return $this;
}
/**
* Date when the resource was last sent.
* @deprecated Instead use getLastSentDate
*
* @return string
*/
public function getLast_sent_date()
{
return $this->last_sent_date;
}
/**
* Email address of the account that last sent the resource.
*
@@ -432,31 +232,6 @@ class Metadata extends PPModel
return $this->last_sent_by;
}
/**
* Email address of the account that last sent the resource.
*
* @deprecated Instead use setLastSentBy
*
* @param string $last_sent_by
* @return $this
*/
public function setLast_sent_by($last_sent_by)
{
$this->last_sent_by = $last_sent_by;
return $this;
}
/**
* Email address of the account that last sent the resource.
* @deprecated Instead use getLastSentBy
*
* @return string
*/
public function getLast_sent_by()
{
return $this->last_sent_by;
}
/**
* URL representing the payer's view of the invoice.
*
@@ -481,29 +256,4 @@ class Metadata extends PPModel
return $this->payer_view_url;
}
/**
* URL representing the payer's view of the invoice.
*
* @deprecated Instead use setPayerViewUrl
*
* @param string $payer_view_url
* @return $this
*/
public function setPayer_view_url($payer_view_url)
{
$this->payer_view_url = $payer_view_url;
return $this;
}
/**
* URL representing the payer's view of the invoice.
* @deprecated Instead use getPayerViewUrl
*
* @return string
*/
public function getPayer_view_url()
{
return $this->payer_view_url;
}
}

View File

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

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Notification
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string note
* @property bool send_to_merchant
*/
class Notification extends PPModel
class Notification extends PayPalModel
{
/**
* Subject of the notification.
@@ -86,29 +86,4 @@ class Notification extends PPModel
return $this->send_to_merchant;
}
/**
* A flag indicating whether a copy of the email has to be sent to the merchant.
*
* @deprecated Instead use setSendToMerchant
*
* @param bool $send_to_merchant
* @return $this
*/
public function setSend_to_merchant($send_to_merchant)
{
$this->send_to_merchant = $send_to_merchant;
return $this;
}
/**
* A flag indicating whether a copy of the email has to be sent to the merchant.
* @deprecated Instead use getSendToMerchant
*
* @return bool
*/
public function getSend_to_merchant()
{
return $this->send_to_merchant;
}
}

View File

@@ -1,19 +1,20 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* End-User's preferred address.
*/
class PPOpenIdAddress extends PPModel
class OpenIdAddress extends PayPalModel
{
/**
* Full street address component, which may include house number, street name.
*
* @param string $street_address
* @return self
*/
public function setStreetAddress($street_address)
{
@@ -35,6 +36,7 @@ class PPOpenIdAddress extends PPModel
* City or locality component.
*
* @param string $locality
* @return self
*/
public function setLocality($locality)
{
@@ -56,6 +58,7 @@ class PPOpenIdAddress extends PPModel
* State, province, prefecture or region component.
*
* @param string $region
* @return self
*/
public function setRegion($region)
{
@@ -77,6 +80,7 @@ class PPOpenIdAddress extends PPModel
* Zip code or postal code component.
*
* @param string $postal_code
* @return self
*/
public function setPostalCode($postal_code)
{
@@ -98,6 +102,7 @@ class PPOpenIdAddress extends PPModel
* Country name component.
*
* @param string $country
* @return self
*/
public function setCountry($country)
{

View File

@@ -1,18 +1,19 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Error resource
*/
class PPOpenIdError extends PPModel
class OpenIdError extends PayPalModel
{
/**
* A single ASCII error code from the following enum.
*
* @param string $error
* @return self
*/
public function setError($error)
{
@@ -34,6 +35,7 @@ class PPOpenIdError extends PPModel
* A resource ID that indicates the starting resource in the returned results.
*
* @param string $error_description
* @return self
*/
public function setErrorDescription($error_description)
{
@@ -55,6 +57,7 @@ class PPOpenIdError extends PPModel
* A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
*
* @param string $error_uri
* @return self
*/
public function setErrorUri($error_uri)
{

View File

@@ -1,11 +1,11 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Core\PPConstants;
use PayPal\Core\PayPalConstants;
use PayPal\Rest\ApiContext;
class PPOpenIdSession
class OpenIdSession
{
/**
@@ -19,6 +19,7 @@ class PPOpenIdSession
* @param string $clientId client id from developer portal
* See https://developer.paypal.com/webapps/developer/docs/integration/direct/log-in-with-paypal/detailed/#attributes for more
* @param ApiContext $apiContext Optional API Context
* @return string Authorization URL
*/
public static function getAuthorizationUrl($redirectUri, $scope, $clientId, $nonce = null, $state = null, $apiContext = null)
{
@@ -94,9 +95,9 @@ class PPOpenIdSession
} else if (array_key_exists('mode', $config)) {
switch (strtoupper($config['mode'])) {
case 'SANDBOX':
return PPConstants::OPENID_REDIRECT_SANDBOX_URL;
return PayPalConstants::OPENID_REDIRECT_SANDBOX_URL;
case 'LIVE':
return PPConstants::OPENID_REDIRECT_LIVE_URL;
return PayPalConstants::OPENID_REDIRECT_LIVE_URL;
}
}
return null;

View File

@@ -1,21 +1,22 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Token grant resource
*/
class PPOpenIdTokeninfo extends ResourceModel
class OpenIdTokeninfo extends PayPalResourceModel
{
/**
* OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
*
* @param string $scope
* @return self
*/
public function setScope($scope)
{
@@ -37,6 +38,7 @@ class PPOpenIdTokeninfo extends ResourceModel
* The access token issued by the authorization server.
*
* @param string $access_token
* @return self
*/
public function setAccessToken($access_token)
{
@@ -58,6 +60,7 @@ class PPOpenIdTokeninfo extends ResourceModel
* The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6.
*
* @param string $refresh_token
* @return self
*/
public function setRefreshToken($refresh_token)
{
@@ -79,6 +82,7 @@ class PPOpenIdTokeninfo extends ResourceModel
* The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1). Value is case insensitive.
*
* @param string $token_type
* @return self
*/
public function setTokenType($token_type)
{
@@ -100,6 +104,7 @@ class PPOpenIdTokeninfo extends ResourceModel
* The id_token is a session token assertion that denotes the user's authentication status
*
* @param string $id_token
* @return self
*/
public function setIdToken($id_token)
{
@@ -121,6 +126,7 @@ class PPOpenIdTokeninfo extends ResourceModel
* The lifetime in seconds of the access token.
*
* @param integer $expires_in
* @return self
*/
public function setExpiresIn($expires_in)
{
@@ -154,8 +160,8 @@ class PPOpenIdTokeninfo extends ResourceModel
* @param string $clientId
* @param string $clientSecret
* @param ApiContext $apiContext Optional API Context
* @param PPRestCall $restCall
* @return PPOpenIdTokeninfo
* @param PayPalRestCall $restCall
* @return OpenIdTokeninfo
*/
public static function createFromAuthorizationCode($params, $clientId = null, $clientSecret = null, $apiContext = null, $restCall = null)
{
@@ -188,7 +194,7 @@ class PPOpenIdTokeninfo extends ResourceModel
$apiContext,
$restCall
);
$token = new PPOpenIdTokeninfo();
$token = new OpenIdTokeninfo();
$token->fromJson($json);
return $token;
}
@@ -205,7 +211,7 @@ class PPOpenIdTokeninfo extends ResourceModel
* (optional) grant_type is the Token grant type. Defaults to refresh_token
* (optional) scope is an array that either the same or a subset of the scope passed to the authorization request
* @param APIContext $apiContext Optional API Context
* @return PPOpenIdTokeninfo
* @return OpenIdTokeninfo
*/
public function createFromRefreshToken($params, $apiContext = null)
{

View File

@@ -1,19 +1,20 @@
<?php
namespace PayPal\Auth\Openid;
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
/**
* OpenIdConnect UserInfo Resource
*/
class PPOpenIdUserinfo extends ResourceModel
class OpenIdUserinfo extends PayPalResourceModel
{
/**
* Subject - Identifier for the End-User at the Issuer.
*
* @param string $user_id
* @return self
*/
public function setUserId($user_id)
{
@@ -35,6 +36,7 @@ class PPOpenIdUserinfo extends ResourceModel
* Subject - Identifier for the End-User at the Issuer.
*
* @param string $sub
* @return self
*/
public function setSub($sub)
{
@@ -56,6 +58,7 @@ class PPOpenIdUserinfo extends ResourceModel
* End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
*
* @param string $name
* @return self
*/
public function setName($name)
{
@@ -77,6 +80,7 @@ class PPOpenIdUserinfo extends ResourceModel
* Given name(s) or first name(s) of the End-User
*
* @param string $given_name
* @return self
*/
public function setGivenName($given_name)
{
@@ -98,6 +102,7 @@ class PPOpenIdUserinfo extends ResourceModel
* Surname(s) or last name(s) of the End-User.
*
* @param string $family_name
* @return self
*/
public function setFamilyName($family_name)
{
@@ -119,6 +124,7 @@ class PPOpenIdUserinfo extends ResourceModel
* Middle name(s) of the End-User.
*
* @param string $middle_name
* @return self
*/
public function setMiddleName($middle_name)
{
@@ -140,6 +146,7 @@ class PPOpenIdUserinfo extends ResourceModel
* URL of the End-User's profile picture.
*
* @param string $picture
* @return self
*/
public function setPicture($picture)
{
@@ -161,6 +168,7 @@ class PPOpenIdUserinfo extends ResourceModel
* End-User's preferred e-mail address.
*
* @param string $email
* @return self
*/
public function setEmail($email)
{
@@ -182,6 +190,7 @@ class PPOpenIdUserinfo extends ResourceModel
* True if the End-User's e-mail address has been verified; otherwise false.
*
* @param boolean $email_verified
* @return self
*/
public function setEmailVerified($email_verified)
{
@@ -203,6 +212,7 @@ class PPOpenIdUserinfo extends ResourceModel
* End-User's gender.
*
* @param string $gender
* @return self
*/
public function setGender($gender)
{
@@ -224,6 +234,7 @@ class PPOpenIdUserinfo extends ResourceModel
* End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used.
*
* @param string $birthday
* @return self
*/
public function setBirthday($birthday)
{
@@ -245,6 +256,7 @@ class PPOpenIdUserinfo extends ResourceModel
* Time zone database representing the End-User's time zone
*
* @param string $zoneinfo
* @return self
*/
public function setZoneinfo($zoneinfo)
{
@@ -266,6 +278,7 @@ class PPOpenIdUserinfo extends ResourceModel
* End-User's locale.
*
* @param string $locale
* @return self
*/
public function setLocale($locale)
{
@@ -287,6 +300,7 @@ class PPOpenIdUserinfo extends ResourceModel
* End-User's language.
*
* @param string $language
* @return self
*/
public function setLanguage($language)
{
@@ -308,6 +322,7 @@ class PPOpenIdUserinfo extends ResourceModel
* End-User's verified status.
*
* @param boolean $verified
* @return self
*/
public function setVerified($verified)
{
@@ -329,6 +344,7 @@ class PPOpenIdUserinfo extends ResourceModel
* End-User's preferred telephone number.
*
* @param string $phone_number
* @return self
*/
public function setPhoneNumber($phone_number)
{
@@ -349,7 +365,8 @@ class PPOpenIdUserinfo extends ResourceModel
/**
* End-User's preferred address.
*
* @param \PayPal\Auth\Openid\PPOpenIdAddress $address
* @param \PayPal\Api\OpenIdAddress $address
* @return self
*/
public function setAddress($address)
{
@@ -360,7 +377,7 @@ class PPOpenIdUserinfo extends ResourceModel
/**
* End-User's preferred address.
*
* @return \PayPal\Auth\Openid\PPOpenIdAddress
* @return \PayPal\Api\OpenIdAddress
*/
public function getAddress()
{
@@ -371,6 +388,7 @@ class PPOpenIdUserinfo extends ResourceModel
* Verified account status.
*
* @param boolean $verified_account
* @return self
*/
public function setVerifiedAccount($verified_account)
{
@@ -392,6 +410,7 @@ class PPOpenIdUserinfo extends ResourceModel
* Account type.
*
* @param string $account_type
* @return self
*/
public function setAccountType($account_type)
{
@@ -413,6 +432,7 @@ class PPOpenIdUserinfo extends ResourceModel
* Account holder age range.
*
* @param string $age_range
* @return self
*/
public function setAgeRange($age_range)
{
@@ -434,6 +454,7 @@ class PPOpenIdUserinfo extends ResourceModel
* Account payer identifier.
*
* @param string $payer_id
* @return self
*/
public function setPayerId($payer_id)
{
@@ -460,7 +481,7 @@ class PPOpenIdUserinfo extends ResourceModel
* @param array $params (allowed values are access_token)
* access_token - access token from the createFromAuthorizationCode / createFromRefreshToken calls
* @param ApiContext $apiContext Optional API Context
* @return PPOpenIdUserinfo
* @return OpenIdUserinfo
*/
public static function getUserinfo($params, $apiContext = null)
{
@@ -485,7 +506,7 @@ class PPOpenIdUserinfo extends ResourceModel
$apiContext
);
$ret = new PPOpenIdUserinfo();
$ret = new OpenIdUserinfo();
$ret->fromJson($json);
return $ret;

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -24,7 +24,7 @@ use PayPal\Rest\ApiContext;
* @property string protection_eligibility_type
* @property \PayPal\Api\Links links
*/
class Order extends PPModel
class Order extends PayPalModel
{
/**
* Identifier of the order transaction.
@@ -74,31 +74,6 @@ class Order extends PPModel
return $this->purchase_unit_reference_id;
}
/**
* Identifier to the purchase unit associated with this object
*
* @deprecated Instead use setPurchaseUnitReferenceId
*
* @param string $purchase_unit_reference_id
* @return $this
*/
public function setPurchase_unit_reference_id($purchase_unit_reference_id)
{
$this->purchase_unit_reference_id = $purchase_unit_reference_id;
return $this;
}
/**
* Identifier to the purchase unit associated with this object
* @deprecated Instead use getPurchaseUnitReferenceId
*
* @return string
*/
public function getPurchase_unit_reference_id()
{
return $this->purchase_unit_reference_id;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
@@ -123,31 +98,6 @@ class Order extends PPModel
return $this->create_time;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Time the resource was created in UTC ISO8601 format.
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
@@ -172,31 +122,6 @@ class Order extends PPModel
return $this->update_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Amount being collected.
*
@@ -245,31 +170,6 @@ class Order extends PPModel
return $this->payment_mode;
}
/**
* specifies payment mode of the transaction
*
* @deprecated Instead use setPaymentMode
*
* @param string $payment_mode
* @return $this
*/
public function setPayment_mode($payment_mode)
{
$this->payment_mode = $payment_mode;
return $this;
}
/**
* specifies payment mode of the transaction
* @deprecated Instead use getPaymentMode
*
* @return string
*/
public function getPayment_mode()
{
return $this->payment_mode;
}
/**
* State of the order transaction.
* Valid Values: ["PENDING", "COMPLETED", "REFUNDED", "PARTIALLY_REFUNDED"]
@@ -318,31 +218,6 @@ class Order extends PPModel
return $this->reason_code;
}
/**
* Reason code for the transaction state being Pending or Reversed.
*
* @deprecated Instead use setReasonCode
*
* @param string $reason_code
* @return $this
*/
public function setReason_code($reason_code)
{
$this->reason_code = $reason_code;
return $this;
}
/**
* Reason code for the transaction state being Pending or Reversed.
* @deprecated Instead use getReasonCode
*
* @return string
*/
public function getReason_code()
{
return $this->reason_code;
}
/**
* Protection Eligibility of the Payer
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
@@ -367,31 +242,6 @@ class Order extends PPModel
return $this->{"protection-eligibility"};
}
/**
* Protection Eligibility of the Payer
*
* @deprecated Instead use setProtectionEligibility
*
* @param string $protection-eligibility
* @return $this
*/
public function setProtection_eligibility($protection_eligibility)
{
$this->{"protection-eligibility"} = $protection_eligibility;
return $this;
}
/**
* Protection Eligibility of the Payer
* @deprecated Instead use getProtectionEligibility
*
* @return string
*/
public function getProtection_eligibility()
{
return $this->{"protection-eligibility"};
}
/**
* Protection Eligibility Type of the Payer
* Valid Values: ["ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE", "INELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE"]
@@ -416,31 +266,6 @@ class Order extends PPModel
return $this->{"protection-eligibility_type"};
}
/**
* Protection Eligibility Type of the Payer
*
* @deprecated Instead use setProtectionEligibilityType
*
* @param string $protection-eligibility_type
* @return $this
*/
public function setProtection_eligibility_type($protection_eligibility_type)
{
$this->{"protection-eligibility_type"} = $protection_eligibility_type;
return $this;
}
/**
* Protection Eligibility Type of the Payer
* @deprecated Instead use getProtectionEligibilityType
*
* @return string
*/
public function getProtection_eligibility_type()
{
return $this->{"protection-eligibility_type"};
}
/**
* Sets Links
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class OverrideChargeModel
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string charge_id
* @property \PayPal\Api\Currency amount
*/
class OverrideChargeModel extends PPModel
class OverrideChargeModel extends PayPalModel
{
/**
* ID of charge model.
@@ -39,31 +39,6 @@ class OverrideChargeModel extends PPModel
return $this->charge_id;
}
/**
* ID of charge model.
*
* @deprecated Instead use setChargeId
*
* @param string $charge_id
* @return $this
*/
public function setCharge_id($charge_id)
{
$this->charge_id = $charge_id;
return $this;
}
/**
* ID of charge model.
* @deprecated Instead use getChargeId
*
* @return string
*/
public function getCharge_id()
{
return $this->charge_id;
}
/**
* Updated Amount to be associated with this charge model.
*

View File

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

View File

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

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property string merchant_id
* @property \PayPal\Api\Phone phone
*/
class Payee extends PPModel
class Payee extends PayPalModel
{
/**
* Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receiver PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements.
@@ -66,31 +66,6 @@ class Payee extends PPModel
return $this->merchant_id;
}
/**
* Encrypted PayPal Account identifier for the Payee.
*
* @deprecated Instead use setMerchantId
*
* @param string $merchant_id
* @return $this
*/
public function setMerchant_id($merchant_id)
{
$this->merchant_id = $merchant_id;
return $this;
}
/**
* Encrypted PayPal Account identifier for the Payee.
* @deprecated Instead use getMerchantId
*
* @return string
*/
public function getMerchant_id()
{
return $this->merchant_id;
}
/**
* Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet.
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Payer
@@ -17,7 +17,7 @@ use PayPal\Common\PPModel;
* @property string funding_option_id
* @property \PayPal\Api\PayerInfo payer_info
*/
class Payer extends PPModel
class Payer extends PayPalModel
{
/**
* Payment method being used - PayPal Wallet payment, Bank Direct Debit, or Direct Credit card.
@@ -43,31 +43,6 @@ class Payer extends PPModel
return $this->payment_method;
}
/**
* Payment method being used - PayPal Wallet payment, Bank Direct Debit, or Direct Credit card.
*
* @deprecated Instead use setPaymentMethod
*
* @param string $payment_method
* @return $this
*/
public function setPayment_method($payment_method)
{
$this->payment_method = $payment_method;
return $this;
}
/**
* Payment method being used - PayPal Wallet payment, Bank Direct Debit, or Direct Credit card.
* @deprecated Instead use getPaymentMethod
*
* @return string
*/
public function getPayment_method()
{
return $this->payment_method;
}
/**
* Status of Payer PayPal Account.
* Valid Values: ["VERIFIED", "UNVERIFIED"]
@@ -145,31 +120,6 @@ class Payer extends PPModel
);
}
/**
* List of funding instruments from which the funds of the current payment come. Typically a credit card.
*
* @deprecated Instead use setFundingInstruments
*
* @param \PayPal\Api\FundingInstrument $funding_instruments
* @return $this
*/
public function setFunding_instruments($funding_instruments)
{
$this->funding_instruments = $funding_instruments;
return $this;
}
/**
* List of funding instruments from which the funds of the current payment come. Typically a credit card.
* @deprecated Instead use getFundingInstruments
*
* @return \PayPal\Api\FundingInstrument
*/
public function getFunding_instruments()
{
return $this->funding_instruments;
}
/**
* Id of user selected funding option for the payment. 'OneOf' funding_instruments or funding_option_id to be present.
*
@@ -193,31 +143,6 @@ class Payer extends PPModel
return $this->funding_option_id;
}
/**
* Id of user selected funding option for the payment. 'OneOf' funding_instruments or funding_option_id to be present.
*
* @deprecated Instead use setFundingOptionId
*
* @param string $funding_option_id
* @return $this
*/
public function setFunding_option_id($funding_option_id)
{
$this->funding_option_id = $funding_option_id;
return $this;
}
/**
* Id of user selected funding option for the payment. 'OneOf' funding_instruments or funding_option_id to be present.
* @deprecated Instead use getFundingOptionId
*
* @return string
*/
public function getFunding_option_id()
{
return $this->funding_option_id;
}
/**
* Information related to the Payer.
*
@@ -241,29 +166,4 @@ class Payer extends PPModel
return $this->payer_info;
}
/**
* Information related to the Payer.
*
* @deprecated Instead use setPayerInfo
*
* @param \PayPal\Api\PayerInfo $payer_info
* @return $this
*/
public function setPayer_info($payer_info)
{
$this->payer_info = $payer_info;
return $this;
}
/**
* Information related to the Payer.
* @deprecated Instead use getPayerInfo
*
* @return \PayPal\Api\PayerInfo
*/
public function getPayer_info()
{
return $this->payer_info;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PayerInfo
@@ -25,7 +25,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Address billing_address
* @property \PayPal\Api\ShippingAddress shipping_address
*/
class PayerInfo extends PPModel
class PayerInfo extends PayPalModel
{
/**
* Email address representing the Payer.
@@ -73,31 +73,6 @@ class PayerInfo extends PPModel
return $this->external_remember_me_id;
}
/**
* External Remember Me id representing the Payer
*
* @deprecated Instead use setExternalRememberMeId
*
* @param string $external_remember_me_id
* @return $this
*/
public function setExternal_remember_me_id($external_remember_me_id)
{
$this->external_remember_me_id = $external_remember_me_id;
return $this;
}
/**
* External Remember Me id representing the Payer
* @deprecated Instead use getExternalRememberMeId
*
* @return string
*/
public function getExternal_remember_me_id()
{
return $this->external_remember_me_id;
}
/**
* Account Number representing the Payer
*
@@ -121,31 +96,6 @@ class PayerInfo extends PPModel
return $this->buyer_account_number;
}
/**
* Account Number representing the Payer
*
* @deprecated Instead use setBuyerAccountNumber
*
* @param string $buyer_account_number
* @return $this
*/
public function setBuyer_account_number($buyer_account_number)
{
$this->buyer_account_number = $buyer_account_number;
return $this;
}
/**
* Account Number representing the Payer
* @deprecated Instead use getBuyerAccountNumber
*
* @return string
*/
public function getBuyer_account_number()
{
return $this->buyer_account_number;
}
/**
* First Name of the Payer.
*
@@ -169,31 +119,6 @@ class PayerInfo extends PPModel
return $this->first_name;
}
/**
* First Name of the Payer.
*
* @deprecated Instead use setFirstName
*
* @param string $first_name
* @return $this
*/
public function setFirst_name($first_name)
{
$this->first_name = $first_name;
return $this;
}
/**
* First Name of the Payer.
* @deprecated Instead use getFirstName
*
* @return string
*/
public function getFirst_name()
{
return $this->first_name;
}
/**
* Last Name of the Payer.
*
@@ -217,31 +142,6 @@ class PayerInfo extends PPModel
return $this->last_name;
}
/**
* Last Name of the Payer.
*
* @deprecated Instead use setLastName
*
* @param string $last_name
* @return $this
*/
public function setLast_name($last_name)
{
$this->last_name = $last_name;
return $this;
}
/**
* Last Name of the Payer.
* @deprecated Instead use getLastName
*
* @return string
*/
public function getLast_name()
{
return $this->last_name;
}
/**
* PayPal assigned Payer ID.
*
@@ -265,31 +165,6 @@ class PayerInfo extends PPModel
return $this->payer_id;
}
/**
* PayPal assigned Payer ID.
*
* @deprecated Instead use setPayerId
*
* @param string $payer_id
* @return $this
*/
public function setPayer_id($payer_id)
{
$this->payer_id = $payer_id;
return $this;
}
/**
* PayPal assigned Payer ID.
* @deprecated Instead use getPayerId
*
* @return string
*/
public function getPayer_id()
{
return $this->payer_id;
}
/**
* Phone number representing the Payer.
*
@@ -337,31 +212,6 @@ class PayerInfo extends PPModel
return $this->phone_type;
}
/**
* Phone type
*
* @deprecated Instead use setPhoneType
*
* @param string $phone_type
* @return $this
*/
public function setPhone_type($phone_type)
{
$this->phone_type = $phone_type;
return $this;
}
/**
* Phone type
* @deprecated Instead use getPhoneType
*
* @return string
*/
public function getPhone_type()
{
return $this->phone_type;
}
/**
* Birth date of the Payer in ISO8601 format (YYYY-MM-DD).
*
@@ -385,31 +235,6 @@ class PayerInfo extends PPModel
return $this->birth_date;
}
/**
* Birth date of the Payer in ISO8601 format (YYYY-MM-DD).
*
* @deprecated Instead use setBirthDate
*
* @param string $birth_date
* @return $this
*/
public function setBirth_date($birth_date)
{
$this->birth_date = $birth_date;
return $this;
}
/**
* Birth date of the Payer in ISO8601 format (YYYY-MM-DD).
* @deprecated Instead use getBirthDate
*
* @return string
*/
public function getBirth_date()
{
return $this->birth_date;
}
/**
* Payer's tax ID.
*
@@ -433,31 +258,6 @@ class PayerInfo extends PPModel
return $this->tax_id;
}
/**
* Payer's tax ID.
*
* @deprecated Instead use setTaxId
*
* @param string $tax_id
* @return $this
*/
public function setTax_id($tax_id)
{
$this->tax_id = $tax_id;
return $this;
}
/**
* Payer's tax ID.
* @deprecated Instead use getTaxId
*
* @return string
*/
public function getTax_id()
{
return $this->tax_id;
}
/**
* Payer's tax ID type.
* Valid Values: ["BR_CPF", "BR_CNPJ"]
@@ -482,31 +282,6 @@ class PayerInfo extends PPModel
return $this->tax_id_type;
}
/**
* Payer's tax ID type.
*
* @deprecated Instead use setTaxIdType
*
* @param string $tax_id_type
* @return $this
*/
public function setTax_id_type($tax_id_type)
{
$this->tax_id_type = $tax_id_type;
return $this;
}
/**
* Payer's tax ID type.
* @deprecated Instead use getTaxIdType
*
* @return string
*/
public function getTax_id_type()
{
return $this->tax_id_type;
}
/**
* Billing address of the Payer.
*
@@ -530,31 +305,6 @@ class PayerInfo extends PPModel
return $this->billing_address;
}
/**
* Billing address of the Payer.
*
* @deprecated Instead use setBillingAddress
*
* @param \PayPal\Api\Address $billing_address
* @return $this
*/
public function setBilling_address($billing_address)
{
$this->billing_address = $billing_address;
return $this;
}
/**
* Billing address of the Payer.
* @deprecated Instead use getBillingAddress
*
* @return \PayPal\Api\Address
*/
public function getBilling_address()
{
return $this->billing_address;
}
/**
* Obsolete. Use shipping address present in purchase unit.
*
@@ -578,29 +328,4 @@ class PayerInfo extends PPModel
return $this->shipping_address;
}
/**
* Obsolete. Use shipping address present in purchase unit.
*
* @deprecated Instead use setShippingAddress
*
* @param \PayPal\Api\ShippingAddress $shipping_address
* @return $this
*/
public function setShipping_address($shipping_address)
{
$this->shipping_address = $shipping_address;
return $this;
}
/**
* Obsolete. Use shipping address present in purchase unit.
* @deprecated Instead use getShippingAddress
*
* @return \PayPal\Api\ShippingAddress
*/
public function getShipping_address()
{
return $this->shipping_address;
}
}

View File

@@ -2,12 +2,13 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Core\PayPalConstants;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\PaymentHistory;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -26,29 +27,10 @@ use PayPal\Validation\ArgumentValidator;
* @property \PayPal\Api\Transaction[] transactions
* @property string state
* @property \PayPal\Api\RedirectUrls redirect_urls
* @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
*
* @var \PayPal\Auth\OAuthTokenCredential $credential
*/
protected static $credential;
/**
* Sets Credential
*
* @deprecated Pass ApiContext to create/get methods instead
* @param \PayPal\Auth\OAuthTokenCredential $credential
*/
public static function setCredential($credential)
{
self::$credential = $credential;
}
/**
* Identifier of the payment resource created.
*
@@ -97,31 +79,6 @@ class Payment extends ResourceModel
return $this->create_time;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Time the resource was created in UTC ISO8601 format.
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
@@ -146,31 +103,6 @@ class Payment extends ResourceModel
return $this->update_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Intent of the payment - Sale or Authorization or Order.
* Valid Values: ["sale", "authorize", "order"]
@@ -315,55 +247,6 @@ class Payment extends ResourceModel
return $this->redirect_urls;
}
/**
* Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
*
* @deprecated Instead use setRedirectUrls
*
* @param \PayPal\Api\RedirectUrls $redirect_urls
* @return $this
*/
public function setRedirect_urls($redirect_urls)
{
$this->redirect_urls = $redirect_urls;
return $this;
}
/**
* Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
* @deprecated Instead use getRedirectUrls
*
* @return \PayPal\Api\RedirectUrls
*/
public function getRedirect_urls()
{
return $this->redirect_urls;
}
/**
* Sets Links
*
*
* @param \PayPal\Api\Links $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
/**
* Set Experience_profile_id
* experience_profile_id of the payment
@@ -389,11 +272,21 @@ class Payment extends ResourceModel
return $this->experience_profile_id;
}
/**
* Get Approval Link
*
* @return null|string
*/
public function getApprovalLink()
{
return $this->getLink(PayPalConstants::APPROVAL_URL);
}
/**
* 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 +310,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 +336,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 +360,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 +386,7 @@ class Payment extends ResourceModel
*
* @param array $params
* @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return PaymentHistory
*/
public static function all($params, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentCard
@@ -27,7 +27,7 @@ use PayPal\Common\PPModel;
* @property string valid_until
* @property \PayPal\Api\Links[] links
*/
class PaymentCard extends PPModel
class PaymentCard extends PayPalModel
{
/**
* ID of the credit card being saved for later use.
@@ -122,31 +122,6 @@ class PaymentCard extends PPModel
return $this->expire_month;
}
/**
* 2 digit card expiry month.
*
* @deprecated Instead use setExpireMonth
*
* @param int $expire_month
* @return $this
*/
public function setExpire_month($expire_month)
{
$this->expire_month = $expire_month;
return $this;
}
/**
* 2 digit card expiry month.
* @deprecated Instead use getExpireMonth
*
* @return int
*/
public function getExpire_month()
{
return $this->expire_month;
}
/**
* 4 digit card expiry year.
*
@@ -170,31 +145,6 @@ class PaymentCard extends PPModel
return $this->expire_year;
}
/**
* 4 digit card expiry year.
*
* @deprecated Instead use setExpireYear
*
* @param int $expire_year
* @return $this
*/
public function setExpire_year($expire_year)
{
$this->expire_year = $expire_year;
return $this;
}
/**
* 4 digit card expiry year.
* @deprecated Instead use getExpireYear
*
* @return int
*/
public function getExpire_year()
{
return $this->expire_year;
}
/**
* 2 digit card start month.
*
@@ -218,31 +168,6 @@ class PaymentCard extends PPModel
return $this->start_month;
}
/**
* 2 digit card start month.
*
* @deprecated Instead use setStartMonth
*
* @param int $start_month
* @return $this
*/
public function setStart_month($start_month)
{
$this->start_month = $start_month;
return $this;
}
/**
* 2 digit card start month.
* @deprecated Instead use getStartMonth
*
* @return int
*/
public function getStart_month()
{
return $this->start_month;
}
/**
* 4 digit card start year.
*
@@ -266,31 +191,6 @@ class PaymentCard extends PPModel
return $this->start_year;
}
/**
* 4 digit card start year.
*
* @deprecated Instead use setStartYear
*
* @param int $start_year
* @return $this
*/
public function setStart_year($start_year)
{
$this->start_year = $start_year;
return $this;
}
/**
* 4 digit card start year.
* @deprecated Instead use getStartYear
*
* @return int
*/
public function getStart_year()
{
return $this->start_year;
}
/**
* Card validation code. Only supported when making a Payment, but not when saving a payment card for future use.
*
@@ -337,31 +237,6 @@ class PaymentCard extends PPModel
return $this->first_name;
}
/**
* Card holder's first name.
*
* @deprecated Instead use setFirstName
*
* @param string $first_name
* @return $this
*/
public function setFirst_name($first_name)
{
$this->first_name = $first_name;
return $this;
}
/**
* Card holder's first name.
* @deprecated Instead use getFirstName
*
* @return string
*/
public function getFirst_name()
{
return $this->first_name;
}
/**
* Card holder's last name.
*
@@ -385,31 +260,6 @@ class PaymentCard extends PPModel
return $this->last_name;
}
/**
* Card holder's last name.
*
* @deprecated Instead use setLastName
*
* @param string $last_name
* @return $this
*/
public function setLast_name($last_name)
{
$this->last_name = $last_name;
return $this;
}
/**
* Card holder's last name.
* @deprecated Instead use getLastName
*
* @return string
*/
public function getLast_name()
{
return $this->last_name;
}
/**
* Billing Address associated with this card.
*
@@ -433,31 +283,6 @@ class PaymentCard extends PPModel
return $this->billing_address;
}
/**
* Billing Address associated with this card.
*
* @deprecated Instead use setBillingAddress
*
* @param \PayPal\Api\Address $billing_address
* @return $this
*/
public function setBilling_address($billing_address)
{
$this->billing_address = $billing_address;
return $this;
}
/**
* Billing Address associated with this card.
* @deprecated Instead use getBillingAddress
*
* @return \PayPal\Api\Address
*/
public function getBilling_address()
{
return $this->billing_address;
}
/**
* A unique identifier of the customer to whom this card account belongs. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
*
@@ -481,31 +306,6 @@ class PaymentCard extends PPModel
return $this->external_customer_id;
}
/**
* A unique identifier of the customer to whom this card account belongs. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
*
* @deprecated Instead use setExternalCustomerId
*
* @param string $external_customer_id
* @return $this
*/
public function setExternal_customer_id($external_customer_id)
{
$this->external_customer_id = $external_customer_id;
return $this;
}
/**
* A unique identifier of the customer to whom this card account belongs. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
* @deprecated Instead use getExternalCustomerId
*
* @return string
*/
public function getExternal_customer_id()
{
return $this->external_customer_id;
}
/**
* State of the funding instrument.
* Valid Values: ["EXPIRED", "ACTIVE"]
@@ -553,31 +353,6 @@ class PaymentCard extends PPModel
return $this->valid_until;
}
/**
* Date/Time until this resource can be used to fund a payment.
*
* @deprecated Instead use setValidUntil
*
* @param string $valid_until
* @return $this
*/
public function setValid_until($valid_until)
{
$this->valid_until = $valid_until;
return $this;
}
/**
* Date/Time until this resource can be used to fund a payment.
* @deprecated Instead use getValidUntil
*
* @return string
*/
public function getValid_until()
{
return $this->valid_until;
}
/**
* Sets Links
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentCardToken
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property int expire_month
* @property int expire_year
*/
class PaymentCardToken extends PPModel
class PaymentCardToken extends PayPalModel
{
/**
* ID of a previously saved Payment Card resource.
@@ -43,31 +43,6 @@ class PaymentCardToken extends PPModel
return $this->payment_card_id;
}
/**
* ID of a previously saved Payment Card resource.
*
* @deprecated Instead use setPaymentCardId
*
* @param string $payment_card_id
* @return $this
*/
public function setPayment_card_id($payment_card_id)
{
$this->payment_card_id = $payment_card_id;
return $this;
}
/**
* ID of a previously saved Payment Card resource.
* @deprecated Instead use getPaymentCardId
*
* @return string
*/
public function getPayment_card_id()
{
return $this->payment_card_id;
}
/**
* The unique identifier of the payer used when saving this payment card.
*
@@ -91,31 +66,6 @@ class PaymentCardToken extends PPModel
return $this->external_customer_id;
}
/**
* The unique identifier of the payer used when saving this payment card.
*
* @deprecated Instead use setExternalCustomerId
*
* @param string $external_customer_id
* @return $this
*/
public function setExternal_customer_id($external_customer_id)
{
$this->external_customer_id = $external_customer_id;
return $this;
}
/**
* The unique identifier of the payer used when saving this payment card.
* @deprecated Instead use getExternalCustomerId
*
* @return string
*/
public function getExternal_customer_id()
{
return $this->external_customer_id;
}
/**
* Last 4 digits of the card number from the saved card.
*
@@ -186,31 +136,6 @@ class PaymentCardToken extends PPModel
return $this->expire_month;
}
/**
* Expiry month from the saved card with value 1 - 12.
*
* @deprecated Instead use setExpireMonth
*
* @param int $expire_month
* @return $this
*/
public function setExpire_month($expire_month)
{
$this->expire_month = $expire_month;
return $this;
}
/**
* Expiry month from the saved card with value 1 - 12.
* @deprecated Instead use getExpireMonth
*
* @return int
*/
public function getExpire_month()
{
return $this->expire_month;
}
/**
* Four digit expiry year from the saved card, represented as YYYY format.
*
@@ -234,29 +159,4 @@ class PaymentCardToken extends PPModel
return $this->expire_year;
}
/**
* Four digit expiry year from the saved card, represented as YYYY format.
*
* @deprecated Instead use setExpireYear
*
* @param int $expire_year
* @return $this
*/
public function setExpire_year($expire_year)
{
$this->expire_year = $expire_year;
return $this;
}
/**
* Four digit expiry year from the saved card, represented as YYYY format.
* @deprecated Instead use getExpireYear
*
* @return int
*/
public function getExpire_year()
{
return $this->expire_year;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentDefinition
@@ -20,7 +20,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Currency amount
* @property \PayPal\Api\ChargeModel[] charge_models
*/
class PaymentDefinition extends PPModel
class PaymentDefinition extends PayPalModel
{
/**
* Identifier of the payment_definition. 128 characters max.
@@ -114,31 +114,6 @@ class PaymentDefinition extends PPModel
return $this->frequency_interval;
}
/**
* How frequently the customer should be charged.
*
* @deprecated Instead use setFrequencyInterval
*
* @param string $frequency_interval
* @return $this
*/
public function setFrequency_interval($frequency_interval)
{
$this->frequency_interval = $frequency_interval;
return $this;
}
/**
* How frequently the customer should be charged.
* @deprecated Instead use getFrequencyInterval
*
* @return string
*/
public function getFrequency_interval()
{
return $this->frequency_interval;
}
/**
* Frequency of the payment definition offered. Allowed values: `WEEK`, `DAY`, `YEAR`, `MONTH`.
*
@@ -261,29 +236,4 @@ class PaymentDefinition extends PPModel
);
}
/**
* Array of charge_models for this payment definition.
*
* @deprecated Instead use setChargeModels
*
* @param \PayPal\Api\ChargeModel $charge_models
* @return $this
*/
public function setCharge_models($charge_models)
{
$this->charge_models = $charge_models;
return $this;
}
/**
* Array of charge_models for this payment definition.
* @deprecated Instead use getChargeModels
*
* @return \PayPal\Api\ChargeModel
*/
public function getCharge_models()
{
return $this->charge_models;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentDetail
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string method
* @property string note
*/
class PaymentDetail extends PPModel
class PaymentDetail extends PayPalModel
{
/**
* PayPal payment detail indicating whether payment was made in an invoicing flow via PayPal or externally. In the case of the mark-as-paid API, payment type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.
@@ -67,31 +67,6 @@ class PaymentDetail extends PPModel
return $this->transaction_id;
}
/**
* PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
*
* @deprecated Instead use setTransactionId
*
* @param string $transaction_id
* @return $this
*/
public function setTransaction_id($transaction_id)
{
$this->transaction_id = $transaction_id;
return $this;
}
/**
* PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
* @deprecated Instead use getTransactionId
*
* @return string
*/
public function getTransaction_id()
{
return $this->transaction_id;
}
/**
* Type of the transaction.
* Valid Values: ["SALE", "AUTHORIZATION", "CAPTURE"]
@@ -116,31 +91,6 @@ class PaymentDetail extends PPModel
return $this->transaction_type;
}
/**
* Type of the transaction.
*
* @deprecated Instead use setTransactionType
*
* @param string $transaction_type
* @return $this
*/
public function setTransaction_type($transaction_type)
{
$this->transaction_type = $transaction_type;
return $this;
}
/**
* Type of the transaction.
* @deprecated Instead use getTransactionType
*
* @return string
*/
public function getTransaction_type()
{
return $this->transaction_type;
}
/**
* Date when the invoice was paid. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -15,7 +15,7 @@ use PayPal\Rest\ApiContext;
* @property string payer_id
* @property \PayPal\Api\Transactions transactions
*/
class PaymentExecution extends PPModel
class PaymentExecution extends PayPalModel
{
/**
* PayPal assigned Payer ID returned in the approval return url.
@@ -41,31 +41,6 @@ class PaymentExecution extends PPModel
return $this->payer_id;
}
/**
* PayPal assigned Payer ID returned in the approval return url.
*
* @deprecated Instead use setPayerId
*
* @param string $payer_id
* @return $this
*/
public function setPayer_id($payer_id)
{
$this->payer_id = $payer_id;
return $this;
}
/**
* PayPal assigned Payer ID returned in the approval return url.
* @deprecated Instead use getPayerId
*
* @return string
*/
public function getPayer_id()
{
return $this->payer_id;
}
/**
* If the amount needs to be updated after obtaining the PayPal Payer info (eg. shipping address), it can be updated using this element.
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property int count
* @property string next_id
*/
class PaymentHistory extends PPModel
class PaymentHistory extends PayPalModel
{
/**
* A list of Payment resources
@@ -90,29 +90,4 @@ class PaymentHistory extends PPModel
return $this->next_id;
}
/**
* Identifier of the next element to get the next range of results.
*
* @deprecated Instead use setNextId
*
* @param string $next_id
* @return $this
*/
public function setNext_id($next_id)
{
$this->next_id = $next_id;
return $this;
}
/**
* Identifier of the next element to get the next range of results.
* @deprecated Instead use getNextId
*
* @return string
*/
public function getNext_id()
{
return $this->next_id;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -14,7 +14,7 @@ use PayPal\Rest\ApiContext;
*
* @property string allowed_payment_method
*/
class PaymentOptions extends PPModel
class PaymentOptions extends PayPalModel
{
/**
* Payment method requested for this purchase unit
@@ -40,29 +40,4 @@ class PaymentOptions extends PPModel
return $this->allowed_payment_method;
}
/**
* Payment method requested for this purchase unit
*
* @deprecated Instead use setAllowedPaymentMethod
*
* @param string $allowed_payment_method
* @return $this
*/
public function setAllowed_payment_method($allowed_payment_method)
{
$this->allowed_payment_method = $allowed_payment_method;
return $this;
}
/**
* Payment method requested for this purchase unit
* @deprecated Instead use getAllowedPaymentMethod
*
* @return string
*/
public function getAllowed_payment_method()
{
return $this->allowed_payment_method;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PaymentTerm
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string term_type
* @property string due_date
*/
class PaymentTerm extends PPModel
class PaymentTerm extends PayPalModel
{
/**
* Terms by which the invoice payment is due.
@@ -40,31 +40,6 @@ class PaymentTerm extends PPModel
return $this->term_type;
}
/**
* Terms by which the invoice payment is due.
*
* @deprecated Instead use setTermType
*
* @param string $term_type
* @return $this
*/
public function setTerm_type($term_type)
{
$this->term_type = $term_type;
return $this;
}
/**
* Terms by which the invoice payment is due.
* @deprecated Instead use getTermType
*
* @return string
*/
public function getTerm_type()
{
return $this->term_type;
}
/**
* Date on which invoice payment is due. It must be always a future date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -88,29 +63,4 @@ class PaymentTerm extends PPModel
return $this->due_date;
}
/**
* Date on which invoice payment is due. It must be always a future date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setDueDate
*
* @param string $due_date
* @return $this
*/
public function setDue_date($due_date)
{
$this->due_date = $due_date;
return $this;
}
/**
* Date on which invoice payment is due. It must be always a future date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getDueDate
*
* @return string
*/
public function getDue_date()
{
return $this->due_date;
}
}

166
lib/PayPal/Api/Payout.php Normal file
View File

@@ -0,0 +1,166 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalResourceModel;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
/**
* Class Payout
*
* This object represents a set of payouts that includes status data for the payouts. This object enables you to create a payout using a POST request.
*
* @package PayPal\Api
*
* @property \PayPal\Api\PayoutSenderBatchHeader sender_batch_header
* @property \PayPal\Api\PayoutItem[] items
* @property \PayPal\Api\Links[] links
*/
class Payout extends PayPalResourceModel
{
/**
* The original batch header as provided by the payment sender.
*
* @param \PayPal\Api\PayoutSenderBatchHeader $sender_batch_header
*
* @return $this
*/
public function setSenderBatchHeader($sender_batch_header)
{
$this->sender_batch_header = $sender_batch_header;
return $this;
}
/**
* The original batch header as provided by the payment sender.
*
* @return \PayPal\Api\PayoutSenderBatchHeader
*/
public function getSenderBatchHeader()
{
return $this->sender_batch_header;
}
/**
* An array of payout items (that is, a set of individual payouts).
*
* @param \PayPal\Api\PayoutItem[] $items
*
* @return $this
*/
public function setItems($items)
{
$this->items = $items;
return $this;
}
/**
* An array of payout items (that is, a set of individual payouts).
*
* @return \PayPal\Api\PayoutItem[]
*/
public function getItems()
{
return $this->items;
}
/**
* Append Items to the list.
*
* @param \PayPal\Api\PayoutItem $payoutItem
* @return $this
*/
public function addItem($payoutItem)
{
if (!$this->getItems()) {
return $this->setItems(array($payoutItem));
} else {
return $this->setItems(
array_merge($this->getItems(), array($payoutItem))
);
}
}
/**
* Remove Items from the list.
*
* @param \PayPal\Api\PayoutItem $payoutItem
* @return $this
*/
public function removeItem($payoutItem)
{
return $this->setItems(
array_diff($this->getItems(), array($payoutItem))
);
}
/**
* Create a payout batch resource by passing a sender_batch_header and an items array to the request URI. The sender_batch_header contains payout parameters that describe the handling of a batch resource while the items array conatins payout items.
*
* @param array $params
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return PayoutBatch
*/
public function create($params = array(), $apiContext = null, $restCall = null)
{
$params = $params ? $params : array();
ArgumentValidator::validate($params, 'params');
$payLoad = $this->toJSON();
$allowedParams = array(
'sync_mode' => 1,
);
$json = self::executeCall(
"/v1/payments/payouts" . "?" . http_build_query(array_intersect_key($params, $allowedParams)),
"POST",
$payLoad,
null,
$apiContext,
$restCall
);
$ret = new PayoutBatch();
$ret->fromJson($json);
return $ret;
}
/**
* You can submit a payout with a synchronous API call, which immediately returns the results of a PayPal payment.
*
* @param ApiContext $apiContext
* @param PayPalRestCall $restCall
* @return PayoutBatch
*/
public function createSynchronous($apiContext = null, $restCall = null)
{
$params = array('sync_mode' => 'true');
return $this->create($params, $apiContext, $restCall);
}
/**
* Obtain the status of a specific batch resource by passing the payout batch ID to the request URI. You can issue this call multiple times to get the current status.
*
* @param string $payoutBatchId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return PayoutBatch
*/
public static function get($payoutBatchId, $apiContext = null, $restCall = null)
{
ArgumentValidator::validate($payoutBatchId, 'payoutBatchId');
$payLoad = "";
$json = self::executeCall(
"/v1/payments/payouts/$payoutBatchId",
"GET",
$payLoad,
null,
$apiContext,
$restCall
);
$ret = new PayoutBatch();
$ret->fromJson($json);
return $ret;
}
}

View File

@@ -0,0 +1,120 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalModel;
/**
* Class PayoutBatch
*
* The batch status as generated by PayPal.
*
* @package PayPal\Api
*
* @property \PayPal\Api\PayoutBatchHeader batch_header
* @property \PayPal\Api\PayoutItemDetails[] items
* @property \PayPal\Api\Links[] links
*/
class PayoutBatch extends PayPalModel
{
/**
* A batch header that includes the generated batch status.
*
* @param \PayPal\Api\PayoutBatchHeader $batch_header
*
* @return $this
*/
public function setBatchHeader($batch_header)
{
$this->batch_header = $batch_header;
return $this;
}
/**
* A batch header that includes the generated batch status.
*
* @return \PayPal\Api\PayoutBatchHeader
*/
public function getBatchHeader()
{
return $this->batch_header;
}
/**
* Array of the items in a batch payout.
*
* @param \PayPal\Api\PayoutItemDetails[] $items
*
* @return $this
*/
public function setItems($items)
{
$this->items = $items;
return $this;
}
/**
* Array of the items in a batch payout.
*
* @return \PayPal\Api\PayoutItemDetails[]
*/
public function getItems()
{
return $this->items;
}
/**
* Append Items to the list.
*
* @param \PayPal\Api\PayoutItemDetails $payoutItemDetails
* @return $this
*/
public function addItem($payoutItemDetails)
{
if (!$this->getItems()) {
return $this->setItems(array($payoutItemDetails));
} else {
return $this->setItems(
array_merge($this->getItems(), array($payoutItemDetails))
);
}
}
/**
* Remove Items from the list.
*
* @param \PayPal\Api\PayoutItemDetails $payoutItemDetails
* @return $this
*/
public function removeItem($payoutItemDetails)
{
return $this->setItems(
array_diff($this->getItems(), array($payoutItemDetails))
);
}
/**
* Sets Links
*
* @param \PayPal\Api\Links[] $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
}

View File

@@ -0,0 +1,263 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalModel;
/**
* Class PayoutBatchHeader
*
* This object enables you to get payout header information for an entire batch request. This object represents payout header data, and can be the response to a batch header request.
*
* @package PayPal\Api
*
* @property string payout_batch_id
* @property string batch_status
* @property string time_created
* @property string time_completed
* @property \PayPal\Api\PayoutSenderBatchHeader sender_batch_header
* @property \PayPal\Api\Currency amount
* @property \PayPal\Api\Currency fees
* @property \PayPal\Api\Error errors
* @property \PayPal\Api\Links[] links
*/
class PayoutBatchHeader extends PayPalModel
{
/**
* An ID for the batch payout. Generated by PayPal. 30 characters max.
*
* @param string $payout_batch_id
*
* @return $this
*/
public function setPayoutBatchId($payout_batch_id)
{
$this->payout_batch_id = $payout_batch_id;
return $this;
}
/**
* An ID for the batch payout. Generated by PayPal. 30 characters max.
*
* @return string
*/
public function getPayoutBatchId()
{
return $this->payout_batch_id;
}
/**
* Generated batch status.
*
* @param string $batch_status
*
* @return $this
*/
public function setBatchStatus($batch_status)
{
$this->batch_status = $batch_status;
return $this;
}
/**
* Generated batch status.
*
* @return string
*/
public function getBatchStatus()
{
return $this->batch_status;
}
/**
* The time the batch entered processing.
*
* @param string $time_created
*
* @return $this
*/
public function setTimeCreated($time_created)
{
$this->time_created = $time_created;
return $this;
}
/**
* The time the batch entered processing.
*
* @return string
*/
public function getTimeCreated()
{
return $this->time_created;
}
/**
* The time that processing for the batch was completed.
*
* @param string $time_completed
*
* @return $this
*/
public function setTimeCompleted($time_completed)
{
$this->time_completed = $time_completed;
return $this;
}
/**
* The time that processing for the batch was completed.
*
* @return string
*/
public function getTimeCompleted()
{
return $this->time_completed;
}
/**
* The original batch header as provided by the payment sender.
*
* @param \PayPal\Api\PayoutSenderBatchHeader $sender_batch_header
*
* @return $this
*/
public function setSenderBatchHeader($sender_batch_header)
{
$this->sender_batch_header = $sender_batch_header;
return $this;
}
/**
* The original batch header as provided by the payment sender.
*
* @return \PayPal\Api\PayoutSenderBatchHeader
*/
public function getSenderBatchHeader()
{
return $this->sender_batch_header;
}
/**
* Total amount, in U.S. dollars, requested for the applicable payouts.
*
* @param \PayPal\Api\Currency $amount
*
* @return $this
*/
public function setAmount($amount)
{
$this->amount = $amount;
return $this;
}
/**
* Total amount, in U.S. dollars, requested for the applicable payouts.
*
* @return \PayPal\Api\Currency
*/
public function getAmount()
{
return $this->amount;
}
/**
* Total estimate in U.S. dollars for the applicable payouts fees.
*
* @param \PayPal\Api\Currency $fees
*
* @return $this
*/
public function setFees($fees)
{
$this->fees = $fees;
return $this;
}
/**
* Total estimate in U.S. dollars for the applicable payouts fees.
*
* @return \PayPal\Api\Currency
*/
public function getFees()
{
return $this->fees;
}
/**
* Sets Errors
*
* @param \PayPal\Api\Error $errors
*
* @return $this
*/
public function setErrors($errors)
{
$this->errors = $errors;
return $this;
}
/**
* Gets Errors
*
* @return \PayPal\Api\Error
*/
public function getErrors()
{
return $this->errors;
}
/**
* Sets Links
*
* @param \PayPal\Api\Links[] $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
/**
* Append Links to the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function addLink($links)
{
if (!$this->getLinks()) {
return $this->setLinks(array($links));
} else {
return $this->setLinks(
array_merge($this->getLinks(), array($links))
);
}
}
/**
* Remove Links from the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function removeLink($links)
{
return $this->setLinks(
array_diff($this->getLinks(), array($links))
);
}
}

View File

@@ -0,0 +1,165 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PayPalRestCall;
/**
* Class PayoutItem
*
* Sender-created description of a payout to a single recipient.
*
* @package PayPal\Api
*
* @property string recipient_type
* @property \PayPal\Api\Currency amount
* @property string note
* @property string receiver
* @property string sender_item_id
*/
class PayoutItem extends PayPalResourceModel
{
/**
* The type of identification for the payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`.
*
* @param string $recipient_type
*
* @return $this
*/
public function setRecipientType($recipient_type)
{
$this->recipient_type = $recipient_type;
return $this;
}
/**
* The type of identification for the payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`.
*
* @return string
*/
public function getRecipientType()
{
return $this->recipient_type;
}
/**
* The amount of money to pay a receiver.
*
* @param \PayPal\Api\Currency $amount
*
* @return $this
*/
public function setAmount($amount)
{
$this->amount = $amount;
return $this;
}
/**
* The amount of money to pay a receiver.
*
* @return \PayPal\Api\Currency
*/
public function getAmount()
{
return $this->amount;
}
/**
* Note for notifications. The note is provided by the payment sender. This note can be any string. 4000 characters max.
*
* @param string $note
*
* @return $this
*/
public function setNote($note)
{
$this->note = $note;
return $this;
}
/**
* Note for notifications. The note is provided by the payment sender. This note can be any string. 4000 characters max.
*
* @return string
*/
public function getNote()
{
return $this->note;
}
/**
* The receiver of the payment. In a call response, the format of this value corresponds to the `recipient_type` specified in the request. 127 characters max.
*
* @param string $receiver
*
* @return $this
*/
public function setReceiver($receiver)
{
$this->receiver = $receiver;
return $this;
}
/**
* The receiver of the payment. In a call response, the format of this value corresponds to the `recipient_type` specified in the request. 127 characters max.
*
* @return string
*/
public function getReceiver()
{
return $this->receiver;
}
/**
* A sender-specific ID number, used in an accounting system for tracking purposes. 30 characters max.
*
* @param string $sender_item_id
*
* @return $this
*/
public function setSenderItemId($sender_item_id)
{
$this->sender_item_id = $sender_item_id;
return $this;
}
/**
* A sender-specific ID number, used in an accounting system for tracking purposes. 30 characters max.
*
* @return string
*/
public function getSenderItemId()
{
return $this->sender_item_id;
}
/**
* Obtain the status of a payout item by passing the item ID to the request URI.
*
* @param string $payoutItemId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return PayoutItemDetails
*/
public static function get($payoutItemId, $apiContext = null, $restCall = null)
{
ArgumentValidator::validate($payoutItemId, 'payoutItemId');
$payLoad = "";
$json = self::executeCall(
"/v1/payments/payouts-item/$payoutItemId",
"GET",
$payLoad,
null,
$apiContext,
$restCall
);
$ret = new PayoutItemDetails();
$ret->fromJson($json);
return $ret;
}
}

View File

@@ -0,0 +1,287 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalModel;
/**
* Class PayoutItemDetails
*
* This object contains status and other data for an individual payout of a batch.
*
* @package PayPal\Api
*
* @property string payout_item_id
* @property string transaction_id
* @property string transaction_status
* @property \PayPal\Api\Currency payout_item_fee
* @property string payout_batch_id
* @property string sender_batch_id
* @property \PayPal\Api\PayoutItem payout_item
* @property string time_processed
* @property \PayPal\Api\Error error
* @property \PayPal\Api\Links[] links
*/
class PayoutItemDetails extends PayPalModel
{
/**
* An ID for an individual payout. Provided by PayPal, such as in the case of getting the status of a batch request. 30 characters max.
*
* @param string $payout_item_id
*
* @return $this
*/
public function setPayoutItemId($payout_item_id)
{
$this->payout_item_id = $payout_item_id;
return $this;
}
/**
* An ID for an individual payout. Provided by PayPal, such as in the case of getting the status of a batch request. 30 characters max.
*
* @return string
*/
public function getPayoutItemId()
{
return $this->payout_item_id;
}
/**
* Generated ID for the transaction. 30 characters max.
*
* @param string $transaction_id
*
* @return $this
*/
public function setTransactionId($transaction_id)
{
$this->transaction_id = $transaction_id;
return $this;
}
/**
* Generated ID for the transaction. 30 characters max.
*
* @return string
*/
public function getTransactionId()
{
return $this->transaction_id;
}
/**
* Status of a transaction.
*
* @param string $transaction_status
*
* @return $this
*/
public function setTransactionStatus($transaction_status)
{
$this->transaction_status = $transaction_status;
return $this;
}
/**
* Status of a transaction.
*
* @return string
*/
public function getTransactionStatus()
{
return $this->transaction_status;
}
/**
* Amount of money in U.S. dollars for fees.
*
* @param \PayPal\Api\Currency $payout_item_fee
*
* @return $this
*/
public function setPayoutItemFee($payout_item_fee)
{
$this->payout_item_fee = $payout_item_fee;
return $this;
}
/**
* Amount of money in U.S. dollars for fees.
*
* @return \PayPal\Api\Currency
*/
public function getPayoutItemFee()
{
return $this->payout_item_fee;
}
/**
* An ID for the batch payout. Generated by PayPal. 30 characters max.
*
* @param string $payout_batch_id
*
* @return $this
*/
public function setPayoutBatchId($payout_batch_id)
{
$this->payout_batch_id = $payout_batch_id;
return $this;
}
/**
* An ID for the batch payout. Generated by PayPal. 30 characters max.
*
* @return string
*/
public function getPayoutBatchId()
{
return $this->payout_batch_id;
}
/**
* Sender-created ID for tracking the batch in an accounting system. 30 characters max.
*
* @param string $sender_batch_id
*
* @return $this
*/
public function setSenderBatchId($sender_batch_id)
{
$this->sender_batch_id = $sender_batch_id;
return $this;
}
/**
* Sender-created ID for tracking the batch in an accounting system. 30 characters max.
*
* @return string
*/
public function getSenderBatchId()
{
return $this->sender_batch_id;
}
/**
* The data for a payout item that the sender initially provided.
*
* @param \PayPal\Api\PayoutItem $payout_item
*
* @return $this
*/
public function setPayoutItem($payout_item)
{
$this->payout_item = $payout_item;
return $this;
}
/**
* The data for a payout item that the sender initially provided.
*
* @return \PayPal\Api\PayoutItem
*/
public function getPayoutItem()
{
return $this->payout_item;
}
/**
* Time of the last processing for this item.
*
* @param string $time_processed
*
* @return $this
*/
public function setTimeProcessed($time_processed)
{
$this->time_processed = $time_processed;
return $this;
}
/**
* Time of the last processing for this item.
*
* @return string
*/
public function getTimeProcessed()
{
return $this->time_processed;
}
/**
* Sets Error
*
* @param \PayPal\Api\Error $error
*
* @return $this
*/
public function setErrors($error)
{
$this->errors = $error;
return $this;
}
/**
* Gets Error
*
* @return \PayPal\Api\Error
*/
public function getErrors()
{
return $this->errors;
}
/**
* Sets Links
*
* @param \PayPal\Api\Links[] $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
/**
* Append Links to the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function addLink($links)
{
if (!$this->getLinks()) {
return $this->setLinks(array($links));
} else {
return $this->setLinks(
array_merge($this->getLinks(), array($links))
);
}
}
/**
* Remove Links from the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function removeLink($links)
{
return $this->setLinks(
array_diff($this->getLinks(), array($links))
);
}
}

View File

@@ -0,0 +1,89 @@
<?php
namespace PayPal\Api;
use PayPal\Common\PayPalModel;
/**
* Class PayoutSenderBatchHeader
*
* This object represents sender-provided data about a batch header. The data is provided in a POST request. All batch submissions must have a batch header.
*
* @package PayPal\Api
*
* @property string sender_batch_id
* @property string email_subject
* @property string recipient_type
*/
class PayoutSenderBatchHeader extends PayPalModel
{
/**
* Sender-created ID for tracking the batch payout in an accounting system. 30 characters max.
*
* @param string $sender_batch_id
*
* @return $this
*/
public function setSenderBatchId($sender_batch_id)
{
$this->sender_batch_id = $sender_batch_id;
return $this;
}
/**
* Sender-created ID for tracking the batch payout in an accounting system. 30 characters max.
*
* @return string
*/
public function getSenderBatchId()
{
return $this->sender_batch_id;
}
/**
* The subject line text for the email that PayPal sends when a payout item is completed. (The subject line is the same for all recipients.) Maximum of 255 single-byte alphanumeric characters.
*
* @param string $email_subject
*
* @return $this
*/
public function setEmailSubject($email_subject)
{
$this->email_subject = $email_subject;
return $this;
}
/**
* The subject line text for the email that PayPal sends when a payout item is completed. (The subject line is the same for all recipients.) Maximum of 255 single-byte alphanumeric characters.
*
* @return string
*/
public function getEmailSubject()
{
return $this->email_subject;
}
/**
* The type of ID for a payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`.
*
* @param string $recipient_type
*
* @return $this
*/
public function setRecipientType($recipient_type)
{
$this->recipient_type = $recipient_type;
return $this;
}
/**
* The type of ID for a payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`.
*
* @return string
*/
public function getRecipientType()
{
return $this->recipient_type;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Phone
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string national_number
* @property string extension
*/
class Phone extends PPModel
class Phone extends PayPalModel
{
/**
* Country code (in E.164 format). Assume length is n.
@@ -40,31 +40,6 @@ class Phone extends PPModel
return $this->country_code;
}
/**
* Country code (in E.164 format). Assume length is n.
*
* @deprecated Instead use setCountryCode
*
* @param string $country_code
* @return $this
*/
public function setCountry_code($country_code)
{
$this->country_code = $country_code;
return $this;
}
/**
* Country code (in E.164 format). Assume length is n.
* @deprecated Instead use getCountryCode
*
* @return string
*/
public function getCountry_code()
{
return $this->country_code;
}
/**
* In-country phone number (in E.164 format). Maximum (15 - n) digits.
*
@@ -88,31 +63,6 @@ class Phone extends PPModel
return $this->national_number;
}
/**
* In-country phone number (in E.164 format). Maximum (15 - n) digits.
*
* @deprecated Instead use setNationalNumber
*
* @param string $national_number
* @return $this
*/
public function setNational_number($national_number)
{
$this->national_number = $national_number;
return $this;
}
/**
* In-country phone number (in E.164 format). Maximum (15 - n) digits.
* @deprecated Instead use getNationalNumber
*
* @return string
*/
public function getNational_number()
{
return $this->national_number;
}
/**
* Phone extension
*

View File

@@ -2,12 +2,12 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\PlanList;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class Plan
@@ -26,9 +26,8 @@ use PayPal\Transport\PPRestCall;
* @property \PayPal\Api\PaymentDefinition[] payment_definitions
* @property \PayPal\Api\Terms[] terms
* @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.
@@ -168,31 +167,6 @@ class Plan extends ResourceModel
return $this->create_time;
}
/**
* Time when the billing plan was created. Format YYYY-MM-DDTimeTimezone, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Time when the billing plan was created. Format YYYY-MM-DDTimeTimezone, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Time when this billing plan was updated. Format YYYY-MM-DDTimeTimezone, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -216,31 +190,6 @@ class Plan extends ResourceModel
return $this->update_time;
}
/**
* Time when this billing plan was updated. Format YYYY-MM-DDTimeTimezone, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Time when this billing plan was updated. Format YYYY-MM-DDTimeTimezone, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Array of payment definitions for this billing plan.
*
@@ -294,31 +243,6 @@ class Plan extends ResourceModel
);
}
/**
* Array of payment definitions for this billing plan.
*
* @deprecated Instead use setPaymentDefinitions
*
* @param \PayPal\Api\PaymentDefinition $payment_definitions
* @return $this
*/
public function setPayment_definitions($payment_definitions)
{
$this->payment_definitions = $payment_definitions;
return $this;
}
/**
* Array of payment definitions for this billing plan.
* @deprecated Instead use getPaymentDefinitions
*
* @return \PayPal\Api\PaymentDefinition
*/
public function getPayment_definitions()
{
return $this->payment_definitions;
}
/**
* Array of terms for this billing plan.
*
@@ -395,90 +319,12 @@ class Plan extends ResourceModel
return $this->merchant_preferences;
}
/**
* Specific preferences such as: set up fee, max fail attempts, autobill amount, and others that are configured for this billing plan.
*
* @deprecated Instead use setMerchantPreferences
*
* @param \PayPal\Api\MerchantPreferences $merchant_preferences
* @return $this
*/
public function setMerchant_preferences($merchant_preferences)
{
$this->merchant_preferences = $merchant_preferences;
return $this;
}
/**
* Specific preferences such as: set up fee, max fail attempts, autobill amount, and others that are configured for this billing plan.
* @deprecated Instead use getMerchantPreferences
*
* @return \PayPal\Api\MerchantPreferences
*/
public function getMerchant_preferences()
{
return $this->merchant_preferences;
}
/**
* Sets Links
*
* @param \PayPal\Api\Links[] $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
/**
* Append Links to the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function addLink($links)
{
if (!$this->getLinks()) {
return $this->setLinks(array($links));
} else {
return $this->setLinks(
array_merge($this->getLinks(), array($links))
);
}
}
/**
* Remove Links from the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function removeLink($links)
{
return $this->setLinks(
array_diff($this->getLinks(), array($links))
);
}
/**
* Retrieve the details for a particular billing plan by passing the billing plan ID to the request URI.
*
* @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 +348,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 +371,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 +394,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 +402,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 +417,7 @@ class Plan extends ResourceModel
*
* @param array $params
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return PlanList
*/
public static function all($params, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class PlanList
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property string total_pages
* @property \PayPal\Api\Links[] links
*/
class PlanList extends PPModel
class PlanList extends PayPalModel
{
/**
* Array of billing plans.
@@ -94,31 +94,6 @@ class PlanList extends PPModel
return $this->total_items;
}
/**
* Total number of items.
*
* @deprecated Instead use setTotalItems
*
* @param string $total_items
* @return $this
*/
public function setTotal_items($total_items)
{
$this->total_items = $total_items;
return $this;
}
/**
* Total number of items.
* @deprecated Instead use getTotalItems
*
* @return string
*/
public function getTotal_items()
{
return $this->total_items;
}
/**
* Total number of pages.
*
@@ -142,31 +117,6 @@ class PlanList extends PPModel
return $this->total_pages;
}
/**
* Total number of pages.
*
* @deprecated Instead use setTotalPages
*
* @param string $total_pages
* @return $this
*/
public function setTotal_pages($total_pages)
{
$this->total_pages = $total_pages;
return $this;
}
/**
* Total number of pages.
* @deprecated Instead use getTotalPages
*
* @return string
*/
public function getTotal_pages()
{
return $this->total_pages;
}
/**
* Sets Links
*

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Presentation
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string logo_image
* @property string locale_code
*/
class Presentation extends PPModel
class Presentation extends PayPalModel
{
/**
* A label that overrides the business name in the PayPal account on the PayPal pages.
@@ -41,31 +41,6 @@ class Presentation extends PPModel
return $this->brand_name;
}
/**
* A label that overrides the business name in the PayPal account on the PayPal pages.
*
* @deprecated Instead use setBrandName
*
* @param string $brand_name
* @return $this
*/
public function setBrand_name($brand_name)
{
$this->brand_name = $brand_name;
return $this;
}
/**
* A label that overrides the business name in the PayPal account on the PayPal pages.
* @deprecated Instead use getBrandName
*
* @return string
*/
public function getBrand_name()
{
return $this->brand_name;
}
/**
* A URL to logo image. Allowed vaues: `.gif`, `.jpg`, or `.png`.
*
@@ -90,31 +65,6 @@ class Presentation extends PPModel
return $this->logo_image;
}
/**
* A URL to logo image. Allowed vaues: `.gif`, `.jpg`, or `.png`.
*
* @deprecated Instead use setLogoImage
*
* @param string $logo_image
* @return $this
*/
public function setLogo_image($logo_image)
{
$this->logo_image = $logo_image;
return $this;
}
/**
* A URL to logo image. Allowed vaues: `.gif`, `.jpg`, or `.png`.
* @deprecated Instead use getLogoImage
*
* @return string
*/
public function getLogo_image()
{
return $this->logo_image;
}
/**
* Locale of pages displayed by PayPal payment experience.
*
@@ -139,29 +89,4 @@ class Presentation extends PPModel
return $this->locale_code;
}
/**
* Locale of pages displayed by PayPal payment experience.
*
* @deprecated Instead use setLocaleCode
*
* @param string $locale_code
* @return $this
*/
public function setLocale_code($locale_code)
{
$this->locale_code = $locale_code;
return $this;
}
/**
* Locale of pages displayed by PayPal payment experience.
* @deprecated Instead use getLocaleCode
*
* @return string
*/
public function getLocale_code()
{
return $this->locale_code;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\UrlValidator;
@@ -16,7 +16,7 @@ use PayPal\Validation\UrlValidator;
* @property string return_url
* @property string cancel_url
*/
class RedirectUrls extends PPModel
class RedirectUrls extends PayPalModel
{
/**
* Url where the payer would be redirected to after approving the payment.
@@ -43,37 +43,12 @@ class RedirectUrls extends PPModel
return $this->return_url;
}
/**
* Url where the payer would be redirected to after approving the payment.
*
* @deprecated Instead use setReturnUrl
*
* @param string $return_url
* @return $this
*/
public function setReturn_url($return_url)
{
$this->return_url = $return_url;
return $this;
}
/**
* Url where the payer would be redirected to after approving the payment.
* @deprecated Instead use getReturnUrl
*
* @return string
*/
public function getReturn_url()
{
return $this->return_url;
}
/**
* Url where the payer would be redirected to after canceling the payment.
*
*
* @param string $cancel_url
* @throws InvalidArgumentException
* @throws \InvalidArgumentException
* @return $this
*/
public function setCancelUrl($cancel_url)
@@ -93,29 +68,4 @@ class RedirectUrls extends PPModel
return $this->cancel_url;
}
/**
* Url where the payer would be redirected to after canceling the payment.
*
* @deprecated Instead use setCancelUrl
*
* @param string $cancel_url
* @return $this
*/
public function setCancel_url($cancel_url)
{
$this->cancel_url = $cancel_url;
return $this;
}
/**
* Url where the payer would be redirected to after canceling the payment.
* @deprecated Instead use getCancelUrl
*
* @return string
*/
public function getCancel_url()
{
return $this->cancel_url;
}
}

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -26,25 +26,8 @@ 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
*
* @var \PayPal\Auth\OAuthTokenCredential $credential
*/
protected static $credential;
/**
* Sets Credential
*
* @deprecated Pass ApiContext to create/get methods instead
* @param \PayPal\Auth\OAuthTokenCredential $credential
*/
public static function setCredential($credential)
{
self::$credential = $credential;
}
/**
* Identifier of the refund transaction in UTC ISO8601 format.
@@ -94,31 +77,6 @@ class Refund extends PPModel implements IResource
return $this->create_time;
}
/**
* Time the resource was created in UTC ISO8601 format.
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Time the resource was created in UTC ISO8601 format.
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
@@ -143,31 +101,6 @@ class Refund extends PPModel implements IResource
return $this->update_time;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Time the resource was last updated in UTC ISO8601 format.
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Details including both refunded amount (to Payer) and refunded fee (to Payee).If amount is not specified, it's assumed to be full refund.
*
@@ -240,31 +173,6 @@ class Refund extends PPModel implements IResource
return $this->sale_id;
}
/**
* ID of the Sale transaction being refunded.
*
* @deprecated Instead use setSaleId
*
* @param string $sale_id
* @return $this
*/
public function setSale_id($sale_id)
{
$this->sale_id = $sale_id;
return $this;
}
/**
* ID of the Sale transaction being refunded.
* @deprecated Instead use getSaleId
*
* @return string
*/
public function getSale_id()
{
return $this->sale_id;
}
/**
* ID of the Capture transaction being refunded.
*
@@ -289,31 +197,6 @@ class Refund extends PPModel implements IResource
return $this->capture_id;
}
/**
* ID of the Capture transaction being refunded.
*
* @deprecated Instead use setCaptureId
*
* @param string $capture_id
* @return $this
*/
public function setCapture_id($capture_id)
{
$this->capture_id = $capture_id;
return $this;
}
/**
* ID of the Capture transaction being refunded.
* @deprecated Instead use getCaptureId
*
* @return string
*/
public function getCapture_id()
{
return $this->capture_id;
}
/**
* ID of the Payment resource that this transaction is based on.
*
@@ -338,31 +221,6 @@ class Refund extends PPModel implements IResource
return $this->parent_payment;
}
/**
* ID of the Payment resource that this transaction is based on.
*
* @deprecated Instead use setParentPayment
*
* @param string $parent_payment
* @return $this
*/
public function setParent_payment($parent_payment)
{
$this->parent_payment = $parent_payment;
return $this;
}
/**
* ID of the Payment resource that this transaction is based on.
* @deprecated Instead use getParentPayment
*
* @return string
*/
public function getParent_payment()
{
return $this->parent_payment;
}
/**
* Description of what is being refunded for.
*
@@ -426,8 +284,8 @@ class Refund extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new PPRestCall($apiContext);
$json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/refund/$refundId", "GET", $payLoad);
$call = new PayPalRestCall($apiContext);
$json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/refund/$refundId", "GET", $payLoad);
$ret = new Refund();
$ret->fromJson($json);
return $ret;

View File

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

View File

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

View File

@@ -2,10 +2,10 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
use PayPal\Api\Refund;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -27,28 +27,9 @@ use PayPal\Validation\ArgumentValidator;
* @property string protection_eligibility_type
* @property string clearing_time
* @property string parent_payment
* @property \PayPal\Api\Links links
*/
class Sale extends ResourceModel
class Sale extends PayPalResourceModel
{
/**
* OAuth Credentials to use for this call
*
* @var \PayPal\Auth\OAuthTokenCredential $credential
*/
protected static $credential;
/**
* Sets Credential
*
* @deprecated Pass ApiContext to create/get methods instead
* @param \PayPal\Auth\OAuthTokenCredential $credential
*/
public static function setCredential($credential)
{
self::$credential = $credential;
}
/**
* Identifier of the authorization transaction.
*
@@ -97,31 +78,6 @@ class Sale extends ResourceModel
return $this->create_time;
}
/**
* Time the resource was created.
*
* @deprecated Instead use setCreateTime
*
* @param string $create_time
* @return $this
*/
public function setCreate_time($create_time)
{
$this->create_time = $create_time;
return $this;
}
/**
* Time the resource was created.
* @deprecated Instead use getCreateTime
*
* @return string
*/
public function getCreate_time()
{
return $this->create_time;
}
/**
* Time the resource was last updated.
*
@@ -146,31 +102,6 @@ class Sale extends ResourceModel
return $this->update_time;
}
/**
* Time the resource was last updated.
*
* @deprecated Instead use setUpdateTime
*
* @param string $update_time
* @return $this
*/
public function setUpdate_time($update_time)
{
$this->update_time = $update_time;
return $this;
}
/**
* Time the resource was last updated.
* @deprecated Instead use getUpdateTime
*
* @return string
*/
public function getUpdate_time()
{
return $this->update_time;
}
/**
* Amount being collected.
*
@@ -219,31 +150,6 @@ class Sale extends ResourceModel
return $this->payment_mode;
}
/**
* specifies payment mode of the transaction
*
* @deprecated Instead use setPaymentMode
*
* @param string $payment_mode
* @return $this
*/
public function setPayment_mode($payment_mode)
{
$this->payment_mode = $payment_mode;
return $this;
}
/**
* specifies payment mode of the transaction
* @deprecated Instead use getPaymentMode
*
* @return string
*/
public function getPayment_mode()
{
return $this->payment_mode;
}
/**
* Reason of Pending transaction.
*
@@ -268,31 +174,6 @@ class Sale extends ResourceModel
return $this->pending_reason;
}
/**
* Reason of Pending transaction.
*
* @deprecated Instead use setPendingReason
*
* @param string $pending_reason
* @return $this
*/
public function setPending_reason($pending_reason)
{
$this->pending_reason = $pending_reason;
return $this;
}
/**
* Reason of Pending transaction.
* @deprecated Instead use getPendingReason
*
* @return string
*/
public function getPending_reason()
{
return $this->pending_reason;
}
/**
* State of the sale transaction.
* Valid Values: ["pending", "completed", "refunded", "partially_refunded"]
@@ -341,31 +222,6 @@ class Sale extends ResourceModel
return $this->reason_code;
}
/**
* Reason code for the transaction state being Pending or Reversed.
*
* @deprecated Instead use setReasonCode
*
* @param string $reason_code
* @return $this
*/
public function setReason_code($reason_code)
{
$this->reason_code = $reason_code;
return $this;
}
/**
* Reason code for the transaction state being Pending or Reversed.
* @deprecated Instead use getReasonCode
*
* @return string
*/
public function getReason_code()
{
return $this->reason_code;
}
/**
* Protection Eligibility of the Payer
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
@@ -390,31 +246,6 @@ class Sale extends ResourceModel
return $this->protection_eligibility;
}
/**
* Protection Eligibility of the Payer
*
* @deprecated Instead use setProtectionEligibility
*
* @param string $protection_eligibility
* @return $this
*/
public function setProtection_eligibility($protection_eligibility)
{
$this->protection_eligibility = $protection_eligibility;
return $this;
}
/**
* Protection Eligibility of the Payer
* @deprecated Instead use getProtectionEligibility
*
* @return string
*/
public function getProtection_eligibility()
{
return $this->protection_eligibility;
}
/**
* Protection Eligibility Type of the Payer
* Valid Values: ["ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE", "INELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE"]
@@ -439,31 +270,6 @@ class Sale extends ResourceModel
return $this->protection_eligibility_type;
}
/**
* Protection Eligibility Type of the Payer
*
* @deprecated Instead use setProtectionEligibilityType
*
* @param string $protection_eligibility_type
* @return $this
*/
public function setProtection_eligibility_type($protection_eligibility_type)
{
$this->protection_eligibility_type = $protection_eligibility_type;
return $this;
}
/**
* Protection Eligibility Type of the Payer
* @deprecated Instead use getProtectionEligibilityType
*
* @return string
*/
public function getProtection_eligibility_type()
{
return $this->protection_eligibility_type;
}
/**
* Expected clearing time for eCheck Transactions
*
@@ -488,31 +294,6 @@ class Sale extends ResourceModel
return $this->clearing_time;
}
/**
* Expected clearing time for eCheck Transactions
*
* @deprecated Instead use setClearingTime
*
* @param string $clearing_time
* @return $this
*/
public function setClearing_time($clearing_time)
{
$this->clearing_time = $clearing_time;
return $this;
}
/**
* Expected clearing time for eCheck Transactions
* @deprecated Instead use getClearingTime
*
* @return string
*/
public function getClearing_time()
{
return $this->clearing_time;
}
/**
* ID of the Payment resource that this transaction is based on.
*
@@ -537,61 +318,12 @@ class Sale extends ResourceModel
return $this->parent_payment;
}
/**
* ID of the Payment resource that this transaction is based on.
*
* @deprecated Instead use setParentPayment
*
* @param string $parent_payment
* @return $this
*/
public function setParent_payment($parent_payment)
{
$this->parent_payment = $parent_payment;
return $this;
}
/**
* ID of the Payment resource that this transaction is based on.
* @deprecated Instead use getParentPayment
*
* @return string
*/
public function getParent_payment()
{
return $this->parent_payment;
}
/**
* Sets Links
*
*
* @param \PayPal\Api\Links $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
/**
* Obtain the Sale transaction resource for the given identifier.
*
* @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 +349,7 @@ class Sale extends ResourceModel
*
* @param Refund $refund
* @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Refund
*/
public function refund($refund, $apiContext = null, $restCall = null)

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Search
@@ -31,7 +31,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\number page_size
* @property bool total_count_required
*/
class Search extends PPModel
class Search extends PayPalModel
{
/**
* Initial letters of the email address.
@@ -79,31 +79,6 @@ class Search extends PPModel
return $this->recipient_first_name;
}
/**
* Initial letters of the recipient's first name.
*
* @deprecated Instead use setRecipientFirstName
*
* @param string $recipient_first_name
* @return $this
*/
public function setRecipient_first_name($recipient_first_name)
{
$this->recipient_first_name = $recipient_first_name;
return $this;
}
/**
* Initial letters of the recipient's first name.
* @deprecated Instead use getRecipientFirstName
*
* @return string
*/
public function getRecipient_first_name()
{
return $this->recipient_first_name;
}
/**
* Initial letters of the recipient's last name.
*
@@ -127,31 +102,6 @@ class Search extends PPModel
return $this->recipient_last_name;
}
/**
* Initial letters of the recipient's last name.
*
* @deprecated Instead use setRecipientLastName
*
* @param string $recipient_last_name
* @return $this
*/
public function setRecipient_last_name($recipient_last_name)
{
$this->recipient_last_name = $recipient_last_name;
return $this;
}
/**
* Initial letters of the recipient's last name.
* @deprecated Instead use getRecipientLastName
*
* @return string
*/
public function getRecipient_last_name()
{
return $this->recipient_last_name;
}
/**
* Initial letters of the recipient's business name.
*
@@ -175,31 +125,6 @@ class Search extends PPModel
return $this->recipient_business_name;
}
/**
* Initial letters of the recipient's business name.
*
* @deprecated Instead use setRecipientBusinessName
*
* @param string $recipient_business_name
* @return $this
*/
public function setRecipient_business_name($recipient_business_name)
{
$this->recipient_business_name = $recipient_business_name;
return $this;
}
/**
* Initial letters of the recipient's business name.
* @deprecated Instead use getRecipientBusinessName
*
* @return string
*/
public function getRecipient_business_name()
{
return $this->recipient_business_name;
}
/**
* The invoice number that appears on the invoice.
*
@@ -270,31 +195,6 @@ class Search extends PPModel
return $this->lower_total_amount;
}
/**
* Lower limit of total amount.
*
* @deprecated Instead use setLowerTotalAmount
*
* @param \PayPal\Api\Currency $lower_total_amount
* @return $this
*/
public function setLower_total_amount($lower_total_amount)
{
$this->lower_total_amount = $lower_total_amount;
return $this;
}
/**
* Lower limit of total amount.
* @deprecated Instead use getLowerTotalAmount
*
* @return \PayPal\Api\Currency
*/
public function getLower_total_amount()
{
return $this->lower_total_amount;
}
/**
* Upper limit of total amount.
*
@@ -318,31 +218,6 @@ class Search extends PPModel
return $this->upper_total_amount;
}
/**
* Upper limit of total amount.
*
* @deprecated Instead use setUpperTotalAmount
*
* @param \PayPal\Api\Currency $upper_total_amount
* @return $this
*/
public function setUpper_total_amount($upper_total_amount)
{
$this->upper_total_amount = $upper_total_amount;
return $this;
}
/**
* Upper limit of total amount.
* @deprecated Instead use getUpperTotalAmount
*
* @return \PayPal\Api\Currency
*/
public function getUpper_total_amount()
{
return $this->upper_total_amount;
}
/**
* Start invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -366,31 +241,6 @@ class Search extends PPModel
return $this->start_invoice_date;
}
/**
* Start invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setStartInvoiceDate
*
* @param string $start_invoice_date
* @return $this
*/
public function setStart_invoice_date($start_invoice_date)
{
$this->start_invoice_date = $start_invoice_date;
return $this;
}
/**
* Start invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getStartInvoiceDate
*
* @return string
*/
public function getStart_invoice_date()
{
return $this->start_invoice_date;
}
/**
* End invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -414,31 +264,6 @@ class Search extends PPModel
return $this->end_invoice_date;
}
/**
* End invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setEndInvoiceDate
*
* @param string $end_invoice_date
* @return $this
*/
public function setEnd_invoice_date($end_invoice_date)
{
$this->end_invoice_date = $end_invoice_date;
return $this;
}
/**
* End invoice date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getEndInvoiceDate
*
* @return string
*/
public function getEnd_invoice_date()
{
return $this->end_invoice_date;
}
/**
* Start invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -462,31 +287,6 @@ class Search extends PPModel
return $this->start_due_date;
}
/**
* Start invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setStartDueDate
*
* @param string $start_due_date
* @return $this
*/
public function setStart_due_date($start_due_date)
{
$this->start_due_date = $start_due_date;
return $this;
}
/**
* Start invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getStartDueDate
*
* @return string
*/
public function getStart_due_date()
{
return $this->start_due_date;
}
/**
* End invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -510,31 +310,6 @@ class Search extends PPModel
return $this->end_due_date;
}
/**
* End invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setEndDueDate
*
* @param string $end_due_date
* @return $this
*/
public function setEnd_due_date($end_due_date)
{
$this->end_due_date = $end_due_date;
return $this;
}
/**
* End invoice due date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getEndDueDate
*
* @return string
*/
public function getEnd_due_date()
{
return $this->end_due_date;
}
/**
* Start invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -558,31 +333,6 @@ class Search extends PPModel
return $this->start_payment_date;
}
/**
* Start invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setStartPaymentDate
*
* @param string $start_payment_date
* @return $this
*/
public function setStart_payment_date($start_payment_date)
{
$this->start_payment_date = $start_payment_date;
return $this;
}
/**
* Start invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getStartPaymentDate
*
* @return string
*/
public function getStart_payment_date()
{
return $this->start_payment_date;
}
/**
* End invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -606,31 +356,6 @@ class Search extends PPModel
return $this->end_payment_date;
}
/**
* End invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setEndPaymentDate
*
* @param string $end_payment_date
* @return $this
*/
public function setEnd_payment_date($end_payment_date)
{
$this->end_payment_date = $end_payment_date;
return $this;
}
/**
* End invoice payment date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getEndPaymentDate
*
* @return string
*/
public function getEnd_payment_date()
{
return $this->end_payment_date;
}
/**
* Start invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -654,31 +379,6 @@ class Search extends PPModel
return $this->start_creation_date;
}
/**
* Start invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setStartCreationDate
*
* @param string $start_creation_date
* @return $this
*/
public function setStart_creation_date($start_creation_date)
{
$this->start_creation_date = $start_creation_date;
return $this;
}
/**
* Start invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getStartCreationDate
*
* @return string
*/
public function getStart_creation_date()
{
return $this->start_creation_date;
}
/**
* End invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
@@ -702,31 +402,6 @@ class Search extends PPModel
return $this->end_creation_date;
}
/**
* End invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @deprecated Instead use setEndCreationDate
*
* @param string $end_creation_date
* @return $this
*/
public function setEnd_creation_date($end_creation_date)
{
$this->end_creation_date = $end_creation_date;
return $this;
}
/**
* End invoice creation date. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
* @deprecated Instead use getEndCreationDate
*
* @return string
*/
public function getEnd_creation_date()
{
return $this->end_creation_date;
}
/**
* Offset of the search results.
*
@@ -773,31 +448,6 @@ class Search extends PPModel
return $this->page_size;
}
/**
* Page size of the search results.
*
* @deprecated Instead use setPageSize
*
* @param \PayPal\Api\number $page_size
* @return $this
*/
public function setPage_size($page_size)
{
$this->page_size = $page_size;
return $this;
}
/**
* Page size of the search results.
* @deprecated Instead use getPageSize
*
* @return \PayPal\Api\number
*/
public function getPage_size()
{
return $this->page_size;
}
/**
* A flag indicating whether total count is required in the response.
*
@@ -821,29 +471,4 @@ class Search extends PPModel
return $this->total_count_required;
}
/**
* A flag indicating whether total count is required in the response.
*
* @deprecated Instead use setTotalCountRequired
*
* @param bool $total_count_required
* @return $this
*/
public function setTotal_count_required($total_count_required)
{
$this->total_count_required = $total_count_required;
return $this;
}
/**
* A flag indicating whether total count is required in the response.
* @deprecated Instead use getTotalCountRequired
*
* @return bool
*/
public function getTotal_count_required()
{
return $this->total_count_required;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class ShippingAddress
@@ -63,31 +63,6 @@ class ShippingAddress extends Address
return $this->recipient_name;
}
/**
* Name of the recipient at this address.
*
* @deprecated Instead use setRecipientName
*
* @param string $recipient_name
* @return $this
*/
public function setRecipient_name($recipient_name)
{
$this->recipient_name = $recipient_name;
return $this;
}
/**
* Name of the recipient at this address.
* @deprecated Instead use getRecipientName
*
* @return string
*/
public function getRecipient_name()
{
return $this->recipient_name;
}
/**
* Default shipping address of the Payer.
*
@@ -111,29 +86,4 @@ class ShippingAddress extends Address
return $this->default_address;
}
/**
* Default shipping address of the Payer.
*
* @deprecated Instead use setDefaultAddress
*
* @param bool $default_address
* @return $this
*/
public function setDefault_address($default_address)
{
$this->default_address = $default_address;
return $this;
}
/**
* Default shipping address of the Payer.
* @deprecated Instead use getDefaultAddress
*
* @return bool
*/
public function getDefault_address()
{
return $this->default_address;
}
}

View File

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

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class ShippingInfo
@@ -17,7 +17,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Phone phone
* @property \PayPal\Api\InvoiceAddress address
*/
class ShippingInfo extends PPModel
class ShippingInfo extends PayPalModel
{
/**
* First name of the invoice recipient. 30 characters max.
@@ -42,31 +42,6 @@ class ShippingInfo extends PPModel
return $this->first_name;
}
/**
* First name of the invoice recipient. 30 characters max.
*
* @deprecated Instead use setFirstName
*
* @param string $first_name
* @return $this
*/
public function setFirst_name($first_name)
{
$this->first_name = $first_name;
return $this;
}
/**
* First name of the invoice recipient. 30 characters max.
* @deprecated Instead use getFirstName
*
* @return string
*/
public function getFirst_name()
{
return $this->first_name;
}
/**
* Last name of the invoice recipient. 30 characters max.
*
@@ -90,31 +65,6 @@ class ShippingInfo extends PPModel
return $this->last_name;
}
/**
* Last name of the invoice recipient. 30 characters max.
*
* @deprecated Instead use setLastName
*
* @param string $last_name
* @return $this
*/
public function setLast_name($last_name)
{
$this->last_name = $last_name;
return $this;
}
/**
* Last name of the invoice recipient. 30 characters max.
* @deprecated Instead use getLastName
*
* @return string
*/
public function getLast_name()
{
return $this->last_name;
}
/**
* Company business name of the invoice recipient. 100 characters max.
*
@@ -138,31 +88,6 @@ class ShippingInfo extends PPModel
return $this->business_name;
}
/**
* Company business name of the invoice recipient. 100 characters max.
*
* @deprecated Instead use setBusinessName
*
* @param string $business_name
* @return $this
*/
public function setBusiness_name($business_name)
{
$this->business_name = $business_name;
return $this;
}
/**
* Company business name of the invoice recipient. 100 characters max.
* @deprecated Instead use getBusinessName
*
* @return string
*/
public function getBusiness_name()
{
return $this->business_name;
}
/**
*
*
@@ -208,24 +133,4 @@ class ShippingInfo extends PPModel
return $this->address;
}
/**
* @deprecated This will not be supported soon. Kept for backward Compatibility
*
* @param string $email
*/
public function setEmail($email)
{
$this->email = $email;
}
/**
* @deprecated This will not be supported soon. Kept for backward Compatibility
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
}

View File

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

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
/**
* Class Terms
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Currency amount_range
* @property string buyer_editable
*/
class Terms extends PPModel
class Terms extends PayPalModel
{
/**
* Identifier of the terms. 128 characters max.
@@ -89,31 +89,6 @@ class Terms extends PPModel
return $this->max_billing_amount;
}
/**
* Max Amount associated with this term.
*
* @deprecated Instead use setMaxBillingAmount
*
* @param \PayPal\Api\Currency $max_billing_amount
* @return $this
*/
public function setMax_billing_amount($max_billing_amount)
{
$this->max_billing_amount = $max_billing_amount;
return $this;
}
/**
* Max Amount associated with this term.
* @deprecated Instead use getMaxBillingAmount
*
* @return \PayPal\Api\Currency
*/
public function getMax_billing_amount()
{
return $this->max_billing_amount;
}
/**
* How many times money can be pulled during this term.
*
@@ -160,31 +135,6 @@ class Terms extends PPModel
return $this->amount_range;
}
/**
* Amount_range associated with this term.
*
* @deprecated Instead use setAmountRange
*
* @param \PayPal\Api\Currency $amount_range
* @return $this
*/
public function setAmount_range($amount_range)
{
$this->amount_range = $amount_range;
return $this;
}
/**
* Amount_range associated with this term.
* @deprecated Instead use getAmountRange
*
* @return \PayPal\Api\Currency
*/
public function getAmount_range()
{
return $this->amount_range;
}
/**
* Buyer's ability to edit the amount in this term.
*
@@ -208,29 +158,4 @@ class Terms extends PPModel
return $this->buyer_editable;
}
/**
* Buyer's ability to edit the amount in this term.
*
* @deprecated Instead use setBuyerEditable
*
* @param string $buyer_editable
* @return $this
*/
public function setBuyer_editable($buyer_editable)
{
$this->buyer_editable = $buyer_editable;
return $this;
}
/**
* Buyer's ability to edit the amount in this term.
* @deprecated Instead use getBuyerEditable
*
* @return string
*/
public function getBuyer_editable()
{
return $this->buyer_editable;
}
}

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -12,7 +12,7 @@ use PayPal\Rest\ApiContext;
*
* @package PayPal\Api
*
* @property self transactions
* @property Transaction transactions
*/
class Transaction extends TransactionBase
{

View File

@@ -2,7 +2,7 @@
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -40,29 +40,4 @@ class TransactionBase extends CartBase
return $this->related_resources;
}
/**
* List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
*
* @deprecated Instead use setRelatedResources
*
* @param \PayPal\Api\RelatedResources $related_resources
* @return $this
*/
public function setRelated_resources($related_resources)
{
$this->related_resources = $related_resources;
return $this;
}
/**
* List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
* @deprecated Instead use getRelatedResources
*
* @return \PayPal\Api\RelatedResources
*/
public function getRelated_resources()
{
return $this->related_resources;
}
}

View File

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

View File

@@ -2,11 +2,11 @@
namespace PayPal\Api;
use PayPal\Common\ResourceModel;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\CreateProfileResponse;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PPRestCall;
use PayPal\Transport\PayPalRestCall;
/**
* Class WebProfile
@@ -21,7 +21,7 @@ use PayPal\Transport\PPRestCall;
* @property \PayPal\Api\InputFields input_fields
* @property \PayPal\Api\Presentation presentation
*/
class WebProfile extends ResourceModel
class WebProfile extends PayPalResourceModel
{
/**
* ID of the web experience profile.
@@ -95,31 +95,6 @@ class WebProfile extends ResourceModel
return $this->flow_config;
}
/**
* Parameters for flow configuration.
*
* @deprecated Instead use setFlowConfig
*
* @param \PayPal\Api\FlowConfig $flow_config
* @return $this
*/
public function setFlow_config($flow_config)
{
$this->flow_config = $flow_config;
return $this;
}
/**
* Parameters for flow configuration.
* @deprecated Instead use getFlowConfig
*
* @return \PayPal\Api\FlowConfig
*/
public function getFlow_config()
{
return $this->flow_config;
}
/**
* Parameters for input fields customization.
*
@@ -144,31 +119,6 @@ class WebProfile extends ResourceModel
return $this->input_fields;
}
/**
* Parameters for input fields customization.
*
* @deprecated Instead use setInputFields
*
* @param \PayPal\Api\InputFields $input_fields
* @return $this
*/
public function setInput_fields($input_fields)
{
$this->input_fields = $input_fields;
return $this;
}
/**
* Parameters for input fields customization.
* @deprecated Instead use getInputFields
*
* @return \PayPal\Api\InputFields
*/
public function getInput_fields()
{
return $this->input_fields;
}
/**
* Parameters for style and presentation.
*
@@ -197,7 +147,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 +170,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 +193,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 +221,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 +245,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 +266,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)

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