Skip to content

Commit

Permalink
additional odds formats
Browse files Browse the repository at this point in the history
  • Loading branch information
zb-sr committed Nov 21, 2024
1 parent 4586b8c commit 7c04a12
Show file tree
Hide file tree
Showing 8 changed files with 448 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
package com.sportradar.mbs.sdk.entities.odds;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigInteger;

/**
* Represents fractional odds.
*/
public class FractionalOdds extends Odds {

@JsonProperty("numerator")
private BigInteger numerator;
@JsonProperty("denominator")
private BigInteger denominator;

/**
* Creates a new instance of the FractionalOdds.Builder class.
*
* @return A new instance of the FractionalOdds.Builder class.
*/
public static Builder newBuilder() {
return new Builder();
}

/**
* Gets the value of the numerator (top, first part) of the fractional odds.
*
* @return The value of the numerator.
*/
public BigInteger getNumerator() {
return this.numerator;
}

/**
* Sets the value of the numerator (top, first part) of the fractional odds.
*
* @param value The value of the decimal odds.
*/
public void setNumerator(BigInteger value) {
this.numerator = value;
}

/**
* Gets the value of the denominator (bottom, last part) of the fractional odds.
*
* @return The value of the denominator.
*/
public BigInteger getDenominator() {
return this.denominator;
}

/**
* Sets the value of the denominator (bottom, last part) of the fractional odds.
*
* @param value The value of the decimal odds.
*/
public void setDenominator(BigInteger value) {
this.denominator = value;
}

public static class Builder {

private final FractionalOdds instance = new FractionalOdds();

private Builder() {
}

/**
* Builds and returns the FractionalOdds instance.
*
* @return The built FractionalOdds instance.
*/
public FractionalOdds build() {
return this.instance;
}

/**
* Sets the value of the denominator (bottom, last part) of the fractional odds.
*
* @param value The value of the denominator (bottom, last part) of the fractional odds.
* @return The FractionalOdds.Builder instance.
*/
public Builder setNumerator(BigInteger value) {
this.instance.setNumerator(value);
return this;
}

/**
* Sets the value of the denominator (bottom, last part) of the fractional odds.
*
* @param value The value of the denominator (bottom, last part) of the fractional odds.
* @return The FractionalOdds.Builder instance.
*/
public Builder setDenominator(BigInteger value) {
this.instance.setDenominator(value);
return this;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.sportradar.mbs.sdk.entities.odds;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigDecimal;

/**
* Represents hong kong odds.
*/
public class HongKongOdds extends Odds {

@JsonProperty("value")
private BigDecimal value;

/**
* Creates a new instance of the HongKongOdds.Builder class.
*
* @return A new instance of the HongKongOdds.Builder class.
*/
public static Builder newBuilder() {
return new Builder();
}

/**
* Gets the value of the hong kong odds.
*
* @return The value of the hong kong odds.
*/
public BigDecimal getValue() {
return this.value;
}

/**
* Sets the value of the hong kong odds.
*
* @param value The value of the hong kong odds.
*/
public void setValue(BigDecimal value) {
this.value = value;
}

public static class Builder {

private final HongKongOdds instance = new HongKongOdds();

private Builder() {
}

/**
* Builds and returns the HongKongOdds instance.
*
* @return The built HongKongOdds instance.
*/
public HongKongOdds build() {
return this.instance;
}

/**
* Sets the value of the hong kong odds.
*
* @param value The value of the hong kong odds.
* @return The HongKongOdds.Builder instance.
*/
public Builder setValue(BigDecimal value) {
this.instance.setValue(value);
return this;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.sportradar.mbs.sdk.entities.odds;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigDecimal;

/**
* Represents indonesian odds.
*/
public class IndonesianOdds extends Odds {

@JsonProperty("value")
private BigDecimal value;

/**
* Creates a new instance of the IndonesianOdds.Builder class.
*
* @return A new instance of the IndonesianOdds.Builder class.
*/
public static Builder newBuilder() {
return new Builder();
}

/**
* Gets the value of the indonesian odds.
*
* @return The value of the indonesian odds.
*/
public BigDecimal getValue() {
return this.value;
}

/**
* Sets the value of the indonesian odds.
*
* @param value The value of the indonesian odds.
*/
public void setValue(BigDecimal value) {
this.value = value;
}

public static class Builder {

private final IndonesianOdds instance = new IndonesianOdds();

private Builder() {
}

/**
* Builds and returns the IndonesianOdds instance.
*
* @return The built IndonesianOdds instance.
*/
public IndonesianOdds build() {
return this.instance;
}

/**
* Sets the value of the indonesian odds.
*
* @param value The value of the indonesian odds.
* @return The IndonesianOdds.Builder instance.
*/
public Builder setValue(BigDecimal value) {
this.instance.setValue(value);
return this;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.sportradar.mbs.sdk.entities.odds;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigDecimal;

/**
* Represents malay odds.
*/
public class MalayOdds extends Odds {

@JsonProperty("value")
private BigDecimal value;

/**
* Creates a new instance of the MalayOdds.Builder class.
*
* @return A new instance of the MalayOdds.Builder class.
*/
public static Builder newBuilder() {
return new Builder();
}

/**
* Gets the value of the malay odds.
*
* @return The value of the malay odds.
*/
public BigDecimal getValue() {
return this.value;
}

/**
* Sets the value of the malay odds.
*
* @param value The value of the malay odds.
*/
public void setValue(BigDecimal value) {
this.value = value;
}

public static class Builder {

private final MalayOdds instance = new MalayOdds();

private Builder() {
}

/**
* Builds and returns the MalayOdds instance.
*
* @return The built MalayOdds instance.
*/
public MalayOdds build() {
return this.instance;
}

/**
* Sets the value of the malay odds.
*
* @param value The value of the malay odds.
* @return The MalayOdds.Builder instance.
*/
public Builder setValue(BigDecimal value) {
this.instance.setValue(value);
return this;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.sportradar.mbs.sdk.entities.odds;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigInteger;

/**
* Represents moneyline (american) odds.
*/
public class MoneylineOdds extends Odds {

@JsonProperty("value")
private BigInteger value;

/**
* Creates a new instance of the MoneylineOdds.Builder class.
*
* @return A new instance of the MoneylineOdds.Builder class.
*/
public static Builder newBuilder() {
return new Builder();
}

/**
* Gets the value of the moneyline odds.
*
* @return The value of the moneyline odds.
*/
public BigInteger getValue() {
return this.value;
}

/**
* Sets the value of the moneyline odds.
*
* @param value The value of the moneyline odds.
*/
public void setValue(BigInteger value) {
this.value = value;
}

public static class Builder {

private final MoneylineOdds instance = new MoneylineOdds();

private Builder() {
}

/**
* Builds and returns the MoneylineOdds instance.
*
* @return The built MoneylineOdds instance.
*/
public MoneylineOdds build() {
return this.instance;
}

/**
* Sets the value of the moneyline odds.
*
* @param value The value of the moneyline odds.
* @return The MoneylineOdds.Builder instance.
*/
public Builder setValue(BigInteger value) {
this.instance.setValue(value);
return this;
}
}
}
Loading

0 comments on commit 7c04a12

Please sign in to comment.