Skip to content

Commit

Permalink
Release v0.3.39
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jun 4, 2024
1 parent 4746661 commit 6617bc0
Show file tree
Hide file tree
Showing 17 changed files with 108 additions and 14 deletions.
20 changes: 10 additions & 10 deletions src/Mercoa.Client.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mercoa.Client", "Mercoa.Client\Mercoa.Client.csproj", "{EC873A1C-C5D6-4DA8-A16E-72350EFA4E82}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mercoa.Client", "Mercoa.Client\Mercoa.Client.csproj", "{7C9210B3-D407-49E2-A975-4D0F81660364}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mercoa.Client.Test", "Mercoa.Client.Test\Mercoa.Client.Test.csproj", "{57C6771A-DF68-48BA-B583-99AA311726B1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mercoa.Client.Test", "Mercoa.Client.Test\Mercoa.Client.Test.csproj", "{A93E5378-6554-488E-A24C-906EEC952AF9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -16,13 +16,13 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EC873A1C-C5D6-4DA8-A16E-72350EFA4E82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC873A1C-C5D6-4DA8-A16E-72350EFA4E82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC873A1C-C5D6-4DA8-A16E-72350EFA4E82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC873A1C-C5D6-4DA8-A16E-72350EFA4E82}.Release|Any CPU.Build.0 = Release|Any CPU
{57C6771A-DF68-48BA-B583-99AA311726B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{57C6771A-DF68-48BA-B583-99AA311726B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57C6771A-DF68-48BA-B583-99AA311726B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57C6771A-DF68-48BA-B583-99AA311726B1}.Release|Any CPU.Build.0 = Release|Any CPU
{7C9210B3-D407-49E2-A975-4D0F81660364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C9210B3-D407-49E2-A975-4D0F81660364}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C9210B3-D407-49E2-A975-4D0F81660364}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C9210B3-D407-49E2-A975-4D0F81660364}.Release|Any CPU.Build.0 = Release|Any CPU
{A93E5378-6554-488E-A24C-906EEC952AF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A93E5378-6554-488E-A24C-906EEC952AF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A93E5378-6554-488E-A24C-906EEC952AF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A93E5378-6554-488E-A24C-906EEC952AF9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,29 @@ public ExternalAccountingSystemClient(RawClient client)
}

/// <summary>
/// Create/Link an entity to an external accounting system like Codat or Rutter
/// Get the external accounting system connected to an entity
/// </summary>
public async Task<ExternalAccountingSystemCompanyResponse> GetAsync()
{
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
{
Method = HttpMethod.Get,
Path = "/external-accounting-system"
}
);
string responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode >= 200 && response.StatusCode < 400)
{
return JsonSerializer.Deserialize<ExternalAccountingSystemCompanyResponse>(
responseBody
);
}
throw new Exception(responseBody);
}

/// <summary>
/// Create/Link an entity to an external accounting system like Codat or Rutter. If the entity is already linked to an external accounting system, this will return the existing connection.
/// </summary>
public async Task<ExternalAccountingSystemCompanyResponse> CreateAsync(
ExternalAccountingSystemCompanyCreationRequest request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class SyncExternalSystemRequest
public SyncType? Vendors { get; init; }

/// <summary>
/// Sync bills from external accounting system. Default is to not sync bills.
/// Sync bills from external accounting system. Default is to not sync bills. Invoices that already exist in both systems will not be updated, only new invoices not present in the other system will be created.
/// </summary>
public SyncType? Bills { get; init; }

Expand Down
2 changes: 1 addition & 1 deletion src/Mercoa.Client/Mercoa.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<NuGetAudit>false</NuGetAudit>
<Version>v0.3.38</Version>
<Version>v0.3.39</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/mercoa-finance/csharp</PackageProjectUrl>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Mercoa.Client/Mercoa.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Mercoa(string token = null, ClientOptions clientOptions = null)
{ "Authorization", $"Bearer {token}" },
{ "X-Fern-Language", "C#" },
{ "X-Fern-SDK-Name", "Mercoa.Client" },
{ "X-Fern-SDK-Version", "v0.3.38" },
{ "X-Fern-SDK-Version", "v0.3.39" },
},
clientOptions ?? new ClientOptions()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@ public class BankAccountRequest
/// </summary>
[JsonPropertyName("defaultDestination")]
public bool? DefaultDestination { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public class BankAccountResponse
[JsonPropertyName("supportedCurrencies")]
public IEnumerable<CurrencyCode> SupportedCurrencies { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }

[JsonPropertyName("createdAt")]
public DateTime CreatedAt { get; init; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ public class BankAccountUpdateRequest
/// </summary>
[JsonPropertyName("defaultDestination")]
public bool? DefaultDestination { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }
}
6 changes: 6 additions & 0 deletions src/Mercoa.Client/PaymentMethodTypes/Types/CardRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ public class CardRequest
/// </summary>
[JsonPropertyName("defaultDestination")]
public bool? DefaultDestination { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }
}
6 changes: 6 additions & 0 deletions src/Mercoa.Client/PaymentMethodTypes/Types/CardResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ public class CardResponse
[JsonPropertyName("supportedCurrencies")]
public IEnumerable<CurrencyCode> SupportedCurrencies { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }

[JsonPropertyName("createdAt")]
public DateTime CreatedAt { get; init; }

Expand Down
6 changes: 6 additions & 0 deletions src/Mercoa.Client/PaymentMethodTypes/Types/CheckRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ public class CheckRequest
/// </summary>
[JsonPropertyName("defaultDestination")]
public bool? DefaultDestination { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }
}
6 changes: 6 additions & 0 deletions src/Mercoa.Client/PaymentMethodTypes/Types/CheckResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ public class CheckResponse
[JsonPropertyName("supportedCurrencies")]
public IEnumerable<CurrencyCode> SupportedCurrencies { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }

[JsonPropertyName("createdAt")]
public DateTime CreatedAt { get; init; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ public class CustomPaymentMethodRequest
/// </summary>
[JsonPropertyName("defaultDestination")]
public bool? DefaultDestination { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ public class CustomPaymentMethodResponse
[JsonPropertyName("supportedCurrencies")]
public IEnumerable<CurrencyCode> SupportedCurrencies { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }

[JsonPropertyName("createdAt")]
public DateTime CreatedAt { get; init; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ public class CustomPaymentMethodUpdateRequest
/// </summary>
[JsonPropertyName("defaultDestination")]
public bool? DefaultDestination { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ public class PaymentMethodBaseRequest
/// </summary>
[JsonPropertyName("defaultDestination")]
public bool? DefaultDestination { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public class PaymentMethodBaseResponse
[JsonPropertyName("supportedCurrencies")]
public IEnumerable<CurrencyCode> SupportedCurrencies { get; init; }

/// <summary>
/// ID for this payment method in the external accounting system (e.g Rutter or Codat)
/// </summary>
[JsonPropertyName("externalAccountingSystemId")]
public string? ExternalAccountingSystemId { get; init; }

[JsonPropertyName("createdAt")]
public DateTime CreatedAt { get; init; }

Expand Down

0 comments on commit 6617bc0

Please sign in to comment.