2017 © Pedro Peláez
 

package bet

Bet package

image

benasg/bet

Bet package

  • Tuesday, May 29, 2018
  • by Benasg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 20 % Grown

The README.md

Bet

Betslip validation composer package, (*1)

Install

composer require benasg/bet

Usage

use Benasg\Bet\Bet;

$response = (new Bet)->make($betslip);

Betslip example

$betslip = [
    // type: int
    // (mandatory) unique player id in the system
    'player_id' => 1,

    // type: float
    // (mandatory) amount of money player wants to bet
    'stake_amount' => 10,

    // type: array
    // (optional) error codes of betslip level errors
    'errors' => [],

    // type: array
    // (mandatory) selection (events) on which player wants to bet
    'selections' => [
        [
            // type: int
            // (mandatory) selection (event) ID on which player want to bet
            'id' => 1,

            // type: float, max number of numbers after dot is 3
            // (mandatory) odds (coefficient) of our selection,
            'odds' => 1.601,

            // type: array
            // (optional) error codes of selection level errors
            'errors' => [],
        ],
        [
            // type: int
            // (mandatory) selection (event) ID on which player want to bet
            'id' => 2,

            // type: float, max number of numbers after dot is 3
            // (mandatory) odds (coefficient) of our selection,
            'odds' => 1.601,

            // type: array
            // (optional) error codes of selection level errors
            'errors' => [],
        ],
    ],
];

Available methods

isSuccess();
getBetslip();
getBetslip()->isValid();
getBetslip()->getBetslipArray();
getBetslip()->getPlayerId();
getBetslip()->getStakeAmount();
getBetslip()->getSelections();
getBetslip()->getExpectedWin();
getBetslip()->getGlobalErrors();
getBetslip()->getSelectionErrors();
getBetslip()->getErrors();

The Versions

29/05 2018

dev-master

9999999-dev

Bet package

  Sources   Download

The Requires

 

The Development Requires

by Benas