Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
Release 1.0.0.1004 (#40)
Browse files Browse the repository at this point in the history
* Removed project UUID arguments from `BalanceFilter` (#39)
  • Loading branch information
BishopJohnson committed Apr 25, 2022
1 parent 79312d9 commit 6a847ec
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 38 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [1.0.0.1004] - 2022-04-25
### Changed
- Removed `set_project_uuid` and `set_project_uuid_in` member-functions from `BalanceFilter`.

## [1.0.0.1003] - 2022-04-11
### Changed
- `GetWallets` query in project schema no longer implements `PaginationArguments`.
Expand Down Expand Up @@ -37,7 +41,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added
- Initial alpha release.

[Unreleased]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1003...HEAD
[Unreleased]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1004...HEAD
[1.0.0.1004]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1003...1.0.0.1004
[1.0.0.1003]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1002...1.0.0.1003
[1.0.0.1002]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1001...1.0.0.1002
[1.0.0.1001]: https://github.com/enjin/enjin-cpp-sdk/compare/1.0.0.1000...1.0.0.1001
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include(GenerateExportHeader)
### Define project and set properties
project(enjinsdk
LANGUAGES CXX
VERSION 1.0.0.1003)
VERSION 1.0.0.1004)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
Expand Down
2 changes: 1 addition & 1 deletion DOXYFILE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Enjin C++ SDK"
PROJECT_NUMBER = 1.0.0.1003
PROJECT_NUMBER = 1.0.0.1004
PROJECT_BRIEF = "A C++ SDK for creating games using the Enjin blockchain platform."
PROJECT_LOGO = doxygenIcon.png
OUTPUT_DIRECTORY =
Expand Down
14 changes: 0 additions & 14 deletions include/enjinsdk/models/BalanceFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ class ENJINSDK_EXPORT BalanceFilter : public serialization::ISerializable {
/// \return This filter for chaining.
BalanceFilter& set_or(const std::vector<BalanceFilter>& others);

/// \brief Sets the project UUID to filter for.
/// \param project_uuid The project UUID.
/// \return This filter for chaining.
BalanceFilter& set_project_uuid(const std::string& project_uuid);

/// \brief Sets the project UUIDs to filter for.
/// \param project_uuids The project UUIDs.
/// \return This filter for chaining.
BalanceFilter& set_project_uuid_in(const std::vector<std::string>& project_uuids);

/// \brief Sets the asset ID to filter for.
/// \param asset_id The asset ID.
/// \return This filter for chaining.
Expand Down Expand Up @@ -92,8 +82,6 @@ class ENJINSDK_EXPORT BalanceFilter : public serialization::ISerializable {
private:
std::optional<std::vector<BalanceFilter>> and_filters;
std::optional<std::vector<BalanceFilter>> or_filters;
std::optional<std::string> project_uuid;
std::optional<std::vector<std::string>> project_uuid_in;
std::optional<std::string> asset_id;
std::optional<std::vector<std::string>> asset_id_in;
std::optional<std::string> wallet;
Expand All @@ -103,8 +91,6 @@ class ENJINSDK_EXPORT BalanceFilter : public serialization::ISerializable {

constexpr static char AND_KEY[] = "and";
constexpr static char OR_KEY[] = "or";
constexpr static char PROJECT_UUID_KEY[] = "projectUuid";
constexpr static char PROJECT_UUID_IN_KEY[] = "projectUuid_in";
constexpr static char ASSET_ID_KEY[] = "assetId";
constexpr static char ASSET_ID_IN_KEY[] = "assetId_in";
constexpr static char WALLET_KEY[] = "wallet";
Expand Down
16 changes: 0 additions & 16 deletions src/models/BalanceFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ std::string BalanceFilter::serialize() const {
if (or_filters.has_value()) {
utils::set_array_member_from_type_vector<BalanceFilter>(document, OR_KEY, or_filters.value());
}
if (project_uuid.has_value()) {
utils::set_string_member(document, PROJECT_UUID_KEY, project_uuid.value());
}
if (project_uuid_in.has_value()) {
utils::set_array_member_from_string_vector(document, PROJECT_UUID_IN_KEY, project_uuid_in.value());
}
if (asset_id.has_value()) {
utils::set_string_member(document, ASSET_ID_KEY, asset_id.value());
}
Expand Down Expand Up @@ -67,16 +61,6 @@ BalanceFilter& BalanceFilter::set_or(const std::vector<BalanceFilter>& others) {
return *this;
}

BalanceFilter& BalanceFilter::set_project_uuid(const std::string& project_uuid) {
BalanceFilter::project_uuid = project_uuid;
return *this;
}

BalanceFilter& BalanceFilter::set_project_uuid_in(const std::vector<std::string>& project_uuids) {
project_uuid_in = project_uuids;
return *this;
}

BalanceFilter& BalanceFilter::set_asset_id(const std::string& asset_id) {
BalanceFilter::asset_id = asset_id;
return *this;
Expand Down
6 changes: 1 addition & 5 deletions test/unit/models/BalanceFilterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ class BalanceFilterTest : public JsonTestSuite,
BalanceFilter class_under_test;

constexpr static char POPULATED_JSON_OBJECT[] =
R"({"and":[],"or":[],"projectUuid":"1","projectUuid_in":[],"assetId":"1","assetId_in":[],"wallet":"1","wallet_in":[],"value":1,"value_is":"GREATER_THAN"})";
R"({"and":[],"or":[],"assetId":"1","assetId_in":[],"wallet":"1","wallet_in":[],"value":1,"value_is":"GREATER_THAN"})";

static BalanceFilter create_default_filter() {
return BalanceFilter().set_and(std::vector<BalanceFilter>())
.set_or(std::vector<BalanceFilter>())
.set_project_uuid("1")
.set_project_uuid_in(std::vector<std::string>())
.set_asset_id("1")
.set_asset_id_in(std::vector<std::string>())
.set_wallet("1")
Expand All @@ -60,8 +58,6 @@ TEST_F(BalanceFilterTest, SerializeSetFieldsReturnsExpectedJsonObject) {
const std::string expected(POPULATED_JSON_OBJECT);
class_under_test.set_and(std::vector<BalanceFilter>())
.set_or(std::vector<BalanceFilter>())
.set_project_uuid("1")
.set_project_uuid_in(std::vector<std::string>())
.set_asset_id("1")
.set_asset_id_in(std::vector<std::string>())
.set_wallet("1")
Expand Down

0 comments on commit 6a847ec

Please sign in to comment.