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.
243 lines
6.7 KiB
C++
243 lines
6.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.
|
|
*/
|
|
|
|
/*
|
|
* Cart.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_Cart_H_
|
|
#define HANZO_MODEL_Cart_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include "hanzo/model/CartItem.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <vector>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class CartItem;
|
|
|
|
|
|
class Cart
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
Cart();
|
|
virtual ~Cart();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// Cart members
|
|
|
|
|
|
/// <summary>
|
|
/// CreatedAt is when the cart was opened, RFC3339.
|
|
/// </summary>
|
|
utility::string_t getCreatedAt() const;
|
|
bool createdAtIsSet() const;
|
|
void unsetCreatedAt();
|
|
void setCreatedAt(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Currency is the ISO 4217 code every amount below is denominated in.
|
|
/// </summary>
|
|
utility::string_t getCurrency() const;
|
|
bool currencyIsSet() const;
|
|
void unsetCurrency();
|
|
void setCurrency(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// DiscountCents is what coupons and promotions took off, in whole cents.
|
|
/// </summary>
|
|
int64_t getDiscountCents() const;
|
|
bool discountCentsIsSet() const;
|
|
void unsetDiscountCents();
|
|
void setDiscountCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Email is the shopper's address, when the cart carries one.
|
|
/// </summary>
|
|
utility::string_t getEmail() const;
|
|
bool emailIsSet() const;
|
|
void unsetEmail();
|
|
void setEmail(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ID is the cart's id — what every other cart op addresses it by, and what a storefront persists against the browser session.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Items are the cart's lines, in the order they were added.
|
|
/// </summary>
|
|
std::vector<std::shared_ptr<CartItem>> getItems() const;
|
|
bool itemsIsSet() const;
|
|
void unsetItems();
|
|
void setItems(const std::vector<std::shared_ptr<CartItem>>& value);
|
|
|
|
/// <summary>
|
|
/// LineTotalCents is the sum of the lines before any discount, in whole cents.
|
|
/// </summary>
|
|
int64_t getLineTotalCents() const;
|
|
bool lineTotalCentsIsSet() const;
|
|
void unsetLineTotalCents();
|
|
void setLineTotalCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Order is the order this cart became, once checkout completed it. Empty until then, and its presence is what makes a cart final.
|
|
/// </summary>
|
|
utility::string_t getOrder() const;
|
|
bool orderIsSet() const;
|
|
void unsetOrder();
|
|
void setOrder(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ShippingCents is the shipping charge, in whole cents. It stays zero until a shipping option is priced at checkout.
|
|
/// </summary>
|
|
int64_t getShippingCents() const;
|
|
bool shippingCentsIsSet() const;
|
|
void unsetShippingCents();
|
|
void setShippingCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Status is \"active\" for a cart still being filled, \"ordered\" once checkout turned it into an order, and \"discarded\" when the shopper abandoned it.
|
|
/// </summary>
|
|
utility::string_t getStatus() const;
|
|
bool statusIsSet() const;
|
|
void unsetStatus();
|
|
void setStatus(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Store is the storefront the cart is being filled on.
|
|
/// </summary>
|
|
utility::string_t getStore() const;
|
|
bool storeIsSet() const;
|
|
void unsetStore();
|
|
void setStore(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// SubtotalCents is LineTotalCents less DiscountCents, in whole cents.
|
|
/// </summary>
|
|
int64_t getSubtotalCents() const;
|
|
bool subtotalCentsIsSet() const;
|
|
void unsetSubtotalCents();
|
|
void setSubtotalCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// TaxCents is the sales tax, in whole cents. It stays zero until checkout resolves the shopper's tax region.
|
|
/// </summary>
|
|
int64_t getTaxCents() const;
|
|
bool taxCentsIsSet() const;
|
|
void unsetTaxCents();
|
|
void setTaxCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// TotalCents is what the shopper pays: subtotal plus shipping plus tax, in whole cents.
|
|
/// </summary>
|
|
int64_t getTotalCents() const;
|
|
bool totalCentsIsSet() const;
|
|
void unsetTotalCents();
|
|
void setTotalCents(int64_t value);
|
|
|
|
/// <summary>
|
|
/// UpdatedAt is when the cart was last amended, RFC3339.
|
|
/// </summary>
|
|
utility::string_t getUpdatedAt() const;
|
|
bool updatedAtIsSet() const;
|
|
void unsetUpdatedAt();
|
|
void setUpdatedAt(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// User is the signed-in shopper this cart belongs to, empty for a guest cart.
|
|
/// </summary>
|
|
utility::string_t getUser() const;
|
|
bool userIsSet() const;
|
|
void unsetUser();
|
|
void setUser(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_CreatedAt;
|
|
bool m_CreatedAtIsSet;
|
|
|
|
utility::string_t m_Currency;
|
|
bool m_CurrencyIsSet;
|
|
|
|
int64_t m_DiscountCents;
|
|
bool m_DiscountCentsIsSet;
|
|
|
|
utility::string_t m_Email;
|
|
bool m_EmailIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
std::vector<std::shared_ptr<CartItem>> m_Items;
|
|
bool m_ItemsIsSet;
|
|
|
|
int64_t m_LineTotalCents;
|
|
bool m_LineTotalCentsIsSet;
|
|
|
|
utility::string_t m_Order;
|
|
bool m_OrderIsSet;
|
|
|
|
int64_t m_ShippingCents;
|
|
bool m_ShippingCentsIsSet;
|
|
|
|
utility::string_t m_Status;
|
|
bool m_StatusIsSet;
|
|
|
|
utility::string_t m_Store;
|
|
bool m_StoreIsSet;
|
|
|
|
int64_t m_SubtotalCents;
|
|
bool m_SubtotalCentsIsSet;
|
|
|
|
int64_t m_TaxCents;
|
|
bool m_TaxCentsIsSet;
|
|
|
|
int64_t m_TotalCents;
|
|
bool m_TotalCentsIsSet;
|
|
|
|
utility::string_t m_UpdatedAt;
|
|
bool m_UpdatedAtIsSet;
|
|
|
|
utility::string_t m_User;
|
|
bool m_UserIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_Cart_H_ */
|