PHP Class Bitpay\Item

Inheritance: implements bitpay\ItemInterface
Exibir arquivo Open project: bitpay/php-client Class Usage Examples

Protected Properties

Property Type Description
$code string
$description string
$physical boolean
$price float
$quantity integer

Public Methods

Method Description
__construct ( )
getCode ( )
getDescription ( )
getPrice ( ) : float
getQuantity ( )
isPhysical ( )
setCode ( string $code ) : bitpay\ItemInterface
setDescription ( string $description ) : bitpay\ItemInterface
setPhysical ( boolean $physical ) : bitpay\ItemInterface
setPrice ( mixed $price ) : bitpay\ItemInterface
setQuantity ( integer $quantity ) : bitpay\ItemInterface

Protected Methods

Method Description
checkPriceFormat ( string $price ) Checks the new price to include BTC values with more than 6 decimals.

Method Details

__construct() public method

public __construct ( )

checkPriceFormat() protected method

Checks the new price to include BTC values with more than 6 decimals.
protected checkPriceFormat ( string $price )
$price string The price value to check

getCode() public method

public getCode ( )

getDescription() public method

public getDescription ( )

getPrice() public method

public getPrice ( ) : float
return float

getQuantity() public method

public getQuantity ( )

isPhysical() public method

public isPhysical ( )

setCode() public method

public setCode ( string $code ) : bitpay\ItemInterface
$code string
return bitpay\ItemInterface

setDescription() public method

public setDescription ( string $description ) : bitpay\ItemInterface
$description string
return bitpay\ItemInterface

setPhysical() public method

public setPhysical ( boolean $physical ) : bitpay\ItemInterface
$physical boolean
return bitpay\ItemInterface

setPrice() public method

public setPrice ( mixed $price ) : bitpay\ItemInterface
$price mixed A float, integer, or en_US formatted numeric string
return bitpay\ItemInterface

setQuantity() public method

public setQuantity ( integer $quantity ) : bitpay\ItemInterface
$quantity integer
return bitpay\ItemInterface

Property Details

$code protected_oe property

protected string $code
return string

$description protected_oe property

protected string $description
return string

$physical protected_oe property

protected bool $physical
return boolean

$price protected_oe property

protected float $price
return float

$quantity protected_oe property

protected int $quantity
return integer