ClientConfiguration constructor

ClientConfiguration(
  1. String _testApiKey,
  2. String _productionApiKey,
  3. {ApiVersion apiVersion = ApiVersion.v2,
  4. String baseUrl = 'https://api.easypost.com',
  5. Client? httpClient,
  6. Function? boolFunction}
)

Creates a new ClientConfiguration instance.

_testApiKey is the Test API key to use for authentication. _productionApiKey is the Production API key to use for authentication. apiVersion is the API version to use. Defaults to "v2". baseUrl is the API base URL to use. Defaults to "https://api.easypost.com". httpClient is the HTTP client to use. Defaults to a new http.Client.

Implementation

ClientConfiguration(
  this._testApiKey,
  this._productionApiKey, {
  this.apiVersion = ApiVersion.v2,
  this.baseUrl = 'https://api.easypost.com',
  http.Client? httpClient,
  Function? boolFunction,
}) : client = httpClient ?? http.Client() {
  _boolFunction = boolFunction;
}