mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection these were generated from was a month old and predated the compute migration, so every one of them described /v1/visor — which the API serves at zero paths now. That is why a hand-written console client and a generated one had drifted the same way at the same time. No /v1/visor path survives here. The word still appears as a source-plane value and inside gvisor and supervisor, which are not this rename.
145 lines
4.1 KiB
C++
145 lines
4.1 KiB
C++
/**
|
|
* Hanzo Cloud API
|
|
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
*
|
|
* The version of the OpenAPI document: v1
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
/*
|
|
* AffiliateEarnings.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_AffiliateEarnings_H_
|
|
#define HANZO_MODEL_AffiliateEarnings_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include "hanzo/model/OrgEarningView.h"
|
|
#include "hanzo/model/PeriodEarningView.h"
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class PeriodEarningView;
|
|
class OrgEarningView;
|
|
|
|
|
|
class AffiliateEarnings
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
AffiliateEarnings();
|
|
virtual ~AffiliateEarnings();
|
|
|
|
/////////////////////////////////////////////
|
|
/// ModelBase overrides
|
|
|
|
void validate() override;
|
|
|
|
web::json::value toJson() const override;
|
|
bool fromJson(const web::json::value& json) override;
|
|
|
|
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
|
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// AffiliateEarnings members
|
|
|
|
|
|
/// <summary>
|
|
/// AccruedCents is lifetime commission accrued, in cents.
|
|
/// </summary>
|
|
int64_t getAccruedCents() const;
|
|
bool accruedCentsIsSet() const;
|
|
void unsetAccruedCents();
|
|
void setAccruedCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// ByPeriod is the per-period ledger: the margin earned against and the commission taken from it.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<PeriodEarningView>> getByPeriod() const;
|
|
bool byPeriodIsSet() const;
|
|
void unsetByPeriod();
|
|
void setByPeriod(const std::vector<std::shared_ptr<PeriodEarningView>>& value);
|
|
|
|
/// <summary>
|
|
/// ByReferredOrg is each referral's aggregate contribution — the affiliate's OWN share, never the referred org's spend.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<OrgEarningView>> getByReferredOrg() const;
|
|
bool byReferredOrgIsSet() const;
|
|
void unsetByReferredOrg();
|
|
void setByReferredOrg(const std::vector<std::shared_ptr<OrgEarningView>>& value);
|
|
|
|
/// <summary>
|
|
/// IsAffiliate says whether the caller org has an affiliate record. On false it is the ONLY field present — there is no ledger to report, and the zeros you might expect are absent rather than reported as earnings of nothing.
|
|
/// </summary>
|
|
bool isIsAffiliate() const;
|
|
bool isAffiliateIsSet() const;
|
|
void unsetIsAffiliate();
|
|
void setIsAffiliate(bool value);
|
|
|
|
/// <summary>
|
|
/// MarginBps is the platform gross-margin fraction commission is a rate OF.
|
|
/// </summary>
|
|
int64_t getMarginBps() const;
|
|
bool marginBpsIsSet() const;
|
|
void unsetMarginBps();
|
|
void setMarginBps(int64_t value);
|
|
|
|
/// <summary>
|
|
/// PaidCents is lifetime commission already paid out, in cents.
|
|
/// </summary>
|
|
int64_t getPaidCents() const;
|
|
bool paidCentsIsSet() const;
|
|
void unsetPaidCents();
|
|
void setPaidCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// PendingCents is accrued minus paid — what the platform still owes.
|
|
/// </summary>
|
|
int64_t getPendingCents() const;
|
|
bool pendingCentsIsSet() const;
|
|
void unsetPendingCents();
|
|
void setPendingCents(int64_t value);
|
|
|
|
|
|
protected:
|
|
int64_t m_AccruedCents;
|
|
bool m_AccruedCentsIsSet;
|
|
|
|
std::vector<std::shared_ptr<PeriodEarningView>> m_ByPeriod;
|
|
bool m_ByPeriodIsSet;
|
|
|
|
std::vector<std::shared_ptr<OrgEarningView>> m_ByReferredOrg;
|
|
bool m_ByReferredOrgIsSet;
|
|
|
|
bool m_IsAffiliate;
|
|
bool m_IsAffiliateIsSet;
|
|
|
|
int64_t m_MarginBps;
|
|
bool m_MarginBpsIsSet;
|
|
|
|
int64_t m_PaidCents;
|
|
bool m_PaidCentsIsSet;
|
|
|
|
int64_t m_PendingCents;
|
|
bool m_PendingCentsIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_AffiliateEarnings_H_ */
|