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,19 +13,20 @@ use PayPal\Validation\ArgumentValidator;
*
* @package PayPal\Api
*
* @property string id
* @property string purchase_unit_reference_id
* @property \PayPal\Api\Amount amount
* @property string payment_mode
* @property string state
* @property string reason_code
* @property string pending_reason
* @property string protection_eligibility
* @property string protection_eligibility_type
* @property string parent_payment
* @property string id
* @property string purchase_unit_reference_id
* @property \PayPal\Api\Amount amount
* @property string payment_mode
* @property string state
* @property string reason_code
* @property string pending_reason
* @property string protection_eligibility
* @property string protection_eligibility_type
* @property string parent_payment
* @property \PayPal\Api\FmfDetails fmf_details
* @property string create_time
* @property string update_time
* @property string create_time
* @property string update_time
* @property \PayPal\Api\Links[] links
*/
class Order extends PayPalResourceModel
{
@@ -34,7 +34,7 @@ class Order extends PayPalResourceModel
* Identifier of the order transaction.
*
* @param string $id
*
*
* @return $this
*/
public function setId($id)
@@ -57,7 +57,7 @@ class Order extends PayPalResourceModel
* Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
*
* @param string $purchase_unit_reference_id
*
*
* @return $this
*/
public function setPurchaseUnitReferenceId($purchase_unit_reference_id)
@@ -80,7 +80,7 @@ class Order extends PayPalResourceModel
* Amount being collected.
*
* @param \PayPal\Api\Amount $amount
*
*
* @return $this
*/
public function setAmount($amount)
@@ -104,7 +104,7 @@ class Order extends PayPalResourceModel
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
*
* @param string $payment_mode
*
*
* @return $this
*/
public function setPaymentMode($payment_mode)
@@ -128,7 +128,7 @@ class Order extends PayPalResourceModel
* Valid Values: ["pending", "completed", "refunded", "partially_refunded", "voided"]
*
* @param string $state
*
*
* @return $this
*/
public function setState($state)
@@ -148,11 +148,11 @@ class Order extends PayPalResourceModel
}
/**
* Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually
* Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`.
* Valid Values: ["PAYER_SHIPPING_UNCONFIRMED", "MULTI_CURRENCY", "RISK_REVIEW", "REGULATORY_REVIEW", "VERIFICATION_REQUIRED", "ORDER", "OTHER"]
*
* @param string $reason_code
*
*
* @return $this
*/
public function setReasonCode($reason_code)
@@ -162,7 +162,7 @@ class Order extends PayPalResourceModel
}
/**
* Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually
* Reason code for the transaction state being Pending or Reversed. Only supported when the `payment_method` is set to `paypal`.
*
* @return string
*/
@@ -172,11 +172,11 @@ class Order extends PayPalResourceModel
}
/**
* Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead.
* [DEPRECATED] Reason the transaction is in pending state. Use reason_code field above instead.
* Valid Values: ["payer_shipping_unconfirmed", "multi_currency", "risk_review", "regulatory_review", "verification_required", "order", "other"]
*
* @param string $pending_reason
*
*
* @return $this
*/
public function setPendingReason($pending_reason)
@@ -186,7 +186,7 @@ class Order extends PayPalResourceModel
}
/**
* Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead.
* @deprecated [DEPRECATED] Reason the transaction is in pending state. Use reason_code field above instead.
*
* @return string
*/
@@ -196,58 +196,58 @@ class Order extends PayPalResourceModel
}
/**
* Protection Eligibility of the Payer
* The level of seller protection in force for the transaction.
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
*
* @param string $protection_eligibility
*
*
* @return $this
*/
public function setProtectionEligibility($protection_eligibility)
{
$this->{"protection-eligibility"} = $protection_eligibility;
$this->protection_eligibility = $protection_eligibility;
return $this;
}
/**
* Protection Eligibility of the Payer
* The level of seller protection in force for the transaction.
*
* @return string
*/
public function getProtectionEligibility()
{
return $this->{"protection-eligibility"};
return $this->protection_eligibility;
}
/**
* Protection Eligibility Type of the Payer
* Valid Values: ["ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE", "INELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE"]
* The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:<br> `ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.<br> `UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.<br> One or both of the allowed values can be returned.
* Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]
*
* @param string $protection_eligibility_type
*
*
* @return $this
*/
public function setProtectionEligibilityType($protection_eligibility_type)
{
$this->{"protection-eligibility_type"} = $protection_eligibility_type;
$this->protection_eligibility_type = $protection_eligibility_type;
return $this;
}
/**
* Protection Eligibility Type of the Payer
* The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:<br> `ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.<br> `UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.<br> One or both of the allowed values can be returned.
*
* @return string
*/
public function getProtectionEligibilityType()
{
return $this->{"protection-eligibility_type"};
return $this->protection_eligibility_type;
}
/**
* ID of the Payment resource that this transaction is based on.
*
* @param string $parent_payment
*
*
* @return $this
*/
public function setParentPayment($parent_payment)
@@ -270,7 +270,7 @@ class Order extends PayPalResourceModel
* Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
*
* @param \PayPal\Api\FmfDetails $fmf_details
*
*
* @return $this
*/
public function setFmfDetails($fmf_details)
@@ -293,7 +293,7 @@ class Order extends PayPalResourceModel
* Time the resource was created in UTC ISO8601 format.
*
* @param string $create_time
*
*
* @return $this
*/
public function setCreateTime($create_time)
@@ -316,7 +316,7 @@ class Order extends PayPalResourceModel
* Time the resource was last updated in UTC ISO8601 format.
*
* @param string $update_time
*
*
* @return $this
*/
public function setUpdateTime($update_time)
@@ -338,9 +338,9 @@ class Order extends PayPalResourceModel
/**
* Retrieve details about an order by passing the order_id in the request URI.
*
* @param string $orderId
* @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 $orderId
* @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 Order
*/
public static function get($orderId, $apiContext = null, $restCall = null)
@@ -361,11 +361,11 @@ class Order extends PayPalResourceModel
}
/**
* Capture a payment on an order by passing the order_id in the request URI. In addition, include the amount of the payment and indicate whether this is a final capture for the given authorization in the body of the request JSON. To issue this request, an original payment call must specify an intent of order.
* Capture a payment. In addition, include the amount of the payment and indicate whether this is a final capture for the given authorization in the body of the request JSON.
*
* @param Capture $capture
* @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 Capture $capture
* @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 function capture($capture, $apiContext = null, $restCall = null)
@@ -389,8 +389,8 @@ class Order extends PayPalResourceModel
/**
* Void (cancel) an order by passing the order_id in the request URI. Note that an order cannot be voided if payment has already been partially or fully captured.
*
* @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 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 Order
*/
public function void($apiContext = null, $restCall = null)
@@ -413,8 +413,8 @@ class Order extends PayPalResourceModel
* Authorize an order by passing the order_id in the request URI. In addition, include an amount object in the body of the request JSON.
*
* @param Authorization $authorization Authorization Object with Amount value to be authorized
* @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 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 Authorization
*/
public function authorize($authorization, $apiContext = null, $restCall = null)