Skip to content

Commit

Permalink
Release 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jun 19, 2024
1 parent 9de0c76 commit 02ed9cd
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 13 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", "{758C2339-4466-42A3-B3D9-2821FD9F84AC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mercoa.Client", "Mercoa.Client\Mercoa.Client.csproj", "{BC153F5D-14F0-4509-B2A1-5B9AA242F6CB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mercoa.Client.Test", "Mercoa.Client.Test\Mercoa.Client.Test.csproj", "{F2BBED25-0EE5-4D4C-9807-170C23BB66BE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mercoa.Client.Test", "Mercoa.Client.Test\Mercoa.Client.Test.csproj", "{D7AB86F9-B306-425C-BE18-7937D748FEDB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -16,13 +16,13 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{758C2339-4466-42A3-B3D9-2821FD9F84AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{758C2339-4466-42A3-B3D9-2821FD9F84AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{758C2339-4466-42A3-B3D9-2821FD9F84AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{758C2339-4466-42A3-B3D9-2821FD9F84AC}.Release|Any CPU.Build.0 = Release|Any CPU
{F2BBED25-0EE5-4D4C-9807-170C23BB66BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2BBED25-0EE5-4D4C-9807-170C23BB66BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2BBED25-0EE5-4D4C-9807-170C23BB66BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2BBED25-0EE5-4D4C-9807-170C23BB66BE}.Release|Any CPU.Build.0 = Release|Any CPU
{BC153F5D-14F0-4509-B2A1-5B9AA242F6CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC153F5D-14F0-4509-B2A1-5B9AA242F6CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC153F5D-14F0-4509-B2A1-5B9AA242F6CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC153F5D-14F0-4509-B2A1-5B9AA242F6CB}.Release|Any CPU.Build.0 = Release|Any CPU
{D7AB86F9-B306-425C-BE18-7937D748FEDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7AB86F9-B306-425C-BE18-7937D748FEDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7AB86F9-B306-425C-BE18-7937D748FEDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7AB86F9-B306-425C-BE18-7937D748FEDB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion src/Mercoa.Client/Entity/EntityClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public async Task<EntityResponse> UpdateAsync(string entityId, EntityUpdateReque
}

/// <summary>
/// Will archive the entity. This action cannot be undone, and the entity will no longer be available for use.
/// Will archive the entity. This action cannot be undone, and the entity will no longer be available for use. The foreignId on the entity will be cleared as well.
/// </summary>
public async void DeleteAsync(string entityId)
{
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;net5.0;net4.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<NuGetAudit>false</NuGetAudit>
<Version>0.4.0</Version>
<Version>0.4.1</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/mercoa-finance/csharp</PackageProjectUrl>
</PropertyGroup>
Expand Down
5 changes: 4 additions & 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", "0.4.0" },
{ "X-Fern-SDK-Version", "0.4.1" },
},
clientOptions ?? new ClientOptions()
);
Expand All @@ -36,6 +36,7 @@ public Mercoa(string token = null, ClientOptions clientOptions = null)
Ocr = new OcrClient(_client);
OrganizationTypes = new OrganizationTypesClient(_client);
PaymentMethodTypes = new PaymentMethodTypesClient(_client);
Webhooks = new WebhooksClient(_client);
}

public EntityClient Entity { get; }
Expand Down Expand Up @@ -64,6 +65,8 @@ public Mercoa(string token = null, ClientOptions clientOptions = null)

public PaymentMethodTypesClient PaymentMethodTypes { get; }

public WebhooksClient Webhooks { get; }

private string GetFromEnvironmentOrThrow(string env, string message)
{
var value = Environment.GetEnvironmentVariable(env);
Expand Down
17 changes: 17 additions & 0 deletions src/Mercoa.Client/Webhooks/Types/CounterpartyWebhook.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Text.Json.Serialization;

#nullable enable

namespace Mercoa.Client;

public class CounterpartyWebhook
{
[JsonPropertyName("eventType")]
public string EventType { get; init; }

[JsonPropertyName("payeeId")]
public string PayeeId { get; init; }

[JsonPropertyName("payorId")]
public string PayorId { get; init; }
}
15 changes: 15 additions & 0 deletions src/Mercoa.Client/Webhooks/Types/EntityWebhook.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
using Mercoa.Client;

#nullable enable

namespace Mercoa.Client;

public class EntityWebhook
{
[JsonPropertyName("eventType")]
public string EventType { get; init; }

[JsonPropertyName("entity")]
public EntityResponse Entity { get; init; }
}
24 changes: 24 additions & 0 deletions src/Mercoa.Client/Webhooks/Types/InvoiceEmailWebhook.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System.Text.Json.Serialization;
using Mercoa.Client;

#nullable enable

namespace Mercoa.Client;

public class InvoiceEmailWebhook
{
[JsonPropertyName("eventType")]
public string EventType { get; init; }

/// <summary>
/// If an invoice was created from the email, this will be present.
/// </summary>
[JsonPropertyName("invoice")]
public InvoiceResponse? Invoice { get; init; }

/// <summary>
/// If an existing invoice already exists for the email, this will be present.
/// </summary>
[JsonPropertyName("existingInvoiceId")]
public string? ExistingInvoiceId { get; init; }
}
21 changes: 21 additions & 0 deletions src/Mercoa.Client/Webhooks/Types/InvoiceStatusChangedWebhook.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.Text.Json.Serialization;
using Mercoa.Client;

#nullable enable

namespace Mercoa.Client;

public class InvoiceStatusChangedWebhook
{
[JsonPropertyName("newStatus")]
public string NewStatus { get; init; }

[JsonPropertyName("previousStatus")]
public string PreviousStatus { get; init; }

[JsonPropertyName("eventType")]
public string EventType { get; init; }

[JsonPropertyName("invoice")]
public InvoiceResponse Invoice { get; init; }
}
15 changes: 15 additions & 0 deletions src/Mercoa.Client/Webhooks/Types/InvoiceWebhook.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
using Mercoa.Client;

#nullable enable

namespace Mercoa.Client;

public class InvoiceWebhook
{
[JsonPropertyName("eventType")]
public string EventType { get; init; }

[JsonPropertyName("invoice")]
public InvoiceResponse Invoice { get; init; }
}
18 changes: 18 additions & 0 deletions src/Mercoa.Client/Webhooks/Types/PaymentMethodWebhook.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Text.Json.Serialization;
using Mercoa.Client;

#nullable enable

namespace Mercoa.Client;

public class PaymentMethodWebhook
{
[JsonPropertyName("eventType")]
public string EventType { get; init; }

[JsonPropertyName("entityId")]
public string EntityId { get; init; }

[JsonPropertyName("paymentMethod")]
public PaymentMethodResponse PaymentMethod { get; init; }
}
15 changes: 15 additions & 0 deletions src/Mercoa.Client/Webhooks/WebhooksClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Mercoa.Client;

#nullable enable

namespace Mercoa.Client;

public class WebhooksClient
{
private RawClient _client;

public WebhooksClient(RawClient client)
{
_client = client;
}
}

0 comments on commit 02ed9cd

Please sign in to comment.