src/Resource/Payment.php
public function setBoleto($expirationDate, $logoUri, array $instructionLines = [])
    {
        $keys = ['first', 'second', 'third'];

        if (empty($instructionLines)) {
            //Avoid warning in array_combine
            $instructionLines = ['', '', ''];
        }

        if ($expirationDate instanceof \DateTime) {
            $expirationDate = $expirationDate->format('Y-m-d');
        }

        $this->data->fundingInstrument->method = self::METHOD_BOLETO;
        $this->data->fundingInstrument->boleto = new stdClass();
        $this->data->fundingInstrument->boleto->expirationDate = $expirationDate;
        $this->data->fundingInstrument->boleto->instructionLines = array_combine($keys, $instructionLines);
        $this->data->fundingInstrument->boleto->logoUri = $logoUri;

        return $this;
    }
public function setBoleto($expirationDate, $logoUri, array $instructionLines = [])
    {
        $keys = ['first', 'second', 'third'];

        if (empty($instructionLines)) {
            //Avoid warning in array_combine
            $instructionLines = ['', '', ''];
        }

        if ($expirationDate instanceof \DateTime) {
            $expirationDate = $expirationDate->format('Y-m-d');
        }

        $this->data->fundingInstrument->method = self::METHOD_BOLETO;
        $this->data->fundingInstrument->boleto = new stdClass();
        $this->data->fundingInstrument->boleto->expirationDate = $expirationDate;
        $this->data->fundingInstrument->boleto->instructionLines = array_combine($keys, $instructionLines);
        $this->data->fundingInstrument->boleto->logoUri = $logoUri;

        return $this;
    }
public function setBoleto ( $ expirationDate , $ logoUri , array $ instructionLines = [ ] ) { $ keys = [ 'first' , 'second' , 'third' ] ; if ( empty ( $ instructionLines ) ) { //Avoid warning in array_combine $ instructionLines = [ '' , '' , '' ] ; } if ( $ expirationDate instanceof \ DateTime ) { $ expirationDate = $ expirationDate -> format ( 'Y-m-d' ) ; } $ this -> data -> fundingInstrument -> method = self :: METHOD_BOLETO ; $ this -> data -> fundingInstrument -> boleto = new stdClass ( ) ; $ this -> data -> fundingInstrument -> boleto -> expirationDate = $ expirationDate ; $ this -> data -> fundingInstrument -> boleto -> instructionLines = array_combine ( $ keys , $ instructionLines ) ; $ this -> data -> fundingInstrument -> boleto -> logoUri = $ logoUri ; return $ this ; }
Set billet.

@param \DateTime|string $expirationDate   Expiration date of a billet.
@param string           $logoUri          Logo of billet.
@param array            $instructionLines Instructions billet.

@return $this
Set billet .