4#include <xrpl/protocol/STTx.h>
5#include <xrpl/protocol/STParsedJSON.h>
6#include <xrpl/protocol/jss.h>
7#include <xrpl/protocol_autogen/TransactionBase.h>
8#include <xrpl/protocol_autogen/TransactionBuilderBase.h>
9#include <xrpl/json/json_value.h>
55 SF_UINT256::type::value_type
58 return this->
tx_->at(sfLoanBrokerID);
71 return this->
tx_->at(sfData);
84 return this->
tx_->isFieldPresent(sfData);
97 return this->
tx_->at(sfCounterparty);
110 return this->
tx_->isFieldPresent(sfCounterparty);
121 if (this->
tx_->isFieldPresent(sfCounterpartySignature))
122 return this->
tx_->getFieldObject(sfCounterpartySignature);
134 return this->
tx_->isFieldPresent(sfCounterpartySignature);
147 return this->
tx_->at(sfLoanOriginationFee);
160 return this->
tx_->isFieldPresent(sfLoanOriginationFee);
173 return this->
tx_->at(sfLoanServiceFee);
186 return this->
tx_->isFieldPresent(sfLoanServiceFee);
199 return this->
tx_->at(sfLatePaymentFee);
212 return this->
tx_->isFieldPresent(sfLatePaymentFee);
225 return this->
tx_->at(sfClosePaymentFee);
238 return this->
tx_->isFieldPresent(sfClosePaymentFee);
251 return this->
tx_->at(sfOverpaymentFee);
264 return this->
tx_->isFieldPresent(sfOverpaymentFee);
277 return this->
tx_->at(sfInterestRate);
290 return this->
tx_->isFieldPresent(sfInterestRate);
303 return this->
tx_->at(sfLateInterestRate);
316 return this->
tx_->isFieldPresent(sfLateInterestRate);
329 return this->
tx_->at(sfCloseInterestRate);
342 return this->
tx_->isFieldPresent(sfCloseInterestRate);
355 return this->
tx_->at(sfOverpaymentInterestRate);
368 return this->
tx_->isFieldPresent(sfOverpaymentInterestRate);
376 SF_NUMBER::type::value_type
379 return this->
tx_->at(sfPrincipalRequested);
392 return this->
tx_->at(sfPaymentTotal);
405 return this->
tx_->isFieldPresent(sfPaymentTotal);
418 return this->
tx_->at(sfPaymentInterval);
431 return this->
tx_->isFieldPresent(sfPaymentInterval);
444 return this->
tx_->at(sfGracePeriod);
457 return this->
tx_->isFieldPresent(sfGracePeriod);
496 if (tx->getTxnType() != ttLOAN_SET)
512 object_[sfLoanBrokerID] = value;
534 object_[sfCounterparty] = value;
556 object_[sfLoanOriginationFee] = value;
567 object_[sfLoanServiceFee] = value;
578 object_[sfLatePaymentFee] = value;
589 object_[sfClosePaymentFee] = value;
600 object_[sfOverpaymentFee] = value;
611 object_[sfInterestRate] = value;
622 object_[sfLateInterestRate] = value;
633 object_[sfCloseInterestRate] = value;
644 object_[sfOverpaymentInterestRate] = value;
655 object_[sfPrincipalRequested] = value;
666 object_[sfPaymentTotal] = value;
677 object_[sfPaymentInterval] = value;
688 object_[sfGracePeriod] = value;
701 sign(publicKey, secretKey);
void setFieldObject(SField const &field, STObject const &v)
Builder for LoanSet transactions.
LoanSetBuilder & setLoanServiceFee(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfLoanServiceFee (soeOPTIONAL)
LoanSetBuilder & setLoanOriginationFee(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfLoanOriginationFee (soeOPTIONAL)
LoanSetBuilder(SF_ACCOUNT::type::value_type account, std::decay_t< typename SF_UINT256::type::value_type > const &loanBrokerID, std::decay_t< typename SF_NUMBER::type::value_type > const &principalRequested, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new LoanSetBuilder with required fields.
LoanSetBuilder & setLateInterestRate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfLateInterestRate (soeOPTIONAL)
LoanSetBuilder(std::shared_ptr< STTx const > tx)
Construct a LoanSetBuilder from an existing STTx object.
LoanSetBuilder & setOverpaymentInterestRate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfOverpaymentInterestRate (soeOPTIONAL)
LoanSetBuilder & setPaymentInterval(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPaymentInterval (soeOPTIONAL)
LoanSetBuilder & setClosePaymentFee(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfClosePaymentFee (soeOPTIONAL)
LoanSetBuilder & setData(std::decay_t< typename SF_VL::type::value_type > const &value)
Set sfData (soeOPTIONAL)
LoanSetBuilder & setCounterpartySignature(STObject const &value)
Set sfCounterpartySignature (soeOPTIONAL)
LoanSetBuilder & setLatePaymentFee(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfLatePaymentFee (soeOPTIONAL)
LoanSetBuilder & setInterestRate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfInterestRate (soeOPTIONAL)
LoanSet build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the LoanSet wrapper.
LoanSetBuilder & setLoanBrokerID(std::decay_t< typename SF_UINT256::type::value_type > const &value)
Transaction-specific field setters.
LoanSetBuilder & setOverpaymentFee(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfOverpaymentFee (soeOPTIONAL)
LoanSetBuilder & setCounterparty(std::decay_t< typename SF_ACCOUNT::type::value_type > const &value)
Set sfCounterparty (soeOPTIONAL)
LoanSetBuilder & setPaymentTotal(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfPaymentTotal (soeOPTIONAL)
LoanSetBuilder & setGracePeriod(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfGracePeriod (soeOPTIONAL)
LoanSetBuilder & setCloseInterestRate(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfCloseInterestRate (soeOPTIONAL)
LoanSetBuilder & setPrincipalRequested(std::decay_t< typename SF_NUMBER::type::value_type > const &value)
Set sfPrincipalRequested (soeREQUIRED)
SF_NUMBER::type::value_type getPrincipalRequested() const
Get sfPrincipalRequested (soeREQUIRED)
bool hasCounterparty() const
Check if sfCounterparty is present.
bool hasCounterpartySignature() const
Check if sfCounterpartySignature is present.
bool hasInterestRate() const
Check if sfInterestRate is present.
protocol_autogen::Optional< SF_NUMBER::type::value_type > getLoanOriginationFee() const
Get sfLoanOriginationFee (soeOPTIONAL)
bool hasLoanOriginationFee() const
Check if sfLoanOriginationFee is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getGracePeriod() const
Get sfGracePeriod (soeOPTIONAL)
protocol_autogen::Optional< SF_UINT32::type::value_type > getOverpaymentFee() const
Get sfOverpaymentFee (soeOPTIONAL)
protocol_autogen::Optional< SF_NUMBER::type::value_type > getLoanServiceFee() const
Get sfLoanServiceFee (soeOPTIONAL)
protocol_autogen::Optional< SF_VL::type::value_type > getData() const
Get sfData (soeOPTIONAL)
bool hasCloseInterestRate() const
Check if sfCloseInterestRate is present.
bool hasOverpaymentInterestRate() const
Check if sfOverpaymentInterestRate is present.
bool hasLateInterestRate() const
Check if sfLateInterestRate is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getPaymentInterval() const
Get sfPaymentInterval (soeOPTIONAL)
protocol_autogen::Optional< SF_ACCOUNT::type::value_type > getCounterparty() const
Get sfCounterparty (soeOPTIONAL)
bool hasOverpaymentFee() const
Check if sfOverpaymentFee is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getOverpaymentInterestRate() const
Get sfOverpaymentInterestRate (soeOPTIONAL)
bool hasPaymentTotal() const
Check if sfPaymentTotal is present.
bool hasLatePaymentFee() const
Check if sfLatePaymentFee is present.
bool hasLoanServiceFee() const
Check if sfLoanServiceFee is present.
std::optional< STObject > getCounterpartySignature() const
Get sfCounterpartySignature (soeOPTIONAL)
protocol_autogen::Optional< SF_UINT32::type::value_type > getLateInterestRate() const
Get sfLateInterestRate (soeOPTIONAL)
SF_UINT256::type::value_type getLoanBrokerID() const
Get sfLoanBrokerID (soeREQUIRED)
protocol_autogen::Optional< SF_NUMBER::type::value_type > getLatePaymentFee() const
Get sfLatePaymentFee (soeOPTIONAL)
protocol_autogen::Optional< SF_UINT32::type::value_type > getCloseInterestRate() const
Get sfCloseInterestRate (soeOPTIONAL)
protocol_autogen::Optional< SF_UINT32::type::value_type > getInterestRate() const
Get sfInterestRate (soeOPTIONAL)
bool hasPaymentInterval() const
Check if sfPaymentInterval is present.
static constexpr xrpl::TxType txType
protocol_autogen::Optional< SF_UINT32::type::value_type > getPaymentTotal() const
Get sfPaymentTotal (soeOPTIONAL)
bool hasGracePeriod() const
Check if sfGracePeriod is present.
LoanSet(std::shared_ptr< STTx const > tx)
Construct a LoanSet transaction wrapper from an existing STTx object.
protocol_autogen::Optional< SF_NUMBER::type::value_type > getClosePaymentFee() const
Get sfClosePaymentFee (soeOPTIONAL)
bool hasClosePaymentFee() const
Check if sfClosePaymentFee is present.
bool hasData() const
Check if sfData is present.
Base class for all transaction wrapper types.
std::shared_ptr< STTx const > tx_
The underlying transaction object being wrapped.
Base class for all transaction builders.
LoanSetBuilder & sign(PublicKey const &publicKey, SecretKey const &secretKey)
Sign the transaction with the given keys.
TxType
Transaction type identifiers.