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\PayPalModel;
  6 use PayPal\Validation\UrlValidator;
  7 
  8 /**
  9  * Class CartBase
 10  *
 11  * Base properties of a cart resource
 12  *
 13  * @package PayPal\Api
 14  *
 15  * @property string reference_id
 16  * @property \PayPal\Api\Amount amount
 17  * @property \PayPal\Api\Payee payee
 18  * @property string description
 19  * @property string note_to_payee
 20  * @property string custom
 21  * @property string invoice_number
 22  * @property string purchase_order
 23  * @property string soft_descriptor
 24  * @property \PayPal\Api\PaymentOptions payment_options
 25  * @property \PayPal\Api\ItemList item_list
 26  * @property string notify_url
 27  * @property string order_url
 28  */
 29 class CartBase extends PayPalModel
 30 {
 31     /**
 32      * Merchant identifier to the purchase unit. Optional parameter
 33      *
 34      * @param string $reference_id
 35      * 
 36      * @return $this
 37      */
 38     public function setReferenceId($reference_id)
 39     {
 40         $this->reference_id = $reference_id;
 41         return $this;
 42     }
 43 
 44     /**
 45      * Merchant identifier to the purchase unit. Optional parameter
 46      *
 47      * @return string
 48      */
 49     public function getReferenceId()
 50     {
 51         return $this->reference_id;
 52     }
 53 
 54     /**
 55      * Amount being collected.
 56      *
 57      * @param \PayPal\Api\Amount $amount
 58      * 
 59      * @return $this
 60      */
 61     public function setAmount($amount)
 62     {
 63         $this->amount = $amount;
 64         return $this;
 65     }
 66 
 67     /**
 68      * Amount being collected.
 69      *
 70      * @return \PayPal\Api\Amount
 71      */
 72     public function getAmount()
 73     {
 74         return $this->amount;
 75     }
 76 
 77     /**
 78      * Recipient of the funds in this transaction.
 79      *
 80      * @param \PayPal\Api\Payee $payee
 81      * 
 82      * @return $this
 83      */
 84     public function setPayee($payee)
 85     {
 86         $this->payee = $payee;
 87         return $this;
 88     }
 89 
 90     /**
 91      * Recipient of the funds in this transaction.
 92      *
 93      * @return \PayPal\Api\Payee
 94      */
 95     public function getPayee()
 96     {
 97         return $this->payee;
 98     }
 99 
100     /**
101      * Description of what is being paid for.
102      *
103      * @param string $description
104      * 
105      * @return $this
106      */
107     public function setDescription($description)
108     {
109         $this->description = $description;
110         return $this;
111     }
112 
113     /**
114      * Description of what is being paid for.
115      *
116      * @return string
117      */
118     public function getDescription()
119     {
120         return $this->description;
121     }
122 
123     /**
124      * Note to the recipient of the funds in this transaction.
125      *
126      * @param string $note_to_payee
127      * 
128      * @return $this
129      */
130     public function setNoteToPayee($note_to_payee)
131     {
132         $this->note_to_payee = $note_to_payee;
133         return $this;
134     }
135 
136     /**
137      * Note to the recipient of the funds in this transaction.
138      *
139      * @return string
140      */
141     public function getNoteToPayee()
142     {
143         return $this->note_to_payee;
144     }
145 
146     /**
147      * free-form field for the use of clients
148      *
149      * @param string $custom
150      * 
151      * @return $this
152      */
153     public function setCustom($custom)
154     {
155         $this->custom = $custom;
156         return $this;
157     }
158 
159     /**
160      * free-form field for the use of clients
161      *
162      * @return string
163      */
164     public function getCustom()
165     {
166         return $this->custom;
167     }
168 
169     /**
170      * invoice number to track this payment
171      *
172      * @param string $invoice_number
173      * 
174      * @return $this
175      */
176     public function setInvoiceNumber($invoice_number)
177     {
178         $this->invoice_number = $invoice_number;
179         return $this;
180     }
181 
182     /**
183      * invoice number to track this payment
184      *
185      * @return string
186      */
187     public function getInvoiceNumber()
188     {
189         return $this->invoice_number;
190     }
191 
192     /**
193      * purchase order is number or id specific to this payment
194      *
195      * @param string $purchase_order
196      * 
197      * @return $this
198      */
199     public function setPurchaseOrder($purchase_order)
200     {
201         $this->purchase_order = $purchase_order;
202         return $this;
203     }
204 
205     /**
206      * purchase order is number or id specific to this payment
207      *
208      * @return string
209      */
210     public function getPurchaseOrder()
211     {
212         return $this->purchase_order;
213     }
214 
215     /**
216      * Soft descriptor used when charging this funding source. If length exceeds max length, the value will be truncated
217      *
218      * @param string $soft_descriptor
219      * 
220      * @return $this
221      */
222     public function setSoftDescriptor($soft_descriptor)
223     {
224         $this->soft_descriptor = $soft_descriptor;
225         return $this;
226     }
227 
228     /**
229      * Soft descriptor used when charging this funding source. If length exceeds max length, the value will be truncated
230      *
231      * @return string
232      */
233     public function getSoftDescriptor()
234     {
235         return $this->soft_descriptor;
236     }
237 
238     /**
239      * Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card`
240      * @deprecated Not publicly available
241      * @param string $soft_descriptor_city
242      * 
243      * @return $this
244      */
245     public function setSoftDescriptorCity($soft_descriptor_city)
246     {
247         $this->soft_descriptor_city = $soft_descriptor_city;
248         return $this;
249     }
250 
251     /**
252      * Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card`
253      * @deprecated Not publicly available
254      * @return string
255      */
256     public function getSoftDescriptorCity()
257     {
258         return $this->soft_descriptor_city;
259     }
260 
261     /**
262      * Payment options requested for this purchase unit
263      *
264      * @param \PayPal\Api\PaymentOptions $payment_options
265      * 
266      * @return $this
267      */
268     public function setPaymentOptions($payment_options)
269     {
270         $this->payment_options = $payment_options;
271         return $this;
272     }
273 
274     /**
275      * Payment options requested for this purchase unit
276      *
277      * @return \PayPal\Api\PaymentOptions
278      */
279     public function getPaymentOptions()
280     {
281         return $this->payment_options;
282     }
283 
284     /**
285      * List of items being paid for.
286      *
287      * @param \PayPal\Api\ItemList $item_list
288      * 
289      * @return $this
290      */
291     public function setItemList($item_list)
292     {
293         $this->item_list = $item_list;
294         return $this;
295     }
296 
297     /**
298      * List of items being paid for.
299      *
300      * @return \PayPal\Api\ItemList
301      */
302     public function getItemList()
303     {
304         return $this->item_list;
305     }
306 
307     /**
308      * URL to send payment notifications
309      *
310      * @param string $notify_url
311      * @throws \InvalidArgumentException
312      * @return $this
313      */
314     public function setNotifyUrl($notify_url)
315     {
316         UrlValidator::validate($notify_url, "NotifyUrl");
317         $this->notify_url = $notify_url;
318         return $this;
319     }
320 
321     /**
322      * URL to send payment notifications
323      *
324      * @return string
325      */
326     public function getNotifyUrl()
327     {
328         return $this->notify_url;
329     }
330 
331     /**
332      * Url on merchant site pertaining to this payment.
333      *
334      * @param string $order_url
335      * @throws \InvalidArgumentException
336      * @return $this
337      */
338     public function setOrderUrl($order_url)
339     {
340         UrlValidator::validate($order_url, "OrderUrl");
341         $this->order_url = $order_url;
342         return $this;
343     }
344 
345     /**
346      * Url on merchant site pertaining to this payment.
347      *
348      * @return string
349      */
350     public function getOrderUrl()
351     {
352         return $this->order_url;
353     }
354 
355     /**
356      * List of external funding being applied to the purchase unit. Each external_funding unit should have a unique reference_id
357      * @deprecated Not publicly available
358      * @param \PayPal\Api\ExternalFunding[] $external_funding
359      *
360      * @return $this
361      */
362     public function setExternalFunding($external_funding)
363     {
364         $this->external_funding = $external_funding;
365         return $this;
366     }
367 
368     /**
369      * List of external funding being applied to the purchase unit. Each external_funding unit should have a unique reference_id
370      * @deprecated Not publicly available
371      * @return \PayPal\Api\ExternalFunding[]
372      */
373     public function getExternalFunding()
374     {
375         return $this->external_funding;
376     }
377 
378     /**
379      * Append ExternalFunding to the list.
380      * @deprecated Not publicly available
381      * @param \PayPal\Api\ExternalFunding $externalFunding
382      * @return $this
383      */
384     public function addExternalFunding($externalFunding)
385     {
386         if (!$this->getExternalFunding()) {
387             return $this->setExternalFunding(array($externalFunding));
388         } else {
389             return $this->setExternalFunding(
390                 array_merge($this->getExternalFunding(), array($externalFunding))
391             );
392         }
393     }
394 
395     /**
396      * Remove ExternalFunding from the list.
397      * @deprecated Not publicly available
398      * @param \PayPal\Api\ExternalFunding $externalFunding
399      * @return $this
400      */
401     public function removeExternalFunding($externalFunding)
402     {
403         return $this->setExternalFunding(
404             array_diff($this->getExternalFunding(), array($externalFunding))
405         );
406     }
407 
408 }
409 
API documentation generated by ApiGen