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 
  7 /**
  8  * Class FundingOption
  9  *
 10  * specifies the funding option details.
 11  *
 12  * @package PayPal\Api
 13  *
 14  * @property string id
 15  * @property \PayPal\Api\FundingSource[] funding_sources
 16  * @property \PayPal\Api\FundingInstrument backup_funding_instrument
 17  * @property \PayPal\Api\CurrencyConversion currency_conversion
 18  * @property \PayPal\Api\InstallmentInfo installment_info
 19  * @property \PayPal\Api\Links[] links
 20  */
 21 class FundingOption extends PayPalModel
 22 {
 23     /**
 24      * id of the funding option.
 25      *
 26      * @param string $id
 27      * 
 28      * @return $this
 29      */
 30     public function setId($id)
 31     {
 32         $this->id = $id;
 33         return $this;
 34     }
 35 
 36     /**
 37      * id of the funding option.
 38      *
 39      * @return string
 40      */
 41     public function getId()
 42     {
 43         return $this->id;
 44     }
 45 
 46     /**
 47      * List of funding sources that contributes to a payment.
 48      *
 49      * @param \PayPal\Api\FundingSource[] $funding_sources
 50      * 
 51      * @return $this
 52      */
 53     public function setFundingSources($funding_sources)
 54     {
 55         $this->funding_sources = $funding_sources;
 56         return $this;
 57     }
 58 
 59     /**
 60      * List of funding sources that contributes to a payment.
 61      *
 62      * @return \PayPal\Api\FundingSource[]
 63      */
 64     public function getFundingSources()
 65     {
 66         return $this->funding_sources;
 67     }
 68 
 69     /**
 70      * Append FundingSources to the list.
 71      *
 72      * @param \PayPal\Api\FundingSource $fundingSource
 73      * @return $this
 74      */
 75     public function addFundingSource($fundingSource)
 76     {
 77         if (!$this->getFundingSources()) {
 78             return $this->setFundingSources(array($fundingSource));
 79         } else {
 80             return $this->setFundingSources(
 81                 array_merge($this->getFundingSources(), array($fundingSource))
 82             );
 83         }
 84     }
 85 
 86     /**
 87      * Remove FundingSources from the list.
 88      *
 89      * @param \PayPal\Api\FundingSource $fundingSource
 90      * @return $this
 91      */
 92     public function removeFundingSource($fundingSource)
 93     {
 94         return $this->setFundingSources(
 95             array_diff($this->getFundingSources(), array($fundingSource))
 96         );
 97     }
 98 
 99     /**
100      * Backup funding instrument which will be used for payment if primary fails.
101      *
102      * @param \PayPal\Api\FundingInstrument $backup_funding_instrument
103      * 
104      * @return $this
105      */
106     public function setBackupFundingInstrument($backup_funding_instrument)
107     {
108         $this->backup_funding_instrument = $backup_funding_instrument;
109         return $this;
110     }
111 
112     /**
113      * Backup funding instrument which will be used for payment if primary fails.
114      *
115      * @return \PayPal\Api\FundingInstrument
116      */
117     public function getBackupFundingInstrument()
118     {
119         return $this->backup_funding_instrument;
120     }
121 
122     /**
123      * Currency conversion applicable to this funding option.
124      *
125      * @param \PayPal\Api\CurrencyConversion $currency_conversion
126      * 
127      * @return $this
128      */
129     public function setCurrencyConversion($currency_conversion)
130     {
131         $this->currency_conversion = $currency_conversion;
132         return $this;
133     }
134 
135     /**
136      * Currency conversion applicable to this funding option.
137      *
138      * @return \PayPal\Api\CurrencyConversion
139      */
140     public function getCurrencyConversion()
141     {
142         return $this->currency_conversion;
143     }
144 
145     /**
146      * Installment options available for a funding option.
147      *
148      * @param \PayPal\Api\InstallmentInfo $installment_info
149      * 
150      * @return $this
151      */
152     public function setInstallmentInfo($installment_info)
153     {
154         $this->installment_info = $installment_info;
155         return $this;
156     }
157 
158     /**
159      * Installment options available for a funding option.
160      *
161      * @return \PayPal\Api\InstallmentInfo
162      */
163     public function getInstallmentInfo()
164     {
165         return $this->installment_info;
166     }
167 
168     /**
169      * Sets Links
170      *
171      * @param \PayPal\Api\Links[] $links
172      * 
173      * @return $this
174      */
175     public function setLinks($links)
176     {
177         $this->links = $links;
178         return $this;
179     }
180 
181     /**
182      * Gets Links
183      *
184      * @return \PayPal\Api\Links[]
185      */
186     public function getLinks()
187     {
188         return $this->links;
189     }
190 
191     /**
192      * Append Links to the list.
193      *
194      * @param \PayPal\Api\Links $links
195      * @return $this
196      */
197     public function addLink($links)
198     {
199         if (!$this->getLinks()) {
200             return $this->setLinks(array($links));
201         } else {
202             return $this->setLinks(
203                 array_merge($this->getLinks(), array($links))
204             );
205         }
206     }
207 
208     /**
209      * Remove Links from the list.
210      *
211      * @param \PayPal\Api\Links $links
212      * @return $this
213      */
214     public function removeLink($links)
215     {
216         return $this->setLinks(
217             array_diff($this->getLinks(), array($links))
218         );
219     }
220 
221 }
222 
API documentation generated by ApiGen