forked from LiveCarta/PayPal-PHP-SDK
Update Payouts to v1.2
This commit is contained in:
@@ -19,7 +19,7 @@ use PayPal\Validation\NumericValidator;
|
||||
class Currency extends PayPalModel
|
||||
{
|
||||
/**
|
||||
* 3 letter currency code as defined by ISO 4217.
|
||||
* 3 letter currency code
|
||||
*
|
||||
* @param string $currency
|
||||
*
|
||||
@@ -32,7 +32,7 @@ class Currency extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 3 letter currency code as defined by ISO 4217.
|
||||
* 3 letter currency code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -42,7 +42,7 @@ class Currency extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code.
|
||||
* amount upto 2 decimals represented as string
|
||||
*
|
||||
* @param string|double $value
|
||||
*
|
||||
@@ -57,7 +57,7 @@ class Currency extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code.
|
||||
* amount upto 2 decimals represented as string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -68,6 +68,54 @@ class Error extends PayPalModel
|
||||
return $this->purchase_unit_reference_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal internal error code.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $code
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->code = $code;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal internal error code.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal internal identifier used for correlation purposes.
|
||||
*
|
||||
* @param string $debug_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Message describing the error.
|
||||
*
|
||||
@@ -92,28 +140,26 @@ class Error extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal internal error code.
|
||||
* URI for detailed information related to this error for the developer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @param string $code
|
||||
* @param string $information_link
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
public function setInformationLink($information_link)
|
||||
{
|
||||
$this->code = $code;
|
||||
$this->information_link = $information_link;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal internal error code.
|
||||
* URI for detailed information related to this error for the developer.
|
||||
*
|
||||
* @deprecated Not publicly available
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
public function getInformationLink()
|
||||
{
|
||||
return $this->code;
|
||||
return $this->information_link;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,52 +265,6 @@ class Error extends PayPalModel
|
||||
return $this->fmf_details;
|
||||
}
|
||||
|
||||
/**
|
||||
* URI for detailed information related to this error for the developer.
|
||||
*
|
||||
* @param string $information_link
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal internal identifier used for correlation purposes.
|
||||
*
|
||||
* @param string $debug_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Links
|
||||
*
|
||||
@@ -317,5 +317,4 @@ class Error extends PayPalModel
|
||||
array_diff($this->getLinks(), array($links))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* Class Patch
|
||||
*
|
||||
* A JSON patch object used for applying partial updates to resources.
|
||||
* A JSON Patch object used for doing partial updates to resources.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string op
|
||||
* @property string path
|
||||
* @property mixed value
|
||||
* @property mixed value
|
||||
* @property string from
|
||||
*/
|
||||
class Patch extends PayPalModel
|
||||
@@ -43,7 +43,7 @@ class Patch extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* String containing a JSON Pointer value that references a location within the target document where the operation is performed.
|
||||
* string containing a JSON-Pointer value that references a location within the target document (the target location) where the operation is performed.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
@@ -56,7 +56,7 @@ class Patch extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* String containing a JSON Pointer value that references a location within the target document where the operation is performed.
|
||||
* string containing a JSON-Pointer value that references a location within the target document (the target location) where the operation is performed.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ class Patch extends PayPalModel
|
||||
/**
|
||||
* New value to apply based on the operation.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param string $value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ class Patch extends PayPalModel
|
||||
/**
|
||||
* New value to apply based on the operation.
|
||||
*
|
||||
* @return mixed
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* Class PayoutBatch
|
||||
*
|
||||
* The batch status as generated by PayPal.
|
||||
* The PayPal-generated batch status.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
@@ -18,7 +18,7 @@ use PayPal\Common\PayPalModel;
|
||||
class PayoutBatch extends PayPalModel
|
||||
{
|
||||
/**
|
||||
* A batch header that includes the generated batch status.
|
||||
* A batch header. Includes the generated batch status.
|
||||
*
|
||||
* @param \PayPal\Api\PayoutBatchHeader $batch_header
|
||||
*
|
||||
@@ -31,7 +31,7 @@ class PayoutBatch extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* A batch header that includes the generated batch status.
|
||||
* A batch header. Includes the generated batch status.
|
||||
*
|
||||
* @return \PayPal\Api\PayoutBatchHeader
|
||||
*/
|
||||
@@ -41,7 +41,7 @@ class PayoutBatch extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of the items in a batch payout.
|
||||
* An array of items in a batch payout.
|
||||
*
|
||||
* @param \PayPal\Api\PayoutItemDetails[] $items
|
||||
*
|
||||
@@ -54,7 +54,7 @@ class PayoutBatch extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of the items in a batch payout.
|
||||
* An array of items in a batch payout.
|
||||
*
|
||||
* @return \PayPal\Api\PayoutItemDetails[]
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* Class PayoutBatchHeader
|
||||
*
|
||||
* This object enables you to get payout header information for an entire batch request. This object represents payout header data, and can be the response to a batch header request.
|
||||
* Batch header resource.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use PayPal\Common\PayPalModel;
|
||||
class PayoutBatchHeader extends PayPalModel
|
||||
{
|
||||
/**
|
||||
* An ID for the batch payout. Generated by PayPal. 30 characters max.
|
||||
* The PayPal-generated ID for a batch payout.
|
||||
*
|
||||
* @param string $payout_batch_id
|
||||
*
|
||||
@@ -37,7 +37,7 @@ class PayoutBatchHeader extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* An ID for the batch payout. Generated by PayPal. 30 characters max.
|
||||
* The PayPal-generated ID for a batch payout.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ class PayoutBatchHeader extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated batch status.
|
||||
* The PayPal-generated batch payout status. If the batch payout passes the preliminary checks, the status is `PENDING`.
|
||||
*
|
||||
* @param string $batch_status
|
||||
*
|
||||
@@ -60,7 +60,7 @@ class PayoutBatchHeader extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated batch status.
|
||||
* The PayPal-generated batch payout status. If the batch payout passes the preliminary checks, the status is `PENDING`.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -129,7 +129,7 @@ class PayoutBatchHeader extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The original batch header as provided by the payment sender.
|
||||
* The sender-provided batch payout header.
|
||||
*
|
||||
* @return \PayPal\Api\PayoutSenderBatchHeader
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ use PayPal\Validation\ArgumentValidator;
|
||||
/**
|
||||
* Class PayoutItem
|
||||
*
|
||||
* Sender-created description of a payout to a single recipient.
|
||||
* A sender-created definition of a payout to a single recipient.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
@@ -23,7 +23,7 @@ use PayPal\Validation\ArgumentValidator;
|
||||
class PayoutItem extends PayPalResourceModel
|
||||
{
|
||||
/**
|
||||
* The type of identification for the payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`.
|
||||
* The type of ID that identifies the payment receiver. Value is:<ul><code>EMAIL</code>. Unencrypted email. Value is a string of up to 127 single-byte characters.</li><li><code>PHONE</code>. Unencrypted phone number.<blockquote><strong>Note:</strong> The PayPal sandbox does not support the <code>PHONE</code> recipient type.</blockquote></li><li><code>PAYPAL_ID</code>. Encrypted PayPal account number.</li></ul>If the <code>sender_batch_header</code> includes the <code>recipient_type</code> attribute, any payout item without its own <code>recipient_type</code> attribute uses the <code>recipient_type</code> value from <code>sender_batch_header</code>. If the <code>sender_batch_header</code> omits the <code>recipient_type</code> attribute, each payout item must include its own <code>recipient_type</code> value.
|
||||
*
|
||||
* @param string $recipient_type
|
||||
*
|
||||
@@ -36,7 +36,7 @@ class PayoutItem extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of identification for the payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`.
|
||||
* The type of ID that identifies the payment receiver. Value is:<ul><code>EMAIL</code>. Unencrypted email. Value is a string of up to 127 single-byte characters.</li><li><code>PHONE</code>. Unencrypted phone number.<blockquote><strong>Note:</strong> The PayPal sandbox does not support the <code>PHONE</code> recipient type.</blockquote></li><li><code>PAYPAL_ID</code>. Encrypted PayPal account number.</li></ul>If the <code>sender_batch_header</code> includes the <code>recipient_type</code> attribute, any payout item without its own <code>recipient_type</code> attribute uses the <code>recipient_type</code> value from <code>sender_batch_header</code>. If the <code>sender_batch_header</code> omits the <code>recipient_type</code> attribute, each payout item must include its own <code>recipient_type</code> value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ class PayoutItem extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The amount of money to pay a receiver.
|
||||
* The amount of money to pay the receiver.
|
||||
*
|
||||
* @param \PayPal\Api\Currency $amount
|
||||
*
|
||||
@@ -59,7 +59,7 @@ class PayoutItem extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The amount of money to pay a receiver.
|
||||
* The amount of money to pay the receiver.
|
||||
*
|
||||
* @return \PayPal\Api\Currency
|
||||
*/
|
||||
@@ -69,7 +69,7 @@ class PayoutItem extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Note for notifications. The note is provided by the payment sender. This note can be any string. 4000 characters max.
|
||||
* Optional. A sender-specified note for notifications. Value is any string value.
|
||||
*
|
||||
* @param string $note
|
||||
*
|
||||
@@ -82,7 +82,7 @@ class PayoutItem extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Note for notifications. The note is provided by the payment sender. This note can be any string. 4000 characters max.
|
||||
* Optional. A sender-specified note for notifications. Value is any string value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -92,7 +92,7 @@ class PayoutItem extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The receiver of the payment. In a call response, the format of this value corresponds to the `recipient_type` specified in the request. 127 characters max.
|
||||
* The receiver of the payment. Corresponds to the `recipient_type` value in the request.
|
||||
*
|
||||
* @param string $receiver
|
||||
*
|
||||
@@ -105,7 +105,7 @@ class PayoutItem extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The receiver of the payment. In a call response, the format of this value corresponds to the `recipient_type` specified in the request. 127 characters max.
|
||||
* The receiver of the payment. Corresponds to the `recipient_type` value in the request.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -115,7 +115,7 @@ class PayoutItem extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* A sender-specific ID number, used in an accounting system for tracking purposes. 30 characters max.
|
||||
* A sender-specified ID number. Tracks the batch payout in an accounting system.
|
||||
*
|
||||
* @param string $sender_item_id
|
||||
*
|
||||
@@ -128,7 +128,7 @@ class PayoutItem extends PayPalResourceModel
|
||||
}
|
||||
|
||||
/**
|
||||
* A sender-specific ID number, used in an accounting system for tracking purposes. 30 characters max.
|
||||
* A sender-specified ID number. Tracks the batch payout in an accounting system.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -186,5 +186,4 @@ class PayoutItem extends PayPalResourceModel
|
||||
$ret->fromJson($json);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* Class PayoutItemDetails
|
||||
*
|
||||
* This object contains status and other data for an individual payout of a batch.
|
||||
* The payout item status and other details.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
@@ -25,7 +25,7 @@ use PayPal\Common\PayPalModel;
|
||||
class PayoutItemDetails extends PayPalModel
|
||||
{
|
||||
/**
|
||||
* An ID for an individual payout. Provided by PayPal, such as in the case of getting the status of a batch request. 30 characters max.
|
||||
* The ID for the payout item. Viewable when you show details for a batch payout.
|
||||
*
|
||||
* @param string $payout_item_id
|
||||
*
|
||||
@@ -38,7 +38,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* An ID for an individual payout. Provided by PayPal, such as in the case of getting the status of a batch request. 30 characters max.
|
||||
* The ID for the payout item. Viewable when you show details for a batch payout.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -48,7 +48,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated ID for the transaction. 30 characters max.
|
||||
* The PayPal-generated ID for the transaction.
|
||||
*
|
||||
* @param string $transaction_id
|
||||
*
|
||||
@@ -61,7 +61,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated ID for the transaction. 30 characters max.
|
||||
* The PayPal-generated ID for the transaction.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Status of a transaction.
|
||||
* The transaction status.
|
||||
*
|
||||
* @param string $transaction_status
|
||||
*
|
||||
@@ -84,7 +84,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Status of a transaction.
|
||||
* The transaction status.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -94,7 +94,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount of money in U.S. dollars for fees.
|
||||
* The amount of money, in U.S. dollars, for fees.
|
||||
*
|
||||
* @param \PayPal\Api\Currency $payout_item_fee
|
||||
*
|
||||
@@ -107,7 +107,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount of money in U.S. dollars for fees.
|
||||
* The amount of money, in U.S. dollars, for fees.
|
||||
*
|
||||
* @return \PayPal\Api\Currency
|
||||
*/
|
||||
@@ -117,7 +117,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* An ID for the batch payout. Generated by PayPal. 30 characters max.
|
||||
* The PayPal-generated ID for the batch payout.
|
||||
*
|
||||
* @param string $payout_batch_id
|
||||
*
|
||||
@@ -130,7 +130,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* An ID for the batch payout. Generated by PayPal. 30 characters max.
|
||||
* The PayPal-generated ID for the batch payout.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -140,7 +140,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Sender-created ID for tracking the batch in an accounting system. 30 characters max.
|
||||
* A sender-specified ID number. Tracks the batch payout in an accounting system.
|
||||
*
|
||||
* @param string $sender_batch_id
|
||||
*
|
||||
@@ -153,7 +153,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Sender-created ID for tracking the batch in an accounting system. 30 characters max.
|
||||
* A sender-specified ID number. Tracks the batch payout in an accounting system.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -163,7 +163,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The data for a payout item that the sender initially provided.
|
||||
* The sender-provided information for the payout item.
|
||||
*
|
||||
* @param \PayPal\Api\PayoutItem $payout_item
|
||||
*
|
||||
@@ -176,7 +176,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The data for a payout item that the sender initially provided.
|
||||
* The sender-provided information for the payout item.
|
||||
*
|
||||
* @return \PayPal\Api\PayoutItem
|
||||
*/
|
||||
@@ -186,7 +186,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Time of the last processing for this item.
|
||||
* The date and time when this item was last processed.
|
||||
*
|
||||
* @param string $time_processed
|
||||
*
|
||||
@@ -199,7 +199,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Time of the last processing for this item.
|
||||
* The date and time when this item was last processed.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -209,7 +209,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Error
|
||||
* Sets Errors
|
||||
*
|
||||
* @param \PayPal\Api\Error $errors
|
||||
*
|
||||
@@ -222,7 +222,7 @@ class PayoutItemDetails extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Error
|
||||
* Gets Errors
|
||||
*
|
||||
* @return \PayPal\Api\Error
|
||||
*/
|
||||
|
||||
@@ -7,18 +7,19 @@ use PayPal\Common\PayPalModel;
|
||||
/**
|
||||
* Class PayoutSenderBatchHeader
|
||||
*
|
||||
* This object represents sender-provided data about a batch header. The data is provided in a POST request. All batch submissions must have a batch header.
|
||||
* The sender-provided batch header for a batch payout request.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string sender_batch_id
|
||||
* @property string email_subject
|
||||
* @property string recipient_type
|
||||
* @property string batch_status
|
||||
*/
|
||||
class PayoutSenderBatchHeader extends PayPalModel
|
||||
{
|
||||
/**
|
||||
* Sender-created ID for tracking the batch payout in an accounting system. 30 characters max.
|
||||
* A sender-specified ID number. Tracks the batch payout in an accounting system.<blockquote><strong>Note:</strong> PayPal prevents duplicate batches from being processed. If you specify a `sender_batch_id` that was used in the last 30 days, the API rejects the request and returns an error message that indicates the duplicate `sender_batch_id` and includes a HATEOAS link to the original batch payout with the same `sender_batch_id`. If you receive a HTTP `5nn` status code, you can safely retry the request with the same `sender_batch_id`. In any case, the API completes a payment only once for a specific `sender_batch_id` that is used within 30 days.</blockquote>
|
||||
*
|
||||
* @param string $sender_batch_id
|
||||
*
|
||||
@@ -31,7 +32,7 @@ class PayoutSenderBatchHeader extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Sender-created ID for tracking the batch payout in an accounting system. 30 characters max.
|
||||
* A sender-specified ID number. Tracks the batch payout in an accounting system.<blockquote><strong>Note:</strong> PayPal prevents duplicate batches from being processed. If you specify a `sender_batch_id` that was used in the last 30 days, the API rejects the request and returns an error message that indicates the duplicate `sender_batch_id` and includes a HATEOAS link to the original batch payout with the same `sender_batch_id`. If you receive a HTTP `5nn` status code, you can safely retry the request with the same `sender_batch_id`. In any case, the API completes a payment only once for a specific `sender_batch_id` that is used within 30 days.</blockquote>
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -41,7 +42,7 @@ class PayoutSenderBatchHeader extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The subject line text for the email that PayPal sends when a payout item is completed. (The subject line is the same for all recipients.) Maximum of 255 single-byte alphanumeric characters.
|
||||
* The subject line text for the email that PayPal sends when a payout item completes. The subject line is the same for all recipients. Value is an alphanumeric string with a maximum length of 255 single-byte characters.
|
||||
*
|
||||
* @param string $email_subject
|
||||
*
|
||||
@@ -54,7 +55,7 @@ class PayoutSenderBatchHeader extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The subject line text for the email that PayPal sends when a payout item is completed. (The subject line is the same for all recipients.) Maximum of 255 single-byte alphanumeric characters.
|
||||
* The subject line text for the email that PayPal sends when a payout item completes. The subject line is the same for all recipients. Value is an alphanumeric string with a maximum length of 255 single-byte characters.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -64,7 +65,7 @@ class PayoutSenderBatchHeader extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of ID for a payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`.
|
||||
* The type of ID that identifies the payment receiver. Value is:<ul><code>EMAIL</code>. Unencrypted email. Value is a string of up to 127 single-byte characters.</li><li><code>PHONE</code>. Unencrypted phone number.<blockquote><strong>Note:</strong> The PayPal sandbox does not support the <code>PHONE</code> recipient type.</blockquote></li><li><code>PAYPAL_ID</code>. Encrypted PayPal account number.</li></ul>If the <code>sender_batch_header</code> includes the <code>recipient_type</code> attribute, any payout item without its own <code>recipient_type</code> attribute uses the <code>recipient_type</code> value from <code>sender_batch_header</code>. If the <code>sender_batch_header</code> omits the <code>recipient_type</code> attribute, each payout item must include its own <code>recipient_type</code> value.
|
||||
*
|
||||
* @param string $recipient_type
|
||||
*
|
||||
@@ -77,7 +78,7 @@ class PayoutSenderBatchHeader extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of ID for a payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`.
|
||||
* The type of ID that identifies the payment receiver. Value is:<ul><code>EMAIL</code>. Unencrypted email. Value is a string of up to 127 single-byte characters.</li><li><code>PHONE</code>. Unencrypted phone number.<blockquote><strong>Note:</strong> The PayPal sandbox does not support the <code>PHONE</code> recipient type.</blockquote></li><li><code>PAYPAL_ID</code>. Encrypted PayPal account number.</li></ul>If the <code>sender_batch_header</code> includes the <code>recipient_type</code> attribute, any payout item without its own <code>recipient_type</code> attribute uses the <code>recipient_type</code> value from <code>sender_batch_header</code>. If the <code>sender_batch_header</code> omits the <code>recipient_type</code> attribute, each payout item must include its own <code>recipient_type</code> value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -86,4 +87,27 @@ class PayoutSenderBatchHeader extends PayPalModel
|
||||
return $this->recipient_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* The batch status to update. You can change the `NEW` batch status to `PENDING` or `CANCEL`.
|
||||
*
|
||||
* @param string $batch_status
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBatchStatus($batch_status)
|
||||
{
|
||||
$this->batch_status = $batch_status;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The batch status to update. You can change the `NEW` batch status to `PENDING` or `CANCEL`.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBatchStatus()
|
||||
{
|
||||
return $this->batch_status;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\PatchRequest;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\Patch;
|
||||
|
||||
/**
|
||||
@@ -13,17 +14,15 @@ class PatchTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Gets Json String of Object Patch
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getJson()
|
||||
{
|
||||
return '{"op":"TestSample","path":"TestSample","value":"TestSampleObject","from":"TestSample"}';
|
||||
return '{"op":"TestSample","path":"TestSample","value":"TestSample","from":"TestSample"}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Object Instance with Json data filled in
|
||||
*
|
||||
* @return Patch
|
||||
*/
|
||||
public static function getObject()
|
||||
@@ -34,7 +33,6 @@ class PatchTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Tests for Serialization and Deserialization Issues
|
||||
*
|
||||
* @return Patch
|
||||
*/
|
||||
public function testSerializationDeserialization()
|
||||
@@ -57,7 +55,9 @@ class PatchTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->assertEquals($obj->getOp(), "TestSample");
|
||||
$this->assertEquals($obj->getPath(), "TestSample");
|
||||
$this->assertEquals($obj->getValue(), "TestSampleObject");
|
||||
$this->assertEquals($obj->getValue(), "TestSample");
|
||||
$this->assertEquals($obj->getFrom(), "TestSample");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ class PayoutItemDetailsTest extends \PHPUnit_Framework_TestCase
|
||||
return new PayoutItemDetails(self::getJson());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Tests for Serialization and Deserialization Issues
|
||||
* @return PayoutItemDetails
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace PayPal\Test\Api;
|
||||
|
||||
use PayPal\Common\PayPalModel;
|
||||
use PayPal\Api\PayoutSenderBatchHeader;
|
||||
|
||||
/**
|
||||
@@ -17,7 +18,7 @@ class PayoutSenderBatchHeaderTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public static function getJson()
|
||||
{
|
||||
return '{"sender_batch_id":"TestSample","email_subject":"TestSample","recipient_type":"TestSample"}';
|
||||
return '{"sender_batch_id":"TestSample","email_subject":"TestSample","recipient_type":"TestSample","batch_status":"TestSample"}';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -29,7 +30,6 @@ class PayoutSenderBatchHeaderTest extends \PHPUnit_Framework_TestCase
|
||||
return new PayoutSenderBatchHeader(self::getJson());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Tests for Serialization and Deserialization Issues
|
||||
* @return PayoutSenderBatchHeader
|
||||
@@ -41,6 +41,7 @@ class PayoutSenderBatchHeaderTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertNotNull($obj->getSenderBatchId());
|
||||
$this->assertNotNull($obj->getEmailSubject());
|
||||
$this->assertNotNull($obj->getRecipientType());
|
||||
$this->assertNotNull($obj->getBatchStatus());
|
||||
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||
return $obj;
|
||||
}
|
||||
@@ -54,5 +55,6 @@ class PayoutSenderBatchHeaderTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($obj->getSenderBatchId(), "TestSample");
|
||||
$this->assertEquals($obj->getEmailSubject(), "TestSample");
|
||||
$this->assertEquals($obj->getRecipientType(), "TestSample");
|
||||
$this->assertEquals($obj->getBatchStatus(), "TestSample");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user