Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .speakeasy/logs/changes/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@
<body><h2 id="csharp-sdk-changes">Csharp SDK Changes:</h2>

<ul>
<li><code>Codat.bankFeeds.SourceAccounts.GenerateOtp()</code>: <strong>Added</strong></li>
<li><code>Codat.syncPayables.Companies.List()</code>: <code>response.results[].DataConnections[].IntegrationKey</code> <strong>Changed</strong></li>
<li><code>Codat.syncPayables.Companies.Create()</code>: <code>response.dataConnections[].IntegrationKey</code> <strong>Changed</strong></li>
<li><code>Codat.syncPayables.Companies.Replace()</code>: <code>response.dataConnections[].IntegrationKey</code> <strong>Changed</strong></li>
<li><code>Codat.syncPayables.Companies.Update()</code>: <code>response.dataConnections[].IntegrationKey</code> <strong>Changed</strong></li>
<li><code>Codat.syncPayables.Companies.Get()</code>: <code>response.dataConnections[].IntegrationKey</code> <strong>Changed</strong></li>
<li><code>Codat.syncPayables.Connections.List()</code>: <code>response.results[].IntegrationKey</code> <strong>Changed</strong></li>
<li><code>Codat.syncPayables.Connections.Create()</code>: <code>response.integrationKey</code> <strong>Changed</strong></li>
<li><code>Codat.syncPayables.Connections.Get()</code>: <code>response.integrationKey</code> <strong>Changed</strong></li>
<li><code>Codat.syncPayables.Connections.Unlink()</code>: <code>response.integrationKey</code> <strong>Changed</strong></li>
</ul>
</body>
</html>
10 changes: 9 additions & 1 deletion .speakeasy/logs/changes/changes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
## Csharp SDK Changes:
* `Codat.bankFeeds.SourceAccounts.GenerateOtp()`: **Added**
* `Codat.syncPayables.Companies.List()`: `response.results[].DataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Companies.Create()`: `response.dataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Companies.Replace()`: `response.dataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Companies.Update()`: `response.dataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Companies.Get()`: `response.dataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Connections.List()`: `response.results[].IntegrationKey` **Changed**
* `Codat.syncPayables.Connections.Create()`: `response.integrationKey` **Changed**
* `Codat.syncPayables.Connections.Get()`: `response.integrationKey` **Changed**
* `Codat.syncPayables.Connections.Unlink()`: `response.integrationKey` **Changed**
5,559 changes: 1,991 additions & 3,568 deletions .speakeasy/logs/changes/new.openapi.yaml

Large diffs are not rendered by default.

8,964 changes: 3,679 additions & 5,285 deletions .speakeasy/logs/changes/old.openapi.yaml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
speakeasyVersion: 1.761.1
speakeasyVersion: 1.761.5
sources:
bank-feeds-source:
sourceNamespace: bank-feeds-source
Expand Down Expand Up @@ -40,8 +40,8 @@ sources:
- prealpha
sync-for-payables-source:
sourceNamespace: sync-for-payables-source
sourceRevisionDigest: sha256:ee10928721af392894e08438793212efd7a6b75bbdee31aed74521b3b8c94140
sourceBlobDigest: sha256:1b409571a17993221df3a8ee7fff2170733baceb19a51740c47ffcc1ee7a31fd
sourceRevisionDigest: sha256:f8f51f03b09f4db12dcb5b5f8dd785e924b34acf95c2963148d6332a539e20ee
sourceBlobDigest: sha256:7a4b9e31f75380f0764d515e7533741e4f7b0da48e595c9f0fcac4506d869725
tags:
- latest
- 3.0.0
Expand Down Expand Up @@ -98,10 +98,10 @@ targets:
sync-for-payables-library:
source: sync-for-payables-source
sourceNamespace: sync-for-payables-source
sourceRevisionDigest: sha256:ee10928721af392894e08438793212efd7a6b75bbdee31aed74521b3b8c94140
sourceBlobDigest: sha256:1b409571a17993221df3a8ee7fff2170733baceb19a51740c47ffcc1ee7a31fd
sourceRevisionDigest: sha256:f8f51f03b09f4db12dcb5b5f8dd785e924b34acf95c2963148d6332a539e20ee
sourceBlobDigest: sha256:7a4b9e31f75380f0764d515e7533741e4f7b0da48e595c9f0fcac4506d869725
codeSamplesNamespace: sync-for-payables-source-csharp-code-samples
codeSamplesRevisionDigest: sha256:dac8a736af3559bd78348a1c2d084ced62896936712ebc28339c3e2f2b3e729f
codeSamplesRevisionDigest: sha256:3f35542f7604b804dc09c5ab43cf488235c3f6cb3e50a7fc7e1470f78554a96f
sync-for-payables-version-1-library:
source: sync-for-payables-version-1-source
sourceNamespace: sync-for-payables-version-1-source
Expand Down
60 changes: 34 additions & 26 deletions sync-for-payables/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
lockVersion: 2.0.0
id: 00cbdd6c-b863-4d25-8a48-4bec7ae20fc1
management:
docChecksum: 66b675d1d723d12ccffb437a1e3793aa
docChecksum: 384bfbce0790e3cb0ef8a6a311ab8782
docVersion: 3.0.0
speakeasyVersion: 1.759.1
generationVersion: 2.869.10
releaseVersion: 10.1.1
configChecksum: de60b1b13cbafe198826d501ed30b16a
speakeasyVersion: 1.761.5
generationVersion: 2.879.13
releaseVersion: 10.1.2
configChecksum: 0934b8ece521222c8b8202a56af9ca84
repoURL: https://github.com/codatio/client-sdk-csharp.git
repoSubDirectory: sync-for-payables
installationURL: https://github.com/codatio/client-sdk-csharp
published: true
persistentEdits:
generation_id: 36f832f3-c6db-428b-8600-cfee12500f97
pristine_commit_hash: 75603cdf6b836dba5660f30384d8d494762bd6ef
pristine_tree_hash: 909f70f14b7e80294eed309208ed4afdacfe5ddc
generation_id: d82da640-27ec-4fe6-849e-50784046952e
pristine_commit_hash: 6d0c80cbbfe63622388cb6a45ed218ed18facb33
pristine_tree_hash: cd67423c908d99a128607bc596d4848ea6e58b25
features:
csharp:
additionalDependencies: 0.1.0
constsAndDefaults: 0.0.3
core: 3.15.20
decimal: 0.1.0
examples: 2.81.7
globalSecurity: 2.83.10
globalSecurity: 2.83.11
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.83.1
Expand Down Expand Up @@ -58,8 +58,8 @@ trackedFiles:
pristine_git_object: 5470bcf6522c2b29f0e9fd8cebda4d7a4844b767
Codat/Sync/Payables/Codat.Sync.Payables.csproj:
id: 27c2af8e86c9
last_write_checksum: sha1:a96df527fd9cb1c7a30b7e53c265513db690e6c1
pristine_git_object: c28f1ecf2f60e661d4a45a4c5a135e8def781785
last_write_checksum: sha1:7c01bf5c20c3ab1ca985c567463a3393a6bf2c03
pristine_git_object: b34d758ec74dcfbb1eaef9034ef86df69a1b4116
Codat/Sync/Payables/CodatSyncPayables.cs:
id: 41ceacd335c5
last_write_checksum: sha1:148411c35706d8823055167c1ec4bfa8b250f1e6
Expand Down Expand Up @@ -214,8 +214,8 @@ trackedFiles:
pristine_git_object: b3602add10426e59d5dcdc6d567ee1483ef1a8f2
Codat/Sync/Payables/Models/Components/Connection.cs:
id: 17979458ec28
last_write_checksum: sha1:1090f558787d33b4f22e17cc2ff5b8e8c8f2062b
pristine_git_object: 94b8aadc282a9726e1ef845ad5b0cb62aeec7814
last_write_checksum: sha1:c9ea62267b44e10769b7b2ca8f5e0f8fdbb835bf
pristine_git_object: efbd9d7d80a0d5da9dcaa409c0ae8a5b74038260
Codat/Sync/Payables/Models/Components/Connections.cs:
id: f6f85bee383d
last_write_checksum: sha1:0e79ce89abb5994efe288ceb66257c338c4ead71
Expand Down Expand Up @@ -530,8 +530,8 @@ trackedFiles:
pristine_git_object: 1eb9db1274e988187f1ab67a90110461e8d5d349
Codat/Sync/Payables/SDKConfig.cs:
id: 9a9d58bae336
last_write_checksum: sha1:294ddcbf38c7a277e506ff8949750583d8aa3291
pristine_git_object: 06c6f503c509fb6e9f9585e491df858f4581ce89
last_write_checksum: sha1:87fb0e6f13a70b6ed2625d3b657ad691205b8240
pristine_git_object: b120b1b115ab8913f55b184b4e49e7b0961a037d
Codat/Sync/Payables/Suppliers.cs:
id: dc6d700dd058
last_write_checksum: sha1:bb7f1f11c4f27b69441f9b53d807f0e8a17bd2bb
Expand All @@ -546,8 +546,8 @@ trackedFiles:
pristine_git_object: 19c8f4a154f7882ea81ca6c8d1effa78b5009852
Codat/Sync/Payables/Utils/Constants.cs:
id: 26a6c908c9c7
last_write_checksum: sha1:9cba89923c39f2d6ccc3bbfe918d8ec62f734ee9
pristine_git_object: 1099673a41eff7f853d872a8e6808e989348abe1
last_write_checksum: sha1:b87f0ce69aa702fd9b8ed4c5dd231d379ff861cc
pristine_git_object: 372ba0e1fa5a8606f5bb367d2b4e9b81c6834a63
Codat/Sync/Payables/Utils/DecimalStrConverter.cs:
id: 732482e82206
last_write_checksum: sha1:6d3efc9c8e2de4ee867f7ab85fd86d6825812d83
Expand Down Expand Up @@ -594,24 +594,24 @@ trackedFiles:
pristine_git_object: 21794a32d6c11021a5d7e77eaffe958cfdfd2b21
Codat/Sync/Payables/Utils/SecurityMetadata.cs:
id: bca126653bce
last_write_checksum: sha1:34fa5bfdbba63f9d9a1459b95eae96b4cdc8299d
pristine_git_object: 642590cd58c729e55810fd83a8bb5621c4fa65c5
last_write_checksum: sha1:78da3691df859a4baf1acd252ef05d0dbf2bf0ef
pristine_git_object: a26c56b5ad710a0f9692fd89e814b76e1dbd6df7
Codat/Sync/Payables/Utils/SpeakeasyHttpClient.cs:
id: bdf2a26940c2
last_write_checksum: sha1:5f51f3813bdf8357b3283a9994d48f81ca5c0a00
pristine_git_object: 5c3627ef8b4fd3f7968e58a0439ef77786ef4ec1
Codat/Sync/Payables/Utils/SpeakeasyMetadata.cs:
id: 74f102705004
last_write_checksum: sha1:93f23841e559c8b476f68662de430fc8d404c5eb
pristine_git_object: 5da622cd6da7b87051e5903645f7908e08361ece
last_write_checksum: sha1:81cbbd0e1123d2c845c9e9de559e4433b8329e9f
pristine_git_object: 63b4100faaa4c33668452f2451f2037ced18500a
Codat/Sync/Payables/Utils/URLBuilder.cs:
id: f0d6a4e95df6
last_write_checksum: sha1:a1918dc5b4e311c3b733a7403e1d9781e401c758
pristine_git_object: 436e7620fac8fac7c9bda994768437456ad4a1e2
Codat/Sync/Payables/Utils/Utilities.cs:
id: 5491ebcd861c
last_write_checksum: sha1:198b3e68375a1f43471863dda5cdf6cb9dce2dc4
pristine_git_object: f83b9d08bdfe7668bfce090fd014a4cab7f9ece1
last_write_checksum: sha1:2556074118ca3590cdff2c945dc6e60dd4e86aa1
pristine_git_object: 65e148518e325a17b07e589bb94e0bfdc621808a
NUGET.md:
id: f4c8a442a6e5
last_write_checksum: sha1:112ef1aeb54f1a69730a5a7acc36a2ed2bf7b91c
Expand Down Expand Up @@ -750,8 +750,8 @@ trackedFiles:
pristine_git_object: 2e5fa23d7bb058f3ae24ddb1dd16b618858575c2
docs/Models/Components/Connection.md:
id: 5688c7e8f7e9
last_write_checksum: sha1:7f091061eed231048f880246972f5ed712f10d87
pristine_git_object: c62e9746443117fb7cc425967dc78bf04b499d7e
last_write_checksum: sha1:289b78aa10b8ae02edbe3bd2470eaa18eff075d4
pristine_git_object: 8371354fedf59be9532181a3bb0ced63fca17898
docs/Models/Components/Connections.md:
id: f7e1a57da8a7
last_write_checksum: sha1:e112155362b0d07c0fc76f7e0f7db1e0e6d5bf6e
Expand Down Expand Up @@ -2106,7 +2106,15 @@ examplesVersion: 1.0.2
generatedTests: {}
releaseNotes: |
## Csharp SDK Changes:
* `Codat.syncPayables.Suppliers.Update()`: **Added**
* `Codat.syncPayables.Companies.List()`: `response.results[].DataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Companies.Create()`: `response.dataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Companies.Replace()`: `response.dataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Companies.Update()`: `response.dataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Companies.Get()`: `response.dataConnections[].IntegrationKey` **Changed**
* `Codat.syncPayables.Connections.List()`: `response.results[].IntegrationKey` **Changed**
* `Codat.syncPayables.Connections.Create()`: `response.integrationKey` **Changed**
* `Codat.syncPayables.Connections.Get()`: `response.integrationKey` **Changed**
* `Codat.syncPayables.Connections.Unlink()`: `response.integrationKey` **Changed**
generatedFiles:
- .gitattributes
- CONTRIBUTING.md
Expand Down
2 changes: 1 addition & 1 deletion sync-for-payables/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
csharp:
version: 10.1.1
version: 10.1.2
additionalDependencies: []
author: Codat
baseErrorName: CodatSyncPayablesException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Codat.Sync.Payables</PackageId>
<Version>10.1.1</Version>
<Version>10.1.2</Version>
<TargetFramework>net8.0</TargetFramework>
<Authors>Codat</Authors>
<Copyright>Copyright (c) Codat 2026</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class Connection
/// A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future.
/// </summary>
[JsonProperty("integrationKey")]
public string IntegrationKey { get; set; } = default!;
public string? IntegrationKey { get; set; }

/// <summary>
/// A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.
Expand Down
2 changes: 1 addition & 1 deletion sync-for-payables/Codat/Sync/Payables/SDKConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public SDKConfig(ISpeakeasyHttpClient? client = null)
Client = client ?? new SpeakeasyHttpClient();
ServerUrl = "";
ServerIndex = 0;
UserAgent = "speakeasy-sdk/csharp 10.1.1 2.869.10 3.0.0 Codat.Sync.Payables";
UserAgent = "speakeasy-sdk/csharp 10.1.2 2.879.13 3.0.0 Codat.Sync.Payables";
SecuritySource = null;
Hooks = new SDKHooks();
RetryConfig = null;
Expand Down
4 changes: 2 additions & 2 deletions sync-for-payables/Codat/Sync/Payables/Utils/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ public static class Constants
/// <summary>
/// The version of the SDK.
/// </summary>
public const string SdkVersion = "10.1.1";
public const string SdkVersion = "10.1.2";

/// <summary>
/// The version of the SDK generator used to create this SDK.
/// </summary>
public const string SdkGenVersion = "2.869.10";
public const string SdkGenVersion = "2.879.13";

/// <summary>
/// The version of the OpenAPI document used to generate this SDK.
Expand Down
42 changes: 24 additions & 18 deletions sync-for-payables/Codat/Sync/Payables/Utils/SecurityMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Codat.Sync.Payables.Utils
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Text;
Expand All @@ -22,9 +23,9 @@ internal class SecurityMetadata
private Dictionary<string, string> headerParams { get; } = new Dictionary<string, string>();
private Dictionary<string, string> queryParams { get; } = new Dictionary<string, string>();

public SecurityMetadata(Func<object> securitySource)
public SecurityMetadata(Func<object> securitySource, string[]? allowedFields = null)
{
ParseSecuritySource(securitySource);
ParseSecuritySource(securitySource, allowedFields);
}

public HttpRequestMessage Apply(HttpRequestMessage request)
Expand All @@ -49,7 +50,7 @@ public HttpRequestMessage Apply(HttpRequestMessage request)
return request;
}

private void ParseSecuritySource(Func<object> securitySource)
private void ParseSecuritySource(Func<object> securitySource, string[]? allowedFields)
{
if (securitySource == null)
{
Expand All @@ -62,7 +63,16 @@ private void ParseSecuritySource(Func<object> securitySource)
return;
}

foreach (var prop in security.GetType().GetProperties())
var allProps = security.GetType().GetProperties();
PropertyInfo[] props = allowedFields != null
? allowedFields
.Select(name => allProps.FirstOrDefault(p => p.Name == name))
.Where(p => p != null)
.Cast<PropertyInfo>()
.ToArray()
: allProps;

foreach (var prop in props)
{
var value = prop.GetValue(security, null);
if (value == null)
Expand All @@ -79,6 +89,7 @@ private void ParseSecuritySource(Func<object> securitySource)
if (secMetadata.Option)
{
ParseOption(value);
return;
}
else if (secMetadata.Scheme)
{
Expand All @@ -91,6 +102,11 @@ private void ParseSecuritySource(Func<object> securitySource)
{
ParseScheme(secMetadata, value);
}

if (!secMetadata.Composite)
{
return;
}
}
}

Expand All @@ -112,25 +128,15 @@ private void ParseOption(object option)
}

var secMetadata = prop.GetCustomAttribute<SpeakeasyMetadata>()?.GetSecurityMetadata();
if (secMetadata != null && secMetadata.Scheme && secMetadata.Type == "http" && secMetadata.SubType == "basic" && !Utilities.IsClass(value))
{
ParseBasicAuthScheme(option);
return;
}
}

foreach (var prop in option.GetType().GetProperties())
{
var value = prop.GetValue(option, null);
if (value == null)
if (secMetadata == null || !secMetadata.Scheme)
{
continue;
}

var secMetadata = prop.GetCustomAttribute<SpeakeasyMetadata>()?.GetSecurityMetadata();
if (secMetadata == null || !secMetadata.Scheme)
if (secMetadata.Type == "http" && secMetadata.SubType == "basic" && !Utilities.IsClass(value))
{
continue;
ParseBasicAuthScheme(option);
return;
}

ParseScheme(secMetadata, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ internal class SecurityMetadata
public string? SubType { get; set; } = null;
public bool Option { get; set; } = false;
public bool Scheme { get; set; } = false;
public bool Composite { get; set; } = false;
public string Name { get; set; } = "";
}

Expand Down
17 changes: 16 additions & 1 deletion sync-for-payables/Codat/Sync/Payables/Utils/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,26 @@ public static bool IsList(object? o)
&& o.GetType().GetGenericTypeDefinition().IsAssignableFrom(typeof(List<>));
}

public static bool IsModelNamespace(string ns)
{
var modelNamespaces = new[]
{
"Codat.Sync.Payables.Models.Requests",
"Codat.Sync.Payables.Models.Components",
"Codat.Sync.Payables.Models.Errors",
"Codat.Sync.Payables.Models.Webhooks",
};

return modelNamespaces.Contains(ns);
}

public static bool IsClass(object? o)
{
if (o == null)
return false;
return o.GetType().IsClass && (o.GetType().FullName ?? "").StartsWith("Codat.Sync.Payables.Models");
if (!o.GetType().IsClass)
return false;
return IsModelNamespace(o.GetType().Namespace ?? "");
}

// TODO: code review polyfilled for IsAssignableTo
Expand Down
Loading