本文整理汇总了C++中OTPaymentPlan类的典型用法代码示例。如果您正苦于以下问题:C++ OTPaymentPlan类的具体用法?C++ OTPaymentPlan怎么用?C++ OTPaymentPlan使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了OTPaymentPlan类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetMaximumNoPayments
int MTRecord::GetMaximumNoPayments()
{
if (!IsPaymentPlan())
return 0;
OTPaymentPlan thePlan;
const OTString strPlan(GetContents().c_str());
if (thePlan.LoadContractFromString(strPlan) &&
thePlan.HasPaymentPlan())
return thePlan.GetMaximumNoPayments();
return 0;
}
示例2: HasPaymentPlan
bool MTRecord::HasPaymentPlan()
{
if (!IsPaymentPlan())
return false;
OTPaymentPlan thePlan;
const OTString strPlan(GetContents().c_str());
if (thePlan.LoadContractFromString(strPlan) &&
thePlan.HasPaymentPlan())
return true;
return false;
}
示例3: GetInitialPaymentAmount
long MTRecord::GetInitialPaymentAmount()
{
if (!IsPaymentPlan())
return 0;
OTPaymentPlan thePlan;
const OTString strPlan(GetContents().c_str());
if (thePlan.LoadContractFromString(strPlan) &&
thePlan.HasInitialPayment())
return thePlan.GetInitialPaymentAmount();
return 0;
}
示例4: GetPaymentPlanAmount
bool OTPayment::SetTempValuesFromPaymentPlan(const OTPaymentPlan & theInput)
{
if (OTPayment::PAYMENT_PLAN == m_Type)
{
m_bAreTempValuesSet = true;
m_bHasRecipient = true;
// -------------------------
m_lAmount = theInput.GetInitialPaymentAmount(); // There're also regular payments of GetPaymentPlanAmount(). Can't fit 'em all.
m_lTransactionNum = theInput.GetTransactionNum();
// -------------------------
// const OTString & OTPaymentPlan::GetConsideration() const
// { return m_strConsideration; }
if (theInput.GetConsideration().Exists())
m_strMemo.Set(theInput.GetConsideration());
else
m_strMemo.Release();
// -------------------------
m_AssetTypeID = theInput.GetAssetID();
m_ServerID = theInput.GetServerID();
// ----------------------------
m_SenderUserID = theInput.GetSenderUserID();
m_SenderAcctID = theInput.GetSenderAcctID();
// ----------------------------
m_RecipientUserID = theInput.GetRecipientUserID();
m_RecipientAcctID = theInput.GetRecipientAcctID();
// ----------------------------
m_VALID_FROM = theInput.GetValidFrom();
m_VALID_TO = theInput.GetValidTo();
// --------------------------------
return true;
}
else
OTLog::Error("OTPayment::SetTempValuesFromPaymentPlan: Error: Wrong type. (Returning false.)\n");
return false;
}