Skip to content

Commit

Permalink
Fix: Correct GetProductsResponse Take 2
Browse files Browse the repository at this point in the history
It works this time..
  • Loading branch information
Chizaruu committed Dec 5, 2023
1 parent 518a6a2 commit 46f73a8
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions Models/General/GetProductsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@

namespace FlipPayApiLibrary.Models.General;

public interface IProductInfo{ }

public record GetProductsResponse(
[property: JsonPropertyName("products")] List<IProductInfo>? Products
[property: JsonPropertyName("products")] List<ProductInfo>? Products
);

public record ProductDetails(
[property: JsonPropertyName("productId")] string ProductId,
[property: JsonPropertyName("minAmount")] decimal MinAmount,
[property: JsonPropertyName("maxAmount")] decimal MaxAmount
) : IProductInfo;

public record MerchantFacilityInfo(
[property: JsonPropertyName("merchantFacility")] bool MerchantFacility
) : IProductInfo;
public record ProductInfo(
[property: JsonPropertyName("productId")] string? ProductId,
[property: JsonPropertyName("minAmount")] decimal? MinAmount,
[property: JsonPropertyName("maxAmount")] decimal? MaxAmount,
[property: JsonPropertyName("merchantFacility")] bool? MerchantFacility
);

0 comments on commit 46f73a8

Please sign in to comment.