rippled
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
xrpl::ledger_entries::Loan Class Reference

Ledger Entry: Loan. More...

#include <Loan.h>

Inheritance diagram for xrpl::ledger_entries::Loan:
Inheritance graph
[legend]
Collaboration diagram for xrpl::ledger_entries::Loan:
Collaboration graph
[legend]

Public Member Functions

 Loan (std::shared_ptr< SLE const > sle)
 Construct a Loan ledger entry wrapper from an existing SLE object.
 
SF_UINT256::type::value_type getPreviousTxnID () const
 Get sfPreviousTxnID (soeREQUIRED)
 
SF_UINT32::type::value_type getPreviousTxnLgrSeq () const
 Get sfPreviousTxnLgrSeq (soeREQUIRED)
 
SF_UINT64::type::value_type getOwnerNode () const
 Get sfOwnerNode (soeREQUIRED)
 
SF_UINT64::type::value_type getLoanBrokerNode () const
 Get sfLoanBrokerNode (soeREQUIRED)
 
SF_UINT256::type::value_type getLoanBrokerID () const
 Get sfLoanBrokerID (soeREQUIRED)
 
SF_UINT32::type::value_type getLoanSequence () const
 Get sfLoanSequence (soeREQUIRED)
 
SF_ACCOUNT::type::value_type getBorrower () const
 Get sfBorrower (soeREQUIRED)
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getLoanOriginationFee () const
 Get sfLoanOriginationFee (soeDEFAULT)
 
bool hasLoanOriginationFee () const
 Check if sfLoanOriginationFee is present.
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getLoanServiceFee () const
 Get sfLoanServiceFee (soeDEFAULT)
 
bool hasLoanServiceFee () const
 Check if sfLoanServiceFee is present.
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getLatePaymentFee () const
 Get sfLatePaymentFee (soeDEFAULT)
 
bool hasLatePaymentFee () const
 Check if sfLatePaymentFee is present.
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getClosePaymentFee () const
 Get sfClosePaymentFee (soeDEFAULT)
 
bool hasClosePaymentFee () const
 Check if sfClosePaymentFee is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getOverpaymentFee () const
 Get sfOverpaymentFee (soeDEFAULT)
 
bool hasOverpaymentFee () const
 Check if sfOverpaymentFee is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getInterestRate () const
 Get sfInterestRate (soeDEFAULT)
 
bool hasInterestRate () const
 Check if sfInterestRate is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getLateInterestRate () const
 Get sfLateInterestRate (soeDEFAULT)
 
bool hasLateInterestRate () const
 Check if sfLateInterestRate is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getCloseInterestRate () const
 Get sfCloseInterestRate (soeDEFAULT)
 
bool hasCloseInterestRate () const
 Check if sfCloseInterestRate is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getOverpaymentInterestRate () const
 Get sfOverpaymentInterestRate (soeDEFAULT)
 
bool hasOverpaymentInterestRate () const
 Check if sfOverpaymentInterestRate is present.
 
SF_UINT32::type::value_type getStartDate () const
 Get sfStartDate (soeREQUIRED)
 
SF_UINT32::type::value_type getPaymentInterval () const
 Get sfPaymentInterval (soeREQUIRED)
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getGracePeriod () const
 Get sfGracePeriod (soeDEFAULT)
 
bool hasGracePeriod () const
 Check if sfGracePeriod is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getPreviousPaymentDueDate () const
 Get sfPreviousPaymentDueDate (soeDEFAULT)
 
bool hasPreviousPaymentDueDate () const
 Check if sfPreviousPaymentDueDate is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getNextPaymentDueDate () const
 Get sfNextPaymentDueDate (soeDEFAULT)
 
bool hasNextPaymentDueDate () const
 Check if sfNextPaymentDueDate is present.
 
protocol_autogen::Optional< SF_UINT32::type::value_type > getPaymentRemaining () const
 Get sfPaymentRemaining (soeDEFAULT)
 
bool hasPaymentRemaining () const
 Check if sfPaymentRemaining is present.
 
SF_NUMBER::type::value_type getPeriodicPayment () const
 Get sfPeriodicPayment (soeREQUIRED)
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getPrincipalOutstanding () const
 Get sfPrincipalOutstanding (soeDEFAULT)
 
bool hasPrincipalOutstanding () const
 Check if sfPrincipalOutstanding is present.
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getTotalValueOutstanding () const
 Get sfTotalValueOutstanding (soeDEFAULT)
 
bool hasTotalValueOutstanding () const
 Check if sfTotalValueOutstanding is present.
 
protocol_autogen::Optional< SF_NUMBER::type::value_type > getManagementFeeOutstanding () const
 Get sfManagementFeeOutstanding (soeDEFAULT)
 
bool hasManagementFeeOutstanding () const
 Check if sfManagementFeeOutstanding is present.
 
protocol_autogen::Optional< SF_INT32::type::value_type > getLoanScale () const
 Get sfLoanScale (soeDEFAULT)
 
bool hasLoanScale () const
 Check if sfLoanScale is present.
 
bool validate () const
 Validate the ledger entry.
 
LedgerEntryType getType () const
 Get the ledger entry type.
 
uint256 const & getKey () const
 Get the key (index) of this ledger entry.
 
std::optional< uint256getLedgerIndex () const
 Get the ledger index (sfLedgerIndex).
 
bool hasLedgerIndex () const
 Check if the ledger entry has a ledger index.
 
uint16_t getLedgerEntryType () const
 Get the ledger entry type field (sfLedgerEntryType).
 
std::uint32_t getFlags () const
 Get the flags field (sfFlags).
 
std::shared_ptr< SLE const > getSle () const
 Get the underlying SLE object.
 

Static Public Attributes

static constexpr LedgerEntryType entryType = ltLOAN
 

Protected Attributes

std::shared_ptr< SLE const > sle_
 The underlying serialized ledger entry being wrapped.
 

Detailed Description

Ledger Entry: Loan.

Type: ltLOAN (0x0089) RPC Name: loan

Immutable wrapper around SLE providing type-safe field access. Use LoanBuilder to construct new ledger entries.

Definition at line 27 of file Loan.h.

Constructor & Destructor Documentation

◆ Loan()

xrpl::ledger_entries::Loan::Loan ( std::shared_ptr< SLE const >  sle)
explicit

Construct a Loan ledger entry wrapper from an existing SLE object.

Exceptions
std::runtime_errorif the ledger entry type doesn't match.

Definition at line 36 of file Loan.h.

Member Function Documentation

◆ getPreviousTxnID()

SF_UINT256::type::value_type xrpl::ledger_entries::Loan::getPreviousTxnID ( ) const

Get sfPreviousTxnID (soeREQUIRED)

Returns
The field value.

Definition at line 54 of file Loan.h.

◆ getPreviousTxnLgrSeq()

SF_UINT32::type::value_type xrpl::ledger_entries::Loan::getPreviousTxnLgrSeq ( ) const

Get sfPreviousTxnLgrSeq (soeREQUIRED)

Returns
The field value.

Definition at line 65 of file Loan.h.

◆ getOwnerNode()

SF_UINT64::type::value_type xrpl::ledger_entries::Loan::getOwnerNode ( ) const

Get sfOwnerNode (soeREQUIRED)

Returns
The field value.

Definition at line 76 of file Loan.h.

◆ getLoanBrokerNode()

SF_UINT64::type::value_type xrpl::ledger_entries::Loan::getLoanBrokerNode ( ) const

Get sfLoanBrokerNode (soeREQUIRED)

Returns
The field value.

Definition at line 87 of file Loan.h.

◆ getLoanBrokerID()

SF_UINT256::type::value_type xrpl::ledger_entries::Loan::getLoanBrokerID ( ) const

Get sfLoanBrokerID (soeREQUIRED)

Returns
The field value.

Definition at line 98 of file Loan.h.

◆ getLoanSequence()

SF_UINT32::type::value_type xrpl::ledger_entries::Loan::getLoanSequence ( ) const

Get sfLoanSequence (soeREQUIRED)

Returns
The field value.

Definition at line 109 of file Loan.h.

◆ getBorrower()

SF_ACCOUNT::type::value_type xrpl::ledger_entries::Loan::getBorrower ( ) const

Get sfBorrower (soeREQUIRED)

Returns
The field value.

Definition at line 120 of file Loan.h.

◆ getLoanOriginationFee()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::Loan::getLoanOriginationFee ( ) const

Get sfLoanOriginationFee (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 131 of file Loan.h.

◆ hasLoanOriginationFee()

bool xrpl::ledger_entries::Loan::hasLoanOriginationFee ( ) const

Check if sfLoanOriginationFee is present.

Returns
True if the field is present, false otherwise.

Definition at line 144 of file Loan.h.

◆ getLoanServiceFee()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::Loan::getLoanServiceFee ( ) const

Get sfLoanServiceFee (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 155 of file Loan.h.

◆ hasLoanServiceFee()

bool xrpl::ledger_entries::Loan::hasLoanServiceFee ( ) const

Check if sfLoanServiceFee is present.

Returns
True if the field is present, false otherwise.

Definition at line 168 of file Loan.h.

◆ getLatePaymentFee()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::Loan::getLatePaymentFee ( ) const

Get sfLatePaymentFee (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 179 of file Loan.h.

◆ hasLatePaymentFee()

bool xrpl::ledger_entries::Loan::hasLatePaymentFee ( ) const

Check if sfLatePaymentFee is present.

Returns
True if the field is present, false otherwise.

Definition at line 192 of file Loan.h.

◆ getClosePaymentFee()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::Loan::getClosePaymentFee ( ) const

Get sfClosePaymentFee (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 203 of file Loan.h.

◆ hasClosePaymentFee()

bool xrpl::ledger_entries::Loan::hasClosePaymentFee ( ) const

Check if sfClosePaymentFee is present.

Returns
True if the field is present, false otherwise.

Definition at line 216 of file Loan.h.

◆ getOverpaymentFee()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Loan::getOverpaymentFee ( ) const

Get sfOverpaymentFee (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 227 of file Loan.h.

◆ hasOverpaymentFee()

bool xrpl::ledger_entries::Loan::hasOverpaymentFee ( ) const

Check if sfOverpaymentFee is present.

Returns
True if the field is present, false otherwise.

Definition at line 240 of file Loan.h.

◆ getInterestRate()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Loan::getInterestRate ( ) const

Get sfInterestRate (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 251 of file Loan.h.

◆ hasInterestRate()

bool xrpl::ledger_entries::Loan::hasInterestRate ( ) const

Check if sfInterestRate is present.

Returns
True if the field is present, false otherwise.

Definition at line 264 of file Loan.h.

◆ getLateInterestRate()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Loan::getLateInterestRate ( ) const

Get sfLateInterestRate (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 275 of file Loan.h.

◆ hasLateInterestRate()

bool xrpl::ledger_entries::Loan::hasLateInterestRate ( ) const

Check if sfLateInterestRate is present.

Returns
True if the field is present, false otherwise.

Definition at line 288 of file Loan.h.

◆ getCloseInterestRate()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Loan::getCloseInterestRate ( ) const

Get sfCloseInterestRate (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 299 of file Loan.h.

◆ hasCloseInterestRate()

bool xrpl::ledger_entries::Loan::hasCloseInterestRate ( ) const

Check if sfCloseInterestRate is present.

Returns
True if the field is present, false otherwise.

Definition at line 312 of file Loan.h.

◆ getOverpaymentInterestRate()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Loan::getOverpaymentInterestRate ( ) const

Get sfOverpaymentInterestRate (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 323 of file Loan.h.

◆ hasOverpaymentInterestRate()

bool xrpl::ledger_entries::Loan::hasOverpaymentInterestRate ( ) const

Check if sfOverpaymentInterestRate is present.

Returns
True if the field is present, false otherwise.

Definition at line 336 of file Loan.h.

◆ getStartDate()

SF_UINT32::type::value_type xrpl::ledger_entries::Loan::getStartDate ( ) const

Get sfStartDate (soeREQUIRED)

Returns
The field value.

Definition at line 347 of file Loan.h.

◆ getPaymentInterval()

SF_UINT32::type::value_type xrpl::ledger_entries::Loan::getPaymentInterval ( ) const

Get sfPaymentInterval (soeREQUIRED)

Returns
The field value.

Definition at line 358 of file Loan.h.

◆ getGracePeriod()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Loan::getGracePeriod ( ) const

Get sfGracePeriod (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 369 of file Loan.h.

◆ hasGracePeriod()

bool xrpl::ledger_entries::Loan::hasGracePeriod ( ) const

Check if sfGracePeriod is present.

Returns
True if the field is present, false otherwise.

Definition at line 382 of file Loan.h.

◆ getPreviousPaymentDueDate()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Loan::getPreviousPaymentDueDate ( ) const

Get sfPreviousPaymentDueDate (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 393 of file Loan.h.

◆ hasPreviousPaymentDueDate()

bool xrpl::ledger_entries::Loan::hasPreviousPaymentDueDate ( ) const

Check if sfPreviousPaymentDueDate is present.

Returns
True if the field is present, false otherwise.

Definition at line 406 of file Loan.h.

◆ getNextPaymentDueDate()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Loan::getNextPaymentDueDate ( ) const

Get sfNextPaymentDueDate (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 417 of file Loan.h.

◆ hasNextPaymentDueDate()

bool xrpl::ledger_entries::Loan::hasNextPaymentDueDate ( ) const

Check if sfNextPaymentDueDate is present.

Returns
True if the field is present, false otherwise.

Definition at line 430 of file Loan.h.

◆ getPaymentRemaining()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::Loan::getPaymentRemaining ( ) const

Get sfPaymentRemaining (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 441 of file Loan.h.

◆ hasPaymentRemaining()

bool xrpl::ledger_entries::Loan::hasPaymentRemaining ( ) const

Check if sfPaymentRemaining is present.

Returns
True if the field is present, false otherwise.

Definition at line 454 of file Loan.h.

◆ getPeriodicPayment()

SF_NUMBER::type::value_type xrpl::ledger_entries::Loan::getPeriodicPayment ( ) const

Get sfPeriodicPayment (soeREQUIRED)

Returns
The field value.

Definition at line 465 of file Loan.h.

◆ getPrincipalOutstanding()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::Loan::getPrincipalOutstanding ( ) const

Get sfPrincipalOutstanding (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 476 of file Loan.h.

◆ hasPrincipalOutstanding()

bool xrpl::ledger_entries::Loan::hasPrincipalOutstanding ( ) const

Check if sfPrincipalOutstanding is present.

Returns
True if the field is present, false otherwise.

Definition at line 489 of file Loan.h.

◆ getTotalValueOutstanding()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::Loan::getTotalValueOutstanding ( ) const

Get sfTotalValueOutstanding (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 500 of file Loan.h.

◆ hasTotalValueOutstanding()

bool xrpl::ledger_entries::Loan::hasTotalValueOutstanding ( ) const

Check if sfTotalValueOutstanding is present.

Returns
True if the field is present, false otherwise.

Definition at line 513 of file Loan.h.

◆ getManagementFeeOutstanding()

protocol_autogen::Optional< SF_NUMBER::type::value_type > xrpl::ledger_entries::Loan::getManagementFeeOutstanding ( ) const

Get sfManagementFeeOutstanding (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 524 of file Loan.h.

◆ hasManagementFeeOutstanding()

bool xrpl::ledger_entries::Loan::hasManagementFeeOutstanding ( ) const

Check if sfManagementFeeOutstanding is present.

Returns
True if the field is present, false otherwise.

Definition at line 537 of file Loan.h.

◆ getLoanScale()

protocol_autogen::Optional< SF_INT32::type::value_type > xrpl::ledger_entries::Loan::getLoanScale ( ) const

Get sfLoanScale (soeDEFAULT)

Returns
The field value, or std::nullopt if not present.

Definition at line 548 of file Loan.h.

◆ hasLoanScale()

bool xrpl::ledger_entries::Loan::hasLoanScale ( ) const

Check if sfLoanScale is present.

Returns
True if the field is present, false otherwise.

Definition at line 561 of file Loan.h.

◆ validate()

bool xrpl::ledger_entries::LedgerEntryBase::validate ( ) const
inherited

Validate the ledger entry.

Returns
true if validation passes, false otherwise

Definition at line 40 of file LedgerEntryBase.h.

◆ getType()

LedgerEntryType xrpl::ledger_entries::LedgerEntryBase::getType ( ) const
inherited

Get the ledger entry type.

Returns
The type of this ledger entry

Definition at line 57 of file LedgerEntryBase.h.

◆ getKey()

uint256 const & xrpl::ledger_entries::LedgerEntryBase::getKey ( ) const
inherited

Get the key (index) of this ledger entry.

The key uniquely identifies this ledger entry in the ledger state.

Returns
A constant reference to the 256-bit key

Definition at line 70 of file LedgerEntryBase.h.

◆ getLedgerIndex()

std::optional< uint256 > xrpl::ledger_entries::LedgerEntryBase::getLedgerIndex ( ) const
inherited

Get the ledger index (sfLedgerIndex).

This field is OPTIONAL and represents the index of the ledger entry.

Returns
The ledger index if present, std::nullopt otherwise

Definition at line 85 of file LedgerEntryBase.h.

◆ hasLedgerIndex()

bool xrpl::ledger_entries::LedgerEntryBase::hasLedgerIndex ( ) const
inherited

Check if the ledger entry has a ledger index.

Returns
true if sfLedgerIndex is present, false otherwise

Definition at line 100 of file LedgerEntryBase.h.

◆ getLedgerEntryType()

uint16_t xrpl::ledger_entries::LedgerEntryBase::getLedgerEntryType ( ) const
inherited

Get the ledger entry type field (sfLedgerEntryType).

This field is REQUIRED for all ledger entries and indicates the type of the ledger entry (e.g., AccountRoot, RippleState, Offer, etc.).

Returns
The ledger entry type as a 16-bit unsigned integer

Definition at line 114 of file LedgerEntryBase.h.

◆ getFlags()

std::uint32_t xrpl::ledger_entries::LedgerEntryBase::getFlags ( ) const
inherited

Get the flags field (sfFlags).

This field is REQUIRED for all ledger entries and contains type-specific flags that modify the behavior of the ledger entry.

Returns
The flags value as a 32-bit unsigned integer

Definition at line 128 of file LedgerEntryBase.h.

◆ getSle()

std::shared_ptr< SLE const > xrpl::ledger_entries::LedgerEntryBase::getSle ( ) const
inherited

Get the underlying SLE object.

Provides direct access to the wrapped serialized ledger entry object for cases where the type-safe accessors are insufficient.

Returns
A constant reference to the underlying SLE object

Definition at line 142 of file LedgerEntryBase.h.

Member Data Documentation

◆ entryType

constexpr LedgerEntryType xrpl::ledger_entries::Loan::entryType = ltLOAN
staticconstexpr

Definition at line 30 of file Loan.h.

◆ sle_

std::shared_ptr<SLE const> xrpl::ledger_entries::LedgerEntryBase::sle_
protectedinherited

The underlying serialized ledger entry being wrapped.

Definition at line 149 of file LedgerEntryBase.h.