diff --git a/README.md b/README.md
index 0b065a83..e323071d 100644
--- a/README.md
+++ b/README.md
@@ -128,5 +128,5 @@ There are two kinds of tests that we include in our sdk package. Unit tests, and
* [API Reference](https://developer.paypal.com/webapps/developer/docs/api/)
* [Reporting issues / feature requests] (https://github.com/paypal/rest-api-sdk-php/issues)
-
+ * [Pizza App Using Paypal REST API] (https://github.com/paypal/rest-api-sample-app-php)
[](https://bitdeli.com/free "Bitdeli Badge")
diff --git a/build.xml b/build.xml
deleted file mode 100644
index d4e2ad4b..00000000
--- a/build.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Composer is installed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/composer.json b/composer.json
index c48fc9fa..f230f972 100644
--- a/composer.json
+++ b/composer.json
@@ -14,8 +14,7 @@
"require": {
"php": ">=5.3.0",
"ext-curl": "*",
- "ext-json": "*",
- "paypal/sdk-core-php": "2.5.*"
+ "ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
diff --git a/lib/PayPal/Api/BillingInfo.php b/lib/PayPal/Api/BillingInfo.php
index 86e6ef6a..a18f9b16 100644
--- a/lib/PayPal/Api/BillingInfo.php
+++ b/lib/PayPal/Api/BillingInfo.php
@@ -4,221 +4,248 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class BillingInfo extends PPModel {
- /**
- * Email address of the invoice recipient. 260 characters max.
- *
- * @param string $email
- */
- public function setEmail($email) {
- $this->email = $email;
- return $this;
- }
-
- /**
- * Email address of the invoice recipient. 260 characters max.
- *
- * @return string
- */
- public function getEmail() {
- return $this->email;
- }
-
-
- /**
- * First name of the invoice recipient. 30 characters max.
- *
- * @param string $first_name
- */
- public function setFirstName($first_name) {
- $this->first_name = $first_name;
- return $this;
- }
-
- /**
- * First name of the invoice recipient. 30 characters max.
- *
- * @return string
- */
- public function getFirstName() {
- return $this->first_name;
- }
-
- /**
- * First name of the invoice recipient. 30 characters max.
- *
- * @param string $first_name
- * @deprecated. Instead use setFirstName
- */
- public function setFirst_name($first_name) {
- $this->first_name = $first_name;
- return $this;
- }
- /**
- * First name of the invoice recipient. 30 characters max.
- *
- * @return string
- * @deprecated. Instead use getFirstName
- */
- public function getFirst_name() {
- return $this->first_name;
- }
-
- /**
- * Last name of the invoice recipient. 30 characters max.
- *
- * @param string $last_name
- */
- public function setLastName($last_name) {
- $this->last_name = $last_name;
- return $this;
- }
-
- /**
- * Last name of the invoice recipient. 30 characters max.
- *
- * @return string
- */
- public function getLastName() {
- return $this->last_name;
- }
-
- /**
- * Last name of the invoice recipient. 30 characters max.
- *
- * @param string $last_name
- * @deprecated. Instead use setLastName
- */
- public function setLast_name($last_name) {
- $this->last_name = $last_name;
- return $this;
- }
- /**
- * Last name of the invoice recipient. 30 characters max.
- *
- * @return string
- * @deprecated. Instead use getLastName
- */
- public function getLast_name() {
- return $this->last_name;
- }
-
- /**
- * Company business name of the invoice recipient. 100 characters max.
- *
- * @param string $business_name
- */
- public function setBusinessName($business_name) {
- $this->business_name = $business_name;
- return $this;
- }
-
- /**
- * Company business name of the invoice recipient. 100 characters max.
- *
- * @return string
- */
- public function getBusinessName() {
- return $this->business_name;
- }
-
- /**
- * Company business name of the invoice recipient. 100 characters max.
- *
- * @param string $business_name
- * @deprecated. Instead use setBusinessName
- */
- public function setBusiness_name($business_name) {
- $this->business_name = $business_name;
- return $this;
- }
- /**
- * Company business name of the invoice recipient. 100 characters max.
- *
- * @return string
- * @deprecated. Instead use getBusinessName
- */
- public function getBusiness_name() {
- return $this->business_name;
- }
-
- /**
- * Address of the invoice recipient.
- *
- * @param PayPal\Api\Address $address
- */
- public function setAddress($address) {
- $this->address = $address;
- return $this;
- }
-
- /**
- * Address of the invoice recipient.
- *
- * @return PayPal\Api\Address
- */
- public function getAddress() {
- return $this->address;
- }
-
-
- /**
- * Language of the email sent to the payer. Will only be used if payer doesn't have a PayPal account.
- *
- * @param string $language
- */
- public function setLanguage($language) {
- $this->language = $language;
- return $this;
- }
-
- /**
- * Language of the email sent to the payer. Will only be used if payer doesn't have a PayPal account.
- *
- * @return string
- */
- public function getLanguage() {
- return $this->language;
- }
-
-
- /**
- * Option to display additional information such as business hours. 40 characters max.
- *
- * @param string $additional_info
- */
- public function setAdditionalInfo($additional_info) {
- $this->additional_info = $additional_info;
- return $this;
- }
-
- /**
- * Option to display additional information such as business hours. 40 characters max.
- *
- * @return string
- */
- public function getAdditionalInfo() {
- return $this->additional_info;
- }
-
- /**
- * Option to display additional information such as business hours. 40 characters max.
- *
- * @param string $additional_info
- * @deprecated. Instead use setAdditionalInfo
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getAdditionalInfo
- */
- public function getAdditional_info() {
- return $this->additional_info;
- }
+class BillingInfo extends PPModel
+{
+ /**
+ * Email address of the invoice recipient. 260 characters max.
+ *
+ * @param string $email
+ */
+ public function setEmail($email)
+ {
+ $this->email = $email;
+ return $this;
+ }
+
+ /**
+ * Email address of the invoice recipient. 260 characters max.
+ *
+ * @return string
+ */
+ public function getEmail()
+ {
+ return $this->email;
+ }
+
+
+ /**
+ * First name of the invoice recipient. 30 characters max.
+ *
+ * @param string $first_name
+ */
+ public function setFirstName($first_name)
+ {
+ $this->first_name = $first_name;
+ return $this;
+ }
+
+ /**
+ * First name of the invoice recipient. 30 characters max.
+ *
+ * @return string
+ */
+ public function getFirstName()
+ {
+ return $this->first_name;
+ }
+
+ /**
+ * First name of the invoice recipient. 30 characters max.
+ *
+ * @param string $first_name
+ * @deprecated. Instead use setFirstName
+ */
+ public function setFirst_name($first_name)
+ {
+ $this->first_name = $first_name;
+ return $this;
+ }
+
+ /**
+ * First name of the invoice recipient. 30 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getFirstName
+ */
+ public function getFirst_name()
+ {
+ return $this->first_name;
+ }
+
+ /**
+ * Last name of the invoice recipient. 30 characters max.
+ *
+ * @param string $last_name
+ */
+ public function setLastName($last_name)
+ {
+ $this->last_name = $last_name;
+ return $this;
+ }
+
+ /**
+ * Last name of the invoice recipient. 30 characters max.
+ *
+ * @return string
+ */
+ public function getLastName()
+ {
+ return $this->last_name;
+ }
+
+ /**
+ * Last name of the invoice recipient. 30 characters max.
+ *
+ * @param string $last_name
+ * @deprecated. Instead use setLastName
+ */
+ public function setLast_name($last_name)
+ {
+ $this->last_name = $last_name;
+ return $this;
+ }
+
+ /**
+ * Last name of the invoice recipient. 30 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getLastName
+ */
+ public function getLast_name()
+ {
+ return $this->last_name;
+ }
+
+ /**
+ * Company business name of the invoice recipient. 100 characters max.
+ *
+ * @param string $business_name
+ */
+ public function setBusinessName($business_name)
+ {
+ $this->business_name = $business_name;
+ return $this;
+ }
+
+ /**
+ * Company business name of the invoice recipient. 100 characters max.
+ *
+ * @return string
+ */
+ public function getBusinessName()
+ {
+ return $this->business_name;
+ }
+
+ /**
+ * Company business name of the invoice recipient. 100 characters max.
+ *
+ * @param string $business_name
+ * @deprecated. Instead use setBusinessName
+ */
+ public function setBusiness_name($business_name)
+ {
+ $this->business_name = $business_name;
+ return $this;
+ }
+
+ /**
+ * Company business name of the invoice recipient. 100 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getBusinessName
+ */
+ public function getBusiness_name()
+ {
+ return $this->business_name;
+ }
+
+ /**
+ * Address of the invoice recipient.
+ *
+ * @param PayPal\Api\Address $address
+ */
+ public function setAddress($address)
+ {
+ $this->address = $address;
+ return $this;
+ }
+
+ /**
+ * Address of the invoice recipient.
+ *
+ * @return PayPal\Api\Address
+ */
+ public function getAddress()
+ {
+ return $this->address;
+ }
+
+
+ /**
+ * Language of the email sent to the payer. Will only be used if payer doesn't have a PayPal account.
+ *
+ * @param string $language
+ */
+ public function setLanguage($language)
+ {
+ $this->language = $language;
+ return $this;
+ }
+
+ /**
+ * Language of the email sent to the payer. Will only be used if payer doesn't have a PayPal account.
+ *
+ * @return string
+ */
+ public function getLanguage()
+ {
+ return $this->language;
+ }
+
+
+ /**
+ * Option to display additional information such as business hours. 40 characters max.
+ *
+ * @param string $additional_info
+ */
+ public function setAdditionalInfo($additional_info)
+ {
+ $this->additional_info = $additional_info;
+ return $this;
+ }
+
+ /**
+ * Option to display additional information such as business hours. 40 characters max.
+ *
+ * @return string
+ */
+ public function getAdditionalInfo()
+ {
+ return $this->additional_info;
+ }
+
+ /**
+ * Option to display additional information such as business hours. 40 characters max.
+ *
+ * @param string $additional_info
+ * @deprecated. Instead use setAdditionalInfo
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getAdditionalInfo
+ */
+ public function getAdditional_info()
+ {
+ return $this->additional_info;
+ }
}
diff --git a/lib/PayPal/Api/CancelNotification.php b/lib/PayPal/Api/CancelNotification.php
index c41d5b68..c8f2a018 100644
--- a/lib/PayPal/Api/CancelNotification.php
+++ b/lib/PayPal/Api/CancelNotification.php
@@ -4,123 +4,138 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class CancelNotification extends PPModel {
- /**
- * Subject of the notification.
- *
- * @param string $subject
- */
- public function setSubject($subject) {
- $this->subject = $subject;
- return $this;
- }
-
- /**
- * Subject of the notification.
- *
- * @return string
- */
- public function getSubject() {
- return $this->subject;
- }
-
-
- /**
- * Note to the payer.
- *
- * @param string $note
- */
- public function setNote($note) {
- $this->note = $note;
- return $this;
- }
-
- /**
- * Note to the payer.
- *
- * @return string
- */
- public function getNote() {
- return $this->note;
- }
-
-
- /**
- * A flag indicating whether a copy of the email has to be sent to the merchant.
- *
- * @param boolean $send_to_merchant
- */
- public function setSendToMerchant($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.
- *
- * @return boolean
- */
- public function getSendToMerchant() {
- return $this->send_to_merchant;
- }
-
- /**
- * A flag indicating whether a copy of the email has to be sent to the merchant.
- *
- * @param boolean $send_to_merchant
- * @deprecated. Instead use setSendToMerchant
- */
- 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.
- *
- * @return boolean
- * @deprecated. Instead use getSendToMerchant
- */
- 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.
- *
- * @param boolean $send_to_payer
- */
- public function setSendToPayer($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.
- *
- * @return boolean
- */
- public function getSendToPayer() {
- return $this->send_to_payer;
- }
-
- /**
- * A flag indicating whether a copy of the email has to be sent to the payer.
- *
- * @param boolean $send_to_payer
- * @deprecated. Instead use setSendToPayer
- */
- 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.
- *
- * @return boolean
- * @deprecated. Instead use getSendToPayer
- */
- public function getSend_to_payer() {
- return $this->send_to_payer;
- }
+class CancelNotification extends PPModel
+{
+ /**
+ * Subject of the notification.
+ *
+ * @param string $subject
+ */
+ public function setSubject($subject)
+ {
+ $this->subject = $subject;
+ return $this;
+ }
+
+ /**
+ * Subject of the notification.
+ *
+ * @return string
+ */
+ public function getSubject()
+ {
+ return $this->subject;
+ }
+
+
+ /**
+ * Note to the payer.
+ *
+ * @param string $note
+ */
+ public function setNote($note)
+ {
+ $this->note = $note;
+ return $this;
+ }
+
+ /**
+ * Note to the payer.
+ *
+ * @return string
+ */
+ public function getNote()
+ {
+ return $this->note;
+ }
+
+
+ /**
+ * A flag indicating whether a copy of the email has to be sent to the merchant.
+ *
+ * @param boolean $send_to_merchant
+ */
+ public function setSendToMerchant($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.
+ *
+ * @return boolean
+ */
+ public function getSendToMerchant()
+ {
+ return $this->send_to_merchant;
+ }
+
+ /**
+ * A flag indicating whether a copy of the email has to be sent to the merchant.
+ *
+ * @param boolean $send_to_merchant
+ * @deprecated. Instead use setSendToMerchant
+ */
+ 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.
+ *
+ * @return boolean
+ * @deprecated. Instead use getSendToMerchant
+ */
+ 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.
+ *
+ * @param boolean $send_to_payer
+ */
+ public function setSendToPayer($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.
+ *
+ * @return boolean
+ */
+ public function getSendToPayer()
+ {
+ return $this->send_to_payer;
+ }
+
+ /**
+ * A flag indicating whether a copy of the email has to be sent to the payer.
+ *
+ * @param boolean $send_to_payer
+ * @deprecated. Instead use setSendToPayer
+ */
+ 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.
+ *
+ * @return boolean
+ * @deprecated. Instead use getSendToPayer
+ */
+ public function getSend_to_payer()
+ {
+ return $this->send_to_payer;
+ }
}
diff --git a/lib/PayPal/Api/Cost.php b/lib/PayPal/Api/Cost.php
index 694c3659..1551f1ec 100644
--- a/lib/PayPal/Api/Cost.php
+++ b/lib/PayPal/Api/Cost.php
@@ -4,45 +4,50 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class Cost extends PPModel {
- /**
- * Cost in percent. Range of 0 to 100.
- *
- * @param PayPal\Api\number $percent
- */
- public function setPercent($percent) {
- $this->percent = $percent;
- return $this;
- }
-
- /**
- * Cost in percent. Range of 0 to 100.
- *
- * @return PayPal\Api\number
- */
- public function getPercent() {
- return $this->percent;
- }
-
-
- /**
- * Cost in amount. Range of 0 to 999999.99.
- *
- * @param PayPal\Api\Currency $amount
- */
- public function setAmount($amount) {
- $this->amount = $amount;
- return $this;
- }
-
- /**
- * Cost in amount. Range of 0 to 999999.99.
- *
- * @return PayPal\Api\Currency
- */
- public function getAmount() {
- return $this->amount;
- }
+class Cost extends PPModel
+{
+ /**
+ * Cost in percent. Range of 0 to 100.
+ *
+ * @param PayPal\Api\number $percent
+ */
+ public function setPercent($percent)
+ {
+ $this->percent = $percent;
+ return $this;
+ }
+
+ /**
+ * Cost in percent. Range of 0 to 100.
+ *
+ * @return PayPal\Api\number
+ */
+ public function getPercent()
+ {
+ return $this->percent;
+ }
+
+
+ /**
+ * Cost in amount. Range of 0 to 999999.99.
+ *
+ * @param PayPal\Api\Currency $amount
+ */
+ public function setAmount($amount)
+ {
+ $this->amount = $amount;
+ return $this;
+ }
+
+ /**
+ * Cost in amount. Range of 0 to 999999.99.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getAmount()
+ {
+ return $this->amount;
+ }
}
diff --git a/lib/PayPal/Api/Currency.php b/lib/PayPal/Api/Currency.php
index 651ef60d..d6884cc5 100644
--- a/lib/PayPal/Api/Currency.php
+++ b/lib/PayPal/Api/Currency.php
@@ -4,45 +4,50 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class Currency extends PPModel {
- /**
- * 3 letter currency code
- *
- * @param string $currency
- */
- public function setCurrency($currency) {
- $this->currency = $currency;
- return $this;
- }
-
- /**
- * 3 letter currency code
- *
- * @return string
- */
- public function getCurrency() {
- return $this->currency;
- }
-
-
- /**
- * amount upto 2 decimals represented as string
- *
- * @param string $value
- */
- public function setValue($value) {
- $this->value = $value;
- return $this;
- }
-
- /**
- * amount upto 2 decimals represented as string
- *
- * @return string
- */
- public function getValue() {
- return $this->value;
- }
+class Currency extends PPModel
+{
+ /**
+ * 3 letter currency code
+ *
+ * @param string $currency
+ */
+ public function setCurrency($currency)
+ {
+ $this->currency = $currency;
+ return $this;
+ }
+
+ /**
+ * 3 letter currency code
+ *
+ * @return string
+ */
+ public function getCurrency()
+ {
+ return $this->currency;
+ }
+
+
+ /**
+ * amount upto 2 decimals represented as string
+ *
+ * @param string $value
+ */
+ public function setValue($value)
+ {
+ $this->value = $value;
+ return $this;
+ }
+
+ /**
+ * amount upto 2 decimals represented as string
+ *
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
}
diff --git a/lib/PayPal/Api/CustomAmount.php b/lib/PayPal/Api/CustomAmount.php
index 0fd89809..e4f9305e 100644
--- a/lib/PayPal/Api/CustomAmount.php
+++ b/lib/PayPal/Api/CustomAmount.php
@@ -4,45 +4,50 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class CustomAmount extends PPModel {
- /**
- * Custom amount label. 25 characters max.
- *
- * @param string $label
- */
- public function setLabel($label) {
- $this->label = $label;
- return $this;
- }
-
- /**
- * Custom amount label. 25 characters max.
- *
- * @return string
- */
- public function getLabel() {
- return $this->label;
- }
-
-
- /**
- * Custom amount value. Range of 0 to 999999.99.
- *
- * @param PayPal\Api\Currency $amount
- */
- public function setAmount($amount) {
- $this->amount = $amount;
- return $this;
- }
-
- /**
- * Custom amount value. Range of 0 to 999999.99.
- *
- * @return PayPal\Api\Currency
- */
- public function getAmount() {
- return $this->amount;
- }
+class CustomAmount extends PPModel
+{
+ /**
+ * Custom amount label. 25 characters max.
+ *
+ * @param string $label
+ */
+ public function setLabel($label)
+ {
+ $this->label = $label;
+ return $this;
+ }
+
+ /**
+ * Custom amount label. 25 characters max.
+ *
+ * @return string
+ */
+ public function getLabel()
+ {
+ return $this->label;
+ }
+
+
+ /**
+ * Custom amount value. Range of 0 to 999999.99.
+ *
+ * @param PayPal\Api\Currency $amount
+ */
+ public function setAmount($amount)
+ {
+ $this->amount = $amount;
+ return $this;
+ }
+
+ /**
+ * Custom amount value. Range of 0 to 999999.99.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getAmount()
+ {
+ return $this->amount;
+ }
}
diff --git a/lib/PayPal/Api/Error.php b/lib/PayPal/Api/Error.php
index 62ddfe97..31720c69 100644
--- a/lib/PayPal/Api/Error.php
+++ b/lib/PayPal/Api/Error.php
@@ -4,143 +4,160 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class Error extends PPModel {
- /**
- * Human readable, unique name of the error.
- *
- * @param string $name
- */
- public function setName($name) {
- $this->name = $name;
- return $this;
- }
-
- /**
- * Human readable, unique name of the error.
- *
- * @return string
- */
- public function getName() {
- return $this->name;
- }
-
-
- /**
- * PayPal internal identifier used for correlation purposes.
- *
- * @param string $debug_id
- */
- public function setDebugId($debug_id) {
- $this->debug_id = $debug_id;
- return $this;
- }
-
- /**
- * PayPal internal identifier used for correlation purposes.
- *
- * @return string
- */
- public function getDebugId() {
- return $this->debug_id;
- }
-
- /**
- * PayPal internal identifier used for correlation purposes.
- *
- * @param string $debug_id
- * @deprecated. Instead use setDebugId
- */
- public function setDebug_id($debug_id) {
- $this->debug_id = $debug_id;
- return $this;
- }
- /**
- * PayPal internal identifier used for correlation purposes.
- *
- * @return string
- * @deprecated. Instead use getDebugId
- */
- public function getDebug_id() {
- return $this->debug_id;
- }
-
- /**
- * Message describing the error.
- *
- * @param string $message
- */
- public function setMessage($message) {
- $this->message = $message;
- return $this;
- }
-
- /**
- * Message describing the error.
- *
- * @return string
- */
- public function getMessage() {
- return $this->message;
- }
-
-
- /**
- * URI for detailed information related to this error for the developer.
- *
- * @param string $information_link
- */
- public function setInformationLink($information_link) {
- $this->information_link = $information_link;
- return $this;
- }
-
- /**
- * URI for detailed information related to this error for the developer.
- *
- * @return string
- */
- public function getInformationLink() {
- return $this->information_link;
- }
-
- /**
- * URI for detailed information related to this error for the developer.
- *
- * @param string $information_link
- * @deprecated. Instead use setInformationLink
- */
- public function setInformation_link($information_link) {
- $this->information_link = $information_link;
- return $this;
- }
- /**
- * URI for detailed information related to this error for the developer.
- *
- * @return string
- * @deprecated. Instead use getInformationLink
- */
- public function getInformation_link() {
- return $this->information_link;
- }
-
- /**
- * Additional details of the error
- *
- * @param PayPal\Api\ErrorDetails $details
- */
- public function setDetails($details) {
- $this->details = $details;
- return $this;
- }
-
- /**
- * Additional details of the error
- *
- * @return PayPal\Api\ErrorDetails
- */
- public function getDetails() {
- return $this->details;
- }
+class Error extends PPModel
+{
+ /**
+ * Human readable, unique name of the error.
+ *
+ * @param string $name
+ */
+ public function setName($name)
+ {
+ $this->name = $name;
+ return $this;
+ }
+
+ /**
+ * Human readable, unique name of the error.
+ *
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+
+ /**
+ * PayPal internal identifier used for correlation purposes.
+ *
+ * @param string $debug_id
+ */
+ public function setDebugId($debug_id)
+ {
+ $this->debug_id = $debug_id;
+ return $this;
+ }
+
+ /**
+ * PayPal internal identifier used for correlation purposes.
+ *
+ * @return string
+ */
+ public function getDebugId()
+ {
+ return $this->debug_id;
+ }
+
+ /**
+ * PayPal internal identifier used for correlation purposes.
+ *
+ * @param string $debug_id
+ * @deprecated. Instead use setDebugId
+ */
+ public function setDebug_id($debug_id)
+ {
+ $this->debug_id = $debug_id;
+ return $this;
+ }
+
+ /**
+ * PayPal internal identifier used for correlation purposes.
+ *
+ * @return string
+ * @deprecated. Instead use getDebugId
+ */
+ public function getDebug_id()
+ {
+ return $this->debug_id;
+ }
+
+ /**
+ * Message describing the error.
+ *
+ * @param string $message
+ */
+ public function setMessage($message)
+ {
+ $this->message = $message;
+ return $this;
+ }
+
+ /**
+ * Message describing the error.
+ *
+ * @return string
+ */
+ public function getMessage()
+ {
+ return $this->message;
+ }
+
+
+ /**
+ * URI for detailed information related to this error for the developer.
+ *
+ * @param string $information_link
+ */
+ public function setInformationLink($information_link)
+ {
+ $this->information_link = $information_link;
+ return $this;
+ }
+
+ /**
+ * URI for detailed information related to this error for the developer.
+ *
+ * @return string
+ */
+ public function getInformationLink()
+ {
+ return $this->information_link;
+ }
+
+ /**
+ * URI for detailed information related to this error for the developer.
+ *
+ * @param string $information_link
+ * @deprecated. Instead use setInformationLink
+ */
+ public function setInformation_link($information_link)
+ {
+ $this->information_link = $information_link;
+ return $this;
+ }
+
+ /**
+ * URI for detailed information related to this error for the developer.
+ *
+ * @return string
+ * @deprecated. Instead use getInformationLink
+ */
+ public function getInformation_link()
+ {
+ return $this->information_link;
+ }
+
+ /**
+ * Additional details of the error
+ *
+ * @param PayPal\Api\ErrorDetails $details
+ */
+ public function setDetails($details)
+ {
+ $this->details = $details;
+ return $this;
+ }
+
+ /**
+ * Additional details of the error
+ *
+ * @return PayPal\Api\ErrorDetails
+ */
+ public function getDetails()
+ {
+ return $this->details;
+ }
}
diff --git a/lib/PayPal/Api/ErrorDetails.php b/lib/PayPal/Api/ErrorDetails.php
index 2b5487a6..6b02af09 100644
--- a/lib/PayPal/Api/ErrorDetails.php
+++ b/lib/PayPal/Api/ErrorDetails.php
@@ -4,45 +4,50 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class ErrorDetails extends PPModel {
- /**
- * Name of the field that caused the error.
- *
- * @param string $field
- */
- public function setField($field) {
- $this->field = $field;
- return $this;
- }
-
- /**
- * Name of the field that caused the error.
- *
- * @return string
- */
- public function getField() {
- return $this->field;
- }
-
-
- /**
- * Reason for the error.
- *
- * @param string $issue
- */
- public function setIssue($issue) {
- $this->issue = $issue;
- return $this;
- }
-
- /**
- * Reason for the error.
- *
- * @return string
- */
- public function getIssue() {
- return $this->issue;
- }
+class ErrorDetails extends PPModel
+{
+ /**
+ * Name of the field that caused the error.
+ *
+ * @param string $field
+ */
+ public function setField($field)
+ {
+ $this->field = $field;
+ return $this;
+ }
+
+ /**
+ * Name of the field that caused the error.
+ *
+ * @return string
+ */
+ public function getField()
+ {
+ return $this->field;
+ }
+
+
+ /**
+ * Reason for the error.
+ *
+ * @param string $issue
+ */
+ public function setIssue($issue)
+ {
+ $this->issue = $issue;
+ return $this;
+ }
+
+ /**
+ * Reason for the error.
+ *
+ * @return string
+ */
+ public function getIssue()
+ {
+ return $this->issue;
+ }
}
diff --git a/lib/PayPal/Api/Invoice.php b/lib/PayPal/Api/Invoice.php
index 53a20477..97dacdde 100644
--- a/lib/PayPal/Api/Invoice.php
+++ b/lib/PayPal/Api/Invoice.php
@@ -7,978 +7,1075 @@
use PayPal\Api\Invoices;
use PayPal\Transport\PPRestCall;
-class Invoice extends PPModel implements IResource {
-
- private static $credential;
-
- /**
- *
- * @deprecated. Pass ApiContext to create/get methods instead
- */
- public static function setCredential($credential) {
- self::$credential = $credential;
- }
-
- /**
- * Unique invoice resource identifier.
- *
- * @param string $id
- */
- public function setId($id) {
- $this->id = $id;
- return $this;
- }
-
- /**
- * Unique invoice resource identifier.
- *
- * @return string
- */
- public function getId() {
- return $this->id;
- }
-
-
- /**
- * Unique number that appears on the invoice. If left blank will be auto-incremented from the last number. 25 characters max.
- *
- * @param string $number
- */
- public function setNumber($number) {
- $this->number = $number;
- return $this;
- }
-
- /**
- * Unique number that appears on the invoice. If left blank will be auto-incremented from the last number. 25 characters max.
- *
- * @return string
- */
- public function getNumber() {
- return $this->number;
- }
-
-
- /**
- * URI of the invoice resource.
- *
- * @param string $uri
- */
- public function setUri($uri) {
- $this->uri = $uri;
- return $this;
- }
-
- /**
- * URI of the invoice resource.
- *
- * @return string
- */
- public function getUri() {
- return $this->uri;
- }
-
-
- /**
- * Status of the invoice.
- *
- * @param string $status
- */
- public function setStatus($status) {
- $this->status = $status;
- return $this;
- }
-
- /**
- * Status of the invoice.
- *
- * @return string
- */
- public function getStatus() {
- return $this->status;
- }
-
-
- /**
- * Information about the merchant who is sending the invoice.
- *
- * @param PayPal\Api\MerchantInfo $merchant_info
- */
- public function setMerchantInfo($merchant_info) {
- $this->merchant_info = $merchant_info;
- return $this;
- }
-
- /**
- * Information about the merchant who is sending the invoice.
- *
- * @return PayPal\Api\MerchantInfo
- */
- public function getMerchantInfo() {
- return $this->merchant_info;
- }
-
- /**
- * Information about the merchant who is sending the invoice.
- *
- * @param PayPal\Api\MerchantInfo $merchant_info
- * @deprecated. Instead use setMerchantInfo
- */
- public function setMerchant_info($merchant_info) {
- $this->merchant_info = $merchant_info;
- return $this;
- }
- /**
- * Information about the merchant who is sending the invoice.
- *
- * @return PayPal\Api\MerchantInfo
- * @deprecated. Instead use getMerchantInfo
- */
- 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).
- *
- * @param PayPal\Api\BillingInfo $billing_info
- */
- public function setBillingInfo($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).
- *
- * @return PayPal\Api\BillingInfo
- */
- public function getBillingInfo() {
- return $this->billing_info;
- }
-
- /**
- * Email address of invoice recipient (required) and optional billing information. (Note: We currently only allow one recipient).
- *
- * @param PayPal\Api\BillingInfo $billing_info
- * @deprecated. Instead use setBillingInfo
- */
- 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).
- *
- * @return PayPal\Api\BillingInfo
- * @deprecated. Instead use getBillingInfo
- */
- public function getBilling_info() {
- return $this->billing_info;
- }
-
- /**
- * Shipping information for entities to whom items are being shipped.
- *
- * @param PayPal\Api\ShippingInfo $shipping_info
- */
- public function setShippingInfo($shipping_info) {
- $this->shipping_info = $shipping_info;
- return $this;
- }
-
- /**
- * Shipping information for entities to whom items are being shipped.
- *
- * @return PayPal\Api\ShippingInfo
- */
- public function getShippingInfo() {
- return $this->shipping_info;
- }
-
- /**
- * Shipping information for entities to whom items are being shipped.
- *
- * @param PayPal\Api\ShippingInfo $shipping_info
- * @deprecated. Instead use setShippingInfo
- */
- public function setShipping_info($shipping_info) {
- $this->shipping_info = $shipping_info;
- return $this;
- }
- /**
- * Shipping information for entities to whom items are being shipped.
- *
- * @return PayPal\Api\ShippingInfo
- * @deprecated. Instead use getShippingInfo
- */
- public function getShipping_info() {
- return $this->shipping_info;
- }
-
- /**
- * List of items included in the invoice. 100 items max per invoice.
- *
- * @param PayPal\Api\InvoiceItem $items
- */
- public function setItems($items) {
- $this->items = $items;
- return $this;
- }
-
- /**
- * List of items included in the invoice. 100 items max per invoice.
- *
- * @return PayPal\Api\InvoiceItem
- */
- public function getItems() {
- return $this->items;
- }
-
-
- /**
- * Date on which the invoice was enabled. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
- *
- * @param string $invoice_date
- */
- public function setInvoiceDate($invoice_date) {
- $this->invoice_date = $invoice_date;
- return $this;
- }
-
- /**
- * Date on which the invoice was enabled. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
- *
- * @return string
- */
- public function getInvoiceDate() {
- return $this->invoice_date;
- }
-
- /**
- * Date on which the invoice was enabled. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
- *
- * @param string $invoice_date
- * @deprecated. Instead use setInvoiceDate
- */
- 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. For example, 2014-02-27 PST
- *
- * @return string
- * @deprecated. Instead use getInvoiceDate
- */
- 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.
- *
- * @param PayPal\Api\PaymentTerm $payment_term
- */
- public function setPaymentTerm($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.
- *
- * @return PayPal\Api\PaymentTerm
- */
- public function getPaymentTerm() {
- 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.
- *
- * @param PayPal\Api\PaymentTerm $payment_term
- * @deprecated. Instead use setPaymentTerm
- */
- 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.
- *
- * @return PayPal\Api\PaymentTerm
- * @deprecated. Instead use getPaymentTerm
- */
- public function getPayment_term() {
- return $this->payment_term;
- }
-
- /**
- * Invoice level discount in percent or amount.
- *
- * @param PayPal\Api\Cost $discount
- */
- public function setDiscount($discount) {
- $this->discount = $discount;
- return $this;
- }
-
- /**
- * Invoice level discount in percent or amount.
- *
- * @return PayPal\Api\Cost
- */
- public function getDiscount() {
- return $this->discount;
- }
-
-
- /**
- * Shipping cost in percent or amount.
- *
- * @param PayPal\Api\ShippingCost $shipping_cost
- */
- public function setShippingCost($shipping_cost) {
- $this->shipping_cost = $shipping_cost;
- return $this;
- }
-
- /**
- * Shipping cost in percent or amount.
- *
- * @return PayPal\Api\ShippingCost
- */
- public function getShippingCost() {
- return $this->shipping_cost;
- }
-
- /**
- * Shipping cost in percent or amount.
- *
- * @param PayPal\Api\ShippingCost $shipping_cost
- * @deprecated. Instead use setShippingCost
- */
- public function setShipping_cost($shipping_cost) {
- $this->shipping_cost = $shipping_cost;
- return $this;
- }
- /**
- * Shipping cost in percent or amount.
- *
- * @return PayPal\Api\ShippingCost
- * @deprecated. Instead use getShippingCost
- */
- 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.
- *
- * @param PayPal\Api\CustomAmount $custom
- */
- public function setCustom($custom) {
- $this->custom = $custom;
- return $this;
- }
-
- /**
- * Custom amount applied on an invoice. If a label is included then the amount cannot be empty.
- *
- * @return PayPal\Api\CustomAmount
- */
- public function getCustom() {
- return $this->custom;
- }
-
-
- /**
- * 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.
- *
- * @param boolean $tax_calculated_after_discount
- */
- public function setTaxCalculatedAfterDiscount($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.
- *
- * @return boolean
- */
- public function getTaxCalculatedAfterDiscount() {
- 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.
- *
- * @param boolean $tax_calculated_after_discount
- * @deprecated. Instead use setTaxCalculatedAfterDiscount
- */
- 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.
- *
- * @return boolean
- * @deprecated. Instead use getTaxCalculatedAfterDiscount
- */
- public function getTax_calculated_after_discount() {
- return $this->tax_calculated_after_discount;
- }
-
- /**
- * A flag indicating whether the unit price includes tax. Default is false
- *
- * @param boolean $tax_inclusive
- */
- public function setTaxInclusive($tax_inclusive) {
- $this->tax_inclusive = $tax_inclusive;
- return $this;
- }
-
- /**
- * A flag indicating whether the unit price includes tax. Default is false
- *
- * @return boolean
- */
- public function getTaxInclusive() {
- return $this->tax_inclusive;
- }
-
- /**
- * A flag indicating whether the unit price includes tax. Default is false
- *
- * @param boolean $tax_inclusive
- * @deprecated. Instead use setTaxInclusive
- */
- 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
- *
- * @return boolean
- * @deprecated. Instead use getTaxInclusive
- */
- public function getTax_inclusive() {
- return $this->tax_inclusive;
- }
-
- /**
- * General terms of the invoice. 4000 characters max.
- *
- * @param string $terms
- */
- public function setTerms($terms) {
- $this->terms = $terms;
- return $this;
- }
-
- /**
- * General terms of the invoice. 4000 characters max.
- *
- * @return string
- */
- public function getTerms() {
- return $this->terms;
- }
-
-
- /**
- * Note to the payer. 4000 characters max.
- *
- * @param string $note
- */
- public function setNote($note) {
- $this->note = $note;
- return $this;
- }
-
- /**
- * Note to the payer. 4000 characters max.
- *
- * @return string
- */
- public function getNote() {
- return $this->note;
- }
-
-
- /**
- * Bookkeeping memo that is private to the merchant. 150 characters max.
- *
- * @param string $merchant_memo
- */
- public function setMerchantMemo($merchant_memo) {
- $this->merchant_memo = $merchant_memo;
- return $this;
- }
-
- /**
- * Bookkeeping memo that is private to the merchant. 150 characters max.
- *
- * @return string
- */
- public function getMerchantMemo() {
- return $this->merchant_memo;
- }
-
- /**
- * Bookkeeping memo that is private to the merchant. 150 characters max.
- *
- * @param string $merchant_memo
- * @deprecated. Instead use setMerchantMemo
- */
- public function setMerchant_memo($merchant_memo) {
- $this->merchant_memo = $merchant_memo;
- return $this;
- }
- /**
- * Bookkeeping memo that is private to the merchant. 150 characters max.
- *
- * @return string
- * @deprecated. Instead use getMerchantMemo
- */
- public function getMerchant_memo() {
- return $this->merchant_memo;
- }
-
- /**
- * Full URL of an external image to use as the logo. 4000 characters max.
- *
- * @param string $logo_url
- */
- public function setLogoUrl($logo_url) {
- $this->logo_url = $logo_url;
- return $this;
- }
-
- /**
- * Full URL of an external image to use as the logo. 4000 characters max.
- *
- * @return string
- */
- public function getLogoUrl() {
- return $this->logo_url;
- }
-
- /**
- * Full URL of an external image to use as the logo. 4000 characters max.
- *
- * @param string $logo_url
- * @deprecated. Instead use setLogoUrl
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getLogoUrl
- */
- public function getLogo_url() {
- return $this->logo_url;
- }
-
- /**
- * The total amount of the invoice.
- *
- * @param PayPal\Api\Currency $total_amount
- */
- public function setTotalAmount($total_amount) {
- $this->total_amount = $total_amount;
- return $this;
- }
-
- /**
- * The total amount of the invoice.
- *
- * @return PayPal\Api\Currency
- */
- public function getTotalAmount() {
- return $this->total_amount;
- }
-
- /**
- * The total amount of the invoice.
- *
- * @param PayPal\Api\Currency $total_amount
- * @deprecated. Instead use setTotalAmount
- */
- public function setTotal_amount($total_amount) {
- $this->total_amount = $total_amount;
- return $this;
- }
- /**
- * The total amount of the invoice.
- *
- * @return PayPal\Api\Currency
- * @deprecated. Instead use getTotalAmount
- */
- public function getTotal_amount() {
- return $this->total_amount;
- }
-
- /**
- * Set Payments
- * A list of Payment resources
- *
- * @param \PayPal\Api\Payment $payments
- *
- * @return $this
- */
- public function setPayments($payments)
- {
- $this->payments = $payments;
-
- return $this;
- }
-
- /**
- * Get Payments
- * A list of Payment resources
- *
- * @return \PayPal\Api\Payment
- */
- public function getPayments()
- {
- return $this->payments;
- }
-
- /**
- * List of payment details for the invoice.
- *
- * @param PayPal\Api\PaymentDetail $payment_details
- */
- public function setPaymentDetails($payment_details) {
- $this->payment_details = $payment_details;
- return $this;
- }
-
- /**
- * List of payment details for the invoice.
- *
- * @return PayPal\Api\PaymentDetail
- */
- public function getPaymentDetails() {
- return $this->payment_details;
- }
-
- /**
- * List of payment details for the invoice.
- *
- * @param PayPal\Api\PaymentDetail $payment_details
- * @deprecated. Instead use setPaymentDetails
- */
- public function setPayment_details($payment_details) {
- $this->payment_details = $payment_details;
- return $this;
- }
- /**
- * List of payment details for the invoice.
- *
- * @return PayPal\Api\PaymentDetail
- * @deprecated. Instead use getPaymentDetails
- */
- public function getPayment_details() {
- return $this->payment_details;
- }
-
- /**
- * List of refund details for the invoice.
- *
- * @param PayPal\Api\RefundDetail $refund_details
- */
- public function setRefundDetails($refund_details) {
- $this->refund_details = $refund_details;
- return $this;
- }
-
- /**
- * List of refund details for the invoice.
- *
- * @return PayPal\Api\RefundDetail
- */
- public function getRefundDetails() {
- return $this->refund_details;
- }
-
- /**
- * List of refund details for the invoice.
- *
- * @param PayPal\Api\RefundDetail $refund_details
- * @deprecated. Instead use setRefundDetails
- */
- public function setRefund_details($refund_details) {
- $this->refund_details = $refund_details;
- return $this;
- }
- /**
- * List of refund details for the invoice.
- *
- * @return PayPal\Api\RefundDetail
- * @deprecated. Instead use getRefundDetails
- */
- public function getRefund_details() {
- return $this->refund_details;
- }
-
- /**
- * Audit information for the invoice.
- *
- * @param PayPal\Api\Metadata $metadata
- */
- public function setMetadata($metadata) {
- $this->metadata = $metadata;
- return $this;
- }
-
- /**
- * Audit information for the invoice.
- *
- * @return PayPal\Api\Metadata
- */
- public function getMetadata() {
- return $this->metadata;
- }
-
-
-
- /*
- * Creates a new invoice Resource.
- *
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return Invoice
- */
- public function create($apiContext = null) {
- $payLoad = $this->toJSON();
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices", "POST", $payLoad);
- $this->fromJson($json);
- return $this;
- }
-
- /*
- * Search for invoice resources.
- *
- * @param Search $search
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return Invoices
- */
- public function search($search, $apiContext = null) {
- if (($search == null)) {
- throw new \InvalidArgumentException("search cannot be null or empty");
- }
- $payLoad = $search->toJSON();
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/search", "POST", $payLoad);
- $ret = new Invoices();
- $ret->fromJson($json);
- return $ret;
- }
-
- /*
- * Sends a legitimate invoice to the payer.
- *
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return void
- */
- public function send($apiContext = null) {
- if ($this->getId() == null) {
- throw new \InvalidArgumentException("Id cannot be null");
- }
- $payLoad = "";
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/send", "POST", $payLoad);
- return true;
- }
-
- /*
- * Reminds the payer to pay the invoice.
- *
- * @param Notification $notification
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return void
- */
- public function remind($notification, $apiContext = null) {
- if ($this->getId() == null) {
- throw new \InvalidArgumentException("Id cannot be null");
- }
- if (($notification == null)) {
- throw new \InvalidArgumentException("notification cannot be null or empty");
- }
- $payLoad = $notification->toJSON();
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/remind", "POST", $payLoad);
- return true;
- }
-
- /*
- * Cancels an invoice.
- *
- * @param CancelNotification $cancelNotification
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return void
- */
- public function cancel($cancelNotification, $apiContext = null) {
- if ($this->getId() == null) {
- throw new \InvalidArgumentException("Id cannot be null");
- }
- if (($cancelNotification == null)) {
- throw new \InvalidArgumentException("cancelNotification cannot be null or empty");
- }
- $payLoad = $cancelNotification->toJSON();
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/cancel", "POST", $payLoad);
- return true;
- }
-
- /*
- * Mark the status of the invoice as paid.
- *
- * @param PaymentDetail $paymentDetail
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return void
- */
- public function record_payment($paymentDetail, $apiContext = null) {
- if ($this->getId() == null) {
- throw new \InvalidArgumentException("Id cannot be null");
- }
- if (($paymentDetail == null)) {
- throw new \InvalidArgumentException("paymentDetail cannot be null or empty");
- }
- $payLoad = $paymentDetail->toJSON();
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/record-payment", "POST", $payLoad);
- return true;
- }
-
- /*
- * Mark the status of the invoice as refunded.
- *
- * @param RefundDetail $refundDetail
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return void
- */
- public function record_refund($refundDetail, $apiContext = null) {
- if ($this->getId() == null) {
- throw new \InvalidArgumentException("Id cannot be null");
- }
- if (($refundDetail == null)) {
- throw new \InvalidArgumentException("refundDetail cannot be null or empty");
- }
- $payLoad = $refundDetail->toJSON();
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/record-refund", "POST", $payLoad);
- return true;
- }
-
- /*
- * Get the invoice resource for the given identifier.
- *
- * @param string $invoiceId
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return Invoice
- */
- public static function get($invoiceId, $apiContext = null) {
- if (($invoiceId == null) || (strlen($invoiceId) <= 0)) {
- throw new \InvalidArgumentException("invoiceId cannot be null or empty");
- }
- $payLoad = "";
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/$invoiceId", "GET", $payLoad);
- $ret = new Invoice();
- $ret->fromJson($json);
- return $ret;
- }
-
- /*
- * Get all invoices of a merchant.
- *
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return Invoices
- */
- public static function get_all($apiContext = null) {
- $payLoad = "";
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/", "GET", $payLoad);
- $ret = new Invoices();
- $ret->fromJson($json);
- return $ret;
- }
-
- /*
- * Full update of the invoice resource for the given identifier.
- *
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return Invoice
- */
- public function update($apiContext = null) {
- if ($this->getId() == null) {
- throw new \InvalidArgumentException("Id cannot be null");
- }
- $payLoad = $this->toJSON();
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}", "PUT", $payLoad);
- $this->fromJson($json);
- return $this;
- }
-
- /*
- * Delete invoice resource for the given identifier.
- *
- * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @return void
- */
- public function delete($apiContext = null) {
- if ($this->getId() == null) {
- throw new \InvalidArgumentException("Id cannot be null");
- }
- $payLoad = "";
- if ($apiContext == null) {
- $apiContext = new ApiContext(self::$credential);
- }
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}", "DELETE", $payLoad);
- return true;
- }
+class Invoice extends PPModel implements IResource
+{
+
+ private static $credential;
+
+ /**
+ *
+ * @deprecated. Pass ApiContext to create/get methods instead
+ */
+ public static function setCredential($credential)
+ {
+ self::$credential = $credential;
+ }
+
+ /**
+ * Unique invoice resource identifier.
+ *
+ * @param string $id
+ */
+ public function setId($id)
+ {
+ $this->id = $id;
+ return $this;
+ }
+
+ /**
+ * Unique invoice resource identifier.
+ *
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+
+ /**
+ * Unique number that appears on the invoice. If left blank will be auto-incremented from the last number. 25 characters max.
+ *
+ * @param string $number
+ */
+ public function setNumber($number)
+ {
+ $this->number = $number;
+ return $this;
+ }
+
+ /**
+ * Unique number that appears on the invoice. If left blank will be auto-incremented from the last number. 25 characters max.
+ *
+ * @return string
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+
+ /**
+ * URI of the invoice resource.
+ *
+ * @param string $uri
+ */
+ public function setUri($uri)
+ {
+ $this->uri = $uri;
+ return $this;
+ }
+
+ /**
+ * URI of the invoice resource.
+ *
+ * @return string
+ */
+ public function getUri()
+ {
+ return $this->uri;
+ }
+
+
+ /**
+ * Status of the invoice.
+ *
+ * @param string $status
+ */
+ public function setStatus($status)
+ {
+ $this->status = $status;
+ return $this;
+ }
+
+ /**
+ * Status of the invoice.
+ *
+ * @return string
+ */
+ public function getStatus()
+ {
+ return $this->status;
+ }
+
+
+ /**
+ * Information about the merchant who is sending the invoice.
+ *
+ * @param PayPal\Api\MerchantInfo $merchant_info
+ */
+ public function setMerchantInfo($merchant_info)
+ {
+ $this->merchant_info = $merchant_info;
+ return $this;
+ }
+
+ /**
+ * Information about the merchant who is sending the invoice.
+ *
+ * @return PayPal\Api\MerchantInfo
+ */
+ public function getMerchantInfo()
+ {
+ return $this->merchant_info;
+ }
+
+ /**
+ * Information about the merchant who is sending the invoice.
+ *
+ * @param PayPal\Api\MerchantInfo $merchant_info
+ * @deprecated. Instead use setMerchantInfo
+ */
+ public function setMerchant_info($merchant_info)
+ {
+ $this->merchant_info = $merchant_info;
+ return $this;
+ }
+
+ /**
+ * Information about the merchant who is sending the invoice.
+ *
+ * @return PayPal\Api\MerchantInfo
+ * @deprecated. Instead use getMerchantInfo
+ */
+ 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).
+ *
+ * @param PayPal\Api\BillingInfo $billing_info
+ */
+ public function setBillingInfo($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).
+ *
+ * @return PayPal\Api\BillingInfo
+ */
+ public function getBillingInfo()
+ {
+ return $this->billing_info;
+ }
+
+ /**
+ * Email address of invoice recipient (required) and optional billing information. (Note: We currently only allow one recipient).
+ *
+ * @param PayPal\Api\BillingInfo $billing_info
+ * @deprecated. Instead use setBillingInfo
+ */
+ 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).
+ *
+ * @return PayPal\Api\BillingInfo
+ * @deprecated. Instead use getBillingInfo
+ */
+ public function getBilling_info()
+ {
+ return $this->billing_info;
+ }
+
+ /**
+ * Shipping information for entities to whom items are being shipped.
+ *
+ * @param PayPal\Api\ShippingInfo $shipping_info
+ */
+ public function setShippingInfo($shipping_info)
+ {
+ $this->shipping_info = $shipping_info;
+ return $this;
+ }
+
+ /**
+ * Shipping information for entities to whom items are being shipped.
+ *
+ * @return PayPal\Api\ShippingInfo
+ */
+ public function getShippingInfo()
+ {
+ return $this->shipping_info;
+ }
+
+ /**
+ * Shipping information for entities to whom items are being shipped.
+ *
+ * @param PayPal\Api\ShippingInfo $shipping_info
+ * @deprecated. Instead use setShippingInfo
+ */
+ public function setShipping_info($shipping_info)
+ {
+ $this->shipping_info = $shipping_info;
+ return $this;
+ }
+
+ /**
+ * Shipping information for entities to whom items are being shipped.
+ *
+ * @return PayPal\Api\ShippingInfo
+ * @deprecated. Instead use getShippingInfo
+ */
+ public function getShipping_info()
+ {
+ return $this->shipping_info;
+ }
+
+ /**
+ * List of items included in the invoice. 100 items max per invoice.
+ *
+ * @param PayPal\Api\InvoiceItem $items
+ */
+ public function setItems($items)
+ {
+ $this->items = $items;
+ return $this;
+ }
+
+ /**
+ * List of items included in the invoice. 100 items max per invoice.
+ *
+ * @return PayPal\Api\InvoiceItem
+ */
+ public function getItems()
+ {
+ return $this->items;
+ }
+
+
+ /**
+ * Date on which the invoice was enabled. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
+ *
+ * @param string $invoice_date
+ */
+ public function setInvoiceDate($invoice_date)
+ {
+ $this->invoice_date = $invoice_date;
+ return $this;
+ }
+
+ /**
+ * Date on which the invoice was enabled. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
+ *
+ * @return string
+ */
+ public function getInvoiceDate()
+ {
+ return $this->invoice_date;
+ }
+
+ /**
+ * Date on which the invoice was enabled. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
+ *
+ * @param string $invoice_date
+ * @deprecated. Instead use setInvoiceDate
+ */
+ 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. For example, 2014-02-27 PST
+ *
+ * @return string
+ * @deprecated. Instead use getInvoiceDate
+ */
+ 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.
+ *
+ * @param PayPal\Api\PaymentTerm $payment_term
+ */
+ public function setPaymentTerm($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.
+ *
+ * @return PayPal\Api\PaymentTerm
+ */
+ public function getPaymentTerm()
+ {
+ 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.
+ *
+ * @param PayPal\Api\PaymentTerm $payment_term
+ * @deprecated. Instead use setPaymentTerm
+ */
+ 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.
+ *
+ * @return PayPal\Api\PaymentTerm
+ * @deprecated. Instead use getPaymentTerm
+ */
+ public function getPayment_term()
+ {
+ return $this->payment_term;
+ }
+
+ /**
+ * Invoice level discount in percent or amount.
+ *
+ * @param PayPal\Api\Cost $discount
+ */
+ public function setDiscount($discount)
+ {
+ $this->discount = $discount;
+ return $this;
+ }
+
+ /**
+ * Invoice level discount in percent or amount.
+ *
+ * @return PayPal\Api\Cost
+ */
+ public function getDiscount()
+ {
+ return $this->discount;
+ }
+
+
+ /**
+ * Shipping cost in percent or amount.
+ *
+ * @param PayPal\Api\ShippingCost $shipping_cost
+ */
+ public function setShippingCost($shipping_cost)
+ {
+ $this->shipping_cost = $shipping_cost;
+ return $this;
+ }
+
+ /**
+ * Shipping cost in percent or amount.
+ *
+ * @return PayPal\Api\ShippingCost
+ */
+ public function getShippingCost()
+ {
+ return $this->shipping_cost;
+ }
+
+ /**
+ * Shipping cost in percent or amount.
+ *
+ * @param PayPal\Api\ShippingCost $shipping_cost
+ * @deprecated. Instead use setShippingCost
+ */
+ public function setShipping_cost($shipping_cost)
+ {
+ $this->shipping_cost = $shipping_cost;
+ return $this;
+ }
+
+ /**
+ * Shipping cost in percent or amount.
+ *
+ * @return PayPal\Api\ShippingCost
+ * @deprecated. Instead use getShippingCost
+ */
+ 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.
+ *
+ * @param PayPal\Api\CustomAmount $custom
+ */
+ public function setCustom($custom)
+ {
+ $this->custom = $custom;
+ return $this;
+ }
+
+ /**
+ * Custom amount applied on an invoice. If a label is included then the amount cannot be empty.
+ *
+ * @return PayPal\Api\CustomAmount
+ */
+ public function getCustom()
+ {
+ return $this->custom;
+ }
+
+
+ /**
+ * 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.
+ *
+ * @param boolean $tax_calculated_after_discount
+ */
+ public function setTaxCalculatedAfterDiscount($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.
+ *
+ * @return boolean
+ */
+ public function getTaxCalculatedAfterDiscount()
+ {
+ 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.
+ *
+ * @param boolean $tax_calculated_after_discount
+ * @deprecated. Instead use setTaxCalculatedAfterDiscount
+ */
+ 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.
+ *
+ * @return boolean
+ * @deprecated. Instead use getTaxCalculatedAfterDiscount
+ */
+ public function getTax_calculated_after_discount()
+ {
+ return $this->tax_calculated_after_discount;
+ }
+
+ /**
+ * A flag indicating whether the unit price includes tax. Default is false
+ *
+ * @param boolean $tax_inclusive
+ */
+ public function setTaxInclusive($tax_inclusive)
+ {
+ $this->tax_inclusive = $tax_inclusive;
+ return $this;
+ }
+
+ /**
+ * A flag indicating whether the unit price includes tax. Default is false
+ *
+ * @return boolean
+ */
+ public function getTaxInclusive()
+ {
+ return $this->tax_inclusive;
+ }
+
+ /**
+ * A flag indicating whether the unit price includes tax. Default is false
+ *
+ * @param boolean $tax_inclusive
+ * @deprecated. Instead use setTaxInclusive
+ */
+ 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
+ *
+ * @return boolean
+ * @deprecated. Instead use getTaxInclusive
+ */
+ public function getTax_inclusive()
+ {
+ return $this->tax_inclusive;
+ }
+
+ /**
+ * General terms of the invoice. 4000 characters max.
+ *
+ * @param string $terms
+ */
+ public function setTerms($terms)
+ {
+ $this->terms = $terms;
+ return $this;
+ }
+
+ /**
+ * General terms of the invoice. 4000 characters max.
+ *
+ * @return string
+ */
+ public function getTerms()
+ {
+ return $this->terms;
+ }
+
+
+ /**
+ * Note to the payer. 4000 characters max.
+ *
+ * @param string $note
+ */
+ public function setNote($note)
+ {
+ $this->note = $note;
+ return $this;
+ }
+
+ /**
+ * Note to the payer. 4000 characters max.
+ *
+ * @return string
+ */
+ public function getNote()
+ {
+ return $this->note;
+ }
+
+
+ /**
+ * Bookkeeping memo that is private to the merchant. 150 characters max.
+ *
+ * @param string $merchant_memo
+ */
+ public function setMerchantMemo($merchant_memo)
+ {
+ $this->merchant_memo = $merchant_memo;
+ return $this;
+ }
+
+ /**
+ * Bookkeeping memo that is private to the merchant. 150 characters max.
+ *
+ * @return string
+ */
+ public function getMerchantMemo()
+ {
+ return $this->merchant_memo;
+ }
+
+ /**
+ * Bookkeeping memo that is private to the merchant. 150 characters max.
+ *
+ * @param string $merchant_memo
+ * @deprecated. Instead use setMerchantMemo
+ */
+ public function setMerchant_memo($merchant_memo)
+ {
+ $this->merchant_memo = $merchant_memo;
+ return $this;
+ }
+
+ /**
+ * Bookkeeping memo that is private to the merchant. 150 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getMerchantMemo
+ */
+ public function getMerchant_memo()
+ {
+ return $this->merchant_memo;
+ }
+
+ /**
+ * Full URL of an external image to use as the logo. 4000 characters max.
+ *
+ * @param string $logo_url
+ */
+ public function setLogoUrl($logo_url)
+ {
+ $this->logo_url = $logo_url;
+ return $this;
+ }
+
+ /**
+ * Full URL of an external image to use as the logo. 4000 characters max.
+ *
+ * @return string
+ */
+ public function getLogoUrl()
+ {
+ return $this->logo_url;
+ }
+
+ /**
+ * Full URL of an external image to use as the logo. 4000 characters max.
+ *
+ * @param string $logo_url
+ * @deprecated. Instead use setLogoUrl
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getLogoUrl
+ */
+ public function getLogo_url()
+ {
+ return $this->logo_url;
+ }
+
+ /**
+ * The total amount of the invoice.
+ *
+ * @param PayPal\Api\Currency $total_amount
+ */
+ public function setTotalAmount($total_amount)
+ {
+ $this->total_amount = $total_amount;
+ return $this;
+ }
+
+ /**
+ * The total amount of the invoice.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getTotalAmount()
+ {
+ return $this->total_amount;
+ }
+
+ /**
+ * The total amount of the invoice.
+ *
+ * @param PayPal\Api\Currency $total_amount
+ * @deprecated. Instead use setTotalAmount
+ */
+ public function setTotal_amount($total_amount)
+ {
+ $this->total_amount = $total_amount;
+ return $this;
+ }
+
+ /**
+ * The total amount of the invoice.
+ *
+ * @return PayPal\Api\Currency
+ * @deprecated. Instead use getTotalAmount
+ */
+ public function getTotal_amount()
+ {
+ return $this->total_amount;
+ }
+
+ /**
+ * Set Payments
+ * A list of Payment resources
+ *
+ * @param \PayPal\Api\Payment $payments
+ *
+ * @return $this
+ */
+ public function setPayments($payments)
+ {
+ $this->payments = $payments;
+
+ return $this;
+ }
+
+ /**
+ * Get Payments
+ * A list of Payment resources
+ *
+ * @return \PayPal\Api\Payment
+ */
+ public function getPayments()
+ {
+ return $this->payments;
+ }
+
+ /**
+ * List of payment details for the invoice.
+ *
+ * @param PayPal\Api\PaymentDetail $payment_details
+ */
+ public function setPaymentDetails($payment_details)
+ {
+ $this->payment_details = $payment_details;
+ return $this;
+ }
+
+ /**
+ * List of payment details for the invoice.
+ *
+ * @return PayPal\Api\PaymentDetail
+ */
+ public function getPaymentDetails()
+ {
+ return $this->payment_details;
+ }
+
+ /**
+ * List of payment details for the invoice.
+ *
+ * @param PayPal\Api\PaymentDetail $payment_details
+ * @deprecated. Instead use setPaymentDetails
+ */
+ public function setPayment_details($payment_details)
+ {
+ $this->payment_details = $payment_details;
+ return $this;
+ }
+
+ /**
+ * List of payment details for the invoice.
+ *
+ * @return PayPal\Api\PaymentDetail
+ * @deprecated. Instead use getPaymentDetails
+ */
+ public function getPayment_details()
+ {
+ return $this->payment_details;
+ }
+
+ /**
+ * List of refund details for the invoice.
+ *
+ * @param PayPal\Api\RefundDetail $refund_details
+ */
+ public function setRefundDetails($refund_details)
+ {
+ $this->refund_details = $refund_details;
+ return $this;
+ }
+
+ /**
+ * List of refund details for the invoice.
+ *
+ * @return PayPal\Api\RefundDetail
+ */
+ public function getRefundDetails()
+ {
+ return $this->refund_details;
+ }
+
+ /**
+ * List of refund details for the invoice.
+ *
+ * @param PayPal\Api\RefundDetail $refund_details
+ * @deprecated. Instead use setRefundDetails
+ */
+ public function setRefund_details($refund_details)
+ {
+ $this->refund_details = $refund_details;
+ return $this;
+ }
+
+ /**
+ * List of refund details for the invoice.
+ *
+ * @return PayPal\Api\RefundDetail
+ * @deprecated. Instead use getRefundDetails
+ */
+ public function getRefund_details()
+ {
+ return $this->refund_details;
+ }
+
+ /**
+ * Audit information for the invoice.
+ *
+ * @param PayPal\Api\Metadata $metadata
+ */
+ public function setMetadata($metadata)
+ {
+ $this->metadata = $metadata;
+ return $this;
+ }
+
+ /**
+ * Audit information for the invoice.
+ *
+ * @return PayPal\Api\Metadata
+ */
+ public function getMetadata()
+ {
+ return $this->metadata;
+ }
+
+
+ /*
+ * Creates a new invoice Resource.
+ *
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return Invoice
+ */
+ public function create($apiContext = null)
+ {
+ $payLoad = $this->toJSON();
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices", "POST", $payLoad);
+ $this->fromJson($json);
+ return $this;
+ }
+
+ /*
+ * Search for invoice resources.
+ *
+ * @param Search $search
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return Invoices
+ */
+ public function search($search, $apiContext = null)
+ {
+ if (($search == null)) {
+ throw new \InvalidArgumentException("search cannot be null or empty");
+ }
+ $payLoad = $search->toJSON();
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/search", "POST", $payLoad);
+ $ret = new Invoices();
+ $ret->fromJson($json);
+ return $ret;
+ }
+
+ /*
+ * Sends a legitimate invoice to the payer.
+ *
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return void
+ */
+ public function send($apiContext = null)
+ {
+ if ($this->getId() == null) {
+ throw new \InvalidArgumentException("Id cannot be null");
+ }
+ $payLoad = "";
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/send", "POST", $payLoad);
+ return true;
+ }
+
+ /*
+ * Reminds the payer to pay the invoice.
+ *
+ * @param Notification $notification
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return void
+ */
+ public function remind($notification, $apiContext = null)
+ {
+ if ($this->getId() == null) {
+ throw new \InvalidArgumentException("Id cannot be null");
+ }
+ if (($notification == null)) {
+ throw new \InvalidArgumentException("notification cannot be null or empty");
+ }
+ $payLoad = $notification->toJSON();
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/remind", "POST", $payLoad);
+ return true;
+ }
+
+ /*
+ * Cancels an invoice.
+ *
+ * @param CancelNotification $cancelNotification
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return void
+ */
+ public function cancel($cancelNotification, $apiContext = null)
+ {
+ if ($this->getId() == null) {
+ throw new \InvalidArgumentException("Id cannot be null");
+ }
+ if (($cancelNotification == null)) {
+ throw new \InvalidArgumentException("cancelNotification cannot be null or empty");
+ }
+ $payLoad = $cancelNotification->toJSON();
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/cancel", "POST", $payLoad);
+ return true;
+ }
+
+ /*
+ * Mark the status of the invoice as paid.
+ *
+ * @param PaymentDetail $paymentDetail
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return void
+ */
+ public function record_payment($paymentDetail, $apiContext = null)
+ {
+ if ($this->getId() == null) {
+ throw new \InvalidArgumentException("Id cannot be null");
+ }
+ if (($paymentDetail == null)) {
+ throw new \InvalidArgumentException("paymentDetail cannot be null or empty");
+ }
+ $payLoad = $paymentDetail->toJSON();
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/record-payment", "POST", $payLoad);
+ return true;
+ }
+
+ /*
+ * Mark the status of the invoice as refunded.
+ *
+ * @param RefundDetail $refundDetail
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return void
+ */
+ public function record_refund($refundDetail, $apiContext = null)
+ {
+ if ($this->getId() == null) {
+ throw new \InvalidArgumentException("Id cannot be null");
+ }
+ if (($refundDetail == null)) {
+ throw new \InvalidArgumentException("refundDetail cannot be null or empty");
+ }
+ $payLoad = $refundDetail->toJSON();
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}/record-refund", "POST", $payLoad);
+ return true;
+ }
+
+ /*
+ * Get the invoice resource for the given identifier.
+ *
+ * @param string $invoiceId
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return Invoice
+ */
+ public static function get($invoiceId, $apiContext = null)
+ {
+ if (($invoiceId == null) || (strlen($invoiceId) <= 0)) {
+ throw new \InvalidArgumentException("invoiceId cannot be null or empty");
+ }
+ $payLoad = "";
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/$invoiceId", "GET", $payLoad);
+ $ret = new Invoice();
+ $ret->fromJson($json);
+ return $ret;
+ }
+
+ /*
+ * Get all invoices of a merchant.
+ *
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return Invoices
+ */
+ public static function get_all($apiContext = null)
+ {
+ $payLoad = "";
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/", "GET", $payLoad);
+ $ret = new Invoices();
+ $ret->fromJson($json);
+ return $ret;
+ }
+
+ /*
+ * Full update of the invoice resource for the given identifier.
+ *
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return Invoice
+ */
+ public function update($apiContext = null)
+ {
+ if ($this->getId() == null) {
+ throw new \InvalidArgumentException("Id cannot be null");
+ }
+ $payLoad = $this->toJSON();
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}", "PUT", $payLoad);
+ $this->fromJson($json);
+ return $this;
+ }
+
+ /*
+ * Delete invoice resource for the given identifier.
+ *
+ * @param PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
+ * @return void
+ */
+ public function delete($apiContext = null)
+ {
+ if ($this->getId() == null) {
+ throw new \InvalidArgumentException("Id cannot be null");
+ }
+ $payLoad = "";
+ if ($apiContext == null) {
+ $apiContext = new ApiContext(self::$credential);
+ }
+ $call = new PPRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/invoicing/invoices/{$this->getId()}", "DELETE", $payLoad);
+ return true;
+ }
}
diff --git a/lib/PayPal/Api/InvoiceItem.php b/lib/PayPal/Api/InvoiceItem.php
index aefdaf9c..734db694 100644
--- a/lib/PayPal/Api/InvoiceItem.php
+++ b/lib/PayPal/Api/InvoiceItem.php
@@ -4,164 +4,182 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class InvoiceItem extends PPModel {
- /**
- * Name of the item. 60 characters max.
- *
- * @param string $name
- */
- public function setName($name) {
- $this->name = $name;
- return $this;
- }
-
- /**
- * Name of the item. 60 characters max.
- *
- * @return string
- */
- public function getName() {
- return $this->name;
- }
-
-
- /**
- * Description of the item. 1000 characters max.
- *
- * @param string $description
- */
- public function setDescription($description) {
- $this->description = $description;
- return $this;
- }
-
- /**
- * Description of the item. 1000 characters max.
- *
- * @return string
- */
- public function getDescription() {
- return $this->description;
- }
-
-
- /**
- * Quantity of the item. Range of 0 to 9999.999.
- *
- * @param PayPal\Api\number $quantity
- */
- public function setQuantity($quantity) {
- $this->quantity = $quantity;
- return $this;
- }
-
- /**
- * Quantity of the item. Range of 0 to 9999.999.
- *
- * @return PayPal\Api\number
- */
- public function getQuantity() {
- return $this->quantity;
- }
-
-
- /**
- * Unit price of the item. Range of -999999.99 to 999999.99.
- *
- * @param PayPal\Api\Currency $unit_price
- */
- public function setUnitPrice($unit_price) {
- $this->unit_price = $unit_price;
- return $this;
- }
-
- /**
- * Unit price of the item. Range of -999999.99 to 999999.99.
- *
- * @return PayPal\Api\Currency
- */
- public function getUnitPrice() {
- return $this->unit_price;
- }
-
- /**
- * Unit price of the item. Range of -999999.99 to 999999.99.
- *
- * @param PayPal\Api\Currency $unit_price
- * @deprecated. Instead use setUnitPrice
- */
- 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.
- *
- * @return PayPal\Api\Currency
- * @deprecated. Instead use getUnitPrice
- */
- public function getUnit_price() {
- return $this->unit_price;
- }
-
- /**
- * Tax associated with the item.
- *
- * @param PayPal\Api\Tax $tax
- */
- public function setTax($tax) {
- $this->tax = $tax;
- return $this;
- }
-
- /**
- * Tax associated with the item.
- *
- * @return PayPal\Api\Tax
- */
- public function getTax() {
- return $this->tax;
- }
-
-
- /**
- * Date on which the item or service was provided. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
- *
- * @param string $date
- */
- public function setDate($date) {
- $this->date = $date;
- return $this;
- }
-
- /**
- * Date on which the item or service was provided. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
- *
- * @return string
- */
- public function getDate() {
- return $this->date;
- }
-
-
- /**
- * Item discount in percent or amount.
- *
- * @param PayPal\Api\Cost $discount
- */
- public function setDiscount($discount) {
- $this->discount = $discount;
- return $this;
- }
-
- /**
- * Item discount in percent or amount.
- *
- * @return PayPal\Api\Cost
- */
- public function getDiscount() {
- return $this->discount;
- }
+class InvoiceItem extends PPModel
+{
+ /**
+ * Name of the item. 60 characters max.
+ *
+ * @param string $name
+ */
+ public function setName($name)
+ {
+ $this->name = $name;
+ return $this;
+ }
+
+ /**
+ * Name of the item. 60 characters max.
+ *
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+
+ /**
+ * Description of the item. 1000 characters max.
+ *
+ * @param string $description
+ */
+ public function setDescription($description)
+ {
+ $this->description = $description;
+ return $this;
+ }
+
+ /**
+ * Description of the item. 1000 characters max.
+ *
+ * @return string
+ */
+ public function getDescription()
+ {
+ return $this->description;
+ }
+
+
+ /**
+ * Quantity of the item. Range of 0 to 9999.999.
+ *
+ * @param PayPal\Api\number $quantity
+ */
+ public function setQuantity($quantity)
+ {
+ $this->quantity = $quantity;
+ return $this;
+ }
+
+ /**
+ * Quantity of the item. Range of 0 to 9999.999.
+ *
+ * @return PayPal\Api\number
+ */
+ public function getQuantity()
+ {
+ return $this->quantity;
+ }
+
+
+ /**
+ * Unit price of the item. Range of -999999.99 to 999999.99.
+ *
+ * @param PayPal\Api\Currency $unit_price
+ */
+ public function setUnitPrice($unit_price)
+ {
+ $this->unit_price = $unit_price;
+ return $this;
+ }
+
+ /**
+ * Unit price of the item. Range of -999999.99 to 999999.99.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getUnitPrice()
+ {
+ return $this->unit_price;
+ }
+
+ /**
+ * Unit price of the item. Range of -999999.99 to 999999.99.
+ *
+ * @param PayPal\Api\Currency $unit_price
+ * @deprecated. Instead use setUnitPrice
+ */
+ 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.
+ *
+ * @return PayPal\Api\Currency
+ * @deprecated. Instead use getUnitPrice
+ */
+ public function getUnit_price()
+ {
+ return $this->unit_price;
+ }
+
+ /**
+ * Tax associated with the item.
+ *
+ * @param PayPal\Api\Tax $tax
+ */
+ public function setTax($tax)
+ {
+ $this->tax = $tax;
+ return $this;
+ }
+
+ /**
+ * Tax associated with the item.
+ *
+ * @return PayPal\Api\Tax
+ */
+ public function getTax()
+ {
+ return $this->tax;
+ }
+
+
+ /**
+ * Date on which the item or service was provided. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
+ *
+ * @param string $date
+ */
+ public function setDate($date)
+ {
+ $this->date = $date;
+ return $this;
+ }
+
+ /**
+ * Date on which the item or service was provided. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
+ *
+ * @return string
+ */
+ public function getDate()
+ {
+ return $this->date;
+ }
+
+
+ /**
+ * Item discount in percent or amount.
+ *
+ * @param PayPal\Api\Cost $discount
+ */
+ public function setDiscount($discount)
+ {
+ $this->discount = $discount;
+ return $this;
+ }
+
+ /**
+ * Item discount in percent or amount.
+ *
+ * @return PayPal\Api\Cost
+ */
+ public function getDiscount()
+ {
+ return $this->discount;
+ }
}
diff --git a/lib/PayPal/Api/Invoices.php b/lib/PayPal/Api/Invoices.php
index b74a0e03..15cbfd7d 100644
--- a/lib/PayPal/Api/Invoices.php
+++ b/lib/PayPal/Api/Invoices.php
@@ -4,64 +4,72 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class Invoices extends PPModel {
- /**
- *
- *
- * @param integer $total_count
- */
- public function setTotalCount($total_count) {
- $this->total_count = $total_count;
- return $this;
- }
+class Invoices extends PPModel
+{
+ /**
+ *
+ *
+ * @param integer $total_count
+ */
+ public function setTotalCount($total_count)
+ {
+ $this->total_count = $total_count;
+ return $this;
+ }
- /**
- *
- *
- * @return integer
- */
- public function getTotalCount() {
- return $this->total_count;
- }
+ /**
+ *
+ *
+ * @return integer
+ */
+ public function getTotalCount()
+ {
+ return $this->total_count;
+ }
- /**
- *
- *
- * @param integer $total_count
- * @deprecated. Instead use setTotalCount
- */
- public function setTotal_count($total_count) {
- $this->total_count = $total_count;
- return $this;
- }
- /**
- *
- *
- * @return integer
- * @deprecated. Instead use getTotalCount
- */
- public function getTotal_count() {
- return $this->total_count;
- }
+ /**
+ *
+ *
+ * @param integer $total_count
+ * @deprecated. Instead use setTotalCount
+ */
+ public function setTotal_count($total_count)
+ {
+ $this->total_count = $total_count;
+ return $this;
+ }
- /**
- * List of invoices belonging to a merchant.
- *
- * @param PayPal\Api\Invoice $invoices
- */
- public function setInvoices($invoices) {
- $this->invoices = $invoices;
- return $this;
- }
+ /**
+ *
+ *
+ * @return integer
+ * @deprecated. Instead use getTotalCount
+ */
+ public function getTotal_count()
+ {
+ return $this->total_count;
+ }
- /**
- * List of invoices belonging to a merchant.
- *
- * @return PayPal\Api\Invoice
- */
- public function getInvoices() {
- return $this->invoices;
- }
+ /**
+ * List of invoices belonging to a merchant.
+ *
+ * @param PayPal\Api\Invoice $invoices
+ */
+ public function setInvoices($invoices)
+ {
+ $this->invoices = $invoices;
+ return $this;
+ }
+
+ /**
+ * List of invoices belonging to a merchant.
+ *
+ * @return PayPal\Api\Invoice
+ */
+ public function getInvoices()
+ {
+ return $this->invoices;
+ }
}
diff --git a/lib/PayPal/Api/InvoicingMetaData.php b/lib/PayPal/Api/InvoicingMetaData.php
index 84122ef1..19d435ba 100644
--- a/lib/PayPal/Api/InvoicingMetaData.php
+++ b/lib/PayPal/Api/InvoicingMetaData.php
@@ -4,356 +4,402 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class InvoicingMetaData extends PPModel {
- /**
- * Date when the resource was created.
- *
- * @param string $created_date
- */
- public function setCreatedDate($created_date) {
- $this->created_date = $created_date;
- return $this;
- }
-
- /**
- * Date when the resource was created.
- *
- * @return string
- */
- public function getCreatedDate() {
- return $this->created_date;
- }
-
- /**
- * Date when the resource was created.
- *
- * @param string $created_date
- * @deprecated. Instead use setCreatedDate
- */
- public function setCreated_date($created_date) {
- $this->created_date = $created_date;
- return $this;
- }
- /**
- * Date when the resource was created.
- *
- * @return string
- * @deprecated. Instead use getCreatedDate
- */
- public function getCreated_date() {
- return $this->created_date;
- }
-
- /**
- * Email address of the account that created the resource.
- *
- * @param string $created_by
- */
- public function setCreatedBy($created_by) {
- $this->created_by = $created_by;
- return $this;
- }
-
- /**
- * Email address of the account that created the resource.
- *
- * @return string
- */
- public function getCreatedBy() {
- return $this->created_by;
- }
-
- /**
- * Email address of the account that created the resource.
- *
- * @param string $created_by
- * @deprecated. Instead use setCreatedBy
- */
- public function setCreated_by($created_by) {
- $this->created_by = $created_by;
- return $this;
- }
- /**
- * Email address of the account that created the resource.
- *
- * @return string
- * @deprecated. Instead use getCreatedBy
- */
- public function getCreated_by() {
- return $this->created_by;
- }
-
- /**
- * Date when the resource was cancelled.
- *
- * @param string $cancelled_date
- */
- public function setCancelledDate($cancelled_date) {
- $this->cancelled_date = $cancelled_date;
- return $this;
- }
-
- /**
- * Date when the resource was cancelled.
- *
- * @return string
- */
- public function getCancelledDate() {
- return $this->cancelled_date;
- }
-
- /**
- * Date when the resource was cancelled.
- *
- * @param string $cancelled_date
- * @deprecated. Instead use setCancelledDate
- */
- public function setCancelled_date($cancelled_date) {
- $this->cancelled_date = $cancelled_date;
- return $this;
- }
- /**
- * Date when the resource was cancelled.
- *
- * @return string
- * @deprecated. Instead use getCancelledDate
- */
- public function getCancelled_date() {
- return $this->cancelled_date;
- }
-
- /**
- * Actor who cancelled the resource.
- *
- * @param string $cancelled_by
- */
- public function setCancelledBy($cancelled_by) {
- $this->cancelled_by = $cancelled_by;
- return $this;
- }
-
- /**
- * Actor who cancelled the resource.
- *
- * @return string
- */
- public function getCancelledBy() {
- return $this->cancelled_by;
- }
-
- /**
- * Actor who cancelled the resource.
- *
- * @param string $cancelled_by
- * @deprecated. Instead use setCancelledBy
- */
- public function setCancelled_by($cancelled_by) {
- $this->cancelled_by = $cancelled_by;
- return $this;
- }
- /**
- * Actor who cancelled the resource.
- *
- * @return string
- * @deprecated. Instead use getCancelledBy
- */
- public function getCancelled_by() {
- return $this->cancelled_by;
- }
-
- /**
- * Date when the resource was last edited.
- *
- * @param string $last_updated_date
- */
- public function setLastUpdatedDate($last_updated_date) {
- $this->last_updated_date = $last_updated_date;
- return $this;
- }
-
- /**
- * Date when the resource was last edited.
- *
- * @return string
- */
- public function getLastUpdatedDate() {
- return $this->last_updated_date;
- }
-
- /**
- * Date when the resource was last edited.
- *
- * @param string $last_updated_date
- * @deprecated. Instead use setLastUpdatedDate
- */
- public function setLast_updated_date($last_updated_date) {
- $this->last_updated_date = $last_updated_date;
- return $this;
- }
- /**
- * Date when the resource was last edited.
- *
- * @return string
- * @deprecated. Instead use getLastUpdatedDate
- */
- public function getLast_updated_date() {
- return $this->last_updated_date;
- }
-
- /**
- * Email address of the account that last edited the resource.
- *
- * @param string $last_updated_by
- */
- public function setLastUpdatedBy($last_updated_by) {
- $this->last_updated_by = $last_updated_by;
- return $this;
- }
-
- /**
- * Email address of the account that last edited the resource.
- *
- * @return string
- */
- public function getLastUpdatedBy() {
- return $this->last_updated_by;
- }
-
- /**
- * Email address of the account that last edited the resource.
- *
- * @param string $last_updated_by
- * @deprecated. Instead use setLastUpdatedBy
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getLastUpdatedBy
- */
- public function getLast_updated_by() {
- return $this->last_updated_by;
- }
-
- /**
- * Date when the resource was first sent.
- *
- * @param string $first_sent_date
- */
- public function setFirstSentDate($first_sent_date) {
- $this->first_sent_date = $first_sent_date;
- return $this;
- }
-
- /**
- * Date when the resource was first sent.
- *
- * @return string
- */
- public function getFirstSentDate() {
- return $this->first_sent_date;
- }
-
- /**
- * Date when the resource was first sent.
- *
- * @param string $first_sent_date
- * @deprecated. Instead use setFirstSentDate
- */
- public function setFirst_sent_date($first_sent_date) {
- $this->first_sent_date = $first_sent_date;
- return $this;
- }
- /**
- * Date when the resource was first sent.
- *
- * @return string
- * @deprecated. Instead use getFirstSentDate
- */
- public function getFirst_sent_date() {
- return $this->first_sent_date;
- }
-
- /**
- * Date when the resource was last sent.
- *
- * @param string $last_sent_date
- */
- public function setLastSentDate($last_sent_date) {
- $this->last_sent_date = $last_sent_date;
- return $this;
- }
-
- /**
- * Date when the resource was last sent.
- *
- * @return string
- */
- public function getLastSentDate() {
- return $this->last_sent_date;
- }
-
- /**
- * Date when the resource was last sent.
- *
- * @param string $last_sent_date
- * @deprecated. Instead use setLastSentDate
- */
- public function setLast_sent_date($last_sent_date) {
- $this->last_sent_date = $last_sent_date;
- return $this;
- }
- /**
- * Date when the resource was last sent.
- *
- * @return string
- * @deprecated. Instead use getLastSentDate
- */
- public function getLast_sent_date() {
- return $this->last_sent_date;
- }
-
- /**
- * Email address of the account that last sent the resource.
- *
- * @param string $last_sent_by
- */
- public function setLastSentBy($last_sent_by) {
- $this->last_sent_by = $last_sent_by;
- return $this;
- }
-
- /**
- * Email address of the account that last sent the resource.
- *
- * @return string
- */
- public function getLastSentBy() {
- return $this->last_sent_by;
- }
-
- /**
- * Email address of the account that last sent the resource.
- *
- * @param string $last_sent_by
- * @deprecated. Instead use setLastSentBy
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getLastSentBy
- */
- public function getLast_sent_by() {
- return $this->last_sent_by;
- }
+class InvoicingMetaData extends PPModel
+{
+ /**
+ * Date when the resource was created.
+ *
+ * @param string $created_date
+ */
+ public function setCreatedDate($created_date)
+ {
+ $this->created_date = $created_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was created.
+ *
+ * @return string
+ */
+ public function getCreatedDate()
+ {
+ return $this->created_date;
+ }
+
+ /**
+ * Date when the resource was created.
+ *
+ * @param string $created_date
+ * @deprecated. Instead use setCreatedDate
+ */
+ public function setCreated_date($created_date)
+ {
+ $this->created_date = $created_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was created.
+ *
+ * @return string
+ * @deprecated. Instead use getCreatedDate
+ */
+ public function getCreated_date()
+ {
+ return $this->created_date;
+ }
+
+ /**
+ * Email address of the account that created the resource.
+ *
+ * @param string $created_by
+ */
+ public function setCreatedBy($created_by)
+ {
+ $this->created_by = $created_by;
+ return $this;
+ }
+
+ /**
+ * Email address of the account that created the resource.
+ *
+ * @return string
+ */
+ public function getCreatedBy()
+ {
+ return $this->created_by;
+ }
+
+ /**
+ * Email address of the account that created the resource.
+ *
+ * @param string $created_by
+ * @deprecated. Instead use setCreatedBy
+ */
+ public function setCreated_by($created_by)
+ {
+ $this->created_by = $created_by;
+ return $this;
+ }
+
+ /**
+ * Email address of the account that created the resource.
+ *
+ * @return string
+ * @deprecated. Instead use getCreatedBy
+ */
+ public function getCreated_by()
+ {
+ return $this->created_by;
+ }
+
+ /**
+ * Date when the resource was cancelled.
+ *
+ * @param string $cancelled_date
+ */
+ public function setCancelledDate($cancelled_date)
+ {
+ $this->cancelled_date = $cancelled_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was cancelled.
+ *
+ * @return string
+ */
+ public function getCancelledDate()
+ {
+ return $this->cancelled_date;
+ }
+
+ /**
+ * Date when the resource was cancelled.
+ *
+ * @param string $cancelled_date
+ * @deprecated. Instead use setCancelledDate
+ */
+ public function setCancelled_date($cancelled_date)
+ {
+ $this->cancelled_date = $cancelled_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was cancelled.
+ *
+ * @return string
+ * @deprecated. Instead use getCancelledDate
+ */
+ public function getCancelled_date()
+ {
+ return $this->cancelled_date;
+ }
+
+ /**
+ * Actor who cancelled the resource.
+ *
+ * @param string $cancelled_by
+ */
+ public function setCancelledBy($cancelled_by)
+ {
+ $this->cancelled_by = $cancelled_by;
+ return $this;
+ }
+
+ /**
+ * Actor who cancelled the resource.
+ *
+ * @return string
+ */
+ public function getCancelledBy()
+ {
+ return $this->cancelled_by;
+ }
+
+ /**
+ * Actor who cancelled the resource.
+ *
+ * @param string $cancelled_by
+ * @deprecated. Instead use setCancelledBy
+ */
+ public function setCancelled_by($cancelled_by)
+ {
+ $this->cancelled_by = $cancelled_by;
+ return $this;
+ }
+
+ /**
+ * Actor who cancelled the resource.
+ *
+ * @return string
+ * @deprecated. Instead use getCancelledBy
+ */
+ public function getCancelled_by()
+ {
+ return $this->cancelled_by;
+ }
+
+ /**
+ * Date when the resource was last edited.
+ *
+ * @param string $last_updated_date
+ */
+ public function setLastUpdatedDate($last_updated_date)
+ {
+ $this->last_updated_date = $last_updated_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was last edited.
+ *
+ * @return string
+ */
+ public function getLastUpdatedDate()
+ {
+ return $this->last_updated_date;
+ }
+
+ /**
+ * Date when the resource was last edited.
+ *
+ * @param string $last_updated_date
+ * @deprecated. Instead use setLastUpdatedDate
+ */
+ public function setLast_updated_date($last_updated_date)
+ {
+ $this->last_updated_date = $last_updated_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was last edited.
+ *
+ * @return string
+ * @deprecated. Instead use getLastUpdatedDate
+ */
+ public function getLast_updated_date()
+ {
+ return $this->last_updated_date;
+ }
+
+ /**
+ * Email address of the account that last edited the resource.
+ *
+ * @param string $last_updated_by
+ */
+ public function setLastUpdatedBy($last_updated_by)
+ {
+ $this->last_updated_by = $last_updated_by;
+ return $this;
+ }
+
+ /**
+ * Email address of the account that last edited the resource.
+ *
+ * @return string
+ */
+ public function getLastUpdatedBy()
+ {
+ return $this->last_updated_by;
+ }
+
+ /**
+ * Email address of the account that last edited the resource.
+ *
+ * @param string $last_updated_by
+ * @deprecated. Instead use setLastUpdatedBy
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getLastUpdatedBy
+ */
+ public function getLast_updated_by()
+ {
+ return $this->last_updated_by;
+ }
+
+ /**
+ * Date when the resource was first sent.
+ *
+ * @param string $first_sent_date
+ */
+ public function setFirstSentDate($first_sent_date)
+ {
+ $this->first_sent_date = $first_sent_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was first sent.
+ *
+ * @return string
+ */
+ public function getFirstSentDate()
+ {
+ return $this->first_sent_date;
+ }
+
+ /**
+ * Date when the resource was first sent.
+ *
+ * @param string $first_sent_date
+ * @deprecated. Instead use setFirstSentDate
+ */
+ public function setFirst_sent_date($first_sent_date)
+ {
+ $this->first_sent_date = $first_sent_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was first sent.
+ *
+ * @return string
+ * @deprecated. Instead use getFirstSentDate
+ */
+ public function getFirst_sent_date()
+ {
+ return $this->first_sent_date;
+ }
+
+ /**
+ * Date when the resource was last sent.
+ *
+ * @param string $last_sent_date
+ */
+ public function setLastSentDate($last_sent_date)
+ {
+ $this->last_sent_date = $last_sent_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was last sent.
+ *
+ * @return string
+ */
+ public function getLastSentDate()
+ {
+ return $this->last_sent_date;
+ }
+
+ /**
+ * Date when the resource was last sent.
+ *
+ * @param string $last_sent_date
+ * @deprecated. Instead use setLastSentDate
+ */
+ public function setLast_sent_date($last_sent_date)
+ {
+ $this->last_sent_date = $last_sent_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was last sent.
+ *
+ * @return string
+ * @deprecated. Instead use getLastSentDate
+ */
+ public function getLast_sent_date()
+ {
+ return $this->last_sent_date;
+ }
+
+ /**
+ * Email address of the account that last sent the resource.
+ *
+ * @param string $last_sent_by
+ */
+ public function setLastSentBy($last_sent_by)
+ {
+ $this->last_sent_by = $last_sent_by;
+ return $this;
+ }
+
+ /**
+ * Email address of the account that last sent the resource.
+ *
+ * @return string
+ */
+ public function getLastSentBy()
+ {
+ return $this->last_sent_by;
+ }
+
+ /**
+ * Email address of the account that last sent the resource.
+ *
+ * @param string $last_sent_by
+ * @deprecated. Instead use setLastSentBy
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getLastSentBy
+ */
+ public function getLast_sent_by()
+ {
+ return $this->last_sent_by;
+ }
}
diff --git a/lib/PayPal/Api/InvoicingNotification.php b/lib/PayPal/Api/InvoicingNotification.php
index 41a55188..2cd7e3bc 100644
--- a/lib/PayPal/Api/InvoicingNotification.php
+++ b/lib/PayPal/Api/InvoicingNotification.php
@@ -4,84 +4,94 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class InvoicingNotification extends PPModel {
- /**
- * Subject of the notification.
- *
- * @param string $subject
- */
- public function setSubject($subject) {
- $this->subject = $subject;
- return $this;
- }
+class InvoicingNotification extends PPModel
+{
+ /**
+ * Subject of the notification.
+ *
+ * @param string $subject
+ */
+ public function setSubject($subject)
+ {
+ $this->subject = $subject;
+ return $this;
+ }
- /**
- * Subject of the notification.
- *
- * @return string
- */
- public function getSubject() {
- return $this->subject;
- }
+ /**
+ * Subject of the notification.
+ *
+ * @return string
+ */
+ public function getSubject()
+ {
+ return $this->subject;
+ }
- /**
- * Note to the payer.
- *
- * @param string $note
- */
- public function setNote($note) {
- $this->note = $note;
- return $this;
- }
+ /**
+ * Note to the payer.
+ *
+ * @param string $note
+ */
+ public function setNote($note)
+ {
+ $this->note = $note;
+ return $this;
+ }
- /**
- * Note to the payer.
- *
- * @return string
- */
- public function getNote() {
- return $this->note;
- }
+ /**
+ * Note to the payer.
+ *
+ * @return string
+ */
+ public function getNote()
+ {
+ return $this->note;
+ }
- /**
- * A flag indicating whether a copy of the email has to be sent to the merchant.
- *
- * @param boolean $send_to_merchant
- */
- public function setSendToMerchant($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.
+ *
+ * @param boolean $send_to_merchant
+ */
+ public function setSendToMerchant($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.
- *
- * @return boolean
- */
- public function getSendToMerchant() {
- return $this->send_to_merchant;
- }
+ /**
+ * A flag indicating whether a copy of the email has to be sent to the merchant.
+ *
+ * @return boolean
+ */
+ public function getSendToMerchant()
+ {
+ return $this->send_to_merchant;
+ }
- /**
- * A flag indicating whether a copy of the email has to be sent to the merchant.
- *
- * @param boolean $send_to_merchant
- * @deprecated. Instead use setSendToMerchant
- */
- 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.
- *
- * @return boolean
- * @deprecated. Instead use getSendToMerchant
- */
- 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 merchant.
+ *
+ * @param boolean $send_to_merchant
+ * @deprecated. Instead use setSendToMerchant
+ */
+ 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.
+ *
+ * @return boolean
+ * @deprecated. Instead use getSendToMerchant
+ */
+ public function getSend_to_merchant()
+ {
+ return $this->send_to_merchant;
+ }
}
diff --git a/lib/PayPal/Api/InvoicingPaymentDetail.php b/lib/PayPal/Api/InvoicingPaymentDetail.php
index a4e0a697..cba1edfc 100644
--- a/lib/PayPal/Api/InvoicingPaymentDetail.php
+++ b/lib/PayPal/Api/InvoicingPaymentDetail.php
@@ -4,163 +4,182 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class InvoicingPaymentDetail extends PPModel {
- /**
- * 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.
- *
- * @param string $type
- */
- public function setType($type) {
- $this->type = $type;
- return $this;
- }
-
- /**
- * 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.
- *
- * @return string
- */
- public function getType() {
- return $this->type;
- }
-
-
- /**
- * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
- *
- * @param string $transaction_id
- */
- public function setTransactionId($transaction_id) {
- $this->transaction_id = $transaction_id;
- return $this;
- }
-
- /**
- * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
- *
- * @return string
- */
- public function getTransactionId() {
- return $this->transaction_id;
- }
-
- /**
- * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
- *
- * @param string $transaction_id
- * @deprecated. Instead use setTransactionId
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getTransactionId
- */
- public function getTransaction_id() {
- return $this->transaction_id;
- }
-
- /**
- * Type of the transaction.
- *
- * @param string $transaction_type
- */
- public function setTransactionType($transaction_type) {
- $this->transaction_type = $transaction_type;
- return $this;
- }
-
- /**
- * Type of the transaction.
- *
- * @return string
- */
- public function getTransactionType() {
- return $this->transaction_type;
- }
-
- /**
- * Type of the transaction.
- *
- * @param string $transaction_type
- * @deprecated. Instead use setTransactionType
- */
- public function setTransaction_type($transaction_type) {
- $this->transaction_type = $transaction_type;
- return $this;
- }
- /**
- * Type of the transaction.
- *
- * @return string
- * @deprecated. Instead use getTransactionType
- */
- public function getTransaction_type() {
- return $this->transaction_type;
- }
-
- /**
- * Date when the invoice was paid. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
- *
- * @param string $date
- */
- public function setDate($date) {
- $this->date = $date;
- return $this;
- }
-
- /**
- * Date when the invoice was paid. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
- *
- * @return string
- */
- public function getDate() {
- return $this->date;
- }
-
-
- /**
- * Payment mode or method. This field is mandatory if the value of the type field is OTHER.
- *
- * @param string $method
- */
- public function setMethod($method) {
- $this->method = $method;
- return $this;
- }
-
- /**
- * Payment mode or method. This field is mandatory if the value of the type field is OTHER.
- *
- * @return string
- */
- public function getMethod() {
- return $this->method;
- }
-
-
- /**
- * Optional note associated with the payment.
- *
- * @param string $note
- */
- public function setNote($note) {
- $this->note = $note;
- return $this;
- }
-
- /**
- * Optional note associated with the payment.
- *
- * @return string
- */
- public function getNote() {
- return $this->note;
- }
+class InvoicingPaymentDetail extends PPModel
+{
+ /**
+ * 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.
+ *
+ * @param string $type
+ */
+ public function setType($type)
+ {
+ $this->type = $type;
+ return $this;
+ }
+
+ /**
+ * 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.
+ *
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+
+ /**
+ * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
+ *
+ * @param string $transaction_id
+ */
+ public function setTransactionId($transaction_id)
+ {
+ $this->transaction_id = $transaction_id;
+ return $this;
+ }
+
+ /**
+ * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
+ *
+ * @return string
+ */
+ public function getTransactionId()
+ {
+ return $this->transaction_id;
+ }
+
+ /**
+ * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
+ *
+ * @param string $transaction_id
+ * @deprecated. Instead use setTransactionId
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getTransactionId
+ */
+ public function getTransaction_id()
+ {
+ return $this->transaction_id;
+ }
+
+ /**
+ * Type of the transaction.
+ *
+ * @param string $transaction_type
+ */
+ public function setTransactionType($transaction_type)
+ {
+ $this->transaction_type = $transaction_type;
+ return $this;
+ }
+
+ /**
+ * Type of the transaction.
+ *
+ * @return string
+ */
+ public function getTransactionType()
+ {
+ return $this->transaction_type;
+ }
+
+ /**
+ * Type of the transaction.
+ *
+ * @param string $transaction_type
+ * @deprecated. Instead use setTransactionType
+ */
+ public function setTransaction_type($transaction_type)
+ {
+ $this->transaction_type = $transaction_type;
+ return $this;
+ }
+
+ /**
+ * Type of the transaction.
+ *
+ * @return string
+ * @deprecated. Instead use getTransactionType
+ */
+ public function getTransaction_type()
+ {
+ return $this->transaction_type;
+ }
+
+ /**
+ * Date when the invoice was paid. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
+ *
+ * @param string $date
+ */
+ public function setDate($date)
+ {
+ $this->date = $date;
+ return $this;
+ }
+
+ /**
+ * Date when the invoice was paid. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
+ *
+ * @return string
+ */
+ public function getDate()
+ {
+ return $this->date;
+ }
+
+
+ /**
+ * Payment mode or method. This field is mandatory if the value of the type field is OTHER.
+ *
+ * @param string $method
+ */
+ public function setMethod($method)
+ {
+ $this->method = $method;
+ return $this;
+ }
+
+ /**
+ * Payment mode or method. This field is mandatory if the value of the type field is OTHER.
+ *
+ * @return string
+ */
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+
+ /**
+ * Optional note associated with the payment.
+ *
+ * @param string $note
+ */
+ public function setNote($note)
+ {
+ $this->note = $note;
+ return $this;
+ }
+
+ /**
+ * Optional note associated with the payment.
+ *
+ * @return string
+ */
+ public function getNote()
+ {
+ return $this->note;
+ }
}
diff --git a/lib/PayPal/Api/InvoicingRefundDetail.php b/lib/PayPal/Api/InvoicingRefundDetail.php
index e7859f01..2868efca 100644
--- a/lib/PayPal/Api/InvoicingRefundDetail.php
+++ b/lib/PayPal/Api/InvoicingRefundDetail.php
@@ -4,65 +4,72 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class InvoicingRefundDetail extends PPModel {
- /**
- * 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.
- *
- * @param string $type
- */
- public function setType($type) {
- $this->type = $type;
- return $this;
- }
+class InvoicingRefundDetail extends PPModel
+{
+ /**
+ * 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.
+ *
+ * @param string $type
+ */
+ public function setType($type)
+ {
+ $this->type = $type;
+ return $this;
+ }
- /**
- * 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.
- *
- * @return string
- */
- public function getType() {
- return $this->type;
- }
+ /**
+ * 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.
+ *
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
- /**
- * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date.
- *
- * @param string $date
- */
- public function setDate($date) {
- $this->date = $date;
- return $this;
- }
+ /**
+ * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date.
+ *
+ * @param string $date
+ */
+ public function setDate($date)
+ {
+ $this->date = $date;
+ return $this;
+ }
- /**
- * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date.
- *
- * @return string
- */
- public function getDate() {
- return $this->date;
- }
+ /**
+ * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date.
+ *
+ * @return string
+ */
+ public function getDate()
+ {
+ return $this->date;
+ }
- /**
- * Optional note associated with the refund.
- *
- * @param string $note
- */
- public function setNote($note) {
- $this->note = $note;
- return $this;
- }
+ /**
+ * Optional note associated with the refund.
+ *
+ * @param string $note
+ */
+ public function setNote($note)
+ {
+ $this->note = $note;
+ return $this;
+ }
- /**
- * Optional note associated with the refund.
- *
- * @return string
- */
- public function getNote() {
- return $this->note;
- }
+ /**
+ * Optional note associated with the refund.
+ *
+ * @return string
+ */
+ public function getNote()
+ {
+ return $this->note;
+ }
}
diff --git a/lib/PayPal/Api/InvoicingSearch.php b/lib/PayPal/Api/InvoicingSearch.php
index caf01ed6..ce76e7bc 100644
--- a/lib/PayPal/Api/InvoicingSearch.php
+++ b/lib/PayPal/Api/InvoicingSearch.php
@@ -4,670 +4,754 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class InvoicingSearch extends PPModel {
- /**
- * Initial letters of the email address.
- *
- * @param string $email
- */
- public function setEmail($email) {
- $this->email = $email;
- return $this;
- }
-
- /**
- * Initial letters of the email address.
- *
- * @return string
- */
- public function getEmail() {
- return $this->email;
- }
-
-
- /**
- * Initial letters of the recipient's first name.
- *
- * @param string $recipient_first_name
- */
- public function setRecipientFirstName($recipient_first_name) {
- $this->recipient_first_name = $recipient_first_name;
- return $this;
- }
-
- /**
- * Initial letters of the recipient's first name.
- *
- * @return string
- */
- public function getRecipientFirstName() {
- return $this->recipient_first_name;
- }
-
- /**
- * Initial letters of the recipient's first name.
- *
- * @param string $recipient_first_name
- * @deprecated. Instead use setRecipientFirstName
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getRecipientFirstName
- */
- public function getRecipient_first_name() {
- return $this->recipient_first_name;
- }
-
- /**
- * Initial letters of the recipient's last name.
- *
- * @param string $recipient_last_name
- */
- public function setRecipientLastName($recipient_last_name) {
- $this->recipient_last_name = $recipient_last_name;
- return $this;
- }
-
- /**
- * Initial letters of the recipient's last name.
- *
- * @return string
- */
- public function getRecipientLastName() {
- return $this->recipient_last_name;
- }
-
- /**
- * Initial letters of the recipient's last name.
- *
- * @param string $recipient_last_name
- * @deprecated. Instead use setRecipientLastName
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getRecipientLastName
- */
- public function getRecipient_last_name() {
- return $this->recipient_last_name;
- }
-
- /**
- * Initial letters of the recipient's business name.
- *
- * @param string $recipient_business_name
- */
- public function setRecipientBusinessName($recipient_business_name) {
- $this->recipient_business_name = $recipient_business_name;
- return $this;
- }
-
- /**
- * Initial letters of the recipient's business name.
- *
- * @return string
- */
- public function getRecipientBusinessName() {
- return $this->recipient_business_name;
- }
-
- /**
- * Initial letters of the recipient's business name.
- *
- * @param string $recipient_business_name
- * @deprecated. Instead use setRecipientBusinessName
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getRecipientBusinessName
- */
- public function getRecipient_business_name() {
- return $this->recipient_business_name;
- }
-
- /**
- * The invoice number that appears on the invoice.
- *
- * @param string $number
- */
- public function setNumber($number) {
- $this->number = $number;
- return $this;
- }
-
- /**
- * The invoice number that appears on the invoice.
- *
- * @return string
- */
- public function getNumber() {
- return $this->number;
- }
-
-
- /**
- * Status of the invoice.
- *
- * @param string $status
- */
- public function setStatus($status) {
- $this->status = $status;
- return $this;
- }
-
- /**
- * Status of the invoice.
- *
- * @return string
- */
- public function getStatus() {
- return $this->status;
- }
-
-
- /**
- * Lower limit of total amount.
- *
- * @param PayPal\Api\Currency $lower_total_amount
- */
- public function setLowerTotalAmount($lower_total_amount) {
- $this->lower_total_amount = $lower_total_amount;
- return $this;
- }
-
- /**
- * Lower limit of total amount.
- *
- * @return PayPal\Api\Currency
- */
- public function getLowerTotalAmount() {
- return $this->lower_total_amount;
- }
-
- /**
- * Lower limit of total amount.
- *
- * @param PayPal\Api\Currency $lower_total_amount
- * @deprecated. Instead use setLowerTotalAmount
- */
- public function setLower_total_amount($lower_total_amount) {
- $this->lower_total_amount = $lower_total_amount;
- return $this;
- }
- /**
- * Lower limit of total amount.
- *
- * @return PayPal\Api\Currency
- * @deprecated. Instead use getLowerTotalAmount
- */
- public function getLower_total_amount() {
- return $this->lower_total_amount;
- }
-
- /**
- * Upper limit of total amount.
- *
- * @param PayPal\Api\Currency $upper_total_amount
- */
- public function setUpperTotalAmount($upper_total_amount) {
- $this->upper_total_amount = $upper_total_amount;
- return $this;
- }
-
- /**
- * Upper limit of total amount.
- *
- * @return PayPal\Api\Currency
- */
- public function getUpperTotalAmount() {
- return $this->upper_total_amount;
- }
-
- /**
- * Upper limit of total amount.
- *
- * @param PayPal\Api\Currency $upper_total_amount
- * @deprecated. Instead use setUpperTotalAmount
- */
- public function setUpper_total_amount($upper_total_amount) {
- $this->upper_total_amount = $upper_total_amount;
- return $this;
- }
- /**
- * Upper limit of total amount.
- *
- * @return PayPal\Api\Currency
- * @deprecated. Instead use getUpperTotalAmount
- */
- public function getUpper_total_amount() {
- return $this->upper_total_amount;
- }
-
- /**
- * Start invoice date.
- *
- * @param string $start_invoice_date
- */
- public function setStartInvoiceDate($start_invoice_date) {
- $this->start_invoice_date = $start_invoice_date;
- return $this;
- }
-
- /**
- * Start invoice date.
- *
- * @return string
- */
- public function getStartInvoiceDate() {
- return $this->start_invoice_date;
- }
-
- /**
- * Start invoice date.
- *
- * @param string $start_invoice_date
- * @deprecated. Instead use setStartInvoiceDate
- */
- public function setStart_invoice_date($start_invoice_date) {
- $this->start_invoice_date = $start_invoice_date;
- return $this;
- }
- /**
- * Start invoice date.
- *
- * @return string
- * @deprecated. Instead use getStartInvoiceDate
- */
- public function getStart_invoice_date() {
- return $this->start_invoice_date;
- }
-
- /**
- * End invoice date.
- *
- * @param string $end_invoice_date
- */
- public function setEndInvoiceDate($end_invoice_date) {
- $this->end_invoice_date = $end_invoice_date;
- return $this;
- }
-
- /**
- * End invoice date.
- *
- * @return string
- */
- public function getEndInvoiceDate() {
- return $this->end_invoice_date;
- }
-
- /**
- * End invoice date.
- *
- * @param string $end_invoice_date
- * @deprecated. Instead use setEndInvoiceDate
- */
- public function setEnd_invoice_date($end_invoice_date) {
- $this->end_invoice_date = $end_invoice_date;
- return $this;
- }
- /**
- * End invoice date.
- *
- * @return string
- * @deprecated. Instead use getEndInvoiceDate
- */
- public function getEnd_invoice_date() {
- return $this->end_invoice_date;
- }
-
- /**
- * Start invoice due date.
- *
- * @param string $start_due_date
- */
- public function setStartDueDate($start_due_date) {
- $this->start_due_date = $start_due_date;
- return $this;
- }
-
- /**
- * Start invoice due date.
- *
- * @return string
- */
- public function getStartDueDate() {
- return $this->start_due_date;
- }
-
- /**
- * Start invoice due date.
- *
- * @param string $start_due_date
- * @deprecated. Instead use setStartDueDate
- */
- public function setStart_due_date($start_due_date) {
- $this->start_due_date = $start_due_date;
- return $this;
- }
- /**
- * Start invoice due date.
- *
- * @return string
- * @deprecated. Instead use getStartDueDate
- */
- public function getStart_due_date() {
- return $this->start_due_date;
- }
-
- /**
- * End invoice due date.
- *
- * @param string $end_due_date
- */
- public function setEndDueDate($end_due_date) {
- $this->end_due_date = $end_due_date;
- return $this;
- }
-
- /**
- * End invoice due date.
- *
- * @return string
- */
- public function getEndDueDate() {
- return $this->end_due_date;
- }
-
- /**
- * End invoice due date.
- *
- * @param string $end_due_date
- * @deprecated. Instead use setEndDueDate
- */
- public function setEnd_due_date($end_due_date) {
- $this->end_due_date = $end_due_date;
- return $this;
- }
- /**
- * End invoice due date.
- *
- * @return string
- * @deprecated. Instead use getEndDueDate
- */
- public function getEnd_due_date() {
- return $this->end_due_date;
- }
-
- /**
- * Start invoice payment date.
- *
- * @param string $start_payment_date
- */
- public function setStartPaymentDate($start_payment_date) {
- $this->start_payment_date = $start_payment_date;
- return $this;
- }
-
- /**
- * Start invoice payment date.
- *
- * @return string
- */
- public function getStartPaymentDate() {
- return $this->start_payment_date;
- }
-
- /**
- * Start invoice payment date.
- *
- * @param string $start_payment_date
- * @deprecated. Instead use setStartPaymentDate
- */
- public function setStart_payment_date($start_payment_date) {
- $this->start_payment_date = $start_payment_date;
- return $this;
- }
- /**
- * Start invoice payment date.
- *
- * @return string
- * @deprecated. Instead use getStartPaymentDate
- */
- public function getStart_payment_date() {
- return $this->start_payment_date;
- }
-
- /**
- * End invoice payment date.
- *
- * @param string $end_payment_date
- */
- public function setEndPaymentDate($end_payment_date) {
- $this->end_payment_date = $end_payment_date;
- return $this;
- }
-
- /**
- * End invoice payment date.
- *
- * @return string
- */
- public function getEndPaymentDate() {
- return $this->end_payment_date;
- }
-
- /**
- * End invoice payment date.
- *
- * @param string $end_payment_date
- * @deprecated. Instead use setEndPaymentDate
- */
- public function setEnd_payment_date($end_payment_date) {
- $this->end_payment_date = $end_payment_date;
- return $this;
- }
- /**
- * End invoice payment date.
- *
- * @return string
- * @deprecated. Instead use getEndPaymentDate
- */
- public function getEnd_payment_date() {
- return $this->end_payment_date;
- }
-
- /**
- * Start invoice creation date.
- *
- * @param string $start_creation_date
- */
- public function setStartCreationDate($start_creation_date) {
- $this->start_creation_date = $start_creation_date;
- return $this;
- }
-
- /**
- * Start invoice creation date.
- *
- * @return string
- */
- public function getStartCreationDate() {
- return $this->start_creation_date;
- }
-
- /**
- * Start invoice creation date.
- *
- * @param string $start_creation_date
- * @deprecated. Instead use setStartCreationDate
- */
- public function setStart_creation_date($start_creation_date) {
- $this->start_creation_date = $start_creation_date;
- return $this;
- }
- /**
- * Start invoice creation date.
- *
- * @return string
- * @deprecated. Instead use getStartCreationDate
- */
- public function getStart_creation_date() {
- return $this->start_creation_date;
- }
-
- /**
- * End invoice creation date.
- *
- * @param string $end_creation_date
- */
- public function setEndCreationDate($end_creation_date) {
- $this->end_creation_date = $end_creation_date;
- return $this;
- }
-
- /**
- * End invoice creation date.
- *
- * @return string
- */
- public function getEndCreationDate() {
- return $this->end_creation_date;
- }
-
- /**
- * End invoice creation date.
- *
- * @param string $end_creation_date
- * @deprecated. Instead use setEndCreationDate
- */
- public function setEnd_creation_date($end_creation_date) {
- $this->end_creation_date = $end_creation_date;
- return $this;
- }
- /**
- * End invoice creation date.
- *
- * @return string
- * @deprecated. Instead use getEndCreationDate
- */
- public function getEnd_creation_date() {
- return $this->end_creation_date;
- }
-
- /**
- * Offset of the search results.
- *
- * @param PayPal\Api\number $page
- */
- public function setPage($page) {
- $this->page = $page;
- return $this;
- }
-
- /**
- * Offset of the search results.
- *
- * @return PayPal\Api\number
- */
- public function getPage() {
- return $this->page;
- }
-
-
- /**
- * Page size of the search results.
- *
- * @param PayPal\Api\number $page_size
- */
- public function setPageSize($page_size) {
- $this->page_size = $page_size;
- return $this;
- }
-
- /**
- * Page size of the search results.
- *
- * @return PayPal\Api\number
- */
- public function getPageSize() {
- return $this->page_size;
- }
-
- /**
- * Page size of the search results.
- *
- * @param PayPal\Api\number $page_size
- * @deprecated. Instead use setPageSize
- */
- public function setPage_size($page_size) {
- $this->page_size = $page_size;
- return $this;
- }
- /**
- * Page size of the search results.
- *
- * @return PayPal\Api\number
- * @deprecated. Instead use getPageSize
- */
- public function getPage_size() {
- return $this->page_size;
- }
-
- /**
- * A flag indicating whether total count is required in the response.
- *
- * @param boolean $total_count_required
- */
- public function setTotalCountRequired($total_count_required) {
- $this->total_count_required = $total_count_required;
- return $this;
- }
-
- /**
- * A flag indicating whether total count is required in the response.
- *
- * @return boolean
- */
- public function getTotalCountRequired() {
- return $this->total_count_required;
- }
-
- /**
- * A flag indicating whether total count is required in the response.
- *
- * @param boolean $total_count_required
- * @deprecated. Instead use setTotalCountRequired
- */
- 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.
- *
- * @return boolean
- * @deprecated. Instead use getTotalCountRequired
- */
- public function getTotal_count_required() {
- return $this->total_count_required;
- }
+class InvoicingSearch extends PPModel
+{
+ /**
+ * Initial letters of the email address.
+ *
+ * @param string $email
+ */
+ public function setEmail($email)
+ {
+ $this->email = $email;
+ return $this;
+ }
+
+ /**
+ * Initial letters of the email address.
+ *
+ * @return string
+ */
+ public function getEmail()
+ {
+ return $this->email;
+ }
+
+
+ /**
+ * Initial letters of the recipient's first name.
+ *
+ * @param string $recipient_first_name
+ */
+ public function setRecipientFirstName($recipient_first_name)
+ {
+ $this->recipient_first_name = $recipient_first_name;
+ return $this;
+ }
+
+ /**
+ * Initial letters of the recipient's first name.
+ *
+ * @return string
+ */
+ public function getRecipientFirstName()
+ {
+ return $this->recipient_first_name;
+ }
+
+ /**
+ * Initial letters of the recipient's first name.
+ *
+ * @param string $recipient_first_name
+ * @deprecated. Instead use setRecipientFirstName
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getRecipientFirstName
+ */
+ public function getRecipient_first_name()
+ {
+ return $this->recipient_first_name;
+ }
+
+ /**
+ * Initial letters of the recipient's last name.
+ *
+ * @param string $recipient_last_name
+ */
+ public function setRecipientLastName($recipient_last_name)
+ {
+ $this->recipient_last_name = $recipient_last_name;
+ return $this;
+ }
+
+ /**
+ * Initial letters of the recipient's last name.
+ *
+ * @return string
+ */
+ public function getRecipientLastName()
+ {
+ return $this->recipient_last_name;
+ }
+
+ /**
+ * Initial letters of the recipient's last name.
+ *
+ * @param string $recipient_last_name
+ * @deprecated. Instead use setRecipientLastName
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getRecipientLastName
+ */
+ public function getRecipient_last_name()
+ {
+ return $this->recipient_last_name;
+ }
+
+ /**
+ * Initial letters of the recipient's business name.
+ *
+ * @param string $recipient_business_name
+ */
+ public function setRecipientBusinessName($recipient_business_name)
+ {
+ $this->recipient_business_name = $recipient_business_name;
+ return $this;
+ }
+
+ /**
+ * Initial letters of the recipient's business name.
+ *
+ * @return string
+ */
+ public function getRecipientBusinessName()
+ {
+ return $this->recipient_business_name;
+ }
+
+ /**
+ * Initial letters of the recipient's business name.
+ *
+ * @param string $recipient_business_name
+ * @deprecated. Instead use setRecipientBusinessName
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getRecipientBusinessName
+ */
+ public function getRecipient_business_name()
+ {
+ return $this->recipient_business_name;
+ }
+
+ /**
+ * The invoice number that appears on the invoice.
+ *
+ * @param string $number
+ */
+ public function setNumber($number)
+ {
+ $this->number = $number;
+ return $this;
+ }
+
+ /**
+ * The invoice number that appears on the invoice.
+ *
+ * @return string
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+
+ /**
+ * Status of the invoice.
+ *
+ * @param string $status
+ */
+ public function setStatus($status)
+ {
+ $this->status = $status;
+ return $this;
+ }
+
+ /**
+ * Status of the invoice.
+ *
+ * @return string
+ */
+ public function getStatus()
+ {
+ return $this->status;
+ }
+
+
+ /**
+ * Lower limit of total amount.
+ *
+ * @param PayPal\Api\Currency $lower_total_amount
+ */
+ public function setLowerTotalAmount($lower_total_amount)
+ {
+ $this->lower_total_amount = $lower_total_amount;
+ return $this;
+ }
+
+ /**
+ * Lower limit of total amount.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getLowerTotalAmount()
+ {
+ return $this->lower_total_amount;
+ }
+
+ /**
+ * Lower limit of total amount.
+ *
+ * @param PayPal\Api\Currency $lower_total_amount
+ * @deprecated. Instead use setLowerTotalAmount
+ */
+ public function setLower_total_amount($lower_total_amount)
+ {
+ $this->lower_total_amount = $lower_total_amount;
+ return $this;
+ }
+
+ /**
+ * Lower limit of total amount.
+ *
+ * @return PayPal\Api\Currency
+ * @deprecated. Instead use getLowerTotalAmount
+ */
+ public function getLower_total_amount()
+ {
+ return $this->lower_total_amount;
+ }
+
+ /**
+ * Upper limit of total amount.
+ *
+ * @param PayPal\Api\Currency $upper_total_amount
+ */
+ public function setUpperTotalAmount($upper_total_amount)
+ {
+ $this->upper_total_amount = $upper_total_amount;
+ return $this;
+ }
+
+ /**
+ * Upper limit of total amount.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getUpperTotalAmount()
+ {
+ return $this->upper_total_amount;
+ }
+
+ /**
+ * Upper limit of total amount.
+ *
+ * @param PayPal\Api\Currency $upper_total_amount
+ * @deprecated. Instead use setUpperTotalAmount
+ */
+ public function setUpper_total_amount($upper_total_amount)
+ {
+ $this->upper_total_amount = $upper_total_amount;
+ return $this;
+ }
+
+ /**
+ * Upper limit of total amount.
+ *
+ * @return PayPal\Api\Currency
+ * @deprecated. Instead use getUpperTotalAmount
+ */
+ public function getUpper_total_amount()
+ {
+ return $this->upper_total_amount;
+ }
+
+ /**
+ * Start invoice date.
+ *
+ * @param string $start_invoice_date
+ */
+ public function setStartInvoiceDate($start_invoice_date)
+ {
+ $this->start_invoice_date = $start_invoice_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice date.
+ *
+ * @return string
+ */
+ public function getStartInvoiceDate()
+ {
+ return $this->start_invoice_date;
+ }
+
+ /**
+ * Start invoice date.
+ *
+ * @param string $start_invoice_date
+ * @deprecated. Instead use setStartInvoiceDate
+ */
+ public function setStart_invoice_date($start_invoice_date)
+ {
+ $this->start_invoice_date = $start_invoice_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice date.
+ *
+ * @return string
+ * @deprecated. Instead use getStartInvoiceDate
+ */
+ public function getStart_invoice_date()
+ {
+ return $this->start_invoice_date;
+ }
+
+ /**
+ * End invoice date.
+ *
+ * @param string $end_invoice_date
+ */
+ public function setEndInvoiceDate($end_invoice_date)
+ {
+ $this->end_invoice_date = $end_invoice_date;
+ return $this;
+ }
+
+ /**
+ * End invoice date.
+ *
+ * @return string
+ */
+ public function getEndInvoiceDate()
+ {
+ return $this->end_invoice_date;
+ }
+
+ /**
+ * End invoice date.
+ *
+ * @param string $end_invoice_date
+ * @deprecated. Instead use setEndInvoiceDate
+ */
+ public function setEnd_invoice_date($end_invoice_date)
+ {
+ $this->end_invoice_date = $end_invoice_date;
+ return $this;
+ }
+
+ /**
+ * End invoice date.
+ *
+ * @return string
+ * @deprecated. Instead use getEndInvoiceDate
+ */
+ public function getEnd_invoice_date()
+ {
+ return $this->end_invoice_date;
+ }
+
+ /**
+ * Start invoice due date.
+ *
+ * @param string $start_due_date
+ */
+ public function setStartDueDate($start_due_date)
+ {
+ $this->start_due_date = $start_due_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice due date.
+ *
+ * @return string
+ */
+ public function getStartDueDate()
+ {
+ return $this->start_due_date;
+ }
+
+ /**
+ * Start invoice due date.
+ *
+ * @param string $start_due_date
+ * @deprecated. Instead use setStartDueDate
+ */
+ public function setStart_due_date($start_due_date)
+ {
+ $this->start_due_date = $start_due_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice due date.
+ *
+ * @return string
+ * @deprecated. Instead use getStartDueDate
+ */
+ public function getStart_due_date()
+ {
+ return $this->start_due_date;
+ }
+
+ /**
+ * End invoice due date.
+ *
+ * @param string $end_due_date
+ */
+ public function setEndDueDate($end_due_date)
+ {
+ $this->end_due_date = $end_due_date;
+ return $this;
+ }
+
+ /**
+ * End invoice due date.
+ *
+ * @return string
+ */
+ public function getEndDueDate()
+ {
+ return $this->end_due_date;
+ }
+
+ /**
+ * End invoice due date.
+ *
+ * @param string $end_due_date
+ * @deprecated. Instead use setEndDueDate
+ */
+ public function setEnd_due_date($end_due_date)
+ {
+ $this->end_due_date = $end_due_date;
+ return $this;
+ }
+
+ /**
+ * End invoice due date.
+ *
+ * @return string
+ * @deprecated. Instead use getEndDueDate
+ */
+ public function getEnd_due_date()
+ {
+ return $this->end_due_date;
+ }
+
+ /**
+ * Start invoice payment date.
+ *
+ * @param string $start_payment_date
+ */
+ public function setStartPaymentDate($start_payment_date)
+ {
+ $this->start_payment_date = $start_payment_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice payment date.
+ *
+ * @return string
+ */
+ public function getStartPaymentDate()
+ {
+ return $this->start_payment_date;
+ }
+
+ /**
+ * Start invoice payment date.
+ *
+ * @param string $start_payment_date
+ * @deprecated. Instead use setStartPaymentDate
+ */
+ public function setStart_payment_date($start_payment_date)
+ {
+ $this->start_payment_date = $start_payment_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice payment date.
+ *
+ * @return string
+ * @deprecated. Instead use getStartPaymentDate
+ */
+ public function getStart_payment_date()
+ {
+ return $this->start_payment_date;
+ }
+
+ /**
+ * End invoice payment date.
+ *
+ * @param string $end_payment_date
+ */
+ public function setEndPaymentDate($end_payment_date)
+ {
+ $this->end_payment_date = $end_payment_date;
+ return $this;
+ }
+
+ /**
+ * End invoice payment date.
+ *
+ * @return string
+ */
+ public function getEndPaymentDate()
+ {
+ return $this->end_payment_date;
+ }
+
+ /**
+ * End invoice payment date.
+ *
+ * @param string $end_payment_date
+ * @deprecated. Instead use setEndPaymentDate
+ */
+ public function setEnd_payment_date($end_payment_date)
+ {
+ $this->end_payment_date = $end_payment_date;
+ return $this;
+ }
+
+ /**
+ * End invoice payment date.
+ *
+ * @return string
+ * @deprecated. Instead use getEndPaymentDate
+ */
+ public function getEnd_payment_date()
+ {
+ return $this->end_payment_date;
+ }
+
+ /**
+ * Start invoice creation date.
+ *
+ * @param string $start_creation_date
+ */
+ public function setStartCreationDate($start_creation_date)
+ {
+ $this->start_creation_date = $start_creation_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice creation date.
+ *
+ * @return string
+ */
+ public function getStartCreationDate()
+ {
+ return $this->start_creation_date;
+ }
+
+ /**
+ * Start invoice creation date.
+ *
+ * @param string $start_creation_date
+ * @deprecated. Instead use setStartCreationDate
+ */
+ public function setStart_creation_date($start_creation_date)
+ {
+ $this->start_creation_date = $start_creation_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice creation date.
+ *
+ * @return string
+ * @deprecated. Instead use getStartCreationDate
+ */
+ public function getStart_creation_date()
+ {
+ return $this->start_creation_date;
+ }
+
+ /**
+ * End invoice creation date.
+ *
+ * @param string $end_creation_date
+ */
+ public function setEndCreationDate($end_creation_date)
+ {
+ $this->end_creation_date = $end_creation_date;
+ return $this;
+ }
+
+ /**
+ * End invoice creation date.
+ *
+ * @return string
+ */
+ public function getEndCreationDate()
+ {
+ return $this->end_creation_date;
+ }
+
+ /**
+ * End invoice creation date.
+ *
+ * @param string $end_creation_date
+ * @deprecated. Instead use setEndCreationDate
+ */
+ public function setEnd_creation_date($end_creation_date)
+ {
+ $this->end_creation_date = $end_creation_date;
+ return $this;
+ }
+
+ /**
+ * End invoice creation date.
+ *
+ * @return string
+ * @deprecated. Instead use getEndCreationDate
+ */
+ public function getEnd_creation_date()
+ {
+ return $this->end_creation_date;
+ }
+
+ /**
+ * Offset of the search results.
+ *
+ * @param PayPal\Api\number $page
+ */
+ public function setPage($page)
+ {
+ $this->page = $page;
+ return $this;
+ }
+
+ /**
+ * Offset of the search results.
+ *
+ * @return PayPal\Api\number
+ */
+ public function getPage()
+ {
+ return $this->page;
+ }
+
+
+ /**
+ * Page size of the search results.
+ *
+ * @param PayPal\Api\number $page_size
+ */
+ public function setPageSize($page_size)
+ {
+ $this->page_size = $page_size;
+ return $this;
+ }
+
+ /**
+ * Page size of the search results.
+ *
+ * @return PayPal\Api\number
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * Page size of the search results.
+ *
+ * @param PayPal\Api\number $page_size
+ * @deprecated. Instead use setPageSize
+ */
+ public function setPage_size($page_size)
+ {
+ $this->page_size = $page_size;
+ return $this;
+ }
+
+ /**
+ * Page size of the search results.
+ *
+ * @return PayPal\Api\number
+ * @deprecated. Instead use getPageSize
+ */
+ public function getPage_size()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * A flag indicating whether total count is required in the response.
+ *
+ * @param boolean $total_count_required
+ */
+ public function setTotalCountRequired($total_count_required)
+ {
+ $this->total_count_required = $total_count_required;
+ return $this;
+ }
+
+ /**
+ * A flag indicating whether total count is required in the response.
+ *
+ * @return boolean
+ */
+ public function getTotalCountRequired()
+ {
+ return $this->total_count_required;
+ }
+
+ /**
+ * A flag indicating whether total count is required in the response.
+ *
+ * @param boolean $total_count_required
+ * @deprecated. Instead use setTotalCountRequired
+ */
+ 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.
+ *
+ * @return boolean
+ * @deprecated. Instead use getTotalCountRequired
+ */
+ public function getTotal_count_required()
+ {
+ return $this->total_count_required;
+ }
}
diff --git a/lib/PayPal/Api/Item.php b/lib/PayPal/Api/Item.php
index b50803ef..62055d0f 100644
--- a/lib/PayPal/Api/Item.php
+++ b/lib/PayPal/Api/Item.php
@@ -156,7 +156,8 @@ public function getSku()
*
* @return $this
*/
- public function setDescription($description) {
+ public function setDescription($description)
+ {
$this->description = $description;
return $this;
@@ -168,7 +169,8 @@ public function setDescription($description) {
*
* @return string
*/
- public function getDescription() {
+ public function getDescription()
+ {
return $this->description;
}
@@ -180,7 +182,8 @@ public function getDescription() {
*
* @return $this
*/
- public function setTax($tax) {
+ public function setTax($tax)
+ {
$this->tax = $tax;
return $this;
@@ -192,7 +195,8 @@ public function setTax($tax) {
*
* @return string
*/
- public function getTax() {
+ public function getTax()
+ {
return $this->tax;
}
}
diff --git a/lib/PayPal/Api/ItemList.php b/lib/PayPal/Api/ItemList.php
index 6f949013..725de606 100644
--- a/lib/PayPal/Api/ItemList.php
+++ b/lib/PayPal/Api/ItemList.php
@@ -17,14 +17,16 @@ class ItemList extends PPModel
/**
* Construct an empty list.
*/
- function __construct() {
+ function __construct()
+ {
$this->items = array();
}
- /**
+ /**
* Is this list empty?
*/
- public function isEmpty() {
+ public function isEmpty()
+ {
return empty($this->items);
}
@@ -67,26 +69,30 @@ public function setShippingAddress($shipping_address)
return $this;
}
- /**
- * Append an item to the list.
- * @return PayPal\Api\Item
- */
- public function addItem($item) {
- return $this->setItems(
- array_merge($this->items, array($item))
- );
- }
+ /**
+ * Append an item to the list.
+ *
+ * @return PayPal\Api\Item
+ */
+ public function addItem($item)
+ {
+ return $this->setItems(
+ array_merge($this->items, array($item))
+ );
+ }
- /**
- * Remove an item from the list.
- * Items are compared using === comparision (PHP.net)
- * @return PayPal\Api\Item
- */
- public function removeItem($item) {
- return $this->setItems(
- array_diff($this->items, array($item))
- );
- }
+ /**
+ * Remove an item from the list.
+ * Items are compared using === comparision (PHP.net)
+ *
+ * @return PayPal\Api\Item
+ */
+ public function removeItem($item)
+ {
+ return $this->setItems(
+ array_diff($this->items, array($item))
+ );
+ }
/**
* Get Shipping Address
diff --git a/lib/PayPal/Api/MerchantInfo.php b/lib/PayPal/Api/MerchantInfo.php
index e7c8d6a3..41bd0ccb 100644
--- a/lib/PayPal/Api/MerchantInfo.php
+++ b/lib/PayPal/Api/MerchantInfo.php
@@ -4,300 +4,336 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class MerchantInfo extends PPModel {
- /**
- * Email address of the merchant. 260 characters max.
- *
- * @param string $email
- */
- public function setEmail($email) {
- $this->email = $email;
- return $this;
- }
-
- /**
- * Email address of the merchant. 260 characters max.
- *
- * @return string
- */
- public function getEmail() {
- return $this->email;
- }
-
-
- /**
- * First name of the merchant. 30 characters max.
- *
- * @param string $first_name
- */
- public function setFirstName($first_name) {
- $this->first_name = $first_name;
- return $this;
- }
-
- /**
- * First name of the merchant. 30 characters max.
- *
- * @return string
- */
- public function getFirstName() {
- return $this->first_name;
- }
-
- /**
- * First name of the merchant. 30 characters max.
- *
- * @param string $first_name
- * @deprecated. Instead use setFirstName
- */
- public function setFirst_name($first_name) {
- $this->first_name = $first_name;
- return $this;
- }
- /**
- * First name of the merchant. 30 characters max.
- *
- * @return string
- * @deprecated. Instead use getFirstName
- */
- public function getFirst_name() {
- return $this->first_name;
- }
-
- /**
- * Last name of the merchant. 30 characters max.
- *
- * @param string $last_name
- */
- public function setLastName($last_name) {
- $this->last_name = $last_name;
- return $this;
- }
-
- /**
- * Last name of the merchant. 30 characters max.
- *
- * @return string
- */
- public function getLastName() {
- return $this->last_name;
- }
-
- /**
- * Last name of the merchant. 30 characters max.
- *
- * @param string $last_name
- * @deprecated. Instead use setLastName
- */
- public function setLast_name($last_name) {
- $this->last_name = $last_name;
- return $this;
- }
- /**
- * Last name of the merchant. 30 characters max.
- *
- * @return string
- * @deprecated. Instead use getLastName
- */
- public function getLast_name() {
- return $this->last_name;
- }
-
- /**
- * Address of the merchant.
- *
- * @param PayPal\Api\Address $address
- */
- public function setAddress($address) {
- $this->address = $address;
- return $this;
- }
-
- /**
- * Address of the merchant.
- *
- * @return PayPal\Api\Address
- */
- public function getAddress() {
- return $this->address;
- }
-
-
- /**
- * Company business name of the merchant. 100 characters max.
- *
- * @param string $business_name
- */
- public function setBusinessName($business_name) {
- $this->business_name = $business_name;
- return $this;
- }
-
- /**
- * Company business name of the merchant. 100 characters max.
- *
- * @return string
- */
- public function getBusinessName() {
- return $this->business_name;
- }
-
- /**
- * Company business name of the merchant. 100 characters max.
- *
- * @param string $business_name
- * @deprecated. Instead use setBusinessName
- */
- public function setBusiness_name($business_name) {
- $this->business_name = $business_name;
- return $this;
- }
- /**
- * Company business name of the merchant. 100 characters max.
- *
- * @return string
- * @deprecated. Instead use getBusinessName
- */
- public function getBusiness_name() {
- return $this->business_name;
- }
-
- /**
- * Phone number of the merchant.
- *
- * @param PayPal\Api\Phone $phone
- */
- public function setPhone($phone) {
- $this->phone = $phone;
- return $this;
- }
-
- /**
- * Phone number of the merchant.
- *
- * @return PayPal\Api\Phone
- */
- public function getPhone() {
- return $this->phone;
- }
-
-
- /**
- * Fax number of the merchant.
- *
- * @param PayPal\Api\Phone $fax
- */
- public function setFax($fax) {
- $this->fax = $fax;
- return $this;
- }
-
- /**
- * Fax number of the merchant.
- *
- * @return PayPal\Api\Phone
- */
- public function getFax() {
- return $this->fax;
- }
-
-
- /**
- * Website of the merchant. 2048 characters max.
- *
- * @param string $website
- */
- public function setWebsite($website) {
- $this->website = $website;
- return $this;
- }
-
- /**
- * Website of the merchant. 2048 characters max.
- *
- * @return string
- */
- public function getWebsite() {
- return $this->website;
- }
-
-
- /**
- * Tax ID of the merchant. 100 characters max.
- *
- * @param string $tax_id
- */
- public function setTaxId($tax_id) {
- $this->tax_id = $tax_id;
- return $this;
- }
-
- /**
- * Tax ID of the merchant. 100 characters max.
- *
- * @return string
- */
- public function getTaxId() {
- return $this->tax_id;
- }
-
- /**
- * Tax ID of the merchant. 100 characters max.
- *
- * @param string $tax_id
- * @deprecated. Instead use setTaxId
- */
- public function setTax_id($tax_id) {
- $this->tax_id = $tax_id;
- return $this;
- }
- /**
- * Tax ID of the merchant. 100 characters max.
- *
- * @return string
- * @deprecated. Instead use getTaxId
- */
- public function getTax_id() {
- return $this->tax_id;
- }
-
- /**
- * Option to display additional information such as business hours. 40 characters max.
- *
- * @param string $additional_info
- */
- public function setAdditionalInfo($additional_info) {
- $this->additional_info = $additional_info;
- return $this;
- }
-
- /**
- * Option to display additional information such as business hours. 40 characters max.
- *
- * @return string
- */
- public function getAdditionalInfo() {
- return $this->additional_info;
- }
-
- /**
- * Option to display additional information such as business hours. 40 characters max.
- *
- * @param string $additional_info
- * @deprecated. Instead use setAdditionalInfo
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getAdditionalInfo
- */
- public function getAdditional_info() {
- return $this->additional_info;
- }
+class MerchantInfo extends PPModel
+{
+ /**
+ * Email address of the merchant. 260 characters max.
+ *
+ * @param string $email
+ */
+ public function setEmail($email)
+ {
+ $this->email = $email;
+ return $this;
+ }
+
+ /**
+ * Email address of the merchant. 260 characters max.
+ *
+ * @return string
+ */
+ public function getEmail()
+ {
+ return $this->email;
+ }
+
+
+ /**
+ * First name of the merchant. 30 characters max.
+ *
+ * @param string $first_name
+ */
+ public function setFirstName($first_name)
+ {
+ $this->first_name = $first_name;
+ return $this;
+ }
+
+ /**
+ * First name of the merchant. 30 characters max.
+ *
+ * @return string
+ */
+ public function getFirstName()
+ {
+ return $this->first_name;
+ }
+
+ /**
+ * First name of the merchant. 30 characters max.
+ *
+ * @param string $first_name
+ * @deprecated. Instead use setFirstName
+ */
+ public function setFirst_name($first_name)
+ {
+ $this->first_name = $first_name;
+ return $this;
+ }
+
+ /**
+ * First name of the merchant. 30 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getFirstName
+ */
+ public function getFirst_name()
+ {
+ return $this->first_name;
+ }
+
+ /**
+ * Last name of the merchant. 30 characters max.
+ *
+ * @param string $last_name
+ */
+ public function setLastName($last_name)
+ {
+ $this->last_name = $last_name;
+ return $this;
+ }
+
+ /**
+ * Last name of the merchant. 30 characters max.
+ *
+ * @return string
+ */
+ public function getLastName()
+ {
+ return $this->last_name;
+ }
+
+ /**
+ * Last name of the merchant. 30 characters max.
+ *
+ * @param string $last_name
+ * @deprecated. Instead use setLastName
+ */
+ public function setLast_name($last_name)
+ {
+ $this->last_name = $last_name;
+ return $this;
+ }
+
+ /**
+ * Last name of the merchant. 30 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getLastName
+ */
+ public function getLast_name()
+ {
+ return $this->last_name;
+ }
+
+ /**
+ * Address of the merchant.
+ *
+ * @param PayPal\Api\Address $address
+ */
+ public function setAddress($address)
+ {
+ $this->address = $address;
+ return $this;
+ }
+
+ /**
+ * Address of the merchant.
+ *
+ * @return PayPal\Api\Address
+ */
+ public function getAddress()
+ {
+ return $this->address;
+ }
+
+
+ /**
+ * Company business name of the merchant. 100 characters max.
+ *
+ * @param string $business_name
+ */
+ public function setBusinessName($business_name)
+ {
+ $this->business_name = $business_name;
+ return $this;
+ }
+
+ /**
+ * Company business name of the merchant. 100 characters max.
+ *
+ * @return string
+ */
+ public function getBusinessName()
+ {
+ return $this->business_name;
+ }
+
+ /**
+ * Company business name of the merchant. 100 characters max.
+ *
+ * @param string $business_name
+ * @deprecated. Instead use setBusinessName
+ */
+ public function setBusiness_name($business_name)
+ {
+ $this->business_name = $business_name;
+ return $this;
+ }
+
+ /**
+ * Company business name of the merchant. 100 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getBusinessName
+ */
+ public function getBusiness_name()
+ {
+ return $this->business_name;
+ }
+
+ /**
+ * Phone number of the merchant.
+ *
+ * @param PayPal\Api\Phone $phone
+ */
+ public function setPhone($phone)
+ {
+ $this->phone = $phone;
+ return $this;
+ }
+
+ /**
+ * Phone number of the merchant.
+ *
+ * @return PayPal\Api\Phone
+ */
+ public function getPhone()
+ {
+ return $this->phone;
+ }
+
+
+ /**
+ * Fax number of the merchant.
+ *
+ * @param PayPal\Api\Phone $fax
+ */
+ public function setFax($fax)
+ {
+ $this->fax = $fax;
+ return $this;
+ }
+
+ /**
+ * Fax number of the merchant.
+ *
+ * @return PayPal\Api\Phone
+ */
+ public function getFax()
+ {
+ return $this->fax;
+ }
+
+
+ /**
+ * Website of the merchant. 2048 characters max.
+ *
+ * @param string $website
+ */
+ public function setWebsite($website)
+ {
+ $this->website = $website;
+ return $this;
+ }
+
+ /**
+ * Website of the merchant. 2048 characters max.
+ *
+ * @return string
+ */
+ public function getWebsite()
+ {
+ return $this->website;
+ }
+
+
+ /**
+ * Tax ID of the merchant. 100 characters max.
+ *
+ * @param string $tax_id
+ */
+ public function setTaxId($tax_id)
+ {
+ $this->tax_id = $tax_id;
+ return $this;
+ }
+
+ /**
+ * Tax ID of the merchant. 100 characters max.
+ *
+ * @return string
+ */
+ public function getTaxId()
+ {
+ return $this->tax_id;
+ }
+
+ /**
+ * Tax ID of the merchant. 100 characters max.
+ *
+ * @param string $tax_id
+ * @deprecated. Instead use setTaxId
+ */
+ public function setTax_id($tax_id)
+ {
+ $this->tax_id = $tax_id;
+ return $this;
+ }
+
+ /**
+ * Tax ID of the merchant. 100 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getTaxId
+ */
+ public function getTax_id()
+ {
+ return $this->tax_id;
+ }
+
+ /**
+ * Option to display additional information such as business hours. 40 characters max.
+ *
+ * @param string $additional_info
+ */
+ public function setAdditionalInfo($additional_info)
+ {
+ $this->additional_info = $additional_info;
+ return $this;
+ }
+
+ /**
+ * Option to display additional information such as business hours. 40 characters max.
+ *
+ * @return string
+ */
+ public function getAdditionalInfo()
+ {
+ return $this->additional_info;
+ }
+
+ /**
+ * Option to display additional information such as business hours. 40 characters max.
+ *
+ * @param string $additional_info
+ * @deprecated. Instead use setAdditionalInfo
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getAdditionalInfo
+ */
+ public function getAdditional_info()
+ {
+ return $this->additional_info;
+ }
}
diff --git a/lib/PayPal/Api/Metadata.php b/lib/PayPal/Api/Metadata.php
index 30383ad0..baf6e32c 100644
--- a/lib/PayPal/Api/Metadata.php
+++ b/lib/PayPal/Api/Metadata.php
@@ -4,356 +4,402 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class Metadata extends PPModel {
- /**
- * Date when the resource was created.
- *
- * @param string $created_date
- */
- public function setCreatedDate($created_date) {
- $this->created_date = $created_date;
- return $this;
- }
-
- /**
- * Date when the resource was created.
- *
- * @return string
- */
- public function getCreatedDate() {
- return $this->created_date;
- }
-
- /**
- * Date when the resource was created.
- *
- * @param string $created_date
- * @deprecated. Instead use setCreatedDate
- */
- public function setCreated_date($created_date) {
- $this->created_date = $created_date;
- return $this;
- }
- /**
- * Date when the resource was created.
- *
- * @return string
- * @deprecated. Instead use getCreatedDate
- */
- public function getCreated_date() {
- return $this->created_date;
- }
-
- /**
- * Email address of the account that created the resource.
- *
- * @param string $created_by
- */
- public function setCreatedBy($created_by) {
- $this->created_by = $created_by;
- return $this;
- }
-
- /**
- * Email address of the account that created the resource.
- *
- * @return string
- */
- public function getCreatedBy() {
- return $this->created_by;
- }
-
- /**
- * Email address of the account that created the resource.
- *
- * @param string $created_by
- * @deprecated. Instead use setCreatedBy
- */
- public function setCreated_by($created_by) {
- $this->created_by = $created_by;
- return $this;
- }
- /**
- * Email address of the account that created the resource.
- *
- * @return string
- * @deprecated. Instead use getCreatedBy
- */
- public function getCreated_by() {
- return $this->created_by;
- }
-
- /**
- * Date when the resource was cancelled.
- *
- * @param string $cancelled_date
- */
- public function setCancelledDate($cancelled_date) {
- $this->cancelled_date = $cancelled_date;
- return $this;
- }
-
- /**
- * Date when the resource was cancelled.
- *
- * @return string
- */
- public function getCancelledDate() {
- return $this->cancelled_date;
- }
-
- /**
- * Date when the resource was cancelled.
- *
- * @param string $cancelled_date
- * @deprecated. Instead use setCancelledDate
- */
- public function setCancelled_date($cancelled_date) {
- $this->cancelled_date = $cancelled_date;
- return $this;
- }
- /**
- * Date when the resource was cancelled.
- *
- * @return string
- * @deprecated. Instead use getCancelledDate
- */
- public function getCancelled_date() {
- return $this->cancelled_date;
- }
-
- /**
- * Actor who cancelled the resource.
- *
- * @param string $cancelled_by
- */
- public function setCancelledBy($cancelled_by) {
- $this->cancelled_by = $cancelled_by;
- return $this;
- }
-
- /**
- * Actor who cancelled the resource.
- *
- * @return string
- */
- public function getCancelledBy() {
- return $this->cancelled_by;
- }
-
- /**
- * Actor who cancelled the resource.
- *
- * @param string $cancelled_by
- * @deprecated. Instead use setCancelledBy
- */
- public function setCancelled_by($cancelled_by) {
- $this->cancelled_by = $cancelled_by;
- return $this;
- }
- /**
- * Actor who cancelled the resource.
- *
- * @return string
- * @deprecated. Instead use getCancelledBy
- */
- public function getCancelled_by() {
- return $this->cancelled_by;
- }
-
- /**
- * Date when the resource was last edited.
- *
- * @param string $last_updated_date
- */
- public function setLastUpdatedDate($last_updated_date) {
- $this->last_updated_date = $last_updated_date;
- return $this;
- }
-
- /**
- * Date when the resource was last edited.
- *
- * @return string
- */
- public function getLastUpdatedDate() {
- return $this->last_updated_date;
- }
-
- /**
- * Date when the resource was last edited.
- *
- * @param string $last_updated_date
- * @deprecated. Instead use setLastUpdatedDate
- */
- public function setLast_updated_date($last_updated_date) {
- $this->last_updated_date = $last_updated_date;
- return $this;
- }
- /**
- * Date when the resource was last edited.
- *
- * @return string
- * @deprecated. Instead use getLastUpdatedDate
- */
- public function getLast_updated_date() {
- return $this->last_updated_date;
- }
-
- /**
- * Email address of the account that last edited the resource.
- *
- * @param string $last_updated_by
- */
- public function setLastUpdatedBy($last_updated_by) {
- $this->last_updated_by = $last_updated_by;
- return $this;
- }
-
- /**
- * Email address of the account that last edited the resource.
- *
- * @return string
- */
- public function getLastUpdatedBy() {
- return $this->last_updated_by;
- }
-
- /**
- * Email address of the account that last edited the resource.
- *
- * @param string $last_updated_by
- * @deprecated. Instead use setLastUpdatedBy
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getLastUpdatedBy
- */
- public function getLast_updated_by() {
- return $this->last_updated_by;
- }
-
- /**
- * Date when the resource was first sent.
- *
- * @param string $first_sent_date
- */
- public function setFirstSentDate($first_sent_date) {
- $this->first_sent_date = $first_sent_date;
- return $this;
- }
-
- /**
- * Date when the resource was first sent.
- *
- * @return string
- */
- public function getFirstSentDate() {
- return $this->first_sent_date;
- }
-
- /**
- * Date when the resource was first sent.
- *
- * @param string $first_sent_date
- * @deprecated. Instead use setFirstSentDate
- */
- public function setFirst_sent_date($first_sent_date) {
- $this->first_sent_date = $first_sent_date;
- return $this;
- }
- /**
- * Date when the resource was first sent.
- *
- * @return string
- * @deprecated. Instead use getFirstSentDate
- */
- public function getFirst_sent_date() {
- return $this->first_sent_date;
- }
-
- /**
- * Date when the resource was last sent.
- *
- * @param string $last_sent_date
- */
- public function setLastSentDate($last_sent_date) {
- $this->last_sent_date = $last_sent_date;
- return $this;
- }
-
- /**
- * Date when the resource was last sent.
- *
- * @return string
- */
- public function getLastSentDate() {
- return $this->last_sent_date;
- }
-
- /**
- * Date when the resource was last sent.
- *
- * @param string $last_sent_date
- * @deprecated. Instead use setLastSentDate
- */
- public function setLast_sent_date($last_sent_date) {
- $this->last_sent_date = $last_sent_date;
- return $this;
- }
- /**
- * Date when the resource was last sent.
- *
- * @return string
- * @deprecated. Instead use getLastSentDate
- */
- public function getLast_sent_date() {
- return $this->last_sent_date;
- }
-
- /**
- * Email address of the account that last sent the resource.
- *
- * @param string $last_sent_by
- */
- public function setLastSentBy($last_sent_by) {
- $this->last_sent_by = $last_sent_by;
- return $this;
- }
-
- /**
- * Email address of the account that last sent the resource.
- *
- * @return string
- */
- public function getLastSentBy() {
- return $this->last_sent_by;
- }
-
- /**
- * Email address of the account that last sent the resource.
- *
- * @param string $last_sent_by
- * @deprecated. Instead use setLastSentBy
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getLastSentBy
- */
- public function getLast_sent_by() {
- return $this->last_sent_by;
- }
+class Metadata extends PPModel
+{
+ /**
+ * Date when the resource was created.
+ *
+ * @param string $created_date
+ */
+ public function setCreatedDate($created_date)
+ {
+ $this->created_date = $created_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was created.
+ *
+ * @return string
+ */
+ public function getCreatedDate()
+ {
+ return $this->created_date;
+ }
+
+ /**
+ * Date when the resource was created.
+ *
+ * @param string $created_date
+ * @deprecated. Instead use setCreatedDate
+ */
+ public function setCreated_date($created_date)
+ {
+ $this->created_date = $created_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was created.
+ *
+ * @return string
+ * @deprecated. Instead use getCreatedDate
+ */
+ public function getCreated_date()
+ {
+ return $this->created_date;
+ }
+
+ /**
+ * Email address of the account that created the resource.
+ *
+ * @param string $created_by
+ */
+ public function setCreatedBy($created_by)
+ {
+ $this->created_by = $created_by;
+ return $this;
+ }
+
+ /**
+ * Email address of the account that created the resource.
+ *
+ * @return string
+ */
+ public function getCreatedBy()
+ {
+ return $this->created_by;
+ }
+
+ /**
+ * Email address of the account that created the resource.
+ *
+ * @param string $created_by
+ * @deprecated. Instead use setCreatedBy
+ */
+ public function setCreated_by($created_by)
+ {
+ $this->created_by = $created_by;
+ return $this;
+ }
+
+ /**
+ * Email address of the account that created the resource.
+ *
+ * @return string
+ * @deprecated. Instead use getCreatedBy
+ */
+ public function getCreated_by()
+ {
+ return $this->created_by;
+ }
+
+ /**
+ * Date when the resource was cancelled.
+ *
+ * @param string $cancelled_date
+ */
+ public function setCancelledDate($cancelled_date)
+ {
+ $this->cancelled_date = $cancelled_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was cancelled.
+ *
+ * @return string
+ */
+ public function getCancelledDate()
+ {
+ return $this->cancelled_date;
+ }
+
+ /**
+ * Date when the resource was cancelled.
+ *
+ * @param string $cancelled_date
+ * @deprecated. Instead use setCancelledDate
+ */
+ public function setCancelled_date($cancelled_date)
+ {
+ $this->cancelled_date = $cancelled_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was cancelled.
+ *
+ * @return string
+ * @deprecated. Instead use getCancelledDate
+ */
+ public function getCancelled_date()
+ {
+ return $this->cancelled_date;
+ }
+
+ /**
+ * Actor who cancelled the resource.
+ *
+ * @param string $cancelled_by
+ */
+ public function setCancelledBy($cancelled_by)
+ {
+ $this->cancelled_by = $cancelled_by;
+ return $this;
+ }
+
+ /**
+ * Actor who cancelled the resource.
+ *
+ * @return string
+ */
+ public function getCancelledBy()
+ {
+ return $this->cancelled_by;
+ }
+
+ /**
+ * Actor who cancelled the resource.
+ *
+ * @param string $cancelled_by
+ * @deprecated. Instead use setCancelledBy
+ */
+ public function setCancelled_by($cancelled_by)
+ {
+ $this->cancelled_by = $cancelled_by;
+ return $this;
+ }
+
+ /**
+ * Actor who cancelled the resource.
+ *
+ * @return string
+ * @deprecated. Instead use getCancelledBy
+ */
+ public function getCancelled_by()
+ {
+ return $this->cancelled_by;
+ }
+
+ /**
+ * Date when the resource was last edited.
+ *
+ * @param string $last_updated_date
+ */
+ public function setLastUpdatedDate($last_updated_date)
+ {
+ $this->last_updated_date = $last_updated_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was last edited.
+ *
+ * @return string
+ */
+ public function getLastUpdatedDate()
+ {
+ return $this->last_updated_date;
+ }
+
+ /**
+ * Date when the resource was last edited.
+ *
+ * @param string $last_updated_date
+ * @deprecated. Instead use setLastUpdatedDate
+ */
+ public function setLast_updated_date($last_updated_date)
+ {
+ $this->last_updated_date = $last_updated_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was last edited.
+ *
+ * @return string
+ * @deprecated. Instead use getLastUpdatedDate
+ */
+ public function getLast_updated_date()
+ {
+ return $this->last_updated_date;
+ }
+
+ /**
+ * Email address of the account that last edited the resource.
+ *
+ * @param string $last_updated_by
+ */
+ public function setLastUpdatedBy($last_updated_by)
+ {
+ $this->last_updated_by = $last_updated_by;
+ return $this;
+ }
+
+ /**
+ * Email address of the account that last edited the resource.
+ *
+ * @return string
+ */
+ public function getLastUpdatedBy()
+ {
+ return $this->last_updated_by;
+ }
+
+ /**
+ * Email address of the account that last edited the resource.
+ *
+ * @param string $last_updated_by
+ * @deprecated. Instead use setLastUpdatedBy
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getLastUpdatedBy
+ */
+ public function getLast_updated_by()
+ {
+ return $this->last_updated_by;
+ }
+
+ /**
+ * Date when the resource was first sent.
+ *
+ * @param string $first_sent_date
+ */
+ public function setFirstSentDate($first_sent_date)
+ {
+ $this->first_sent_date = $first_sent_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was first sent.
+ *
+ * @return string
+ */
+ public function getFirstSentDate()
+ {
+ return $this->first_sent_date;
+ }
+
+ /**
+ * Date when the resource was first sent.
+ *
+ * @param string $first_sent_date
+ * @deprecated. Instead use setFirstSentDate
+ */
+ public function setFirst_sent_date($first_sent_date)
+ {
+ $this->first_sent_date = $first_sent_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was first sent.
+ *
+ * @return string
+ * @deprecated. Instead use getFirstSentDate
+ */
+ public function getFirst_sent_date()
+ {
+ return $this->first_sent_date;
+ }
+
+ /**
+ * Date when the resource was last sent.
+ *
+ * @param string $last_sent_date
+ */
+ public function setLastSentDate($last_sent_date)
+ {
+ $this->last_sent_date = $last_sent_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was last sent.
+ *
+ * @return string
+ */
+ public function getLastSentDate()
+ {
+ return $this->last_sent_date;
+ }
+
+ /**
+ * Date when the resource was last sent.
+ *
+ * @param string $last_sent_date
+ * @deprecated. Instead use setLastSentDate
+ */
+ public function setLast_sent_date($last_sent_date)
+ {
+ $this->last_sent_date = $last_sent_date;
+ return $this;
+ }
+
+ /**
+ * Date when the resource was last sent.
+ *
+ * @return string
+ * @deprecated. Instead use getLastSentDate
+ */
+ public function getLast_sent_date()
+ {
+ return $this->last_sent_date;
+ }
+
+ /**
+ * Email address of the account that last sent the resource.
+ *
+ * @param string $last_sent_by
+ */
+ public function setLastSentBy($last_sent_by)
+ {
+ $this->last_sent_by = $last_sent_by;
+ return $this;
+ }
+
+ /**
+ * Email address of the account that last sent the resource.
+ *
+ * @return string
+ */
+ public function getLastSentBy()
+ {
+ return $this->last_sent_by;
+ }
+
+ /**
+ * Email address of the account that last sent the resource.
+ *
+ * @param string $last_sent_by
+ * @deprecated. Instead use setLastSentBy
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getLastSentBy
+ */
+ public function getLast_sent_by()
+ {
+ return $this->last_sent_by;
+ }
}
diff --git a/lib/PayPal/Api/Notification.php b/lib/PayPal/Api/Notification.php
index b23b2f8e..d4d90fff 100644
--- a/lib/PayPal/Api/Notification.php
+++ b/lib/PayPal/Api/Notification.php
@@ -4,84 +4,94 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class Notification extends PPModel {
- /**
- * Subject of the notification.
- *
- * @param string $subject
- */
- public function setSubject($subject) {
- $this->subject = $subject;
- return $this;
- }
+class Notification extends PPModel
+{
+ /**
+ * Subject of the notification.
+ *
+ * @param string $subject
+ */
+ public function setSubject($subject)
+ {
+ $this->subject = $subject;
+ return $this;
+ }
- /**
- * Subject of the notification.
- *
- * @return string
- */
- public function getSubject() {
- return $this->subject;
- }
+ /**
+ * Subject of the notification.
+ *
+ * @return string
+ */
+ public function getSubject()
+ {
+ return $this->subject;
+ }
- /**
- * Note to the payer.
- *
- * @param string $note
- */
- public function setNote($note) {
- $this->note = $note;
- return $this;
- }
+ /**
+ * Note to the payer.
+ *
+ * @param string $note
+ */
+ public function setNote($note)
+ {
+ $this->note = $note;
+ return $this;
+ }
- /**
- * Note to the payer.
- *
- * @return string
- */
- public function getNote() {
- return $this->note;
- }
+ /**
+ * Note to the payer.
+ *
+ * @return string
+ */
+ public function getNote()
+ {
+ return $this->note;
+ }
- /**
- * A flag indicating whether a copy of the email has to be sent to the merchant.
- *
- * @param boolean $send_to_merchant
- */
- public function setSendToMerchant($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.
+ *
+ * @param boolean $send_to_merchant
+ */
+ public function setSendToMerchant($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.
- *
- * @return boolean
- */
- public function getSendToMerchant() {
- return $this->send_to_merchant;
- }
+ /**
+ * A flag indicating whether a copy of the email has to be sent to the merchant.
+ *
+ * @return boolean
+ */
+ public function getSendToMerchant()
+ {
+ return $this->send_to_merchant;
+ }
- /**
- * A flag indicating whether a copy of the email has to be sent to the merchant.
- *
- * @param boolean $send_to_merchant
- * @deprecated. Instead use setSendToMerchant
- */
- 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.
- *
- * @return boolean
- * @deprecated. Instead use getSendToMerchant
- */
- 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 merchant.
+ *
+ * @param boolean $send_to_merchant
+ * @deprecated. Instead use setSendToMerchant
+ */
+ 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.
+ *
+ * @return boolean
+ * @deprecated. Instead use getSendToMerchant
+ */
+ public function getSend_to_merchant()
+ {
+ return $this->send_to_merchant;
+ }
}
diff --git a/lib/PayPal/Api/Order.php b/lib/PayPal/Api/Order.php
index ab760e78..e6300c56 100644
--- a/lib/PayPal/Api/Order.php
+++ b/lib/PayPal/Api/Order.php
@@ -7,7 +7,7 @@
/**
* Class Order
- *
+ *
* @property string id
* @property string createTime
* @property string updateTime
@@ -21,9 +21,9 @@ class Order extends PPModel
{
/**
* Set the identifier of the order transaction.
- *
+ *
* @param string $id
- *
+ *
* @return $this
*/
public function setId($id)
@@ -35,7 +35,7 @@ public function setId($id)
/**
* Get the identifier of the order transaction.
- *
+ *
* @return string
*/
public function getId()
@@ -45,9 +45,9 @@ public function getId()
/**
* Set the time the resource was created.
- *
+ *
* @param string $create_time
- *
+ *
* @return $this
*/
public function setCreateTime($create_time)
@@ -59,7 +59,7 @@ public function setCreateTime($create_time)
/**
* Get the time the resource was created.
- *
+ *
* @return string
*/
public function getCreateTime()
@@ -69,9 +69,9 @@ public function getCreateTime()
/**
* Set the time the resource was last updated.
- *
+ *
* @param string $update_time
- *
+ *
* @return $this
*/
public function setUpdateTime($update_time)
@@ -83,7 +83,7 @@ public function setUpdateTime($update_time)
/**
* Get the time the resource was last updated.
- *
+ *
* @return string
*/
public function getUpdateTime()
@@ -93,11 +93,11 @@ public function getUpdateTime()
/**
* Set the state of the order transaction.
- *
+ *
* Allowed values are: `PENDING`, `COMPLETED`, `REFUNDED` or `PARTIALLY_REFUNDED`.
- *
+ *
* @param string $state
- *
+ *
* @return $this
*/
public function setState($state)
@@ -109,9 +109,9 @@ public function setState($state)
/**
* Get the state of the order transaction.
- *
+ *
* Allowed values are: `PENDING`, `COMPLETED`, `REFUNDED` or `PARTIALLY_REFUNDED`.
- *
+ *
* @return string
*/
public function getState()
@@ -121,9 +121,9 @@ public function getState()
/**
* Set the amount being collected.
- *
+ *
* @param \PayPal\Api\Amount $amount
- *
+ *
* @return $this
*/
public function setAmount($amount)
@@ -135,7 +135,7 @@ public function setAmount($amount)
/**
* Get the amount being collected.
- *
+ *
* @return \PayPal\Api\Amount
*/
public function getAmount()
@@ -145,9 +145,9 @@ public function getAmount()
/**
* Set ID of the payment resource on which this transaction is based.
- *
+ *
* @param string $parent_payment
- *
+ *
* @return $this
*/
public function setParentPayment($parent_payment)
@@ -159,7 +159,7 @@ public function setParentPayment($parent_payment)
/**
* Get ID of the payment resource on which this transaction is based.
- *
+ *
* @return string
*/
public function getParentPayment()
@@ -169,9 +169,9 @@ public function getParentPayment()
/**
* Set Links
- *
+ *
* @param \PayPal\Api\Links $links
- *
+ *
* @return $this
*/
public function setLinks($links)
@@ -183,7 +183,7 @@ public function setLinks($links)
/**
* Get Links
- *
+ *
* @return \PayPal\Api\Links
*/
public function getLinks()
@@ -193,16 +193,16 @@ public function getLinks()
/**
* Reason code for the transaction state being Pending or Reversed. Assigned in response.
- *
+ *
* Allowed values: `CHARGEBACK`, `GUARANTEE`, `BUYER_COMPLAINT`, `REFUND`,
* `UNCONFIRMED_SHIPPING_ADDRESS`,
* `ECHECK`, `INTERNATIONAL_WITHDRAWAL`,
* `RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION`, `PAYMENT_REVIEW`,
* `REGULATORY_REVIEW`, `UNILATERAL`, or `VERIFICATION_REQUIRED`
* (`ORDER` can also be set in the response).
- *
+ *
* @param string $reason_code
- *
+ *
* @return $this
*/
public function setReasonCode($reason_code)
@@ -214,14 +214,14 @@ public function setReasonCode($reason_code)
/**
* Reason code for the transaction state being Pending or Reversed. Assigned in response.
- *
+ *
* Allowed values: `CHARGEBACK`, `GUARANTEE`, `BUYER_COMPLAINT`, `REFUND`,
* `UNCONFIRMED_SHIPPING_ADDRESS`,
* `ECHECK`, `INTERNATIONAL_WITHDRAWAL`,
* `RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION`, `PAYMENT_REVIEW`,
* `REGULATORY_REVIEW`, `UNILATERAL`, or `VERIFICATION_REQUIRED`
* (`ORDER` can also be set in the response).
- *
+ *
* @return string
*/
public function getReasonCode()
diff --git a/lib/PayPal/Api/PayerInfo.php b/lib/PayPal/Api/PayerInfo.php
index 93284819..28f411d5 100644
--- a/lib/PayPal/Api/PayerInfo.php
+++ b/lib/PayPal/Api/PayerInfo.php
@@ -279,7 +279,7 @@ public function setShipping_address($shipping_address)
return $this;
}
-
+
/**
* Get Shipping Address
* Shipping address of the Payer from their PayPal Account
diff --git a/lib/PayPal/Api/PaymentDetail.php b/lib/PayPal/Api/PaymentDetail.php
index fe31f51b..afd2426b 100644
--- a/lib/PayPal/Api/PaymentDetail.php
+++ b/lib/PayPal/Api/PaymentDetail.php
@@ -4,163 +4,182 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class PaymentDetail extends PPModel {
- /**
- * 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.
- *
- * @param string $type
- */
- public function setType($type) {
- $this->type = $type;
- return $this;
- }
-
- /**
- * 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.
- *
- * @return string
- */
- public function getType() {
- return $this->type;
- }
-
-
- /**
- * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
- *
- * @param string $transaction_id
- */
- public function setTransactionId($transaction_id) {
- $this->transaction_id = $transaction_id;
- return $this;
- }
-
- /**
- * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
- *
- * @return string
- */
- public function getTransactionId() {
- return $this->transaction_id;
- }
-
- /**
- * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
- *
- * @param string $transaction_id
- * @deprecated. Instead use setTransactionId
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getTransactionId
- */
- public function getTransaction_id() {
- return $this->transaction_id;
- }
-
- /**
- * Type of the transaction.
- *
- * @param string $transaction_type
- */
- public function setTransactionType($transaction_type) {
- $this->transaction_type = $transaction_type;
- return $this;
- }
-
- /**
- * Type of the transaction.
- *
- * @return string
- */
- public function getTransactionType() {
- return $this->transaction_type;
- }
-
- /**
- * Type of the transaction.
- *
- * @param string $transaction_type
- * @deprecated. Instead use setTransactionType
- */
- public function setTransaction_type($transaction_type) {
- $this->transaction_type = $transaction_type;
- return $this;
- }
- /**
- * Type of the transaction.
- *
- * @return string
- * @deprecated. Instead use getTransactionType
- */
- public function getTransaction_type() {
- return $this->transaction_type;
- }
-
- /**
- * Date when the invoice was paid. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
- *
- * @param string $date
- */
- public function setDate($date) {
- $this->date = $date;
- return $this;
- }
-
- /**
- * Date when the invoice was paid. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
- *
- * @return string
- */
- public function getDate() {
- return $this->date;
- }
-
-
- /**
- * Payment mode or method. This field is mandatory if the value of the type field is OTHER.
- *
- * @param string $method
- */
- public function setMethod($method) {
- $this->method = $method;
- return $this;
- }
-
- /**
- * Payment mode or method. This field is mandatory if the value of the type field is OTHER.
- *
- * @return string
- */
- public function getMethod() {
- return $this->method;
- }
-
-
- /**
- * Optional note associated with the payment.
- *
- * @param string $note
- */
- public function setNote($note) {
- $this->note = $note;
- return $this;
- }
-
- /**
- * Optional note associated with the payment.
- *
- * @return string
- */
- public function getNote() {
- return $this->note;
- }
+class PaymentDetail extends PPModel
+{
+ /**
+ * 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.
+ *
+ * @param string $type
+ */
+ public function setType($type)
+ {
+ $this->type = $type;
+ return $this;
+ }
+
+ /**
+ * 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.
+ *
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+
+ /**
+ * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
+ *
+ * @param string $transaction_id
+ */
+ public function setTransactionId($transaction_id)
+ {
+ $this->transaction_id = $transaction_id;
+ return $this;
+ }
+
+ /**
+ * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
+ *
+ * @return string
+ */
+ public function getTransactionId()
+ {
+ return $this->transaction_id;
+ }
+
+ /**
+ * PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
+ *
+ * @param string $transaction_id
+ * @deprecated. Instead use setTransactionId
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getTransactionId
+ */
+ public function getTransaction_id()
+ {
+ return $this->transaction_id;
+ }
+
+ /**
+ * Type of the transaction.
+ *
+ * @param string $transaction_type
+ */
+ public function setTransactionType($transaction_type)
+ {
+ $this->transaction_type = $transaction_type;
+ return $this;
+ }
+
+ /**
+ * Type of the transaction.
+ *
+ * @return string
+ */
+ public function getTransactionType()
+ {
+ return $this->transaction_type;
+ }
+
+ /**
+ * Type of the transaction.
+ *
+ * @param string $transaction_type
+ * @deprecated. Instead use setTransactionType
+ */
+ public function setTransaction_type($transaction_type)
+ {
+ $this->transaction_type = $transaction_type;
+ return $this;
+ }
+
+ /**
+ * Type of the transaction.
+ *
+ * @return string
+ * @deprecated. Instead use getTransactionType
+ */
+ public function getTransaction_type()
+ {
+ return $this->transaction_type;
+ }
+
+ /**
+ * Date when the invoice was paid. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
+ *
+ * @param string $date
+ */
+ public function setDate($date)
+ {
+ $this->date = $date;
+ return $this;
+ }
+
+ /**
+ * Date when the invoice was paid. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
+ *
+ * @return string
+ */
+ public function getDate()
+ {
+ return $this->date;
+ }
+
+
+ /**
+ * Payment mode or method. This field is mandatory if the value of the type field is OTHER.
+ *
+ * @param string $method
+ */
+ public function setMethod($method)
+ {
+ $this->method = $method;
+ return $this;
+ }
+
+ /**
+ * Payment mode or method. This field is mandatory if the value of the type field is OTHER.
+ *
+ * @return string
+ */
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+
+ /**
+ * Optional note associated with the payment.
+ *
+ * @param string $note
+ */
+ public function setNote($note)
+ {
+ $this->note = $note;
+ return $this;
+ }
+
+ /**
+ * Optional note associated with the payment.
+ *
+ * @return string
+ */
+ public function getNote()
+ {
+ return $this->note;
+ }
}
diff --git a/lib/PayPal/Api/PaymentHistory.php b/lib/PayPal/Api/PaymentHistory.php
index f18a7205..612ff885 100644
--- a/lib/PayPal/Api/PaymentHistory.php
+++ b/lib/PayPal/Api/PaymentHistory.php
@@ -108,7 +108,7 @@ public function setNext_id($next_id)
return $this;
}
-
+
/**
* Get Next ID
* Identifier of the next element to get the next range of results
diff --git a/lib/PayPal/Api/PaymentTerm.php b/lib/PayPal/Api/PaymentTerm.php
index 59202082..85b0e214 100644
--- a/lib/PayPal/Api/PaymentTerm.php
+++ b/lib/PayPal/Api/PaymentTerm.php
@@ -4,83 +4,94 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class PaymentTerm extends PPModel {
- /**
- * Terms by which the invoice payment is due.
- *
- * @param string $term_type
- */
- public function setTermType($term_type) {
- $this->term_type = $term_type;
- return $this;
- }
+class PaymentTerm extends PPModel
+{
+ /**
+ * Terms by which the invoice payment is due.
+ *
+ * @param string $term_type
+ */
+ public function setTermType($term_type)
+ {
+ $this->term_type = $term_type;
+ return $this;
+ }
- /**
- * Terms by which the invoice payment is due.
- *
- * @return string
- */
- public function getTermType() {
- return $this->term_type;
- }
+ /**
+ * Terms by which the invoice payment is due.
+ *
+ * @return string
+ */
+ public function getTermType()
+ {
+ return $this->term_type;
+ }
- /**
- * Terms by which the invoice payment is due.
- *
- * @param string $term_type
- * @deprecated. Instead use setTermType
- */
- public function setTerm_type($term_type) {
- $this->term_type = $term_type;
- return $this;
- }
- /**
- * Terms by which the invoice payment is due.
- *
- * @return string
- * @deprecated. Instead use getTermType
- */
- public function getTerm_type() {
- return $this->term_type;
- }
+ /**
+ * Terms by which the invoice payment is due.
+ *
+ * @param string $term_type
+ * @deprecated. Instead use setTermType
+ */
+ public function setTerm_type($term_type)
+ {
+ $this->term_type = $term_type;
+ return $this;
+ }
- /**
- * Date on which invoice payment is due. It must be always a future date. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
- *
- * @param string $due_date
- */
- public function setDueDate($due_date) {
- $this->due_date = $due_date;
- return $this;
- }
+ /**
+ * Terms by which the invoice payment is due.
+ *
+ * @return string
+ * @deprecated. Instead use getTermType
+ */
+ 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. For example, 2014-02-27 PST
- *
- * @return string
- */
- public function getDueDate() {
- return $this->due_date;
- }
+ /**
+ * Date on which invoice payment is due. It must be always a future date. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
+ *
+ * @param string $due_date
+ */
+ public function setDueDate($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. For example, 2014-02-27 PST
- *
- * @param string $due_date
- * @deprecated. Instead use setDueDate
- */
- 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. For example, 2014-02-27 PST
- *
- * @return string
- * @deprecated. Instead use getDueDate
- */
- public function getDue_date() {
- return $this->due_date;
- }
+ /**
+ * Date on which invoice payment is due. It must be always a future date. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
+ *
+ * @return string
+ */
+ public function getDueDate()
+ {
+ return $this->due_date;
+ }
+
+ /**
+ * Date on which invoice payment is due. It must be always a future date. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST
+ *
+ * @param string $due_date
+ * @deprecated. Instead use setDueDate
+ */
+ 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. For example, 2014-02-27 PST
+ *
+ * @return string
+ * @deprecated. Instead use getDueDate
+ */
+ public function getDue_date()
+ {
+ return $this->due_date;
+ }
}
diff --git a/lib/PayPal/Api/Phone.php b/lib/PayPal/Api/Phone.php
index 76605b6e..e41495f9 100644
--- a/lib/PayPal/Api/Phone.php
+++ b/lib/PayPal/Api/Phone.php
@@ -4,83 +4,94 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class Phone extends PPModel {
- /**
- * Country code (in E.164 format). Assume length is n.
- *
- * @param string $country_code
- */
- public function setCountryCode($country_code) {
- $this->country_code = $country_code;
- return $this;
- }
+class Phone extends PPModel
+{
+ /**
+ * Country code (in E.164 format). Assume length is n.
+ *
+ * @param string $country_code
+ */
+ public function setCountryCode($country_code)
+ {
+ $this->country_code = $country_code;
+ return $this;
+ }
- /**
- * Country code (in E.164 format). Assume length is n.
- *
- * @return string
- */
- public function getCountryCode() {
- return $this->country_code;
- }
+ /**
+ * Country code (in E.164 format). Assume length is n.
+ *
+ * @return string
+ */
+ public function getCountryCode()
+ {
+ return $this->country_code;
+ }
- /**
- * Country code (in E.164 format). Assume length is n.
- *
- * @param string $country_code
- * @deprecated. Instead use setCountryCode
- */
- public function setCountry_code($country_code) {
- $this->country_code = $country_code;
- return $this;
- }
- /**
- * Country code (in E.164 format). Assume length is n.
- *
- * @return string
- * @deprecated. Instead use getCountryCode
- */
- public function getCountry_code() {
- return $this->country_code;
- }
+ /**
+ * Country code (in E.164 format). Assume length is n.
+ *
+ * @param string $country_code
+ * @deprecated. Instead use setCountryCode
+ */
+ public function setCountry_code($country_code)
+ {
+ $this->country_code = $country_code;
+ return $this;
+ }
- /**
- * In-country phone number (in E.164 format). Maximum (15 - n) digits.
- *
- * @param string $national_number
- */
- public function setNationalNumber($national_number) {
- $this->national_number = $national_number;
- return $this;
- }
+ /**
+ * Country code (in E.164 format). Assume length is n.
+ *
+ * @return string
+ * @deprecated. Instead use getCountryCode
+ */
+ public function getCountry_code()
+ {
+ return $this->country_code;
+ }
- /**
- * In-country phone number (in E.164 format). Maximum (15 - n) digits.
- *
- * @return string
- */
- public function getNationalNumber() {
- return $this->national_number;
- }
+ /**
+ * In-country phone number (in E.164 format). Maximum (15 - n) digits.
+ *
+ * @param string $national_number
+ */
+ public function setNationalNumber($national_number)
+ {
+ $this->national_number = $national_number;
+ return $this;
+ }
- /**
- * In-country phone number (in E.164 format). Maximum (15 - n) digits.
- *
- * @param string $national_number
- * @deprecated. Instead use setNationalNumber
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getNationalNumber
- */
- public function getNational_number() {
- return $this->national_number;
- }
+ /**
+ * In-country phone number (in E.164 format). Maximum (15 - n) digits.
+ *
+ * @return string
+ */
+ public function getNationalNumber()
+ {
+ return $this->national_number;
+ }
+
+ /**
+ * In-country phone number (in E.164 format). Maximum (15 - n) digits.
+ *
+ * @param string $national_number
+ * @deprecated. Instead use setNationalNumber
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getNationalNumber
+ */
+ public function getNational_number()
+ {
+ return $this->national_number;
+ }
}
diff --git a/lib/PayPal/Api/RedirectUrls.php b/lib/PayPal/Api/RedirectUrls.php
index ba9ed1bd..d2451c63 100644
--- a/lib/PayPal/Api/RedirectUrls.php
+++ b/lib/PayPal/Api/RedirectUrls.php
@@ -23,8 +23,7 @@ class RedirectUrls extends PPModel
*/
public function setReturnUrl($return_url)
{
- if(filter_var($return_url, FILTER_VALIDATE_URL) === false)
- {
+ if (filter_var($return_url, FILTER_VALIDATE_URL) === false) {
throw new \InvalidArgumentException("Return URL is not a fully qualified URL");
}
@@ -84,8 +83,7 @@ public function getReturn_url()
*/
public function setCancelUrl($cancel_url)
{
- if(filter_var($cancel_url, FILTER_VALIDATE_URL) === false)
- {
+ if (filter_var($cancel_url, FILTER_VALIDATE_URL) === false) {
throw new \InvalidArgumentException("Cancel URL is not a fully qualified URL");
}
$this->cancel_url = $cancel_url;
@@ -120,7 +118,7 @@ public function setCancel_url($cancel_url)
return $this;
}
-
+
/**
* Get Cancel URL
* Url where the payer would be redirected to after canceling the payment
diff --git a/lib/PayPal/Api/RefundDetail.php b/lib/PayPal/Api/RefundDetail.php
index f659a433..a6e9ad66 100644
--- a/lib/PayPal/Api/RefundDetail.php
+++ b/lib/PayPal/Api/RefundDetail.php
@@ -4,65 +4,72 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class RefundDetail extends PPModel {
- /**
- * 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.
- *
- * @param string $type
- */
- public function setType($type) {
- $this->type = $type;
- return $this;
- }
+class RefundDetail extends PPModel
+{
+ /**
+ * 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.
+ *
+ * @param string $type
+ */
+ public function setType($type)
+ {
+ $this->type = $type;
+ return $this;
+ }
- /**
- * 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.
- *
- * @return string
- */
- public function getType() {
- return $this->type;
- }
+ /**
+ * 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.
+ *
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
- /**
- * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date.
- *
- * @param string $date
- */
- public function setDate($date) {
- $this->date = $date;
- return $this;
- }
+ /**
+ * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date.
+ *
+ * @param string $date
+ */
+ public function setDate($date)
+ {
+ $this->date = $date;
+ return $this;
+ }
- /**
- * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date.
- *
- * @return string
- */
- public function getDate() {
- return $this->date;
- }
+ /**
+ * Date when the invoice was marked as refunded. If no date is specified, the current date and time is used as the default. In addition, the date must be after the invoice payment date.
+ *
+ * @return string
+ */
+ public function getDate()
+ {
+ return $this->date;
+ }
- /**
- * Optional note associated with the refund.
- *
- * @param string $note
- */
- public function setNote($note) {
- $this->note = $note;
- return $this;
- }
+ /**
+ * Optional note associated with the refund.
+ *
+ * @param string $note
+ */
+ public function setNote($note)
+ {
+ $this->note = $note;
+ return $this;
+ }
- /**
- * Optional note associated with the refund.
- *
- * @return string
- */
- public function getNote() {
- return $this->note;
- }
+ /**
+ * Optional note associated with the refund.
+ *
+ * @return string
+ */
+ public function getNote()
+ {
+ return $this->note;
+ }
}
diff --git a/lib/PayPal/Api/RelatedResources.php b/lib/PayPal/Api/RelatedResources.php
index e9ba9632..e7896443 100644
--- a/lib/PayPal/Api/RelatedResources.php
+++ b/lib/PayPal/Api/RelatedResources.php
@@ -117,9 +117,9 @@ public function getRefund()
/**
* Set Order
- *
+ *
* @param \PayPal\Api\Order $order
- *
+ *
* @return $this
*/
public function setOrder($order)
@@ -131,7 +131,7 @@ public function setOrder($order)
/**
* Get Order
- *
+ *
* @return \PayPal\Api\Order
*/
public function getOrder()
diff --git a/lib/PayPal/Api/Search.php b/lib/PayPal/Api/Search.php
index 5985e282..ad1aebcf 100644
--- a/lib/PayPal/Api/Search.php
+++ b/lib/PayPal/Api/Search.php
@@ -4,670 +4,754 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class Search extends PPModel {
- /**
- * Initial letters of the email address.
- *
- * @param string $email
- */
- public function setEmail($email) {
- $this->email = $email;
- return $this;
- }
-
- /**
- * Initial letters of the email address.
- *
- * @return string
- */
- public function getEmail() {
- return $this->email;
- }
-
-
- /**
- * Initial letters of the recipient's first name.
- *
- * @param string $recipient_first_name
- */
- public function setRecipientFirstName($recipient_first_name) {
- $this->recipient_first_name = $recipient_first_name;
- return $this;
- }
-
- /**
- * Initial letters of the recipient's first name.
- *
- * @return string
- */
- public function getRecipientFirstName() {
- return $this->recipient_first_name;
- }
-
- /**
- * Initial letters of the recipient's first name.
- *
- * @param string $recipient_first_name
- * @deprecated. Instead use setRecipientFirstName
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getRecipientFirstName
- */
- public function getRecipient_first_name() {
- return $this->recipient_first_name;
- }
-
- /**
- * Initial letters of the recipient's last name.
- *
- * @param string $recipient_last_name
- */
- public function setRecipientLastName($recipient_last_name) {
- $this->recipient_last_name = $recipient_last_name;
- return $this;
- }
-
- /**
- * Initial letters of the recipient's last name.
- *
- * @return string
- */
- public function getRecipientLastName() {
- return $this->recipient_last_name;
- }
-
- /**
- * Initial letters of the recipient's last name.
- *
- * @param string $recipient_last_name
- * @deprecated. Instead use setRecipientLastName
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getRecipientLastName
- */
- public function getRecipient_last_name() {
- return $this->recipient_last_name;
- }
-
- /**
- * Initial letters of the recipient's business name.
- *
- * @param string $recipient_business_name
- */
- public function setRecipientBusinessName($recipient_business_name) {
- $this->recipient_business_name = $recipient_business_name;
- return $this;
- }
-
- /**
- * Initial letters of the recipient's business name.
- *
- * @return string
- */
- public function getRecipientBusinessName() {
- return $this->recipient_business_name;
- }
-
- /**
- * Initial letters of the recipient's business name.
- *
- * @param string $recipient_business_name
- * @deprecated. Instead use setRecipientBusinessName
- */
- 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.
- *
- * @return string
- * @deprecated. Instead use getRecipientBusinessName
- */
- public function getRecipient_business_name() {
- return $this->recipient_business_name;
- }
-
- /**
- * The invoice number that appears on the invoice.
- *
- * @param string $number
- */
- public function setNumber($number) {
- $this->number = $number;
- return $this;
- }
-
- /**
- * The invoice number that appears on the invoice.
- *
- * @return string
- */
- public function getNumber() {
- return $this->number;
- }
-
-
- /**
- * Status of the invoice.
- *
- * @param string $status
- */
- public function setStatus($status) {
- $this->status = $status;
- return $this;
- }
-
- /**
- * Status of the invoice.
- *
- * @return string
- */
- public function getStatus() {
- return $this->status;
- }
-
-
- /**
- * Lower limit of total amount.
- *
- * @param PayPal\Api\Currency $lower_total_amount
- */
- public function setLowerTotalAmount($lower_total_amount) {
- $this->lower_total_amount = $lower_total_amount;
- return $this;
- }
-
- /**
- * Lower limit of total amount.
- *
- * @return PayPal\Api\Currency
- */
- public function getLowerTotalAmount() {
- return $this->lower_total_amount;
- }
-
- /**
- * Lower limit of total amount.
- *
- * @param PayPal\Api\Currency $lower_total_amount
- * @deprecated. Instead use setLowerTotalAmount
- */
- public function setLower_total_amount($lower_total_amount) {
- $this->lower_total_amount = $lower_total_amount;
- return $this;
- }
- /**
- * Lower limit of total amount.
- *
- * @return PayPal\Api\Currency
- * @deprecated. Instead use getLowerTotalAmount
- */
- public function getLower_total_amount() {
- return $this->lower_total_amount;
- }
-
- /**
- * Upper limit of total amount.
- *
- * @param PayPal\Api\Currency $upper_total_amount
- */
- public function setUpperTotalAmount($upper_total_amount) {
- $this->upper_total_amount = $upper_total_amount;
- return $this;
- }
-
- /**
- * Upper limit of total amount.
- *
- * @return PayPal\Api\Currency
- */
- public function getUpperTotalAmount() {
- return $this->upper_total_amount;
- }
-
- /**
- * Upper limit of total amount.
- *
- * @param PayPal\Api\Currency $upper_total_amount
- * @deprecated. Instead use setUpperTotalAmount
- */
- public function setUpper_total_amount($upper_total_amount) {
- $this->upper_total_amount = $upper_total_amount;
- return $this;
- }
- /**
- * Upper limit of total amount.
- *
- * @return PayPal\Api\Currency
- * @deprecated. Instead use getUpperTotalAmount
- */
- public function getUpper_total_amount() {
- return $this->upper_total_amount;
- }
-
- /**
- * Start invoice date.
- *
- * @param string $start_invoice_date
- */
- public function setStartInvoiceDate($start_invoice_date) {
- $this->start_invoice_date = $start_invoice_date;
- return $this;
- }
-
- /**
- * Start invoice date.
- *
- * @return string
- */
- public function getStartInvoiceDate() {
- return $this->start_invoice_date;
- }
-
- /**
- * Start invoice date.
- *
- * @param string $start_invoice_date
- * @deprecated. Instead use setStartInvoiceDate
- */
- public function setStart_invoice_date($start_invoice_date) {
- $this->start_invoice_date = $start_invoice_date;
- return $this;
- }
- /**
- * Start invoice date.
- *
- * @return string
- * @deprecated. Instead use getStartInvoiceDate
- */
- public function getStart_invoice_date() {
- return $this->start_invoice_date;
- }
-
- /**
- * End invoice date.
- *
- * @param string $end_invoice_date
- */
- public function setEndInvoiceDate($end_invoice_date) {
- $this->end_invoice_date = $end_invoice_date;
- return $this;
- }
-
- /**
- * End invoice date.
- *
- * @return string
- */
- public function getEndInvoiceDate() {
- return $this->end_invoice_date;
- }
-
- /**
- * End invoice date.
- *
- * @param string $end_invoice_date
- * @deprecated. Instead use setEndInvoiceDate
- */
- public function setEnd_invoice_date($end_invoice_date) {
- $this->end_invoice_date = $end_invoice_date;
- return $this;
- }
- /**
- * End invoice date.
- *
- * @return string
- * @deprecated. Instead use getEndInvoiceDate
- */
- public function getEnd_invoice_date() {
- return $this->end_invoice_date;
- }
-
- /**
- * Start invoice due date.
- *
- * @param string $start_due_date
- */
- public function setStartDueDate($start_due_date) {
- $this->start_due_date = $start_due_date;
- return $this;
- }
-
- /**
- * Start invoice due date.
- *
- * @return string
- */
- public function getStartDueDate() {
- return $this->start_due_date;
- }
-
- /**
- * Start invoice due date.
- *
- * @param string $start_due_date
- * @deprecated. Instead use setStartDueDate
- */
- public function setStart_due_date($start_due_date) {
- $this->start_due_date = $start_due_date;
- return $this;
- }
- /**
- * Start invoice due date.
- *
- * @return string
- * @deprecated. Instead use getStartDueDate
- */
- public function getStart_due_date() {
- return $this->start_due_date;
- }
-
- /**
- * End invoice due date.
- *
- * @param string $end_due_date
- */
- public function setEndDueDate($end_due_date) {
- $this->end_due_date = $end_due_date;
- return $this;
- }
-
- /**
- * End invoice due date.
- *
- * @return string
- */
- public function getEndDueDate() {
- return $this->end_due_date;
- }
-
- /**
- * End invoice due date.
- *
- * @param string $end_due_date
- * @deprecated. Instead use setEndDueDate
- */
- public function setEnd_due_date($end_due_date) {
- $this->end_due_date = $end_due_date;
- return $this;
- }
- /**
- * End invoice due date.
- *
- * @return string
- * @deprecated. Instead use getEndDueDate
- */
- public function getEnd_due_date() {
- return $this->end_due_date;
- }
-
- /**
- * Start invoice payment date.
- *
- * @param string $start_payment_date
- */
- public function setStartPaymentDate($start_payment_date) {
- $this->start_payment_date = $start_payment_date;
- return $this;
- }
-
- /**
- * Start invoice payment date.
- *
- * @return string
- */
- public function getStartPaymentDate() {
- return $this->start_payment_date;
- }
-
- /**
- * Start invoice payment date.
- *
- * @param string $start_payment_date
- * @deprecated. Instead use setStartPaymentDate
- */
- public function setStart_payment_date($start_payment_date) {
- $this->start_payment_date = $start_payment_date;
- return $this;
- }
- /**
- * Start invoice payment date.
- *
- * @return string
- * @deprecated. Instead use getStartPaymentDate
- */
- public function getStart_payment_date() {
- return $this->start_payment_date;
- }
-
- /**
- * End invoice payment date.
- *
- * @param string $end_payment_date
- */
- public function setEndPaymentDate($end_payment_date) {
- $this->end_payment_date = $end_payment_date;
- return $this;
- }
-
- /**
- * End invoice payment date.
- *
- * @return string
- */
- public function getEndPaymentDate() {
- return $this->end_payment_date;
- }
-
- /**
- * End invoice payment date.
- *
- * @param string $end_payment_date
- * @deprecated. Instead use setEndPaymentDate
- */
- public function setEnd_payment_date($end_payment_date) {
- $this->end_payment_date = $end_payment_date;
- return $this;
- }
- /**
- * End invoice payment date.
- *
- * @return string
- * @deprecated. Instead use getEndPaymentDate
- */
- public function getEnd_payment_date() {
- return $this->end_payment_date;
- }
-
- /**
- * Start invoice creation date.
- *
- * @param string $start_creation_date
- */
- public function setStartCreationDate($start_creation_date) {
- $this->start_creation_date = $start_creation_date;
- return $this;
- }
-
- /**
- * Start invoice creation date.
- *
- * @return string
- */
- public function getStartCreationDate() {
- return $this->start_creation_date;
- }
-
- /**
- * Start invoice creation date.
- *
- * @param string $start_creation_date
- * @deprecated. Instead use setStartCreationDate
- */
- public function setStart_creation_date($start_creation_date) {
- $this->start_creation_date = $start_creation_date;
- return $this;
- }
- /**
- * Start invoice creation date.
- *
- * @return string
- * @deprecated. Instead use getStartCreationDate
- */
- public function getStart_creation_date() {
- return $this->start_creation_date;
- }
-
- /**
- * End invoice creation date.
- *
- * @param string $end_creation_date
- */
- public function setEndCreationDate($end_creation_date) {
- $this->end_creation_date = $end_creation_date;
- return $this;
- }
-
- /**
- * End invoice creation date.
- *
- * @return string
- */
- public function getEndCreationDate() {
- return $this->end_creation_date;
- }
-
- /**
- * End invoice creation date.
- *
- * @param string $end_creation_date
- * @deprecated. Instead use setEndCreationDate
- */
- public function setEnd_creation_date($end_creation_date) {
- $this->end_creation_date = $end_creation_date;
- return $this;
- }
- /**
- * End invoice creation date.
- *
- * @return string
- * @deprecated. Instead use getEndCreationDate
- */
- public function getEnd_creation_date() {
- return $this->end_creation_date;
- }
-
- /**
- * Offset of the search results.
- *
- * @param PayPal\Api\number $page
- */
- public function setPage($page) {
- $this->page = $page;
- return $this;
- }
-
- /**
- * Offset of the search results.
- *
- * @return PayPal\Api\number
- */
- public function getPage() {
- return $this->page;
- }
-
-
- /**
- * Page size of the search results.
- *
- * @param PayPal\Api\number $page_size
- */
- public function setPageSize($page_size) {
- $this->page_size = $page_size;
- return $this;
- }
-
- /**
- * Page size of the search results.
- *
- * @return PayPal\Api\number
- */
- public function getPageSize() {
- return $this->page_size;
- }
-
- /**
- * Page size of the search results.
- *
- * @param PayPal\Api\number $page_size
- * @deprecated. Instead use setPageSize
- */
- public function setPage_size($page_size) {
- $this->page_size = $page_size;
- return $this;
- }
- /**
- * Page size of the search results.
- *
- * @return PayPal\Api\number
- * @deprecated. Instead use getPageSize
- */
- public function getPage_size() {
- return $this->page_size;
- }
-
- /**
- * A flag indicating whether total count is required in the response.
- *
- * @param boolean $total_count_required
- */
- public function setTotalCountRequired($total_count_required) {
- $this->total_count_required = $total_count_required;
- return $this;
- }
-
- /**
- * A flag indicating whether total count is required in the response.
- *
- * @return boolean
- */
- public function getTotalCountRequired() {
- return $this->total_count_required;
- }
-
- /**
- * A flag indicating whether total count is required in the response.
- *
- * @param boolean $total_count_required
- * @deprecated. Instead use setTotalCountRequired
- */
- 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.
- *
- * @return boolean
- * @deprecated. Instead use getTotalCountRequired
- */
- public function getTotal_count_required() {
- return $this->total_count_required;
- }
+class Search extends PPModel
+{
+ /**
+ * Initial letters of the email address.
+ *
+ * @param string $email
+ */
+ public function setEmail($email)
+ {
+ $this->email = $email;
+ return $this;
+ }
+
+ /**
+ * Initial letters of the email address.
+ *
+ * @return string
+ */
+ public function getEmail()
+ {
+ return $this->email;
+ }
+
+
+ /**
+ * Initial letters of the recipient's first name.
+ *
+ * @param string $recipient_first_name
+ */
+ public function setRecipientFirstName($recipient_first_name)
+ {
+ $this->recipient_first_name = $recipient_first_name;
+ return $this;
+ }
+
+ /**
+ * Initial letters of the recipient's first name.
+ *
+ * @return string
+ */
+ public function getRecipientFirstName()
+ {
+ return $this->recipient_first_name;
+ }
+
+ /**
+ * Initial letters of the recipient's first name.
+ *
+ * @param string $recipient_first_name
+ * @deprecated. Instead use setRecipientFirstName
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getRecipientFirstName
+ */
+ public function getRecipient_first_name()
+ {
+ return $this->recipient_first_name;
+ }
+
+ /**
+ * Initial letters of the recipient's last name.
+ *
+ * @param string $recipient_last_name
+ */
+ public function setRecipientLastName($recipient_last_name)
+ {
+ $this->recipient_last_name = $recipient_last_name;
+ return $this;
+ }
+
+ /**
+ * Initial letters of the recipient's last name.
+ *
+ * @return string
+ */
+ public function getRecipientLastName()
+ {
+ return $this->recipient_last_name;
+ }
+
+ /**
+ * Initial letters of the recipient's last name.
+ *
+ * @param string $recipient_last_name
+ * @deprecated. Instead use setRecipientLastName
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getRecipientLastName
+ */
+ public function getRecipient_last_name()
+ {
+ return $this->recipient_last_name;
+ }
+
+ /**
+ * Initial letters of the recipient's business name.
+ *
+ * @param string $recipient_business_name
+ */
+ public function setRecipientBusinessName($recipient_business_name)
+ {
+ $this->recipient_business_name = $recipient_business_name;
+ return $this;
+ }
+
+ /**
+ * Initial letters of the recipient's business name.
+ *
+ * @return string
+ */
+ public function getRecipientBusinessName()
+ {
+ return $this->recipient_business_name;
+ }
+
+ /**
+ * Initial letters of the recipient's business name.
+ *
+ * @param string $recipient_business_name
+ * @deprecated. Instead use setRecipientBusinessName
+ */
+ 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.
+ *
+ * @return string
+ * @deprecated. Instead use getRecipientBusinessName
+ */
+ public function getRecipient_business_name()
+ {
+ return $this->recipient_business_name;
+ }
+
+ /**
+ * The invoice number that appears on the invoice.
+ *
+ * @param string $number
+ */
+ public function setNumber($number)
+ {
+ $this->number = $number;
+ return $this;
+ }
+
+ /**
+ * The invoice number that appears on the invoice.
+ *
+ * @return string
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+
+ /**
+ * Status of the invoice.
+ *
+ * @param string $status
+ */
+ public function setStatus($status)
+ {
+ $this->status = $status;
+ return $this;
+ }
+
+ /**
+ * Status of the invoice.
+ *
+ * @return string
+ */
+ public function getStatus()
+ {
+ return $this->status;
+ }
+
+
+ /**
+ * Lower limit of total amount.
+ *
+ * @param PayPal\Api\Currency $lower_total_amount
+ */
+ public function setLowerTotalAmount($lower_total_amount)
+ {
+ $this->lower_total_amount = $lower_total_amount;
+ return $this;
+ }
+
+ /**
+ * Lower limit of total amount.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getLowerTotalAmount()
+ {
+ return $this->lower_total_amount;
+ }
+
+ /**
+ * Lower limit of total amount.
+ *
+ * @param PayPal\Api\Currency $lower_total_amount
+ * @deprecated. Instead use setLowerTotalAmount
+ */
+ public function setLower_total_amount($lower_total_amount)
+ {
+ $this->lower_total_amount = $lower_total_amount;
+ return $this;
+ }
+
+ /**
+ * Lower limit of total amount.
+ *
+ * @return PayPal\Api\Currency
+ * @deprecated. Instead use getLowerTotalAmount
+ */
+ public function getLower_total_amount()
+ {
+ return $this->lower_total_amount;
+ }
+
+ /**
+ * Upper limit of total amount.
+ *
+ * @param PayPal\Api\Currency $upper_total_amount
+ */
+ public function setUpperTotalAmount($upper_total_amount)
+ {
+ $this->upper_total_amount = $upper_total_amount;
+ return $this;
+ }
+
+ /**
+ * Upper limit of total amount.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getUpperTotalAmount()
+ {
+ return $this->upper_total_amount;
+ }
+
+ /**
+ * Upper limit of total amount.
+ *
+ * @param PayPal\Api\Currency $upper_total_amount
+ * @deprecated. Instead use setUpperTotalAmount
+ */
+ public function setUpper_total_amount($upper_total_amount)
+ {
+ $this->upper_total_amount = $upper_total_amount;
+ return $this;
+ }
+
+ /**
+ * Upper limit of total amount.
+ *
+ * @return PayPal\Api\Currency
+ * @deprecated. Instead use getUpperTotalAmount
+ */
+ public function getUpper_total_amount()
+ {
+ return $this->upper_total_amount;
+ }
+
+ /**
+ * Start invoice date.
+ *
+ * @param string $start_invoice_date
+ */
+ public function setStartInvoiceDate($start_invoice_date)
+ {
+ $this->start_invoice_date = $start_invoice_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice date.
+ *
+ * @return string
+ */
+ public function getStartInvoiceDate()
+ {
+ return $this->start_invoice_date;
+ }
+
+ /**
+ * Start invoice date.
+ *
+ * @param string $start_invoice_date
+ * @deprecated. Instead use setStartInvoiceDate
+ */
+ public function setStart_invoice_date($start_invoice_date)
+ {
+ $this->start_invoice_date = $start_invoice_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice date.
+ *
+ * @return string
+ * @deprecated. Instead use getStartInvoiceDate
+ */
+ public function getStart_invoice_date()
+ {
+ return $this->start_invoice_date;
+ }
+
+ /**
+ * End invoice date.
+ *
+ * @param string $end_invoice_date
+ */
+ public function setEndInvoiceDate($end_invoice_date)
+ {
+ $this->end_invoice_date = $end_invoice_date;
+ return $this;
+ }
+
+ /**
+ * End invoice date.
+ *
+ * @return string
+ */
+ public function getEndInvoiceDate()
+ {
+ return $this->end_invoice_date;
+ }
+
+ /**
+ * End invoice date.
+ *
+ * @param string $end_invoice_date
+ * @deprecated. Instead use setEndInvoiceDate
+ */
+ public function setEnd_invoice_date($end_invoice_date)
+ {
+ $this->end_invoice_date = $end_invoice_date;
+ return $this;
+ }
+
+ /**
+ * End invoice date.
+ *
+ * @return string
+ * @deprecated. Instead use getEndInvoiceDate
+ */
+ public function getEnd_invoice_date()
+ {
+ return $this->end_invoice_date;
+ }
+
+ /**
+ * Start invoice due date.
+ *
+ * @param string $start_due_date
+ */
+ public function setStartDueDate($start_due_date)
+ {
+ $this->start_due_date = $start_due_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice due date.
+ *
+ * @return string
+ */
+ public function getStartDueDate()
+ {
+ return $this->start_due_date;
+ }
+
+ /**
+ * Start invoice due date.
+ *
+ * @param string $start_due_date
+ * @deprecated. Instead use setStartDueDate
+ */
+ public function setStart_due_date($start_due_date)
+ {
+ $this->start_due_date = $start_due_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice due date.
+ *
+ * @return string
+ * @deprecated. Instead use getStartDueDate
+ */
+ public function getStart_due_date()
+ {
+ return $this->start_due_date;
+ }
+
+ /**
+ * End invoice due date.
+ *
+ * @param string $end_due_date
+ */
+ public function setEndDueDate($end_due_date)
+ {
+ $this->end_due_date = $end_due_date;
+ return $this;
+ }
+
+ /**
+ * End invoice due date.
+ *
+ * @return string
+ */
+ public function getEndDueDate()
+ {
+ return $this->end_due_date;
+ }
+
+ /**
+ * End invoice due date.
+ *
+ * @param string $end_due_date
+ * @deprecated. Instead use setEndDueDate
+ */
+ public function setEnd_due_date($end_due_date)
+ {
+ $this->end_due_date = $end_due_date;
+ return $this;
+ }
+
+ /**
+ * End invoice due date.
+ *
+ * @return string
+ * @deprecated. Instead use getEndDueDate
+ */
+ public function getEnd_due_date()
+ {
+ return $this->end_due_date;
+ }
+
+ /**
+ * Start invoice payment date.
+ *
+ * @param string $start_payment_date
+ */
+ public function setStartPaymentDate($start_payment_date)
+ {
+ $this->start_payment_date = $start_payment_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice payment date.
+ *
+ * @return string
+ */
+ public function getStartPaymentDate()
+ {
+ return $this->start_payment_date;
+ }
+
+ /**
+ * Start invoice payment date.
+ *
+ * @param string $start_payment_date
+ * @deprecated. Instead use setStartPaymentDate
+ */
+ public function setStart_payment_date($start_payment_date)
+ {
+ $this->start_payment_date = $start_payment_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice payment date.
+ *
+ * @return string
+ * @deprecated. Instead use getStartPaymentDate
+ */
+ public function getStart_payment_date()
+ {
+ return $this->start_payment_date;
+ }
+
+ /**
+ * End invoice payment date.
+ *
+ * @param string $end_payment_date
+ */
+ public function setEndPaymentDate($end_payment_date)
+ {
+ $this->end_payment_date = $end_payment_date;
+ return $this;
+ }
+
+ /**
+ * End invoice payment date.
+ *
+ * @return string
+ */
+ public function getEndPaymentDate()
+ {
+ return $this->end_payment_date;
+ }
+
+ /**
+ * End invoice payment date.
+ *
+ * @param string $end_payment_date
+ * @deprecated. Instead use setEndPaymentDate
+ */
+ public function setEnd_payment_date($end_payment_date)
+ {
+ $this->end_payment_date = $end_payment_date;
+ return $this;
+ }
+
+ /**
+ * End invoice payment date.
+ *
+ * @return string
+ * @deprecated. Instead use getEndPaymentDate
+ */
+ public function getEnd_payment_date()
+ {
+ return $this->end_payment_date;
+ }
+
+ /**
+ * Start invoice creation date.
+ *
+ * @param string $start_creation_date
+ */
+ public function setStartCreationDate($start_creation_date)
+ {
+ $this->start_creation_date = $start_creation_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice creation date.
+ *
+ * @return string
+ */
+ public function getStartCreationDate()
+ {
+ return $this->start_creation_date;
+ }
+
+ /**
+ * Start invoice creation date.
+ *
+ * @param string $start_creation_date
+ * @deprecated. Instead use setStartCreationDate
+ */
+ public function setStart_creation_date($start_creation_date)
+ {
+ $this->start_creation_date = $start_creation_date;
+ return $this;
+ }
+
+ /**
+ * Start invoice creation date.
+ *
+ * @return string
+ * @deprecated. Instead use getStartCreationDate
+ */
+ public function getStart_creation_date()
+ {
+ return $this->start_creation_date;
+ }
+
+ /**
+ * End invoice creation date.
+ *
+ * @param string $end_creation_date
+ */
+ public function setEndCreationDate($end_creation_date)
+ {
+ $this->end_creation_date = $end_creation_date;
+ return $this;
+ }
+
+ /**
+ * End invoice creation date.
+ *
+ * @return string
+ */
+ public function getEndCreationDate()
+ {
+ return $this->end_creation_date;
+ }
+
+ /**
+ * End invoice creation date.
+ *
+ * @param string $end_creation_date
+ * @deprecated. Instead use setEndCreationDate
+ */
+ public function setEnd_creation_date($end_creation_date)
+ {
+ $this->end_creation_date = $end_creation_date;
+ return $this;
+ }
+
+ /**
+ * End invoice creation date.
+ *
+ * @return string
+ * @deprecated. Instead use getEndCreationDate
+ */
+ public function getEnd_creation_date()
+ {
+ return $this->end_creation_date;
+ }
+
+ /**
+ * Offset of the search results.
+ *
+ * @param PayPal\Api\number $page
+ */
+ public function setPage($page)
+ {
+ $this->page = $page;
+ return $this;
+ }
+
+ /**
+ * Offset of the search results.
+ *
+ * @return PayPal\Api\number
+ */
+ public function getPage()
+ {
+ return $this->page;
+ }
+
+
+ /**
+ * Page size of the search results.
+ *
+ * @param PayPal\Api\number $page_size
+ */
+ public function setPageSize($page_size)
+ {
+ $this->page_size = $page_size;
+ return $this;
+ }
+
+ /**
+ * Page size of the search results.
+ *
+ * @return PayPal\Api\number
+ */
+ public function getPageSize()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * Page size of the search results.
+ *
+ * @param PayPal\Api\number $page_size
+ * @deprecated. Instead use setPageSize
+ */
+ public function setPage_size($page_size)
+ {
+ $this->page_size = $page_size;
+ return $this;
+ }
+
+ /**
+ * Page size of the search results.
+ *
+ * @return PayPal\Api\number
+ * @deprecated. Instead use getPageSize
+ */
+ public function getPage_size()
+ {
+ return $this->page_size;
+ }
+
+ /**
+ * A flag indicating whether total count is required in the response.
+ *
+ * @param boolean $total_count_required
+ */
+ public function setTotalCountRequired($total_count_required)
+ {
+ $this->total_count_required = $total_count_required;
+ return $this;
+ }
+
+ /**
+ * A flag indicating whether total count is required in the response.
+ *
+ * @return boolean
+ */
+ public function getTotalCountRequired()
+ {
+ return $this->total_count_required;
+ }
+
+ /**
+ * A flag indicating whether total count is required in the response.
+ *
+ * @param boolean $total_count_required
+ * @deprecated. Instead use setTotalCountRequired
+ */
+ 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.
+ *
+ * @return boolean
+ * @deprecated. Instead use getTotalCountRequired
+ */
+ public function getTotal_count_required()
+ {
+ return $this->total_count_required;
+ }
}
diff --git a/lib/PayPal/Api/ShippingCost.php b/lib/PayPal/Api/ShippingCost.php
index c9e711cb..3b5ca2e0 100644
--- a/lib/PayPal/Api/ShippingCost.php
+++ b/lib/PayPal/Api/ShippingCost.php
@@ -4,45 +4,50 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class ShippingCost extends PPModel {
- /**
- * Shipping cost in amount. Range of 0 to 999999.99.
- *
- * @param PayPal\Api\Currency $amount
- */
- public function setAmount($amount) {
- $this->amount = $amount;
- return $this;
- }
-
- /**
- * Shipping cost in amount. Range of 0 to 999999.99.
- *
- * @return PayPal\Api\Currency
- */
- public function getAmount() {
- return $this->amount;
- }
-
-
- /**
- * Tax percentage on shipping amount.
- *
- * @param PayPal\Api\Tax $tax
- */
- public function setTax($tax) {
- $this->tax = $tax;
- return $this;
- }
-
- /**
- * Tax percentage on shipping amount.
- *
- * @return PayPal\Api\Tax
- */
- public function getTax() {
- return $this->tax;
- }
+class ShippingCost extends PPModel
+{
+ /**
+ * Shipping cost in amount. Range of 0 to 999999.99.
+ *
+ * @param PayPal\Api\Currency $amount
+ */
+ public function setAmount($amount)
+ {
+ $this->amount = $amount;
+ return $this;
+ }
+
+ /**
+ * Shipping cost in amount. Range of 0 to 999999.99.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getAmount()
+ {
+ return $this->amount;
+ }
+
+
+ /**
+ * Tax percentage on shipping amount.
+ *
+ * @param PayPal\Api\Tax $tax
+ */
+ public function setTax($tax)
+ {
+ $this->tax = $tax;
+ return $this;
+ }
+
+ /**
+ * Tax percentage on shipping amount.
+ *
+ * @return PayPal\Api\Tax
+ */
+ public function getTax()
+ {
+ return $this->tax;
+ }
}
diff --git a/lib/PayPal/Api/ShippingInfo.php b/lib/PayPal/Api/ShippingInfo.php
index 267816dc..83e96f2c 100644
--- a/lib/PayPal/Api/ShippingInfo.php
+++ b/lib/PayPal/Api/ShippingInfo.php
@@ -4,162 +4,182 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class ShippingInfo extends PPModel {
- /**
- * First name of the invoice recipient. 30 characters max.
- *
- * @param string $first_name
- */
- public function setFirstName($first_name) {
- $this->first_name = $first_name;
- return $this;
- }
-
- /**
- * First name of the invoice recipient. 30 characters max.
- *
- * @return string
- */
- public function getFirstName() {
- return $this->first_name;
- }
-
- /**
- * First name of the invoice recipient. 30 characters max.
- *
- * @param string $first_name
- * @deprecated. Instead use setFirstName
- */
- public function setFirst_name($first_name) {
- $this->first_name = $first_name;
- return $this;
- }
- /**
- * First name of the invoice recipient. 30 characters max.
- *
- * @return string
- * @deprecated. Instead use getFirstName
- */
- public function getFirst_name() {
- return $this->first_name;
- }
-
- /**
- * Last name of the invoice recipient. 30 characters max.
- *
- * @param string $last_name
- */
- public function setLastName($last_name) {
- $this->last_name = $last_name;
- return $this;
- }
-
- /**
- * Last name of the invoice recipient. 30 characters max.
- *
- * @return string
- */
- public function getLastName() {
- return $this->last_name;
- }
-
- /**
- * Last name of the invoice recipient. 30 characters max.
- *
- * @param string $last_name
- * @deprecated. Instead use setLastName
- */
- public function setLast_name($last_name) {
- $this->last_name = $last_name;
- return $this;
- }
- /**
- * Last name of the invoice recipient. 30 characters max.
- *
- * @return string
- * @deprecated. Instead use getLastName
- */
- public function getLast_name() {
- return $this->last_name;
- }
-
- /**
- * Company business name of the invoice recipient. 100 characters max.
- *
- * @param string $business_name
- */
- public function setBusinessName($business_name) {
- $this->business_name = $business_name;
- return $this;
- }
-
- /**
- * Company business name of the invoice recipient. 100 characters max.
- *
- * @return string
- */
- public function getBusinessName() {
- return $this->business_name;
- }
-
- /**
- * Company business name of the invoice recipient. 100 characters max.
- *
- * @param string $business_name
- * @deprecated. Instead use setBusinessName
- */
- public function setBusiness_name($business_name) {
- $this->business_name = $business_name;
- return $this;
- }
- /**
- * Company business name of the invoice recipient. 100 characters max.
- *
- * @return string
- * @deprecated. Instead use getBusinessName
- */
- public function getBusiness_name() {
- return $this->business_name;
- }
-
- /**
- *
- *
- * @param PayPal\Api\Phone $phone
- */
- public function setPhone($phone) {
- $this->phone = $phone;
- return $this;
- }
-
- /**
- *
- *
- * @return PayPal\Api\Phone
- */
- public function getPhone() {
- return $this->phone;
- }
-
-
- /**
- * Address of the invoice recipient.
- *
- * @param PayPal\Api\Address $address
- */
- public function setAddress($address) {
- $this->address = $address;
- return $this;
- }
-
- /**
- * Address of the invoice recipient.
- *
- * @return PayPal\Api\Address
- */
- public function getAddress() {
- return $this->address;
- }
+class ShippingInfo extends PPModel
+{
+ /**
+ * First name of the invoice recipient. 30 characters max.
+ *
+ * @param string $first_name
+ */
+ public function setFirstName($first_name)
+ {
+ $this->first_name = $first_name;
+ return $this;
+ }
+
+ /**
+ * First name of the invoice recipient. 30 characters max.
+ *
+ * @return string
+ */
+ public function getFirstName()
+ {
+ return $this->first_name;
+ }
+
+ /**
+ * First name of the invoice recipient. 30 characters max.
+ *
+ * @param string $first_name
+ * @deprecated. Instead use setFirstName
+ */
+ public function setFirst_name($first_name)
+ {
+ $this->first_name = $first_name;
+ return $this;
+ }
+
+ /**
+ * First name of the invoice recipient. 30 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getFirstName
+ */
+ public function getFirst_name()
+ {
+ return $this->first_name;
+ }
+
+ /**
+ * Last name of the invoice recipient. 30 characters max.
+ *
+ * @param string $last_name
+ */
+ public function setLastName($last_name)
+ {
+ $this->last_name = $last_name;
+ return $this;
+ }
+
+ /**
+ * Last name of the invoice recipient. 30 characters max.
+ *
+ * @return string
+ */
+ public function getLastName()
+ {
+ return $this->last_name;
+ }
+
+ /**
+ * Last name of the invoice recipient. 30 characters max.
+ *
+ * @param string $last_name
+ * @deprecated. Instead use setLastName
+ */
+ public function setLast_name($last_name)
+ {
+ $this->last_name = $last_name;
+ return $this;
+ }
+
+ /**
+ * Last name of the invoice recipient. 30 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getLastName
+ */
+ public function getLast_name()
+ {
+ return $this->last_name;
+ }
+
+ /**
+ * Company business name of the invoice recipient. 100 characters max.
+ *
+ * @param string $business_name
+ */
+ public function setBusinessName($business_name)
+ {
+ $this->business_name = $business_name;
+ return $this;
+ }
+
+ /**
+ * Company business name of the invoice recipient. 100 characters max.
+ *
+ * @return string
+ */
+ public function getBusinessName()
+ {
+ return $this->business_name;
+ }
+
+ /**
+ * Company business name of the invoice recipient. 100 characters max.
+ *
+ * @param string $business_name
+ * @deprecated. Instead use setBusinessName
+ */
+ public function setBusiness_name($business_name)
+ {
+ $this->business_name = $business_name;
+ return $this;
+ }
+
+ /**
+ * Company business name of the invoice recipient. 100 characters max.
+ *
+ * @return string
+ * @deprecated. Instead use getBusinessName
+ */
+ public function getBusiness_name()
+ {
+ return $this->business_name;
+ }
+
+ /**
+ *
+ *
+ * @param PayPal\Api\Phone $phone
+ */
+ public function setPhone($phone)
+ {
+ $this->phone = $phone;
+ return $this;
+ }
+
+ /**
+ *
+ *
+ * @return PayPal\Api\Phone
+ */
+ public function getPhone()
+ {
+ return $this->phone;
+ }
+
+
+ /**
+ * Address of the invoice recipient.
+ *
+ * @param PayPal\Api\Address $address
+ */
+ public function setAddress($address)
+ {
+ $this->address = $address;
+ return $this;
+ }
+
+ /**
+ * Address of the invoice recipient.
+ *
+ * @return PayPal\Api\Address
+ */
+ public function getAddress()
+ {
+ return $this->address;
+ }
}
diff --git a/lib/PayPal/Api/Tax.php b/lib/PayPal/Api/Tax.php
index 60c73ea7..751faf50 100644
--- a/lib/PayPal/Api/Tax.php
+++ b/lib/PayPal/Api/Tax.php
@@ -4,85 +4,94 @@
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
-class Tax extends PPModel {
- /**
- * Identifier of the resource.
- *
- * @param string $id
- */
- public function setId($id) {
- $this->id = $id;
- return $this;
- }
+class Tax extends PPModel
+{
+ /**
+ * Identifier of the resource.
+ *
+ * @param string $id
+ */
+ public function setId($id)
+ {
+ $this->id = $id;
+ return $this;
+ }
- /**
- * Identifier of the resource.
- *
- * @return string
- */
- public function getId() {
- return $this->id;
- }
+ /**
+ * Identifier of the resource.
+ *
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
- /**
- * Name of the tax. 10 characters max.
- *
- * @param string $name
- */
- public function setName($name) {
- $this->name = $name;
- return $this;
- }
+ /**
+ * Name of the tax. 10 characters max.
+ *
+ * @param string $name
+ */
+ public function setName($name)
+ {
+ $this->name = $name;
+ return $this;
+ }
- /**
- * Name of the tax. 10 characters max.
- *
- * @return string
- */
- public function getName() {
- return $this->name;
- }
+ /**
+ * Name of the tax. 10 characters max.
+ *
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
- /**
- * Rate of the specified tax. Range of 0.001 to 99.999.
- *
- * @param PayPal\Api\number $percent
- */
- public function setPercent($percent) {
- $this->percent = $percent;
- return $this;
- }
+ /**
+ * Rate of the specified tax. Range of 0.001 to 99.999.
+ *
+ * @param PayPal\Api\number $percent
+ */
+ public function setPercent($percent)
+ {
+ $this->percent = $percent;
+ return $this;
+ }
- /**
- * Rate of the specified tax. Range of 0.001 to 99.999.
- *
- * @return PayPal\Api\number
- */
- public function getPercent() {
- return $this->percent;
- }
+ /**
+ * Rate of the specified tax. Range of 0.001 to 99.999.
+ *
+ * @return PayPal\Api\number
+ */
+ public function getPercent()
+ {
+ return $this->percent;
+ }
- /**
- * Tax in the form of money. Cannot be specified in a request.
- *
- * @param PayPal\Api\Currency $amount
- */
- public function setAmount($amount) {
- $this->amount = $amount;
- return $this;
- }
+ /**
+ * Tax in the form of money. Cannot be specified in a request.
+ *
+ * @param PayPal\Api\Currency $amount
+ */
+ public function setAmount($amount)
+ {
+ $this->amount = $amount;
+ return $this;
+ }
- /**
- * Tax in the form of money. Cannot be specified in a request.
- *
- * @return PayPal\Api\Currency
- */
- public function getAmount() {
- return $this->amount;
- }
+ /**
+ * Tax in the form of money. Cannot be specified in a request.
+ *
+ * @return PayPal\Api\Currency
+ */
+ public function getAmount()
+ {
+ return $this->amount;
+ }
}
diff --git a/lib/PayPal/Common/PPArrayUtil.php b/lib/PayPal/Common/PPArrayUtil.php
new file mode 100644
index 00000000..6b6342e3
--- /dev/null
+++ b/lib/PayPal/Common/PPArrayUtil.php
@@ -0,0 +1,28 @@
+ $v) {
+ if (is_int($k)) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/lib/PayPal/Common/PPModel.php b/lib/PayPal/Common/PPModel.php
new file mode 100644
index 00000000..85177fd5
--- /dev/null
+++ b/lib/PayPal/Common/PPModel.php
@@ -0,0 +1,148 @@
+_propMap[$key];
+ }
+
+ /**
+ * Magic Set Method
+ *
+ * @param $key
+ * @param $value
+ */
+ public function __set($key, $value)
+ {
+ $this->_propMap[$key] = $value;
+ }
+
+ /**
+ * Magic isSet Method
+ *
+ * @param $key
+ * @return bool
+ */
+ public function __isset($key)
+ {
+ return isset($this->_propMap[$key]);
+ }
+
+ /**
+ * Magic Unset Method
+ *
+ * @param $key
+ */
+ public function __unset($key)
+ {
+ unset($this->_propMap[$key]);
+ }
+
+ /**
+ * Converts Params to Array
+ *
+ * @param $param
+ * @return array
+ */
+ private function _convertToArray($param)
+ {
+ $ret = array();
+ foreach ($param as $k => $v) {
+ if ($v instanceof PPModel) {
+ $ret[$k] = $v->toArray();
+ } else if (is_array($v)) {
+ $ret[$k] = $this->_convertToArray($v);
+ } else {
+ $ret[$k] = $v;
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Fills object value from Array list
+ *
+ * @param $arr
+ * @return $this
+ */
+ public function fromArray($arr)
+ {
+
+ foreach ($arr as $k => $v) {
+ if (is_array($v)) {
+ $clazz = PPReflectionUtil::getPropertyClass(get_class($this), $k);
+
+ if (PPArrayUtil::isAssocArray($v)) {
+ /** @var self $o */
+ $o = new $clazz();
+ $o->fromArray($v);
+ $this->__set($k, $o);
+ } else {
+ $arr = array();
+ foreach ($v as $nk => $nv) {
+ if (is_array($nv)) {
+ $o = new $clazz();
+ $o->fromArray($nv);
+ $arr[$nk] = $o;
+ } else {
+ $arr[$nk] = $nv;
+ }
+ }
+ $this->__set($k, $arr);
+ }
+ } else {
+ $this->$k = $v;
+ }
+ }
+ return $this;
+ }
+
+ /**
+ * Fills object value from Json string
+ *
+ * @param $json
+ * @return $this
+ */
+ public function fromJson($json)
+ {
+ return $this->fromArray(json_decode($json, true));
+ }
+
+ /**
+ * Returns array representation of object
+ *
+ * @return array
+ */
+ public function toArray()
+ {
+ return $this->_convertToArray($this->_propMap);
+ }
+
+ /**
+ * Returns object JSON representation
+ *
+ * @param int $options http://php.net/manual/en/json.constants.php
+ * @return string
+ */
+ public function toJSON($options = 0)
+ {
+ return json_encode($this->toArray(), $options);
+ }
+}
\ No newline at end of file
diff --git a/lib/PayPal/Common/PPReflectionUtil.php b/lib/PayPal/Common/PPReflectionUtil.php
new file mode 100644
index 00000000..892bf3d0
--- /dev/null
+++ b/lib/PayPal/Common/PPReflectionUtil.php
@@ -0,0 +1,102 @@
+getDocComment(),
+ $annots,
+ PREG_PATTERN_ORDER)) {
+ return null;
+ }
+ foreach ($annots[1] as $i => $annot) {
+ $annotations[strtolower($annot)] = empty($annots[2][$i]) ? TRUE : rtrim($annots[2][$i], " \t\n\r)");
+ }
+
+ return $annotations;
+ }
+
+ /**
+ * preg_replace_callback callback function
+ *
+ * @param $match
+ * @return string
+ */
+ private static function replace_callback($match)
+ {
+ return ucwords($match[2]);
+ }
+}
diff --git a/lib/PayPal/Common/PPUserAgent.php b/lib/PayPal/Common/PPUserAgent.php
new file mode 100644
index 00000000..1ce56553
--- /dev/null
+++ b/lib/PayPal/Common/PPUserAgent.php
@@ -0,0 +1,59 @@
+ "30",
+ "http.Retry" => "5",
+ );
+
+ /**
+ * Singleton Object
+ *
+ * @var $this
+ */
+ private static $instance;
+
+ /**
+ * Private Constructor
+ */
+ private function __construct()
+ {
+ if (defined('PP_CONFIG_PATH')) {
+ $configFile = constant('PP_CONFIG_PATH') . '/sdk_config.ini';
+ } else {
+ $configFile = implode(DIRECTORY_SEPARATOR,
+ array(dirname(__FILE__), "..", "config", "sdk_config.ini"));
+ }
+ $this->addConfigFromIni($configFile);
+ }
+
+ /**
+ * Returns the singleton object
+ *
+ * @return $this
+ */
+ public static function getInstance()
+ {
+ if (!isset(self::$instance)) {
+ self::$instance = new self();
+ }
+ return self::$instance;
+ }
+
+ /**
+ * Add Configuration from configuration.ini files
+ *
+ * @param string $fileName
+ * @return $this
+ */
+ public function addConfigFromIni($fileName)
+ {
+ if ($configs = @parse_ini_file($fileName)) {
+ $this->addConfigs($configs);
+ }
+ return $this;
+ }
+
+ /**
+ * If a configuration exists in both arrays,
+ * then the element from the first array will be used and
+ * the matching key's element from the second array will be ignored.
+ *
+ * @param [] $config
+ * @return $this
+ */
+ public function addConfigs($configs = [])
+ {
+ $this->configs = $configs + $this->configs;
+ return $this;
+ }
+
+ /**
+ * Simple getter for configuration params
+ * If an exact match for key is not found,
+ * does a "contains" search on the key
+ *
+ * @param string $searchKey
+ * @return array
+ */
+ public function get($searchKey)
+ {
+
+ if (array_key_exists($searchKey, $this->configs)) {
+ return $this->configs[$searchKey];
+ } else {
+ $arr = array();
+ foreach ($this->configs as $k => $v) {
+ if (strstr($k, $searchKey)) {
+ $arr[$k] = $v;
+ }
+ }
+
+ return $arr;
+ }
+
+ }
+
+ /**
+ * Utility method for handling account configuration
+ * return config key corresponding to the API userId passed in
+ *
+ * If $userId is null, returns config keys corresponding to
+ * all configured accounts
+ *
+ * @param string|null $userId
+ * @return array|string
+ */
+ public function getIniPrefix($userId = null)
+ {
+
+ if ($userId == null) {
+ $arr = array();
+ foreach ($this->configs as $key => $value) {
+ $pos = strpos($key, '.');
+ if (strstr($key, "acct")) {
+ $arr[] = substr($key, 0, $pos);
+ }
+ }
+ return array_unique($arr);
+ } else {
+ $iniPrefix = array_search($userId, $this->configs);
+ $pos = strpos($iniPrefix, '.');
+ $acct = substr($iniPrefix, 0, $pos);
+
+ return $acct;
+ }
+ }
+
+ /**
+ * returns the config file hashmap
+ */
+ public function getConfigHashmap()
+ {
+ return $this->configs;
+ }
+
+ /**
+ * Disabling __clone call
+ */
+ public function __clone()
+ {
+ trigger_error('Clone is not allowed.', E_USER_ERROR);
+ }
+
+}
+
+
diff --git a/lib/PayPal/Core/PPConstants.php b/lib/PayPal/Core/PPConstants.php
new file mode 100644
index 00000000..2f97e224
--- /dev/null
+++ b/lib/PayPal/Core/PPConstants.php
@@ -0,0 +1,19 @@
+initCredential($config);
+ } catch (\Exception $e) {
+ $this->credentialHashmap = array();
+ throw $e;
+ }
+ }
+
+ /**
+ * Create singleton instance for this class.
+ *
+ * @param array|null $config
+ * @return PPCredentialManager
+ */
+ public static function getInstance($config = null)
+ {
+ if (!self::$instance) {
+ self::$instance = new self($config == null ? PPConfigManager::getInstance()->getConfigHashmap() : $config);
+ }
+ return self::$instance;
+ }
+
+ /**
+ * Load credentials for multiple accounts, with priority given to Signature credential.
+ *
+ * @param [] $config
+ */
+ private function initCredential($config)
+ {
+ $suffix = 1;
+ $prefix = "acct";
+
+ $arr = array();
+ foreach ($config as $k => $v) {
+ if (strstr($k, $prefix)) {
+ $arr[$k] = $v;
+ }
+ }
+ $credArr = $arr;
+
+ $arr = array();
+ foreach ($config as $key => $value) {
+ $pos = strpos($key, '.');
+ if (strstr($key, "acct")) {
+ $arr[] = substr($key, 0, $pos);
+ }
+ }
+ $arrayPartKeys = array_unique($arr);
+
+ $key = $prefix . $suffix;
+ $userName = null;
+ while (in_array($key, $arrayPartKeys)) {
+ if (isset($credArr[$key . ".ClientId"]) && isset($credArr[$key . ".ClientId"])) {
+ $userName = $key;
+ $this->credentialHashmap[$userName] = new OAuthTokenCredential(
+ $credArr[$key . ".ClientId"],
+ $credArr[$key . ".ClientSecret"]
+ );
+ }
+ if ($userName && $this->defaultAccountName == null) {
+ if (array_key_exists($key . '.UserName', $credArr)) {
+ $this->defaultAccountName = $credArr[$key . '.UserName'];
+ } else {
+ $this->defaultAccountName = $key;
+ }
+ }
+ $suffix++;
+ $key = $prefix . $suffix;
+ }
+
+ }
+
+ /**
+ * Sets credential object for users
+ *
+ * @param \PayPal\Auth\OAuthTokenCredential $credential
+ * @param string|null $userId User Id associated with the account
+ * @param bool $default If set, it would make it as a default credential for all requests
+ *
+ * @return $this
+ */
+ public function setCredentialObject(OAuthTokenCredential $credential, $userId = null, $default = true)
+ {
+ $key = $userId == null ? 'default' : $userId;
+ $this->credentialHashmap[$key] = $credential;
+ if ($default) {
+ $this->defaultAccountName = $key;
+ }
+ return $this;
+ }
+
+ /**
+ * Obtain Credential Object based on UserId provided.
+ *
+ * @param null $userId
+ * @return OAuthTokenCredential
+ * @throws PPInvalidCredentialException
+ */
+ public function getCredentialObject($userId = null)
+ {
+ if ($userId == null) {
+ $credObj = $this->credentialHashmap[$this->defaultAccountName];
+ } else if (array_key_exists($userId, $this->credentialHashmap)) {
+ $credObj = $this->credentialHashmap[$userId];
+ }
+
+ if (empty($credObj)) {
+ throw new PPInvalidCredentialException("Invalid userId $userId");
+ }
+ return $credObj;
+ }
+
+ /**
+ * Disabling __clone call
+ */
+ public function __clone()
+ {
+ trigger_error('Clone is not allowed.', E_USER_ERROR);
+ }
+
+}
diff --git a/lib/PayPal/Core/PPHttpConfig.php b/lib/PayPal/Core/PPHttpConfig.php
new file mode 100644
index 00000000..8c294cff
--- /dev/null
+++ b/lib/PayPal/Core/PPHttpConfig.php
@@ -0,0 +1,258 @@
+ 3,
+ CURLOPT_CONNECTTIMEOUT => 10,
+ CURLOPT_RETURNTRANSFER => TRUE,
+ CURLOPT_TIMEOUT => 60, // maximum number of seconds to allow cURL functions to execute
+ CURLOPT_USERAGENT => 'PayPal-PHP-SDK',
+ CURLOPT_HTTPHEADER => array(),
+ CURLOPT_SSL_VERIFYHOST => 2,
+ CURLOPT_SSL_VERIFYPEER => 1
+ );
+
+
+ const HEADER_SEPARATOR = ';';
+ const HTTP_GET = 'GET';
+ const HTTP_POST = 'POST';
+
+ private $headers = array();
+
+ private $curlOptions;
+
+ private $url;
+
+ private $method;
+
+ /***
+ * Number of times to retry a failed HTTP call
+ */
+ private $retryCount = 0;
+
+ /**
+ * Default Constructor
+ *
+ * @param string $url
+ * @param string $method HTTP method (GET, POST etc) defaults to POST
+ */
+ public function __construct($url = null, $method = self::HTTP_POST)
+ {
+ $this->url = $url;
+ $this->method = $method;
+ $this->curlOptions = self::$defaultCurlOptions;
+ }
+
+ /**
+ * Gets Url
+ *
+ * @return null|string
+ */
+ public function getUrl()
+ {
+ return $this->url;
+ }
+
+ /**
+ * Gets Method
+ *
+ * @return string
+ */
+ public function getMethod()
+ {
+ return $this->method;
+ }
+
+ /**
+ * Gets all Headers
+ *
+ * @return array
+ */
+ public function getHeaders()
+ {
+ return $this->headers;
+ }
+
+ /**
+ * Get Header by Name
+ *
+ * @param $name
+ * @return string|null
+ */
+ public function getHeader($name)
+ {
+ if (array_key_exists($name, $this->headers)) {
+ return $this->headers[$name];
+ }
+ return null;
+ }
+
+ /**
+ * Sets Url
+ *
+ * @param $url
+ */
+ public function setUrl($url)
+ {
+ $this->url = $url;
+ }
+
+ /**
+ * Set Headers
+ *
+ * @param array $headers
+ */
+ public function setHeaders(array $headers = [])
+ {
+ $this->headers = $headers;
+ }
+
+ /**
+ * Adds a Header
+ *
+ * @param $name
+ * @param $value
+ * @param bool $overWrite allows you to override header value
+ */
+ public function addHeader($name, $value, $overWrite = true)
+ {
+ if (!array_key_exists($name, $this->headers) || $overWrite) {
+ $this->headers[$name] = $value;
+ } else {
+ $this->headers[$name] = $this->headers[$name] . self::HEADER_SEPARATOR . $value;
+ }
+ }
+
+ /**
+ * Removes a Header
+ *
+ * @param $name
+ */
+ public function removeHeader($name)
+ {
+ unset($this->headers[$name]);
+ }
+
+ /**
+ * Gets all curl options
+ *
+ * @return array
+ */
+ public function getCurlOptions()
+ {
+ return $this->curlOptions;
+ }
+
+ /**
+ * Add Curl Option
+ *
+ * @param string $name
+ * @param mixed $value
+ */
+ public function addCurlOption($name, $value)
+ {
+ $this->curlOptions[$name] = $value;
+ }
+
+ /**
+ * Set Curl Options. Overrides all curl options
+ *
+ * @param $options
+ */
+ public function setCurlOptions($options)
+ {
+ $this->curlOptions = $options;
+ }
+
+ /**
+ * Set ssl parameters for certificate based client authentication
+ *
+ * @param $certPath
+ * @param null $passPhrase
+ */
+ public function setSSLCert($certPath, $passPhrase = null)
+ {
+ $this->curlOptions[CURLOPT_SSLCERT] = realpath($certPath);
+ if (isset($passPhrase) && trim($passPhrase) != "") {
+ $this->curlOptions[CURLOPT_SSLCERTPASSWD] = $passPhrase;
+ }
+ }
+
+ /**
+ * Set connection timeout in seconds
+ *
+ * @param integer $timeout
+ */
+ public function setHttpTimeout($timeout)
+ {
+ $this->curlOptions[CURLOPT_CONNECTTIMEOUT] = $timeout;
+ }
+
+ /**
+ * Set HTTP proxy information
+ *
+ * @param string $proxy
+ * @throws PPConfigurationException
+ */
+ public function setHttpProxy($proxy)
+ {
+ $urlParts = parse_url($proxy);
+ if ($urlParts == false || !array_key_exists("host", $urlParts)) {
+ throw new PPConfigurationException("Invalid proxy configuration " . $proxy);
+ }
+ $this->curlOptions[CURLOPT_PROXY] = $urlParts["host"];
+ if (isset($urlParts["port"])) {
+ $this->curlOptions[CURLOPT_PROXY] .= ":" . $urlParts["port"];
+ }
+ if (isset($urlParts["user"])) {
+ $this->curlOptions[CURLOPT_PROXYUSERPWD] = $urlParts["user"] . ":" . $urlParts["pass"];
+ }
+ }
+
+ /**
+ * Set Http Retry Counts
+ *
+ * @param int $retryCount
+ */
+ public function setHttpRetryCount($retryCount)
+ {
+ $this->retryCount = $retryCount;
+ }
+
+ /**
+ * Get Http Retry Counts
+ *
+ * @return int
+ */
+ public function getHttpRetryCount()
+ {
+ return $this->retryCount;
+ }
+
+ /**
+ * Sets the User-Agent string on the HTTP request
+ *
+ * @param string $userAgentString
+ */
+ public function setUserAgent($userAgentString)
+ {
+ $this->curlOptions[CURLOPT_USERAGENT] = $userAgentString;
+ }
+}
diff --git a/lib/PayPal/Core/PPHttpConnection.php b/lib/PayPal/Core/PPHttpConnection.php
new file mode 100644
index 00000000..6be52020
--- /dev/null
+++ b/lib/PayPal/Core/PPHttpConnection.php
@@ -0,0 +1,171 @@
+httpConfig = $httpConfig;
+ $this->logger = new PPLoggingManager(__CLASS__, $config);
+ }
+
+ /**
+ * Gets all Http Headers
+ *
+ * @return array
+ */
+ private function getHttpHeaders()
+ {
+
+ $ret = array();
+ foreach ($this->httpConfig->getHeaders() as $k => $v) {
+ $ret[] = "$k: $v";
+ }
+ return $ret;
+ }
+
+ /**
+ * Executes an HTTP request
+ *
+ * @param string $data query string OR POST content as a string
+ * @throws PPConnectionException
+ */
+ /**
+ * Executes an HTTP request
+ *
+ * @param string $data query string OR POST content as a string
+ * @return mixed
+ * @throws PPConnectionException
+ */
+ public function execute($data)
+ {
+ //Initialize the logger
+ $this->logger->fine("Connecting to " . $this->httpConfig->getUrl());
+ $this->logger->fine("Payload " . $data);
+
+ //Initialize Curl Options
+ $ch = curl_init($this->httpConfig->getUrl());
+ curl_setopt_array($ch, $this->httpConfig->getCurlOptions());
+ curl_setopt($ch, CURLOPT_URL, $this->httpConfig->getUrl());
+ curl_setopt($ch, CURLOPT_HEADER, false);
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $this->getHttpHeaders());
+
+ //Determine Curl Options based on Method
+ switch ($this->httpConfig->getMethod()) {
+ case 'POST':
+ curl_setopt($ch, CURLOPT_POST, true);
+ case 'PUT':
+ case 'PATCH':
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
+ break;
+ }
+ //Default Option if Method not of given types in switch case
+ if ($this->httpConfig->getMethod() != NULL) {
+ curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->httpConfig->getMethod());
+ }
+
+ //Logging Each Headers for debugging purposes
+ foreach ($this->getHttpHeaders() as $header) {
+ //TODO: Strip out credentials and other secure info when logging.
+ $this->logger->info("Adding header $header");
+ }
+
+ //Execute Curl Request
+ $result = curl_exec($ch);
+
+ //Retry if Certificate Exception
+ if (curl_errno($ch) == 60) {
+ $this->logger->info("Invalid or no certificate authority found - Retrying using bundled CA certs file");
+ curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
+ $result = curl_exec($ch);
+ }
+
+ //Retrieve Response Status
+ $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+
+ //Retry if Failing
+ $retries = 0;
+ if (in_array($httpStatus, self::$retryCodes) && $this->httpConfig->getHttpRetryCount() != null) {
+ $this->logger->info("Got $httpStatus response from server. Retrying");
+ do {
+ $result = curl_exec($ch);
+ $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+ } while (in_array($httpStatus, self::$retryCodes) && (++$retries < $this->httpConfig->getHttpRetryCount()));
+ }
+
+ //Throw Exception if Retries and Certificates doenst work
+ if (curl_errno($ch)) {
+ $ex = new PPConnectionException(
+ $this->httpConfig->getUrl(),
+ curl_error($ch),
+ curl_errno($ch)
+ );
+ curl_close($ch);
+ throw $ex;
+ }
+
+ //Close the curl request
+ curl_close($ch);
+
+ //More Exceptions based on HttpStatus Code
+ if (in_array($httpStatus, self::$retryCodes)) {
+ $ex = new PPConnectionException(
+ $this->httpConfig->getUrl(),
+ "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}. " .
+ "Retried $retries times."
+ );
+ $ex->setData($result);
+ throw $ex;
+ } else if ($httpStatus < 200 || $httpStatus >= 300) {
+ $ex = new PPConnectionException(
+ $this->httpConfig->getUrl(),
+ "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}."
+ );
+ $ex->setData($result);
+ throw $ex;
+ }
+
+ //Return result object
+ return $result;
+ }
+
+}
diff --git a/lib/PayPal/Core/PPLoggingLevel.php b/lib/PayPal/Core/PPLoggingLevel.php
new file mode 100644
index 00000000..af592872
--- /dev/null
+++ b/lib/PayPal/Core/PPLoggingLevel.php
@@ -0,0 +1,23 @@
+loggerName = $loggerName;
+ $config = PPConfigManager::getInstance()->getConfigHashmap();
+
+ $this->isLoggingEnabled = (array_key_exists('log.LogEnabled', $config) && $config['log.LogEnabled'] == '1');
+
+ if ($this->isLoggingEnabled) {
+ $this->loggerFile = ($config['log.FileName']) ? $config['log.FileName'] : ini_get('error_log');
+ $loggingLevel = strtoupper($config['log.LogLevel']);
+ $this->loggingLevel =
+ (isset($loggingLevel) && defined(__NAMESPACE__ . "\\PPLoggingLevel::$loggingLevel")) ?
+ constant(__NAMESPACE__ . "\\PPLoggingLevel::$loggingLevel") :
+ PPLoggingManager::DEFAULT_LOGGING_LEVEL;
+ }
+ }
+
+ /**
+ * Default Logger
+ *
+ * @param string $message
+ * @param int $level
+ */
+ private function log($message, $level = PPLoggingLevel::INFO)
+ {
+ if ($this->isLoggingEnabled && ($level <= $this->loggingLevel)) {
+ error_log($this->loggerName . ": $message\n", 3, $this->loggerFile);
+ }
+ }
+
+ /**
+ * Log Error
+ *
+ * @param string $message
+ */
+ public function error($message)
+ {
+ $this->log($message, PPLoggingLevel::ERROR);
+ }
+
+ /**
+ * Log Warning
+ *
+ * @param string $message
+ */
+ public function warning($message)
+ {
+ $this->log($message, PPLoggingLevel::WARN);
+ }
+
+ /**
+ * Log Info
+ *
+ * @param string $message
+ */
+ public function info($message)
+ {
+ $this->log($message, PPLoggingLevel::INFO);
+ }
+
+ /**
+ * Log Fine
+ *
+ * @param string $message
+ */
+ public function fine($message)
+ {
+ $this->log($message, PPLoggingLevel::FINE);
+ }
+
+}
diff --git a/lib/PayPal/Exception/PPConfigurationException.php b/lib/PayPal/Exception/PPConfigurationException.php
new file mode 100644
index 00000000..b17d2eb7
--- /dev/null
+++ b/lib/PayPal/Exception/PPConfigurationException.php
@@ -0,0 +1,23 @@
+url = $url;
+ }
+
+ /**
+ * Sets Data
+ *
+ * @param $data
+ */
+ public function setData($data)
+ {
+ $this->data = $data;
+ }
+
+ /**
+ * Gets Data
+ *
+ * @return string
+ */
+ public function getData()
+ {
+ return $this->data;
+ }
+
+ /**
+ * Gets Url
+ *
+ * @return string
+ */
+ public function getUrl()
+ {
+ return $this->url;
+ }
+}
\ No newline at end of file
diff --git a/lib/PayPal/Exception/PPInvalidCredentialException.php b/lib/PayPal/Exception/PPInvalidCredentialException.php
new file mode 100644
index 00000000..71b6f59f
--- /dev/null
+++ b/lib/PayPal/Exception/PPInvalidCredentialException.php
@@ -0,0 +1,36 @@
+getLine() . ' in ' . $this->getFile()
+ . ': ' . $this->getMessage() . ' ';
+ return $errorMsg;
+ }
+
+}
\ No newline at end of file
diff --git a/lib/PayPal/Exception/PPMissingCredentialException.php b/lib/PayPal/Exception/PPMissingCredentialException.php
new file mode 100644
index 00000000..a5ecae91
--- /dev/null
+++ b/lib/PayPal/Exception/PPMissingCredentialException.php
@@ -0,0 +1,37 @@
+getLine() . ' in ' . $this->getFile()
+ . ': ' . $this->getMessage() . ' ';
+
+ return $errorMsg;
+ }
+
+}
\ No newline at end of file
diff --git a/lib/PayPal/Handler/IPPHandler.php b/lib/PayPal/Handler/IPPHandler.php
new file mode 100644
index 00000000..dc57589f
--- /dev/null
+++ b/lib/PayPal/Handler/IPPHandler.php
@@ -0,0 +1,20 @@
+credential == null) {
+ return PPCredentialManager::getInstance()->getCredentialObject();
+ }
return $this->credential;
}
@@ -58,16 +65,46 @@ public function getrequestId()
* @param \PayPal\Auth\OAuthTokenCredential $credential
* @param string|null $requestId
*/
- public function __construct($credential, $requestId = null)
+ public function __construct($credential = null, $requestId = null)
{
- $this->credential = $credential;
$this->requestId = $requestId;
+ $this->credential = $credential;
+ }
+
+ /**
+ * Sets Config
+ *
+ * @param array $config SDK configuration parameters
+ */
+ public function setConfig(array $config)
+ {
+ PPConfigManager::getInstance()->addConfigs($config);
+ }
+
+ /**
+ * Gets Configurations
+ *
+ * @return array
+ */
+ public function getConfig()
+ {
+ return PPConfigManager::getInstance()->getConfigHashmap();
+ }
+
+ /**
+ * Gets a specific configuration from key
+ *
+ * @param $searchKey
+ */
+ public function get($searchKey)
+ {
+ PPConfigManager::getInstance()->get($searchKey);
}
/**
* Generates a unique per request id that
* can be used to set the PayPal-Request-Id header
- * that is used for idemptency
+ * that is used for idempotency
*
* @return string
*/
diff --git a/lib/PayPal/Rest/IResource.php b/lib/PayPal/Rest/IResource.php
index 0f762f04..281ac470 100644
--- a/lib/PayPal/Rest/IResource.php
+++ b/lib/PayPal/Rest/IResource.php
@@ -4,6 +4,8 @@
/**
* Interface IResource
+ *
+ * @package PayPal\Rest
*/
interface IResource
{
diff --git a/lib/PayPal/Rest/RestHandler.php b/lib/PayPal/Rest/RestHandler.php
index 9331d6ea..63bfe439 100644
--- a/lib/PayPal/Rest/RestHandler.php
+++ b/lib/PayPal/Rest/RestHandler.php
@@ -51,14 +51,13 @@ public function __construct($apiContext)
}
/**
- * Handle
- *
- * @param \PayPal\Core\PPHttpConfig $httpConfig
- * @param \PayPal\Core\PPRequest $request
- * @param array $options
- *
- * @throws \PayPal\Exception\PPInvalidCredentialException
- * @throws \PayPal\Exception\PPMissingCredentialException
+ * @param \Paypal\Core\PPHttpConfig $httpConfig
+ * @param string $request
+ * @param mixed $options
+ * @return mixed|void
+ * @throws PPConfigurationException
+ * @throws PPInvalidCredentialException
+ * @throws PPMissingCredentialException
*/
public function handle($httpConfig, $request, $options)
{
@@ -125,7 +124,9 @@ private function _getEndpoint($config)
break;
}
} else {
- throw new PPConfigurationException('You must set one of service.endpoint or mode parameters in your configuration');
+ throw new PPConfigurationException(
+ 'You must set one of service.endpoint or mode parameters in your configuration'
+ );
}
}
}
diff --git a/lib/PayPal/Transport/PPRestCall.php b/lib/PayPal/Transport/PPRestCall.php
new file mode 100644
index 00000000..c23fe222
--- /dev/null
+++ b/lib/PayPal/Transport/PPRestCall.php
@@ -0,0 +1,78 @@
+apiContext = $apiContext;
+ $this->logger = new PPLoggingManager(__CLASS__, $apiContext->getConfig());
+ }
+
+ /**
+ * @param array $handlers Array of handlers
+ * @param string $path Resource path relative to base service endpoint
+ * @param string $method HTTP method - one of GET, POST, PUT, DELETE, PATCH etc
+ * @param string $data Request payload
+ * @param array $headers HTTP headers
+ * @return mixed
+ * @throws \PayPal\Exception\PPConnectionException
+ */
+ public function execute($handlers = [], $path, $method, $data = '', $headers = array())
+ {
+
+ $config = $this->apiContext->getConfig();
+ $httpConfig = new PPHttpConfig(null, $method);
+ $httpConfig->setHeaders($headers +
+ array(
+ 'Content-Type' => 'application/json'
+ )
+ );
+
+ /** @var \Paypal\Handler\IPPHandler $handler */
+ foreach ($handlers as $handler) {
+ if (!is_object($handler)) {
+ $fullHandler = "\\" . (string)$handler;
+ $handler = new $fullHandler($this->apiContext);
+ }
+ $handler->handle($httpConfig, $data, array('path' => $path, 'apiContext' => $this->apiContext));
+ }
+ $connection = new PPHttpConnection($httpConfig, $config);
+ $response = $connection->execute($data);
+ $this->logger->fine($response);
+
+ return $response;
+ }
+
+}
diff --git a/release_notes.md b/release_notes.md
index d7b9089e..d4dc3975 100644
--- a/release_notes.md
+++ b/release_notes.md
@@ -1,6 +1,11 @@
PayPal PHP SDK release notes
============================
+v0.11.1
+----
+* Removed Dependency from SDK Core Project
+* Enabled Future Payments
+
v0.11.0
----
* Ability for PUT and PATCH requests
@@ -25,7 +30,7 @@ v0.7.0
-----
* Added support for Auth and Capture APIs
* Types modified to match the API Spec
-* Updated SDK to use namespace supported core library
+* Updated SDK to use namespace supported core library
v0.6.0
-----
@@ -34,4 +39,4 @@ v0.6.0
v0.5.0
-----
-* Initial Release
\ No newline at end of file
+* Initial Release
diff --git a/sample/bootstrap.php b/sample/bootstrap.php
index 8352f536..12b0abfa 100644
--- a/sample/bootstrap.php
+++ b/sample/bootstrap.php
@@ -6,13 +6,12 @@
// Include the composer autoloader
// The location of your project's vendor autoloader.
$composerAutoload = dirname(dirname(dirname(__DIR__))) . '/autoload.php';
-if (!file_exists($composerAutoload))
-{
+if (!file_exists($composerAutoload)) {
//If the project is used as its own project, it would use rest-api-sdk-php composer autoloader.
- $composerAutoload = dirname(__DIR__) .'/vendor/autoload.php';
+ $composerAutoload = dirname(__DIR__) . '/vendor/autoload.php';
- if(!file_exists($composerAutoload)) {
+ if (!file_exists($composerAutoload)) {
echo "The 'vendor' folder is missing. You must run 'composer update' to resolve application dependencies.\nPlease see the README for more information.\n";
exit(1);
}
@@ -32,46 +31,46 @@
*
* @return PayPal\Rest\ApiContext
*/
-function getApiContext() {
-
- // ### Api context
- // Use an ApiContext object to authenticate
- // API calls. The clientId and clientSecret for the
- // OAuthTokenCredential class can be retrieved from
- // developer.paypal.com
+function getApiContext()
+{
+
+ // ### Api context
+ // Use an ApiContext object to authenticate
+ // API calls. The clientId and clientSecret for the
+ // OAuthTokenCredential class can be retrieved from
+ // developer.paypal.com
- $apiContext = new ApiContext(
- new OAuthTokenCredential(
- 'EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM',
- 'EO422dn3gQLgDbuwqTjzrFgFtaRLRR5BdHEESmha49TM'
- )
- );
+ $apiContext = new ApiContext(
+ new OAuthTokenCredential(
+ 'EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM',
+ 'EO422dn3gQLgDbuwqTjzrFgFtaRLRR5BdHEESmha49TM'
+ )
+ );
+ // #### SDK configuration
- // #### SDK configuration
-
- // Comment this line out and uncomment the PP_CONFIG_PATH
- // 'define' block if you want to use static file
- // based configuration
+ // Comment this line out and uncomment the PP_CONFIG_PATH
+ // 'define' block if you want to use static file
+ // based configuration
- $apiContext->setConfig(
- array(
- 'mode' => 'sandbox',
- 'http.ConnectionTimeOut' => 30,
- 'log.LogEnabled' => true,
- 'log.FileName' => '../PayPal.log',
- 'log.LogLevel' => 'FINE'
- )
- );
-
- /*
- // Register the sdk_config.ini file in current directory
- // as the configuration source.
- if(!defined("PP_CONFIG_PATH")) {
- define("PP_CONFIG_PATH", __DIR__);
- }
- */
+ $apiContext->setConfig(
+ array(
+ 'mode' => 'sandbox',
+ 'http.ConnectionTimeOut' => 30,
+ 'log.LogEnabled' => true,
+ 'log.FileName' => '../PayPal.log',
+ 'log.LogLevel' => 'FINE'
+ )
+ );
+
+ /*
+ // Register the sdk_config.ini file in current directory
+ // as the configuration source.
+ if(!defined("PP_CONFIG_PATH")) {
+ define("PP_CONFIG_PATH", __DIR__);
+ }
+ */
- return $apiContext;
+ return $apiContext;
}
diff --git a/sample/source/assets/behavior.js b/sample/doc/assets/behavior.js
similarity index 71%
rename from sample/source/assets/behavior.js
rename to sample/doc/assets/behavior.js
index 8f217e10..364695fa 100644
--- a/sample/source/assets/behavior.js
+++ b/sample/doc/assets/behavior.js
@@ -6,318 +6,1387 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3
tableOfContents = [
{
- "type": "file",
+ "type": "folder",
"data": {
- "language": {
- "nameMatchers": [{}, ".fbp"],
- "pygmentsLexer": "php",
- "singleLineComment": ["//"],
- "ignorePrefix": "}",
- "foldPrefix": "^",
- "name": "PHP"
- },
- "projectPath": "CreatePayment.php",
- "targetPath": "CreatePayment",
- "pageTitle": "CreatePayment",
- "title": "CreatePayment"
+ "path": "invoice",
+ "title": "invoice"
},
"depth": 1,
- "outline": [
+ "children": [
{
- "type": "heading",
+ "type": "file",
"data": {
- "level": 1,
- "title": "CreatePaymentSample",
- "slug": "createpaymentsample"
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/invoice/CancelInvoice.php",
+ "projectPath": "sample/invoice/CancelInvoice.php",
+ "targetPath": "invoice/CancelInvoice",
+ "pageTitle": "invoice/CancelInvoice",
+ "title": "CancelInvoice"
},
- "depth": 1,
- "children": [
+ "depth": 2,
+ "outline": [
{
"type": "heading",
"data": {
- "level": 3,
- "title": "CreditCard",
- "slug": "creditcard"
+ "level": 1,
+ "title": "Cancel Invoice Sample",
+ "slug": "cancel-invoice-sample"
},
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "FundingInstrument",
- "slug": "fundinginstrument"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Payer",
- "slug": "payer"
- },
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Itemized information",
- "slug": "itemized-information"
- },
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve Invoice",
+ "slug": "retrieve-invoice"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Cancel Notification Object",
+ "slug": "cancel-notification-object"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Cancel Invoice",
+ "slug": "cancel-invoice"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/invoice/CreateInvoice.php",
+ "projectPath": "sample/invoice/CreateInvoice.php",
+ "targetPath": "invoice/CreateInvoice",
+ "pageTitle": "invoice/CreateInvoice",
+ "title": "CreateInvoice"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Additional payment details",
- "slug": "additional-payment-details"
+ "level": 1,
+ "title": "Create Invoice Sample",
+ "slug": "create-invoice-sample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Invoice Info",
+ "slug": "invoice-info"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Merchant Info",
+ "slug": "merchant-info"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Address Information",
+ "slug": "address-information"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Billing Information",
+ "slug": "billing-information"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Items List",
+ "slug": "items-list"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Shipping Information",
+ "slug": "shipping-information"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Create Invoice",
+ "slug": "create-invoice"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/invoice/GetInvoice.php",
+ "projectPath": "sample/invoice/GetInvoice.php",
+ "targetPath": "invoice/GetInvoice",
+ "pageTitle": "invoice/GetInvoice",
+ "title": "GetInvoice"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Amount",
- "slug": "amount"
+ "level": 1,
+ "title": "Get Invoice Sample",
+ "slug": "get-invoice-sample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve Invoice",
+ "slug": "retrieve-invoice"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/invoice/ListInvoice.php",
+ "projectPath": "sample/invoice/ListInvoice.php",
+ "targetPath": "invoice/ListInvoice",
+ "pageTitle": "invoice/ListInvoice",
+ "title": "ListInvoice"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Transaction",
- "slug": "transaction"
+ "level": 1,
+ "title": "List Invoices Sample",
+ "slug": "list-invoices-sample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve Invoices",
+ "slug": "retrieve-invoices"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/invoice/RemindInvoice.php",
+ "projectPath": "sample/invoice/RemindInvoice.php",
+ "targetPath": "invoice/RemindInvoice",
+ "pageTitle": "invoice/RemindInvoice",
+ "title": "RemindInvoice"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Payment",
- "slug": "payment"
+ "level": 1,
+ "title": "Remind Invoice Sample",
+ "slug": "remind-invoice-sample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve Invoice",
+ "slug": "retrieve-invoice"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Notification Object",
+ "slug": "notification-object"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Remind Invoice",
+ "slug": "remind-invoice"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/invoice/SendInvoice.php",
+ "projectPath": "sample/invoice/SendInvoice.php",
+ "targetPath": "invoice/SendInvoice",
+ "pageTitle": "invoice/SendInvoice",
+ "title": "SendInvoice"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Create Payment",
- "slug": "create-payment"
+ "level": 1,
+ "title": "Create Invoice Sample",
+ "slug": "create-invoice-sample"
},
- "depth": 3
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve Invoice",
+ "slug": "retrieve-invoice"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Send Invoice",
+ "slug": "send-invoice"
+ },
+ "depth": 3
+ }
+ ]
}
]
}
]
}, {
- "type": "file",
+ "type": "folder",
"data": {
- "language": {
- "nameMatchers": [{}, ".fbp"],
- "pygmentsLexer": "php",
- "singleLineComment": ["//"],
- "ignorePrefix": "}",
- "foldPrefix": "^",
- "name": "PHP"
- },
- "projectPath": "CreatePaymentUsingPayPal.php",
- "targetPath": "CreatePaymentUsingPayPal",
- "pageTitle": "CreatePaymentUsingPayPal",
- "title": "CreatePaymentUsingPayPal"
+ "path": "payments",
+ "title": "payments"
},
"depth": 1,
- "outline": [
+ "children": [
{
- "type": "heading",
+ "type": "file",
"data": {
- "level": 1,
- "title": "Create Payment using PayPal as payment method",
- "slug": "create-payment-using-paypal-as-payment-method"
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/AuthorizationCapture.php",
+ "projectPath": "sample/payments/AuthorizationCapture.php",
+ "targetPath": "payments/AuthorizationCapture",
+ "pageTitle": "payments/AuthorizationCapture",
+ "title": "AuthorizationCapture"
},
- "depth": 1,
- "children": [
+ "depth": 2,
+ "outline": [
{
"type": "heading",
"data": {
- "level": 3,
- "title": "Payer",
- "slug": "payer"
+ "level": 1,
+ "title": "AuthorizationCapture",
+ "slug": "authorizationcapture"
},
- "depth": 3
- }, {
- "type": "heading",
- "data": {
- "level": 3,
- "title": "Itemized information",
- "slug": "itemized-information"
- },
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Capture Payment",
+ "slug": "capture-payment"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/CreateFuturePayment.php",
+ "projectPath": "sample/payments/CreateFuturePayment.php",
+ "targetPath": "payments/CreateFuturePayment",
+ "pageTitle": "payments/CreateFuturePayment",
+ "title": "CreateFuturePayment"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Additional payment details",
- "slug": "additional-payment-details"
+ "level": 1,
+ "title": "Create Payment using PayPal as payment method",
+ "slug": "create-payment-using-paypal-as-payment-method"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Payer",
+ "slug": "payer"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Amount",
+ "slug": "amount"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Transaction",
+ "slug": "transaction"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Redirect urls",
+ "slug": "redirect-urls"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Payment",
+ "slug": "payment"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Get Refresh Token",
+ "slug": "get-refresh-token"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Create Future Payment",
+ "slug": "create-future-payment"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/CreatePayment.php",
+ "projectPath": "sample/payments/CreatePayment.php",
+ "targetPath": "payments/CreatePayment",
+ "pageTitle": "payments/CreatePayment",
+ "title": "CreatePayment"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Amount",
- "slug": "amount"
+ "level": 1,
+ "title": "CreatePaymentSample",
+ "slug": "createpaymentsample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "CreditCard",
+ "slug": "creditcard"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "FundingInstrument",
+ "slug": "fundinginstrument"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Payer",
+ "slug": "payer"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Itemized information",
+ "slug": "itemized-information"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Additional payment details",
+ "slug": "additional-payment-details"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Amount",
+ "slug": "amount"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Transaction",
+ "slug": "transaction"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Payment",
+ "slug": "payment"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Create Payment",
+ "slug": "create-payment"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/CreatePaymentUsingPayPal.php",
+ "projectPath": "sample/payments/CreatePaymentUsingPayPal.php",
+ "targetPath": "payments/CreatePaymentUsingPayPal",
+ "pageTitle": "payments/CreatePaymentUsingPayPal",
+ "title": "CreatePaymentUsingPayPal"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Transaction",
- "slug": "transaction"
+ "level": 1,
+ "title": "Create Payment using PayPal as payment method",
+ "slug": "create-payment-using-paypal-as-payment-method"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Payer",
+ "slug": "payer"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Itemized information",
+ "slug": "itemized-information"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Additional payment details",
+ "slug": "additional-payment-details"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Amount",
+ "slug": "amount"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Transaction",
+ "slug": "transaction"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Redirect urls",
+ "slug": "redirect-urls"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Payment",
+ "slug": "payment"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Create Payment",
+ "slug": "create-payment"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Get redirect url",
+ "slug": "get-redirect-url"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Redirect buyer to PayPal website",
+ "slug": "redirect-buyer-to-paypal-website"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/CreatePaymentUsingSavedCard.php",
+ "projectPath": "sample/payments/CreatePaymentUsingSavedCard.php",
+ "targetPath": "payments/CreatePaymentUsingSavedCard",
+ "pageTitle": "payments/CreatePaymentUsingSavedCard",
+ "title": "CreatePaymentUsingSavedCard"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Redirect urls",
- "slug": "redirect-urls"
+ "level": 1,
+ "title": "Create payment using a saved credit card",
+ "slug": "create-payment-using-a-saved-credit-card"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Credit card token",
+ "slug": "credit-card-token"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "FundingInstrument",
+ "slug": "fundinginstrument"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Payer",
+ "slug": "payer"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Itemized information",
+ "slug": "itemized-information"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Additional payment details",
+ "slug": "additional-payment-details"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Amount",
+ "slug": "amount"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Transaction",
+ "slug": "transaction"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Payment",
+ "slug": "payment"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Create Payment",
+ "slug": "create-payment"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/ExecutePayment.php",
+ "projectPath": "sample/payments/ExecutePayment.php",
+ "targetPath": "payments/ExecutePayment",
+ "pageTitle": "payments/ExecutePayment",
+ "title": "ExecutePayment"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Payment",
- "slug": "payment"
+ "level": 1,
+ "title": "Execute Payment Sample",
+ "slug": "execute-payment-sample"
},
- "depth": 3
- }, {
+ "depth": 1
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/GetAuthorization.php",
+ "projectPath": "sample/payments/GetAuthorization.php",
+ "targetPath": "payments/GetAuthorization",
+ "pageTitle": "payments/GetAuthorization",
+ "title": "GetAuthorization"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Create Payment",
- "slug": "create-payment"
+ "level": 1,
+ "title": "GetAuthorization",
+ "slug": "getauthorization"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "GetAuthorization",
+ "slug": "getauthorization"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/GetCapture.php",
+ "projectPath": "sample/payments/GetCapture.php",
+ "targetPath": "payments/GetCapture",
+ "pageTitle": "payments/GetCapture",
+ "title": "GetCapture"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Get redirect url",
- "slug": "get-redirect-url"
+ "level": 1,
+ "title": "GetCapture",
+ "slug": "getcapture"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Create a mock Capture",
+ "slug": "create-a-mock-capture"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve Capture details",
+ "slug": "retrieve-capture-details"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/GetPayment.php",
+ "projectPath": "sample/payments/GetPayment.php",
+ "targetPath": "payments/GetPayment",
+ "pageTitle": "payments/GetPayment",
+ "title": "GetPayment"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Redirect buyer to PayPal website",
- "slug": "redirect-buyer-to-paypal-website"
+ "level": 1,
+ "title": "GetPaymentSample",
+ "slug": "getpaymentsample"
},
- "depth": 3
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve payment",
+ "slug": "retrieve-payment"
+ },
+ "depth": 3
+ }
+ ]
}
]
- }
- ]
- }, {
- "type": "file",
- "data": {
- "language": {
- "nameMatchers": [{}, ".fbp"],
- "pygmentsLexer": "php",
- "singleLineComment": ["//"],
- "ignorePrefix": "}",
- "foldPrefix": "^",
- "name": "PHP"
- },
- "projectPath": "CreatePaymentUsingSavedCard.php",
- "targetPath": "CreatePaymentUsingSavedCard",
- "pageTitle": "CreatePaymentUsingSavedCard",
- "title": "CreatePaymentUsingSavedCard"
- },
- "depth": 1,
- "outline": [
- {
- "type": "heading",
+ }, {
+ "type": "file",
"data": {
- "level": 1,
- "title": "Create payment using a saved credit card",
- "slug": "create-payment-using-a-saved-credit-card"
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/ListPayments.php",
+ "projectPath": "sample/payments/ListPayments.php",
+ "targetPath": "payments/ListPayments",
+ "pageTitle": "payments/ListPayments",
+ "title": "ListPayments"
},
- "depth": 1,
- "children": [
+ "depth": 2,
+ "outline": [
{
"type": "heading",
"data": {
- "level": 3,
- "title": "Credit card token",
- "slug": "credit-card-token"
+ "level": 1,
+ "title": "GetPaymentList",
+ "slug": "getpaymentlist"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve payment",
+ "slug": "retrieve-payment"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/Reauthorization.php",
+ "projectPath": "sample/payments/Reauthorization.php",
+ "targetPath": "payments/Reauthorization",
+ "pageTitle": "payments/Reauthorization",
+ "title": "Reauthorization"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "FundingInstrument",
- "slug": "fundinginstrument"
+ "level": 2,
+ "title": "Reauthorization Sample",
+ "slug": "reauthorization-sample"
},
- "depth": 3
- }, {
+ "depth": 2,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Reauthorization",
+ "slug": "reauthorization"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Lookup authorization using the authorization id",
+ "slug": "lookup-authorization-using-the-authorization-id"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Reauthorize with amount being reauthorized",
+ "slug": "reauthorize-with-amount-being-reauthorized"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/RefundCapture.php",
+ "projectPath": "sample/payments/RefundCapture.php",
+ "targetPath": "payments/RefundCapture",
+ "pageTitle": "payments/RefundCapture",
+ "title": "RefundCapture"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Payer",
- "slug": "payer"
+ "level": 1,
+ "title": "Refund Capture Sample",
+ "slug": "refund-capture-sample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Capture",
+ "slug": "capture"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Refund",
+ "slug": "refund"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/payments/VoidAuthorization.php",
+ "projectPath": "sample/payments/VoidAuthorization.php",
+ "targetPath": "payments/VoidAuthorization",
+ "pageTitle": "payments/VoidAuthorization",
+ "title": "VoidAuthorization"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Itemized information",
- "slug": "itemized-information"
+ "level": 1,
+ "title": "VoidAuthorization",
+ "slug": "voidauthorization"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "VoidAuthorization",
+ "slug": "voidauthorization"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "folder",
+ "data": {
+ "path": "sale",
+ "title": "sale"
+ },
+ "depth": 1,
+ "children": [
+ {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/sale/GetSale.php",
+ "projectPath": "sample/sale/GetSale.php",
+ "targetPath": "sale/GetSale",
+ "pageTitle": "sale/GetSale",
+ "title": "GetSale"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Additional payment details",
- "slug": "additional-payment-details"
+ "level": 1,
+ "title": "Get Sale sample",
+ "slug": "get-sale-sample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Retrieve the sale object",
+ "slug": "retrieve-the-sale-object"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/sale/RefundSale.php",
+ "projectPath": "sample/sale/RefundSale.php",
+ "targetPath": "sale/RefundSale",
+ "pageTitle": "sale/RefundSale",
+ "title": "RefundSale"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Amount",
- "slug": "amount"
+ "level": 1,
+ "title": "Sale Refund Sample",
+ "slug": "sale-refund-sample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Refund amount",
+ "slug": "refund-amount"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Refund object",
+ "slug": "refund-object"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Sale",
+ "slug": "sale"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "folder",
+ "data": {
+ "path": "vault",
+ "title": "vault"
+ },
+ "depth": 1,
+ "children": [
+ {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/vault/CreateCreditCard.php",
+ "projectPath": "sample/vault/CreateCreditCard.php",
+ "targetPath": "vault/CreateCreditCard",
+ "pageTitle": "vault/CreateCreditCard",
+ "title": "CreateCreditCard"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Transaction",
- "slug": "transaction"
+ "level": 1,
+ "title": "Create Credit Card Sample",
+ "slug": "create-credit-card-sample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "CreditCard",
+ "slug": "creditcard"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Save card",
+ "slug": "save-card"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/vault/DeleteCreditCard.php",
+ "projectPath": "sample/vault/DeleteCreditCard.php",
+ "targetPath": "vault/DeleteCreditCard",
+ "pageTitle": "vault/DeleteCreditCard",
+ "title": "DeleteCreditCard"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Payment",
- "slug": "payment"
+ "level": 1,
+ "title": "Delete CreditCard Sample",
+ "slug": "delete-creditcard-sample"
},
- "depth": 3
- }, {
+ "depth": 1,
+ "children": [
+ {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "CreditCard",
+ "slug": "creditcard"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Save card",
+ "slug": "save-card"
+ },
+ "depth": 3
+ }, {
+ "type": "heading",
+ "data": {
+ "level": 3,
+ "title": "Delete Card",
+ "slug": "delete-card"
+ },
+ "depth": 3
+ }
+ ]
+ }
+ ]
+ }, {
+ "type": "file",
+ "data": {
+ "language": {
+ "nameMatchers": [{}, ".fbp"],
+ "pygmentsLexer": "php",
+ "singleLineComment": ["//"],
+ "ignorePrefix": "}",
+ "foldPrefix": "^",
+ "name": "PHP"
+ },
+ "sourcePath": "/Users/japatel/Documents/workspace/Server-SDK/rest-api-sdk-php/sample/vault/GetCreditCard.php",
+ "projectPath": "sample/vault/GetCreditCard.php",
+ "targetPath": "vault/GetCreditCard",
+ "pageTitle": "vault/GetCreditCard",
+ "title": "GetCreditCard"
+ },
+ "depth": 2,
+ "outline": [
+ {
"type": "heading",
"data": {
- "level": 3,
- "title": "Create Payment",
- "slug": "create-payment"
+ "level": 1,
+ "title": "Get Credit Card Sample",
+ "slug": "get-credit-card-sample"
},
- "depth": 3
+ "depth": 1
}
]
}
diff --git a/sample/doc/assets/style.css b/sample/doc/assets/style.css
new file mode 100644
index 00000000..f9e0d437
--- /dev/null
+++ b/sample/doc/assets/style.css
@@ -0,0 +1 @@
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}html,body{height:100%}#document{min-height:100%}body{max-width:33em}.segment{padding:0.5em 0 0.5em 33em;white-space:nowrap}.segment:first-child{padding-top:4.1em}.segment:last-child{padding-bottom:2em}.segment .comments,.segment .code{display:inline-block;vertical-align:top;padding:0 2em}.segment .comments{margin-left:-33em;width:29em;white-space:normal}.segment .code{white-space:pre}#meta{position:absolute;left:33em;padding:0.25em 1em}@media (max-width: 53em){html{font-size:1em}}@media (max-width: 52.94111em){html{font-size:0.99889em}}@media (max-width: 52.88222em){html{font-size:0.99778em}}@media (max-width: 52.82333em){html{font-size:0.99667em}}@media (max-width: 52.76444em){html{font-size:0.99556em}}@media (max-width: 52.70556em){html{font-size:0.99444em}}@media (max-width: 52.64667em){html{font-size:0.99333em}}@media (max-width: 52.58778em){html{font-size:0.99222em}}@media (max-width: 52.52889em){html{font-size:0.99111em}}@media (max-width: 52.47em){html{font-size:0.99em}}@media (max-width: 52.41111em){html{font-size:0.98889em}}@media (max-width: 52.35222em){html{font-size:0.98778em}}@media (max-width: 52.29333em){html{font-size:0.98667em}}@media (max-width: 52.23444em){html{font-size:0.98556em}}@media (max-width: 52.17556em){html{font-size:0.98444em}}@media (max-width: 52.11667em){html{font-size:0.98333em}}@media (max-width: 52.05778em){html{font-size:0.98222em}}@media (max-width: 51.99889em){html{font-size:0.98111em}}@media (max-width: 51.94em){html{font-size:0.98em}}@media (max-width: 51.88111em){html{font-size:0.97889em}}@media (max-width: 51.82222em){html{font-size:0.97778em}}@media (max-width: 51.76333em){html{font-size:0.97667em}}@media (max-width: 51.70444em){html{font-size:0.97556em}}@media (max-width: 51.64556em){html{font-size:0.97444em}}@media (max-width: 51.58667em){html{font-size:0.97333em}}@media (max-width: 51.52778em){html{font-size:0.97222em}}@media (max-width: 51.46889em){html{font-size:0.97111em}}@media (max-width: 51.41em){html{font-size:0.97em}}@media (max-width: 51.35111em){html{font-size:0.96889em}}@media (max-width: 51.29222em){html{font-size:0.96778em}}@media (max-width: 51.23333em){html{font-size:0.96667em}}@media (max-width: 51.17444em){html{font-size:0.96556em}}@media (max-width: 51.11556em){html{font-size:0.96444em}}@media (max-width: 51.05667em){html{font-size:0.96333em}}@media (max-width: 50.99778em){html{font-size:0.96222em}}@media (max-width: 50.93889em){html{font-size:0.96111em}}@media (max-width: 50.88em){html{font-size:0.96em}}@media (max-width: 50.82111em){html{font-size:0.95889em}}@media (max-width: 50.76222em){html{font-size:0.95778em}}@media (max-width: 50.70333em){html{font-size:0.95667em}}@media (max-width: 50.64444em){html{font-size:0.95556em}}@media (max-width: 50.58556em){html{font-size:0.95444em}}@media (max-width: 50.52667em){html{font-size:0.95333em}}@media (max-width: 50.46778em){html{font-size:0.95222em}}@media (max-width: 50.40889em){html{font-size:0.95111em}}@media (max-width: 50.35em){html{font-size:0.95em}}@media (max-width: 50.29111em){html{font-size:0.94889em}}@media (max-width: 50.23222em){html{font-size:0.94778em}}@media (max-width: 50.17333em){html{font-size:0.94667em}}@media (max-width: 50.11444em){html{font-size:0.94556em}}@media (max-width: 50.05556em){html{font-size:0.94444em}}@media (max-width: 49.99667em){html{font-size:0.94333em}}@media (max-width: 49.93778em){html{font-size:0.94222em}}@media (max-width: 49.87889em){html{font-size:0.94111em}}@media (max-width: 49.82em){html{font-size:0.94em}}@media (max-width: 49.76111em){html{font-size:0.93889em}}@media (max-width: 49.70222em){html{font-size:0.93778em}}@media (max-width: 49.64333em){html{font-size:0.93667em}}@media (max-width: 49.58444em){html{font-size:0.93556em}}@media (max-width: 49.52556em){html{font-size:0.93444em}}@media (max-width: 49.46667em){html{font-size:0.93333em}}@media (max-width: 49.40778em){html{font-size:0.93222em}}@media (max-width: 49.34889em){html{font-size:0.93111em}}@media (max-width: 49.29em){html{font-size:0.93em}}@media (max-width: 49.23111em){html{font-size:0.92889em}}@media (max-width: 49.17222em){html{font-size:0.92778em}}@media (max-width: 49.11333em){html{font-size:0.92667em}}@media (max-width: 49.05444em){html{font-size:0.92556em}}@media (max-width: 48.99556em){html{font-size:0.92444em}}@media (max-width: 48.93667em){html{font-size:0.92333em}}@media (max-width: 48.87778em){html{font-size:0.92222em}}@media (max-width: 48.81889em){html{font-size:0.92111em}}@media (max-width: 48.76em){html{font-size:0.92em}}@media (max-width: 48.70111em){html{font-size:0.91889em}}@media (max-width: 48.64222em){html{font-size:0.91778em}}@media (max-width: 48.58333em){html{font-size:0.91667em}}@media (max-width: 48.52444em){html{font-size:0.91556em}}@media (max-width: 48.46556em){html{font-size:0.91444em}}@media (max-width: 48.40667em){html{font-size:0.91333em}}@media (max-width: 48.34778em){html{font-size:0.91222em}}@media (max-width: 48.28889em){html{font-size:0.91111em}}@media (max-width: 48.23em){html{font-size:0.91em}}@media (max-width: 48.17111em){html{font-size:0.90889em}}@media (max-width: 48.11222em){html{font-size:0.90778em}}@media (max-width: 48.05333em){html{font-size:0.90667em}}@media (max-width: 47.99444em){html{font-size:0.90556em}}@media (max-width: 47.93556em){html{font-size:0.90444em}}@media (max-width: 47.87667em){html{font-size:0.90333em}}@media (max-width: 47.81778em){html{font-size:0.90222em}}@media (max-width: 47.75889em){html{font-size:0.90111em}}@media (max-width: 47.7em){html{font-size:0.9em}}@media (max-width: 47.64111em){html{font-size:0.89889em}}@media (max-width: 47.58222em){html{font-size:0.89778em}}@media (max-width: 47.52333em){html{font-size:0.89667em}}@media (max-width: 47.46444em){html{font-size:0.89556em}}@media (max-width: 47.40556em){html{font-size:0.89444em}}@media (max-width: 47.34667em){html{font-size:0.89333em}}@media (max-width: 47.28778em){html{font-size:0.89222em}}@media (max-width: 47.22889em){html{font-size:0.89111em}}@media (max-width: 47.17em){html{font-size:0.89em}}@media (max-width: 47.11111em){html{font-size:0.88889em}}@media (max-width: 47.05222em){html{font-size:0.88778em}}@media (max-width: 46.99333em){html{font-size:0.88667em}}@media (max-width: 46.93444em){html{font-size:0.88556em}}@media (max-width: 46.87556em){html{font-size:0.88444em}}@media (max-width: 46.81667em){html{font-size:0.88333em}}@media (max-width: 46.75778em){html{font-size:0.88222em}}@media (max-width: 46.69889em){html{font-size:0.88111em}}@media (max-width: 46.64em){html{font-size:0.88em}}@media (max-width: 46.58111em){html{font-size:0.87889em}}@media (max-width: 46.52222em){html{font-size:0.87778em}}@media (max-width: 46.46333em){html{font-size:0.87667em}}@media (max-width: 46.40444em){html{font-size:0.87556em}}@media (max-width: 46.34556em){html{font-size:0.87444em}}@media (max-width: 46.28667em){html{font-size:0.87333em}}@media (max-width: 46.22778em){html{font-size:0.87222em}}@media (max-width: 46.16889em){html{font-size:0.87111em}}@media (max-width: 46.11em){html{font-size:0.87em}}@media (max-width: 46.05111em){html{font-size:0.86889em}}@media (max-width: 45.99222em){html{font-size:0.86778em}}@media (max-width: 45.93333em){html{font-size:0.86667em}}@media (max-width: 45.87444em){html{font-size:0.86556em}}@media (max-width: 45.81556em){html{font-size:0.86444em}}@media (max-width: 45.75667em){html{font-size:0.86333em}}@media (max-width: 45.69778em){html{font-size:0.86222em}}@media (max-width: 45.63889em){html{font-size:0.86111em}}@media (max-width: 45.58em){html{font-size:0.86em}}@media (max-width: 45.52111em){html{font-size:0.85889em}}@media (max-width: 45.46222em){html{font-size:0.85778em}}@media (max-width: 45.40333em){html{font-size:0.85667em}}@media (max-width: 45.34444em){html{font-size:0.85556em}}@media (max-width: 45.28556em){html{font-size:0.85444em}}@media (max-width: 45.22667em){html{font-size:0.85333em}}@media (max-width: 45.16778em){html{font-size:0.85222em}}@media (max-width: 45.10889em){html{font-size:0.85111em}}@media (max-width: 45.05em){html{font-size:1em}body{margin:0 auto}.segment{padding:0;white-space:normal;max-width:29em;margin:0 auto}.segment .comments,.segment .code{display:block;padding:1em}.segment .comments{margin-left:0;width:auto}.segment .code{display:block;overflow-y:hidden;overflow-x:auto}.segment .code .wrapper{display:inline-block}#meta{position:static;margin:2em 0 0 0;overflow-y:hidden;overflow-x:auto}#meta .file-path{display:inline-block}}nav{position:fixed;top:0;right:0;width:20em}@media (max-width: 45.05em){nav{left:0;width:100%}}nav .tools{position:relative;z-index:100}nav .tools li{display:table-cell;vertical-align:middle;text-align:center;white-space:nowrap;height:2.1em;padding:0 0.55em}nav .tools .github{padding:0}nav .tools .github a{display:block;height:2.1em;width:2.1em;text-indent:-9001em}nav .tools .search{width:100%}nav .tools .search input{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;width:100%}nav .toc{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:2.1em;bottom:0;width:100%;overflow-x:hidden;overflow-y:auto}nav .toc li{position:relative}nav .toc .label{display:block;line-height:2em;padding:0 0.55em 0 0.55em}nav .toc li li .label{padding-left:1.1em}nav .toc li li li .label{padding-left:1.65em}nav .toc li li li li .label{padding-left:2.2em}nav .toc li li li li li .label{padding-left:2.75em}nav .toc li li li li li li .label{padding-left:3.3em}nav{-moz-transition:height 150ms 0;-o-transition:height 150ms 0;-webkit-transition:height 150ms 0;transition:height 150ms 0}nav .tools .toggle{-moz-transition:background 150ms;-o-transition:background 150ms;-webkit-transition:background 150ms;transition:background 150ms}nav.active{-moz-transition:height 0;-o-transition:height 0;-webkit-transition:height 0;transition:height 0;height:100%}nav .toc{-moz-transition:right 150ms;-o-transition:right 150ms;-webkit-transition:right 150ms;transition:right 150ms;right:-100%}nav.active .toc{right:0}@media (max-width: 45.05em){nav .toc{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;right:auto;left:-100%}nav.active .toc{left:0}}@media (max-width: 45.05em){body{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;position:relative;left:0}html.popped{overflow:hidden}html.popped body{left:100%;overflow:hidden}}nav .toc .children,nav .toc .outline{display:none}nav .toc .expanded>.children,nav .toc .expanded>.outline,nav .toc .expanded>.outline .children{display:block}nav .toc .discloser{-moz-transition-property:-moz-transform,-webkit-transform,-o-transform,-moz-transform;-o-transition-property:-moz-transform,-webkit-transform,-o-transform,-o-transform;-webkit-transition-property:-moz-transform,-webkit-transform,-o-transform,-webkit-transform;transition-property:-moz-transform -webkit-transform -o-transform transform;-moz-transition-duration:200ms;-o-transition-duration:200ms;-webkit-transition-duration:200ms;transition-duration:200ms;-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);display:inline-block;height:9px;width:9px;padding:0.2em;margin:0.2em 0.2em -0.2em 0.2em;vertical-align:baseline;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGQzE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGRDE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0ZBMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0ZCMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+nQHMgwAAAM1JREFUeNpi/P//P0NJSYkuAwNDJhDXAPE7BjIAExIbZNA9IC4CYjZKDAIBfiDuBeLzQOxBiUEwoAXE26FYixKDYMAD6rpeqGvJNogBGl5F0PDLpMQgGBAC4mlQF9pTYhAMGADxASBeB8RylBgEA4FAfAOIW4CYhxKDQIAZxmChwJD1QFwGxHfINegaEGcB8UFyA/sd1AA9dEOIddFfIJ4OzdAfcSkiZNAOIC6GegcvwGXQHagBm8jNtB+hBmiTYgi6i+ZCw+EFOWkBIMAA1W4l62UzKWwAAAAASUVORK5CYII=') center center no-repeat;background-size:9px 9px}nav .toc .discloser.placeholder,nav .toc .expanded>.outline .discloser{background:none}nav .toc .expanded>.label .discloser{-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}nav .toc .filtered>.label{display:none}nav .toc .matched-child>.label{display:block}nav .toc .matched-child>.children,nav .toc .matched-child>.outline,nav .toc .matched-child>.outline .children{display:block}nav .toc .matched>.children,nav .toc .matched>.outline,nav .toc .matched>.outline .children{display:block}nav.searching .toc .discloser{display:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}.comments .wrapper h1,.comments .wrapper h2,.comments .wrapper h3,.comments .wrapper h4,.comments .wrapper h5,.comments .wrapper h6{font-family:"HelveticaNeue-UltraLight","Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:100;letter-spacing:0.0625em;line-height:1.25;margin-bottom:0.5em}.comments .wrapper h1{font-size:2.5em}.comments .wrapper h2{font-size:2em}.comments .wrapper h3{font-size:1.6em}.comments .wrapper h4{font-size:1.4em}.comments .wrapper h5{font-size:1.3em}.comments .wrapper h6{font-size:1.2em}.comments .wrapper p{margin:1em 0}.comments .wrapper>*:first-child{margin-top:0}.comments .wrapper>*:last-child{margin-bottom:0}.comments .wrapper ol,.comments .wrapper ul{padding-left:1.75em;margin:1em 0}.comments .wrapper ol li{list-style:decimal}.comments .wrapper ul li{list-style:disc}.comments .wrapper li{margin:1em 0}.comments .wrapper li:first-child{margin-top:0}.comments .wrapper li:last-child{margin-bottom:0}.comments .wrapper code{display:inline-block;padding:0.25em 0.25em 0 0.25em}.comments .wrapper pre{display:block;overflow-x:auto;overflow-y:hidden}.comments .wrapper pre .hljs-comment,.comments .wrapper pre .hljs-template_comment,.comments .wrapper pre .diff .hljs-header,.comments .wrapper pre .hljs-doctype,.comments .wrapper pre .hljs-pi,.comments .wrapper pre .lisp .hljs-string,.comments .wrapper pre .hljs-javadoc{color:#93a1a1;font-style:italic}.comments .wrapper pre .hljs-keyword,.comments .wrapper pre .hljs-winutils,.comments .wrapper pre .method,.comments .wrapper pre .hljs-addition,.comments .wrapper pre .css .hljs-tag,.comments .wrapper pre .hljs-request,.comments .wrapper pre .hljs-status,.comments .wrapper pre .nginx .hljs-title{color:#859900}.comments .wrapper pre .hljs-number,.comments .wrapper pre .hljs-command,.comments .wrapper pre .hljs-string,.comments .wrapper pre .hljs-tag .hljs-value,.comments .wrapper pre .hljs-rules .hljs-value,.comments .wrapper pre .hljs-phpdoc,.comments .wrapper pre .tex .hljs-formula,.comments .wrapper pre .hljs-regexp,.comments .wrapper pre .hljs-hexcolor{color:#2aa198}.comments .wrapper pre .hljs-title,.comments .wrapper pre .hljs-localvars,.comments .wrapper pre .hljs-chunk,.comments .wrapper pre .hljs-decorator,.comments .wrapper pre .hljs-built_in,.comments .wrapper pre .hljs-identifier,.comments .wrapper pre .vhdl .hljs-literal,.comments .wrapper pre .hljs-id,.comments .wrapper pre .css .hljs-function{color:#268bd2}.comments .wrapper pre .hljs-attribute,.comments .wrapper pre .hljs-variable,.comments .wrapper pre .lisp .hljs-body,.comments .wrapper pre .smalltalk .hljs-number,.comments .wrapper pre .hljs-constant,.comments .wrapper pre .hljs-class .hljs-title,.comments .wrapper pre .hljs-parent,.comments .wrapper pre .haskell .hljs-type{color:#b58900}.comments .wrapper pre .hljs-preprocessor,.comments .wrapper pre .hljs-preprocessor .hljs-keyword,.comments .wrapper pre .hljs-pragma,.comments .wrapper pre .hljs-shebang,.comments .wrapper pre .hljs-symbol,.comments .wrapper pre .hljs-symbol .hljs-string,.comments .wrapper pre .diff .hljs-change,.comments .wrapper pre .hljs-special,.comments .wrapper pre .hljs-attr_selector,.comments .wrapper pre .hljs-important,.comments .wrapper pre .hljs-subst,.comments .wrapper pre .hljs-cdata,.comments .wrapper pre .clojure .hljs-title,.comments .wrapper pre .css .hljs-pseudo{color:#cb4b16}.comments .wrapper pre .hljs-deletion{color:#dc322f}.comments .wrapper pre .tex .hljs-formula{background:#eee8d5}.comments .wrapper pre code{padding:1em}.comments .wrapper blockquote{padding:0 1em}.comments .wrapper strong{font-weight:700}.comments .wrapper em{font-style:italic}html{background:#4a525a}#document{background:#f5fbff url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzI3MmMzMCIvPjxzdG9wIG9mZnNldD0iMzAlIiBzdG9wLWNvbG9yPSIjM2U0NTRjIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNGE1MjVhIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g') 33em no-repeat;background:#f5fbff -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #272c30),color-stop(30%, #3e454c),color-stop(100%, #4a525a)) 33em no-repeat;background:#f5fbff -moz-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff -webkit-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff linear-gradient(to right, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;margin-right:-1em;padding-right:1em}@media (max-width: 45.05em){#document{margin-right:0;padding-right:0}}#meta>*{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#272c30 1px 1px 0}#meta>*,#meta>* a{color:#9faab7}#meta>* a{text-decoration:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#fff 1px 1px 0;color:#4a525a}.code .wrapper{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;text-shadow:#272c30 1px 1px 0;color:#cbd1d8}.code .wrapper .hljs{display:block;padding:0.5em}.code .wrapper .hljs-comment,.code .wrapper .hljs-template_comment,.code .wrapper .diff .hljs-header,.code .wrapper .hljs-doctype,.code .wrapper .hljs-pi,.code .wrapper .lisp .hljs-string,.code .wrapper .hljs-javadoc{color:#b1bac4;font-style:italic}.code .wrapper .hljs-keyword,.code .wrapper .hljs-winutils,.code .wrapper .method,.code .wrapper .hljs-addition,.code .wrapper .css .hljs-tag,.code .wrapper .hljs-request,.code .wrapper .hljs-status,.code .wrapper .nginx .hljs-title{color:#e0c090}.code .wrapper .hljs-string{color:#e9baba}.code .wrapper .hljs-property{color:#b9d0af}.code .wrapper .hljs-function{color:#abd9cf}.code .wrapper .hljs-class{color:#cee4dd}.code .wrapper .hljs-number,.code .wrapper .hljs-command,.code .wrapper .hljs-tag .hljs-value,.code .wrapper .hljs-rules .hljs-value,.code .wrapper .hljs-phpdoc,.code .wrapper .tex .hljs-formula,.code .wrapper .hljs-regexp,.code .wrapper .hljs-hexcolor{color:#cba8d6}.code .wrapper .hljs-title,.code .wrapper .hljs-localvars,.code .wrapper .hljs-chunk,.code .wrapper .hljs-decorator,.code .wrapper .hljs-built_in,.code .wrapper .hljs-identifier,.code .wrapper .vhdl .hljs-literal,.code .wrapper .hljs-id,.code .wrapper .css .hljs-function{color:#a9c2ba}.code .wrapper .hljs-attribute,.code .wrapper .hljs-variable,.code .wrapper .lisp .hljs-body,.code .wrapper .smalltalk .hljs-number,.code .wrapper .hljs-constant,.code .wrapper .hljs-class .hljs-title,.code .wrapper .hljs-parent,.code .wrapper .haskell .hljs-type{color:#b9d0af}.code .wrapper .hljs-preprocessor,.code .wrapper .hljs-preprocessor .hljs-keyword,.code .wrapper .hljs-pragma,.code .wrapper .hljs-shebang,.code .wrapper .hljs-symbol,.code .wrapper .hljs-symbol .hljs-string,.code .wrapper .diff .hljs-change,.code .wrapper .hljs-special,.code .wrapper .hljs-attr_selector,.code .wrapper .hljs-important,.code .wrapper .hljs-subst,.code .wrapper .hljs-cdata,.code .wrapper .clojure .hljs-title,.code .wrapper .css .hljs-pseudo{color:#cee4dd}.code .wrapper .hljs-deletion{color:#dc322f}.code .wrapper .tex .hljs-formula{background:#e9baba}@media (max-width: 45.05em){.code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;-moz-box-shadow:#272c30 0 0 0.5em 0.2em inset;-webkit-box-shadow:#272c30 0 0 0.5em 0.2em inset;box-shadow:#272c30 0 0 0.5em 0.2em inset;background:#4a525a}.code .wrapper{-moz-box-shadow:#4a525a 0 0 0.25em 0.75em;-webkit-box-shadow:#4a525a 0 0 0.25em 0.75em;box-shadow:#4a525a 0 0 0.25em 0.75em;background:#4a525a}}@media (max-width: 29em){.code{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}}nav{text-shadow:#f0f0f0 1px 1px 0;color:#4a525a}nav .tools,nav .toc{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}nav .tools{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjkiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjZGNkY2QiIHN0b3Atb3BhY2l0eT0iMC45Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0.9)),color-stop(100%, rgba(205,205,205,0.9)));background:-moz-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:-webkit-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:linear-gradient(to bottom, rgba(255,255,255,0.9),rgba(205,205,205,0.9));-moz-border-radius-bottomleft:0.4em;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;border-bottom:1px solid #4a525a;border-left:1px solid #4a525a}@media (max-width: 53em){nav .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}}nav .tools li{border-right:1px solid #4a525a}nav .tools li:last-child{border-right:none}nav .tools .toggle{cursor:pointer}nav .tools .github a{-moz-transition:opacity 200ms;-o-transition:opacity 200ms;-webkit-transition:opacity 200ms;transition:opacity 200ms;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAwCAYAAACScGMWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGODE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGOTE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0Y2MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0Y3MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+FC/Z5AAACv9JREFUeNrMWXl0VNUdvu/NmzWZJQnZN0hCWIQEIQuErUCBI2qwEAFRBJUeDvUPDwfKVhDUY2mPp8spakVELSq11goIiCBbUVKKUGKQQFiCSBJIQjLJZPbJzOt3J/dOXiYJgcqh3nO+vPfm3Xfvd3/3t94IsiyTH2sTyY+4SfxGpVIpfzdBokdxjQHOADuAj4GmuzRvFjAbmAZkAocEQZjLX/r9/vYbuq0UgigoQKagsxyG74FlgB4gYdAA0UASkAIkACahvSn70Xd/AlrCxm4VRDEBIBScUxg5wiCs7oZcEJDwN7g+AswH3gAOApVALdAIWIEGtpgyYAfwPFtYTU/jbtmy5W/gsZAugnMKbSsJ2oXAn1J62o9AIJCDy/ZgbzbQLVoqkAtM722fa2pqYnHJwfgmXG23MgjV7SjO3bR06BnlogUSe7PW+ntplXQHUlNTHewxqjdyR+8lOehxYNCgQa3hnHoil8a18F60trY2cenSpYU+n48qfXMnvaEQYcIMQ4KmrbAk/Cb3ZGV3gt7GWbx4cSm4xHd1JR2+aPfdIPK/ICIiwlNaWroKfMSgwDq0Moj78feB/1e4cjqdmq1btz6C25921jk5iOLe4i2XdDh+aF/ejhw5ksYEZJE6BAeHSuT83nyaMTLSZzAYfO2K7BPdbo/k9ngkOM8u32i1moBep2/TarVtGrU64PZ6VC0tLVqv1ydyFxLeamtrzbgYgJFSh+Bk2jOpe1ICmf7QtKp5856sHJo7zGoym4Lk3G636HQ4JXurTd3U1KTBtqgcTpcQZTYHIiIjfNExMV6DIaINuuTX6XQBp8sp1t24odv3+d6UN9/cPPTqtWpjOEFYLOeUI3CJwJJULAMZFE5u9cqVx1/esKE8jLebgWc3akCjjIFKbwF46dw0AlLXVnXpUlzx9OJpZyvO9VEShJR9LpfrHdy2SgqDCEB83i7Elj53NozYKeAY3QHAE0ZOz0KQmukuJ+VifUPkMrKyjO9t2bzvwUdmbL5eV2/gBBVE1crAL/OAy4mlJSe5Vq5Zd0pB7O/4OB7XXwJbgC/pYLHRFhJtNhONRk1q6xtIv+RE4vJ4SUOTldTdDKWABcBi+g3wdtH9OfaHJ4zaVpg7NHvH/oPrFKGMW4wghYn/uvJhwvjx1UZLFN+6I/iQ3r/Pnh+iGQcWUVPfaCWNzTZiiowgMA5yo7GJ1N5oIP4OI4llmQzV6QVAdenp8v3J8X1IhF7aplarV0HXaE5IJEniH8md/RwhFZ1iWFoqj3dUop8yQrzFPPvss78Cuf48e7W22IjL7SHXauuUxGgbpTS2goKC5fhu9InyCnLmfFWDiByQv6OOuCu5dmEeU46Iyfj7CqzKwXQp1OLj4wfSrcJEll78q0b5EBMTQ4k++V3N9cE6rVYCuRCP5OTkFm5ECskJFMdxd5X/dLOh3shuG9n1n8pMYuLEiQ10sawmuFU7SQMAfxg3bhxXn1yLyWDx+X0mhVT5O2d4NLADb/GHr0/9J97ltFO9lDJSgruyC3gpNjb20tq1a4+OHj26OaxQGgDMYxarbN8BTxuNxm9nzZr1zZIlS6r4GiWVekhbW0BL9Q0L9s+dO/dqKKfsJvCb4fMuMKuRP/nwvSN4//PHH55CsAXckqkhbGJ4nWYSbMCXmIKkKRNJhQeIATYqvs3PGZD1EX1F55s0adI5xbupXciJ7ddCWBCVopyekuw8ffJr2lkzMLMviYky0/7UeRcDNIMYxbeIKf6IvLy8madOnZqId1KEQU8S4/rA1ZiwODX9Ng9YCcxc/sxjkyWVivo+GRGkurKy8j1G7DW6YGWECMVY2hKTEicjHH1stVpNSYkJztmPlqw/uG/vK/6ATPeC+Nv88JIqUg2X0epwEo/XW4LPltMaFNs+vays7HhSUtLS9OTEpgi9jkRbTMRmd5Ios5G0OuGTA/LkMxcubWtr89MIcRnZyLYnnniC70Ap8JfutjWE9evXF02YMKGCiz0hPu5YWlLC/PuyMzOGZGdKOQP7k76pSSR3YDZJSYyDVE0js7KyVhw88MVQjJkODAR0AzLSyJi8XIJvzMMGZU+M7xP9V5p4snHf3/jqxp+g35+Z1F4GTEFOCsktYCHmANCgKAX779q1a9W7776bd/jw4b6QpFEtSUSr0VyTJPE8vMB3Br2uSRREh0oUbPEpaQlFhQW5dXU3mtUaddzBA4crHE5HItba3+ly9/V4fWbMSQuo7SD2DsanPnQhEMnmfYM66c4Vf3txTFdSDTwakqAYrE2jgAV2u/2tvXv3/mPRokUfZWdnfwhvXhHKBBm4IYXhX8BrwC/wvmDZsmV9mFQXKgzgaeovRUXFr5QcdQcvAKupwFJSUkqqa6q3Kxw0lWIqU/rhly9fTsKWP1hdXR3dW4YL3fumqqrq1xqNhpZ9cewMhiYJNAKdpjqG+a9wy+56VsIkNXLkSOqIZXjx5s/37Z3QnS5SK4yMjDx8J/VBSUlJOb5bATwGUB3rC2j57gQ9BSuyeixwEJLiYdbUucq5uTnXNm3a1B3BXKDtTshZLBbnxYsXV1M31GW82yXH8ArXHbPZbENa/kc8zwPoQcvrwDU+Kd7ZIUUXq57cc+bMKeMlICKCC1sZWsTOnTs/wVyP3i65noqZjezEiNhsNiP83XPovBXYzHKy0EHPzJkzz6elpQXDGIj48/Pz67mWjhgxorqoqOhKKJGwWmkCUADdNXSuBTqrWG8V//d0hXq93spDEEd4Gz58eCMqdoENLtPqPXQyKUl+vK8PS8tMQaMQeDkqk477zkm+dAsjOzxjxozxXq/3rZMnT2Y0NzcbaIWFrXLjKqJKCqZJCHOy4qTIj+ghK47GBLwPhEsITddxL/R+7Npd++CDD86AyJPAMzU1NXGYW0C+5UHkGLhhw4axzL0IyiCvUomBsPM84QefCfd4oi2KlZhgQ2pq6ng83ke3xeFweHo6ykIKJCuykB90GCTdTicQpLq3AyR30oIXQXoRPzLopu9dO52S7uSUkrkXmq67uzMOOAMZRtDj6aeisrqt+UIjqTWasEHbM/eo2HiiQ07G9JtodDpibahTNdXdCPYzRBoFo8XCDr2D48h8clRutH8oROoMkaEVpQ8YzCxE6PEoMERubPHPFJZDvXOwpiB6gyF4/E5/87jcJDE9gxz7bMcDlBx1mOkZGS5UXMFxNHq9v29mf4+I+oIarj9ApCE5w+x8jhNl5emzSmbUBM8aRo3lUaBdCjJzKQrrVUhO23kVcrsP8nk9TJdUxGGzJXz2/pYXbtbWBI/JxkyavKd/Zlbr1StV9PCFDB6aW1dUmN/YLzOr5cK5iuizZ8v7PDD17S+HDLu/8tuy0wP+8NuXh/jdds/8BU9Fet3uXrc2RM7a0NBOjq1ECB0CtBMVoUu2psZxrVbrOKM5emeE2bj7iz27Ilauf/EZR2srVE3tXvP8ui+R55Hla9Z9tfDx2cVVFy6YP9r5acaRQ4deLZk9K9Nlt5fs3r0nc3h+4RRbc+PJAETL5RH0jWHOMKQPk+fM7+7cq+NjSSQum4M01V8nZ//9FfXyxRevXJ02ZtTI6TGxsVf6ZWWv2LP946ms8iofkDOsKeBx/06j1WtPHC99E7XEizSfA7LZ6LSSOzBl7lPuTkqOtn/bO53J3WHLAx4G6igRlvPPZO6FFiy/B2j5V0hLQvYNPcY4AVB/Sa3BEqwTCLnSo3e4S//oiGHFDTXh3cDFsIVMZXH8N4z8bbX/CjAA0UTEH4oMvREAAAAASUVORK5CYII=') center center no-repeat;background-size:19.5px 24px}nav .tools .github a:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=90);opacity:0.9}nav.active .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}nav.active .tools .toggle{background:rgba(205,205,205,0.9);position:relative}nav .toc{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:rgba(230,230,230,0.9);border-left:1px solid #4a525a}nav .toc .label{color:#4a525a;text-decoration:none;border-top:1px solid rgba(192,192,192,0.9);border-bottom:1px solid rgba(192,192,192,0.9);margin-top:-1px}nav .toc .label:hover{background:rgba(205,205,205,0.9)}nav .toc .file>.label{font-weight:bold}nav .toc .selected>.label{background:#f5fbff}nav .toc .label em{font-weight:bold}nav .toc .file>.label em{color:#101214}nav .toc .matched-child>.label{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:0.65;text-shadow:none;background:rgba(192,192,192,0.9)}@media (max-width: 45.05em){nav .tools,nav .toc{border-left-width:0}nav .tools{background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2NkY2RjZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),color-stop(100%, #cdcdcd));background:-moz-linear-gradient(top, #ffffff,#cdcdcd);background:-webkit-linear-gradient(top, #ffffff,#cdcdcd);background:linear-gradient(to bottom, #ffffff,#cdcdcd)}nav .toc{background:#e6e6e6}}.comments .wrapper a{display:inline-block;color:#a8614e;text-decoration:none}.comments .wrapper a:hover,.comments .wrapper a:hover *{text-decoration:underline}.comments .wrapper code{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;border:1px solid #e6e0d5}.comments .wrapper pre,.comments .wrapper code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;background:#fbf8f3}.comments .wrapper pre{-moz-box-shadow:#f2ece3 0 0 0.4em 0.2em;-webkit-box-shadow:#f2ece3 0 0 0.4em 0.2em;box-shadow:#f2ece3 0 0 0.4em 0.2em;border:1px solid #d9c9af}.comments .wrapper pre code{border-width:0;background:transparent}.comments .wrapper blockquote{border-left:0.15em solid #959fa8;margin-left:-0.15em}body{-webkit-text-size-adjust:100%}input[type="search"]{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;-moz-box-shadow:#ddd 0 1px 1px 0 inset;-webkit-box-shadow:#ddd 0 1px 1px 0 inset;box-shadow:#ddd 0 1px 1px 0 inset;border:1px solid #959595;padding:0.15em 0.8em}.comments.doc-section .wrapper{color:#252519}.comments.doc-section.doc-section-private .wrapper,.comments.doc-section.doc-section-protected .wrapper,.comments.doc-section.doc-section-internal .wrapper{color:#7f7f7f}.comments.doc-section .doc-section-header{font:bold 18px "helvetica neue",helvetica,sans-serif}.comments.doc-section .docs .doc-section-header code{font-size:18px}.code .marker,.code .marker.wrapper,.code .wrapper.marker{display:none}.code.folded .wrapper{display:none;cursor:default}.code.folded .marker{-moz-border-radius:0.2em;-webkit-border-radius:0.2em;border-radius:0.2em;-moz-box-shadow:#2f3539 1px 1px 1px 0;-webkit-box-shadow:#2f3539 1px 1px 1px 0;box-shadow:#2f3539 1px 1px 1px 0;display:inline-block;border:1px solid #73787f;padding:0.2em 0.5em;margin-left:-0.5em;margin-right:-0.5em;background:#58616b;font:12px "Droid Sans Mono",Menlo,Monaco,monospace;text-shadow:#2f3539 1px 1px 0px;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.code.folded .marker .c1{color:#73787f;font-style:normal}.code.folded .marker:hover{background:#5f6872}.code.folded .marker:hover .c1{color:#7b8087}.code.folded .marker .c1:after{content:" …"}
diff --git a/sample/doc/invoice/CancelInvoice.html b/sample/doc/invoice/CancelInvoice.html
new file mode 100644
index 00000000..29efce51
--- /dev/null
+++ b/sample/doc/invoice/CancelInvoice.html
@@ -0,0 +1,44 @@
+
invoice/CancelInvoice require __DIR__ . '/../bootstrap.php' ;
+
+use PayPal \Api \Invoice ;
+use PayPal \Api \CancelNotification ;
+
+try {
$invoice = Invoice::get("INV2-CJL7-PF4G-BLQF-5FWG" , $apiContext );
$notify = new CancelNotification();
+ $notify
+ ->setSubject("Past due" )
+ ->setNote("Canceling invoice" )
+ ->setSendToMerchant(true )
+ ->setSendToPayer(true );
$cancelStatus = $invoice ->cancel($notify , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+
+?>
+
+<html>
+<head>
+ <title>Cancel Invoice</title>
+</head>
+<body>
+<div>Cancel Invoice:</div>
+<pre><?php echo $invoice ->toJSON(JSON_PRETTY_PRINT); ?> </pre>
+<a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/invoice/CreateInvoice.html b/sample/doc/invoice/CreateInvoice.html
new file mode 100644
index 00000000..a42146f9
--- /dev/null
+++ b/sample/doc/invoice/CreateInvoice.html
@@ -0,0 +1,95 @@
+invoice/CreateInvoice require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Invoice ;
+use PayPal \Api \MerchantInfo ;
+use PayPal \Api \BillingInfo ;
+use PayPal \Api \InvoiceItem ;
+use PayPal \Api \Phone ;
+use PayPal \Api \Address ;
+use PayPal \Api \Currency ;
+use PayPal \Api \PaymentTerm ;
+use PayPal \Api \ShippingInfo ;
+
+$invoice = new Invoice();
$invoice
+ ->setMerchantInfo(new MerchantInfo())
+ ->setBillingInfo(array (new BillingInfo()))
+ ->setItems(array (new InvoiceItem()))
+ ->setNote("Medical Invoice 16 Jul, 2013 PST" )
+ ->setPaymentTerm(new PaymentTerm())
+ ->setShippingInfo(new ShippingInfo());
$invoice ->getMerchantInfo()
+ ->setEmail("PPX.DevNet-facilitator@gmail.com" )
+ ->setFirstName("Dennis" )
+ ->setLastName("Doctor" )
+ ->setbusinessName("Medical Professionals, LLC" )
+ ->setPhone(new Phone())
+ ->setAddress(new Address());
+
+$invoice ->getMerchantInfo()->getPhone()
+ ->setCountryCode("001" )
+ ->setNationalNumber("5032141716" );
$invoice ->getMerchantInfo()->getAddress()
+ ->setLine1("1234 Main St." )
+ ->setCity("Portland" )
+ ->setState("OR" )
+ ->setPostalCode("97217" )
+ ->setCountryCode("US" );
$billing = $invoice ->getBillingInfo();
+$billing [0 ]
+ ->setEmail("example@example.com" );
$items = $invoice ->getItems();
+$items [0 ]
+ ->setName("Sutures" )
+ ->setQuantity(100 )
+ ->setUnitPrice(new Currency());
+
+$items [0 ]->getUnitPrice()
+ ->setCurrency("USD" )
+ ->setValue(5 );
+
+$invoice ->getPaymentTerm()
+ ->setTermType("NET_45" );
$invoice ->getShippingInfo()
+ ->setFirstName("Sally" )
+ ->setLastName("Patient" )
+ ->setBusinessName("Not applicable" )
+ ->setPhone(new Phone())
+ ->setAddress(new Address());
+
+$invoice ->getShippingInfo()->getPhone()
+ ->setCountryCode("001" )
+ ->setNationalNumber("5039871234" );
+
+$invoice ->getShippingInfo()->getAddress()
+ ->setLine1("1234 Main St." )
+ ->setCity("Portland" )
+ ->setState("OR" )
+ ->setPostalCode("97217" )
+ ->setCountryCode("US" );
+
+try {
$invoice ->create($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Invoice Creation</title>
+</head>
+<body>
+<div>
+ Created Invoice:
+ <?php echo $invoice ->getId(); ?>
+</div>
+<pre><?php echo $invoice ->toJSON(JSON_PRETTY_PRINT); ?> </pre>
+<a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/invoice/GetInvoice.html b/sample/doc/invoice/GetInvoice.html
new file mode 100644
index 00000000..bee95b8d
--- /dev/null
+++ b/sample/doc/invoice/GetInvoice.html
@@ -0,0 +1,28 @@
+invoice/GetInvoice require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Invoice ;
+
+$invoiceId = "INV2-9DRB-YTHU-2V9Q-7Q24" ;
try {
+ $invoice = Invoice::get($invoiceId , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception:" . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Lookup invoice details</title>
+</head>
+<body>
+ <div>Retrieving Invoice: <?php echo $invoiceId ;?> </div>
+ <pre><?php echo $invoice ->toJSON(JSON_PRETTY_PRINT); ?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/invoice/ListInvoice.html b/sample/doc/invoice/ListInvoice.html
new file mode 100644
index 00000000..e2fbdd07
--- /dev/null
+++ b/sample/doc/invoice/ListInvoice.html
@@ -0,0 +1,26 @@
+invoice/ListInvoice require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Invoice ;
+
+try {
$invoices = Invoice::get_all($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception:" . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Lookup invoice history</title>
+</head>
+<body>
+ <div>Got invoices </div>
+ <pre><?php echo $invoices ->toJSON(JSON_PRETTY_PRINT); ?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/invoice/RemindInvoice.html b/sample/doc/invoice/RemindInvoice.html
new file mode 100644
index 00000000..29b477a2
--- /dev/null
+++ b/sample/doc/invoice/RemindInvoice.html
@@ -0,0 +1,43 @@
+invoice/RemindInvoice require __DIR__ . '/../bootstrap.php' ;
+
+use PayPal \Api \Invoice ;
+use PayPal \Api \Notification ;
+
+try {
$invoice = Invoice::get("INV2-9CAH-K5G7-2JPL-G4B4" , $apiContext );
$notify = new Notification();
+ $notify
+ ->setSubject("Past due" )
+ ->setNote("Please pay soon" )
+ ->setSendToMerchant(true );
$remindStatus = $invoice ->remind($notify , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+
+?>
+
+<html>
+<head>
+ <title>Remind Invoice</title>
+</head>
+<body>
+<div>Remind Invoice:</div>
+<pre><?php echo $invoice ->toJSON(JSON_PRETTY_PRINT); ?> </pre>
+<a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/invoice/SendInvoice.html b/sample/doc/invoice/SendInvoice.html
new file mode 100644
index 00000000..4b8a5de0
--- /dev/null
+++ b/sample/doc/invoice/SendInvoice.html
@@ -0,0 +1,31 @@
+invoice/SendInvoice require __DIR__ . '/../bootstrap.php' ;
+
+use PayPal \Api \Invoice ;
+
+try {
$invoice = Invoice::get("INV2-9DRB-YTHU-2V9Q-7Q24" , $apiContext );
$sendStatus = $invoice ->send($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+
+?>
+<html>
+<head>
+ <title>Send Invoice</title>
+</head>
+<body>
+<div>Send Invoice:</div>
+<pre><?php echo $invoice ->toJSON(JSON_PRETTY_PRINT); ?> </pre>
+<a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/AuthorizationCapture.html b/sample/doc/payments/AuthorizationCapture.html
new file mode 100644
index 00000000..0b79a7b2
--- /dev/null
+++ b/sample/doc/payments/AuthorizationCapture.html
@@ -0,0 +1,39 @@
+payments/AuthorizationCapture require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Amount ;
+use PayPal \Api \Capture ;
+use PayPal \Api \Authorization ;
$authId = createAuthorization($apiContext );
+
+ $amt = new Amount();
+ $amt ->setCurrency("USD" )
+ ->setTotal("1.00" );
+
+
+ $capture = new Capture();
+ $capture ->setId($authId )
+ ->setAmount($amt );
$authorization = Authorization::get($authId , $apiContext );
$getCapture = $authorization ->capture($capture , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Capturing an authorization</title>
+</head>
+<body>
+ <div>
+ Captured payment <?php echo $getCapture ->getParentPayment(); ?> . Capture Id:
+ <?php echo $getCapture ->getId();?>
+ </div>
+ <pre><?php echo $getCapture ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/CreatePayment.html b/sample/doc/payments/CreatePayment.html
new file mode 100644
index 00000000..d40afef7
--- /dev/null
+++ b/sample/doc/payments/CreatePayment.html
@@ -0,0 +1,97 @@
+payments/CreatePayment require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Amount ;
+use PayPal \Api \Details ;
+use PayPal \Api \Item ;
+use PayPal \Api \ItemList ;
+use PayPal \Api \CreditCard ;
+use PayPal \Api \Payer ;
+use PayPal \Api \Payment ;
+use PayPal \Api \FundingInstrument ;
+use PayPal \Api \Transaction ;
$card = new CreditCard();
+$card ->setType("visa" )
+ ->setNumber("4417119669820331" )
+ ->setExpireMonth("11" )
+ ->setExpireYear("2019" )
+ ->setCvv2("012" )
+ ->setFirstName("Joe" )
+ ->setLastName("Shopper" );
$fi = new FundingInstrument();
+$fi ->setCreditCard($card );
$payer = new Payer();
+$payer ->setPaymentMethod("credit_card" )
+ ->setFundingInstruments(array ($fi ));
$item1 = new Item();
+$item1 ->setName('Ground Coffee 40 oz' )
+ ->setDescription('Ground Coffee 40 oz' )
+ ->setCurrency('USD' )
+ ->setQuantity(1 )
+ ->setTax('0.30' )
+ ->setPrice('7.50' );
+$item2 = new Item();
+$item2 ->setName('Granola bars' )
+ ->setDescription('Granola Bars with Peanuts' )
+ ->setCurrency('USD' )
+ ->setQuantity(5 )
+ ->setTax('0.20' )
+ ->setPrice('2.00' );
+
+$itemList = new ItemList();
+$itemList ->setItems(array ($item1 , $item2 ));
$details = new Details();
+$details ->setShipping('1.20' )
+ ->setTax('1.30' )
+ ->setSubtotal('17.50' );
$amount = new Amount();
+$amount ->setCurrency("USD" )
+ ->setTotal("20.00" )
+ ->setDetails($details );
$transaction = new Transaction();
+$transaction ->setAmount($amount )
+ ->setItemList($itemList )
+ ->setDescription("Payment description" );
$payment = new Payment();
+$payment ->setIntent("sale" )
+ ->setPayer($payer )
+ ->setTransactions(array ($transaction ));
try {
+ $payment ->create($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Direct Credit card payments</title>
+</head>
+<body>
+ <div>
+ Created payment:
+ <?php echo $payment ->getId();?>
+ </div>
+ <pre><?php echo $payment ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/CreatePaymentUsingPayPal.html b/sample/doc/payments/CreatePaymentUsingPayPal.html
new file mode 100644
index 00000000..e0455093
--- /dev/null
+++ b/sample/doc/payments/CreatePaymentUsingPayPal.html
@@ -0,0 +1,90 @@
+payments/CreatePaymentUsingPayPal require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Amount ;
+use PayPal \Api \Details ;
+use PayPal \Api \Item ;
+use PayPal \Api \ItemList ;
+use PayPal \Api \Payer ;
+use PayPal \Api \Payment ;
+use PayPal \Api \RedirectUrls ;
+use PayPal \Api \Transaction ;
+session_start();
$payer = new Payer();
+$payer ->setPaymentMethod("paypal" );
$item1 = new Item();
+$item1 ->setName('Ground Coffee 40 oz' )
+ ->setCurrency('USD' )
+ ->setQuantity(1 )
+ ->setPrice('7.50' );
+$item2 = new Item();
+$item2 ->setName('Granola bars' )
+ ->setCurrency('USD' )
+ ->setQuantity(5 )
+ ->setPrice('2.00' );
+
+$itemList = new ItemList();
+$itemList ->setItems(array ($item1 , $item2 ));
$details = new Details();
+$details ->setShipping('1.20' )
+ ->setTax('1.30' )
+ ->setSubtotal('17.50' );
$amount = new Amount();
+$amount ->setCurrency("USD" )
+ ->setTotal("20.00" )
+ ->setDetails($details );
$transaction = new Transaction();
+$transaction ->setAmount($amount )
+ ->setItemList($itemList )
+ ->setDescription("Payment description" );
$baseUrl = getBaseUrl();
+$redirectUrls = new RedirectUrls();
+$redirectUrls ->setReturnUrl("$baseUrl/ExecutePayment.php?success=true" )
+ ->setCancelUrl("$baseUrl/ExecutePayment.php?success=false" );
$payment = new Payment();
+$payment ->setIntent("sale" )
+ ->setPayer($payer )
+ ->setRedirectUrls($redirectUrls )
+ ->setTransactions(array ($transaction ));
try {
+ $payment ->create($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
foreach ($payment ->getLinks() as $link ) {
+ if ($link ->getRel() == 'approval_url' ) {
+ $redirectUrl = $link ->getHref();
+ break ;
+ }
+}
$_SESSION ['paymentId' ] = $payment ->getId();
+if (isset ($redirectUrl )) {
+ header("Location: $redirectUrl" );
+ exit ;
+}
\ No newline at end of file
diff --git a/sample/doc/payments/CreatePaymentUsingSavedCard.html b/sample/doc/payments/CreatePaymentUsingSavedCard.html
new file mode 100644
index 00000000..d42ff49c
--- /dev/null
+++ b/sample/doc/payments/CreatePaymentUsingSavedCard.html
@@ -0,0 +1,86 @@
+payments/CreatePaymentUsingSavedCard require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Amount ;
+use PayPal \Api \Details ;
+use PayPal \Api \Item ;
+use PayPal \Api \ItemList ;
+use PayPal \Api \CreditCardToken ;
+use PayPal \Api \Payer ;
+use PayPal \Api \Payment ;
+use PayPal \Api \FundingInstrument ;
+use PayPal \Api \Transaction ;
$creditCardToken = new CreditCardToken();
+$creditCardToken ->setCreditCardId('CARD-29H07236G1554552FKINPBHQ' );
$fi = new FundingInstrument();
+$fi ->setCreditCardToken($creditCardToken );
$payer = new Payer();
+$payer ->setPaymentMethod("credit_card" )
+ ->setFundingInstruments(array ($fi ));
$item1 = new Item();
+$item1 ->setName('Ground Coffee 40 oz' )
+ ->setCurrency('USD' )
+ ->setQuantity(1 )
+ ->setPrice('7.50' );
+$item2 = new Item();
+$item2 ->setName('Granola bars' )
+ ->setCurrency('USD' )
+ ->setQuantity(5 )
+ ->setPrice('2.00' );
+
+$itemList = new ItemList();
+$itemList ->setItems(array ($item1 , $item2 ));
$details = new Details();
+$details ->setShipping('1.20' )
+ ->setTax('1.30' )
+ ->setSubtotal('17.50' );
$amount = new Amount();
+$amount ->setCurrency("USD" )
+ ->setTotal("20.00" )
+ ->setDetails($details );
$transaction = new Transaction();
+$transaction ->setAmount($amount )
+ ->setItemList($itemList )
+ ->setDescription("Payment description" );
$payment = new Payment();
+$payment ->setIntent("sale" )
+ ->setPayer($payer )
+ ->setTransactions(array ($transaction ));
try {
+ $payment ->create($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Saved Credit card payments</title>
+</head>
+<body>
+ <div>
+ Created payment:
+ <?php echo $payment ->getId();?>
+ </div>
+ <pre><?php echo $payment ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/ExecutePayment.html b/sample/doc/payments/ExecutePayment.html
new file mode 100644
index 00000000..bc641620
--- /dev/null
+++ b/sample/doc/payments/ExecutePayment.html
@@ -0,0 +1,31 @@
+payments/ExecutePayment require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \ExecutePayment ;
+use PayPal \Api \Payment ;
+use PayPal \Api \PaymentExecution ;
+session_start();
+if (isset ($_GET ['success' ]) && $_GET ['success' ] == 'true' ) {
+
$paymentId = $_SESSION ['paymentId' ];
+ $payment = Payment::get($paymentId , $apiContext );
+
$execution = new PaymentExecution();
+ $execution ->setPayerId($_GET ['PayerID' ]);
+
+
$result = $payment ->execute($execution , $apiContext );
+
+ echo "<html><body><pre>" ;
+ echo $result ->toJSON(JSON_PRETTY_PRINT);
+ echo "</pre><a href='../index.html'>Back</a></body></html>" ;
+
+} else {
+ echo "User cancelled payment." ;
+}
\ No newline at end of file
diff --git a/sample/doc/payments/GetAuthorization.html b/sample/doc/payments/GetAuthorization.html
new file mode 100644
index 00000000..3a0d3d52
--- /dev/null
+++ b/sample/doc/payments/GetAuthorization.html
@@ -0,0 +1,31 @@
+payments/GetAuthorization require __DIR__ . '/../bootstrap.php' ;
+
+use PayPal \Api \Authorization ;
$authId = createAuthorization($apiContext );
+
$authorization = Authorization::get($authId , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Lookup an authorization</title>
+</head>
+<body>
+ <div>
+ Retrieved Authorization:
+ <?php echo $authorization ->getId();?>
+ </div>
+ <pre><?php echo $authorization ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/GetCapture.html b/sample/doc/payments/GetCapture.html
new file mode 100644
index 00000000..3a3869e4
--- /dev/null
+++ b/sample/doc/payments/GetCapture.html
@@ -0,0 +1,47 @@
+payments/GetCapture require __DIR__ . '/../bootstrap.php' ;
+
+use PayPal \Api \Capture ;
+use PayPal \Api \Amount ;
+use PayPal \Api \Authorization ;
$authId = createAuthorization($apiContext );
$authorization = Authorization::get($authId , $apiContext );
+
+
+
+ $amt = new Amount();
+ $amt ->setCurrency("USD" )
+ ->setTotal("1.00" );
+
$captureInfo = new Capture();
+ $captureInfo ->setId($authId )
+ ->setAmount($amt );
+
+ $capture = $authorization ->capture($captureInfo , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
try {
+ $capture = Capture::get($capture ->getId(), $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Lookup a capture</title>
+</head>
+<body>
+ <div>
+ Capture Id:
+ <?php echo $capture ->getId();?>
+ </div>
+ <pre><?php echo $capture ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/GetPayment.html b/sample/doc/payments/GetPayment.html
new file mode 100644
index 00000000..fc3fdaa9
--- /dev/null
+++ b/sample/doc/payments/GetPayment.html
@@ -0,0 +1,33 @@
+payments/GetPayment require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Payment ;
+
+$paymentId = "PAY-0XL713371A312273YKE2GCNI" ;
try {
+ $payment = Payment::get($paymentId , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception:" . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Lookup a payment</title>
+</head>
+<body>
+ <div>Retrieving Payment ID: <?php echo $paymentId ;?> </div>
+ <pre><?php echo $payment ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/ListPayments.html b/sample/doc/payments/ListPayments.html
new file mode 100644
index 00000000..334446b6
--- /dev/null
+++ b/sample/doc/payments/ListPayments.html
@@ -0,0 +1,32 @@
+payments/ListPayments require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Payment ;
try {
+ $payments = Payment::all(array ('count' => 10 , 'start_index' => 5 ), $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception:" . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Lookup payment history</title>
+</head>
+<body>
+ <div>Got <?php echo $payments ->getCount(); ?> matching payments </div>
+ <pre><?php echo $payments ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/Reauthorization.html b/sample/doc/payments/Reauthorization.html
new file mode 100644
index 00000000..d0efa9cd
--- /dev/null
+++ b/sample/doc/payments/Reauthorization.html
@@ -0,0 +1,37 @@
+payments/Reauthorization require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Authorization ;
+use PayPal \Api \Amount ;
$authorization = Authorization::get('7GH53639GA425732B' , $apiContext );
+
+ $amount = new Amount();
+ $amount ->setCurrency("USD" );
+ $amount ->setTotal("1.00" );
$authorization ->setAmount($amount );
+ $reauthorization = $authorization ->reauthorize($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Reauthorize a payment</title>
+</head>
+<body>
+ <div>
+ Reauthorization Id:
+ <?php echo $reauthorization ->getId();?>
+ </div>
+ <pre>
+ <?php echo $reauthorization ->toJSON(JSON_PRETTY_PRINT);?>
+ </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/RefundCapture.html b/sample/doc/payments/RefundCapture.html
new file mode 100644
index 00000000..272b6776
--- /dev/null
+++ b/sample/doc/payments/RefundCapture.html
@@ -0,0 +1,52 @@
+payments/RefundCapture require __DIR__ . '/../bootstrap.php' ;
+
+use PayPal \Api \Authorization ;
+use PayPal \Api \Capture ;
+use PayPal \Api \Refund ;
+use PayPal \Api \Amount ;
+use PayPal \Rest \ApiContext ;
+
+
+try {
$authId = createAuthorization($apiContext );
$authorization = Authorization::get($authId , $apiContext );
+
+
+ $amt = new Amount();
+ $amt ->setCurrency("USD" )
+ ->setTotal("1.00" );
+
$captureInfo = new Capture();
+ $captureInfo ->setAmount($amt );
+
+ $capture = $authorization ->capture($captureInfo , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
$refund = new Refund();
+$refund ->setAmount($amt );
+
+try {
$apiContext = getApiContext();
+
+ $captureRefund = $capture ->refund($refund , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+
+<html>
+<head>
+ <title>Refund a captured payment</title>
+</head>
+<body>
+ <div>Refund Capture:</div>
+ <pre><?php echo $captureRefund ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/payments/VoidAuthorization.html b/sample/doc/payments/VoidAuthorization.html
new file mode 100644
index 00000000..ae3aa7a8
--- /dev/null
+++ b/sample/doc/payments/VoidAuthorization.html
@@ -0,0 +1,28 @@
+payments/VoidAuthorization require __DIR__ . '/../bootstrap.php' ;
+
+use PayPal \Api \Authorization ;
$authId = createAuthorization($apiContext );
$authorization = Authorization::get($authId , $apiContext );
$voidedAuth = $authorization ->void($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Void an authorization</title>
+</head>
+<body>
+ <div>
+ Voided authorization
+ </div>
+ <pre><?php echo $voidedAuth ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/sale/GetSale.html b/sample/doc/sale/GetSale.html
new file mode 100644
index 00000000..357eb883
--- /dev/null
+++ b/sample/doc/sale/GetSale.html
@@ -0,0 +1,28 @@
+sale/GetSale require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Sale ;
+
+$saleId = '3RM92092UW5126232' ;
+
+try {
$sale = Sale::get($saleId , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception:" . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Lookup a sale</title>
+</head>
+<body>
+ <div>Retrieving sale id: <?php echo $saleId ;?> </div>
+ <pre><?php echo $sale ->toJSON(JSON_PRETTY_PRINT)?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/sale/RefundSale.html b/sample/doc/sale/RefundSale.html
new file mode 100644
index 00000000..f1f36139
--- /dev/null
+++ b/sample/doc/sale/RefundSale.html
@@ -0,0 +1,38 @@
+sale/RefundSale require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \Amount ;
+use PayPal \Api \Refund ;
+use PayPal \Api \Sale ;
$amt = new Amount();
+$amt ->setCurrency('USD' )
+ ->setTotal('0.01' );
$refund = new Refund();
+$refund ->setAmount($amt );
+
+$saleId = '3RM92092UW5126232' ;
$sale = new Sale();
+$sale ->setId($saleId );
+try {
$sale ->refund($refund , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception:" . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Refund a sale</title>
+</head>
+<body>
+ <div>Refunding sale id: <?php echo $saleId ;?> </div>
+ <pre><?php echo $sale ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/vault/CreateCreditCard.html b/sample/doc/vault/CreateCreditCard.html
new file mode 100644
index 00000000..96253804
--- /dev/null
+++ b/sample/doc/vault/CreateCreditCard.html
@@ -0,0 +1,37 @@
+vault/CreateCreditCard require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \CreditCard ;
$card = new CreditCard();
+$card ->setType("visa" )
+ ->setNumber("4417119669820331" )
+ ->setExpireMonth("11" )
+ ->setExpireYear("2019" )
+ ->setCvv2("012" )
+ ->setFirstName("Joe" )
+ ->setLastName("Shopper" );
try {
+ $card ->create($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception:" . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Save a credit card</title>
+</head>
+<body>
+ <div>Saved a new credit card with id: <?php echo $card ->getId();?> </div>
+ <pre><?php echo $card ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/vault/DeleteCreditCard.html b/sample/doc/vault/DeleteCreditCard.html
new file mode 100644
index 00000000..ed58f8a0
--- /dev/null
+++ b/sample/doc/vault/DeleteCreditCard.html
@@ -0,0 +1,45 @@
+vault/DeleteCreditCard require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \CreditCard ;
$card = new CreditCard();
+$card ->setType("visa" )
+ ->setNumber("4417119669820331" )
+ ->setExpireMonth("11" )
+ ->setExpireYear("2019" )
+ ->setCvv2("012" )
+ ->setFirstName("Joe" )
+ ->setLastName("Shopper" );
try {
+ $card = $card ->create($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception:" . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+
+try {
$creditCard = CreditCard::get($card ->getId(), $apiContext );
+ $creditCard ->delete($apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Delete a saved credit card</title>
+</head>
+<body>
+ <p> Credit Card deleted Successfully</p>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/doc/vault/GetCreditCard.html b/sample/doc/vault/GetCreditCard.html
new file mode 100644
index 00000000..a596645e
--- /dev/null
+++ b/sample/doc/vault/GetCreditCard.html
@@ -0,0 +1,27 @@
+vault/GetCreditCard require __DIR__ . '/../bootstrap.php' ;
+use PayPal \Api \CreditCard ;
$cardId = "CARD-5AR29593TC404090HKIKN77Q" ;
+
+
try {
+ $card = CreditCard::get($cardId , $apiContext );
+} catch (PayPal\Exception \PPConnectionException $ex ) {
+ echo "Exception: " . $ex ->getMessage() . PHP_EOL;
+ var_dump($ex ->getData());
+ exit (1 );
+}
+?>
+<html>
+<head>
+ <title>Lookup a saved credit card</title>
+</head>
+<body>
+ <div>Retrieving saved credit card: <?php echo $cardId ;?> </div>
+ <pre><?php echo $card ->toJSON(JSON_PRETTY_PRINT);?> </pre>
+ <a href='../index.html' >Back</a>
+</body>
+</html>
\ No newline at end of file
diff --git a/sample/images/edt-format-source-button.png b/sample/images/edt-format-source-button.png
deleted file mode 100644
index 88cc504d..00000000
Binary files a/sample/images/edt-format-source-button.png and /dev/null differ
diff --git a/sample/images/favicon.ico b/sample/images/favicon.ico
new file mode 100644
index 00000000..78713f95
Binary files /dev/null and b/sample/images/favicon.ico differ
diff --git a/sample/images/play_button.png b/sample/images/play_button.png
deleted file mode 100644
index 9afac6e6..00000000
Binary files a/sample/images/play_button.png and /dev/null differ
diff --git a/sample/images/pp_v_rgb.png b/sample/images/pp_v_rgb.png
new file mode 100755
index 00000000..771c17f6
Binary files /dev/null and b/sample/images/pp_v_rgb.png differ
diff --git a/sample/index.html b/sample/index.html
index c1915060..b31067d0 100644
--- a/sample/index.html
+++ b/sample/index.html
@@ -1,121 +1,310 @@
-
-
+
+
+
-
-PayPal REST API Samples
-
+
+
+
+
+
+
+
+ PayPal REST API Samples
+
+
+
+
+
+
+
-
- PayPal REST API Samples
-
-
+
+
+
+
+
+
+
+
+
REST API Samples
+
These examples are created to experiment with the rest-api-sdk-php capabilities. Each examples are designed to demonstrate the default use-cases in each segment.
+ Many examples should be executable, and should allow you to experience the default behavior of our sdk, to expedite your integration experience.
+
+
+
+
+
+
+
+
+
+
+
Payments
+
+
+
+
+
+
Direct credit card payments
+
+
+
+
+
+
PayPal account payments
+
+
+
+
+
+
Stored credit card payments
+
+
+
+
+
+
Future payments* (needs Authorization Code from Mobile SDK)
+
+
+
+
+
+
+
+
Get payment details
+
+
+
+
+
+
Get payment history
+
+
+
+
+
+
+
+
+
+
+
Vault
+
+
+
+
+
+
+
+
+
Retrieve saved credit card
+
+
+
+
+
+
Delete saved credit card
+
+
+
+
+
+
+
+
+
Authorization and capture
+
+
+
+
+
+
Get details of an authorized payment
+
+
+
+
+
+
Capture an authorized payment
+
+
+
+
+
+
Void an authorized payment
+
+
+
+
+
+
Reauthorize a payment
+
+
+
+
+
+
Get details of a captured payment
+
+
+
+
+
+
Refund captured payment
+
+
+
+
+
+
+
+
+
Invoice
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sample/invoice/CancelInvoice.php b/sample/invoice/CancelInvoice.php
new file mode 100644
index 00000000..493adc1a
--- /dev/null
+++ b/sample/invoice/CancelInvoice.php
@@ -0,0 +1,57 @@
+setSubject("Past due")
+ ->setNote("Canceling invoice")
+ ->setSendToMerchant(true)
+ ->setSendToPayer(true);
+
+
+ // ### Cancel Invoice
+ // Cancel invoice object by calling the
+ // static `cancel` method
+ // on the Invoice class by passing a valid
+ // notification object
+ // (See bootstrap.php for more on `ApiContext`)
+ $cancelStatus = $invoice->cancel($notify, $apiContext);
+} catch (PayPal\Exception\PPConnectionException $ex) {
+ echo "Exception: " . $ex->getMessage() . PHP_EOL;
+ var_dump($ex->getData());
+ exit(1);
+}
+
+?>
+
+
+
+ Cancel Invoice
+
+
+Cancel Invoice:
+toJSON(JSON_PRETTY_PRINT); ?>
+Back
+
+
diff --git a/sample/invoice/CreateInvoice.php b/sample/invoice/CreateInvoice.php
new file mode 100644
index 00000000..2df26fcb
--- /dev/null
+++ b/sample/invoice/CreateInvoice.php
@@ -0,0 +1,119 @@
+setMerchantInfo(new MerchantInfo())
+ ->setBillingInfo(array(new BillingInfo()))
+ ->setItems(array(new InvoiceItem()))
+ ->setNote("Medical Invoice 16 Jul, 2013 PST")
+ ->setPaymentTerm(new PaymentTerm())
+ ->setShippingInfo(new ShippingInfo());
+
+// ### Merchant Info
+// A resource representing merchant information that can be
+// used to identify merchant
+$invoice->getMerchantInfo()
+ ->setEmail("PPX.DevNet-facilitator@gmail.com")
+ ->setFirstName("Dennis")
+ ->setLastName("Doctor")
+ ->setbusinessName("Medical Professionals, LLC")
+ ->setPhone(new Phone())
+ ->setAddress(new Address());
+
+$invoice->getMerchantInfo()->getPhone()
+ ->setCountryCode("001")
+ ->setNationalNumber("5032141716");
+
+// ### Address Information
+// The address used for creating the invoice
+$invoice->getMerchantInfo()->getAddress()
+ ->setLine1("1234 Main St.")
+ ->setCity("Portland")
+ ->setState("OR")
+ ->setPostalCode("97217")
+ ->setCountryCode("US");
+
+// ### Billing Information
+// Set the email address for each billing
+$billing = $invoice->getBillingInfo();
+$billing[0]
+ ->setEmail("example@example.com");
+
+// ### Items List
+// You could provide the list of all items for
+// detailed breakdown of invoice
+$items = $invoice->getItems();
+$items[0]
+ ->setName("Sutures")
+ ->setQuantity(100)
+ ->setUnitPrice(new Currency());
+
+$items[0]->getUnitPrice()
+ ->setCurrency("USD")
+ ->setValue(5);
+
+$invoice->getPaymentTerm()
+ ->setTermType("NET_45");
+
+// ### Shipping Information
+$invoice->getShippingInfo()
+ ->setFirstName("Sally")
+ ->setLastName("Patient")
+ ->setBusinessName("Not applicable")
+ ->setPhone(new Phone())
+ ->setAddress(new Address());
+
+$invoice->getShippingInfo()->getPhone()
+ ->setCountryCode("001")
+ ->setNationalNumber("5039871234");
+
+$invoice->getShippingInfo()->getAddress()
+ ->setLine1("1234 Main St.")
+ ->setCity("Portland")
+ ->setState("OR")
+ ->setPostalCode("97217")
+ ->setCountryCode("US");
+
+try {
+ // ### Create Invoice
+ // Create an invoice by calling the invoice->create() method
+ // with a valid ApiContext (See bootstrap.php for more on `ApiContext`)
+ $invoice->create($apiContext);
+} catch (PayPal\Exception\PPConnectionException $ex) {
+ echo "Exception: " . $ex->getMessage() . PHP_EOL;
+ var_dump($ex->getData());
+ exit(1);
+}
+?>
+
+
+ Invoice Creation
+
+
+
+ Created Invoice:
+ getId(); ?>
+
+toJSON(JSON_PRETTY_PRINT); ?>
+Back
+
+
diff --git a/sample/invoice/GetInvoice.php b/sample/invoice/GetInvoice.php
new file mode 100644
index 00000000..1a480386
--- /dev/null
+++ b/sample/invoice/GetInvoice.php
@@ -0,0 +1,35 @@
+getMessage() . PHP_EOL;
+ var_dump($ex->getData());
+ exit(1);
+}
+?>
+
+
+ Lookup invoice details
+
+
+ Retrieving Invoice:
+ toJSON(JSON_PRETTY_PRINT); ?>
+ Back
+
+
diff --git a/sample/invoice/ListInvoice.php b/sample/invoice/ListInvoice.php
new file mode 100644
index 00000000..9f69ffe0
--- /dev/null
+++ b/sample/invoice/ListInvoice.php
@@ -0,0 +1,32 @@
+getMessage() . PHP_EOL;
+ var_dump($ex->getData());
+ exit(1);
+}
+?>
+
+
+ Lookup invoice history
+
+
+ Got invoices
+ toJSON(JSON_PRETTY_PRINT); ?>
+ Back
+
+
diff --git a/sample/invoice/RemindInvoice.php b/sample/invoice/RemindInvoice.php
new file mode 100644
index 00000000..0ecb237a
--- /dev/null
+++ b/sample/invoice/RemindInvoice.php
@@ -0,0 +1,55 @@
+setSubject("Past due")
+ ->setNote("Please pay soon")
+ ->setSendToMerchant(true);
+
+ // ### Remind Invoice
+ // Remind the notifiers by calling the
+ // `remind` method
+ // on the Invoice class by passing a valid
+ // notification object
+ // (See bootstrap.php for more on `ApiContext`)
+ $remindStatus = $invoice->remind($notify, $apiContext);
+} catch (PayPal\Exception\PPConnectionException $ex) {
+ echo "Exception: " . $ex->getMessage() . PHP_EOL;
+ var_dump($ex->getData());
+ exit(1);
+}
+
+?>
+
+
+
+ Remind Invoice
+
+
+Remind Invoice:
+toJSON(JSON_PRETTY_PRINT); ?>
+Back
+
+
diff --git a/sample/invoice/SendInvoice.php b/sample/invoice/SendInvoice.php
new file mode 100644
index 00000000..47405598
--- /dev/null
+++ b/sample/invoice/SendInvoice.php
@@ -0,0 +1,40 @@
+send($apiContext);
+} catch (PayPal\Exception\PPConnectionException $ex) {
+ echo "Exception: " . $ex->getMessage() . PHP_EOL;
+ var_dump($ex->getData());
+ exit(1);
+}
+
+?>
+
+
+ Send Invoice
+
+
+Send Invoice:
+toJSON(JSON_PRETTY_PRINT); ?>
+Back
+
+
diff --git a/sample/invoicing/CancelInvoice.php b/sample/invoicing/CancelInvoice.php
deleted file mode 100644
index 5abefd6f..00000000
--- a/sample/invoicing/CancelInvoice.php
+++ /dev/null
@@ -1,37 +0,0 @@
-setSubject("Past due")
- ->setNote("Canceling invoice")
- ->setSendToMerchant(true)
- ->setSendToPayer(true);
-
-
- $cancelStatus = $invoice->cancel($notify, $apiContext);
-} catch (PayPal\Exception\PPConnectionException $ex) {
- echo "Exception: " . $ex->getMessage() . PHP_EOL;
- var_dump($ex->getData());
- exit(1);
-}
-
-?>
-
-
-
- Cancel Invoice
-
-
- Cancel Invoice:
-
- Back
-
-
diff --git a/sample/invoicing/CreateInvoice.php b/sample/invoicing/CreateInvoice.php
deleted file mode 100644
index e67fcab8..00000000
--- a/sample/invoicing/CreateInvoice.php
+++ /dev/null
@@ -1,100 +0,0 @@
-setMerchantInfo(new MerchantInfo())
- ->setBillingInfo(array(new BillingInfo()))
- ->setItems(array(new InvoiceItem()))
- ->setNote("Medical Invoice 16 Jul, 2013 PST")
- ->setPaymentTerm(new PaymentTerm())
- ->setShippingInfo(new ShippingInfo());
-
-$invoice->getMerchantInfo()
- ->setEmail("PPX.DevNet-facilitator@gmail.com")
- ->setFirstName("Dennis")
- ->setLastName("Doctor")
- ->setbusinessName("Medical Professionals, LLC")
- ->setPhone(new Phone())
- ->setAddress(new Address());
-
-$invoice->getMerchantInfo()->getPhone()
- ->setCountryCode("001")
- ->setNationalNumber("5032141716");
-
-$invoice->getMerchantInfo()->getAddress()
- ->setLine1("1234 Main St.")
- ->setCity("Portland")
- ->setState("OR")
- ->setPostalCode("97217")
- ->setCountryCode("US");
-
-$billing = $invoice->getBillingInfo();
-$billing[0]
- ->setEmail("example@example.com");
-
-$items = $invoice->getItems();
-$items[0]
- ->setName("Sutures")
- ->setQuantity(100)
- ->setUnitPrice(new Currency());
-
-$items[0]->getUnitPrice()
- ->setCurrency("USD")
- ->setValue(5);
-
-$invoice->getPaymentTerm()
- ->setTermType("NET_45");
-
-$invoice->getShippingInfo()
- ->setFirstName("Sally")
- ->setLastName("Patient")
- ->setBusinessName("Not applicable")
- ->setPhone(new Phone())
- ->setAddress(new Address());
-
-$invoice->getShippingInfo()->getPhone()
- ->setCountryCode("001")
- ->setNationalNumber("5039871234");
-
-$invoice->getShippingInfo()->getAddress()
- ->setLine1("1234 Main St.")
- ->setCity("Portland")
- ->setState("OR")
- ->setPostalCode("97217")
- ->setCountryCode("US");
-
-print(var_dump($invoice->toArray()));
-
-try {
- $invoice->create($apiContext);
-} catch (PayPal\Exception\PPConnectionException $ex) {
- echo "Exception: " . $ex->getMessage() . PHP_EOL;
- var_dump($ex->getData());
- exit(1);
-}
-?>
-
-
- Direct Credit card payments
-
-
-
- Created Invoice:
- getId();?>
-
- toArray());?>
- Back
-
-
diff --git a/sample/invoicing/GetInvoice.php b/sample/invoicing/GetInvoice.php
deleted file mode 100644
index 3add02c1..00000000
--- a/sample/invoicing/GetInvoice.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- Lookup invoice details
-
-
- Retrieving Invoice:
-
- Back
-
-
diff --git a/sample/invoicing/ListInvoice.php b/sample/invoicing/ListInvoice.php
deleted file mode 100644
index 420ebba4..00000000
--- a/sample/invoicing/ListInvoice.php
+++ /dev/null
@@ -1,22 +0,0 @@
-getMessage() . PHP_EOL;
- var_dump($ex->getData());
- exit(1);
-}
-?>
-
-
- Lookup invoice history
-
-
- Got invoices
- toArray());?>
- Back
-
-
diff --git a/sample/invoicing/RemindInvoice.php b/sample/invoicing/RemindInvoice.php
deleted file mode 100644
index 1d20789b..00000000
--- a/sample/invoicing/RemindInvoice.php
+++ /dev/null
@@ -1,35 +0,0 @@
-setSubject("Past due")
- ->setNote("Please pay soon")
- ->setSendToMerchant(true);
-
- $remindStatus = $invoice->remind($notify, $apiContext);
-} catch (PayPal\Exception\PPConnectionException $ex) {
- echo "Exception: " . $ex->getMessage() . PHP_EOL;
- var_dump($ex->getData());
- exit(1);
-}
-
-?>
-
-
-
- Remind Invoice
-
-
- Remind Invoice:
-
- Back
-
-
diff --git a/sample/invoicing/SendInvoice.php b/sample/invoicing/SendInvoice.php
deleted file mode 100644
index 61d39cc8..00000000
--- a/sample/invoicing/SendInvoice.php
+++ /dev/null
@@ -1,27 +0,0 @@
-send($apiContext);
-} catch (PayPal\Exception\PPConnectionException $ex) {
- echo "Exception: " . $ex->getMessage() . PHP_EOL;
- var_dump($ex->getData());
- exit(1);
-}
-
-?>
-
-
- Send Invoice
-
-
- Send Invoice:
-
- Back
-
-
diff --git a/sample/payments/AuthorizationCapture.php b/sample/payments/AuthorizationCapture.php
index 0bfce9ea..6e3c7b82 100644
--- a/sample/payments/AuthorizationCapture.php
+++ b/sample/payments/AuthorizationCapture.php
@@ -48,7 +48,7 @@
Captured payment getParentPayment(); ?>. Capture Id:
getId();?>
- toArray());?>
+ toJSON(JSON_PRETTY_PRINT);?>
Back
Cancel Invoice Sample
+This sample code demonstrate how you can cancel +an invoice.