Skip to content

Commit da87584

Browse files
tomazt-srzb-sr
authored andcommitted
Added a new operation [InterventionInform], additional fields, added to all operation signature and enhanced JSON subtypes.
1 parent 38a5b2e commit da87584

16 files changed

+587
-21
lines changed

src/.idea/.gitignore

-1
This file was deleted.

src/sdk/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.xml.releaseBackup
2-
target
2+
target
3+
.idea

src/sdk/src/main/java/com/sportradar/mbs/sdk/entities/common/BalanceMoveStatus.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
public enum BalanceMoveStatus {
1111
APPROVED("approved"),
1212
PENDING("pending"),
13-
REJECTED("rejected");
13+
REJECTED("rejected"),
14+
CANCELLED("cancelled");
1415

1516
private static final Map<String, BalanceMoveStatus> VALUES = new HashMap();
1617

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
package com.sportradar.mbs.sdk.entities.common;
2+
3+
import com.fasterxml.jackson.annotation.JsonCreator;
4+
import com.fasterxml.jackson.annotation.JsonValue;
5+
6+
import java.util.HashMap;
7+
import java.util.Map;
8+
9+
/**
10+
* Enum representing different intervention methods.
11+
*/
12+
public enum Method {
13+
POPUP("pop-up"), // Pop-up notification method
14+
RG_MESSAGING("rg-messaging"), // Responsible gaming messaging method
15+
EMAIL("email"), // Email notification method
16+
LIMIT_UPDATE("limits-update"), // Limit update method
17+
CARE_CALL("care-call"), // Care call method
18+
OTHER("other"); // Other unspecified method
19+
20+
private static final Map<String, Method> VALUES = new HashMap<>();
21+
22+
static {
23+
// Populating the mapping of string values to enum constants
24+
for (final Method lt : values()) {
25+
VALUES.put(lt.value, lt);
26+
}
27+
}
28+
29+
private final String value;
30+
31+
/**
32+
* Constructor for Method enum.
33+
*
34+
* @param value The string representation of the method.
35+
*/
36+
Method(final String value) {
37+
this.value = value;
38+
}
39+
40+
/**
41+
* Converts a string value to its corresponding Method enum.
42+
*
43+
* @param value The string representation of the method.
44+
* @return The corresponding Method enum or null if not found.
45+
*/
46+
@JsonCreator
47+
public static Method fromValue(final String value) {
48+
return value == null ? null : VALUES.get(value);
49+
}
50+
51+
/**
52+
* Returns the string representation of the Method enum.
53+
*
54+
* @return The string value of the method.
55+
*/
56+
@Override
57+
public String toString() {
58+
return this.value;
59+
}
60+
61+
/**
62+
* Gets the string value associated with the enum.
63+
*
64+
* @return The string representation of the method.
65+
*/
66+
@JsonValue
67+
public String value() {
68+
return this.value;
69+
}
70+
}

src/sdk/src/main/java/com/sportradar/mbs/sdk/entities/request/ContentRequest.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727
@JsonSubTypes.Type(value = WithdrawalInformRequest.class, name = "withdrawal-inform"),
2828
@JsonSubTypes.Type(value = ExtSettlementAckRequest.class, name = "ext-settlement-ack"),
2929
@JsonSubTypes.Type(value = BalanceChangeInformRequest.class, name = "balance-change-inform"),
30-
@JsonSubTypes.Type(value = MaxStakeRequest.class, name = "max-stake")
30+
@JsonSubTypes.Type(value = MaxStakeRequest.class, name = "max-stake"),
31+
@JsonSubTypes.Type(value = AccountStatusInformRequest.class, name = "account-status-inform"),
32+
@JsonSubTypes.Type(value = FinancialLimitInformRequest.class, name = "financial-limit-inform"),
33+
@JsonSubTypes.Type(value = LimitReachedInformRequest.class, name = "limit-reached-inform"),
34+
@JsonSubTypes.Type(value = SessionLimitInformRequest.class, name = "session-limit-inform"),
35+
@JsonSubTypes.Type(value = InterventionInformRequest.class, name = "intervention-inform")
3136
})
3237
public class ContentRequest {
3338

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
package com.sportradar.mbs.sdk.entities.request;
2+
3+
import com.sportradar.mbs.sdk.entities.common.Method;
4+
import com.sportradar.mbs.sdk.entities.common.EndCustomer;
5+
import com.fasterxml.jackson.annotation.JsonProperty;
6+
7+
/**
8+
* Represents a request entity for an intervention inform request.
9+
* This class extends ContentRequest and includes method, model initiation flag, end customer, and a comment.
10+
*/
11+
public class InterventionInformRequest extends ContentRequest {
12+
13+
@JsonProperty("method")
14+
private Method method; // The method associated with the intervention request
15+
16+
@JsonProperty("modelInitiated")
17+
private boolean modelInitiated; // Flag indicating if the model initiated the request
18+
19+
@JsonProperty("endCustomer")
20+
private EndCustomer endCustomer; // Details of the end customer involved in the request
21+
22+
@JsonProperty("comment")
23+
private String comment; // Additional comment or description related to the request
24+
25+
/**
26+
* Gets the method associated with the request.
27+
*
28+
* @return The method of the request.
29+
*/
30+
public Method getMethod() {
31+
return this.method;
32+
}
33+
34+
/**
35+
* Sets the method for the request.
36+
*
37+
* @param value The method to set.
38+
*/
39+
public void setMethod(Method value) {
40+
this.method = value;
41+
}
42+
43+
/**
44+
* Gets the model initiated flag.
45+
*
46+
* @return True if the model initiated the request, false otherwise.
47+
*/
48+
public boolean getModelInitiated() {
49+
return this.modelInitiated;
50+
}
51+
52+
/**
53+
* Sets whether the model initiated the request.
54+
*
55+
* @param value True if the model initiated the request, false otherwise.
56+
*/
57+
public void setModelInitiated(boolean value) {
58+
this.modelInitiated = value;
59+
}
60+
61+
/**
62+
* Gets the end customer associated with the request.
63+
*
64+
* @return The end customer details.
65+
*/
66+
public EndCustomer getEndCustomer() {
67+
return this.endCustomer;
68+
}
69+
70+
/**
71+
* Sets the end customer details for the request.
72+
*
73+
* @param value The end customer to set.
74+
*/
75+
public void setEndCustomer(EndCustomer value) {
76+
this.endCustomer = value;
77+
}
78+
79+
/**
80+
* Gets the comment associated with the request.
81+
*
82+
* @return The request comment.
83+
*/
84+
public String getComment() {
85+
return this.comment;
86+
}
87+
88+
/**
89+
* Sets the comment for the request.
90+
*
91+
* @param value The comment to set.
92+
*/
93+
public void setComment(String value) {
94+
this.comment = value;
95+
}
96+
97+
/**
98+
* Creates a new Builder instance for constructing an InterventionInformRequest object.
99+
*
100+
* @return A new Builder instance.
101+
*/
102+
public static Builder newBuilder() {
103+
return new Builder();
104+
}
105+
106+
/**
107+
* Builder class for creating instances of InterventionInformRequest.
108+
*/
109+
public static class Builder {
110+
111+
private final InterventionInformRequest instance = new InterventionInformRequest();
112+
113+
/**
114+
* Private constructor to prevent direct instantiation.
115+
*/
116+
private Builder() {
117+
}
118+
119+
/**
120+
* Builds and returns the InterventionInformRequest object.
121+
*
122+
* @return The constructed InterventionInformRequest object.
123+
*/
124+
public InterventionInformRequest build() {
125+
return this.instance;
126+
}
127+
128+
/**
129+
* Sets the method in the builder instance.
130+
*
131+
* @param value The method to set.
132+
* @return The Builder instance for method chaining.
133+
*/
134+
public Builder setMethod(Method value) {
135+
this.instance.setMethod(value);
136+
return this;
137+
}
138+
139+
/**
140+
* Sets the model initiation flag in the builder instance.
141+
*
142+
* @param value The model initiation flag to set.
143+
* @return The Builder instance for method chaining.
144+
*/
145+
public Builder setModelInitiated(boolean value) {
146+
this.instance.setModelInitiated(value);
147+
return this;
148+
}
149+
150+
/**
151+
* Sets the end customer in the builder instance.
152+
*
153+
* @param value The end customer to set.
154+
* @return The Builder instance for method chaining.
155+
*/
156+
public Builder setEndCustomer(EndCustomer value) {
157+
this.instance.setEndCustomer(value);
158+
return this;
159+
}
160+
161+
/**
162+
* Sets the comment in the builder instance.
163+
*
164+
* @param value The comment to set.
165+
* @return The Builder instance for method chaining.
166+
*/
167+
public Builder setComment(String value) {
168+
this.instance.setComment(value);
169+
return this;
170+
}
171+
}
172+
}

src/sdk/src/main/java/com/sportradar/mbs/sdk/entities/response/BalanceChangeInformResponse.java

+30
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@ public class BalanceChangeInformResponse extends ContentResponse {
1111
private int code;
1212
@JsonProperty("message")
1313
private String message;
14+
@JsonProperty("signature")
15+
private String signature; // Signature for authentication or verification
16+
17+
/**
18+
* Retrieves the signature.
19+
*
20+
* @return the signature string
21+
*/
22+
public String getSignature() {
23+
return this.signature;
24+
}
25+
26+
/**
27+
* Sets the signature.
28+
*
29+
* @param value the signature to set
30+
*/
31+
public void setSignature(String value) {
32+
this.signature = value;
33+
}
1434

1535
/**
1636
* Creates a new instance of the BalanceChangeInformResponse class.
@@ -96,5 +116,15 @@ public Builder setMessage(String value) {
96116
this.instance.setMessage(value);
97117
return this;
98118
}
119+
120+
/**
121+
* Sets the signature.
122+
*
123+
* @param value the signature to set
124+
*/
125+
public void setSignature(String value) {
126+
this.instance.signature = value;
127+
}
128+
99129
}
100130
}

src/sdk/src/main/java/com/sportradar/mbs/sdk/entities/response/CasinoSessionsResponse.java

+31
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,27 @@ public class CasinoSessionsResponse extends ContentResponse {
1212
@JsonProperty("message")
1313
private String message;
1414

15+
@JsonProperty("signature")
16+
private String signature; // Signature for authentication or verification
17+
18+
/**
19+
* Retrieves the signature.
20+
*
21+
* @return the signature string
22+
*/
23+
public String getSignature() {
24+
return this.signature;
25+
}
26+
27+
/**
28+
* Sets the signature.
29+
*
30+
* @param value the signature to set
31+
*/
32+
public void setSignature(String value) {
33+
this.signature = value;
34+
}
35+
1536
/**
1637
* Creates a new instance of the CasinoSessionsResponse.Builder class.
1738
*
@@ -97,5 +118,15 @@ public Builder setMessage(String value) {
97118
this.instance.setMessage(value);
98119
return this;
99120
}
121+
122+
/**
123+
* Sets the signature.
124+
*
125+
* @param value the signature to set
126+
*/
127+
public void setSignature(String value) {
128+
this.instance.signature = value;
129+
}
130+
100131
}
101132
}

src/sdk/src/main/java/com/sportradar/mbs/sdk/entities/response/ContentResponse.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@
2727
@JsonSubTypes.Type(value = CashoutAckResponse.class, name = "cashout-ack-reply"),
2828
@JsonSubTypes.Type(value = TicketResponse.class, name = "ticket-reply"),
2929
@JsonSubTypes.Type(value = WithdrawalInformResponse.class, name = "withdrawal-inform-reply"),
30-
@JsonSubTypes.Type(value = MaxStakeResponse.class, name = "max-stake-reply")
30+
@JsonSubTypes.Type(value = MaxStakeResponse.class, name = "max-stake-reply"),
31+
@JsonSubTypes.Type(value = AccountStatusInformResponse.class, name = "account-status-inform-reply"),
32+
@JsonSubTypes.Type(value = FinancialLimitInformResponse.class, name = "financial-limit-inform-reply"),
33+
@JsonSubTypes.Type(value = LimitReachedInformResponse.class, name = "limit-reached-inform-reply"),
34+
@JsonSubTypes.Type(value = SessionLimitInformResponse.class, name = "session-limit-inform-reply"),
35+
@JsonSubTypes.Type(value = InterventionInformResponse.class, name = "intervention-inform-reply")
36+
3137
})
3238
public class ContentResponse {
3339

0 commit comments

Comments
 (0)