Payments API Updates

This commit is contained in:
Jay Patel
2015-10-02 14:25:46 -05:00
parent 02fca1bda4
commit a37b880e96
112 changed files with 3857 additions and 1495 deletions

View File

@@ -4,7 +4,6 @@ namespace PayPal\Api;
use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -14,23 +13,23 @@ use PayPal\Validation\ArgumentValidator;
*
* @package PayPal\Api
*
* @property string id
* @property string create_time
* @property string update_time
* @property \PayPal\Api\Amount amount
* @property bool is_final_capture
* @property string state
* @property string parent_payment
* @property string id
* @property \PayPal\Api\Amount amount
* @property bool is_final_capture
* @property string state
* @property string parent_payment
* @property \PayPal\Api\Currency transaction_fee
* @property \PayPal\Api\Links[] links
* @property string create_time
* @property string update_time
* @property \PayPal\Api\Links[] links
*/
class Capture extends PayPalResourceModel
{
/**
* Identifier of the Capture transaction.
* ID of the capture transaction.
*
* @param string $id
*
*
* @return $this
*/
public function setId($id)
@@ -40,7 +39,7 @@ class Capture extends PayPalResourceModel
}
/**
* Identifier of the Capture transaction.
* ID of the capture transaction.
*
* @return string
*/
@@ -50,10 +49,10 @@ class Capture extends PayPalResourceModel
}
/**
* Amount being captured. If no amount is specified, amount is used from the authorization being captured. If amount is same as the amount that's authorized for, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured. Alternatively, you could indicate a final capture by setting the is_final_capture flag to true.
* Amount being captured. If the amount matches the orginally authorized amount, the state of the authorization changes to `captured`. If not, the state of the authorization changes to `partially_captured`.
*
* @param \PayPal\Api\Amount $amount
*
*
* @return $this
*/
public function setAmount($amount)
@@ -63,7 +62,7 @@ class Capture extends PayPalResourceModel
}
/**
* Amount being captured. If no amount is specified, amount is used from the authorization being captured. If amount is same as the amount that's authorized for, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured. Alternatively, you could indicate a final capture by setting the is_final_capture flag to true.
* Amount being captured. If the amount matches the orginally authorized amount, the state of the authorization changes to `captured`. If not, the state of the authorization changes to `partially_captured`.
*
* @return \PayPal\Api\Amount
*/
@@ -73,10 +72,10 @@ class Capture extends PayPalResourceModel
}
/**
* whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
* If set to `true`, all remaining funds held by the authorization will be released in the funding instrument.
*
* @param bool $is_final_capture
*
*
* @return $this
*/
public function setIsFinalCapture($is_final_capture)
@@ -86,7 +85,7 @@ class Capture extends PayPalResourceModel
}
/**
* whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
* If set to `true`, all remaining funds held by the authorization will be released in the funding instrument.
*
* @return bool
*/
@@ -96,11 +95,11 @@ class Capture extends PayPalResourceModel
}
/**
* State of the capture transaction.
* State of the capture.
* Valid Values: ["pending", "completed", "refunded", "partially_refunded"]
*
* @param string $state
*
*
* @return $this
*/
public function setState($state)
@@ -110,7 +109,7 @@ class Capture extends PayPalResourceModel
}
/**
* State of the capture transaction.
* State of the capture.
*
* @return string
*/
@@ -120,10 +119,10 @@ class Capture extends PayPalResourceModel
}
/**
* ID of the Payment resource that this transaction is based on.
* ID of the payment resource on which this transaction is based.
*
* @param string $parent_payment
*
*
* @return $this
*/
public function setParentPayment($parent_payment)
@@ -133,7 +132,7 @@ class Capture extends PayPalResourceModel
}
/**
* ID of the Payment resource that this transaction is based on.
* ID of the payment resource on which this transaction is based.
*
* @return string
*/
@@ -146,7 +145,7 @@ class Capture extends PayPalResourceModel
* Transaction fee applicable for this payment.
*
* @param \PayPal\Api\Currency $transaction_fee
*
*
* @return $this
*/
public function setTransactionFee($transaction_fee)
@@ -166,10 +165,10 @@ class Capture extends PayPalResourceModel
}
/**
* Time the resource was created in UTC ISO8601 format.
* Time of capture as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @param string $create_time
*
*
* @return $this
*/
public function setCreateTime($create_time)
@@ -179,7 +178,7 @@ class Capture extends PayPalResourceModel
}
/**
* Time the resource was created in UTC ISO8601 format.
* Time of capture as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
*
* @return string
*/
@@ -189,10 +188,10 @@ class Capture extends PayPalResourceModel
}
/**
* Time the resource was last updated in UTC ISO8601 format.
* Time that the resource was last updated.
*
* @param string $update_time
*
*
* @return $this
*/
public function setUpdateTime($update_time)
@@ -202,7 +201,7 @@ class Capture extends PayPalResourceModel
}
/**
* Time the resource was last updated in UTC ISO8601 format.
* Time that the resource was last updated.
*
* @return string
*/
@@ -214,9 +213,9 @@ class Capture extends PayPalResourceModel
/**
* Retrieve details about a captured payment by passing the capture_id in the request URI.
*
* @param string $captureId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @param string $captureId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Capture
*/
public static function get($captureId, $apiContext = null, $restCall = null)
@@ -239,9 +238,9 @@ class Capture extends PayPalResourceModel
/**
* Refund a captured payment by passing the capture_id in the request URI. In addition, include an amount object in the body of the request JSON.
*
* @param Refund $refund
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @param Refund $refund
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
* @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Refund
*/
public function refund($refund, $apiContext = null, $restCall = null)