Class Configuration
Represents a set of configuration settings
Implements
Inherited Members
Namespace: Simplic.Datev.Swagger.Client
Assembly: Simplic.Datev.IO.Swagger.dll
Syntax
public class Configuration : IReadableConfiguration
Constructors
| Improve this Doc View SourceConfiguration()
Initializes a new instance of the Configuration class
Declaration
public Configuration()
Configuration(ApiClient)
Initializes a new instance of the Configuration class.
Declaration
[Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)]
public Configuration(ApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
ApiClient | apiClient | Api client. |
Configuration(ApiClient, IDictionary<String, String>, String, String, String, IDictionary<String, String>, IDictionary<String, String>, String, String, Int32, String)
Initializes a new instance of the Configuration class with different settings
Declaration
[Obsolete("Use explicit object construction and setting of properties.", true)]
public Configuration(ApiClient apiClient = null, IDictionary<string, string> defaultHeader = null, string username = null, string password = null, string accessToken = null, IDictionary<string, string> apiKey = null, IDictionary<string, string> apiKeyPrefix = null, string tempFolderPath = null, string dateTimeFormat = null, int timeout = 100000, string userAgent = "Swagger-Codegen/1.0.0/csharp")
Parameters
Type | Name | Description |
---|---|---|
ApiClient | apiClient | Api client |
System.Collections.Generic.IDictionary<System.String, System.String> | defaultHeader | Dictionary of default HTTP header |
System.String | username | Username |
System.String | password | Password |
System.String | accessToken | accessToken |
System.Collections.Generic.IDictionary<System.String, System.String> | apiKey | Dictionary of API key |
System.Collections.Generic.IDictionary<System.String, System.String> | apiKeyPrefix | Dictionary of API key prefix |
System.String | tempFolderPath | Temp folder path |
System.String | dateTimeFormat | DateTime format string |
System.Int32 | timeout | HTTP connection timeout (in milliseconds) |
System.String | userAgent | HTTP user agent |
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 = "http://localhost:58454/datev/api/accounting/v1")
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | defaultHeader | |
System.Collections.Generic.IDictionary<System.String, System.String> | apiKey | |
System.Collections.Generic.IDictionary<System.String, System.String> | apiKeyPrefix | |
System.String | basePath |
Fields
| Improve this Doc View SourceDefaultExceptionFactory
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 = "o"
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 = "1.0.0"
Field Value
Type | Description |
---|---|
System.String | Version of the package. |
Properties
| Improve this Doc View SourceAccessToken
Gets or sets the access token for OAuth2 authentication.
Declaration
public virtual string AccessToken { get; set; }
Property Value
Type | Description |
---|---|
System.String | The access token. |
ApiClient
Gets an instance of an ApiClient for this configuration
Declaration
public virtual ApiClient ApiClient { get; }
Property Value
Type | Description |
---|---|
ApiClient |
ApiKey
Gets or sets the API key based on the authentication name.
Declaration
public virtual IDictionary<string, string> ApiKey { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | The API key. |
ApiKeyPrefix
Gets or sets the prefix (e.g. Token) of the API key based on the authentication name.
Declaration
public virtual IDictionary<string, string> ApiKeyPrefix { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | The prefix of the API key. |
BasePath
Gets or sets the base path for API access.
Declaration
public virtual string BasePath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
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 |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> |
Password
Gets or sets the password (HTTP basic authentication).
Declaration
public virtual string Password { get; set; }
Property Value
Type | Description |
---|---|
System.String | The password. |
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. |
Username
Gets or sets the username (HTTP basic authentication).
Declaration
public virtual string Username { get; set; }
Property Value
Type | Description |
---|---|
System.String | The username. |
Methods
| Improve this Doc View SourceAddApiKey(String, String)
Add Api Key Header.
Declaration
public void AddApiKey(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Api Key name. |
System.String | value | Api Key value. |
AddApiKeyPrefix(String, String)
Sets the API key prefix.
Declaration
public void AddApiKeyPrefix(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Api Key name. |
System.String | value | Api Key value. |
AddDefaultHeader(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. |
CreateApiClient()
Creates a new ApiClient based on this Configuration instance.
Declaration
public ApiClient CreateApiClient()
Returns
Type | Description |
---|---|
ApiClient |
GetApiKeyWithPrefix(String)
Gets the API key with prefix.
Declaration
public string GetApiKeyWithPrefix(string apiKeyIdentifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | apiKeyIdentifier | API key identifier (authentication scheme). |
Returns
Type | Description |
---|---|
System.String | API key with prefix. |
ToDebugReport()
Returns a string with essential information for debugging.
Declaration
public static string ToDebugReport()
Returns
Type | Description |
---|---|
System.String |