Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

Expose BasicListOptions.Populate(...) to allow use outside the library #169

Merged
merged 1 commit into from
Jul 10, 2023
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
7 changes: 6 additions & 1 deletion src/FaluSdk/Core/BasicListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ public record BasicListOptions
/// <summary>Range filter options for <see cref="IHasUpdated.Updated"/> property.</summary>
public RangeFilteringOptions<DateTimeOffset>? Updated { get; set; }

internal virtual void Populate(QueryValues values)
/// <summary>Populate the values into the <see cref="QueryValues"/> instance.</summary>
/// <param name="values">The <see cref="QueryValues"/> to be populated.</param>
/// <exception cref="ArgumentNullException">
/// <paramref name="values"/> is <see langword="null"/>
/// </exception>
protected internal virtual void Populate(QueryValues values)
{
if (values is null) throw new ArgumentNullException(nameof(values));

Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/Core/BasicListOptionsWithMoney.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public record BasicListOptionsWithMoney : BasicListOptions, IHasCurrency
public RangeFilteringOptions<long>? Amount { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("currency", Currency)
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/Customers/CustomersListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public record CustomersListOptions : BasicListOptions
public string? Email { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("email", Email);
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/Events/EventsListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public record EventsListOptions : BasicListOptions
public List<string>? Type { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("type", Type);
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/FileLinks/FileLinksListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public record FileLinksListOptions : BasicListOptions
public bool? Expired { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("file", File)
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/Files/FilesListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public record FilesListOptions : BasicListOptions
public List<string>? Purpose { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("purpose", Purpose);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public record IdentityVerificationReportsListOptions : BasicListOptions
public string? Verification { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("verification", Verification);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public record IdentityVerificationsListOptions : BasicListOptions
public string? Customer { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("status", Status)
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/MessageBatches/MessageBatchesListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public record MessageBatchesListOptions : BasicListOptions
public string? Stream { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("stream", Stream);
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/MessageStreams/MessageStreamsListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public record MessageStreamsListOptions : BasicListOptions
public List<string>? Type { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("type", Type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public record MessageSuppressionsListOptions : BasicListOptions
public string? To { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("stream", Stream)
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/Messages/MessagesListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public record MessagesListOptions : BasicListOptions
public string? Customer { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("stream", Stream)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public record PaymentAuthorizationsListOptions : BasicListOptionsWithMoney
public bool? Approved { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("status", Status)
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/PaymentRefunds/PaymentRefundsListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public record PaymentRefundsListOptions : BasicListOptionsWithMoney
public string? Customer { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("status", Status)
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/Payments/PaymentsListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public record PaymentsListOptions : BasicListOptionsWithMoney
public string? Customer { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("status", Status)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public record TransferReversalsListOptions : BasicListOptionsWithMoney
public string? Customer { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("status", Status)
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/Transfers/TransfersListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public record TransfersListOptions : BasicListOptionsWithMoney
public string? Customer { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("status", Status)
Expand Down
2 changes: 1 addition & 1 deletion src/FaluSdk/Webhooks/WebhookEndpointsListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public record WebhookEndpointsListOptions : BasicListOptions
public List<string>? Status { get; set; }

/// <inheritdoc/>
internal override void Populate(QueryValues values)
protected internal override void Populate(QueryValues values)
{
base.Populate(values);
values.Add("status", Status);
Expand Down