Skip to content

Commit

Permalink
INVD-3619 added Balances.AddedCreditNotes property
Browse files Browse the repository at this point in the history
  • Loading branch information
andriy-invoiced committed Aug 22, 2023
1 parent 5859097 commit 5673ee9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions invoicedapi.tests/Entities/CustomerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ public void TestGetBalance()
'balance': 100
}
],
'open_credit_notes': 200,
'past_due': false,
'total_outstanding': 470
}";
Expand All @@ -1058,6 +1059,7 @@ public void TestGetBalance()
var customer = CreateDefaultCustomer(client);
var response = customer.GetBalance();

Assert.True(response.OpenCreditNotes == 200);
Assert.True(response.AvailableCredits == 50);
Assert.True(response.History.Count == 2);
}
Expand All @@ -1076,6 +1078,7 @@ public async Task TestGetBalanceAsync()
'balance': 100
}
],
'open_credit_notes': 200,
'past_due': false,
'total_outstanding': 470
}";
Expand All @@ -1095,6 +1098,7 @@ public async Task TestGetBalanceAsync()
var response = await customer.GetBalanceAsync();

Assert.True(response.AvailableCredits == 50);
Assert.True(response.OpenCreditNotes == 200);
Assert.True(response.History.Count == 2);
}

Expand Down
2 changes: 2 additions & 0 deletions invoicedapi/Entities/Balance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class Balance : AbstractItem

[JsonProperty("due_now")] public double? DueNow { get; set; }

[JsonProperty("open_credit_notes")] public double? OpenCreditNotes { get; set; }

protected override string EntityId()
{
return "Balance";
Expand Down

0 comments on commit 5673ee9

Please sign in to comment.