/
home
/
techb158
/
ileadtechnology.com
/
vendor
/
paypal
/
rest-api-sdk-php
/
lib
/
PayPal
/
Api
/
/home/techb158/ileadtechnology.com/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api
mkdir
upload
Name
Size
Mode
Actions
Address.php
1085
0644
edit
dl
rm
Agreement.php
20513
0644
edit
dl
rm
AgreementDetails.php
4787
0644
edit
dl
rm
AgreementStateDescriptor.php
1149
0644
edit
dl
rm
AgreementTransaction.php
4893
0644
edit
dl
rm
AgreementTransactions.php
1935
0644
edit
dl
rm
AlternatePayment.php
2230
0644
edit
dl
rm
Amount.php
2298
0644
edit
dl
rm
Authorization.php
15801
0644
edit
dl
rm
BankAccount.php
14348
0644
edit
dl
rm
BankAccountsList.php
2632
0644
edit
dl
rm
BankToken.php
2036
0644
edit
dl
rm
BaseAddress.php
4219
0644
edit
dl
rm
Billing.php
794
0644
edit
dl
rm
BillingAgreementToken.php
310
0644
edit
dl
rm
BillingInfo.php
5376
0644
edit
dl
rm
CancelNotification.php
3680
0644
edit
dl
rm
Capture.php
9086
0644
edit
dl
rm
CarrierAccount.php
3042
0644
edit
dl
rm
CarrierAccountToken.php
1432
0644
edit
dl
rm
CartBase.php
9380
0644
edit
dl
rm
ChargeModel.php
1570
0644
edit
dl
rm
Cost.php
1417
0644
edit
dl
rm
CountryCode.php
942
0644
edit
dl
rm
CreateProfileResponse.php
603
0644
edit
dl
rm
Credit.php
1089
0644
edit
dl
rm
CreditCard.php
15414
0644
edit
dl
rm
CreditCardHistory.php
1849
0644
edit
dl
rm
CreditCardList.php
2629
0644
edit
dl
rm
CreditCardToken.php
4032
0644
edit
dl
rm
CreditFinancingOffered.php
3989
0644
edit
dl
rm
Currency.php
1475
0644
edit
dl
rm
CurrencyConversion.php
5533
0644
edit
dl
rm
CustomAmount.php
1251
0644
edit
dl
rm
DetailedRefund.php
4550
0644
edit
dl
rm
Details.php
5818
0644
edit
dl
rm
Error.php
6985
0644
edit
dl
rm
ErrorDetails.php
2092
0644
edit
dl
rm
ExtendedBankAccount.php
978
0644
edit
dl
rm
ExternalFunding.php
3320
0644
edit
dl
rm
FileAttachment.php
1138
0644
edit
dl
rm
FlowConfig.php
3122
0644
edit
dl
rm
FmfDetails.php
2405
0644
edit
dl
rm
FundingDetail.php
2380
0644
edit
dl
rm
FundingInstrument.php
7737
0644
edit
dl
rm
FundingOption.php
4998
0644
edit
dl
rm
FundingSource.php
6362
0644
edit
dl
rm
FuturePayment.php
1560
0644
edit
dl
rm
HyperSchema.php
3380
0644
edit
dl
rm
Image.php
1011
0644
edit
dl
rm
Incentive.php
4431
0644
edit
dl
rm
InputFields.php
3104
0644
edit
dl
rm
InstallmentInfo.php
3106
0644
edit
dl
rm
InstallmentOption.php
2189
0644
edit
dl
rm
Invoice.php
37040
0644
edit
dl
rm
InvoiceAddress.php
667
0644
edit
dl
rm
InvoiceItem.php
5117
0644
edit
dl
rm
InvoiceNumber.php
585
0644
edit
dl
rm
InvoiceSearchResponse.php
1821
0644
edit
dl
rm
Item.php
9845
0644
edit
dl
rm
ItemList.php
3502
0644
edit
dl
rm
Links.php
2517
0644
edit
dl
rm
Measurement.php
1076
0644
edit
dl
rm
MerchantInfo.php
5638
0644
edit
dl
rm
MerchantPreferences.php
6075
0644
edit
dl
rm
Metadata.php
5450
0644
edit
dl
rm
NameValuePair.php
1185
0644
edit
dl
rm
Notification.php
3125
0644
edit
dl
rm
OpenIdAddress.php
2451
0644
edit
dl
rm
OpenIdError.php
1852
0644
edit
dl
rm
OpenIdSession.php
3783
0644
edit
dl
rm
OpenIdTokeninfo.php
8268
0644
edit
dl
rm
OpenIdUserinfo.php
11161
0644
edit
dl
rm
Order.php
13574
0644
edit
dl
rm
OverrideChargeModel.php
1192
0644
edit
dl
rm
Participant.php
4153
0644
edit
dl
rm
Patch.php
2233
0644
edit
dl
rm
PatchRequest.php
1847
0644
edit
dl
rm
Payee.php
3531
0644
edit
dl
rm
Payer.php
7830
0644
edit
dl
rm
PayerInfo.php
9231
0644
edit
dl
rm
Payment.php
19738
0644
edit
dl
rm
PaymentCard.php
10053
0644
edit
dl
rm
PaymentCardToken.php
3394
0644
edit
dl
rm
PaymentDefinition.php
5022
0644
edit
dl
rm
PaymentDetail.php
4557
0644
edit
dl
rm
PaymentExecution.php
2817
0644
edit
dl
rm
PaymentHistory.php
2526
0644
edit
dl
rm
PaymentInstruction.php
4662
0644
edit
dl
rm
PaymentOptions.php
2259
0644
edit
dl
rm
PaymentSummary.php
1142
0644
edit
dl
rm
PaymentTerm.php
1649
0644
edit
dl
rm
Payout.php
4977
0644
edit
dl
rm
PayoutBatch.php
2433
0644
edit
dl
rm
PayoutBatchHeader.php
5464
0644
edit
dl
rm
PayoutItem.php
6453
0644
edit
dl
rm
PayoutItemDetails.php
5946
0644
edit
dl
rm
PayoutSenderBatchHeader.php
5251
0644
edit
dl
rm
Phone.php
1575
0644
edit
dl
rm
Plan.php
12099
0644
edit
dl
rm
PlanList.php
3249
0644
edit
dl
rm
PotentialPayerInfo.php
2442
0644
edit
dl
rm
Presentation.php
4582
0644
edit
dl
rm
PrivateLabelCard.php
3118
0644
edit
dl
rm
ProcessorResponse.php
3776
0644
edit
dl
rm
RecipientBankingInstruction.php
3230
0644
edit
dl
rm
RedirectUrls.php
1667
0644
edit
dl
rm
Refund.php
7148
0644
edit
dl
rm
RefundDetail.php
3245
0644
edit
dl
rm
RefundRequest.php
3720
0644
edit
dl
rm
RelatedResources.php
2467
0644
edit
dl
rm
Sale.php
18640
0644
edit
dl
rm
Search.php
12541
0644
edit
dl
rm
ShippingAddress.php
2216
0644
edit
dl
rm
ShippingCost.php
1179
0644
edit
dl
rm
ShippingInfo.php
3008
0644
edit
dl
rm
Tax.php
2174
0644
edit
dl
rm
Template.php
7860
0644
edit
dl
rm
TemplateData.php
15162
0644
edit
dl
rm
Templates.php
6947
0644
edit
dl
rm
TemplateSettings.php
1410
0644
edit
dl
rm
TemplateSettingsMetadata.php
705
0644
edit
dl
rm
Terms.php
3138
0644
edit
dl
rm
Transaction.php
1402
0644
edit
dl
rm
TransactionBase.php
943
0644
edit
dl
rm
Transactions.php
612
0644
edit
dl
rm
VerifyWebhookSignature.php
7306
0644
edit
dl
rm
VerifyWebhookSignatureResponse.php
890
0644
edit
dl
rm
Webhook.php
8182
0644
edit
dl
rm
WebhookEvent.php
9305
0644
edit
dl
rm
WebhookEventList.php
3053
0644
edit
dl
rm
WebhookEventType.php
3350
0644
edit
dl
rm
WebhookEventTypeList.php
1530
0644
edit
dl
rm
WebhookList.php
1344
0644
edit
dl
rm
WebProfile.php
8675
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Agreement.php
(20513B)
<?php namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; use PayPal\Core\PayPalConstants; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; use PayPal\Validation\ArgumentValidator; /** * Class Agreement * * A resource representing an agreement. * * @package PayPal\Api * * @property string id * @property string state * @property string name * @property string description * @property string start_date * @property \PayPal\Api\Payer payer * @property \PayPal\Api\Address shipping_address * @property \PayPal\Api\MerchantPreferences override_merchant_preferences * @property \PayPal\Api\OverrideChargeModel[] override_charge_models * @property \PayPal\Api\Plan plan * @property string create_time * @property string update_time * @property \PayPal\Api\AgreementDetails agreement_details */ class Agreement extends PayPalResourceModel { /** * Identifier of the agreement. * * @param string $id * * @return $this */ public function setId($id) { $this->id = $id; return $this; } /** * Identifier of the agreement. * * @return string */ public function getId() { return $this->id; } /** * State of the agreement. * * @param string $state * * @return $this */ public function setState($state) { $this->state = $state; return $this; } /** * State of the agreement. * * @return string */ public function getState() { return $this->state; } /** * Name of the agreement. * * @param string $name * * @return $this */ public function setName($name) { $this->name = $name; return $this; } /** * Name of the agreement. * * @return string */ public function getName() { return $this->name; } /** * Description of the agreement. * * @param string $description * * @return $this */ public function setDescription($description) { $this->description = $description; return $this; } /** * Description of the agreement. * * @return string */ public function getDescription() { return $this->description; } /** * Start date of the agreement. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). * * @param string $start_date * * @return $this */ public function setStartDate($start_date) { $this->start_date = $start_date; return $this; } /** * Start date of the agreement. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). * * @return string */ public function getStartDate() { return $this->start_date; } /** * Details of the buyer who is enrolling in this agreement. This information is gathered from execution of the approval URL. * * @param \PayPal\Api\Payer $payer * * @return $this */ public function setPayer($payer) { $this->payer = $payer; return $this; } /** * Details of the buyer who is enrolling in this agreement. This information is gathered from execution of the approval URL. * * @return \PayPal\Api\Payer */ public function getPayer() { return $this->payer; } /** * Shipping address object of the agreement, which should be provided if it is different from the default address. * * @param \PayPal\Api\Address $shipping_address * * @return $this */ public function setShippingAddress($shipping_address) { $this->shipping_address = $shipping_address; return $this; } /** * Shipping address object of the agreement, which should be provided if it is different from the default address. * * @return \PayPal\Api\Address */ public function getShippingAddress() { return $this->shipping_address; } /** * Default merchant preferences from the billing plan are used, unless override preferences are provided here. * * @param \PayPal\Api\MerchantPreferences $override_merchant_preferences * * @return $this */ public function setOverrideMerchantPreferences($override_merchant_preferences) { $this->override_merchant_preferences = $override_merchant_preferences; return $this; } /** * Default merchant preferences from the billing plan are used, unless override preferences are provided here. * * @return \PayPal\Api\MerchantPreferences */ public function getOverrideMerchantPreferences() { return $this->override_merchant_preferences; } /** * Array of override_charge_model for this agreement if needed to change the default models from the billing plan. * * @param \PayPal\Api\OverrideChargeModel[] $override_charge_models * * @return $this */ public function setOverrideChargeModels($override_charge_models) { $this->override_charge_models = $override_charge_models; return $this; } /** * Array of override_charge_model for this agreement if needed to change the default models from the billing plan. * * @return \PayPal\Api\OverrideChargeModel[] */ public function getOverrideChargeModels() { return $this->override_charge_models; } /** * Append OverrideChargeModels to the list. * * @param \PayPal\Api\OverrideChargeModel $overrideChargeModel * @return $this */ public function addOverrideChargeModel($overrideChargeModel) { if (!$this->getOverrideChargeModels()) { return $this->setOverrideChargeModels(array($overrideChargeModel)); } else { return $this->setOverrideChargeModels( array_merge($this->getOverrideChargeModels(), array($overrideChargeModel)) ); } } /** * Remove OverrideChargeModels from the list. * * @param \PayPal\Api\OverrideChargeModel $overrideChargeModel * @return $this */ public function removeOverrideChargeModel($overrideChargeModel) { return $this->setOverrideChargeModels( array_diff($this->getOverrideChargeModels(), array($overrideChargeModel)) ); } /** * Plan details for this agreement. * * @param \PayPal\Api\Plan $plan * * @return $this */ public function setPlan($plan) { $this->plan = $plan; return $this; } /** * Plan details for this agreement. * * @return \PayPal\Api\Plan */ public function getPlan() { return $this->plan; } /** * Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). * * @param string $create_time * * @return $this */ public function setCreateTime($create_time) { $this->create_time = $create_time; return $this; } /** * Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). * * @return string */ public function getCreateTime() { return $this->create_time; } /** * Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). * * @param string $update_time * * @return $this */ public function setUpdateTime($update_time) { $this->update_time = $update_time; return $this; } /** * Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6). * * @return string */ public function getUpdateTime() { return $this->update_time; } /** * Agreement Details * * @param \PayPal\Api\AgreementDetails $agreement_details * * @return $this */ public function setAgreementDetails($agreement_details) { $this->agreement_details = $agreement_details; return $this; } /** * Agreement Details * * @return \PayPal\Api\AgreementDetails */ public function getAgreementDetails() { return $this->agreement_details; } /** * Get Approval Link * * @return null|string */ public function getApprovalLink() { return $this->getLink(PayPalConstants::APPROVAL_URL); } /** * Create a new billing agreement by passing the details for the agreement, including the name, description, start date, payer, and billing plan in the request JSON. * * @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 Agreement */ public function create($apiContext = null, $restCall = null) { $payLoad = $this->toJSON(); $json = self::executeCall( "/v1/payments/billing-agreements/", "POST", $payLoad, null, $apiContext, $restCall ); $this->fromJson($json); return $this; } /** * Execute a billing agreement after buyer approval by passing the payment token to the request URI. * * @param $paymentToken * @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 Agreement */ public function execute($paymentToken, $apiContext = null, $restCall = null) { ArgumentValidator::validate($paymentToken, 'paymentToken'); $payLoad = ""; $json = self::executeCall( "/v1/payments/billing-agreements/$paymentToken/agreement-execute", "POST", $payLoad, null, $apiContext, $restCall ); $this->fromJson($json); return $this; } /** * Retrieve details for a particular billing agreement by passing the ID of the agreement to the request URI. * * @param string $agreementId * @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 Agreement */ public static function get($agreementId, $apiContext = null, $restCall = null) { ArgumentValidator::validate($agreementId, 'agreementId'); $payLoad = ""; $json = self::executeCall( "/v1/payments/billing-agreements/$agreementId", "GET", $payLoad, null, $apiContext, $restCall ); $ret = new Agreement(); $ret->fromJson($json); return $ret; } /** * Update details of a billing agreement, such as the description, shipping address, and start date, by passing the ID of the agreement to the request URI. * * @param PatchRequest $patchRequest * @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 bool */ public function update($patchRequest, $apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); ArgumentValidator::validate($patchRequest, 'patchRequest'); $payLoad = $patchRequest->toJSON(); self::executeCall( "/v1/payments/billing-agreements/{$this->getId()}", "PATCH", $payLoad, null, $apiContext, $restCall ); return true; } /** * Suspend a particular billing agreement by passing the ID of the agreement to the request URI. * * @param AgreementStateDescriptor $agreementStateDescriptor * @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 bool */ public function suspend($agreementStateDescriptor, $apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); ArgumentValidator::validate($agreementStateDescriptor, 'agreementStateDescriptor'); $payLoad = $agreementStateDescriptor->toJSON(); self::executeCall( "/v1/payments/billing-agreements/{$this->getId()}/suspend", "POST", $payLoad, null, $apiContext, $restCall ); return true; } /** * Reactivate a suspended billing agreement by passing the ID of the agreement to the appropriate URI. In addition, pass an agreement_state_descriptor object in the request JSON that includes a note about the reason for changing the state of the agreement and the amount and currency for the agreement. * * @param AgreementStateDescriptor $agreementStateDescriptor * @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 bool */ public function reActivate($agreementStateDescriptor, $apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); ArgumentValidator::validate($agreementStateDescriptor, 'agreementStateDescriptor'); $payLoad = $agreementStateDescriptor->toJSON(); self::executeCall( "/v1/payments/billing-agreements/{$this->getId()}/re-activate", "POST", $payLoad, null, $apiContext, $restCall ); return true; } /** * Cancel a billing agreement by passing the ID of the agreement to the request URI. In addition, pass an agreement_state_descriptor object in the request JSON that includes a note about the reason for changing the state of the agreement and the amount and currency for the agreement. * * @param AgreementStateDescriptor $agreementStateDescriptor * @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 bool */ public function cancel($agreementStateDescriptor, $apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); ArgumentValidator::validate($agreementStateDescriptor, 'agreementStateDescriptor'); $payLoad = $agreementStateDescriptor->toJSON(); self::executeCall( "/v1/payments/billing-agreements/{$this->getId()}/cancel", "POST", $payLoad, null, $apiContext, $restCall ); return true; } /** * Bill an outstanding amount for an agreement by passing the ID of the agreement to the request URI. In addition, pass an agreement_state_descriptor object in the request JSON that includes a note about the reason for changing the state of the agreement and the amount and currency for the agreement. * * @param AgreementStateDescriptor $agreementStateDescriptor * @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 bool */ public function billBalance($agreementStateDescriptor, $apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); ArgumentValidator::validate($agreementStateDescriptor, 'agreementStateDescriptor'); $payLoad = $agreementStateDescriptor->toJSON(); self::executeCall( "/v1/payments/billing-agreements/{$this->getId()}/bill-balance", "POST", $payLoad, null, $apiContext, $restCall ); return true; } /** * Set the balance for an agreement by passing the ID of the agreement to the request URI. In addition, pass a common_currency object in the request JSON that specifies the currency type and value of the balance. * * @param Currency $currency * @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 bool */ public function setBalance($currency, $apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); ArgumentValidator::validate($currency, 'currency'); $payLoad = $currency->toJSON(); self::executeCall( "/v1/payments/billing-agreements/{$this->getId()}/set-balance", "POST", $payLoad, null, $apiContext, $restCall ); return true; } /** * List transactions for a billing agreement by passing the ID of the agreement, as well as the start and end dates of the range of transactions to list, to the request URI. * * @deprecated Please use searchTransactions Instead * @param string $agreementId * @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 AgreementTransactions */ public static function transactions($agreementId, $apiContext = null, $restCall = null) { ArgumentValidator::validate($agreementId, 'agreementId'); $payLoad = ""; $json = self::executeCall( "/v1/payments/billing-agreements/$agreementId/transactions", "GET", $payLoad, null, $apiContext, $restCall ); $ret = new AgreementTransactions(); $ret->fromJson($json); return $ret; } /** * List transactions for a billing agreement by passing the ID of the agreement, as well as the start and end dates of the range of transactions to list, to the request URI. * * @param string $agreementId * @param array $params Parameters for search string. Options: start_date, and end_date * @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 AgreementTransactions */ public static function searchTransactions($agreementId, $params = array(), $apiContext = null, $restCall = null) { ArgumentValidator::validate($agreementId, 'agreementId'); ArgumentValidator::validate($params, 'params'); $allowedParams = array( 'start_date' => 1, 'end_date' => 1, ); $payLoad = ""; $json = self::executeCall( "/v1/payments/billing-agreements/$agreementId/transactions?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall ); $ret = new AgreementTransactions(); $ret->fromJson($json); return $ret; } }
Save
cmd:
run