mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection was 113 commits behind the document it claims to describe, and `generate.py --all --check` reported every one of the thirteen clients DRIFTED — the same +19 models in each, because they all fell behind the same emission. Regenerated in place from hanzo-inc/cloud openapi.yaml at 939b09d4 (sha256 087024f6…), which is the only description of this API that cannot name a route the binary does not serve. `--check` is clean across all thirteen after. .spec-lock moved with the code. The generator READS that file and never writes it — hanzoai/ci`s lane does — so a hand run leaves every lock naming the previous document. A lock that disagrees with the tree beside it is worse than no lock: the next `--check` without `--spec` fetches what production serves, compares it to a digest that was already wrong, and reports drift that is really staleness.
75 lines
2.8 KiB
C++
75 lines
2.8 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.
|
|
*/
|
|
|
|
/*
|
|
* TreasuryApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_API_TreasuryApi_H_
|
|
#define HANZO_API_TreasuryApi_H_
|
|
|
|
|
|
|
|
#include "hanzo/ApiClient.h"
|
|
|
|
#include "hanzo/model/AccountsOut.h"
|
|
#include "hanzo/model/TreasuryReport.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <boost/optional.hpp>
|
|
|
|
namespace hanzo {
|
|
namespace api {
|
|
|
|
using namespace hanzo::model;
|
|
|
|
|
|
|
|
class TreasuryApi
|
|
{
|
|
public:
|
|
|
|
explicit TreasuryApi( std::shared_ptr<const ApiClient> apiClient );
|
|
|
|
virtual ~TreasuryApi();
|
|
|
|
/// <summary>
|
|
/// Returns the reserve fund's health and the current revenue-share policy for any validated caller.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the reserve fund's health and the current revenue-share policy for any validated caller. It is a TRANSPARENCY view — a partner or author can see that the pool backing their payouts is solvent — and NOT per-org money, which is the customer's own commerce balance at /v1/billing/balance. The policy is read-only here; only a SuperAdmin sets it.
|
|
/// </remarks>
|
|
pplx::task<std::shared_ptr<TreasuryReport>> getTreasury(
|
|
) const;
|
|
/// <summary>
|
|
/// Returns the ledger accounts the caller may see, with their balances.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns the ledger accounts the caller may see, with their balances. It is tenant-isolated SERVER-SIDE: an ordinary caller sees ONLY accounts under its own \"org:<tenant>:\" prefix, never house accounts and never another tenant's. A SuperAdmin may widen with ?scope=house (the reserve, revenue and payout house accounts) or ?org=<tenant> — the only way to cross the tenant boundary, and only for platform sudo. The answer is honestly empty until a tenant has ledger postings.
|
|
/// </remarks>
|
|
/// <param name="scope">Scope is \"house\" to read the reserve/revenue/payout house accounts. SuperAdmin only. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
/// <param name="org">Org names another tenant to read. SuperAdmin only; ignored when scope=house. (optional, default to utility::conversions::to_string_t(""))</param>
|
|
pplx::task<std::shared_ptr<AccountsOut>> getTreasuryAccounts(
|
|
boost::optional<utility::string_t> scope,
|
|
boost::optional<utility::string_t> org
|
|
) const;
|
|
|
|
protected:
|
|
std::shared_ptr<const ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_API_TreasuryApi_H_ */
|
|
|