Update Payouts to v1.2

This commit is contained in:
sdcoffey
2016-10-13 11:04:49 -07:00
parent 3f98d9f182
commit 0f3a5e6548
12 changed files with 177 additions and 153 deletions

View File

@@ -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;
}
}