PHP Class Bitpay\Client\Client

Inheritance: implements Bitpay\Client\ClientInterface
Afficher le fichier Open project: bitpay/php-client Class Usage Examples

Protected Properties

Свойство Type Description
$adapter Bitpay\Client\Adapter\AdapterInterface
$network Bitpay\Network\NetworkInterface
$privateKey Bitpay\PrivateKey
$publicKey Bitpay\PublicKey
$request Bitpay\Client\RequestInterface
$response Bitpay\Client\ResponseInterface
$token Bitpay\TokenInterface

Méthodes publiques

Méthode Description
createInvoice ( Bitpay\InvoiceInterface $invoice )
createPayout ( Bitpay\PayoutInterface $payout )
createToken ( array $payload = [] )
deletePayout ( Bitpay\PayoutInterface $payout )
getCurrencies ( )
getInvoice ( $invoiceId )
getPayout ( $payoutId )
getPayouts ( $status = null )
getRequest ( ) : Bitpay\Client\RequestInterface Returns the request object that was sent to BitPay
getResponse ( ) : Bitpay\Client\ResponseInterface Returns the Response object that BitPay returned from the request that was sent
getTokens ( )
sendRequest ( Bitpay\Client\RequestInterface $request ) : Bitpay\Client\ResponseInterface
setAdapter ( Bitpay\Client\Adapter\AdapterInterface $adapter )
setNetwork ( Bitpay\Network\NetworkInterface $network ) The network is either livenet or testnet and tells the client where to send the requests.
setPrivateKey ( PrivateKey $key ) Set the Private Key to use, this is used when signing request strings
setPublicKey ( PublicKey $key ) Set the Public Key to use to help identify who you are to BitPay. Please note that you must first pair your keys and get a token in return to use.
setToken ( Bitpay\TokenInterface $token ) : Bitpay\Client\ClientInterface

Méthodes protégées

Méthode Description
addIdentityHeader ( Bitpay\Client\RequestInterface $request )
addSignatureHeader ( Bitpay\Client\RequestInterface $request )
checkPriceAndCurrency ( $price, $currency )
createNewRequest ( ) : Bitpay\Client\RequestInterface
prepareRequestHeaders ( Bitpay\Client\RequestInterface $request ) Prepares the request object by adding additional headers

Method Details

addIdentityHeader() protected méthode

protected addIdentityHeader ( Bitpay\Client\RequestInterface $request )
$request Bitpay\Client\RequestInterface

addSignatureHeader() protected méthode

protected addSignatureHeader ( Bitpay\Client\RequestInterface $request )
$request Bitpay\Client\RequestInterface

checkPriceAndCurrency() protected méthode

protected checkPriceAndCurrency ( $price, $currency )

createInvoice() public méthode

public createInvoice ( Bitpay\InvoiceInterface $invoice )
$invoice Bitpay\InvoiceInterface

createNewRequest() protected méthode

protected createNewRequest ( ) : Bitpay\Client\RequestInterface
Résultat Bitpay\Client\RequestInterface

createPayout() public méthode

public createPayout ( Bitpay\PayoutInterface $payout )
$payout Bitpay\PayoutInterface

createToken() public méthode

public createToken ( array $payload = [] )
$payload array

deletePayout() public méthode

public deletePayout ( Bitpay\PayoutInterface $payout )
$payout Bitpay\PayoutInterface

getCurrencies() public méthode

public getCurrencies ( )

getInvoice() public méthode

public getInvoice ( $invoiceId )

getPayout() public méthode

public getPayout ( $payoutId )

getPayouts() public méthode

public getPayouts ( $status = null )

getRequest() public méthode

Returns the request object that was sent to BitPay
public getRequest ( ) : Bitpay\Client\RequestInterface
Résultat Bitpay\Client\RequestInterface

getResponse() public méthode

Returns the Response object that BitPay returned from the request that was sent
public getResponse ( ) : Bitpay\Client\ResponseInterface
Résultat Bitpay\Client\ResponseInterface

getTokens() public méthode

public getTokens ( )

prepareRequestHeaders() protected méthode

Prepares the request object by adding additional headers
protected prepareRequestHeaders ( Bitpay\Client\RequestInterface $request )
$request Bitpay\Client\RequestInterface

sendRequest() public méthode

public sendRequest ( Bitpay\Client\RequestInterface $request ) : Bitpay\Client\ResponseInterface
$request Bitpay\Client\RequestInterface
Résultat Bitpay\Client\ResponseInterface

setAdapter() public méthode

public setAdapter ( Bitpay\Client\Adapter\AdapterInterface $adapter )
$adapter Bitpay\Client\Adapter\AdapterInterface

setNetwork() public méthode

The network is either livenet or testnet and tells the client where to send the requests.
public setNetwork ( Bitpay\Network\NetworkInterface $network )
$network Bitpay\Network\NetworkInterface

setPrivateKey() public méthode

Set the Private Key to use, this is used when signing request strings
public setPrivateKey ( PrivateKey $key )
$key Bitpay\PrivateKey

setPublicKey() public méthode

Set the Public Key to use to help identify who you are to BitPay. Please note that you must first pair your keys and get a token in return to use.
public setPublicKey ( PublicKey $key )
$key Bitpay\PublicKey

setToken() public méthode

public setToken ( Bitpay\TokenInterface $token ) : Bitpay\Client\ClientInterface
$token Bitpay\TokenInterface
Résultat Bitpay\Client\ClientInterface

Property Details

$adapter protected_oe property

protected AdapterInterface,Bitpay\Client\Adapter $adapter
Résultat Bitpay\Client\Adapter\AdapterInterface

$network protected_oe property

protected NetworkInterface,Bitpay\Network $network
Résultat Bitpay\Network\NetworkInterface

$privateKey protected_oe property

protected PrivateKey,Bitpay $privateKey
Résultat Bitpay\PrivateKey

$publicKey protected_oe property

protected PublicKey,Bitpay $publicKey
Résultat Bitpay\PublicKey

$request protected_oe property

protected RequestInterface,Bitpay\Client $request
Résultat Bitpay\Client\RequestInterface

$response protected_oe property

protected ResponseInterface,Bitpay\Client $response
Résultat Bitpay\Client\ResponseInterface

$token protected_oe property

protected TokenInterface,Bitpay $token
Résultat Bitpay\TokenInterface