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 MerchantPreferences
 10  *
 11  * Resource representing merchant preferences like max failed attempts, set up fee  and others for a plan.
 12  *
 13  * @package PayPal\Api
 14  *
 15  * @property string id
 16  * @property \PayPal\Api\Currency setup_fee
 17  * @property string cancel_url
 18  * @property string return_url
 19  * @property string notify_url
 20  * @property string max_fail_attempts
 21  * @property string auto_bill_amount
 22  * @property string initial_fail_amount_action
 23  * @property string accepted_payment_type
 24  * @property string char_set
 25  */
 26 class MerchantPreferences extends PayPalModel
 27 {
 28     /**
 29      * Identifier of the merchant_preferences. 128 characters max.
 30      *
 31      * @param string $id
 32      * 
 33      * @return $this
 34      */
 35     public function setId($id)
 36     {
 37         $this->id = $id;
 38         return $this;
 39     }
 40 
 41     /**
 42      * Identifier of the merchant_preferences. 128 characters max.
 43      *
 44      * @return string
 45      */
 46     public function getId()
 47     {
 48         return $this->id;
 49     }
 50 
 51     /**
 52      * Setup fee amount. Default is 0.
 53      *
 54      * @param \PayPal\Api\Currency $setup_fee
 55      * 
 56      * @return $this
 57      */
 58     public function setSetupFee($setup_fee)
 59     {
 60         $this->setup_fee = $setup_fee;
 61         return $this;
 62     }
 63 
 64     /**
 65      * Setup fee amount. Default is 0.
 66      *
 67      * @return \PayPal\Api\Currency
 68      */
 69     public function getSetupFee()
 70     {
 71         return $this->setup_fee;
 72     }
 73 
 74     /**
 75      * Redirect URL on cancellation of agreement request. 1000 characters max.
 76      *
 77      * @param string $cancel_url
 78      * @throws \InvalidArgumentException
 79      * @return $this
 80      */
 81     public function setCancelUrl($cancel_url)
 82     {
 83         UrlValidator::validate($cancel_url, "CancelUrl");
 84         $this->cancel_url = $cancel_url;
 85         return $this;
 86     }
 87 
 88     /**
 89      * Redirect URL on cancellation of agreement request. 1000 characters max.
 90      *
 91      * @return string
 92      */
 93     public function getCancelUrl()
 94     {
 95         return $this->cancel_url;
 96     }
 97 
 98     /**
 99      * Redirect URL on creation of agreement request. 1000 characters max.
100      *
101      * @param string $return_url
102      * @throws \InvalidArgumentException
103      * @return $this
104      */
105     public function setReturnUrl($return_url)
106     {
107         UrlValidator::validate($return_url, "ReturnUrl");
108         $this->return_url = $return_url;
109         return $this;
110     }
111 
112     /**
113      * Redirect URL on creation of agreement request. 1000 characters max.
114      *
115      * @return string
116      */
117     public function getReturnUrl()
118     {
119         return $this->return_url;
120     }
121 
122     /**
123      * Notify URL on agreement creation. 1000 characters max.
124      *
125      * @param string $notify_url
126      * @throws \InvalidArgumentException
127      * @return $this
128      */
129     public function setNotifyUrl($notify_url)
130     {
131         UrlValidator::validate($notify_url, "NotifyUrl");
132         $this->notify_url = $notify_url;
133         return $this;
134     }
135 
136     /**
137      * Notify URL on agreement creation. 1000 characters max.
138      *
139      * @return string
140      */
141     public function getNotifyUrl()
142     {
143         return $this->notify_url;
144     }
145 
146     /**
147      * Total number of failed attempts allowed. Default is 0, representing an infinite number of failed attempts.
148      *
149      * @param string $max_fail_attempts
150      * 
151      * @return $this
152      */
153     public function setMaxFailAttempts($max_fail_attempts)
154     {
155         $this->max_fail_attempts = $max_fail_attempts;
156         return $this;
157     }
158 
159     /**
160      * Total number of failed attempts allowed. Default is 0, representing an infinite number of failed attempts.
161      *
162      * @return string
163      */
164     public function getMaxFailAttempts()
165     {
166         return $this->max_fail_attempts;
167     }
168 
169     /**
170      * Allow auto billing for the outstanding amount of the agreement in the next cycle. Allowed values: `YES`, `NO`. Default is `NO`.
171      *
172      * @param string $auto_bill_amount
173      * 
174      * @return $this
175      */
176     public function setAutoBillAmount($auto_bill_amount)
177     {
178         $this->auto_bill_amount = $auto_bill_amount;
179         return $this;
180     }
181 
182     /**
183      * Allow auto billing for the outstanding amount of the agreement in the next cycle. Allowed values: `YES`, `NO`. Default is `NO`.
184      *
185      * @return string
186      */
187     public function getAutoBillAmount()
188     {
189         return $this->auto_bill_amount;
190     }
191 
192     /**
193      * Action to take if a failure occurs during initial payment. Allowed values: `CONTINUE`, `CANCEL`. Default is continue.
194      *
195      * @param string $initial_fail_amount_action
196      * 
197      * @return $this
198      */
199     public function setInitialFailAmountAction($initial_fail_amount_action)
200     {
201         $this->initial_fail_amount_action = $initial_fail_amount_action;
202         return $this;
203     }
204 
205     /**
206      * Action to take if a failure occurs during initial payment. Allowed values: `CONTINUE`, `CANCEL`. Default is continue.
207      *
208      * @return string
209      */
210     public function getInitialFailAmountAction()
211     {
212         return $this->initial_fail_amount_action;
213     }
214 
215     /**
216      * Payment types that are accepted for this plan.
217      *
218      * @param string $accepted_payment_type
219      * 
220      * @return $this
221      */
222     public function setAcceptedPaymentType($accepted_payment_type)
223     {
224         $this->accepted_payment_type = $accepted_payment_type;
225         return $this;
226     }
227 
228     /**
229      * Payment types that are accepted for this plan.
230      *
231      * @return string
232      */
233     public function getAcceptedPaymentType()
234     {
235         return $this->accepted_payment_type;
236     }
237 
238     /**
239      * char_set for this plan.
240      *
241      * @param string $char_set
242      * 
243      * @return $this
244      */
245     public function setCharSet($char_set)
246     {
247         $this->char_set = $char_set;
248         return $this;
249     }
250 
251     /**
252      * char_set for this plan.
253      *
254      * @return string
255      */
256     public function getCharSet()
257     {
258         return $this->char_set;
259     }
260 
261 }
262 
API documentation generated by ApiGen