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\Validation\ArgumentValidator;
  8 
  9 /**
 10  * Class PaymentInstruction
 11  *
 12  * Contain details of how and when the payment should be made to PayPal in cases of manual bank transfer.
 13  *
 14  * @package PayPal\Api
 15  *
 16  * @property string                                  reference_number
 17  * @property string                                  instruction_type
 18  * @property \PayPal\Api\RecipientBankingInstruction recipient_banking_instruction
 19  * @property \PayPal\Api\Currency                    amount
 20  * @property string                                  payment_due_date
 21  * @property string                                  note
 22  * @property \PayPal\Api\Links[]                     links
 23  */
 24 class PaymentInstruction extends PayPalResourceModel
 25 {
 26     /**
 27      * ID of payment instruction
 28      *
 29      * @param string $reference_number
 30      *
 31      * @return $this
 32      */
 33     public function setReferenceNumber($reference_number)
 34     {
 35         $this->reference_number = $reference_number;
 36         return $this;
 37     }
 38 
 39     /**
 40      * ID of payment instruction
 41      *
 42      * @return string
 43      */
 44     public function getReferenceNumber()
 45     {
 46         return $this->reference_number;
 47     }
 48 
 49     /**
 50      * Type of payment instruction
 51      * Valid Values: ["MANUAL_BANK_TRANSFER", "PAY_UPON_INVOICE"]
 52      *
 53      * @param string $instruction_type
 54      *
 55      * @return $this
 56      */
 57     public function setInstructionType($instruction_type)
 58     {
 59         $this->instruction_type = $instruction_type;
 60         return $this;
 61     }
 62 
 63     /**
 64      * Type of payment instruction
 65      *
 66      * @return string
 67      */
 68     public function getInstructionType()
 69     {
 70         return $this->instruction_type;
 71     }
 72 
 73     /**
 74      * Recipient bank Details.
 75      *
 76      * @param \PayPal\Api\RecipientBankingInstruction $recipient_banking_instruction
 77      *
 78      * @return $this
 79      */
 80     public function setRecipientBankingInstruction($recipient_banking_instruction)
 81     {
 82         $this->recipient_banking_instruction = $recipient_banking_instruction;
 83         return $this;
 84     }
 85 
 86     /**
 87      * Recipient bank Details.
 88      *
 89      * @return \PayPal\Api\RecipientBankingInstruction
 90      */
 91     public function getRecipientBankingInstruction()
 92     {
 93         return $this->recipient_banking_instruction;
 94     }
 95 
 96     /**
 97      * Amount to be transferred
 98      *
 99      * @param \PayPal\Api\Currency $amount
100      *
101      * @return $this
102      */
103     public function setAmount($amount)
104     {
105         $this->amount = $amount;
106         return $this;
107     }
108 
109     /**
110      * Amount to be transferred
111      *
112      * @return \PayPal\Api\Currency
113      */
114     public function getAmount()
115     {
116         return $this->amount;
117     }
118 
119     /**
120      * Date by which payment should be received
121      *
122      * @param string $payment_due_date
123      *
124      * @return $this
125      */
126     public function setPaymentDueDate($payment_due_date)
127     {
128         $this->payment_due_date = $payment_due_date;
129         return $this;
130     }
131 
132     /**
133      * Date by which payment should be received
134      *
135      * @return string
136      */
137     public function getPaymentDueDate()
138     {
139         return $this->payment_due_date;
140     }
141 
142     /**
143      * Additional text regarding payment handling
144      *
145      * @param string $note
146      *
147      * @return $this
148      */
149     public function setNote($note)
150     {
151         $this->note = $note;
152         return $this;
153     }
154 
155     /**
156      * Additional text regarding payment handling
157      *
158      * @return string
159      */
160     public function getNote()
161     {
162         return $this->note;
163     }
164 
165     /**
166      * Retrieve a payment instruction by passing the payment_id in the request URI. Use this request if you are implementing a solution that includes delayed payment like Pay Upon Invoice (PUI).
167      *
168      * @param string         $paymentId
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 PaymentInstruction
172      */
173     public static function get($paymentId, $apiContext = null, $restCall = null)
174     {
175         ArgumentValidator::validate($paymentId, 'paymentId');
176         $payLoad = "";
177         $json = self::executeCall(
178             "/v1/payments/payment/$paymentId/payment-instruction",
179             "GET",
180             $payLoad,
181             null,
182             $apiContext,
183             $restCall
184         );
185         $ret = new PaymentInstruction();
186         $ret->fromJson($json);
187         return $ret;
188     }
189 
190 }
191 
API documentation generated by ApiGen