当前位置: 首页>>代码示例>>C++>>正文


C++ OTPaymentPlan类代码示例

本文整理汇总了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;
}
开发者ID:kazcw,项目名称:Moneychanger,代码行数:13,代码来源:MTRecord.cpp

示例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;
}
开发者ID:kazcw,项目名称:Moneychanger,代码行数:13,代码来源:MTRecord.cpp

示例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;
}
开发者ID:kazcw,项目名称:Moneychanger,代码行数:13,代码来源:MTRecord.cpp

示例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;    
}
开发者ID:echatav,项目名称:Open-Transactions,代码行数:36,代码来源:OTPayment.cpp


注:本文中的OTPaymentPlan类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。