Skip to content

Commit

Permalink
Enhance: Add Repayment Details to DirectPostResponse Model
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
Chizaruu committed Dec 5, 2023
1 parent 7b0fc51 commit 24829b9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
7 changes: 3 additions & 4 deletions FlipPayApiLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
<PackageTags>library; flippay; falcon; fes; api</PackageTags>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<Version>1.1.0</Version>
<PackageReleaseNotes>See this Pull Request for changes
https://github.com/FalconEyeSolutions/FlipPayWebClient/pull/1
</PackageReleaseNotes>
<Version>1.1.1</Version>
<PackageReleaseNotes>See this commit for changes
https://github.com/FalconEyeSolutions/FlipPayWebClient/commit/7b0fc5147d5e9b22ea321ee874e2b0eb18e60b1a</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
Expand Down
20 changes: 19 additions & 1 deletion Models/Direct/DirectPostResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RepaymentOption>? 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
);

0 comments on commit 24829b9

Please sign in to comment.