Commit 2e2078ed authored by Bert T.'s avatar Bert T.

Version 0.5 Update

parent 545f0f0e
......@@ -5,7 +5,7 @@
<parent>
<groupId>co.melondev</groupId>
<artifactId>CubedPay</artifactId>
<version>0.4.6</version>
<version>0.5</version>
</parent>
<artifactId>CubedPay-bukkit</artifactId>
......@@ -21,7 +21,7 @@
<dependency>
<groupId>co.melondev</groupId>
<artifactId>CubedPay-common</artifactId>
<version>0.4.6</version>
<version>0.5</version>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>co.melondev</groupId>
<artifactId>CubedPay</artifactId>
<version>0.4.6</version>
<version>0.5</version>
</parent>
<artifactId>CubedPay-bungeecord</artifactId>
......@@ -21,7 +21,7 @@
<dependency>
<groupId>co.melondev</groupId>
<artifactId>CubedPay-common</artifactId>
<version>0.4.6</version>
<version>0.5</version>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>co.melondev</groupId>
<artifactId>CubedPay</artifactId>
<version>0.4.6</version>
<version>0.5</version>
</parent>
<artifactId>CubedPay-common</artifactId>
......
......@@ -155,6 +155,20 @@ public interface CubedPayShopAPI {
CompletableFuture<ShopTheme> setShopTheme(@Path("sid") String shopId, @Query("theme") String themeId);
//endregion
//region Colors
@GET("/shop/{sid}/colors")
CompletableFuture<Cursor<ShopColors>> getShopColors(@Path("sid") String shopId, @Query("page") int page, @Query("perpage") int perPage);
@PUT("/shop/{sid}/colors")
CompletableFuture<ShopColors> setShopColors(@Path("sid") String shopId, @Query("colors") String colorId);
@POST("/shop/{sid}/colors")
CompletableFuture<ShopColors> createShopColors(@Path("sid") String shopId, @Query("data") String colorData, @Query("name") String name, @Query("activate") boolean activate);
@POST("/shop/{sid}/colors/{cid}/update")
CompletableFuture<ShopColors> updateShopColors(@Path("sid") String shopId, @Path("cid") String colorId);
//endregion
//region Sales
@GET("/shop/{sid}/sale")
CompletableFuture<Cursor<ShopSale>> getSales(@Path("sid") String shopId, @Query("page") int page, @Query("perpage") int perPage);
......
......@@ -24,13 +24,18 @@ public class PublicShop {
private String id;
private String url;
private String custom_url;
private String name;
private UploadedImage logo;
private boolean sandboxMode;
private boolean sandbox_mode;
private ShopTheme theme;
private String template;
private String homeText;
private ShopPlan plan;
private List<PublicGateway> activeGateways;
private List<ShopSale> activeSales;
private ShopColors colors;
private Currency currency;
public String getId() {
return id;
......@@ -40,6 +45,10 @@ public class PublicShop {
return url;
}
public String getCustomUrl() {
return custom_url;
}
public String getName() {
return name;
}
......@@ -49,17 +58,25 @@ public class PublicShop {
}
public boolean isSandboxMode() {
return sandboxMode;
return sandbox_mode;
}
public ShopTheme getTheme() {
return theme;
}
public String getTemplate() {
return template;
}
public String getHomeText() {
return homeText;
}
public ShopPlan getPlan() {
return plan;
}
public List<PublicGateway> getActiveGateways() {
return activeGateways;
}
......@@ -67,4 +84,9 @@ public class PublicShop {
public List<ShopSale> getActiveSales() {
return activeSales;
}
public Currency getCurrency() {
return currency;
}
}
......@@ -7,15 +7,21 @@ public class Shop {
private String id = "";
private String url = "";
private String customUrl = "";
private String name = "";
private UploadedImage logo = new UploadedImage();
private boolean active = false;
private boolean disabled = false;
private boolean sandbox_mode = true;
private String disabled_reason = "";
private Game game = new Game();
private String time_zone = "";
private String template = "";
private String home_text = "";
private List<User> members = new ArrayList<>();
private List<Gateway> gateways = new ArrayList<>();
private ShopTheme theme;
private ShopColors colors;
private ShopPlan plan;
private Currency currency;
......@@ -27,6 +33,10 @@ public class Shop {
return url;
}
public String getCustomUrl() {
return customUrl;
}
public String getName() {
return name;
}
......@@ -43,6 +53,10 @@ public class Shop {
return disabled;
}
public boolean isSandboxMode() {
return sandbox_mode;
}
public String getDisabledReason() {
return disabled_reason;
}
......@@ -55,10 +69,26 @@ public class Shop {
return time_zone;
}
public String getTemplate() {
return template;
}
public String getHomeText() {
return home_text;
}
public List<User> getMembers() {
return members;
}
public ShopTheme getTheme() {
return theme;
}
public ShopColors getColors() {
return colors;
}
public List<Gateway> getGateways() {
return gateways;
}
......
package co.melondev.cubedpay.data;
public class ShopColors {
private String id;
private String name;
private String data;
public String getId() {
return id;
}
public String getName() {
return name;
}
public String getData() {
return data;
}
}
\ No newline at end of file
......@@ -7,7 +7,8 @@ import java.util.Arrays;
public class ShopPage {
public enum Type {
BASIC;
BASIC,
SMART;
public static Type findById(String id) {
return Arrays.stream(values()).filter(status -> status.name().equalsIgnoreCase(id))
......
......@@ -11,7 +11,8 @@ public class ShopSidebarModule {
HTML,
PROMOTED,
CART,
ACCOUNT;
ACCOUNT,
TEXT;
public static Type findById(String id) {
return Arrays.stream(values()).filter(status -> status.name().equalsIgnoreCase(id))
......
package co.melondev.cubedpay.data;
import com.google.gson.annotations.SerializedName;
public class ShopTheme {
private String id;
@SerializedName("default")
private boolean isDefault;
private String name;
private String css;
......
......@@ -12,6 +12,7 @@ public class User {
private String firstName = "";
private String lastName = "";
private String email = "";
private UploadedImage avatar = new UploadedImage();
private Date memberSince = new Date();
private List<UserProfile> profiles = new ArrayList<>();
......@@ -35,6 +36,10 @@ public class User {
return email;
}
public UploadedImage getAvatar() {
return avatar;
}
public Date getMemberSince() {
return memberSince;
}
......
......@@ -4,7 +4,7 @@
<groupId>co.melondev</groupId>
<artifactId>CubedPay</artifactId>
<version>0.4.6</version>
<version>0.5</version>
<packaging>pom</packaging>
<properties>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>co.melondev</groupId>
<artifactId>CubedPay</artifactId>
<version>0.4.6</version>
<version>0.5</version>
</parent>
<artifactId>CubedPay-sponge</artifactId>
......@@ -21,7 +21,7 @@
<dependency>
<groupId>co.melondev</groupId>
<artifactId>CubedPay-common</artifactId>
<version>0.4.6</version>
<version>0.5</version>
</dependency>
<dependency>
<groupId>org.spongepowered</groupId>
......
......@@ -19,7 +19,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@Plugin(id = "cubedpayplugin", name = "CubedPayPlugin", version = "0.4.5", authors = {"Melon Development"}, url = "https://cubedpay.com/")
@Plugin(id = "cubedpayplugin", name = "CubedPayPlugin", version = "0.5", authors = {"Melon Development"}, url = "https://cubedpay.com/")
public class CubedPayPlugin {
private static CubedPayAPI api;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment