Class Configuration
Represents a set of configuration settings.
Implements
Namespace: BoldSign.Api
Assembly: BoldSign.Api.dll
Syntax
public class Configuration : object, IReadableConfiguration
Constructors
| Improve this Doc View SourceConfiguration()
Initializes a new instance of the Configuration class.
Declaration
public Configuration()
Configuration(IDictionary<String, String>, IDictionary<String, String>, IDictionary<String, String>, String)
Initializes a new instance of the Configuration class.
Declaration
public Configuration(IDictionary<string, string> defaultHeader, IDictionary<string, string> apiKey, IDictionary<string, string> apiKeyPrefix, string basePath = null)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<System.String, System.String> | defaultHeader | |
IDictionary<System.String, System.String> | apiKey | |
IDictionary<System.String, System.String> | apiKeyPrefix | |
System.String | basePath |
Fields
| Improve this Doc View SourceApiBaseUrl
Default base URL of the API endpoint.
Declaration
public const string ApiBaseUrl = null
Field Value
Type | Description |
---|---|
System.String | Default base URL of the API endpoint. |
DefaultExceptionFactory
Default creation of exceptions for a given method name and response object.
Declaration
public static readonly ExceptionFactory DefaultExceptionFactory
Field Value
Type | Description |
---|---|
ExceptionFactory |
ISO8601_DATETIME_FORMAT
Identifier for ISO 8601 DateTime Format.
Declaration
public const string ISO8601_DATETIME_FORMAT = null
Field Value
Type | Description |
---|---|
System.String |
Remarks
See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information.
Version
Version of the package.
Declaration
public const string Version = null
Field Value
Type | Description |
---|---|
System.String | Version of the package. |
Properties
| Improve this Doc View SourceApiClient
Gets an instance of an ApiClient for this configuration.
Declaration
public virtual ApiClient ApiClient { get; set; }
Property Value
Type | Description |
---|---|
ApiClient |
BasePath
Gets or sets the base path for API access.
Declaration
public virtual string BasePath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
BearerToken
Gets or sets the authentication token for OAuth2 authentication as Bearer token in the header.
Declaration
public virtual string BearerToken { set; }
Property Value
Type | Description |
---|---|
System.String | The access token. |
DateTimeFormat
Gets or sets the date time format used when serializing in the ApiClient By default, it's set to ISO 8601 - "o", for others see: https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx No validation is done to ensure that the string you're providing is valid
Declaration
public virtual string DateTimeFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | The DateTimeFormat string |
Default
Gets or sets the default Configuration.
Declaration
public static Configuration Default { get; set; }
Property Value
Type | Description |
---|---|
Configuration | Configuration. |
DefaultHeader
Gets or sets the default header.
Declaration
public virtual IDictionary<string, string> DefaultHeader { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, System.String> |
TempFolderPath
Gets or sets the temporary folder path to store the files downloaded from the server.
Declaration
public virtual string TempFolderPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | Folder path. |
Timeout
Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds.
Declaration
public virtual int Timeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
UserAgent
Gets or sets the HTTP user agent.
Declaration
public virtual string UserAgent { get; set; }
Property Value
Type | Description |
---|---|
System.String | Http user agent. |
Methods
| Improve this Doc View SourceAddDefaultHeader(String, String)
Add default header.
Declaration
public void AddDefaultHeader(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Header field name. |
System.String | value | Header field value. |
SetBearerToken(String)
Sets the authentication token for OAuth2 authentication as Bearer token in the header.
Declaration
public void SetBearerToken(string accessToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | accessToken |
ToDebugReport()
Returns a string with essential information for debugging.
Declaration
public static string ToDebugReport()
Returns
Type | Description |
---|---|
System.String |