diff --git a/sync-for-expenses/CodatSyncExpenses/Accounts.cs b/sync-for-expenses/CodatSyncExpenses/Accounts.cs index e03e707ba..559d45ed7 100755 --- a/sync-for-expenses/CodatSyncExpenses/Accounts.cs +++ b/sync-for-expenses/CodatSyncExpenses/Accounts.cs @@ -28,8 +28,8 @@ public class AccountsSDK: IAccountsSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -93,7 +93,7 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CreateAccountResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -102,7 +102,7 @@ public AccountsSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient secu } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.csproj b/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.csproj index 18daedda4..e3f4fe966 100755 --- a/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.csproj +++ b/sync-for-expenses/CodatSyncExpenses/CodatSyncExpenses.csproj @@ -2,9 +2,9 @@ true Codat.Sync.Expenses - 0.4.0 + 0.5.0 Codat - net5.0 + net6.0 enable README.md diff --git a/sync-for-expenses/CodatSyncExpenses/CodatSyncExpensesSDK.cs b/sync-for-expenses/CodatSyncExpenses/CodatSyncExpensesSDK.cs index a9b6a6dd0..3e63250d4 100755 --- a/sync-for-expenses/CodatSyncExpenses/CodatSyncExpensesSDK.cs +++ b/sync-for-expenses/CodatSyncExpenses/CodatSyncExpensesSDK.cs @@ -45,8 +45,8 @@ public class CodatSyncExpensesSDK: ICodatSyncExpensesSDK }; private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; diff --git a/sync-for-expenses/CodatSyncExpenses/Companies.cs b/sync-for-expenses/CodatSyncExpenses/Companies.cs index 92c3c3beb..eb5a782a7 100755 --- a/sync-for-expenses/CodatSyncExpenses/Companies.cs +++ b/sync-for-expenses/CodatSyncExpenses/Companies.cs @@ -32,8 +32,8 @@ public class CompaniesSDK: ICompaniesSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -92,7 +92,7 @@ public async Task CreateAsync(CompanyRequestBody? request }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -101,7 +101,7 @@ public async Task CreateAsync(CompanyRequestBody? request } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -153,7 +153,7 @@ public async Task DeleteAsync(DeleteCompanyRequest? reque } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -199,7 +199,7 @@ public async Task GetAsync(GetCompanyRequest? request = null }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -208,7 +208,7 @@ public async Task GetAsync(GetCompanyRequest? request = null } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -254,7 +254,7 @@ public async Task ListAsync(ListCompaniesRequest? request }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Companies = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -263,7 +263,7 @@ public async Task ListAsync(ListCompaniesRequest? request } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -314,7 +314,7 @@ public async Task UpdateAsync(UpdateCompanyRequest? reque }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -323,7 +323,7 @@ public async Task UpdateAsync(UpdateCompanyRequest? reque } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/Configuration.cs b/sync-for-expenses/CodatSyncExpenses/Configuration.cs index ca907decf..4b15eeb58 100755 --- a/sync-for-expenses/CodatSyncExpenses/Configuration.cs +++ b/sync-for-expenses/CodatSyncExpenses/Configuration.cs @@ -30,8 +30,8 @@ public class ConfigurationSDK: IConfigurationSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -81,7 +81,7 @@ public async Task GetAsync(GetCompanyConfigurat }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CompanyConfiguration = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -90,7 +90,7 @@ public async Task GetAsync(GetCompanyConfigurat } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -136,7 +136,7 @@ public async Task GetMappingOptionsAsync(GetMappingOp }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.MappingOptions = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -145,7 +145,7 @@ public async Task GetMappingOptionsAsync(GetMappingOp } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -196,7 +196,7 @@ public async Task SetAsync(SetCompanyConfigurat }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CompanyConfiguration = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -205,7 +205,7 @@ public async Task SetAsync(SetCompanyConfigurat } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/Connections.cs b/sync-for-expenses/CodatSyncExpenses/Connections.cs index 1750005eb..2298e4550 100755 --- a/sync-for-expenses/CodatSyncExpenses/Connections.cs +++ b/sync-for-expenses/CodatSyncExpenses/Connections.cs @@ -33,8 +33,8 @@ public class ConnectionsSDK: IConnectionsSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -91,7 +91,7 @@ public async Task CreateAsync(CreateConnectionRequest? }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -100,7 +100,7 @@ public async Task CreateAsync(CreateConnectionRequest? } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -146,7 +146,7 @@ public async Task CreatePartnerExpenseCo }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -155,7 +155,7 @@ public async Task CreatePartnerExpenseCo } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -207,7 +207,7 @@ public async Task DeleteAsync(DeleteConnectionRequest? } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -253,7 +253,7 @@ public async Task GetAsync(GetConnectionRequest? request }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -262,7 +262,7 @@ public async Task GetAsync(GetConnectionRequest? request } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -308,7 +308,7 @@ public async Task ListAsync(ListConnectionsRequest? req }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Connections = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -317,7 +317,7 @@ public async Task ListAsync(ListConnectionsRequest? req } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -368,7 +368,7 @@ public async Task UnlinkAsync(UnlinkConnectionRequest? }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -377,7 +377,7 @@ public async Task UnlinkAsync(UnlinkConnectionRequest? } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/Customers.cs b/sync-for-expenses/CodatSyncExpenses/Customers.cs index 0f202740c..597d6f243 100755 --- a/sync-for-expenses/CodatSyncExpenses/Customers.cs +++ b/sync-for-expenses/CodatSyncExpenses/Customers.cs @@ -31,8 +31,8 @@ public class CustomersSDK: ICustomersSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -96,7 +96,7 @@ public CustomersSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient sec }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CreateCustomerResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -105,7 +105,7 @@ public CustomersSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient sec } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -158,7 +158,7 @@ public async Task GetAsync(GetCustomerRequest? request = nu }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Customer = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -167,7 +167,7 @@ public async Task GetAsync(GetCustomerRequest? request = nu } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -218,7 +218,7 @@ public async Task ListAsync(ListCustomersRequest? request }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Customers = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -227,7 +227,7 @@ public async Task ListAsync(ListCustomersRequest? request } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 409)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -287,7 +287,7 @@ public async Task ListAsync(ListCustomersRequest? request }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.UpdateCustomerResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -296,7 +296,7 @@ public async Task ListAsync(ListCustomersRequest? request } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/Expenses.cs b/sync-for-expenses/CodatSyncExpenses/Expenses.cs index 35e105c6d..99ad53128 100755 --- a/sync-for-expenses/CodatSyncExpenses/Expenses.cs +++ b/sync-for-expenses/CodatSyncExpenses/Expenses.cs @@ -30,8 +30,8 @@ public class ExpensesSDK: IExpensesSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -86,7 +86,7 @@ public async Task CreateAsync(CreateExpenseTra }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CreateExpenseResponse = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -95,7 +95,7 @@ public async Task CreateAsync(CreateExpenseTra } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -146,7 +146,7 @@ public async Task UpdateAsync(UpdateExpenseTra }; if((response.StatusCode == 202)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.UpdateExpenseResponse = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -155,7 +155,7 @@ public async Task UpdateAsync(UpdateExpenseTra } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 422) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -206,7 +206,7 @@ public async Task UploadAttachmentAsync(UploadE }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Attachment = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -215,7 +215,7 @@ public async Task UploadAttachmentAsync(UploadE } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/ManageData.cs b/sync-for-expenses/CodatSyncExpenses/ManageData.cs index 11b66e73a..41d88791c 100755 --- a/sync-for-expenses/CodatSyncExpenses/ManageData.cs +++ b/sync-for-expenses/CodatSyncExpenses/ManageData.cs @@ -33,8 +33,8 @@ public class ManageDataSDK: IManageDataSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -84,7 +84,7 @@ public async Task GetAsync(GetDataStatusRequest? request }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.DataStatusResponse = JsonConvert.DeserializeObject>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -93,7 +93,7 @@ public async Task GetAsync(GetDataStatusRequest? request } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -139,7 +139,7 @@ public async Task GetPullOperationAsync(GetPullOperati }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.PullOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -148,7 +148,7 @@ public async Task GetPullOperationAsync(GetPullOperati } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -194,7 +194,7 @@ public async Task ListPullOperationsAsync(ListPullOp }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.PullOperations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -203,7 +203,7 @@ public async Task ListPullOperationsAsync(ListPullOp } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -258,7 +258,7 @@ public async Task RefreshAllDataTypesAsync(RefreshA } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -306,7 +306,7 @@ public async Task RefreshDataTypeAsync(RefreshDataTypeR }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.PullOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -315,7 +315,7 @@ public async Task RefreshDataTypeAsync(RefreshDataTypeR } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateAccountRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateAccountRequest.cs index 33ead50fb..ef134f7be 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateAccountRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateAccountRequest.cs @@ -20,10 +20,10 @@ public class CreateAccountRequest public Account? Account { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] - public string ConnectionId { get; set; } + public string ConnectionId { get; set; } = default!; [SpeakeasyMetadata("queryParam:style=form,explode=true,name=timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateAccountResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateAccountResponse.cs index d7d3c956f..c871fc491 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateAccountResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateAccountResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class CreateAccountResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Success @@ -33,7 +33,7 @@ public class CreateAccountResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCompanyResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCompanyResponse.cs index 6496dc356..f11fca6c7 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCompanyResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCompanyResponse.cs @@ -24,7 +24,7 @@ public class CreateCompanyResponse public Company? Company { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// The request made is not valid. @@ -33,7 +33,7 @@ public class CreateCompanyResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateConnectionRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateConnectionRequest.cs index 95897b8ad..0737f8848 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateConnectionRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateConnectionRequest.cs @@ -19,7 +19,7 @@ public class CreateConnectionRequest public CreateConnectionRequestBody? RequestBody { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateConnectionResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateConnectionResponse.cs index 680f99a73..d2a7e267b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateConnectionResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateConnectionResponse.cs @@ -24,7 +24,7 @@ public class CreateConnectionResponse public Connection? Connection { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class CreateConnectionResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCustomerRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCustomerRequest.cs index aff9e9aa8..76881a774 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCustomerRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCustomerRequest.cs @@ -20,10 +20,10 @@ public class CreateCustomerRequest public Customer? Customer { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] - public string ConnectionId { get; set; } + public string ConnectionId { get; set; } = default!; [SpeakeasyMetadata("queryParam:style=form,explode=true,name=timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCustomerResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCustomerResponse.cs index c14a5d4af..a8af528ef 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCustomerResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateCustomerResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class CreateCustomerResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Success @@ -33,7 +33,7 @@ public class CreateCustomerResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateExpenseTransactionRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateExpenseTransactionRequest.cs index 82d6a11b7..dba295596 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateExpenseTransactionRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateExpenseTransactionRequest.cs @@ -20,7 +20,7 @@ public class CreateExpenseTransactionRequest public CreateExpenseRequest? CreateExpenseRequest { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateExpenseTransactionResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateExpenseTransactionResponse.cs index f93d3ffbe..483e6ea29 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateExpenseTransactionResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateExpenseTransactionResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class CreateExpenseTransactionResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// OK @@ -33,7 +33,7 @@ public class CreateExpenseTransactionResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreatePartnerExpenseConnectionRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreatePartnerExpenseConnectionRequest.cs index 5b0007bad..42e0ee795 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreatePartnerExpenseConnectionRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreatePartnerExpenseConnectionRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class CreatePartnerExpenseConnectionRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreatePartnerExpenseConnectionResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreatePartnerExpenseConnectionResponse.cs index 8b7aea2c3..0796f101c 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreatePartnerExpenseConnectionResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreatePartnerExpenseConnectionResponse.cs @@ -24,7 +24,7 @@ public class CreatePartnerExpenseConnectionResponse public Connection? Connection { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// The request made is not valid. @@ -33,7 +33,7 @@ public class CreatePartnerExpenseConnectionResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateSupplierRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateSupplierRequest.cs index 7f68501ab..02b494dab 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateSupplierRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateSupplierRequest.cs @@ -20,10 +20,10 @@ public class CreateSupplierRequest public Supplier? Supplier { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] - public string ConnectionId { get; set; } + public string ConnectionId { get; set; } = default!; [SpeakeasyMetadata("queryParam:style=form,explode=true,name=timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateSupplierResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateSupplierResponse.cs index 2e7328448..ba51080ff 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateSupplierResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/CreateSupplierResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class CreateSupplierResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Success @@ -33,7 +33,7 @@ public class CreateSupplierResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteCompanyRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteCompanyRequest.cs index 7334c8caa..261b7bda0 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteCompanyRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteCompanyRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class DeleteCompanyRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteCompanyResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteCompanyResponse.cs index 6ff2d031f..3685620d4 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteCompanyResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteCompanyResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class DeleteCompanyResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -27,7 +27,7 @@ public class DeleteCompanyResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteConnectionRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteConnectionRequest.cs index 8873bbf36..25137379d 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteConnectionRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteConnectionRequest.cs @@ -16,10 +16,10 @@ namespace CodatSyncExpenses.Models.Operations public class DeleteConnectionRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] - public string ConnectionId { get; set; } + public string ConnectionId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteConnectionResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteConnectionResponse.cs index d0d58c988..0b4b45501 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteConnectionResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/DeleteConnectionResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class DeleteConnectionResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -27,7 +27,7 @@ public class DeleteConnectionResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyConfigurationRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyConfigurationRequest.cs index c1ab04d79..f39646228 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyConfigurationRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyConfigurationRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetCompanyConfigurationRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyConfigurationResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyConfigurationResponse.cs index 550f60677..70aca3d49 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyConfigurationResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyConfigurationResponse.cs @@ -24,7 +24,7 @@ public class GetCompanyConfigurationResponse public CompanyConfiguration? CompanyConfiguration { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class GetCompanyConfigurationResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyRequest.cs index 7b30de24a..273b9ebf8 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetCompanyRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyResponse.cs index fc0f6a2db..a90d569f0 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCompanyResponse.cs @@ -24,7 +24,7 @@ public class GetCompanyResponse public Company? Company { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class GetCompanyResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetConnectionRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetConnectionRequest.cs index a4f4bcf05..05f96817d 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetConnectionRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetConnectionRequest.cs @@ -16,10 +16,10 @@ namespace CodatSyncExpenses.Models.Operations public class GetConnectionRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] - public string ConnectionId { get; set; } + public string ConnectionId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetConnectionResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetConnectionResponse.cs index 27adf598f..cd230591e 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetConnectionResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetConnectionResponse.cs @@ -24,7 +24,7 @@ public class GetConnectionResponse public Connection? Connection { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class GetConnectionResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCustomerRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCustomerRequest.cs index 04d087f3c..54e5f3ba6 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCustomerRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCustomerRequest.cs @@ -16,10 +16,10 @@ namespace CodatSyncExpenses.Models.Operations public class GetCustomerRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=customerId")] - public string CustomerId { get; set; } + public string CustomerId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCustomerResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCustomerResponse.cs index b1e1378d7..552ec9189 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCustomerResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetCustomerResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetCustomerResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Success @@ -33,7 +33,7 @@ public class GetCustomerResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetDataStatusRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetDataStatusRequest.cs index 8c2475d95..0e1570bf8 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetDataStatusRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetDataStatusRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetDataStatusRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetDataStatusResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetDataStatusResponse.cs index 0bcba14bf..01cff3628 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetDataStatusResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetDataStatusResponse.cs @@ -19,7 +19,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetDataStatusResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// OK @@ -34,7 +34,7 @@ public class GetDataStatusResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLastSuccessfulSyncRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLastSuccessfulSyncRequest.cs index 6ac253a24..f888a3030 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLastSuccessfulSyncRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLastSuccessfulSyncRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetLastSuccessfulSyncRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLastSuccessfulSyncResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLastSuccessfulSyncResponse.cs index a3f0f4d15..4fd6cf72e 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLastSuccessfulSyncResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLastSuccessfulSyncResponse.cs @@ -24,7 +24,7 @@ public class GetLastSuccessfulSyncResponse public CompanySyncStatus? CompanySyncStatus { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class GetLastSuccessfulSyncResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLatestSyncRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLatestSyncRequest.cs index 3a1326bcd..beb991dc5 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLatestSyncRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLatestSyncRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetLatestSyncRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLatestSyncResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLatestSyncResponse.cs index a1cbf9c68..d209fde8a 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLatestSyncResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetLatestSyncResponse.cs @@ -24,7 +24,7 @@ public class GetLatestSyncResponse public CompanySyncStatus? CompanySyncStatus { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class GetLatestSyncResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetMappingOptionsRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetMappingOptionsRequest.cs index f9743eb22..4bc63ca52 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetMappingOptionsRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetMappingOptionsRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetMappingOptionsRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetMappingOptionsResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetMappingOptionsResponse.cs index 6df57d9c1..87a2fd9a9 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetMappingOptionsResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetMappingOptionsResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetMappingOptionsResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class GetMappingOptionsResponse public MappingOptions? MappingOptions { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPullOperationRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPullOperationRequest.cs index c399981d0..c3813a785 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPullOperationRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPullOperationRequest.cs @@ -16,13 +16,13 @@ namespace CodatSyncExpenses.Models.Operations public class GetPullOperationRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Unique ID of a dataset or pull operation. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=datasetId")] - public string DatasetId { get; set; } + public string DatasetId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPullOperationResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPullOperationResponse.cs index c86c684c4..e42be4e2e 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPullOperationResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPullOperationResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetPullOperationResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class GetPullOperationResponse public PullOperation? PullOperation { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPushOperationRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPushOperationRequest.cs index 52326cf08..d494846b8 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPushOperationRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPushOperationRequest.cs @@ -16,13 +16,13 @@ namespace CodatSyncExpenses.Models.Operations public class GetPushOperationRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Push operation key. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=pushOperationKey")] - public string PushOperationKey { get; set; } + public string PushOperationKey { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPushOperationResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPushOperationResponse.cs index 0538b2c58..c9578520b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPushOperationResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetPushOperationResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetPushOperationResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class GetPushOperationResponse public PushOperation? PushOperation { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSupplierRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSupplierRequest.cs index 1d5a14c00..ae3c7c9ed 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSupplierRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSupplierRequest.cs @@ -16,13 +16,13 @@ namespace CodatSyncExpenses.Models.Operations public class GetSupplierRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Unique identifier for a supplier /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=supplierId")] - public string SupplierId { get; set; } + public string SupplierId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSupplierResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSupplierResponse.cs index ad35e7409..22a1aff08 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSupplierResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSupplierResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetSupplierResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -27,7 +27,7 @@ public class GetSupplierResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncByIdRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncByIdRequest.cs index 46d8ed537..e94b558d8 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncByIdRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncByIdRequest.cs @@ -16,13 +16,13 @@ namespace CodatSyncExpenses.Models.Operations public class GetSyncByIdRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Unique identifier for a sync. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=syncId")] - public string SyncId { get; set; } + public string SyncId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncByIdResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncByIdResponse.cs index fbbc67adb..440a8c5ee 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncByIdResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncByIdResponse.cs @@ -24,7 +24,7 @@ public class GetSyncByIdResponse public CompanySyncStatus? CompanySyncStatus { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class GetSyncByIdResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncTransactionRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncTransactionRequest.cs index 9d3c13eda..6f940e324 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncTransactionRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncTransactionRequest.cs @@ -16,19 +16,19 @@ namespace CodatSyncExpenses.Models.Operations public class GetSyncTransactionRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Unique identifier for a sync. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=syncId")] - public string SyncId { get; set; } + public string SyncId { get; set; } = default!; /// /// The unique identifier for your SMB's transaction. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transactionId")] - public string TransactionId { get; set; } + public string TransactionId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncTransactionResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncTransactionResponse.cs index efb839157..4f78bd06e 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncTransactionResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/GetSyncTransactionResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class GetSyncTransactionResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -27,7 +27,7 @@ public class GetSyncTransactionResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/InitiateSyncRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/InitiateSyncRequest.cs index bd77edc4d..04587574c 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/InitiateSyncRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/InitiateSyncRequest.cs @@ -20,7 +20,7 @@ public class InitiateSyncRequest public InitiateSync? InitiateSync { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/InitiateSyncResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/InitiateSyncResponse.cs index 9cf0ae537..f606e7239 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/InitiateSyncResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/InitiateSyncResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class InitiateSyncResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// If model is incorrect @@ -27,7 +27,7 @@ public class InitiateSyncResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCompaniesResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCompaniesResponse.cs index a9306aac0..3f8b458d8 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCompaniesResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCompaniesResponse.cs @@ -24,7 +24,7 @@ public class ListCompaniesResponse public Companies? Companies { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your `query` parameter was not correctly formed @@ -33,7 +33,7 @@ public class ListCompaniesResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListConnectionsRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListConnectionsRequest.cs index 873e495d6..ed48a7a4a 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListConnectionsRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListConnectionsRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListConnectionsRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListConnectionsResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListConnectionsResponse.cs index 6dd51553f..bc1af4379 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListConnectionsResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListConnectionsResponse.cs @@ -24,7 +24,7 @@ public class ListConnectionsResponse public Connections? Connections { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your `query` parameter was not correctly formed @@ -33,7 +33,7 @@ public class ListConnectionsResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCustomersRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCustomersRequest.cs index 7c21cf4d9..255d1ed17 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCustomersRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCustomersRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListCustomersRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCustomersResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCustomersResponse.cs index 0d7295828..99bf9688b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCustomersResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListCustomersResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListCustomersResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Success @@ -33,7 +33,7 @@ public class ListCustomersResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPullOperationsRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPullOperationsRequest.cs index 2bd3461e7..2847acedb 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPullOperationsRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPullOperationsRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListPullOperationsRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPullOperationsResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPullOperationsResponse.cs index ac4050c49..e02f3b607 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPullOperationsResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPullOperationsResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListPullOperationsResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your `query` parameter was not correctly formed @@ -33,7 +33,7 @@ public class ListPullOperationsResponse public PullOperations? PullOperations { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPushOperationsRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPushOperationsRequest.cs index e3e0bf321..d3ab9fb7c 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPushOperationsRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPushOperationsRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListPushOperationsRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPushOperationsResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPushOperationsResponse.cs index 142e686d5..89b7579f4 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPushOperationsResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListPushOperationsResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListPushOperationsResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your `query` parameter was not correctly formed @@ -33,7 +33,7 @@ public class ListPushOperationsResponse public PushOperations? PushOperations { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSuppliersRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSuppliersRequest.cs index 77ceb1a10..cff7a26aa 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSuppliersRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSuppliersRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListSuppliersRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSuppliersResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSuppliersResponse.cs index 429f33b7b..0a2f6d63b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSuppliersResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSuppliersResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListSuppliersResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your `query` parameter was not correctly formed @@ -27,7 +27,7 @@ public class ListSuppliersResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncTransactionsRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncTransactionsRequest.cs index 3e6283843..ed1322f1a 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncTransactionsRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncTransactionsRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListSyncTransactionsRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Page number. [Read more](https://docs.codat.io/using-the-api/paging). @@ -34,7 +34,7 @@ public class ListSyncTransactionsRequest /// Unique identifier for a sync. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=syncId")] - public string SyncId { get; set; } + public string SyncId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncTransactionsResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncTransactionsResponse.cs index 772c2f752..9e16bfba6 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncTransactionsResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncTransactionsResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListSyncTransactionsResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -27,7 +27,7 @@ public class ListSyncTransactionsResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncsRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncsRequest.cs index 0461d8724..4cbf02ed1 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncsRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncsRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class ListSyncsRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncsResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncsResponse.cs index 3a20292e1..ccdc1afea 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncsResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/ListSyncsResponse.cs @@ -25,7 +25,7 @@ public class ListSyncsResponse public List? CompanySyncStatuses { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -34,7 +34,7 @@ public class ListSyncsResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshAllDataTypesRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshAllDataTypesRequest.cs index 027815e58..fd1c18f2a 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshAllDataTypesRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshAllDataTypesRequest.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Operations public class RefreshAllDataTypesRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshAllDataTypesResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshAllDataTypesResponse.cs index ca6bab128..20db33134 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshAllDataTypesResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshAllDataTypesResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class RefreshAllDataTypesResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -27,7 +27,7 @@ public class RefreshAllDataTypesResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshDataTypeRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshDataTypeRequest.cs index 5f3a15219..d824100ca 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshDataTypeRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshDataTypeRequest.cs @@ -17,7 +17,7 @@ namespace CodatSyncExpenses.Models.Operations public class RefreshDataTypeRequest { [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Optionally, provide a data connection id to only queue pull operations on that connection. @@ -29,7 +29,7 @@ public class RefreshDataTypeRequest /// The key of a Codat data type /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=dataType")] - public DataType DataType { get; set; } + public DataType DataType { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshDataTypeResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshDataTypeResponse.cs index 96c20905e..64068da57 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshDataTypeResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/RefreshDataTypeResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class RefreshDataTypeResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class RefreshDataTypeResponse public PullOperation? PullOperation { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/SetCompanyConfigurationRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/SetCompanyConfigurationRequest.cs index cafa5f573..c532461ef 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/SetCompanyConfigurationRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/SetCompanyConfigurationRequest.cs @@ -20,7 +20,7 @@ public class SetCompanyConfigurationRequest public CompanyConfiguration? CompanyConfiguration { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/SetCompanyConfigurationResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/SetCompanyConfigurationResponse.cs index 360021080..7eeb8afc9 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/SetCompanyConfigurationResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/SetCompanyConfigurationResponse.cs @@ -24,7 +24,7 @@ public class SetCompanyConfigurationResponse public CompanyConfiguration? CompanyConfiguration { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// The request made is not valid. @@ -33,7 +33,7 @@ public class SetCompanyConfigurationResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionRequest.cs index f058f276a..d65d8942a 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionRequest.cs @@ -16,13 +16,13 @@ namespace CodatSyncExpenses.Models.Operations public class UnlinkConnectionRequest { [SpeakeasyMetadata("request:mediaType=application/json")] - public UnlinkConnectionRequestBody? RequestBody { get; set; } + public UnlinkConnectionUpdateConnection? RequestBody { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] - public string ConnectionId { get; set; } + public string ConnectionId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionResponse.cs index 9e51f6b38..b2202825b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionResponse.cs @@ -24,7 +24,7 @@ public class UnlinkConnectionResponse public Connection? Connection { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class UnlinkConnectionResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionRequestBody.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionUpdateConnection.cs similarity index 67% rename from sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionRequestBody.cs rename to sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionUpdateConnection.cs index a1b5bc092..c5c559849 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionRequestBody.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UnlinkConnectionUpdateConnection.cs @@ -10,13 +10,17 @@ #nullable enable namespace CodatSyncExpenses.Models.Operations { + using CodatSyncExpenses.Models.Shared; using Newtonsoft.Json; - public class UnlinkConnectionRequestBody + public class UnlinkConnectionUpdateConnection { + /// + /// The current authorization status of the data connection. + /// [JsonProperty("status")] - public string? Status { get; set; } + public DataConnectionStatus? Status { get; set; } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCompanyRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCompanyRequest.cs index 063e729bc..890b21e93 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCompanyRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCompanyRequest.cs @@ -20,7 +20,7 @@ public class UpdateCompanyRequest public CompanyRequestBody? CompanyRequestBody { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCompanyResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCompanyResponse.cs index fd57dac6d..4caa6c204 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCompanyResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCompanyResponse.cs @@ -24,7 +24,7 @@ public class UpdateCompanyResponse public Company? Company { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// Your API request was not properly authorized. @@ -33,7 +33,7 @@ public class UpdateCompanyResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCustomerRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCustomerRequest.cs index 07afc8cf2..1d2d08aef 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCustomerRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCustomerRequest.cs @@ -20,13 +20,13 @@ public class UpdateCustomerRequest public Customer? Customer { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] - public string ConnectionId { get; set; } + public string ConnectionId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=customerId")] - public string CustomerId { get; set; } + public string CustomerId { get; set; } = default!; /// /// When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check. diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCustomerResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCustomerResponse.cs index 3ee98253b..2963babe6 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCustomerResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateCustomerResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class UpdateCustomerResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// The request made is not valid. @@ -27,7 +27,7 @@ public class UpdateCustomerResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateExpenseTransactionRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateExpenseTransactionRequest.cs index 6d91b43d5..9d1be905b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateExpenseTransactionRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateExpenseTransactionRequest.cs @@ -20,13 +20,13 @@ public class UpdateExpenseTransactionRequest public UpdateExpenseRequest? UpdateExpenseRequest { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// The unique identifier for your SMB's transaction. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transactionId")] - public string TransactionId { get; set; } + public string TransactionId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateExpenseTransactionResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateExpenseTransactionResponse.cs index 6f33e786b..4d7b18a3f 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateExpenseTransactionResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateExpenseTransactionResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class UpdateExpenseTransactionResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// The request made is not valid. @@ -27,7 +27,7 @@ public class UpdateExpenseTransactionResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateSupplierRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateSupplierRequest.cs index 16f7e13e1..2d61d85ec 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateSupplierRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateSupplierRequest.cs @@ -20,10 +20,10 @@ public class UpdateSupplierRequest public Supplier? Supplier { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=connectionId")] - public string ConnectionId { get; set; } + public string ConnectionId { get; set; } = default!; /// /// When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check. @@ -35,7 +35,7 @@ public class UpdateSupplierRequest /// Unique identifier for a supplier /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=supplierId")] - public string SupplierId { get; set; } + public string SupplierId { get; set; } = default!; [SpeakeasyMetadata("queryParam:style=form,explode=true,name=timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateSupplierResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateSupplierResponse.cs index 1e39b29ad..89f42d948 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateSupplierResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UpdateSupplierResponse.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Models.Operations public class UpdateSupplierResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// The request made is not valid. @@ -27,7 +27,7 @@ public class UpdateSupplierResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentRequest.cs index f2c992f64..0f50d753a 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentRequest.cs @@ -19,19 +19,19 @@ public class UploadExpenseAttachmentRequest public UploadExpenseAttachmentRequestBody? RequestBody { get; set; } [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// Unique identifier for a sync. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=syncId")] - public string SyncId { get; set; } + public string SyncId { get; set; } = default!; /// /// The unique identifier for your SMB's transaction. /// [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=transactionId")] - public string TransactionId { get; set; } + public string TransactionId { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentRequestBody.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentRequestBody.cs index 5573387ef..c1692b27f 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentRequestBody.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentRequestBody.cs @@ -16,10 +16,10 @@ namespace CodatSyncExpenses.Models.Operations public class UploadExpenseAttachmentRequestBody { [SpeakeasyMetadata("multipartForm:content")] - public byte[] Content { get; set; } + public byte[] Content { get; set; } = default!; [SpeakeasyMetadata("multipartForm:name=requestBody")] - public string RequestBody { get; set; } + public string RequestBody { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentResponse.cs index 400477da9..4feaea44b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Operations/UploadExpenseAttachmentResponse.cs @@ -24,7 +24,7 @@ public class UploadExpenseAttachmentResponse public Attachment? Attachment { get; set; } - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; /// /// The request made is not valid. @@ -33,7 +33,7 @@ public class UploadExpenseAttachmentResponse public ErrorMessage? ErrorMessage { get; set; } - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Account.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Account.cs index 49f15695a..b7d24a6bb 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Account.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Account.cs @@ -68,7 +68,7 @@ public class Account /// Current balance in the account. /// [JsonProperty("currentBalance")] - public float? CurrentBalance { get; set; } + public decimal? CurrentBalance { get; set; } /// /// Description for the account. diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountMappingInfoAccountType.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountMappingInfoAccountType.cs index 1615bd869..bed8f5104 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountMappingInfoAccountType.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountMappingInfoAccountType.cs @@ -45,7 +45,12 @@ public static AccountMappingInfoAccountType ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (AccountMappingInfoAccountType)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is AccountMappingInfoAccountType) + { + return (AccountMappingInfoAccountType)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountMappingInfoValidTransactionTypes.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountMappingInfoValidTransactionTypes.cs index c94cb2439..af6aee5af 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountMappingInfoValidTransactionTypes.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountMappingInfoValidTransactionTypes.cs @@ -48,7 +48,12 @@ public static AccountMappingInfoValidTransactionTypes ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (AccountMappingInfoValidTransactionTypes)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is AccountMappingInfoValidTransactionTypes) + { + return (AccountMappingInfoValidTransactionTypes)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountStatus.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountStatus.cs index b44f089f5..8ff0438bf 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountStatus.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountStatus.cs @@ -43,7 +43,12 @@ public static AccountStatus ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (AccountStatus)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is AccountStatus) + { + return (AccountStatus)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountType.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountType.cs index 247a6f31c..17a09a888 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountType.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/AccountType.cs @@ -47,7 +47,12 @@ public static AccountType ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (AccountType)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is AccountType) + { + return (AccountType)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Attachment.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Attachment.cs index 3323d9b08..b2475f0cd 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Attachment.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Attachment.cs @@ -13,9 +13,6 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// OK - /// public class Attachment { /// diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Companies.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Companies.cs index 7c8f355a8..b89305f0f 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Companies.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Companies.cs @@ -14,25 +14,22 @@ namespace CodatSyncExpenses.Models.Shared using System.Collections.Generic; - /// - /// OK - /// public class Companies { [JsonProperty("_links")] - public Links Links { get; set; } + public Links Links { get; set; } = default!; [JsonProperty("pageNumber")] - public int PageNumber { get; set; } + public long PageNumber { get; set; } = default!; [JsonProperty("pageSize")] - public int PageSize { get; set; } + public long PageSize { get; set; } = default!; [JsonProperty("results")] public List? Results { get; set; } [JsonProperty("totalResults")] - public int TotalResults { get; set; } + public long TotalResults { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Company.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Company.cs index 48ada1ffc..5a5e127a2 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Company.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Company.cs @@ -70,7 +70,7 @@ public class Company /// Unique identifier for your SMB in Codat. /// [JsonProperty("id")] - public string Id { get; set; } + public string Id { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -103,7 +103,7 @@ public class Company /// The name of the company /// [JsonProperty("name")] - public string Name { get; set; } + public string Name { get; set; } = default!; [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("platform")] @@ -113,7 +113,7 @@ public class Company /// The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. /// [JsonProperty("redirect")] - public string Redirect { get; set; } + public string Redirect { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanyConfiguration.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanyConfiguration.cs index 1dd8e5110..71a5faa67 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanyConfiguration.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanyConfiguration.cs @@ -13,19 +13,16 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// Success - /// public class CompanyConfiguration { [JsonProperty("bankAccount")] - public BankAccount BankAccount { get; set; } + public BankAccount BankAccount { get; set; } = default!; [JsonProperty("customer")] - public Customer Customer { get; set; } + public Customer Customer { get; set; } = default!; [JsonProperty("supplier")] - public Supplier Supplier { get; set; } + public Supplier Supplier { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanyRequestBody.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanyRequestBody.cs index 38e946545..cc91776dd 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanyRequestBody.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanyRequestBody.cs @@ -25,7 +25,7 @@ public class CompanyRequestBody /// Name of company being connected. /// [JsonProperty("name")] - public string Name { get; set; } + public string Name { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanySyncStatus.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanySyncStatus.cs index da5dbe705..6cb159757 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanySyncStatus.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CompanySyncStatus.cs @@ -13,9 +13,6 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// Success - /// public class CompanySyncStatus { /// diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Connection.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Connection.cs index 1d7458a32..a92e2b803 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Connection.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Connection.cs @@ -62,7 +62,7 @@ public class Connection /// /// [JsonProperty("created")] - public string Created { get; set; } + public string Created { get; set; } = default!; [JsonProperty("dataConnectionErrors")] public List? DataConnectionErrors { get; set; } @@ -71,19 +71,19 @@ public class Connection /// Unique identifier for a company's data connection. /// [JsonProperty("id")] - public string Id { get; set; } + public string Id { get; set; } = default!; /// /// A Codat ID representing the integration. /// [JsonProperty("integrationId")] - public string IntegrationId { get; set; } + public string IntegrationId { get; set; } = default!; /// /// 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. /// [JsonProperty("integrationKey")] - public string IntegrationKey { get; set; } + public string IntegrationKey { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -113,28 +113,28 @@ public class Connection public string? LastSync { get; set; } [JsonProperty("linkUrl")] - public string LinkUrl { get; set; } + public string LinkUrl { get; set; } = default!; [JsonProperty("platformName")] - public string PlatformName { get; set; } + public string PlatformName { get; set; } = default!; /// /// 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`. /// [JsonProperty("sourceId")] - public string SourceId { get; set; } + public string SourceId { get; set; } = default!; /// /// The type of platform of the connection. /// [JsonProperty("sourceType")] - public ConnectionSourceType SourceType { get; set; } + public ConnectionSourceType SourceType { get; set; } = default!; /// /// The current authorization status of the data connection. /// [JsonProperty("status")] - public DataConnectionStatus Status { get; set; } + public DataConnectionStatus Status { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ConnectionSourceType.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ConnectionSourceType.cs index b2bf52780..889a6452d 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ConnectionSourceType.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ConnectionSourceType.cs @@ -45,7 +45,12 @@ public static ConnectionSourceType ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (ConnectionSourceType)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is ConnectionSourceType) + { + return (ConnectionSourceType)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Connections.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Connections.cs index 8b53ae2ea..2911e85a7 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Connections.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Connections.cs @@ -14,25 +14,22 @@ namespace CodatSyncExpenses.Models.Shared using System.Collections.Generic; - /// - /// OK - /// public class Connections { [JsonProperty("_links")] - public Links Links { get; set; } + public Links Links { get; set; } = default!; [JsonProperty("pageNumber")] - public int PageNumber { get; set; } + public long PageNumber { get; set; } = default!; [JsonProperty("pageSize")] - public int PageSize { get; set; } + public long PageSize { get; set; } = default!; [JsonProperty("results")] public List? Results { get; set; } [JsonProperty("totalResults")] - public int TotalResults { get; set; } + public long TotalResults { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ContactRefContactType.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ContactRefContactType.cs index 90dd29aad..bba2fa46f 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ContactRefContactType.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ContactRefContactType.cs @@ -37,7 +37,12 @@ public static ContactRefContactType ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (ContactRefContactType)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is ContactRefContactType) + { + return (ContactRefContactType)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateAccountResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateAccountResponse.cs index 0cc408ba1..2ac9ad3d5 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateAccountResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateAccountResponse.cs @@ -15,9 +15,6 @@ namespace CodatSyncExpenses.Models.Shared using System; - /// - /// Success - /// public class CreateAccountResponse { /// @@ -30,7 +27,7 @@ public class CreateAccountResponse /// Unique identifier for your SMB in Codat. /// [JsonProperty("companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -99,7 +96,7 @@ public class CreateAccountResponse /// Unique identifier for a company's data connection. /// [JsonProperty("dataConnectionKey")] - public string DataConnectionKey { get; set; } + public string DataConnectionKey { get; set; } = default!; /// /// Available Data types @@ -114,7 +111,7 @@ public class CreateAccountResponse /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. /// [JsonProperty("pushOperationKey")] - public string PushOperationKey { get; set; } + public string PushOperationKey { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -141,16 +138,16 @@ public class CreateAccountResponse /// /// [JsonProperty("requestedOnUtc")] - public string RequestedOnUtc { get; set; } + public string RequestedOnUtc { get; set; } = default!; /// /// The status of the push operation. /// [JsonProperty("status")] - public PushOperationStatus Status { get; set; } + public PushOperationStatus Status { get; set; } = default!; [JsonProperty("statusCode")] - public int StatusCode { get; set; } + public long StatusCode { get; set; } = default!; [JsonProperty("timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateCustomerResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateCustomerResponse.cs index 4a7496554..ee5a121c6 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateCustomerResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateCustomerResponse.cs @@ -15,9 +15,6 @@ namespace CodatSyncExpenses.Models.Shared using System; - /// - /// Success - /// public class CreateCustomerResponse { /// @@ -30,7 +27,7 @@ public class CreateCustomerResponse /// Unique identifier for your SMB in Codat. /// [JsonProperty("companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -66,7 +63,7 @@ public class CreateCustomerResponse /// Unique identifier for a company's data connection. /// [JsonProperty("dataConnectionKey")] - public string DataConnectionKey { get; set; } + public string DataConnectionKey { get; set; } = default!; /// /// Available Data types @@ -81,7 +78,7 @@ public class CreateCustomerResponse /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. /// [JsonProperty("pushOperationKey")] - public string PushOperationKey { get; set; } + public string PushOperationKey { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -108,16 +105,16 @@ public class CreateCustomerResponse /// /// [JsonProperty("requestedOnUtc")] - public string RequestedOnUtc { get; set; } + public string RequestedOnUtc { get; set; } = default!; /// /// The status of the push operation. /// [JsonProperty("status")] - public PushOperationStatus Status { get; set; } + public PushOperationStatus Status { get; set; } = default!; [JsonProperty("statusCode")] - public int StatusCode { get; set; } + public long StatusCode { get; set; } = default!; [JsonProperty("timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateExpenseResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateExpenseResponse.cs index 040975f45..cf8e99887 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateExpenseResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateExpenseResponse.cs @@ -13,9 +13,6 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// OK - /// public class CreateExpenseResponse { /// diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateSupplierResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateSupplierResponse.cs index 3a781ccae..11fc079b9 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateSupplierResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/CreateSupplierResponse.cs @@ -15,9 +15,6 @@ namespace CodatSyncExpenses.Models.Shared using System; - /// - /// Success - /// public class CreateSupplierResponse { /// @@ -30,7 +27,7 @@ public class CreateSupplierResponse /// Unique identifier for your SMB in Codat. /// [JsonProperty("companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -66,7 +63,7 @@ public class CreateSupplierResponse /// Unique identifier for a company's data connection. /// [JsonProperty("dataConnectionKey")] - public string DataConnectionKey { get; set; } + public string DataConnectionKey { get; set; } = default!; /// /// Available Data types @@ -81,7 +78,7 @@ public class CreateSupplierResponse /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. /// [JsonProperty("pushOperationKey")] - public string PushOperationKey { get; set; } + public string PushOperationKey { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -108,16 +105,16 @@ public class CreateSupplierResponse /// /// [JsonProperty("requestedOnUtc")] - public string RequestedOnUtc { get; set; } + public string RequestedOnUtc { get; set; } = default!; /// /// The status of the push operation. /// [JsonProperty("status")] - public PushOperationStatus Status { get; set; } + public PushOperationStatus Status { get; set; } = default!; [JsonProperty("statusCode")] - public int StatusCode { get; set; } + public long StatusCode { get; set; } = default!; [JsonProperty("timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Customer.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Customer.cs index 6219be79c..b05082943 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Customer.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Customer.cs @@ -13,9 +13,6 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// Success - /// public class Customer { /// diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Customers.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Customers.cs index 78b0cac97..69fb657a8 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Customers.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Customers.cs @@ -14,25 +14,22 @@ namespace CodatSyncExpenses.Models.Shared using System.Collections.Generic; - /// - /// Success - /// public class Customers { [JsonProperty("_links")] - public Links Links { get; set; } + public Links Links { get; set; } = default!; [JsonProperty("pageNumber")] - public int PageNumber { get; set; } + public long PageNumber { get; set; } = default!; [JsonProperty("pageSize")] - public int PageSize { get; set; } + public long PageSize { get; set; } = default!; [JsonProperty("results")] public List? Results { get; set; } [JsonProperty("totalResults")] - public int TotalResults { get; set; } + public long TotalResults { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataConnectionStatus.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataConnectionStatus.cs index 37fae76bb..7911afe63 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataConnectionStatus.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataConnectionStatus.cs @@ -43,7 +43,12 @@ public static DataConnectionStatus ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (DataConnectionStatus)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is DataConnectionStatus) + { + return (DataConnectionStatus)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataStatus.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataStatus.cs index eb9b33475..b49973319 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataStatus.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataStatus.cs @@ -19,10 +19,10 @@ namespace CodatSyncExpenses.Models.Shared public class DataStatus { [JsonProperty("currentStatus")] - public string CurrentStatus { get; set; } + public string CurrentStatus { get; set; } = default!; [JsonProperty("dataType")] - public string DataType { get; set; } + public string DataType { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -49,7 +49,7 @@ public class DataStatus /// /// [JsonProperty("lastSuccessfulSync")] - public string LastSuccessfulSync { get; set; } + public string LastSuccessfulSync { get; set; } = default!; [JsonProperty("latestSuccessfulSyncId")] public string? LatestSuccessfulSyncId { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataType.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataType.cs index d559635d2..15263a748 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataType.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/DataType.cs @@ -119,7 +119,12 @@ public static DataType ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (DataType)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is DataType) + { + return (DataType)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorMessage.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorMessage.cs index 41bdc2af5..f78fced40 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorMessage.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ErrorMessage.cs @@ -13,9 +13,6 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// Your `query` parameter was not correctly formed - /// public class ErrorMessage { [JsonProperty("canBeRetried")] @@ -25,7 +22,7 @@ public class ErrorMessage public string? CorrelationId { get; set; } [JsonProperty("detailedErrorCode")] - public int? DetailedErrorCode { get; set; } + public long? DetailedErrorCode { get; set; } [JsonProperty("error")] public string? Error { get; set; } @@ -34,7 +31,7 @@ public class ErrorMessage public string? Service { get; set; } [JsonProperty("statusCode")] - public int? StatusCode { get; set; } + public long? StatusCode { get; set; } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransaction.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransaction.cs index 9b551362e..58f4b25bc 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransaction.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransaction.cs @@ -26,7 +26,7 @@ public class ExpenseTransaction /// Currency the transaction was recorded in. /// [JsonProperty("currency")] - public string Currency { get; set; } + public string Currency { get; set; } = default!; /// /// Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. @@ -59,13 +59,13 @@ public class ExpenseTransaction /// /// [JsonProperty("currencyRate")] - public float? CurrencyRate { get; set; } + public decimal? CurrencyRate { get; set; } /// /// Your unique identifier for the transaction. /// [JsonProperty("id")] - public string Id { get; set; } + public string Id { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -92,7 +92,7 @@ public class ExpenseTransaction /// /// [JsonProperty("issueDate")] - public string IssueDate { get; set; } + public string IssueDate { get; set; } = default!; /// /// Array of transaction lines. @@ -116,7 +116,7 @@ public class ExpenseTransaction /// The type of transaction. /// [JsonProperty("type")] - public ExpenseTransactionType Type { get; set; } + public ExpenseTransactionType Type { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransactionLine.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransactionLine.cs index 4bbbba153..c31312ab5 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransactionLine.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransactionLine.cs @@ -17,19 +17,19 @@ namespace CodatSyncExpenses.Models.Shared public class ExpenseTransactionLine { [JsonProperty("accountRef")] - public RecordRef AccountRef { get; set; } + public RecordRef AccountRef { get; set; } = default!; /// /// Amount of the line, exclusive of tax. /// [JsonProperty("netAmount")] - public float NetAmount { get; set; } + public decimal NetAmount { get; set; } = default!; /// /// Amount of tax for the line. /// [JsonProperty("taxAmount")] - public float TaxAmount { get; set; } + public decimal TaxAmount { get; set; } = default!; [JsonProperty("taxRateRef")] public RecordRef? TaxRateRef { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransactionType.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransactionType.cs index 1dfa78900..49fffb917 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransactionType.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/ExpenseTransactionType.cs @@ -51,7 +51,12 @@ public static ExpenseTransactionType ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (ExpenseTransactionType)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is ExpenseTransactionType) + { + return (ExpenseTransactionType)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/IntegrationType.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/IntegrationType.cs index 1be833e08..cbe806bc9 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/IntegrationType.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/IntegrationType.cs @@ -39,7 +39,12 @@ public static IntegrationType ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (IntegrationType)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is IntegrationType) + { + return (IntegrationType)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Links.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Links.cs index 7b3bbdc96..0e15b6ded 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Links.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Links.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Shared public class Links { [JsonProperty("current")] - public HalRef Current { get; set; } + public HalRef Current { get; set; } = default!; [JsonProperty("next")] public HalRef? Next { get; set; } @@ -25,7 +25,7 @@ public class Links public HalRef? Previous { get; set; } [JsonProperty("self")] - public HalRef Self { get; set; } + public HalRef Self { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/MappingOptions.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/MappingOptions.cs index 06588e7bd..a033aae79 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/MappingOptions.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/MappingOptions.cs @@ -14,9 +14,6 @@ namespace CodatSyncExpenses.Models.Shared using System.Collections.Generic; - /// - /// Success - /// public class MappingOptions { /// diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperation.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperation.cs index 19dd6aade..84bda44a6 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperation.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperation.cs @@ -23,25 +23,25 @@ namespace CodatSyncExpenses.Models.Shared public class PullOperation { [JsonProperty("companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; [JsonProperty("connectionId")] - public string ConnectionId { get; set; } + public string ConnectionId { get; set; } = default!; [JsonProperty("dataType")] - public string DataType { get; set; } + public string DataType { get; set; } = default!; [JsonProperty("id")] - public string Id { get; set; } + public string Id { get; set; } = default!; [JsonProperty("isCompleted")] - public bool IsCompleted { get; set; } + public bool IsCompleted { get; set; } = default!; [JsonProperty("isErrored")] - public bool IsErrored { get; set; } + public bool IsErrored { get; set; } = default!; [JsonProperty("progress")] - public int Progress { get; set; } + public long Progress { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -68,10 +68,10 @@ public class PullOperation /// /// [JsonProperty("requested")] - public string Requested { get; set; } + public string Requested { get; set; } = default!; [JsonProperty("status")] - public PullOperationStatus Status { get; set; } + public PullOperationStatus Status { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperationStatus.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperationStatus.cs index fa65a654d..dbfed5950 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperationStatus.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperationStatus.cs @@ -78,7 +78,12 @@ public static PullOperationStatus ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (PullOperationStatus)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is PullOperationStatus) + { + return (PullOperationStatus)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperations.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperations.cs index 9213a49ba..d2e00062c 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperations.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PullOperations.cs @@ -14,25 +14,22 @@ namespace CodatSyncExpenses.Models.Shared using System.Collections.Generic; - /// - /// OK - /// public class PullOperations { [JsonProperty("_links")] - public Links Links { get; set; } + public Links Links { get; set; } = default!; [JsonProperty("pageNumber")] - public int PageNumber { get; set; } + public long PageNumber { get; set; } = default!; [JsonProperty("pageSize")] - public int PageSize { get; set; } + public long PageSize { get; set; } = default!; [JsonProperty("results")] public List? Results { get; set; } [JsonProperty("totalResults")] - public int TotalResults { get; set; } + public long TotalResults { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushChangeType.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushChangeType.cs index f43cd5ba1..d40c8b81f 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushChangeType.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushChangeType.cs @@ -42,7 +42,12 @@ public static PushChangeType ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (PushChangeType)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is PushChangeType) + { + return (PushChangeType)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperation.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperation.cs index b026a6edd..63daffd65 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperation.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperation.cs @@ -15,9 +15,6 @@ namespace CodatSyncExpenses.Models.Shared using System; - /// - /// OK - /// public class PushOperation { /// @@ -30,7 +27,7 @@ public class PushOperation /// Unique identifier for your SMB in Codat. /// [JsonProperty("companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -63,7 +60,7 @@ public class PushOperation /// Unique identifier for a company's data connection. /// [JsonProperty("dataConnectionKey")] - public string DataConnectionKey { get; set; } + public string DataConnectionKey { get; set; } = default!; /// /// Available Data types @@ -78,7 +75,7 @@ public class PushOperation /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. /// [JsonProperty("pushOperationKey")] - public string PushOperationKey { get; set; } + public string PushOperationKey { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -105,16 +102,16 @@ public class PushOperation /// /// [JsonProperty("requestedOnUtc")] - public string RequestedOnUtc { get; set; } + public string RequestedOnUtc { get; set; } = default!; /// /// The status of the push operation. /// [JsonProperty("status")] - public PushOperationStatus Status { get; set; } + public PushOperationStatus Status { get; set; } = default!; [JsonProperty("statusCode")] - public int StatusCode { get; set; } + public long StatusCode { get; set; } = default!; [JsonProperty("timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperationStatus.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperationStatus.cs index b1a5ca592..b08719bb3 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperationStatus.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperationStatus.cs @@ -43,7 +43,12 @@ public static PushOperationStatus ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (PushOperationStatus)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is PushOperationStatus) + { + return (PushOperationStatus)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperations.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperations.cs index c08ea2984..24f98091b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperations.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/PushOperations.cs @@ -14,25 +14,22 @@ namespace CodatSyncExpenses.Models.Shared using System.Collections.Generic; - /// - /// OK - /// public class PushOperations { [JsonProperty("_links")] - public Links Links { get; set; } + public Links Links { get; set; } = default!; [JsonProperty("pageNumber")] - public int PageNumber { get; set; } + public long PageNumber { get; set; } = default!; [JsonProperty("pageSize")] - public int PageSize { get; set; } + public long PageSize { get; set; } = default!; [JsonProperty("results")] public List? Results { get; set; } [JsonProperty("totalResults")] - public int TotalResults { get; set; } + public long TotalResults { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Security.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Security.cs index 9262ecfb5..3dd3d44b1 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Security.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Security.cs @@ -16,7 +16,7 @@ namespace CodatSyncExpenses.Models.Shared public class Security { [SpeakeasyMetadata("security:scheme=true,type=apiKey,subType=header,name=Authorization")] - public string AuthHeader { get; set; } + public string AuthHeader { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Supplier.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Supplier.cs index 3e6df7768..35a0eb056 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Supplier.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Supplier.cs @@ -13,9 +13,6 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// Success - /// public class Supplier { /// diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Suppliers.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Suppliers.cs index 2747b06d8..6c11f2ffc 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Suppliers.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Suppliers.cs @@ -14,25 +14,22 @@ namespace CodatSyncExpenses.Models.Shared using System.Collections.Generic; - /// - /// Success - /// public class Suppliers { [JsonProperty("_links")] - public Links Links { get; set; } + public Links Links { get; set; } = default!; [JsonProperty("pageNumber")] - public int PageNumber { get; set; } + public long PageNumber { get; set; } = default!; [JsonProperty("pageSize")] - public int PageSize { get; set; } + public long PageSize { get; set; } = default!; [JsonProperty("results")] public List? Results { get; set; } [JsonProperty("totalResults")] - public int TotalResults { get; set; } + public long TotalResults { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/SyncInitiated.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/SyncInitiated.cs index a570dee19..70ea72885 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/SyncInitiated.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/SyncInitiated.cs @@ -13,9 +13,6 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// Returns the newly created SyncId - /// public class SyncInitiated { [JsonProperty("syncId")] diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/TaxRateMappingInfo.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/TaxRateMappingInfo.cs index ac1316e96..15f6f38d4 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/TaxRateMappingInfo.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/TaxRateMappingInfo.cs @@ -26,7 +26,7 @@ public class TaxRateMappingInfo /// Effective tax rate. /// [JsonProperty("effectiveTaxRate")] - public float? EffectiveTaxRate { get; set; } + public decimal? EffectiveTaxRate { get; set; } /// /// Unique identifier of tax rate. @@ -44,7 +44,7 @@ public class TaxRateMappingInfo /// Total (not compounded) sum of the components of a tax rate. /// [JsonProperty("totalTaxRate")] - public float? TotalTaxRate { get; set; } + public decimal? TotalTaxRate { get; set; } /// /// Supported transaction types for the account. diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/TaxRateMappingInfoValidTransactionTypes.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/TaxRateMappingInfoValidTransactionTypes.cs index 53c7d1951..f5a017926 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/TaxRateMappingInfoValidTransactionTypes.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/TaxRateMappingInfoValidTransactionTypes.cs @@ -48,7 +48,12 @@ public static TaxRateMappingInfoValidTransactionTypes ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (TaxRateMappingInfoValidTransactionTypes)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is TaxRateMappingInfoValidTransactionTypes) + { + return (TaxRateMappingInfoValidTransactionTypes)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Transaction.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Transaction.cs index c21f73cf7..2a4de889b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Transaction.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Transaction.cs @@ -13,9 +13,6 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// Success - /// public class Transaction { /// diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/TransactionStatus.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/TransactionStatus.cs index 441d13efd..63478d123 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/TransactionStatus.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/TransactionStatus.cs @@ -45,7 +45,12 @@ public static TransactionStatus ToEnum(this string value) var attribute = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0] as JsonPropertyAttribute; if (attribute != null && attribute.PropertyName == value) { - return (TransactionStatus)field.GetValue(null); + var enumVal = field.GetValue(null); + + if (enumVal is TransactionStatus) + { + return (TransactionStatus)enumVal; + } } } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Transactions.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Transactions.cs index 33fccd042..43d82a4ae 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/Transactions.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/Transactions.cs @@ -14,25 +14,22 @@ namespace CodatSyncExpenses.Models.Shared using System.Collections.Generic; - /// - /// Success - /// public class Transactions { [JsonProperty("_links")] - public Links Links { get; set; } + public Links Links { get; set; } = default!; [JsonProperty("pageNumber")] - public int PageNumber { get; set; } + public long PageNumber { get; set; } = default!; [JsonProperty("pageSize")] - public int PageSize { get; set; } + public long PageSize { get; set; } = default!; [JsonProperty("results")] public List? Results { get; set; } [JsonProperty("totalResults")] - public int TotalResults { get; set; } + public long TotalResults { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateCustomerResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateCustomerResponse.cs index 386d7bc2f..2a3a5da44 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateCustomerResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateCustomerResponse.cs @@ -15,9 +15,6 @@ namespace CodatSyncExpenses.Models.Shared using System; - /// - /// Success - /// public class UpdateCustomerResponse { /// @@ -30,7 +27,7 @@ public class UpdateCustomerResponse /// Unique identifier for your SMB in Codat. /// [JsonProperty("companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -66,7 +63,7 @@ public class UpdateCustomerResponse /// Unique identifier for a company's data connection. /// [JsonProperty("dataConnectionKey")] - public string DataConnectionKey { get; set; } + public string DataConnectionKey { get; set; } = default!; /// /// Available Data types @@ -81,7 +78,7 @@ public class UpdateCustomerResponse /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. /// [JsonProperty("pushOperationKey")] - public string PushOperationKey { get; set; } + public string PushOperationKey { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -108,16 +105,16 @@ public class UpdateCustomerResponse /// /// [JsonProperty("requestedOnUtc")] - public string RequestedOnUtc { get; set; } + public string RequestedOnUtc { get; set; } = default!; /// /// The status of the push operation. /// [JsonProperty("status")] - public PushOperationStatus Status { get; set; } + public PushOperationStatus Status { get; set; } = default!; [JsonProperty("statusCode")] - public int StatusCode { get; set; } + public long StatusCode { get; set; } = default!; [JsonProperty("timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateExpenseRequest.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateExpenseRequest.cs index 11775f7ac..ef025e372 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateExpenseRequest.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateExpenseRequest.cs @@ -59,13 +59,13 @@ public class UpdateExpenseRequest /// /// [JsonProperty("currencyRate")] - public float? CurrencyRate { get; set; } + public decimal? CurrencyRate { get; set; } /// /// Date the transaction was recorded. /// [JsonProperty("issueDate")] - public string IssueDate { get; set; } + public string IssueDate { get; set; } = default!; /// /// Array of transaction lines. @@ -86,7 +86,7 @@ public class UpdateExpenseRequest public string? Notes { get; set; } [JsonProperty("type")] - public object Type { get; set; } + public object Type { get; set; } = default!; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateExpenseResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateExpenseResponse.cs index f72e377ca..48f9f47ab 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateExpenseResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateExpenseResponse.cs @@ -13,9 +13,6 @@ namespace CodatSyncExpenses.Models.Shared using Newtonsoft.Json; - /// - /// Accepted - /// public class UpdateExpenseResponse { [JsonProperty("syncId")] diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateSupplierResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateSupplierResponse.cs index aecc4f2ad..77a737843 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateSupplierResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Shared/UpdateSupplierResponse.cs @@ -15,9 +15,6 @@ namespace CodatSyncExpenses.Models.Shared using System; - /// - /// Success - /// public class UpdateSupplierResponse { /// @@ -30,7 +27,7 @@ public class UpdateSupplierResponse /// Unique identifier for your SMB in Codat. /// [JsonProperty("companyId")] - public string CompanyId { get; set; } + public string CompanyId { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -66,7 +63,7 @@ public class UpdateSupplierResponse /// Unique identifier for a company's data connection. /// [JsonProperty("dataConnectionKey")] - public string DataConnectionKey { get; set; } + public string DataConnectionKey { get; set; } = default!; /// /// Available Data types @@ -81,7 +78,7 @@ public class UpdateSupplierResponse /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. /// [JsonProperty("pushOperationKey")] - public string PushOperationKey { get; set; } + public string PushOperationKey { get; set; } = default!; /// /// In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: @@ -108,16 +105,16 @@ public class UpdateSupplierResponse /// /// [JsonProperty("requestedOnUtc")] - public string RequestedOnUtc { get; set; } + public string RequestedOnUtc { get; set; } = default!; /// /// The status of the push operation. /// [JsonProperty("status")] - public PushOperationStatus Status { get; set; } + public PushOperationStatus Status { get; set; } = default!; [JsonProperty("statusCode")] - public int StatusCode { get; set; } + public long StatusCode { get; set; } = default!; [JsonProperty("timeoutInMinutes")] public int? TimeoutInMinutes { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncCompleteResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncCompleteResponse.cs index f4605e1d8..121645377 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncCompleteResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncCompleteResponse.cs @@ -17,10 +17,10 @@ namespace CodatSyncExpenses.Models.Webhooks public class SyncCompleteResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncFailedResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncFailedResponse.cs index 80184a991..55831ac0f 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncFailedResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncFailedResponse.cs @@ -17,10 +17,10 @@ namespace CodatSyncExpenses.Models.Webhooks public class SyncFailedResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncStartedResponse.cs b/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncStartedResponse.cs index aa677240c..d9597c03c 100755 --- a/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncStartedResponse.cs +++ b/sync-for-expenses/CodatSyncExpenses/Models/Webhooks/SyncStartedResponse.cs @@ -17,10 +17,10 @@ namespace CodatSyncExpenses.Models.Webhooks public class SyncStartedResponse { - public string? ContentType { get; set; } + public string? ContentType { get; set; } = default!; - public int StatusCode { get; set; } + public int StatusCode { get; set; } = default!; public HttpResponseMessage? RawResponse { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/PushOperations.cs b/sync-for-expenses/CodatSyncExpenses/PushOperations.cs index 666c16f5b..bbf113d64 100755 --- a/sync-for-expenses/CodatSyncExpenses/PushOperations.cs +++ b/sync-for-expenses/CodatSyncExpenses/PushOperations.cs @@ -29,8 +29,8 @@ public class PushOperationsSDK: IPushOperationsSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -80,7 +80,7 @@ public async Task GetAsync(GetPushOperationRequest? re }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.PushOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -89,7 +89,7 @@ public async Task GetAsync(GetPushOperationRequest? re } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -135,7 +135,7 @@ public async Task ListAsync(ListPushOperationsReques }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.PushOperations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -144,7 +144,7 @@ public async Task ListAsync(ListPushOperationsReques } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/Suppliers.cs b/sync-for-expenses/CodatSyncExpenses/Suppliers.cs index 110e50b1c..2c2e0a12b 100755 --- a/sync-for-expenses/CodatSyncExpenses/Suppliers.cs +++ b/sync-for-expenses/CodatSyncExpenses/Suppliers.cs @@ -31,8 +31,8 @@ public class SuppliersSDK: ISuppliersSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -96,7 +96,7 @@ public SuppliersSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient sec }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CreateSupplierResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -105,7 +105,7 @@ public SuppliersSDK(ISpeakeasyHttpClient defaultClient, ISpeakeasyHttpClient sec } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -158,7 +158,7 @@ public async Task GetAsync(GetSupplierRequest? request = nu }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Supplier = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -167,7 +167,7 @@ public async Task GetAsync(GetSupplierRequest? request = nu } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -218,7 +218,7 @@ public async Task ListAsync(ListSuppliersRequest? request }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Suppliers = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -227,7 +227,7 @@ public async Task ListAsync(ListSuppliersRequest? request } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 409)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -287,7 +287,7 @@ public async Task ListAsync(ListSuppliersRequest? request }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.UpdateSupplierResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -296,7 +296,7 @@ public async Task ListAsync(ListSuppliersRequest? request } if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/Sync.cs b/sync-for-expenses/CodatSyncExpenses/Sync.cs index b1eeabad6..a82c32f82 100755 --- a/sync-for-expenses/CodatSyncExpenses/Sync.cs +++ b/sync-for-expenses/CodatSyncExpenses/Sync.cs @@ -33,8 +33,8 @@ public class SyncSDK: ISyncSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -84,7 +84,7 @@ public async Task GetAsync(GetSyncByIdRequest? request = nu }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CompanySyncStatus = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -93,7 +93,7 @@ public async Task GetAsync(GetSyncByIdRequest? request = nu } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -139,7 +139,7 @@ public async Task GetLastSuccessfulSyncAsync(GetL }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CompanySyncStatus = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -148,7 +148,7 @@ public async Task GetLastSuccessfulSyncAsync(GetL } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -194,7 +194,7 @@ public async Task GetLatestSyncAsync(GetLatestSyncRequest }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CompanySyncStatus = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -203,7 +203,7 @@ public async Task GetLatestSyncAsync(GetLatestSyncRequest } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -254,7 +254,7 @@ public async Task InitiateSyncAsync(InitiateSyncRequest? r }; if((response.StatusCode == 202)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.SyncInitiated = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -263,7 +263,7 @@ public async Task InitiateSyncAsync(InitiateSyncRequest? r } if((response.StatusCode == 400) || (response.StatusCode == 404) || (response.StatusCode == 422)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -309,7 +309,7 @@ public async Task ListAsync(ListSyncsRequest? request = null) }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.CompanySyncStatuses = JsonConvert.DeserializeObject>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -318,7 +318,7 @@ public async Task ListAsync(ListSyncsRequest? request = null) } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/TransactionStatus.cs b/sync-for-expenses/CodatSyncExpenses/TransactionStatus.cs index 8202b93c4..099b3d52a 100755 --- a/sync-for-expenses/CodatSyncExpenses/TransactionStatus.cs +++ b/sync-for-expenses/CodatSyncExpenses/TransactionStatus.cs @@ -29,8 +29,8 @@ public class TransactionStatusSDK: ITransactionStatusSDK { public SDKConfig Config { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "0.4.0"; - private const string _sdkGenVersion = "2.91.4"; + private const string _sdkVersion = "0.5.0"; + private const string _sdkGenVersion = "2.108.3"; private const string _openapiDocVersion = "prealpha"; private string _serverUrl = ""; private ISpeakeasyHttpClient _defaultClient; @@ -80,7 +80,7 @@ public async Task GetAsync(GetSyncTransactionRequest }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Transaction = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -89,7 +89,7 @@ public async Task GetAsync(GetSyncTransactionRequest } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -135,7 +135,7 @@ public async Task ListAsync(ListSyncTransactionsRe }; if((response.StatusCode == 200)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.Transactions = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } @@ -144,7 +144,7 @@ public async Task ListAsync(ListSyncTransactionsRe } if((response.StatusCode == 401) || (response.StatusCode == 404) || (response.StatusCode == 429)) { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) + if(Utilities.IsContentTypeMatch("application/json", response.ContentType)) { response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer() }}); } diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/BigIntSerializer.cs b/sync-for-expenses/CodatSyncExpenses/Utils/BigIntSerializer.cs new file mode 100755 index 000000000..375b156f5 --- /dev/null +++ b/sync-for-expenses/CodatSyncExpenses/Utils/BigIntSerializer.cs @@ -0,0 +1,50 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace CodatSyncExpenses.Utils +{ + using System; + using System.Globalization; + using System.Numerics; + using Newtonsoft.Json; + + internal class BigIntSerializer : JsonConverter + { + public override bool CanConvert(Type objectType) => objectType == typeof(BigInteger); + + public override bool CanRead => true; + + public override object? ReadJson( + JsonReader reader, + Type objectType, + object? existingValue, + JsonSerializer serializer + ) + { + if (reader.Value == null) + { + return null; + } + + return BigInteger.Parse(reader.Value.ToString()!); + } + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteValue("null"); + return; + } + + writer.WriteValue(((BigInteger)value).ToString(CultureInfo.InvariantCulture)); + } + } +} diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/DecimalSerializer.cs b/sync-for-expenses/CodatSyncExpenses/Utils/DecimalSerializer.cs new file mode 100755 index 000000000..f9c4eef82 --- /dev/null +++ b/sync-for-expenses/CodatSyncExpenses/Utils/DecimalSerializer.cs @@ -0,0 +1,49 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace CodatSyncExpenses.Utils +{ + using System; + using System.Globalization; + using Newtonsoft.Json; + + internal class DecimalSerializer : JsonConverter + { + public override bool CanConvert(Type objectType) => objectType == typeof(Decimal); + + public override bool CanRead => true; + + public override object? ReadJson( + JsonReader reader, + Type objectType, + object? existingValue, + JsonSerializer serializer + ) + { + if (reader.Value == null) + { + return null; + } + + return Decimal.Parse(reader.Value.ToString()!); + } + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteValue("null"); + return; + } + + writer.WriteValue(((Decimal)value).ToString(CultureInfo.InvariantCulture)); + } + } +} diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/EnumSerializer.cs b/sync-for-expenses/CodatSyncExpenses/Utils/EnumSerializer.cs index 165804681..1ec23fbd7 100755 --- a/sync-for-expenses/CodatSyncExpenses/Utils/EnumSerializer.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/EnumSerializer.cs @@ -33,7 +33,7 @@ public override void WriteJson(JsonWriter writer, object? value, JsonSerializer } var isInt = false; - var attributes = value.GetType().GetMember(value.ToString()).First().CustomAttributes; + var attributes = value.GetType().GetMember(value.ToString() ?? "").First().CustomAttributes; if(attributes.Count() == 0 || attributes.First().ConstructorArguments.Count() == 0) { isInt = true; diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/HeaderSerializer.cs b/sync-for-expenses/CodatSyncExpenses/Utils/HeaderSerializer.cs index bf48de68f..460b66051 100755 --- a/sync-for-expenses/CodatSyncExpenses/Utils/HeaderSerializer.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/HeaderSerializer.cs @@ -17,8 +17,13 @@ namespace CodatSyncExpenses.Utils internal static class HeaderSerializer { - public static void PopulateHeaders(ref HttpRequestMessage httpRequest, object request) + public static void PopulateHeaders(ref HttpRequestMessage httpRequest, object? request) { + if (request == null) + { + return; + } + var props = request.GetType().GetProperties(); foreach (var prop in props) @@ -29,8 +34,8 @@ public static void PopulateHeaders(ref HttpRequestMessage httpRequest, object re continue; } - var metadata = prop.GetCustomAttribute().GetHeaderMetadata(); - if (metadata == null) + var metadata = prop.GetCustomAttribute()?.GetHeaderMetadata(); + if (metadata == null || metadata.Name == "") { continue; } @@ -59,7 +64,7 @@ private static string SerializeHeader(object value, bool explode) continue; } - var metadata = prop.GetCustomAttribute().GetHeaderMetadata(); + var metadata = prop.GetCustomAttribute()?.GetHeaderMetadata(); if (metadata == null || metadata.Name == null) { continue; @@ -84,13 +89,20 @@ private static string SerializeHeader(object value, bool explode) foreach (DictionaryEntry entry in (IDictionary)value) { + var key = entry.Key?.ToString(); + + if (key == null) + { + continue; + } + if (explode) { - items.Add($"{entry.Key}={Utilities.ValueToString(entry.Value)}"); + items.Add($"{key}={Utilities.ValueToString(entry.Value)}"); } else { - items.Add(entry.Key.ToString()); + items.Add(key); items.Add(Utilities.ValueToString(entry.Value)); } } diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/RequestBodySerializer.cs b/sync-for-expenses/CodatSyncExpenses/Utils/RequestBodySerializer.cs index bd13697ec..f9207d1c3 100755 --- a/sync-for-expenses/CodatSyncExpenses/Utils/RequestBodySerializer.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/RequestBodySerializer.cs @@ -36,8 +36,7 @@ string serializationMethod if (prop != null) { - var metadata = prop.GetCustomAttribute() - ?.GetRequestMetadata(); + var metadata = prop.GetCustomAttribute()?.GetRequestMetadata(); if (metadata != null) { var fieldValue = prop.GetValue(request); @@ -141,16 +140,20 @@ string mediaType continue; } - var keyName = metadata.Name ?? prop.Name; - if (metadata.Json) { - if (!form.ContainsKey(keyName)) + var key = metadata.Name ?? prop.Name; + if (key == "") { - form.Add(keyName, new List()); + continue; } - form[keyName].Add(Utilities.SerializeJSON(val)); + if (!form.ContainsKey(key)) + { + form.Add(key, new List()); + } + + form[key].Add(Utilities.SerializeJSON(val)); } else { @@ -172,16 +175,21 @@ ref form } else if (Utilities.IsDictionary(request)) { - foreach (var key in ((IDictionary)request).Keys) + foreach (var k in ((IDictionary)request).Keys) { - var keyName = key.ToString(); + var key = k?.ToString(); + + if (key == null) + { + continue; + } - if (!form.ContainsKey(keyName)) + if (!form.ContainsKey(key)) { - form.Add(keyName, new List()); + form.Add(key, new List()); } - form[keyName].Add(Utilities.ValueToString(((IDictionary)request)[key])); + form[key].Add(Utilities.ValueToString(((IDictionary)request)[key])); } } else if (Utilities.IsList(request)) @@ -235,8 +243,7 @@ private static HttpContent SerializeMultipart(object request, string mediaType) continue; } - var metadata = prop.GetCustomAttribute() - ?.GetMultipartFormMetadata(); + var metadata = prop.GetCustomAttribute()?.GetMultipartFormMetadata(); if (metadata == null) { continue; @@ -272,12 +279,12 @@ private static HttpContent SerializeMultipart(object request, string mediaType) if (fileMetadata.Content) { - content = (byte[])fileProp.GetValue(value); + content = (byte[]?)fileProp.GetValue(value); } else { fieldName = fileMetadata.Name ?? fileProp.Name; - fileName = fileProp.GetValue(value).ToString(); + fileName = fileProp.GetValue(value)?.ToString() ?? ""; } } @@ -365,8 +372,7 @@ ref Dictionary> form continue; } - var metadata = prop.GetCustomAttribute() - ?.GetFormMetadata(); + var metadata = prop.GetCustomAttribute()?.GetFormMetadata(); if (metadata == null || metadata.Name == null) { continue; @@ -402,16 +408,23 @@ ref Dictionary> form { var items = new List(); - foreach (var key in ((IDictionary)value).Keys) + foreach (var k in ((IDictionary)value).Keys) { + var key = k?.ToString(); + + if (key == null) + { + continue; + } + if (explode) { - if (!form.ContainsKey(key.ToString())) + if (!form.ContainsKey(key)) { - form[key.ToString()] = new List(); + form[key] = new List(); } - form[key.ToString()].Add( + form[key].Add( Utilities.ValueToString(((IDictionary)value)[key]) ); } diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/SecuritySerializer.cs b/sync-for-expenses/CodatSyncExpenses/Utils/SecuritySerializer.cs index cb9d80da4..64ae2ba7c 100755 --- a/sync-for-expenses/CodatSyncExpenses/Utils/SecuritySerializer.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/SecuritySerializer.cs @@ -36,8 +36,7 @@ public static ISpeakeasyHttpClient Apply(ISpeakeasyHttpClient client, object sec continue; } - var metadata = prop.GetCustomAttribute().GetSecurityMetadata(); - + var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); if (metadata == null) { continue; @@ -77,8 +76,7 @@ private static void ApplyOption(ref ISpeakeasyHttpClient client, object option) continue; } - var metadata = prop.GetCustomAttribute().GetSecurityMetadata(); - + var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); if (metadata == null || !metadata.Scheme) { continue; @@ -113,9 +111,7 @@ object scheme continue; } - var metadata = prop.GetCustomAttribute() - .GetSecurityMetadata(); - + var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); if (metadata == null || metadata.Name == "") { continue; @@ -137,6 +133,11 @@ private static void ApplySchemeValue( object value ) { + if (valueMetadata.Name == "") + { + return; + } + switch (schemeMetadata.Type) { case "apiKey": @@ -203,8 +204,7 @@ private static void ApplyBasicAuthScheme(ref ISpeakeasyHttpClient client, object continue; } - var metadata = prop.GetCustomAttribute().GetSecurityMetadata(); - + var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); if (metadata == null || metadata.Name == "") { continue; diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/SpeakeasyMetadata.cs b/sync-for-expenses/CodatSyncExpenses/Utils/SpeakeasyMetadata.cs index 0fc8e0469..293c9d38e 100755 --- a/sync-for-expenses/CodatSyncExpenses/Utils/SpeakeasyMetadata.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/SpeakeasyMetadata.cs @@ -26,7 +26,7 @@ internal class FormMetadata public string Style { get; set; } = "form"; public bool Explode { get; set; } = true; public bool Json { get; set; } = false; - public string? Name { get; set; } = null; + public string Name { get; set; } = ""; } internal class MultipartFormMetadata @@ -34,14 +34,14 @@ internal class MultipartFormMetadata public bool File { get; set; } = false; public bool Content { get; set; } = false; public bool Json { get; set; } = false; - public string? Name { get; set; } = null; + public string Name { get; set; } = ""; } internal class PathParamMetadata { public string Style { get; set; } = "simple"; public bool Explode { get; set; } = false; - public string? Name { get; set; } = null; + public string Name { get; set; } = ""; public string? Serialization { get; set; } = null; } @@ -49,7 +49,7 @@ internal class QueryParamMetadata { public string Style { get; set; } = "form"; public bool Explode { get; set; } = true; - public string? Name { get; set; } = null; + public string Name { get; set; } = ""; public string? Serialization { get; set; } = null; } @@ -57,7 +57,7 @@ internal class HeaderMetadata { public string Style { get; set; } = "simple"; public bool Explode { get; set; } = false; - public string? Name { get; set; } = null; + public string Name { get; set; } = ""; } internal class SecurityMetadata @@ -66,7 +66,7 @@ internal class SecurityMetadata public string? SubType { get; set; } = null; public bool Option { get; set; } = false; public bool Scheme { get; set; } = false; - public string? Name { get; set; } = null; + public string Name { get; set; } = ""; } public string Value { get; set; } diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/URLBuilder.cs b/sync-for-expenses/CodatSyncExpenses/Utils/URLBuilder.cs index 74f637bc0..c4e69940d 100755 --- a/sync-for-expenses/CodatSyncExpenses/Utils/URLBuilder.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/URLBuilder.cs @@ -18,7 +18,7 @@ namespace CodatSyncExpenses.Utils internal static class URLBuilder { - public static string Build(string baseUrl, string path, object request) + public static string Build(string baseUrl, string path, object? request) { var url = baseUrl; @@ -67,7 +67,7 @@ public static string SerializeQueryParams(Dictionary> query return string.Join("&", queries); } - private static Dictionary GetPathParameters(object request) + private static Dictionary GetPathParameters(object? request) { var parameters = new Dictionary(); @@ -139,7 +139,7 @@ private static Dictionary GetPathParameters(object request) return parameters; } - private static Dictionary> TrySerializeQueryParams(object request) + private static Dictionary> TrySerializeQueryParams(object? request) { var parameters = new Dictionary>(); @@ -164,9 +164,7 @@ private static Dictionary> TrySerializeQueryParams(object r continue; } - var metadata = prop.GetCustomAttribute() - ?.GetQueryParamMetadata(); - + var metadata = prop.GetCustomAttribute()?.GetQueryParamMetadata(); if (metadata == null) { continue; @@ -286,9 +284,7 @@ bool explode continue; } - var metadata = prop.GetCustomAttribute() - ?.GetPathParamMetadata(); - + var metadata = prop.GetCustomAttribute()?.GetPathParamMetadata(); if (metadata == null) { continue; @@ -312,6 +308,11 @@ bool explode foreach (var key in ((IDictionary)value).Keys) { + if (key == null) + { + continue; + } + var val = ((IDictionary)value)[key]; if (explode) @@ -368,8 +369,7 @@ string delimiter continue; } - var metadata = prop.GetCustomAttribute() - ?.GetQueryParamMetadata(); + var metadata = prop.GetCustomAttribute()?.GetQueryParamMetadata(); if (metadata == null || metadata.Name == null) { continue; @@ -408,23 +408,30 @@ string delimiter { var items = new List(); - foreach (var key in ((IDictionary)value).Keys) + foreach (var k in ((IDictionary)value).Keys) { + var key = k?.ToString(); + + if (key == null) + { + continue; + } + if (explode) { - if (!parameters.ContainsKey(key.ToString())) + if (!parameters.ContainsKey(key)) { - parameters.Add(key.ToString(), new List()); + parameters.Add(key, new List()); } - parameters[key.ToString()].Add( + parameters[key].Add( Utilities.ValueToString(((IDictionary)value)[key]) ); } else { items.Add( - $"{key.ToString()}{delimiter}{Utilities.ValueToString(((IDictionary)value)[key])}" + $"{key}{delimiter}{Utilities.ValueToString(((IDictionary)value)[key])}" ); } } @@ -504,9 +511,7 @@ object value continue; } - var metadata = prop.GetCustomAttribute() - ?.GetQueryParamMetadata(); - + var metadata = prop.GetCustomAttribute()?.GetQueryParamMetadata(); if (metadata == null || metadata.Name == null) { continue; @@ -514,7 +519,7 @@ object value var keyName = $"{parentName}[{metadata.Name}]"; - if (Utilities.IsList(val)) + if (val != null && Utilities.IsList(val)) { foreach (var v in (IList)val) { @@ -543,11 +548,16 @@ object value { foreach (var key in ((IDictionary)value).Keys) { + if (key == null) + { + continue; + } + var val = ((IDictionary)value)[key]; var keyName = $"{parentName}[{key}]"; - if (Utilities.IsList(val)) + if (val != null && Utilities.IsList(val)) { foreach (var v in (IList)val) { diff --git a/sync-for-expenses/CodatSyncExpenses/Utils/Utilities.cs b/sync-for-expenses/CodatSyncExpenses/Utils/Utilities.cs index 64e2f0a95..1f2f8e062 100755 --- a/sync-for-expenses/CodatSyncExpenses/Utils/Utilities.cs +++ b/sync-for-expenses/CodatSyncExpenses/Utils/Utilities.cs @@ -37,7 +37,7 @@ public static string SerializeJSON(object obj) ); } - public static bool IsDictionary(object o) + public static bool IsDictionary(object? o) { if (o == null) return false; @@ -46,7 +46,7 @@ public static bool IsDictionary(object o) && o.GetType().GetGenericTypeDefinition().IsAssignableFrom(typeof(Dictionary<,>)); } - public static bool IsList(object o) + public static bool IsList(object? o) { if (o == null) return false; @@ -55,11 +55,11 @@ public static bool IsList(object o) && o.GetType().GetGenericTypeDefinition().IsAssignableFrom(typeof(List<>)); } - public static bool IsClass(object o) + public static bool IsClass(object? o) { if (o == null) return false; - return o.GetType().IsClass && o.GetType().FullName.StartsWith("SDK.Models"); + return o.GetType().IsClass && (o.GetType().FullName ?? "").StartsWith("CodatSyncExpenses.Models"); } // TODO: code review polyfilled for IsAssignableTo @@ -69,7 +69,7 @@ public static bool IsSameOrSubclass(Type potentialBase, Type potentialDescendant || potentialDescendant == potentialBase; } - public static bool IsString(object obj) + public static bool IsString(object? obj) { if (obj != null) { @@ -100,8 +100,13 @@ private static string StripSurroundingQuotes(string input) return input; } - public static string ValueToString(object value) + public static string ValueToString(object? value) { + if (value == null) + { + return ""; + } + if (value.GetType() == typeof(DateTime)) { return ((DateTime)value) @@ -124,56 +129,61 @@ public static string ValueToString(object value) ?.GetMethod("Value"); if (method == null) { - return Convert.ChangeType(value, Enum.GetUnderlyingType(value.GetType())).ToString(); + return Convert.ChangeType(value, Enum.GetUnderlyingType(value.GetType()))?.ToString() ?? ""; } - return (string)method.Invoke(null, new[] { value }); + return (string)(method.Invoke(null, new[] { value }) ?? ""); } - return value.ToString(); + return value.ToString() ?? ""; } - public static string ToString(object obj) + public static string ToString(object? obj) { - if(obj == null) + if (obj == null) { - return null; + return ""; } - if(IsString(obj)) + if (IsString(obj)) { - return obj.ToString(); + return obj.ToString() ?? ""; } - if(IsPrimitive(obj)) + if (IsPrimitive(obj)) { return JsonConvert.SerializeObject(obj); } - if(IsEnum(obj)) + if (IsEnum(obj)) { - var attributes = obj.GetType().GetMember(obj.ToString()).First().CustomAttributes; - if(attributes.Count() == 0) + var attributes = obj.GetType().GetMember(obj.ToString() ?? "").First().CustomAttributes; + if (attributes.Count() == 0) { return JsonConvert.SerializeObject(obj); } var args = attributes.First().ConstructorArguments; - if(args.Count() == 0) + if (args.Count() == 0) { return JsonConvert.SerializeObject(obj); } return StripSurroundingQuotes(args.First().ToString()); } - if(IsDate(obj)) + if (IsDate(obj)) { return StripSurroundingQuotes(JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }})); } return JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }}); } - public static bool IsContentTypeMatch(string expected, string actual) + public static bool IsContentTypeMatch(string expected, string? actual) { + if (actual == null) + { + return false; + } + if (expected == actual || expected == "*" || expected == "*/*") { return true; @@ -181,7 +191,7 @@ public static bool IsContentTypeMatch(string expected, string actual) try { - var mediaType = MediaTypeHeaderValue.Parse(actual).MediaType; + var mediaType = MediaTypeHeaderValue.Parse(actual).MediaType ?? ""; if (expected == mediaType) { diff --git a/sync-for-expenses/README.md b/sync-for-expenses/README.md index 41a9ebcc2..e46c69e2b 100644 --- a/sync-for-expenses/README.md +++ b/sync-for-expenses/README.md @@ -3,15 +3,141 @@ Embedded accounting integrations for corporate card providers. -replace me +## SDK Installation + +### Nuget + +```bash +dotnet add package Codat.Sync.Expenses +``` ## Example Usage -replace me + + +```csharp +using CodatSyncExpenses; +using CodatSyncExpenses.Models.Shared; +using CodatSyncExpenses.Models.Operations; + +var sdk = new CodatSyncExpensesSDK( + security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + } +); + +var res = await sdk.Accounts.CreateAsync(new CreateAccountRequest() { + Account = new Account() { + Currency = "USD", + CurrentBalance = 0M, + Description = "Invoices the business has issued but has not yet collected payment on.", + FullyQualifiedCategory = "Asset.Current", + FullyQualifiedName = "Fixed Asset", + Id = "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", + IsBankAccount = false, + Metadata = new AccountMetadata() { + IsDeleted = false, + }, + ModifiedDate = "2022-10-23T00:00:00.000Z", + Name = "Accounts Receivable", + NominalCode = "610", + SourceModifiedDate = "2022-10-23T00:00:00.000Z", + Status = CodatSyncExpenses.Models.Shared.AccountStatus.Active, + Type = CodatSyncExpenses.Models.Shared.AccountType.Asset, + ValidDatatypeLinks = new List() { + new AccountValidDataTypeLinks() { + Links = new List() { + "unde", + }, + Property = "nulla", + }, + }, + }, + CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", + ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", + TimeoutInMinutes = 544883, +}); + +// handle response +``` -replace me +## Available Resources and Operations + + +### [accounts](docs/sdks/accounts/README.md) + +* [Create](docs/sdks/accounts/README.md#create) - Create account + +### [companies](docs/sdks/companies/README.md) + +* [Create](docs/sdks/companies/README.md#create) - Create company +* [Delete](docs/sdks/companies/README.md#delete) - Delete a company +* [Get](docs/sdks/companies/README.md#get) - Get company +* [List](docs/sdks/companies/README.md#list) - List companies +* [Update](docs/sdks/companies/README.md#update) - Update company + +### [configuration](docs/sdks/configuration/README.md) + +* [Get](docs/sdks/configuration/README.md#get) - Get company configuration +* [GetMappingOptions](docs/sdks/configuration/README.md#getmappingoptions) - Mapping options +* [Set](docs/sdks/configuration/README.md#set) - Set company configuration + +### [connections](docs/sdks/connections/README.md) + +* [Create](docs/sdks/connections/README.md#create) - Create connection +* [CreatePartnerExpenseConnection](docs/sdks/connections/README.md#createpartnerexpenseconnection) - Create Partner Expense connection +* [Delete](docs/sdks/connections/README.md#delete) - Delete connection +* [Get](docs/sdks/connections/README.md#get) - Get connection +* [List](docs/sdks/connections/README.md#list) - List connections +* [Unlink](docs/sdks/connections/README.md#unlink) - Unlink connection + +### [customers](docs/sdks/customers/README.md) + +* [Create](docs/sdks/customers/README.md#create) - Create customer +* [Get](docs/sdks/customers/README.md#get) - Get customer +* [List](docs/sdks/customers/README.md#list) - List customers +* [Update](docs/sdks/customers/README.md#update) - Update customer + +### [expenses](docs/sdks/expenses/README.md) + +* [Create](docs/sdks/expenses/README.md#create) - Create expense transaction +* [Update](docs/sdks/expenses/README.md#update) - Update expense-transactions +* [UploadAttachment](docs/sdks/expenses/README.md#uploadattachment) - Upload attachment + +### [manageData](docs/sdks/managedata/README.md) + +* [Get](docs/sdks/managedata/README.md#get) - Get data status +* [GetPullOperation](docs/sdks/managedata/README.md#getpulloperation) - Get pull operation +* [ListPullOperations](docs/sdks/managedata/README.md#listpulloperations) - List pull operations +* [RefreshAllDataTypes](docs/sdks/managedata/README.md#refreshalldatatypes) - Refresh all data +* [RefreshDataType](docs/sdks/managedata/README.md#refreshdatatype) - Refresh data type + +### [pushOperations](docs/sdks/pushoperations/README.md) + +* [Get](docs/sdks/pushoperations/README.md#get) - Get push operation +* [List](docs/sdks/pushoperations/README.md#list) - List push operations + +### [suppliers](docs/sdks/suppliers/README.md) + +* [Create](docs/sdks/suppliers/README.md#create) - Create supplier +* [Get](docs/sdks/suppliers/README.md#get) - Get supplier +* [List](docs/sdks/suppliers/README.md#list) - List suppliers +* [Update](docs/sdks/suppliers/README.md#update) - Update supplier + +### [sync](docs/sdks/sync/README.md) + +* [Get](docs/sdks/sync/README.md#get) - Get Sync status +* [GetLastSuccessfulSync](docs/sdks/sync/README.md#getlastsuccessfulsync) - Last successful sync +* [GetLatestSync](docs/sdks/sync/README.md#getlatestsync) - Latest sync status +* [InitiateSync](docs/sdks/sync/README.md#initiatesync) - Initiate sync +* [List](docs/sdks/sync/README.md#list) - List sync statuses + +### [transactionStatus](docs/sdks/transactionstatus/README.md) + +* [Get](docs/sdks/transactionstatus/README.md#get) - Get Sync Transaction +* [List](docs/sdks/transactionstatus/README.md#list) - List sync transactions ### Library generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks) diff --git a/sync-for-expenses/RELEASES.md b/sync-for-expenses/RELEASES.md index 4f459adbc..018f7df40 100644 --- a/sync-for-expenses/RELEASES.md +++ b/sync-for-expenses/RELEASES.md @@ -30,4 +30,14 @@ Based on: - OpenAPI Doc prealpha https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Expenses.yaml - Speakeasy CLI 1.77.1 (2.91.4) https://github.com/speakeasy-api/speakeasy ### Generated -- [csharp v0.4.0] sync-for-expenses \ No newline at end of file +- [csharp v0.4.0] sync-for-expenses + +## 2023-09-13 10:24:29 +### Changes +Based on: +- OpenAPI Doc prealpha https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Expenses.yaml +- Speakeasy CLI 1.82.5 (2.108.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v0.5.0] sync-for-expenses +### Releases +- [NuGet v0.5.0] https://www.nuget.org/packages/Codat.Sync.Expenses/0.5.0 - sync-for-expenses \ No newline at end of file diff --git a/sync-for-expenses/USAGE.md b/sync-for-expenses/USAGE.md index 3bd1c9458..ce399b4a1 100755 --- a/sync-for-expenses/USAGE.md +++ b/sync-for-expenses/USAGE.md @@ -15,7 +15,7 @@ var sdk = new CodatSyncExpensesSDK( var res = await sdk.Accounts.CreateAsync(new CreateAccountRequest() { Account = new Account() { Currency = "USD", - CurrentBalance = 0F, + CurrentBalance = 0M, Description = "Invoices the business has issued but has not yet collected payment on.", FullyQualifiedCategory = "Asset.Current", FullyQualifiedName = "Fixed Asset", @@ -33,31 +33,15 @@ var res = await sdk.Accounts.CreateAsync(new CreateAccountRequest() { ValidDatatypeLinks = new List() { new AccountValidDataTypeLinks() { Links = new List() { - "corrupti", - "illum", - "vel", - "error", + "unde", }, - Property = "deserunt", - }, - new AccountValidDataTypeLinks() { - Links = new List() { - "iure", - "magnam", - }, - Property = "debitis", - }, - new AccountValidDataTypeLinks() { - Links = new List() { - "delectus", - }, - Property = "tempora", + Property = "nulla", }, }, }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", - TimeoutInMinutes = 383441, + TimeoutInMinutes = 544883, }); // handle response diff --git a/sync-for-expenses/docs/models/operations/UnlinkConnectionRequest.md b/sync-for-expenses/docs/models/operations/UnlinkConnectionRequest.md index 374cc24cd..e8b8b4925 100755 --- a/sync-for-expenses/docs/models/operations/UnlinkConnectionRequest.md +++ b/sync-for-expenses/docs/models/operations/UnlinkConnectionRequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `requestBody` | [UnlinkConnectionRequestBody](../../models/operations/UnlinkConnectionRequestBody.md) | :heavy_minus_sign: | N/A | | -| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `requestBody` | [UnlinkConnectionUpdateConnection](../../models/operations/UnlinkConnectionUpdateConnection.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/UnlinkConnectionRequestBody.md b/sync-for-expenses/docs/models/operations/UnlinkConnectionRequestBody.md deleted file mode 100755 index 734319719..000000000 --- a/sync-for-expenses/docs/models/operations/UnlinkConnectionRequestBody.md +++ /dev/null @@ -1,8 +0,0 @@ -# UnlinkConnectionRequestBody - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `status` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/operations/UnlinkConnectionUpdateConnection.md b/sync-for-expenses/docs/models/operations/UnlinkConnectionUpdateConnection.md new file mode 100755 index 000000000..d8ae5bc3e --- /dev/null +++ b/sync-for-expenses/docs/models/operations/UnlinkConnectionUpdateConnection.md @@ -0,0 +1,8 @@ +# UnlinkConnectionUpdateConnection + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `status` | [DataConnectionStatus](../../models/shared/DataConnectionStatus.md) | :heavy_minus_sign: | The current authorization status of the data connection. | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/Account.md b/sync-for-expenses/docs/models/shared/Account.md index 100927db1..a0b0b6283 100755 --- a/sync-for-expenses/docs/models/shared/Account.md +++ b/sync-for-expenses/docs/models/shared/Account.md @@ -35,7 +35,7 @@ To determine the list of allowed categories for a specific integration, you can: | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | -| `currentBalance` | *float* | :heavy_minus_sign: | Current balance in the account. | 0 | +| `currentBalance` | *decimal* | :heavy_minus_sign: | Current balance in the account. | 0 | | `description` | *string* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | | `fullyQualifiedCategory` | *string* | :heavy_minus_sign: | Full category of the account.

For example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation. | Asset.Current | | `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | Cash On Hand | diff --git a/sync-for-expenses/docs/models/shared/Attachment.md b/sync-for-expenses/docs/models/shared/Attachment.md index 1030648fa..8b8448534 100755 --- a/sync-for-expenses/docs/models/shared/Attachment.md +++ b/sync-for-expenses/docs/models/shared/Attachment.md @@ -1,7 +1,5 @@ # Attachment -OK - ## Fields diff --git a/sync-for-expenses/docs/models/shared/Companies.md b/sync-for-expenses/docs/models/shared/Companies.md index 4ea8b507c..2ee5373cb 100755 --- a/sync-for-expenses/docs/models/shared/Companies.md +++ b/sync-for-expenses/docs/models/shared/Companies.md @@ -1,14 +1,12 @@ # Companies -OK - ## Fields | Field | Type | Required | Description | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | | `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *int* | :heavy_check_mark: | N/A | -| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `pageNumber` | *long* | :heavy_check_mark: | N/A | +| `pageSize` | *long* | :heavy_check_mark: | N/A | | `results` | List<[Company](../../models/shared/Company.md)> | :heavy_minus_sign: | N/A | -| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| `totalResults` | *long* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/CompanyConfiguration.md b/sync-for-expenses/docs/models/shared/CompanyConfiguration.md index 75cd932a8..b34f82338 100755 --- a/sync-for-expenses/docs/models/shared/CompanyConfiguration.md +++ b/sync-for-expenses/docs/models/shared/CompanyConfiguration.md @@ -1,7 +1,5 @@ # CompanyConfiguration -Success - ## Fields diff --git a/sync-for-expenses/docs/models/shared/CompanySyncStatus.md b/sync-for-expenses/docs/models/shared/CompanySyncStatus.md index 861756fd0..a064066e8 100755 --- a/sync-for-expenses/docs/models/shared/CompanySyncStatus.md +++ b/sync-for-expenses/docs/models/shared/CompanySyncStatus.md @@ -1,7 +1,5 @@ # CompanySyncStatus -Success - ## Fields diff --git a/sync-for-expenses/docs/models/shared/Connections.md b/sync-for-expenses/docs/models/shared/Connections.md index cfc06dd0c..70c5dc232 100755 --- a/sync-for-expenses/docs/models/shared/Connections.md +++ b/sync-for-expenses/docs/models/shared/Connections.md @@ -1,14 +1,12 @@ # Connections -OK - ## Fields | Field | Type | Required | Description | | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | | `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *int* | :heavy_check_mark: | N/A | -| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `pageNumber` | *long* | :heavy_check_mark: | N/A | +| `pageSize` | *long* | :heavy_check_mark: | N/A | | `results` | List<[Connection](../../models/shared/Connection.md)> | :heavy_minus_sign: | N/A | -| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| `totalResults` | *long* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/CreateAccountResponse.md b/sync-for-expenses/docs/models/shared/CreateAccountResponse.md index e880390dd..1a8985a4b 100755 --- a/sync-for-expenses/docs/models/shared/CreateAccountResponse.md +++ b/sync-for-expenses/docs/models/shared/CreateAccountResponse.md @@ -1,7 +1,5 @@ # CreateAccountResponse -Success - ## Fields @@ -17,7 +15,7 @@ Success | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `status` | [PushOperationStatus](../../models/shared/PushOperationStatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `statusCode` | *int* | :heavy_check_mark: | N/A | | +| `statusCode` | *long* | :heavy_check_mark: | N/A | | | `timeoutInMinutes` | *int* | :heavy_minus_sign: | N/A | | | ~~`timeoutInSeconds`~~ | *int* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Validation](../../models/shared/Validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/CreateCustomerResponse.md b/sync-for-expenses/docs/models/shared/CreateCustomerResponse.md index 07ff04dad..126f46423 100755 --- a/sync-for-expenses/docs/models/shared/CreateCustomerResponse.md +++ b/sync-for-expenses/docs/models/shared/CreateCustomerResponse.md @@ -1,7 +1,5 @@ # CreateCustomerResponse -Success - ## Fields @@ -17,7 +15,7 @@ Success | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `status` | [PushOperationStatus](../../models/shared/PushOperationStatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `statusCode` | *int* | :heavy_check_mark: | N/A | | +| `statusCode` | *long* | :heavy_check_mark: | N/A | | | `timeoutInMinutes` | *int* | :heavy_minus_sign: | N/A | | | ~~`timeoutInSeconds`~~ | *int* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Validation](../../models/shared/Validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/CreateExpenseResponse.md b/sync-for-expenses/docs/models/shared/CreateExpenseResponse.md index ce006c5a4..9bf60b553 100755 --- a/sync-for-expenses/docs/models/shared/CreateExpenseResponse.md +++ b/sync-for-expenses/docs/models/shared/CreateExpenseResponse.md @@ -1,7 +1,5 @@ # CreateExpenseResponse -OK - ## Fields diff --git a/sync-for-expenses/docs/models/shared/CreateSupplierResponse.md b/sync-for-expenses/docs/models/shared/CreateSupplierResponse.md index 46e6ba7c5..3b657b386 100755 --- a/sync-for-expenses/docs/models/shared/CreateSupplierResponse.md +++ b/sync-for-expenses/docs/models/shared/CreateSupplierResponse.md @@ -1,7 +1,5 @@ # CreateSupplierResponse -Success - ## Fields @@ -17,7 +15,7 @@ Success | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `status` | [PushOperationStatus](../../models/shared/PushOperationStatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `statusCode` | *int* | :heavy_check_mark: | N/A | | +| `statusCode` | *long* | :heavy_check_mark: | N/A | | | `timeoutInMinutes` | *int* | :heavy_minus_sign: | N/A | | | ~~`timeoutInSeconds`~~ | *int* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Validation](../../models/shared/Validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/Customer.md b/sync-for-expenses/docs/models/shared/Customer.md index b3d8ca2ce..b36b47cd4 100755 --- a/sync-for-expenses/docs/models/shared/Customer.md +++ b/sync-for-expenses/docs/models/shared/Customer.md @@ -1,7 +1,5 @@ # Customer -Success - ## Fields diff --git a/sync-for-expenses/docs/models/shared/Customers.md b/sync-for-expenses/docs/models/shared/Customers.md index 8699f3be2..3f248baf4 100755 --- a/sync-for-expenses/docs/models/shared/Customers.md +++ b/sync-for-expenses/docs/models/shared/Customers.md @@ -1,14 +1,12 @@ # Customers -Success - ## Fields | Field | Type | Required | Description | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *int* | :heavy_check_mark: | N/A | -| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `pageNumber` | *long* | :heavy_check_mark: | N/A | +| `pageSize` | *long* | :heavy_check_mark: | N/A | | `results` | List<[Customer](../../models/shared/Customer.md)> | :heavy_minus_sign: | N/A | -| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| `totalResults` | *long* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/ErrorMessage.md b/sync-for-expenses/docs/models/shared/ErrorMessage.md index 29bd5d372..4ac5e8947 100755 --- a/sync-for-expenses/docs/models/shared/ErrorMessage.md +++ b/sync-for-expenses/docs/models/shared/ErrorMessage.md @@ -1,7 +1,5 @@ # ErrorMessage -Your `query` parameter was not correctly formed - ## Fields @@ -9,7 +7,7 @@ Your `query` parameter was not correctly formed | ------------------- | ------------------- | ------------------- | ------------------- | | `canBeRetried` | *string* | :heavy_minus_sign: | N/A | | `correlationId` | *string* | :heavy_minus_sign: | N/A | -| `detailedErrorCode` | *int* | :heavy_minus_sign: | N/A | +| `detailedErrorCode` | *long* | :heavy_minus_sign: | N/A | | `error` | *string* | :heavy_minus_sign: | N/A | | `service` | *string* | :heavy_minus_sign: | N/A | -| `statusCode` | *int* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `statusCode` | *long* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/ExpenseTransaction.md b/sync-for-expenses/docs/models/shared/ExpenseTransaction.md index 2b05b7d92..8e7ba3144 100755 --- a/sync-for-expenses/docs/models/shared/ExpenseTransaction.md +++ b/sync-for-expenses/docs/models/shared/ExpenseTransaction.md @@ -8,7 +8,7 @@ | `bankAccountRef` | [ExpenseTransactionBankAccountReference](../../models/shared/ExpenseTransactionBankAccountReference.md) | :heavy_minus_sign: | N/A | | | `contactRef` | [ContactRef](../../models/shared/ContactRef.md) | :heavy_minus_sign: | N/A | | | `currency` | *string* | :heavy_check_mark: | Currency the transaction was recorded in. | GBP | -| `currencyRate` | *float* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currencyRate` | *decimal* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `id` | *string* | :heavy_check_mark: | Your unique identifier for the transaction. | 4d7c6929-7770-412b-91bb-44d3bc71d111 | | `issueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `lines` | List<[ExpenseTransactionLine](../../models/shared/ExpenseTransactionLine.md)> | :heavy_minus_sign: | Array of transaction lines. | | diff --git a/sync-for-expenses/docs/models/shared/ExpenseTransactionLine.md b/sync-for-expenses/docs/models/shared/ExpenseTransactionLine.md index eca15e85b..636d1c7dd 100755 --- a/sync-for-expenses/docs/models/shared/ExpenseTransactionLine.md +++ b/sync-for-expenses/docs/models/shared/ExpenseTransactionLine.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | `accountRef` | [RecordRef](../../models/shared/RecordRef.md) | :heavy_check_mark: | N/A | | -| `netAmount` | *float* | :heavy_check_mark: | Amount of the line, exclusive of tax. | 110.42 | -| `taxAmount` | *float* | :heavy_check_mark: | Amount of tax for the line. | 14.43 | +| `netAmount` | *decimal* | :heavy_check_mark: | Amount of the line, exclusive of tax. | 110.42 | +| `taxAmount` | *decimal* | :heavy_check_mark: | Amount of tax for the line. | 14.43 | | `taxRateRef` | [RecordRef](../../models/shared/RecordRef.md) | :heavy_minus_sign: | N/A | | | `trackingRefs` | List<[RecordRef](../../models/shared/RecordRef.md)> | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/MappingOptions.md b/sync-for-expenses/docs/models/shared/MappingOptions.md index 37c69c7ca..16742409f 100755 --- a/sync-for-expenses/docs/models/shared/MappingOptions.md +++ b/sync-for-expenses/docs/models/shared/MappingOptions.md @@ -1,7 +1,5 @@ # MappingOptions -Success - ## Fields diff --git a/sync-for-expenses/docs/models/shared/PullOperation.md b/sync-for-expenses/docs/models/shared/PullOperation.md index 4374917d8..329f0af43 100755 --- a/sync-for-expenses/docs/models/shared/PullOperation.md +++ b/sync-for-expenses/docs/models/shared/PullOperation.md @@ -14,6 +14,6 @@ Information about a queued, in progress or completed pull operation. | `id` | *string* | :heavy_check_mark: | N/A | 943accd0-4247-42d8-865b-363c8629e1da | | `isCompleted` | *bool* | :heavy_check_mark: | N/A | | | `isErrored` | *bool* | :heavy_check_mark: | N/A | | -| `progress` | *int* | :heavy_check_mark: | N/A | | +| `progress` | *long* | :heavy_check_mark: | N/A | | | `requested` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `status` | [PullOperationStatus](../../models/shared/PullOperationStatus.md) | :heavy_check_mark: | N/A | Complete | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/PullOperations.md b/sync-for-expenses/docs/models/shared/PullOperations.md index dd44f54ea..24f5ffa52 100755 --- a/sync-for-expenses/docs/models/shared/PullOperations.md +++ b/sync-for-expenses/docs/models/shared/PullOperations.md @@ -1,14 +1,12 @@ # PullOperations -OK - ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | | `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *int* | :heavy_check_mark: | N/A | -| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `pageNumber` | *long* | :heavy_check_mark: | N/A | +| `pageSize` | *long* | :heavy_check_mark: | N/A | | `results` | List<[PullOperation](../../models/shared/PullOperation.md)> | :heavy_minus_sign: | N/A | -| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| `totalResults` | *long* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/PushOperation.md b/sync-for-expenses/docs/models/shared/PushOperation.md index 02de6e870..577e3bbfa 100755 --- a/sync-for-expenses/docs/models/shared/PushOperation.md +++ b/sync-for-expenses/docs/models/shared/PushOperation.md @@ -1,7 +1,5 @@ # PushOperation -OK - ## Fields @@ -16,7 +14,7 @@ OK | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `status` | [PushOperationStatus](../../models/shared/PushOperationStatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `statusCode` | *int* | :heavy_check_mark: | N/A | | +| `statusCode` | *long* | :heavy_check_mark: | N/A | | | `timeoutInMinutes` | *int* | :heavy_minus_sign: | N/A | | | ~~`timeoutInSeconds`~~ | *int* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Validation](../../models/shared/Validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/PushOperations.md b/sync-for-expenses/docs/models/shared/PushOperations.md index 15a6b46da..5490ccd3c 100755 --- a/sync-for-expenses/docs/models/shared/PushOperations.md +++ b/sync-for-expenses/docs/models/shared/PushOperations.md @@ -1,14 +1,12 @@ # PushOperations -OK - ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | | `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *int* | :heavy_check_mark: | N/A | -| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `pageNumber` | *long* | :heavy_check_mark: | N/A | +| `pageSize` | *long* | :heavy_check_mark: | N/A | | `results` | List<[PushOperation](../../models/shared/PushOperation.md)> | :heavy_minus_sign: | N/A | -| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| `totalResults` | *long* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/Supplier.md b/sync-for-expenses/docs/models/shared/Supplier.md index 2b1cf304c..b10a5e102 100755 --- a/sync-for-expenses/docs/models/shared/Supplier.md +++ b/sync-for-expenses/docs/models/shared/Supplier.md @@ -1,7 +1,5 @@ # Supplier -Success - ## Fields diff --git a/sync-for-expenses/docs/models/shared/Suppliers.md b/sync-for-expenses/docs/models/shared/Suppliers.md index 14e6e8c8f..80b2695b9 100755 --- a/sync-for-expenses/docs/models/shared/Suppliers.md +++ b/sync-for-expenses/docs/models/shared/Suppliers.md @@ -1,14 +1,12 @@ # Suppliers -Success - ## Fields | Field | Type | Required | Description | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *int* | :heavy_check_mark: | N/A | -| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `pageNumber` | *long* | :heavy_check_mark: | N/A | +| `pageSize` | *long* | :heavy_check_mark: | N/A | | `results` | List<[Supplier](../../models/shared/Supplier.md)> | :heavy_minus_sign: | N/A | -| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| `totalResults` | *long* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/SyncInitiated.md b/sync-for-expenses/docs/models/shared/SyncInitiated.md index 6828b41f2..b22548782 100755 --- a/sync-for-expenses/docs/models/shared/SyncInitiated.md +++ b/sync-for-expenses/docs/models/shared/SyncInitiated.md @@ -1,7 +1,5 @@ # SyncInitiated -Returns the newly created SyncId - ## Fields diff --git a/sync-for-expenses/docs/models/shared/TaxRateMappingInfo.md b/sync-for-expenses/docs/models/shared/TaxRateMappingInfo.md index 434db598b..ab43c1da6 100755 --- a/sync-for-expenses/docs/models/shared/TaxRateMappingInfo.md +++ b/sync-for-expenses/docs/models/shared/TaxRateMappingInfo.md @@ -6,8 +6,8 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | | `code` | *string* | :heavy_minus_sign: | Code for the tax rate from the accounting platform. | UK Standard Rate (Bills) | -| `effectiveTaxRate` | *float* | :heavy_minus_sign: | Effective tax rate. | 20 | +| `effectiveTaxRate` | *decimal* | :heavy_minus_sign: | Effective tax rate. | 20 | | `id` | *string* | :heavy_minus_sign: | Unique identifier of tax rate. | 59_Bills | | `name` | *string* | :heavy_minus_sign: | Name of the tax rate in the accounting platform. | UK Standard Rate (Bills) Bills | -| `totalTaxRate` | *float* | :heavy_minus_sign: | Total (not compounded) sum of the components of a tax rate. | 20 | +| `totalTaxRate` | *decimal* | :heavy_minus_sign: | Total (not compounded) sum of the components of a tax rate. | 20 | | `validTransactionTypes` | List<[TaxRateMappingInfoValidTransactionTypes](../../models/shared/TaxRateMappingInfoValidTransactionTypes.md)> | :heavy_minus_sign: | Supported transaction types for the account. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/Transaction.md b/sync-for-expenses/docs/models/shared/Transaction.md index 4ab337d9f..d2e44b37b 100755 --- a/sync-for-expenses/docs/models/shared/Transaction.md +++ b/sync-for-expenses/docs/models/shared/Transaction.md @@ -1,7 +1,5 @@ # Transaction -Success - ## Fields diff --git a/sync-for-expenses/docs/models/shared/Transactions.md b/sync-for-expenses/docs/models/shared/Transactions.md index 814496e8e..f429a0d65 100755 --- a/sync-for-expenses/docs/models/shared/Transactions.md +++ b/sync-for-expenses/docs/models/shared/Transactions.md @@ -1,14 +1,12 @@ # Transactions -Success - ## Fields | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `links` | [Links](../../models/shared/Links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *int* | :heavy_check_mark: | N/A | -| `pageSize` | *int* | :heavy_check_mark: | N/A | +| `pageNumber` | *long* | :heavy_check_mark: | N/A | +| `pageSize` | *long* | :heavy_check_mark: | N/A | | `results` | List<[Transaction](../../models/shared/Transaction.md)> | :heavy_minus_sign: | N/A | -| `totalResults` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| `totalResults` | *long* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/UpdateCustomerResponse.md b/sync-for-expenses/docs/models/shared/UpdateCustomerResponse.md index dd6fd0996..1f0f3ee04 100755 --- a/sync-for-expenses/docs/models/shared/UpdateCustomerResponse.md +++ b/sync-for-expenses/docs/models/shared/UpdateCustomerResponse.md @@ -1,7 +1,5 @@ # UpdateCustomerResponse -Success - ## Fields @@ -17,7 +15,7 @@ Success | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `status` | [PushOperationStatus](../../models/shared/PushOperationStatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `statusCode` | *int* | :heavy_check_mark: | N/A | | +| `statusCode` | *long* | :heavy_check_mark: | N/A | | | `timeoutInMinutes` | *int* | :heavy_minus_sign: | N/A | | | ~~`timeoutInSeconds`~~ | *int* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Validation](../../models/shared/Validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/models/shared/UpdateExpenseRequest.md b/sync-for-expenses/docs/models/shared/UpdateExpenseRequest.md index 2edc6d247..4d042e8dc 100755 --- a/sync-for-expenses/docs/models/shared/UpdateExpenseRequest.md +++ b/sync-for-expenses/docs/models/shared/UpdateExpenseRequest.md @@ -8,7 +8,7 @@ | `bankAccountRef` | [UpdateExpenseRequestBankAccountReference](../../models/shared/UpdateExpenseRequestBankAccountReference.md) | :heavy_minus_sign: | N/A | | | `contactRef` | [ContactRef](../../models/shared/ContactRef.md) | :heavy_minus_sign: | N/A | | | `currency` | *string* | :heavy_minus_sign: | Currency the transaction was recorded in. | GBP | -| `currencyRate` | *float* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | +| `currencyRate` | *decimal* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | | | `issueDate` | *string* | :heavy_check_mark: | Date the transaction was recorded. | 2022-06-28T00:00:00.000Z | | `lines` | List<[ExpenseTransactionLine](../../models/shared/ExpenseTransactionLine.md)> | :heavy_minus_sign: | Array of transaction lines. | | | `merchantName` | *string* | :heavy_minus_sign: | Name of the merchant where the purchase took place | Amazon UK | diff --git a/sync-for-expenses/docs/models/shared/UpdateExpenseResponse.md b/sync-for-expenses/docs/models/shared/UpdateExpenseResponse.md index 970a0e555..d60cadc81 100755 --- a/sync-for-expenses/docs/models/shared/UpdateExpenseResponse.md +++ b/sync-for-expenses/docs/models/shared/UpdateExpenseResponse.md @@ -1,7 +1,5 @@ # UpdateExpenseResponse -Accepted - ## Fields diff --git a/sync-for-expenses/docs/models/shared/UpdateSupplierResponse.md b/sync-for-expenses/docs/models/shared/UpdateSupplierResponse.md index 461957f11..7f389fcd1 100755 --- a/sync-for-expenses/docs/models/shared/UpdateSupplierResponse.md +++ b/sync-for-expenses/docs/models/shared/UpdateSupplierResponse.md @@ -1,7 +1,5 @@ # UpdateSupplierResponse -Success - ## Fields @@ -17,7 +15,7 @@ Success | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z | | `status` | [PushOperationStatus](../../models/shared/PushOperationStatus.md) | :heavy_check_mark: | The status of the push operation. | | -| `statusCode` | *int* | :heavy_check_mark: | N/A | | +| `statusCode` | *long* | :heavy_check_mark: | N/A | | | `timeoutInMinutes` | *int* | :heavy_minus_sign: | N/A | | | ~~`timeoutInSeconds`~~ | *int* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `validation` | [Validation](../../models/shared/Validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/accounts/README.md b/sync-for-expenses/docs/sdks/accounts/README.md index 60a173225..b688cf536 100755 --- a/sync-for-expenses/docs/sdks/accounts/README.md +++ b/sync-for-expenses/docs/sdks/accounts/README.md @@ -36,11 +36,11 @@ var sdk = new CodatSyncExpensesSDK( var res = await sdk.Accounts.CreateAsync(new CreateAccountRequest() { Account = new Account() { - Currency = "USD", - CurrentBalance = 0F, + Currency = "EUR", + CurrentBalance = 0M, Description = "Invoices the business has issued but has not yet collected payment on.", FullyQualifiedCategory = "Asset.Current", - FullyQualifiedName = "Fixed Asset", + FullyQualifiedName = "Cash On Hand", Id = "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", IsBankAccount = false, Metadata = new AccountMetadata() { @@ -55,24 +55,15 @@ var res = await sdk.Accounts.CreateAsync(new CreateAccountRequest() { ValidDatatypeLinks = new List() { new AccountValidDataTypeLinks() { Links = new List() { - "nisi", - "recusandae", - "temporibus", + "suscipit", }, - Property = "ab", - }, - new AccountValidDataTypeLinks() { - Links = new List() { - "veritatis", - "deserunt", - }, - Property = "perferendis", + Property = "iure", }, }, }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", - TimeoutInMinutes = 368241, + TimeoutInMinutes = 297534, }); // handle response diff --git a/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md b/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md index 134232b61..49de314d0 100755 --- a/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md +++ b/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md @@ -12,7 +12,7 @@ integrations with multiple accounting platforms through a standardized API. [See our OpenAPI spec](https://github.com/codatio/oas) - +Not seeing the endpoints you're expecting? We've [reorganized our products](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Sync for Commerce](https://docs.codat.io/sync-for-expenses-v1-api#/). ### Available Operations diff --git a/sync-for-expenses/docs/sdks/companies/README.md b/sync-for-expenses/docs/sdks/companies/README.md index 140735a01..0dc370de5 100755 --- a/sync-for-expenses/docs/sdks/companies/README.md +++ b/sync-for-expenses/docs/sdks/companies/README.md @@ -146,7 +146,7 @@ var res = await sdk.Companies.ListAsync(new ListCompaniesRequest() { OrderBy = "-modifiedDate", Page = 1, PageSize = 100, - Query = "repellendus", + Query = "debitis", }); // handle response diff --git a/sync-for-expenses/docs/sdks/connections/README.md b/sync-for-expenses/docs/sdks/connections/README.md index e5d96e68a..5da8d87fd 100755 --- a/sync-for-expenses/docs/sdks/connections/README.md +++ b/sync-for-expenses/docs/sdks/connections/README.md @@ -34,7 +34,7 @@ var sdk = new CodatSyncExpensesSDK( var res = await sdk.Connections.CreateAsync(new CreateConnectionRequest() { RequestBody = new CreateConnectionRequestBody() { - PlatformKey = "sapiente", + PlatformKey = "ipsa", }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", }); @@ -187,7 +187,7 @@ var res = await sdk.Connections.ListAsync(new ListConnectionsRequest() { OrderBy = "-modifiedDate", Page = 1, PageSize = 100, - Query = "quo", + Query = "delectus", }); // handle response @@ -223,8 +223,8 @@ var sdk = new CodatSyncExpensesSDK( ); var res = await sdk.Connections.UnlinkAsync(new UnlinkConnectionRequest() { - RequestBody = new UnlinkConnectionRequestBody() { - Status = "odit", + RequestBody = new UnlinkConnectionUpdateConnection() { + Status = CodatSyncExpenses.Models.Shared.DataConnectionStatus.Linked, }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", diff --git a/sync-for-expenses/docs/sdks/customers/README.md b/sync-for-expenses/docs/sdks/customers/README.md index c8047745c..1fe7373cf 100755 --- a/sync-for-expenses/docs/sdks/customers/README.md +++ b/sync-for-expenses/docs/sdks/customers/README.md @@ -43,7 +43,7 @@ var res = await sdk.Customers.CreateAsync(new CreateCustomerRequest() { }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", - TimeoutInMinutes = 870013, + TimeoutInMinutes = 383441, }); // handle response @@ -87,7 +87,7 @@ var sdk = new CodatSyncExpensesSDK( var res = await sdk.Customers.GetAsync(new GetCustomerRequest() { CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", - CustomerId = "at", + CustomerId = "molestiae", }); // handle response @@ -132,7 +132,7 @@ var res = await sdk.Customers.ListAsync(new ListCustomersRequest() { OrderBy = "-modifiedDate", Page = 1, PageSize = 100, - Query = "maiores", + Query = "minus", }); // handle response @@ -182,9 +182,9 @@ var res = await sdk.Customers.UpdateAsync(new UpdateCustomerRequest() { }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", - CustomerId = "molestiae", + CustomerId = "placeat", ForceUpdate = false, - TimeoutInMinutes = 799159, + TimeoutInMinutes = 528895, }); // handle response diff --git a/sync-for-expenses/docs/sdks/expenses/README.md b/sync-for-expenses/docs/sdks/expenses/README.md index b00385e76..ccf3e027b 100755 --- a/sync-for-expenses/docs/sdks/expenses/README.md +++ b/sync-for-expenses/docs/sdks/expenses/README.md @@ -39,7 +39,7 @@ var res = await sdk.Expenses.CreateAsync(new CreateExpenseTransactionRequest() { Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", }, Currency = "GBP", - CurrencyRate = 4614.79F, + CurrencyRate = 4799.77M, Id = "4d7c6929-7770-412b-91bb-44d3bc71d111", IssueDate = "2022-10-23T00:00:00.000Z", Lines = new List() { @@ -47,29 +47,8 @@ var res = await sdk.Expenses.CreateAsync(new CreateExpenseTransactionRequest() { AccountRef = new RecordRef() { Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, + NetAmount = 110.42M, + TaxAmount = 14.43M, TaxRateRef = new RecordRef() { Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", }, @@ -79,240 +58,6 @@ var res = await sdk.Expenses.CreateAsync(new CreateExpenseTransactionRequest() { }, }, }, - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, - }, - MerchantName = "Amazon UK", - Notes = "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - Type = CodatSyncExpenses.Models.Shared.ExpenseTransactionType.Payment, - }, - new ExpenseTransaction() { - BankAccountRef = new ExpenseTransactionBankAccountReference() { - Id = "787dfb37-5707-4dc0-8a86-8d74e4cc78ea", - }, - ContactRef = new ContactRef() { - ContactType = CodatSyncExpenses.Models.Shared.ContactRefContactType.Supplier, - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - Currency = "GBP", - CurrencyRate = 5820.2F, - Id = "4d7c6929-7770-412b-91bb-44d3bc71d111", - IssueDate = "2022-10-23T00:00:00.000Z", - Lines = new List() { - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, - }, - MerchantName = "Amazon UK", - Notes = "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - Type = CodatSyncExpenses.Models.Shared.ExpenseTransactionType.Payment, - }, - new ExpenseTransaction() { - BankAccountRef = new ExpenseTransactionBankAccountReference() { - Id = "787dfb37-5707-4dc0-8a86-8d74e4cc78ea", - }, - ContactRef = new ContactRef() { - ContactType = CodatSyncExpenses.Models.Shared.ContactRefContactType.Supplier, - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - Currency = "GBP", - CurrencyRate = 1059.07F, - Id = "4d7c6929-7770-412b-91bb-44d3bc71d111", - IssueDate = "2022-10-23T00:00:00.000Z", - Lines = new List() { - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, - }, - MerchantName = "Amazon UK", - Notes = "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - Type = CodatSyncExpenses.Models.Shared.ExpenseTransactionType.Payment, - }, - new ExpenseTransaction() { - BankAccountRef = new ExpenseTransactionBankAccountReference() { - Id = "787dfb37-5707-4dc0-8a86-8d74e4cc78ea", - }, - ContactRef = new ContactRef() { - ContactType = CodatSyncExpenses.Models.Shared.ContactRefContactType.Supplier, - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - Currency = "GBP", - CurrencyRate = 7742.34F, - Id = "4d7c6929-7770-412b-91bb-44d3bc71d111", - IssueDate = "2022-10-23T00:00:00.000Z", - Lines = new List() { - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, - new ExpenseTransactionLine() { - AccountRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - NetAmount = 110.42F, - TaxAmount = 14.43F, - TaxRateRef = new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - TrackingRefs = new List() { - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - }, - }, }, MerchantName = "Amazon UK", Notes = "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", @@ -365,15 +110,15 @@ var res = await sdk.Expenses.UpdateAsync(new UpdateExpenseTransactionRequest() { Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", }, Currency = "GBP", - CurrencyRate = 1352.18F, + CurrencyRate = 3927.85M, IssueDate = "2022-06-28T00:00:00.000Z", Lines = new List() { new ExpenseTransactionLine() { AccountRef = new RecordRef() { Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", }, - NetAmount = 110.42F, - TaxAmount = 14.43F, + NetAmount = 110.42M, + TaxAmount = 14.43M, TaxRateRef = new RecordRef() { Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", }, @@ -381,15 +126,12 @@ var res = await sdk.Expenses.UpdateAsync(new UpdateExpenseTransactionRequest() { new RecordRef() { Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", }, - new RecordRef() { - Id = "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, }, }, }, MerchantName = "Amazon UK", Notes = "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - Type = "natus", + Type = "recusandae", }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", TransactionId = "336694d8-2dca-4cb5-a28d-3ccb83e55eee", @@ -429,8 +171,8 @@ var sdk = new CodatSyncExpensesSDK( var res = await sdk.Expenses.UploadAttachmentAsync(new UploadExpenseAttachmentRequest() { RequestBody = new UploadExpenseAttachmentRequestBody() { - Content = "sed as bytes <<<>>>", - RequestBody = "iste", + Content = "temporibus as bytes <<<>>>", + RequestBody = "ab", }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", SyncId = "6fb40d5e-b13e-11ed-afa1-0242ac120002", diff --git a/sync-for-expenses/docs/sdks/managedata/README.md b/sync-for-expenses/docs/sdks/managedata/README.md index 45896b158..a393dffe6 100755 --- a/sync-for-expenses/docs/sdks/managedata/README.md +++ b/sync-for-expenses/docs/sdks/managedata/README.md @@ -107,7 +107,7 @@ var res = await sdk.ManageData.ListPullOperationsAsync(new ListPullOperationsReq OrderBy = "-modifiedDate", Page = 1, PageSize = 100, - Query = "dolor", + Query = "quis", }); // handle response @@ -186,7 +186,7 @@ var sdk = new CodatSyncExpensesSDK( var res = await sdk.ManageData.RefreshDataTypeAsync(new RefreshDataTypeRequest() { CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", - ConnectionId = "96fea759-6eb1-40fa-aa23-52c5955907af", + ConnectionId = "1a05dfc2-ddf7-4cc7-8ca1-ba928fc81674", DataType = CodatSyncExpenses.Models.Shared.DataType.Invoices, }); diff --git a/sync-for-expenses/docs/sdks/pushoperations/README.md b/sync-for-expenses/docs/sdks/pushoperations/README.md index 7b13d75cc..78a1aaa99 100755 --- a/sync-for-expenses/docs/sdks/pushoperations/README.md +++ b/sync-for-expenses/docs/sdks/pushoperations/README.md @@ -28,7 +28,7 @@ var sdk = new CodatSyncExpensesSDK( var res = await sdk.PushOperations.GetAsync(new GetPushOperationRequest() { CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", - PushOperationKey = "f1a3a2fa-9467-4739-a51a-a52c3f5ad019", + PushOperationKey = "2cb73920-5929-4396-bea7-596eb10faaa2", }); // handle response @@ -68,7 +68,7 @@ var res = await sdk.PushOperations.ListAsync(new ListPushOperationsRequest() { OrderBy = "-modifiedDate", Page = 1, PageSize = 100, - Query = "temporibus", + Query = "dolorem", }); // handle response diff --git a/sync-for-expenses/docs/sdks/suppliers/README.md b/sync-for-expenses/docs/sdks/suppliers/README.md index 51b5688b1..7bc8d93b8 100755 --- a/sync-for-expenses/docs/sdks/suppliers/README.md +++ b/sync-for-expenses/docs/sdks/suppliers/README.md @@ -43,7 +43,7 @@ var res = await sdk.Suppliers.CreateAsync(new CreateSupplierRequest() { }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", - TimeoutInMinutes = 673660, + TimeoutInMinutes = 358152, }); // handle response @@ -132,7 +132,7 @@ var res = await sdk.Suppliers.ListAsync(new ListSuppliersRequest() { OrderBy = "-modifiedDate", Page = 1, PageSize = 100, - Query = "reiciendis", + Query = "nobis", }); // handle response @@ -183,8 +183,8 @@ var res = await sdk.Suppliers.UpdateAsync(new UpdateSupplierRequest() { CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", ForceUpdate = false, - SupplierId = "EILBDVJVNUAGVKRQ", - TimeoutInMinutes = 878194, + SupplierId = "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2", + TimeoutInMinutes = 607831, }); // handle response diff --git a/sync-for-expenses/docs/sdks/sync/README.md b/sync-for-expenses/docs/sdks/sync/README.md index c3bfe1f61..f790b2c48 100755 --- a/sync-for-expenses/docs/sdks/sync/README.md +++ b/sync-for-expenses/docs/sdks/sync/README.md @@ -141,8 +141,7 @@ var sdk = new CodatSyncExpensesSDK( var res = await sdk.Sync.InitiateSyncAsync(new InitiateSyncRequest() { InitiateSync = new InitiateSync() { DatasetIds = new List() { - "8f097b00-74f1-4547-9b5e-6e13b99d488e", - "1e91e450-ad2a-4bd4-8269-802d502a94bb", + "55907aff-1a3a-42fa-9467-739251aa52c3", }, }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", diff --git a/sync-for-expenses/files.gen b/sync-for-expenses/files.gen index 6f08a1f7e..607b1bcd6 100755 --- a/sync-for-expenses/files.gen +++ b/sync-for-expenses/files.gen @@ -10,6 +10,8 @@ CodatSyncExpenses/Suppliers.cs CodatSyncExpenses/Sync.cs CodatSyncExpenses/TransactionStatus.cs CodatSyncExpenses/CodatSyncExpensesSDK.cs +CodatSyncExpenses/Utils/BigIntSerializer.cs +CodatSyncExpenses/Utils/DecimalSerializer.cs CodatSyncExpenses/Utils/EnumSerializer.cs CodatSyncExpenses/Utils/FlexibleObjectDeserializer.cs CodatSyncExpenses/Utils/HeaderSerializer.cs @@ -50,7 +52,7 @@ CodatSyncExpenses/Models/Operations/GetConnectionRequest.cs CodatSyncExpenses/Models/Operations/GetConnectionResponse.cs CodatSyncExpenses/Models/Operations/ListConnectionsRequest.cs CodatSyncExpenses/Models/Operations/ListConnectionsResponse.cs -CodatSyncExpenses/Models/Operations/UnlinkConnectionRequestBody.cs +CodatSyncExpenses/Models/Operations/UnlinkConnectionUpdateConnection.cs CodatSyncExpenses/Models/Operations/UnlinkConnectionRequest.cs CodatSyncExpenses/Models/Operations/UnlinkConnectionResponse.cs CodatSyncExpenses/Models/Operations/CreateCustomerRequest.cs @@ -222,7 +224,7 @@ docs/models/operations/GetConnectionRequest.md docs/models/operations/GetConnectionResponse.md docs/models/operations/ListConnectionsRequest.md docs/models/operations/ListConnectionsResponse.md -docs/models/operations/UnlinkConnectionRequestBody.md +docs/models/operations/UnlinkConnectionUpdateConnection.md docs/models/operations/UnlinkConnectionRequest.md docs/models/operations/UnlinkConnectionResponse.md docs/models/operations/CreateCustomerRequest.md diff --git a/sync-for-expenses/gen.yaml b/sync-for-expenses/gen.yaml index b53b69cdd..f5dcd88ac 100644 --- a/sync-for-expenses/gen.yaml +++ b/sync-for-expenses/gen.yaml @@ -1,17 +1,25 @@ configVersion: 1.0.0 management: - docChecksum: 853aebc76021ec17db9b1abb7a33f340 - docVersion: 2.1.0 - speakeasyVersion: 1.53.0 - generationVersion: 2.58.0 + docChecksum: 4a5e3fac2ddbbd42096c049f64dc15ca + docVersion: prealpha + speakeasyVersion: 1.82.5 + generationVersion: 2.108.3 generation: sdkClassName: Codat.Sync.Expenses singleTagPerOp: false telemetryEnabled: true +features: + csharp: + core: 2.85.6 + deprecations: 2.81.1 + examples: 2.81.2 + globalSecurity: 2.81.1 + globalServerURLs: 2.82.0 + nameOverrides: 2.81.1 csharp: - version: 0.4.0 + version: 0.5.0 author: Codat - dotnetVersion: net6.0 description: Push expenses to accounting platforms. + dotnetVersion: net6.0 maxMethodParams: 0 packageName: Codat.Sync.Expenses