Overview
  • Namespace
  • Class

Namespaces

  • PayPal
    • Api
    • Auth
    • Cache
    • Common
    • Converter
    • Core
    • Exception
    • Handler
    • Log
    • Rest
    • Security
    • Transport
    • Validation

Classes

  • Address
  • Agreement
  • AgreementDetails
  • AgreementStateDescriptor
  • AgreementTransaction
  • AgreementTransactions
  • AlternatePayment
  • Amount
  • Authorization
  • BankAccount
  • BankAccountsList
  • BankToken
  • BaseAddress
  • Billing
  • BillingAgreementToken
  • BillingInfo
  • CancelNotification
  • Capture
  • CarrierAccount
  • CarrierAccountToken
  • CartBase
  • ChargeModel
  • Cost
  • CountryCode
  • CreateProfileResponse
  • Credit
  • CreditCard
  • CreditCardHistory
  • CreditCardList
  • CreditCardToken
  • CreditFinancingOffered
  • Currency
  • CurrencyConversion
  • CustomAmount
  • DetailedRefund
  • Details
  • Error
  • ErrorDetails
  • ExtendedBankAccount
  • ExternalFunding
  • FileAttachment
  • FlowConfig
  • FmfDetails
  • FundingDetail
  • FundingInstrument
  • FundingOption
  • FundingSource
  • FuturePayment
  • HyperSchema
  • Image
  • Incentive
  • InputFields
  • InstallmentInfo
  • InstallmentOption
  • Invoice
  • InvoiceAddress
  • InvoiceItem
  • InvoiceNumber
  • InvoiceSearchResponse
  • Item
  • ItemList
  • Links
  • Measurement
  • MerchantInfo
  • MerchantPreferences
  • Metadata
  • NameValuePair
  • Notification
  • OpenIdAddress
  • OpenIdError
  • OpenIdSession
  • OpenIdTokeninfo
  • OpenIdUserinfo
  • Order
  • OverrideChargeModel
  • Participant
  • Patch
  • PatchRequest
  • Payee
  • Payer
  • PayerInfo
  • Payment
  • PaymentCard
  • PaymentCardToken
  • PaymentDefinition
  • PaymentDetail
  • PaymentExecution
  • PaymentHistory
  • PaymentInstruction
  • PaymentOptions
  • PaymentSummary
  • PaymentTerm
  • Payout
  • PayoutBatch
  • PayoutBatchHeader
  • PayoutItem
  • PayoutItemDetails
  • PayoutSenderBatchHeader
  • Phone
  • Plan
  • PlanList
  • PotentialPayerInfo
  • Presentation
  • PrivateLabelCard
  • ProcessorResponse
  • RecipientBankingInstruction
  • RedirectUrls
  • Refund
  • RefundDetail
  • RefundRequest
  • RelatedResources
  • Sale
  • Search
  • ShippingAddress
  • ShippingCost
  • ShippingInfo
  • Tax
  • Template
  • TemplateData
  • Templates
  • TemplateSettings
  • TemplateSettingsMetadata
  • Terms
  • Transaction
  • TransactionBase
  • Transactions
  • VerifyWebhookSignature
  • VerifyWebhookSignatureResponse
  • Webhook
  • WebhookEvent
  • WebhookEventList
  • WebhookEventType
  • WebhookEventTypeList
  • WebhookList
  • WebProfile

Class Agreement

Class Agreement

A resource representing an agreement.

PayPal\Common\PayPalModel
Extended by PayPal\Common\PayPalResourceModel implements PayPal\Rest\IResource
Extended by PayPal\Api\Agreement
Namespace: PayPal\Api
Package: PayPal\Api
Located at PayPal/Api/Agreement.php

Methods summary

public
# setId( string $id )

Identifier of the agreement.

Identifier of the agreement.

Parameters

$id

Returns


$this
public string
# getId( )

Identifier of the agreement.

Identifier of the agreement.

Returns

string
public
# setState( string $state )

State of the agreement.

State of the agreement.

Parameters

$state

Returns


$this
public string
# getState( )

State of the agreement.

State of the agreement.

Returns

string
public
# setName( string $name )

Name of the agreement.

Name of the agreement.

Parameters

$name

Returns


$this
public string
# getName( )

Name of the agreement.

Name of the agreement.

Returns

string
public
# setDescription( string $description )

Description of the agreement.

Description of the agreement.

Parameters

$description

Returns


$this
public string
# getDescription( )

Description of the agreement.

Description of the agreement.

Returns

string
public
# setStartDate( string $start_date )

Start date of the agreement. Date format yyyy-MM-dd z, as defined in ISO8601.

Start date of the agreement. Date format yyyy-MM-dd z, as defined in ISO8601.

Parameters

$start_date

Returns


$this
public string
# getStartDate( )

Start date of the agreement. Date format yyyy-MM-dd z, as defined in ISO8601.

Start date of the agreement. Date format yyyy-MM-dd z, as defined in ISO8601.

Returns

string
public
# setPayer( PayPal\Api\Payer $payer )

Details of the buyer who is enrolling in this agreement. This information is gathered from execution of the approval URL.

Details of the buyer who is enrolling in this agreement. This information is gathered from execution of the approval URL.

Parameters

$payer

Returns


$this
public PayPal\Api\Payer
# getPayer( )

Details of the buyer who is enrolling in this agreement. This information is gathered from execution of the approval URL.

Details of the buyer who is enrolling in this agreement. This information is gathered from execution of the approval URL.

Returns

PayPal\Api\Payer
public
# setShippingAddress( PayPal\Api\Address $shipping_address )

Shipping address object of the agreement, which should be provided if it is different from the default address.

Shipping address object of the agreement, which should be provided if it is different from the default address.

Parameters

$shipping_address

Returns


$this
public PayPal\Api\Address
# getShippingAddress( )

Shipping address object of the agreement, which should be provided if it is different from the default address.

Shipping address object of the agreement, which should be provided if it is different from the default address.

Returns

PayPal\Api\Address
public
# setOverrideMerchantPreferences( PayPal\Api\MerchantPreferences $override_merchant_preferences )

Default merchant preferences from the billing plan are used, unless override preferences are provided here.

Default merchant preferences from the billing plan are used, unless override preferences are provided here.

Parameters

$override_merchant_preferences

Returns


$this
public PayPal\Api\MerchantPreferences
# getOverrideMerchantPreferences( )

Default merchant preferences from the billing plan are used, unless override preferences are provided here.

Default merchant preferences from the billing plan are used, unless override preferences are provided here.

Returns

PayPal\Api\MerchantPreferences
public
# setOverrideChargeModels( PayPal\Api\OverrideChargeModel[] $override_charge_models )

Array of override_charge_model for this agreement if needed to change the default models from the billing plan.

Array of override_charge_model for this agreement if needed to change the default models from the billing plan.

Parameters

$override_charge_models

Returns


$this
public PayPal\Api\OverrideChargeModel[]
# getOverrideChargeModels( )

Array of override_charge_model for this agreement if needed to change the default models from the billing plan.

Array of override_charge_model for this agreement if needed to change the default models from the billing plan.

Returns

PayPal\Api\OverrideChargeModel[]
public
# addOverrideChargeModel( PayPal\Api\OverrideChargeModel $overrideChargeModel )

Append OverrideChargeModels to the list.

Append OverrideChargeModels to the list.

Parameters

$overrideChargeModel

Returns


$this
public
# removeOverrideChargeModel( PayPal\Api\OverrideChargeModel $overrideChargeModel )

Remove OverrideChargeModels from the list.

Remove OverrideChargeModels from the list.

Parameters

$overrideChargeModel

Returns


$this
public
# setPlan( PayPal\Api\Plan $plan )

Plan details for this agreement.

Plan details for this agreement.

Parameters

$plan

Returns


$this
public PayPal\Api\Plan
# getPlan( )

Plan details for this agreement.

Plan details for this agreement.

Returns

PayPal\Api\Plan
public
# setCreateTime( string $create_time )

Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in ISO8601.

Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in ISO8601.

Parameters

$create_time

Returns


$this
public string
# getCreateTime( )

Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in ISO8601.

Date and time that this resource was created. Date format yyyy-MM-dd z, as defined in ISO8601.

Returns

string
public
# setUpdateTime( string $update_time )

Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in ISO8601.

Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in ISO8601.

Parameters

$update_time

Returns


$this
public string
# getUpdateTime( )

Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in ISO8601.

Date and time that this resource was updated. Date format yyyy-MM-dd z, as defined in ISO8601.

Returns

string
public
# setAgreementDetails( PayPal\Api\AgreementDetails $agreement_details )

Agreement Details

Agreement Details

Parameters

$agreement_details

Returns


$this
public PayPal\Api\AgreementDetails
# getAgreementDetails( )

Agreement Details

Agreement Details

Returns

PayPal\Api\AgreementDetails
public null|string
# getApprovalLink( )

Get Approval Link

Get Approval Link

Returns

null|string
public PayPal\Api\Agreement
# create( PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

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.

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.

Parameters

$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\Agreement
public PayPal\Api\Agreement
# execute( $paymentToken, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

Execute a billing agreement after buyer approval by passing the payment token to the request URI.

Execute a billing agreement after buyer approval by passing the payment token to the request URI.

Parameters

$paymentToken
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\Agreement
public static PayPal\Api\Agreement
# get( string $agreementId, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

Retrieve details for a particular billing agreement by passing the ID of the agreement to the request URI.

Retrieve details for a particular billing agreement by passing the ID of the agreement to the request URI.

Parameters

$agreementId
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\Agreement
public boolean
# update( PayPal\Api\PatchRequest $patchRequest, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

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.

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.

Parameters

$patchRequest
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

boolean
public boolean
# suspend( PayPal\Api\AgreementStateDescriptor $agreementStateDescriptor, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

Suspend a particular billing agreement by passing the ID of the agreement to the request URI.

Suspend a particular billing agreement by passing the ID of the agreement to the request URI.

Parameters

$agreementStateDescriptor
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

boolean
public boolean
# reActivate( PayPal\Api\AgreementStateDescriptor $agreementStateDescriptor, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

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.

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.

Parameters

$agreementStateDescriptor
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

boolean
public boolean
# cancel( PayPal\Api\AgreementStateDescriptor $agreementStateDescriptor, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

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.

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.

Parameters

$agreementStateDescriptor
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

boolean
public boolean
# billBalance( PayPal\Api\AgreementStateDescriptor $agreementStateDescriptor, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

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.

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.

Parameters

$agreementStateDescriptor
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

boolean
public boolean
# setBalance( PayPal\Api\Currency $currency, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

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.

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.

Parameters

$currency
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

boolean
public static PayPal\Api\AgreementTransactions
# transactions( string $agreementId, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

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.

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

Parameters

$agreementId
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\AgreementTransactions
public static PayPal\Api\AgreementTransactions
# searchTransactions( string $agreementId, array $params = array(), PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

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.

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.

Parameters

$agreementId
$params
Parameters for search string. Options: start_date, and end_date
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\AgreementTransactions

Methods inherited from PayPal\Common\PayPalResourceModel

addLink(), executeCall(), getLink(), getLinks(), removeLink(), setLinks(), updateAccessToken()

Methods inherited from PayPal\Common\PayPalModel

__construct(), __get(), __isset(), __set(), __toString(), __unset(), fromArray(), fromJson(), getList(), setCredential(), toArray(), toJSON()

Properties summary

Properties inherited from PayPal\Common\PayPalModel

$credential

API documentation generated by ApiGen