4#include <xrpl/protocol/STLedgerEntry.h>
5#include <xrpl/protocol/STParsedJSON.h>
6#include <xrpl/protocol/jss.h>
7#include <xrpl/protocol_autogen/LedgerEntryBase.h>
8#include <xrpl/protocol_autogen/LedgerEntryBuilderBase.h>
9#include <xrpl/json/json_value.h>
53 SF_UINT256::type::value_type
56 return this->
sle_->at(sfPreviousTxnID);
64 SF_UINT32::type::value_type
67 return this->
sle_->at(sfPreviousTxnLgrSeq);
75 SF_UINT64::type::value_type
78 return this->
sle_->at(sfOwnerNode);
86 SF_UINT64::type::value_type
89 return this->
sle_->at(sfLoanBrokerNode);
97 SF_UINT256::type::value_type
100 return this->
sle_->at(sfLoanBrokerID);
108 SF_UINT32::type::value_type
111 return this->
sle_->at(sfLoanSequence);
119 SF_ACCOUNT::type::value_type
122 return this->
sle_->at(sfBorrower);
134 return this->
sle_->at(sfLoanOriginationFee);
146 return this->
sle_->isFieldPresent(sfLoanOriginationFee);
158 return this->
sle_->at(sfLoanServiceFee);
170 return this->
sle_->isFieldPresent(sfLoanServiceFee);
182 return this->
sle_->at(sfLatePaymentFee);
194 return this->
sle_->isFieldPresent(sfLatePaymentFee);
206 return this->
sle_->at(sfClosePaymentFee);
218 return this->
sle_->isFieldPresent(sfClosePaymentFee);
230 return this->
sle_->at(sfOverpaymentFee);
242 return this->
sle_->isFieldPresent(sfOverpaymentFee);
254 return this->
sle_->at(sfInterestRate);
266 return this->
sle_->isFieldPresent(sfInterestRate);
278 return this->
sle_->at(sfLateInterestRate);
290 return this->
sle_->isFieldPresent(sfLateInterestRate);
302 return this->
sle_->at(sfCloseInterestRate);
314 return this->
sle_->isFieldPresent(sfCloseInterestRate);
326 return this->
sle_->at(sfOverpaymentInterestRate);
338 return this->
sle_->isFieldPresent(sfOverpaymentInterestRate);
346 SF_UINT32::type::value_type
349 return this->
sle_->at(sfStartDate);
357 SF_UINT32::type::value_type
360 return this->
sle_->at(sfPaymentInterval);
372 return this->
sle_->at(sfGracePeriod);
384 return this->
sle_->isFieldPresent(sfGracePeriod);
396 return this->
sle_->at(sfPreviousPaymentDueDate);
408 return this->
sle_->isFieldPresent(sfPreviousPaymentDueDate);
420 return this->
sle_->at(sfNextPaymentDueDate);
432 return this->
sle_->isFieldPresent(sfNextPaymentDueDate);
444 return this->
sle_->at(sfPaymentRemaining);
456 return this->
sle_->isFieldPresent(sfPaymentRemaining);
464 SF_NUMBER::type::value_type
467 return this->
sle_->at(sfPeriodicPayment);
479 return this->
sle_->at(sfPrincipalOutstanding);
491 return this->
sle_->isFieldPresent(sfPrincipalOutstanding);
503 return this->
sle_->at(sfTotalValueOutstanding);
515 return this->
sle_->isFieldPresent(sfTotalValueOutstanding);
527 return this->
sle_->at(sfManagementFeeOutstanding);
539 return this->
sle_->isFieldPresent(sfManagementFeeOutstanding);
551 return this->
sle_->at(sfLoanScale);
563 return this->
sle_->isFieldPresent(sfLoanScale);
612 if (sle->at(sfLedgerEntryType) != ltLOAN)
628 object_[sfPreviousTxnID] = value;
639 object_[sfPreviousTxnLgrSeq] = value;
661 object_[sfLoanBrokerNode] = value;
672 object_[sfLoanBrokerID] = value;
683 object_[sfLoanSequence] = value;
705 object_[sfLoanOriginationFee] = value;
716 object_[sfLoanServiceFee] = value;
727 object_[sfLatePaymentFee] = value;
738 object_[sfClosePaymentFee] = value;
749 object_[sfOverpaymentFee] = value;
760 object_[sfInterestRate] = value;
771 object_[sfLateInterestRate] = value;
782 object_[sfCloseInterestRate] = value;
793 object_[sfOverpaymentInterestRate] = value;
815 object_[sfPaymentInterval] = value;
826 object_[sfGracePeriod] = value;
837 object_[sfPreviousPaymentDueDate] = value;
848 object_[sfNextPaymentDueDate] = value;
859 object_[sfPaymentRemaining] = value;
870 object_[sfPeriodicPayment] = value;
881 object_[sfPrincipalOutstanding] = value;
892 object_[sfTotalValueOutstanding] = value;
903 object_[sfManagementFeeOutstanding] = value;
Base class for type-safe ledger entry wrappers.
std::shared_ptr< SLE const > sle_
The underlying serialized ledger entry being wrapped.
Base class for all ledger entry builders.
Builder for Loan ledger entries.
LoanBuilder & setCloseInterestRate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfCloseInterestRate (soeDEFAULT)
LoanBuilder & setGracePeriod(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfGracePeriod (soeDEFAULT)
LoanBuilder & setLoanServiceFee(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfLoanServiceFee (soeDEFAULT)
LoanBuilder & setOwnerNode(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfOwnerNode (soeREQUIRED)
LoanBuilder & setLoanBrokerNode(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfLoanBrokerNode (soeREQUIRED)
Loan build(uint256 const &index)
Build and return the completed Loan wrapper.
LoanBuilder & setBorrower(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfBorrower (soeREQUIRED)
LoanBuilder & setClosePaymentFee(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfClosePaymentFee (soeDEFAULT)
LoanBuilder & setLoanOriginationFee(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfLoanOriginationFee (soeDEFAULT)
LoanBuilder & setLoanScale(std::decay_t< typename SF_INT32::type::value_type > const &value)
Set sfLoanScale (soeDEFAULT)
LoanBuilder & setOverpaymentInterestRate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfOverpaymentInterestRate (soeDEFAULT)
LoanBuilder & setInterestRate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfInterestRate (soeDEFAULT)
LoanBuilder & setPreviousTxnLgrSeq(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPreviousTxnLgrSeq (soeREQUIRED)
LoanBuilder & setOverpaymentFee(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfOverpaymentFee (soeDEFAULT)
LoanBuilder & setPaymentInterval(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPaymentInterval (soeREQUIRED)
LoanBuilder & setLoanSequence(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfLoanSequence (soeREQUIRED)
LoanBuilder & setStartDate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfStartDate (soeREQUIRED)
LoanBuilder & setPrincipalOutstanding(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfPrincipalOutstanding (soeDEFAULT)
LoanBuilder & setTotalValueOutstanding(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfTotalValueOutstanding (soeDEFAULT)
LoanBuilder & setLoanBrokerID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Set sfLoanBrokerID (soeREQUIRED)
LoanBuilder & setLatePaymentFee(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfLatePaymentFee (soeDEFAULT)
LoanBuilder & setPreviousPaymentDueDate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPreviousPaymentDueDate (soeDEFAULT)
LoanBuilder & setManagementFeeOutstanding(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfManagementFeeOutstanding (soeDEFAULT)
LoanBuilder(std::shared_ptr< SLE const > sle)
Construct a LoanBuilder from an existing SLE object.
LoanBuilder & setPreviousTxnID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Ledger entry-specific field setters.
LoanBuilder & setNextPaymentDueDate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfNextPaymentDueDate (soeDEFAULT)
LoanBuilder & setPaymentRemaining(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPaymentRemaining (soeDEFAULT)
LoanBuilder & setPeriodicPayment(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfPeriodicPayment (soeREQUIRED)
LoanBuilder(std::decay_t< typename SF_UINT256::type::value_type > const &previousTxnID, std::decay_t< typename SF_UINT32::type::value_type > const &previousTxnLgrSeq, std::decay_t< typename SF_UINT64::type::value_type > const &ownerNode, std::decay_t< typename SF_UINT64::type::value_type > const &loanBrokerNode, std::decay_t< typename SF_UINT256::type::value_type > const &loanBrokerID, std::decay_t< typename SF_UINT32::type::value_type > const &loanSequence, std::decay_t< typename SF_ACCOUNT::type::value_type > const &borrower, std::decay_t< typename SF_UINT32::type::value_type > const &startDate, std::decay_t< typename SF_UINT32::type::value_type > const &paymentInterval, std::decay_t< typename SF_NUMBER::type::value_type > const &periodicPayment)
Construct a new LoanBuilder with required fields.
LoanBuilder & setLateInterestRate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfLateInterestRate (soeDEFAULT)
protocol_autogen::Optional< SF_UINT32::type::value_type > getLateInterestRate() const
Get sfLateInterestRate (soeDEFAULT)
bool hasLoanScale() const
Check if sfLoanScale is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getPaymentRemaining() const
Get sfPaymentRemaining (soeDEFAULT)
bool hasLoanOriginationFee() const
Check if sfLoanOriginationFee is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getCloseInterestRate() const
Get sfCloseInterestRate (soeDEFAULT)
Loan(std::shared_ptr< SLE const > sle)
Construct a Loan ledger entry wrapper from an existing SLE object.
bool hasNextPaymentDueDate() const
Check if sfNextPaymentDueDate is present.
SF_UINT64::type::value_type getOwnerNode() const
Get sfOwnerNode (soeREQUIRED)
bool hasPrincipalOutstanding() const
Check if sfPrincipalOutstanding is present.
protocol_autogen::Optional< SF_NUMBER::type::value_type > getLatePaymentFee() const
Get sfLatePaymentFee (soeDEFAULT)
protocol_autogen::Optional< SF_UINT32::type::value_type > getNextPaymentDueDate() const
Get sfNextPaymentDueDate (soeDEFAULT)
SF_UINT32::type::value_type getPaymentInterval() const
Get sfPaymentInterval (soeREQUIRED)
protocol_autogen::Optional< SF_NUMBER::type::value_type > getClosePaymentFee() const
Get sfClosePaymentFee (soeDEFAULT)
protocol_autogen::Optional< SF_INT32::type::value_type > getLoanScale() const
Get sfLoanScale (soeDEFAULT)
protocol_autogen::Optional< SF_UINT32::type::value_type > getGracePeriod() const
Get sfGracePeriod (soeDEFAULT)
SF_UINT256::type::value_type getPreviousTxnID() const
Get sfPreviousTxnID (soeREQUIRED)
protocol_autogen::Optional< SF_NUMBER::type::value_type > getPrincipalOutstanding() const
Get sfPrincipalOutstanding (soeDEFAULT)
protocol_autogen::Optional< SF_UINT32::type::value_type > getOverpaymentFee() const
Get sfOverpaymentFee (soeDEFAULT)
static constexpr LedgerEntryType entryType
SF_UINT256::type::value_type getLoanBrokerID() const
Get sfLoanBrokerID (soeREQUIRED)
bool hasOverpaymentFee() const
Check if sfOverpaymentFee 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_UINT32::type::value_type > getOverpaymentInterestRate() const
Get sfOverpaymentInterestRate (soeDEFAULT)
SF_ACCOUNT::type::value_type getBorrower() const
Get sfBorrower (soeREQUIRED)
bool hasTotalValueOutstanding() const
Check if sfTotalValueOutstanding is present.
protocol_autogen::Optional< SF_NUMBER::type::value_type > getLoanServiceFee() const
Get sfLoanServiceFee (soeDEFAULT)
protocol_autogen::Optional< SF_NUMBER::type::value_type > getLoanOriginationFee() const
Get sfLoanOriginationFee (soeDEFAULT)
bool hasLoanServiceFee() const
Check if sfLoanServiceFee is present.
bool hasLateInterestRate() const
Check if sfLateInterestRate is present.
bool hasClosePaymentFee() const
Check if sfClosePaymentFee is present.
SF_UINT32::type::value_type getStartDate() const
Get sfStartDate (soeREQUIRED)
bool hasPreviousPaymentDueDate() const
Check if sfPreviousPaymentDueDate is present.
bool hasInterestRate() const
Check if sfInterestRate is present.
protocol_autogen::Optional< SF_NUMBER::type::value_type > getTotalValueOutstanding() const
Get sfTotalValueOutstanding (soeDEFAULT)
protocol_autogen::Optional< SF_UINT32::type::value_type > getInterestRate() const
Get sfInterestRate (soeDEFAULT)
SF_UINT32::type::value_type getPreviousTxnLgrSeq() const
Get sfPreviousTxnLgrSeq (soeREQUIRED)
SF_UINT32::type::value_type getLoanSequence() const
Get sfLoanSequence (soeREQUIRED)
bool hasGracePeriod() const
Check if sfGracePeriod is present.
SF_NUMBER::type::value_type getPeriodicPayment() const
Get sfPeriodicPayment (soeREQUIRED)
bool hasLatePaymentFee() const
Check if sfLatePaymentFee is present.
bool hasPaymentRemaining() const
Check if sfPaymentRemaining is present.
SF_UINT64::type::value_type getLoanBrokerNode() const
Get sfLoanBrokerNode (soeREQUIRED)
protocol_autogen::Optional< SF_UINT32::type::value_type > getPreviousPaymentDueDate() const
Get sfPreviousPaymentDueDate (soeDEFAULT)
bool hasCloseInterestRate() const
Check if sfCloseInterestRate is present.
bool hasOverpaymentInterestRate() const
Check if sfOverpaymentInterestRate is present.
LedgerEntryType
Identifiers for on-ledger objects.