30 lines
1017 B
C#
30 lines
1017 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace FinlyticCore.Models.TradeRepublic;
|
|
|
|
public record TradeRepublicFilter(
|
|
[property: JsonPropertyName("key")] string Key,
|
|
[property: JsonPropertyName("value")] string Value
|
|
);
|
|
|
|
public record TradeRepublicSearchData(
|
|
[property: JsonPropertyName("q")] string Query = "",
|
|
[property: JsonPropertyName("page")] int Page = 1,
|
|
[property: JsonPropertyName("pageSize")] int PageSize = 50,
|
|
IReadOnlyList<TradeRepublicFilter>? Filter = null
|
|
)
|
|
{
|
|
[JsonPropertyName("filter")]
|
|
public IReadOnlyList<TradeRepublicFilter> Filter { get; init; } = Filter ?? Array.Empty<TradeRepublicFilter>();
|
|
}
|
|
|
|
public record TradeRepublicSearchRequest(
|
|
[property: JsonPropertyName("data")] TradeRepublicSearchData Data,
|
|
[property: JsonPropertyName("type")] string Type = "neonSearch",
|
|
TradeRepublicHeaders? Headers = null
|
|
)
|
|
{
|
|
[JsonPropertyName("__headers")]
|
|
public TradeRepublicHeaders Headers { get; init; } = Headers ?? new TradeRepublicHeaders();
|
|
}
|