From 24829b924c5ee34f793e78d7f49566b42daf5c69 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun Date: Tue, 5 Dec 2023 18:06:56 +1100 Subject: [PATCH] Enhance: Add Repayment Details to DirectPostResponse Model - Updated DirectPostResponse to include new 'message' and 'repayment' fields. - Created RepaymentDetails record to capture repayment information. - Created RepaymentOption record for detailed repayment options. - Adjusted JSON property names to match the updated API response structure. --- FlipPayApiLibrary.csproj | 7 +++---- Models/Direct/DirectPostResponse.cs | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/FlipPayApiLibrary.csproj b/FlipPayApiLibrary.csproj index 607abc8..331239d 100644 --- a/FlipPayApiLibrary.csproj +++ b/FlipPayApiLibrary.csproj @@ -17,10 +17,9 @@ library; flippay; falcon; fes; api LICENSE.txt False - 1.1.0 - See this Pull Request for changes -https://github.com/FalconEyeSolutions/FlipPayWebClient/pull/1 - + 1.1.1 + See this commit for changes +https://github.com/FalconEyeSolutions/FlipPayWebClient/commit/7b0fc5147d5e9b22ea321ee874e2b0eb18e60b1a diff --git a/Models/Direct/DirectPostResponse.cs b/Models/Direct/DirectPostResponse.cs index 50aeaee..2afdba7 100644 --- a/Models/Direct/DirectPostResponse.cs +++ b/Models/Direct/DirectPostResponse.cs @@ -5,5 +5,23 @@ namespace FlipPayApiLibrary.Models.Direct; public record DirectPostResponse( [property: JsonPropertyName("prId")] string? PrId, [property: JsonPropertyName("prUrl")] string? PrUrl, - [property: JsonPropertyName("status")] string? Status + [property: JsonPropertyName("status")] string? Status, + [property: JsonPropertyName("message1")] string? MessageOne, + [property: JsonPropertyName("message2")] string? MessageTwo, + [property: JsonPropertyName("repayment")] RepaymentDetails? Repayment +); + +public record RepaymentDetails( + [property: JsonPropertyName("reference")] string? Reference, + [property: JsonPropertyName("contactEmail")] string? ContactEmail, + [property: JsonPropertyName("contactPhone")] string? ContactPhone, + [property: JsonPropertyName("options")] List? Options +); + +public record RepaymentOption( + [property: JsonPropertyName("type")] string? Type, + [property: JsonPropertyName("accountName")] string? AccountName, + [property: JsonPropertyName("accountBsb")] string? AccountBsb, + [property: JsonPropertyName("accountNumber")] string? AccountNumber, + [property: JsonPropertyName("payID")] string? PayId );