C# Class PayPal.Api.APIContext

APIContext is used when making HTTP calls to the PayPal REST API.
Show file Open project: paypal/PayPal-NET-SDK Class Usage Examples

Public Methods

Method Description
APIContext ( ) : System

Initializes a new instance of APIContext that is used when making HTTP calls to the PayPal REST API.

APIContext ( string accessToken ) : System

Initializes a new instance of APIContext that is used when making HTTP calls to the PayPal REST API; as well as sets and verifies the state of an accessToken.

APIContext ( string accessToken, string requestId ) : System

Initializes a new instance of APIContext that is used when making HTTP calls to the PayPal REST API; as well as sets and verifies the states of an accessToken and requestId.

GetConfigWithDefaults ( ) : string>.Dictionary

Gets the stored configuration and merges it with the application's default config.

ResetRequestId ( ) : void

Resets the request ID used for ensuring idempotency when making a REST API call.

Method Details

APIContext() public method

Initializes a new instance of APIContext that is used when making HTTP calls to the PayPal REST API.
public APIContext ( ) : System
return System

APIContext() public method

Initializes a new instance of APIContext that is used when making HTTP calls to the PayPal REST API; as well as sets and verifies the state of an accessToken.
public APIContext ( string accessToken ) : System
accessToken string OAuth access token to use when making API requests
return System

APIContext() public method

Initializes a new instance of APIContext that is used when making HTTP calls to the PayPal REST API; as well as sets and verifies the states of an accessToken and requestId.
public APIContext ( string accessToken, string requestId ) : System
accessToken string OAuth access token to use when making API requests
requestId string ID used for ensuring idempotency when making a REST API call
return System

GetConfigWithDefaults() public method

Gets the stored configuration and merges it with the application's default config.
public GetConfigWithDefaults ( ) : string>.Dictionary
return string>.Dictionary

ResetRequestId() public method

Resets the request ID used for ensuring idempotency when making a REST API call.
public ResetRequestId ( ) : void
return void