Overview
  • Namespace
  • Class

Namespaces

  • PayPal
    • Api
    • Auth
    • Cache
    • Common
    • Converter
    • Core
    • Exception
    • Handler
    • Log
    • Rest
    • Security
    • Transport
    • Validation

Classes

  • PayPal\Api\Address
  • PayPal\Api\Agreement
  • PayPal\Api\AgreementDetails
  • PayPal\Api\AgreementStateDescriptor
  • PayPal\Api\AgreementTransaction
  • PayPal\Api\AgreementTransactions
  • PayPal\Api\AlternatePayment
  • PayPal\Api\Amount
  • PayPal\Api\Authorization
  • PayPal\Api\BankAccount
  • PayPal\Api\BankAccountsList
  • PayPal\Api\BankToken
  • PayPal\Api\BaseAddress
  • PayPal\Api\Billing
  • PayPal\Api\BillingAgreementToken
  • PayPal\Api\BillingInfo
  • PayPal\Api\CancelNotification
  • PayPal\Api\Capture
  • PayPal\Api\CarrierAccount
  • PayPal\Api\CarrierAccountToken
  • PayPal\Api\CartBase
  • PayPal\Api\ChargeModel
  • PayPal\Api\Cost
  • PayPal\Api\CountryCode
  • PayPal\Api\CreateProfileResponse
  • PayPal\Api\Credit
  • PayPal\Api\CreditCard
  • PayPal\Api\CreditCardHistory
  • PayPal\Api\CreditCardList
  • PayPal\Api\CreditCardToken
  • PayPal\Api\CreditFinancingOffered
  • PayPal\Api\Currency
  • PayPal\Api\CurrencyConversion
  • PayPal\Api\CustomAmount
  • PayPal\Api\DetailedRefund
  • PayPal\Api\Details
  • PayPal\Api\Error
  • PayPal\Api\ErrorDetails
  • PayPal\Api\ExtendedBankAccount
  • PayPal\Api\ExternalFunding
  • PayPal\Api\FileAttachment
  • PayPal\Api\FlowConfig
  • PayPal\Api\FmfDetails
  • PayPal\Api\FundingDetail
  • PayPal\Api\FundingInstrument
  • PayPal\Api\FundingOption
  • PayPal\Api\FundingSource
  • PayPal\Api\FuturePayment
  • PayPal\Api\HyperSchema
  • PayPal\Api\Image
  • PayPal\Api\Incentive
  • PayPal\Api\InputFields
  • PayPal\Api\InstallmentInfo
  • PayPal\Api\InstallmentOption
  • PayPal\Api\Invoice
  • PayPal\Api\InvoiceAddress
  • PayPal\Api\InvoiceItem
  • PayPal\Api\InvoiceNumber
  • PayPal\Api\InvoiceSearchResponse
  • PayPal\Api\Item
  • PayPal\Api\ItemList
  • PayPal\Api\Links
  • PayPal\Api\Measurement
  • PayPal\Api\MerchantInfo
  • PayPal\Api\MerchantPreferences
  • PayPal\Api\Metadata
  • PayPal\Api\NameValuePair
  • PayPal\Api\Notification
  • PayPal\Api\OpenIdAddress
  • PayPal\Api\OpenIdError
  • PayPal\Api\OpenIdSession
  • PayPal\Api\OpenIdTokeninfo
  • PayPal\Api\OpenIdUserinfo
  • PayPal\Api\Order
  • PayPal\Api\OverrideChargeModel
  • PayPal\Api\Participant
  • PayPal\Api\Patch
  • PayPal\Api\PatchRequest
  • PayPal\Api\Payee
  • PayPal\Api\Payer
  • PayPal\Api\PayerInfo
  • PayPal\Api\Payment
  • PayPal\Api\PaymentCard
  • PayPal\Api\PaymentCardToken
  • PayPal\Api\PaymentDefinition
  • PayPal\Api\PaymentDetail
  • PayPal\Api\PaymentExecution
  • PayPal\Api\PaymentHistory
  • PayPal\Api\PaymentInstruction
  • PayPal\Api\PaymentOptions
  • PayPal\Api\PaymentSummary
  • PayPal\Api\PaymentTerm
  • PayPal\Api\Payout
  • PayPal\Api\PayoutBatch
  • PayPal\Api\PayoutBatchHeader
  • PayPal\Api\PayoutItem
  • PayPal\Api\PayoutItemDetails
  • PayPal\Api\PayoutSenderBatchHeader
  • PayPal\Api\Phone
  • PayPal\Api\Plan
  • PayPal\Api\PlanList
  • PayPal\Api\PotentialPayerInfo
  • PayPal\Api\Presentation
  • PayPal\Api\PrivateLabelCard
  • PayPal\Api\ProcessorResponse
  • PayPal\Api\RecipientBankingInstruction
  • PayPal\Api\RedirectUrls
  • PayPal\Api\Refund
  • PayPal\Api\RefundDetail
  • PayPal\Api\RefundRequest
  • PayPal\Api\RelatedResources
  • PayPal\Api\Sale
  • PayPal\Api\Search
  • PayPal\Api\ShippingAddress
  • PayPal\Api\ShippingCost
  • PayPal\Api\ShippingInfo
  • PayPal\Api\Tax
  • PayPal\Api\Template
  • PayPal\Api\TemplateData
  • PayPal\Api\Templates
  • PayPal\Api\TemplateSettings
  • PayPal\Api\TemplateSettingsMetadata
  • PayPal\Api\Terms
  • PayPal\Api\Transaction
  • PayPal\Api\TransactionBase
  • PayPal\Api\Transactions
  • PayPal\Api\VerifyWebhookSignature
  • PayPal\Api\VerifyWebhookSignatureResponse
  • PayPal\Api\Webhook
  • PayPal\Api\WebhookEvent
  • PayPal\Api\WebhookEventList
  • PayPal\Api\WebhookEventType
  • PayPal\Api\WebhookEventTypeList
  • PayPal\Api\WebhookList
  • PayPal\Api\WebProfile
  • PayPal\Auth\OAuthTokenCredential
  • PayPal\Cache\AuthorizationCache
  • PayPal\Common\ArrayUtil
  • PayPal\Common\PayPalModel
  • PayPal\Common\PayPalResourceModel
  • PayPal\Common\PayPalUserAgent
  • PayPal\Common\ReflectionUtil
  • PayPal\Converter\FormatConverter
  • PayPal\Core\PayPalConfigManager
  • PayPal\Core\PayPalConstants
  • PayPal\Core\PayPalCredentialManager
  • PayPal\Core\PayPalHttpConfig
  • PayPal\Core\PayPalHttpConnection
  • PayPal\Core\PayPalLoggingManager
  • PayPal\Handler\OauthHandler
  • PayPal\Handler\RestHandler
  • PayPal\Log\PayPalDefaultLogFactory
  • PayPal\Log\PayPalLogger
  • PayPal\Rest\ApiContext
  • PayPal\Security\Cipher
  • PayPal\Transport\PayPalRestCall
  • PayPal\Validation\ArgumentValidator
  • PayPal\Validation\JsonValidator
  • PayPal\Validation\NumericValidator
  • PayPal\Validation\UrlValidator

Interfaces

  • PayPal\Handler\IPayPalHandler
  • PayPal\Log\PayPalLogFactory
  • PayPal\Rest\IResource

Exceptions

  • PayPal\Exception\PayPalConfigurationException
  • PayPal\Exception\PayPalConnectionException
  • PayPal\Exception\PayPalInvalidCredentialException
  • PayPal\Exception\PayPalMissingCredentialException
  1 <?php
  2 
  3 namespace PayPal\Api;
  4 
  5 use PayPal\Common\PayPalResourceModel;
  6 use PayPal\Rest\ApiContext;
  7 use PayPal\Transport\PayPalRestCall;
  8 use PayPal\Validation\ArgumentValidator;
  9 
 10 /**
 11  * Class PayoutItem
 12  *
 13  * A sender-created definition of a payout to a single recipient.
 14  *
 15  * @package PayPal\Api
 16  *
 17  * @property string recipient_type
 18  * @property \PayPal\Api\Currency amount
 19  * @property string note
 20  * @property string receiver
 21  * @property string sender_item_id
 22  */
 23 class PayoutItem extends PayPalResourceModel
 24 {
 25     /**
 26      * 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.
 27      *
 28      * @param string $recipient_type
 29      * 
 30      * @return $this
 31      */
 32     public function setRecipientType($recipient_type)
 33     {
 34         $this->recipient_type = $recipient_type;
 35         return $this;
 36     }
 37 
 38     /**
 39      * 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.
 40      *
 41      * @return string
 42      */
 43     public function getRecipientType()
 44     {
 45         return $this->recipient_type;
 46     }
 47 
 48     /**
 49      * The amount of money to pay the receiver.
 50      *
 51      * @param \PayPal\Api\Currency $amount
 52      * 
 53      * @return $this
 54      */
 55     public function setAmount($amount)
 56     {
 57         $this->amount = $amount;
 58         return $this;
 59     }
 60 
 61     /**
 62      * The amount of money to pay the receiver.
 63      *
 64      * @return \PayPal\Api\Currency
 65      */
 66     public function getAmount()
 67     {
 68         return $this->amount;
 69     }
 70 
 71     /**
 72      * Optional. A sender-specified note for notifications. Value is any string value.
 73      *
 74      * @param string $note
 75      * 
 76      * @return $this
 77      */
 78     public function setNote($note)
 79     {
 80         $this->note = $note;
 81         return $this;
 82     }
 83 
 84     /**
 85      * Optional. A sender-specified note for notifications. Value is any string value.
 86      *
 87      * @return string
 88      */
 89     public function getNote()
 90     {
 91         return $this->note;
 92     }
 93 
 94     /**
 95      * The receiver of the payment. Corresponds to the `recipient_type` value in the request.
 96      *
 97      * @param string $receiver
 98      * 
 99      * @return $this
100      */
101     public function setReceiver($receiver)
102     {
103         $this->receiver = $receiver;
104         return $this;
105     }
106 
107     /**
108      * The receiver of the payment. Corresponds to the `recipient_type` value in the request.
109      *
110      * @return string
111      */
112     public function getReceiver()
113     {
114         return $this->receiver;
115     }
116 
117     /**
118      * A sender-specified ID number. Tracks the batch payout in an accounting system.
119      *
120      * @param string $sender_item_id
121      * 
122      * @return $this
123      */
124     public function setSenderItemId($sender_item_id)
125     {
126         $this->sender_item_id = $sender_item_id;
127         return $this;
128     }
129 
130     /**
131      * A sender-specified ID number. Tracks the batch payout in an accounting system.
132      *
133      * @return string
134      */
135     public function getSenderItemId()
136     {
137         return $this->sender_item_id;
138     }
139 
140     /**
141      * Obtain the status of a payout item by passing the item ID to the request URI.
142      *
143      * @param string $payoutItemId
144      * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
145      * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
146      * @return PayoutItemDetails
147      */
148     public static function get($payoutItemId, $apiContext = null, $restCall = null)
149     {
150         ArgumentValidator::validate($payoutItemId, 'payoutItemId');
151         $payLoad = "";
152         $json = self::executeCall(
153             "/v1/payments/payouts-item/$payoutItemId",
154             "GET",
155             $payLoad,
156             null,
157             $apiContext,
158             $restCall
159         );
160         $ret = new PayoutItemDetails();
161         $ret->fromJson($json);
162         return $ret;
163     }
164 
165     /**
166      * Cancels the unclaimed payment using the items id passed in the request URI. If an unclaimed item is not claimed within 30 days, the funds will be automatically returned to the sender. This call can be used to cancel the unclaimed item prior to the automatic 30-day return.
167      *
168      * @param string $payoutItemId
169      * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
170      * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
171      * @return PayoutItemDetails
172      */
173     public static function cancel($payoutItemId, $apiContext = null, $restCall = null)
174     {
175         ArgumentValidator::validate($payoutItemId, 'payoutItemId');
176         $payLoad = "";
177         $json = self::executeCall(
178             "/v1/payments/payouts-item/$payoutItemId/cancel",
179             "POST",
180             $payLoad,
181             null,
182             $apiContext,
183             $restCall
184         );
185         $ret = new PayoutItemDetails();
186         $ret->fromJson($json);
187         return $ret;
188     }
189 }
190 
API documentation generated by ApiGen