PHP 클래스 PayPal\Rest\ApiContext

Call level parameters such as request id, credentials etc
파일 보기 프로젝트 열기: paypal/rest-api-sdk-php 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( OAuthTokenCredential $credential = null, string | null $requestId = null ) Construct
addRequestHeader ( $name, $value )
get ( $searchKey ) : mixed Gets a specific configuration from key
getConfig ( ) : array Gets Configurations
getCredential ( ) : OAuthTokenCredential Get Credential
getRequestHeaders ( )
getRequestId ( ) : string Get Request ID
resetRequestId ( ) : string 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.
setConfig ( array $config ) Sets Config

비공개 메소드들

메소드 설명
generateRequestId ( ) : string Generates a unique per request id that can be used to set the PayPal-Request-Id header that is used for idempotency

메소드 상세

__construct() 공개 메소드

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

addRequestHeader() 공개 메소드

public addRequestHeader ( $name, $value )

get() 공개 메소드

Gets a specific configuration from key
public get ( $searchKey ) : mixed
$searchKey
리턴 mixed

getConfig() 공개 메소드

Gets Configurations
public getConfig ( ) : array
리턴 array

getCredential() 공개 메소드

Get Credential
public getCredential ( ) : OAuthTokenCredential
리턴 PayPal\Auth\OAuthTokenCredential

getRequestHeaders() 공개 메소드

public getRequestHeaders ( )

getRequestId() 공개 메소드

Get Request ID
public getRequestId ( ) : string
리턴 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.
public resetRequestId ( ) : string
리턴 string

setConfig() 공개 메소드

Sets Config
public setConfig ( array $config )
$config array SDK configuration parameters