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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/Merge.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}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{F2B96F3A-F41D-4505-8135-B9C6ECEF44F0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{07D9AD3E-9BCE-488C-A44A-C0A3C8310C24}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{F6A9FBE2-C5A7-4E9E-BD14-E83357CC258B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{D045D7B7-4D24-4F41-A9C7-DE88A421B6FC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -16,13 +16,13 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F2B96F3A-F41D-4505-8135-B9C6ECEF44F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2B96F3A-F41D-4505-8135-B9C6ECEF44F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2B96F3A-F41D-4505-8135-B9C6ECEF44F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2B96F3A-F41D-4505-8135-B9C6ECEF44F0}.Release|Any CPU.Build.0 = Release|Any CPU
{F6A9FBE2-C5A7-4E9E-BD14-E83357CC258B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6A9FBE2-C5A7-4E9E-BD14-E83357CC258B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6A9FBE2-C5A7-4E9E-BD14-E83357CC258B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F6A9FBE2-C5A7-4E9E-BD14-E83357CC258B}.Release|Any CPU.Build.0 = Release|Any CPU
{07D9AD3E-9BCE-488C-A44A-C0A3C8310C24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07D9AD3E-9BCE-488C-A44A-C0A3C8310C24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07D9AD3E-9BCE-488C-A44A-C0A3C8310C24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07D9AD3E-9BCE-488C-A44A-C0A3C8310C24}.Release|Any CPU.Build.0 = Release|Any CPU
{D045D7B7-4D24-4F41-A9C7-DE88A421B6FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D045D7B7-4D24-4F41-A9C7-DE88A421B6FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D045D7B7-4D24-4F41-A9C7-DE88A421B6FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D045D7B7-4D24-4F41-A9C7-DE88A421B6FC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
using System.Text.Json.Serialization;

namespace Merge.Client.Accounting;

public class CreateFieldMappingRequest
{
/// <summary>
/// The name of the target field you want this remote field to map to.
/// </summary>
[JsonPropertyName("target_field_name")]
public string TargetFieldName { get; init; }

/// <summary>
/// The description of the target field you want this remote field to map to.
/// </summary>
[JsonPropertyName("target_field_description")]
public string TargetFieldDescription { get; init; }

/// <summary>
/// The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
/// </summary>
[JsonPropertyName("remote_field_traversal_path")]
public List<object> RemoteFieldTraversalPath { get; init; }

/// <summary>
/// The method of the remote endpoint where the remote field is coming from.
/// </summary>
[JsonPropertyName("remote_method")]
public string RemoteMethod { get; init; }

/// <summary>
/// The path of the remote endpoint where the remote field is coming from.
/// </summary>
[JsonPropertyName("remote_url_path")]
public string RemoteUrlPath { get; init; }

/// <summary>
/// The name of the Common Model that the remote field corresponds to in a given category.
/// </summary>
[JsonPropertyName("common_model_name")]
public string CommonModelName { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
using System.Text.Json.Serialization;

namespace Merge.Client.Accounting;

public class PatchedEditFieldMappingRequest
{
/// <summary>
/// The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
/// </summary>
[JsonPropertyName("remote_field_traversal_path")]
public List<object>? RemoteFieldTraversalPath { get; init; }

/// <summary>
/// The method of the remote endpoint where the remote field is coming from.
/// </summary>
[JsonPropertyName("remote_method")]
public string? RemoteMethod { get; init; }

/// <summary>
/// The path of the remote endpoint where the remote field is coming from.
/// </summary>
[JsonPropertyName("remote_url_path")]
public string? RemoteUrlPath { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System.Text.Json.Serialization;

namespace Merge.Client.Accounting;

public class GenerateRemoteKeyRequest
{
/// <summary>
/// The name of the remote key
/// </summary>
[JsonPropertyName("name")]
public string Name { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Text.Json.Serialization;
using Merge.Client.Accounting;

namespace Merge.Client.Accounting;
Expand All @@ -7,46 +8,55 @@ public class EndUserDetailsRequest
/// <summary>
/// Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
/// </summary>
[JsonPropertyName("end_user_email_address")]
public string EndUserEmailAddress { get; init; }

/// <summary>
/// Your end user's organization.
/// </summary>
[JsonPropertyName("end_user_organization_name")]
public string EndUserOrganizationName { get; init; }

/// <summary>
/// This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
/// </summary>
[JsonPropertyName("end_user_origin_id")]
public string EndUserOriginId { get; init; }

/// <summary>
/// The integration categories to show in Merge Link.
/// </summary>
[JsonPropertyName("categories")]
public List<CategoriesEnum> Categories { get; init; }

/// <summary>
/// The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
/// </summary>
[JsonPropertyName("integration")]
public string? Integration { get; init; }

/// <summary>
/// An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
/// </summary>
[JsonPropertyName("link_expiry_mins")]
public int? LinkExpiryMins { get; init; }

/// <summary>
/// Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
/// </summary>
[JsonPropertyName("should_create_magic_link_url")]
public bool? ShouldCreateMagicLinkUrl { get; init; }

/// <summary>
/// An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
/// </summary>
[JsonPropertyName("common_models")]
public List<CommonModelScopesBodyRequest>? CommonModels { get; init; }

/// <summary>
/// When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
/// </summary>
[JsonPropertyName("category_common_model_scopes")]
public Dictionary<
string,
List<IndividualCommonModelScopeDeserializerRequest>?
Expand All @@ -55,10 +65,12 @@ public Dictionary<
/// <summary>
/// The language code for the language to localize Merge Link to.
/// </summary>
[JsonPropertyName("language")]
public string? Language { get; init; }

/// <summary>
/// A JSON object containing integration-specific configuration options.
/// </summary>
[JsonPropertyName("integration_specific_config")]
public Dictionary<string, object>? IntegrationSpecificConfig { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System.Text.Json.Serialization;

namespace Merge.Client.Accounting;

public class RemoteKeyForRegenerationRequest
{
/// <summary>
/// The name of the remote key
/// </summary>
[JsonPropertyName("name")]
public string Name { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Text.Json.Serialization;
using Merge.Client.Accounting;

namespace Merge.Client.Accounting;
Expand All @@ -7,5 +8,6 @@ public class LinkedAccountCommonModelScopeDeserializerRequest
/// <summary>
/// The common models you want to update the scopes for
/// </summary>
[JsonPropertyName("common_models")]
public List<IndividualCommonModelScopeDeserializerRequest> CommonModels { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
using System.Text.Json.Serialization;

namespace Merge.Client.Accounting;

public class WebhookReceiverRequest
{
[JsonPropertyName("event")]
public string Event { get; init; }

[JsonPropertyName("is_active")]
public bool IsActive { get; init; }

[JsonPropertyName("key")]
public string? Key { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
using System.Text.Json.Serialization;
using Merge.Client.Ats;

namespace Merge.Client.Ats;

public class IgnoreCommonModelRequest
{
[JsonPropertyName("reason")]
public ReasonEnum Reason { get; init; }

[JsonPropertyName("message")]
public string? Message { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
using System.Text.Json.Serialization;

namespace Merge.Client.Ats;

public class CreateFieldMappingRequest
{
/// <summary>
/// The name of the target field you want this remote field to map to.
/// </summary>
[JsonPropertyName("target_field_name")]
public string TargetFieldName { get; init; }

/// <summary>
/// The description of the target field you want this remote field to map to.
/// </summary>
[JsonPropertyName("target_field_description")]
public string TargetFieldDescription { get; init; }

/// <summary>
/// The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
/// </summary>
[JsonPropertyName("remote_field_traversal_path")]
public List<object> RemoteFieldTraversalPath { get; init; }

/// <summary>
/// The method of the remote endpoint where the remote field is coming from.
/// </summary>
[JsonPropertyName("remote_method")]
public string RemoteMethod { get; init; }

/// <summary>
/// The path of the remote endpoint where the remote field is coming from.
/// </summary>
[JsonPropertyName("remote_url_path")]
public string RemoteUrlPath { get; init; }

/// <summary>
/// The name of the Common Model that the remote field corresponds to in a given category.
/// </summary>
[JsonPropertyName("common_model_name")]
public string CommonModelName { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
using System.Text.Json.Serialization;

namespace Merge.Client.Ats;

public class PatchedEditFieldMappingRequest
{
/// <summary>
/// The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.
/// </summary>
[JsonPropertyName("remote_field_traversal_path")]
public List<object>? RemoteFieldTraversalPath { get; init; }

/// <summary>
/// The method of the remote endpoint where the remote field is coming from.
/// </summary>
[JsonPropertyName("remote_method")]
public string? RemoteMethod { get; init; }

/// <summary>
/// The path of the remote endpoint where the remote field is coming from.
/// </summary>
[JsonPropertyName("remote_url_path")]
public string? RemoteUrlPath { get; init; }
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System.Text.Json.Serialization;

namespace Merge.Client.Ats;

public class GenerateRemoteKeyRequest
{
/// <summary>
/// The name of the remote key
/// </summary>
[JsonPropertyName("name")]
public string Name { get; init; }
}
12 changes: 12 additions & 0 deletions src/Merge.Client/Ats/LinkToken/requests/EndUserDetailsRequest.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Text.Json.Serialization;
using Merge.Client.Ats;

namespace Merge.Client.Ats;
Expand All @@ -7,46 +8,55 @@ public class EndUserDetailsRequest
/// <summary>
/// Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
/// </summary>
[JsonPropertyName("end_user_email_address")]
public string EndUserEmailAddress { get; init; }

/// <summary>
/// Your end user's organization.
/// </summary>
[JsonPropertyName("end_user_organization_name")]
public string EndUserOrganizationName { get; init; }

/// <summary>
/// This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
/// </summary>
[JsonPropertyName("end_user_origin_id")]
public string EndUserOriginId { get; init; }

/// <summary>
/// The integration categories to show in Merge Link.
/// </summary>
[JsonPropertyName("categories")]
public List<CategoriesEnum> Categories { get; init; }

/// <summary>
/// The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/.
/// </summary>
[JsonPropertyName("integration")]
public string? Integration { get; init; }

/// <summary>
/// An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
/// </summary>
[JsonPropertyName("link_expiry_mins")]
public int? LinkExpiryMins { get; init; }

/// <summary>
/// Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
/// </summary>
[JsonPropertyName("should_create_magic_link_url")]
public bool? ShouldCreateMagicLinkUrl { get; init; }

/// <summary>
/// An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
/// </summary>
[JsonPropertyName("common_models")]
public List<CommonModelScopesBodyRequest>? CommonModels { get; init; }

/// <summary>
/// When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
/// </summary>
[JsonPropertyName("category_common_model_scopes")]
public Dictionary<
string,
List<IndividualCommonModelScopeDeserializerRequest>?
Expand All @@ -55,10 +65,12 @@ public Dictionary<
/// <summary>
/// The language code for the language to localize Merge Link to.
/// </summary>
[JsonPropertyName("language")]
public string? Language { get; init; }

/// <summary>
/// A JSON object containing integration-specific configuration options.
/// </summary>
[JsonPropertyName("integration_specific_config")]
public Dictionary<string, object>? IntegrationSpecificConfig { get; init; }
}
Loading