Overview
  • Namespace
  • Class

Namespaces

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

Classes

  • ApiContext

Interfaces

  • IResource

Class ApiContext

Class ApiContext

Call level parameters such as request id, credentials etc

Namespace: PayPal\Rest
Package: PayPal\Rest
Located at PayPal/Rest/ApiContext.php

Methods summary

public
# __construct( PayPal\Auth\OAuthTokenCredential $credential = null, string|null $requestId = null )

Construct

Construct

Parameters

$credential
$requestId
public PayPal\Auth\OAuthTokenCredential
# getCredential( )

Get Credential

Get Credential

Returns

PayPal\Auth\OAuthTokenCredential
public
# getRequestHeaders( )
public
# addRequestHeader( $name, $value )
public string
# getRequestId( )

Get Request ID

Get Request ID

Returns

string
public
# setRequestId( string $requestId )

Sets the request ID

Sets the request ID

Parameters

$requestId
the PayPal-Request-Id value to use
public string
# resetRequestId( )

Resets the requestId that can be used to set the PayPal-request-id header used for idempotency. In cases where you need to make multiple create calls using the same ApiContext object, you need to reset request Id.

Resets the requestId that can be used to set the PayPal-request-id header used for idempotency. In cases where you need to make multiple create calls using the same ApiContext object, you need to reset request Id.

Deprecated

Call setRequestId with a unique value.

Returns

string
public
# setConfig( array $config )

Sets Config

Sets Config

Parameters

$config
SDK configuration parameters
public array
# getConfig( )

Gets Configurations

Gets Configurations

Returns

array
public mixed
# get( $searchKey )

Gets a specific configuration from key

Gets a specific configuration from key

Parameters

$searchKey

Returns

mixed
API documentation generated by ApiGen