Program Listing for File GoogleReceipt.h

Return to documentation for file (axr.sdk/models/GoogleReceipt.h)

// Copyright (C) AcceleratXR, Inc. All rights reserved.
//
// Author: Jean-Philippe Steinmetz <info@acceleratxr.com>
#pragma once

#include "axr.sdk/ModelBase.h"

#include <cpprest/details/basic_types.h>
#include <vector>

namespace axr {
namespace sdk {
namespace models {

class GoogleReceipt : public ModelBase
{
public:
    enum Type
    {
        TYPE_PRODUCT,
        TYPE_SUBSCRIPTION
    };

    GoogleReceipt() {}
    GoogleReceipt(const GoogleReceipt& value) : ModelBase(value) {}
    GoogleReceipt(GoogleReceipt&& value) : ModelBase(value) {}
    virtual ~GoogleReceipt() {}

    // Object overrides

    virtual GoogleReceipt& SetProperties(const std::map<utility::string_t, Variant>& value) override
    {
        Object::SetProperties(value);
        return *this;
    }

    virtual GoogleReceipt& SetProperties(std::map<utility::string_t, Variant>&& value) override
    {
        Object::SetProperties(value);
        return *this;
    }

    virtual GoogleReceipt& SetProperty(const utility::char_t* name, const Variant& value) override
    {
        Object::SetProperty(name, value);
        return*this;
    }

    virtual GoogleReceipt& SetProperty(const utility::string_t& name, const Variant& value) override
    {
        Object::SetProperty(name, value);
        return*this;
    }

    virtual GoogleReceipt& SetRemoteUrl(const utility::string_t& url) override
    {
        Object::SetRemoteUrl(url);
        return *this;
    }

    static const utility::char_t* ClassName()
    {
        return _XPLATSTR("axr::sdk::models::GoogleReceipt");
    }

    void Validate() override;

    // AppleReceipt members

    utility::string_t GetPackageName() const;

    GoogleReceipt& SetPackageName(const utility::string_t& value);

    utility::string_t GetProductId() const;

    GoogleReceipt& SetProductId(const utility::string_t& value);

    utility::string_t GetToken() const;

    GoogleReceipt& SetToken(const utility::string_t& value);

    Type GetType() const;

    GoogleReceipt& SetType(Type type);
};

} // namespace models
} // namespace axr
} // namespace sdk