PATH:
home
/
lab2454c
/
keebchat.com
/
core
/
libs
/
paypal
/
vendor
/
paypal
/
rest-api-sdk-php
/
lib
/
PayPal
/
Api
<?php namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; use PayPal\Transport\PayPalRestCall; use PayPal\Validation\ArgumentValidator; use PayPal\Api\Template; use PayPal\Rest\ApiContext; /** * Class Templates * * List of templates belonging to merchant. * * @package PayPal\Api * * @property \PayPal\Api\Address[] addresses * @property string[] emails * @property \PayPal\Api\Phone[] phones * @property \PayPal\Api\Template[] templates * @property \PayPal\Api\Links[] links */ class Templates extends PayPalResourceModel { /** * List of addresses in merchant's profile. * * @param \PayPal\Api\Address[] $addresses * * @return $this */ public function setAddresses($addresses) { $this->addresses = $addresses; return $this; } /** * List of addresses in merchant's profile. * * @return \PayPal\Api\Address[] */ public function getAddresses() { return $this->addresses; } /** * Append Addresses to the list. * * @param \PayPal\Api\Address $address * @return $this */ public function addAddress($address) { if (!$this->getAddresses()) { return $this->setAddresses(array($address)); } else { return $this->setAddresses( array_merge($this->getAddresses(), array($address)) ); } } /** * Remove Addresses from the list. * * @param \PayPal\Api\Address $address * @return $this */ public function removeAddress($address) { return $this->setAddresses( array_diff($this->getAddresses(), array($address)) ); } /** * List of emails in merchant's profile. * * @param string[] $emails * * @return $this */ public function setEmails($emails) { $this->emails = $emails; return $this; } /** * List of emails in merchant's profile. * * @return string[] */ public function getEmails() { return $this->emails; } /** * Append Emails to the list. * * @param string $string * @return $this */ public function addEmail($string) { if (!$this->getEmails()) { return $this->setEmails(array($string)); } else { return $this->setEmails( array_merge($this->getEmails(), array($string)) ); } } /** * Remove Emails from the list. * * @param string $string * @return $this */ public function removeEmail($string) { return $this->setEmails( array_diff($this->getEmails(), array($string)) ); } /** * List of phone numbers in merchant's profile. * * @param \PayPal\Api\Phone[] $phones * * @return $this */ public function setPhones($phones) { $this->phones = $phones; return $this; } /** * List of phone numbers in merchant's profile. * * @return \PayPal\Api\Phone[] */ public function getPhones() { return $this->phones; } /** * Append Phones to the list. * * @param \PayPal\Api\Phone $phone * @return $this */ public function addPhone($phone) { if (!$this->getPhones()) { return $this->setPhones(array($phone)); } else { return $this->setPhones( array_merge($this->getPhones(), array($phone)) ); } } /** * Remove Phones from the list. * * @param \PayPal\Api\Phone $phone * @return $this */ public function removePhone($phone) { return $this->setPhones( array_diff($this->getPhones(), array($phone)) ); } /** * Array of templates. * * @param \PayPal\Api\Template[] $templates * * @return $this */ public function setTemplates($templates) { $this->templates = $templates; return $this; } /** * Array of templates. * * @return \PayPal\Api\Template[] */ public function getTemplates() { return $this->templates; } /** * Append Templates to the list. * * @param \PayPal\Api\Template $template * @return $this */ public function addTemplate($template) { if (!$this->getTemplates()) { return $this->setTemplates(array($template)); } else { return $this->setTemplates( array_merge($this->getTemplates(), array($template)) ); } } /** * Remove Templates from the list. * * @param \PayPal\Api\Template $template * @return $this */ public function removeTemplate($template) { return $this->setTemplates( array_diff($this->getTemplates(), array($template)) ); } /** * Retrieve the details for a particular template by passing the template ID to the request URI. * * @deprecated Please use `Template::get()` instead. * @see Template::get * @param string $templateId * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls * @return Template */ public static function get($templateId, $apiContext = null, $restCall = null) { ArgumentValidator::validate($templateId, 'templateId'); $payLoad = ""; $json = self::executeCall( "/v1/invoicing/templates/$templateId", "GET", $payLoad, null, $apiContext, $restCall ); $ret = new Template(); $ret->fromJson($json); return $ret; } /** * Retrieves the template information of the merchant. * * @param array $params * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials. * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls * @return Templates */ public static function getAll($params = array(), $apiContext = null, $restCall = null) { ArgumentValidator::validate($params, 'params'); $payLoad = ""; $allowedParams = array( 'fields' => 1, ); $json = self::executeCall( "/v1/invoicing/templates/" . "?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall ); $ret = new Templates(); $ret->fromJson($json); return $ret; } }
[-] PaymentTerm.php
[edit]
[-] Patch.php
[edit]
[-] AgreementTransaction.php
[edit]
[-] OverrideChargeModel.php
[edit]
[-] RefundDetail.php
[edit]
[-] PaymentExecution.php
[edit]
[-] CurrencyConversion.php
[edit]
[-] InvoiceItem.php
[edit]
[-] Terms.php
[edit]
[-] PaymentDetail.php
[edit]
[-] BillingInfo.php
[edit]
[-] CreditCardList.php
[edit]
[-] MerchantInfo.php
[edit]
[-] Links.php
[edit]
[-] Transactions.php
[edit]
[-] PaymentDefinition.php
[edit]
[+]
..
[-] PaymentSummary.php
[edit]
[-] OpenIdError.php
[edit]
[-] BillingAgreementToken.php
[edit]
[-] Sale.php
[edit]
[-] Item.php
[edit]
[-] Address.php
[edit]
[-] InvoiceNumber.php
[edit]
[-] Payee.php
[edit]
[-] TransactionBase.php
[edit]
[-] ExtendedBankAccount.php
[edit]
[-] AgreementStateDescriptor.php
[edit]
[-] RecipientBankingInstruction.php
[edit]
[-] WebProfile.php
[edit]
[-] Payout.php
[edit]
[-] FundingDetail.php
[edit]
[-] CreditFinancingOffered.php
[edit]
[-] PaymentCardToken.php
[edit]
[-] ProcessorResponse.php
[edit]
[-] OpenIdTokeninfo.php
[edit]
[-] PotentialPayerInfo.php
[edit]
[-] MerchantPreferences.php
[edit]
[-] InstallmentInfo.php
[edit]
[-] InvoiceSearchResponse.php
[edit]
[-] FmfDetails.php
[edit]
[-] Agreement.php
[edit]
[-] Incentive.php
[edit]
[-] OpenIdSession.php
[edit]
[-] Plan.php
[edit]
[-] Refund.php
[edit]
[-] BaseAddress.php
[edit]
[-] CreditCardToken.php
[edit]
[-] Amount.php
[edit]
[-] CreateProfileResponse.php
[edit]
[-] AgreementDetails.php
[edit]
[-] Order.php
[edit]
[-] CarrierAccount.php
[edit]
[-] FuturePayment.php
[edit]
[-] FileAttachment.php
[edit]
[-] Image.php
[edit]
[-] Details.php
[edit]
[-] RedirectUrls.php
[edit]
[-] RelatedResources.php
[edit]
[-] AlternatePayment.php
[edit]
[-] PrivateLabelCard.php
[edit]
[-] Tax.php
[edit]
[-] Phone.php
[edit]
[-] Measurement.php
[edit]
[-] RefundRequest.php
[edit]
[-] Payer.php
[edit]
[-] FundingSource.php
[edit]
[-] PayoutBatch.php
[edit]
[-] VerifyWebhookSignatureResponse.php
[edit]
[-] CarrierAccountToken.php
[edit]
[-] PayoutItem.php
[edit]
[-] Authorization.php
[edit]
[-] CreditCardHistory.php
[edit]
[-] WebhookEventTypeList.php
[edit]
[-] TemplateSettingsMetadata.php
[edit]
[-] Cost.php
[edit]
[-] PayoutItemDetails.php
[edit]
[-] NameValuePair.php
[edit]
[-] CancelNotification.php
[edit]
[-] WebhookEvent.php
[edit]
[-] ShippingInfo.php
[edit]
[-] FundingOption.php
[edit]
[-] ShippingAddress.php
[edit]
[-] HyperSchema.php
[edit]
[-] CartBase.php
[edit]
[-] PayerInfo.php
[edit]
[-] Notification.php
[edit]
[-] PaymentHistory.php
[edit]
[-] CustomAmount.php
[edit]
[-] WebhookList.php
[edit]
[-] Credit.php
[edit]
[-] PlanList.php
[edit]
[-] Metadata.php
[edit]
[-] ShippingCost.php
[edit]
[-] TemplateData.php
[edit]
[-] ChargeModel.php
[edit]
[-] Capture.php
[edit]
[-] Transaction.php
[edit]
[-] InputFields.php
[edit]
[-] OpenIdUserinfo.php
[edit]
[-] PatchRequest.php
[edit]
[-] DetailedRefund.php
[edit]
[-] PaymentCard.php
[edit]
[-] AgreementTransactions.php
[edit]
[-] Currency.php
[edit]
[-] Participant.php
[edit]
[-] PaymentOptions.php
[edit]
[-] VerifyWebhookSignature.php
[edit]
[-] BankAccountsList.php
[edit]
[-] Template.php
[edit]
[-] CountryCode.php
[edit]
[-] ErrorDetails.php
[edit]
[-] PaymentInstruction.php
[edit]
[-] TemplateSettings.php
[edit]
[-] Payment.php
[edit]
[-] Search.php
[edit]
[-] InstallmentOption.php
[edit]
[-] Invoice.php
[edit]
[-] BankAccount.php
[edit]
[-] FundingInstrument.php
[edit]
[-] FlowConfig.php
[edit]
[-] ItemList.php
[edit]
[-] Templates.php
[edit]
[-] BankToken.php
[edit]
[-] PayoutSenderBatchHeader.php
[edit]
[-] PayoutBatchHeader.php
[edit]
[-] Presentation.php
[edit]
[-] Billing.php
[edit]
[-] WebhookEventType.php
[edit]
[-] OpenIdAddress.php
[edit]
[-] InvoiceAddress.php
[edit]
[-] CreditCard.php
[edit]
[-] Webhook.php
[edit]
[-] ExternalFunding.php
[edit]
[-] WebhookEventList.php
[edit]
[-] Error.php
[edit]