private function transformPaymentInstrumentValue(array $data, $method)
    {
        if ($method == 'card') {
            $instrument = new PaymentInstrumentCard();
        } elseif ($method == 'recurring') {
            $instrument = new PaymentInstrumentRecurring();
        } else {
            throw new Exception\Runtime(sprintf('Method "%s" is not supported', $method));
        }

        $this->map($data, $instrument);

        return $instrument;
    }
private function transformPaymentInstrumentValue(array $data, $method)
    {
        if ($method == 'card') {
            $instrument = new PaymentInstrumentCard();
        } elseif ($method == 'recurring') {
            $instrument = new PaymentInstrumentRecurring();
        } else {
            throw new Exception\Runtime(sprintf('Method "%s" is not supported', $method));
        }

        $this->map($data, $instrument);

        return $instrument;
    }
private function transformPaymentInstrumentValue ( array $ data , $ method ) { if ( $ method == 'card' ) { $ instrument = new PaymentInstrumentCard ( ) ; } elseif ( $ method == 'recurring' ) { $ instrument = new PaymentInstrumentRecurring ( ) ; } else { throw new Exception \ Runtime ( sprintf ( 'Method "%s" is not supported' , $ method ) ) ; } $ this -> map ( $ data , $ instrument ) ; return $ instrument ; }
Transform PaymentInstrument result array to object
@param array $data
@param string $method
@return PaymentInstrumentCard|PaymentInstrumentRecurring
@throws Exception\Runtime for unsupported methods
Transform PaymentInstrument result array to object