diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8e81b99..3f00552 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: bb4a1c17-4efb-4cf4-a5bb-53737f9f624b management: - docChecksum: da9839425759ec1e92b6441bb2f3ca7c - docVersion: v2.1.0-beta.2 - speakeasyVersion: 1.401.4 - generationVersion: 2.421.3 - releaseVersion: 0.0.2 - configChecksum: c4f741a6d40c958756f9625b5345c2d9 + docChecksum: d5d12540f5ed5f4996d23aae4cd97c31 + docVersion: v2.1.0-beta.3 + speakeasyVersion: 1.402.14 + generationVersion: 2.422.22 + releaseVersion: 0.0.3 + configChecksum: 1b11249cd08c25b537f2ed034dd465c0 repoURL: https://github.com/formancehq/formance-sdk-csharp.git published: true features: csharp: additionalDependencies: 0.1.0 constsAndDefaults: 0.0.1 - core: 3.10.0 + core: 3.10.1 deprecations: 2.81.2 errors: 0.0.2 flattening: 2.81.3 @@ -25,7 +25,7 @@ features: intellisenseMarkdownSupport: 0.1.0 nameOverrides: 2.81.2 nullables: 0.1.0 - oauth2ClientCredentials: 0.1.0 + oauth2ClientCredentials: 0.1.1 responseFormat: 0.0.4 sdkHooks: 0.1.0 unions: 0.2.1 @@ -3200,7 +3200,7 @@ examples: instanceID: "xxx" responses: "200": - application/json: {"data": [{"name": "", "input": {"event": ""}, "terminated": false, "startedAt": "2022-01-03T13:54:16.848Z"}, {"name": "", "terminated": true, "startedAt": "2022-01-08T05:52:07.535Z"}]} + application/json: {"data": [{"name": "", "input": {"event": ""}, "terminated": false, "startedAt": "2022-01-03T13:54:16.848Z"}, {"name": "", "input": {"event": ""}, "terminated": true, "startedAt": "2022-01-08T05:52:07.535Z"}]} default: application/json: {"errorCode": "INTERNAL", "errorMessage": ""} v2GetInstanceStageHistory: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c424803..0d45f52 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.401.4 +speakeasyVersion: 1.402.14 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:eacef62629ebc564b8234a7c34fbeaac25283252087bb94d0ca3070261202d3b - sourceBlobDigest: sha256:d381055f92cce103e8bd74a08b227de17950d63394bdf06c5d5e0709fb8d9fa8 + sourceRevisionDigest: sha256:241aefe756c723c6bc27fe0cde9bd081837d85951af400475627b2dd8296f5d5 + sourceBlobDigest: sha256:289baef68db829be9ab3b7d551c2c8f06c9adf872c08c55eb3d4fb8cc570d555 tags: - latest - main @@ -11,15 +11,15 @@ targets: formance: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:eacef62629ebc564b8234a7c34fbeaac25283252087bb94d0ca3070261202d3b - sourceBlobDigest: sha256:d381055f92cce103e8bd74a08b227de17950d63394bdf06c5d5e0709fb8d9fa8 + sourceRevisionDigest: sha256:241aefe756c723c6bc27fe0cde9bd081837d85951af400475627b2dd8296f5d5 + sourceBlobDigest: sha256:289baef68db829be9ab3b7d551c2c8f06c9adf872c08c55eb3d4fb8cc570d555 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest sources: my-source: inputs: - - location: https://github.com/formancehq/stack/releases/download/v2.1.0-beta.2/generate.json + - location: https://github.com/formancehq/stack/releases/download/v2.1.0-beta.3/generate.json registry: location: registry.speakeasyapi.dev/formance/formance/my-source targets: diff --git a/NUGET.md b/NUGET.md index 96f7fa0..0928a79 100644 --- a/NUGET.md +++ b/NUGET.md @@ -76,10 +76,15 @@ You can override the default server globally by passing a server index to the `s | # | Server | Variables | | - | ------ | --------- | | 0 | `http://localhost` | None | -| 1 | `https://{stack}.sandbox.formance.cloud` | None | +| 1 | `https://{organization}.{environment}.formance.cloud` | `organization` (default is `orgID-stackID`), `environment` (default is `sandbox`) | +#### Variables + +Some of the server options above contain variables. If you want to set the values of those variables, the following options are provided for doing so: + * `organization: string` + * `environment: ServerEnvironment` ### Override Server URL Per-Client diff --git a/README.md b/README.md index 8c14b0c..03fbb24 100644 --- a/README.md +++ b/README.md @@ -373,10 +373,15 @@ You can override the default server globally by passing a server index to the `s | # | Server | Variables | | - | ------ | --------- | | 0 | `http://localhost` | None | -| 1 | `https://{stack}.sandbox.formance.cloud` | None | +| 1 | `https://{organization}.{environment}.formance.cloud` | `organization` (default is `orgID-stackID`), `environment` (default is `sandbox`) | +#### Variables + +Some of the server options above contain variables. If you want to set the values of those variables, the following options are provided for doing so: + * `organization: string` + * `environment: ServerEnvironment` ### Override Server URL Per-Client diff --git a/RELEASES.md b/RELEASES.md index 8a7537f..a84eec8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -8,4 +8,14 @@ Based on: ### Generated - [csharp v0.0.2] . ### Releases -- [NuGet v0.0.2] https://www.nuget.org/packages/formance/0.0.2 - . \ No newline at end of file +- [NuGet v0.0.2] https://www.nuget.org/packages/formance/0.0.2 - . + +## 2024-09-25 11:49:57 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.402.14 (2.422.22) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v0.0.3] . +### Releases +- [NuGet v0.0.3] https://www.nuget.org/packages/formance/0.0.3 - . \ No newline at end of file diff --git a/docs/Models/Components/Security.md b/docs/Models/Components/Security.md index bc38c02..df76367 100644 --- a/docs/Models/Components/Security.md +++ b/docs/Models/Components/Security.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `ClientID` | *string* | :heavy_check_mark: | N/A | -| `ClientSecret` | *string* | :heavy_check_mark: | N/A | -| `TokenURL` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `ClientID` | *string* | :heavy_minus_sign: | N/A | +| `ClientSecret` | *string* | :heavy_minus_sign: | N/A | +| `TokenURL` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index 026f1c7..5738edf 100644 --- a/gen.yaml +++ b/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true csharp: - version: 0.0.2 + version: 0.0.3 additionalDependencies: [] author: Formance clientServerStatusCodesAsErrors: true diff --git a/src/formance/Auth.cs b/src/formance/Auth.cs index 179a688..90a4416 100644 --- a/src/formance/Auth.cs +++ b/src/formance/Auth.cs @@ -23,10 +23,10 @@ public class Auth: IAuth { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/Formance.cs b/src/formance/Formance.cs index b0c53af..87319e1 100644 --- a/src/formance/Formance.cs +++ b/src/formance/Formance.cs @@ -21,6 +21,53 @@ namespace formance using formance.Utils.Retries; using formance.Utils; + + /// + /// The environment name. Defaults to the production environment. + /// + public enum ServerEnvironment + { + [JsonProperty("sandbox")] + Sandbox, + [JsonProperty("eu-west-1")] + EuWest1, + [JsonProperty("us-east-1")] + UsEast1, + } + + public static class ServerEnvironmentExtension + { + public static string Value(this ServerEnvironment value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static ServerEnvironment ToEnum(this string value) + { + foreach(var field in typeof(ServerEnvironment).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is ServerEnvironment) + { + return (ServerEnvironment)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum ServerEnvironment"); + } + } + /// /// Formance Stack API: Open, modular foundation for unique payments flows
/// @@ -62,11 +109,12 @@ public class SDKConfig ///
public static readonly string[] ServerList = { "http://localhost", - "https://{stack}.sandbox.formance.cloud", + "https://{organization}.{environment}.formance.cloud", }; public string ServerUrl = ""; public int ServerIndex = 0; + public List> ServerDefaults = new List>(); public SDKHooks Hooks = new SDKHooks(); public RetryConfig? RetryConfig = null; @@ -76,7 +124,7 @@ public string GetTemplatedServerUrl() { return Utilities.TemplateUrl(Utilities.RemoveSuffix(this.ServerUrl, "/"), new Dictionary()); } - return Utilities.TemplateUrl(SDKConfig.ServerList[this.ServerIndex], new Dictionary()); + return Utilities.TemplateUrl(SDKConfig.ServerList[this.ServerIndex], this.ServerDefaults[this.ServerIndex]); } public ISpeakeasyHttpClient InitHooks(ISpeakeasyHttpClient client) @@ -113,10 +161,10 @@ public class Formance: IFormance public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private int _serverIndex = 0; private ISpeakeasyHttpClient _client; @@ -130,7 +178,7 @@ public class Formance: IFormance public IOrchestration Orchestration { get; private set; } public IReconciliation Reconciliation { get; private set; } - public Formance(formance.Models.Components.Security? security = null, Func? securitySource = null, int? serverIndex = null, string? serverUrl = null, Dictionary? urlParams = null, ISpeakeasyHttpClient? client = null, RetryConfig? retryConfig = null) + public Formance(formance.Models.Components.Security? security = null, Func? securitySource = null, int? serverIndex = null, string? organization = null, ServerEnvironment? environment = null, string? serverUrl = null, Dictionary? urlParams = null, ISpeakeasyHttpClient? client = null, RetryConfig? retryConfig = null) { if (serverIndex != null) { @@ -149,6 +197,17 @@ public Formance(formance.Models.Components.Security? security = null, Func> serverDefaults = new List>() + { + new Dictionary() + { + }, + new Dictionary() + { + {"organization", organization == null ? "orgID-stackID" : organization}, + {"environment", environment == null ? "sandbox" : ServerEnvironmentExtension.Value(environment.Value)}, + }, + }; _client = client ?? new SpeakeasyHttpClient(); @@ -160,13 +219,10 @@ public Formance(formance.Models.Components.Security? security = null, Func security; } - else - { - throw new Exception("security and securitySource cannot both be null"); - } SDKConfiguration = new SDKConfig() { + ServerDefaults = serverDefaults, ServerIndex = _serverIndex, ServerUrl = _serverUrl, RetryConfig = retryConfig diff --git a/src/formance/FormanceOrchestrationV1.cs b/src/formance/FormanceOrchestrationV1.cs index 48559c4..7590868 100644 --- a/src/formance/FormanceOrchestrationV1.cs +++ b/src/formance/FormanceOrchestrationV1.cs @@ -179,10 +179,10 @@ public class FormanceOrchestrationV1: IFormanceOrchestrationV1 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/FormancePaymentsV1.cs b/src/formance/FormancePaymentsV1.cs index 9241e66..6344e30 100644 --- a/src/formance/FormancePaymentsV1.cs +++ b/src/formance/FormancePaymentsV1.cs @@ -361,10 +361,10 @@ public class FormancePaymentsV1: IFormancePaymentsV1 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/FormanceReconciliationV1.cs b/src/formance/FormanceReconciliationV1.cs index 6bf3a48..44f243b 100644 --- a/src/formance/FormanceReconciliationV1.cs +++ b/src/formance/FormanceReconciliationV1.cs @@ -82,10 +82,10 @@ public class FormanceReconciliationV1: IFormanceReconciliationV1 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/FormanceSearchV1.cs b/src/formance/FormanceSearchV1.cs index 0918aed..e31f0ac 100644 --- a/src/formance/FormanceSearchV1.cs +++ b/src/formance/FormanceSearchV1.cs @@ -44,10 +44,10 @@ public class FormanceSearchV1: IFormanceSearchV1 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/FormanceV1.cs b/src/formance/FormanceV1.cs index c4c35cc..06daa3a 100644 --- a/src/formance/FormanceV1.cs +++ b/src/formance/FormanceV1.cs @@ -153,10 +153,10 @@ public class FormanceV1: IFormanceV1 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/FormanceV2.cs b/src/formance/FormanceV2.cs index 670e5ca..173ed50 100644 --- a/src/formance/FormanceV2.cs +++ b/src/formance/FormanceV2.cs @@ -188,10 +188,10 @@ public class FormanceV2: IFormanceV2 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/FormanceWalletsV1.cs b/src/formance/FormanceWalletsV1.cs index d511ab5..d4d1d3e 100644 --- a/src/formance/FormanceWalletsV1.cs +++ b/src/formance/FormanceWalletsV1.cs @@ -106,10 +106,10 @@ public class FormanceWalletsV1: IFormanceWalletsV1 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/FormanceWebhooksV1.cs b/src/formance/FormanceWebhooksV1.cs index f709bcc..a5af625 100644 --- a/src/formance/FormanceWebhooksV1.cs +++ b/src/formance/FormanceWebhooksV1.cs @@ -106,10 +106,10 @@ public class FormanceWebhooksV1: IFormanceWebhooksV1 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/Ledger.cs b/src/formance/Ledger.cs index 54fb543..91a4fd3 100644 --- a/src/formance/Ledger.cs +++ b/src/formance/Ledger.cs @@ -24,10 +24,10 @@ public class Ledger: ILedger { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/Models/Components/Security.cs b/src/formance/Models/Components/Security.cs index 5352767..9d5dc07 100644 --- a/src/formance/Models/Components/Security.cs +++ b/src/formance/Models/Components/Security.cs @@ -15,11 +15,11 @@ public class Security { [SpeakeasyMetadata("security:scheme=true,type=oauth2,subType=client_credentials,name=clientID")] - public string ClientID { get; set; } = default!; + public string? ClientID { get; set; } [SpeakeasyMetadata("security:scheme=true,type=oauth2,subType=client_credentials,name=clientSecret")] - public string ClientSecret { get; set; } = default!; + public string? ClientSecret { get; set; } - public string TokenURL { get; set; } = "/api/auth/oauth/token"; + public string? TokenURL { get; set; } = "/api/auth/oauth/token"; } } \ No newline at end of file diff --git a/src/formance/Orchestration.cs b/src/formance/Orchestration.cs index 499d442..a061caa 100644 --- a/src/formance/Orchestration.cs +++ b/src/formance/Orchestration.cs @@ -24,10 +24,10 @@ public class Orchestration: IOrchestration { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/Payments.cs b/src/formance/Payments.cs index 0ce0706..91072a1 100644 --- a/src/formance/Payments.cs +++ b/src/formance/Payments.cs @@ -23,10 +23,10 @@ public class Payments: IPayments { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/Reconciliation.cs b/src/formance/Reconciliation.cs index 12f79fc..1be82ba 100644 --- a/src/formance/Reconciliation.cs +++ b/src/formance/Reconciliation.cs @@ -23,10 +23,10 @@ public class Reconciliation: IReconciliation { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/Search.cs b/src/formance/Search.cs index af62206..5873207 100644 --- a/src/formance/Search.cs +++ b/src/formance/Search.cs @@ -23,10 +23,10 @@ public class Search: ISearch { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/Utils/SecurityMetadata.cs b/src/formance/Utils/SecurityMetadata.cs index edc07d3..615121c 100644 --- a/src/formance/Utils/SecurityMetadata.cs +++ b/src/formance/Utils/SecurityMetadata.cs @@ -186,7 +186,9 @@ object value headerParams.Add(key, Utilities.PrefixBearer(valStr)); break; case "oauth2": - headerParams.Add(key, Utilities.PrefixBearer(valStr)); + if (!"client_credentials".Equals(schemeMetadata.SubType)) { + headerParams.Add(key, Utilities.PrefixBearer(valStr)); + } break; case "http": switch (schemeMetadata.SubType) diff --git a/src/formance/V1.cs b/src/formance/V1.cs index 22b3cdf..869c1e4 100644 --- a/src/formance/V1.cs +++ b/src/formance/V1.cs @@ -93,10 +93,10 @@ public class V1: IV1 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/V2.cs b/src/formance/V2.cs index 32ace61..0f69574 100644 --- a/src/formance/V2.cs +++ b/src/formance/V2.cs @@ -182,10 +182,10 @@ public class V2: IV2 { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/Wallets.cs b/src/formance/Wallets.cs index 062aebd..a446257 100644 --- a/src/formance/Wallets.cs +++ b/src/formance/Wallets.cs @@ -23,10 +23,10 @@ public class Wallets: IWallets { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/Webhooks.cs b/src/formance/Webhooks.cs index ad43077..07de7a0 100644 --- a/src/formance/Webhooks.cs +++ b/src/formance/Webhooks.cs @@ -23,10 +23,10 @@ public class Webhooks: IWebhooks { public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.0.2"; - private const string _sdkGenVersion = "2.421.3"; - private const string _openapiDocVersion = "v2.1.0-beta.2"; - private const string _userAgent = "speakeasy-sdk/csharp 0.0.2 2.421.3 v2.1.0-beta.2 formance"; + private const string _sdkVersion = "0.0.3"; + private const string _sdkGenVersion = "2.422.22"; + private const string _openapiDocVersion = "v2.1.0-beta.3"; + private const string _userAgent = "speakeasy-sdk/csharp 0.0.3 2.422.22 v2.1.0-beta.3 formance"; private string _serverUrl = ""; private ISpeakeasyHttpClient _client; private Func? _securitySource; diff --git a/src/formance/formance.csproj b/src/formance/formance.csproj index cc47564..d74fb73 100644 --- a/src/formance/formance.csproj +++ b/src/formance/formance.csproj @@ -3,7 +3,7 @@ true formance - 0.0.2 + 0.0.3 net8.0 Formance Copyright (c) Formance 2024