Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INVD-3619 added Balances.AddedCreditNotes property #26

Merged
merged 1 commit into from
Aug 28, 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
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
Loading