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.
141 lines
3.7 KiB
C++
141 lines
3.7 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.
|
|
*/
|
|
|
|
/*
|
|
* CartItem.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_CartItem_H_
|
|
#define HANZO_MODEL_CartItem_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class CartItem
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
CartItem();
|
|
virtual ~CartItem();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// CartItem members
|
|
|
|
|
|
/// <summary>
|
|
/// Free reports a line that costs nothing because a coupon or a promotion made it so, rather than because its price is zero.
|
|
/// </summary>
|
|
bool isFree() const;
|
|
bool freeIsSet() const;
|
|
void unsetFree();
|
|
void setFree(bool value);
|
|
|
|
/// <summary>
|
|
/// ID is the line's identity — the variant id when the line is a variant, otherwise the product id. It is what a subsequent set call addresses.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Kind is \"variant\" when this line is a specific sellable variant and \"product\" when it is the product itself.
|
|
/// </summary>
|
|
utility::string_t getKind() const;
|
|
bool kindIsSet() const;
|
|
void unsetKind();
|
|
void setKind(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Name is the item's display name, cached onto the line when it was added so a cart renders without a second read.
|
|
/// </summary>
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// PriceCents is the unit price in whole cents, cached at the moment the line was added. The line's contribution to the cart is this times Quantity.
|
|
/// </summary>
|
|
int64_t getPriceCents() const;
|
|
bool priceCentsIsSet() const;
|
|
void unsetPriceCents();
|
|
void setPriceCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Quantity is how many units of this item the cart holds.
|
|
/// </summary>
|
|
int64_t getQuantity() const;
|
|
bool quantityIsSet() const;
|
|
void unsetQuantity();
|
|
void setQuantity(int64_t value);
|
|
|
|
/// <summary>
|
|
/// SKU is the line's stock-keeping unit — the variant's when it has one, otherwise the product's. Empty when neither carries one.
|
|
/// </summary>
|
|
utility::string_t getSku() const;
|
|
bool skuIsSet() const;
|
|
void unsetSku();
|
|
void setSku(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
bool m_Free;
|
|
bool m_FreeIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Kind;
|
|
bool m_KindIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
int64_t m_PriceCents;
|
|
bool m_PriceCentsIsSet;
|
|
|
|
int64_t m_Quantity;
|
|
bool m_QuantityIsSet;
|
|
|
|
utility::string_t m_Sku;
|
|
bool m_SkuIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_CartItem_H_ */
|