Class LoanSetOutcome
The loan a LoanSet created, read from its metadata - of a validated transaction, or of a
simulate run (PreviewLoanSet(IXrplClient, LoanSet, CancellationToken)).
Inheritance
Namespace: Xrpl.Sugar
Assembly: Xrpl.dll
Syntax
public sealed class LoanSetOutcome
Remarks
Amounts are in the loan asset's own unit (drops for XRP), as the Loan fields are.
The totals cover the regular schedule; late, full and overpayments change them.
Properties
| Edit this page View SourceAsset
The loan asset.
Declaration
public Common.IssuedCurrency Asset { get; init; }
Property Value
| Type | Description |
|---|---|
| Common.IssuedCurrency |
BorrowerReceives
What reached the borrower: the principal less LoanOriginationFee, the transaction fee excluded.
Declaration
public decimal BorrowerReceives { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
InterestTotal
Interest over the schedule, management fee included: TotalValueOutstanding less PrincipalOutstanding.
Declaration
public decimal InterestTotal { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
Loan
The Loan as created: PeriodicPayment, TotalValueOutstanding and the rest.
Declaration
public LOLoan Loan { get; init; }
Property Value
| Type | Description |
|---|---|
| LOLoan |
LoanId
The new loan's ledger index.
Declaration
public string LoanId { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
PaidFromVault
What left the vault: the principal.
Declaration
public decimal PaidFromVault { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
ServiceFeesTotal
LoanServiceFee times the number of payments.
Declaration
public decimal ServiceFeesTotal { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
TotalToRepay
What the borrower repays over the regular schedule: TotalValueOutstanding plus ServiceFeesTotal.
Declaration
public decimal TotalToRepay { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
Methods
| Edit this page View SourceFromMetadata(ILoanSet, ITransactionMetadata)
Reads the loan transaction created from its metadata.
Declaration
public static LoanSetOutcome FromMetadata(ILoanSet transaction, ITransactionMetadata metadata)
Parameters
| Type | Name | Description |
|---|---|---|
| ILoanSet | transaction | |
| ITransactionMetadata | metadata |
Returns
| Type | Description |
|---|---|
| LoanSetOutcome |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | The metadata creates no loan, or modifies no vault. |