MangoPay/ApiBankingAliases.php
private function GetBankingAliasResponse($response)
    {
        if (isset($response->Type)) {
            switch ($response->Type) {
                case BankingAliasType::IBAN:
                    return $this->CastResponseToEntity($response, '\MangoPay\BankingAliasIBAN');
                default:
                    throw new Libraries\Exception('Unexpected response. Wrong BankingAlias Type value');
            }
        } else {
            throw new Libraries\Exception('Unexpected response. Missing BankingAlias Type property');
        }
    }
private function GetBankingAliasResponse($response)
    {
        if (isset($response->Type)) {
            switch ($response->Type) {
                case BankingAliasType::IBAN:
                    return $this->CastResponseToEntity($response, '\MangoPay\BankingAliasIBAN');
                default:
                    throw new Libraries\Exception('Unexpected response. Wrong BankingAlias Type value');
            }
        } else {
            throw new Libraries\Exception('Unexpected response. Missing BankingAlias Type property');
        }
    }
private function GetBankingAliasResponse ( $ response ) { if ( isset ( $ response -> Type ) ) { switch ( $ response -> Type ) { case BankingAliasType :: IBAN : return $ this -> CastResponseToEntity ( $ response , '\MangoPay\BankingAliasIBAN' ) ; default : throw new Libraries \ Exception ( 'Unexpected response. Wrong BankingAlias Type value' ) ; } } else { throw new Libraries \ Exception ( 'Unexpected response. Missing BankingAlias Type property' ) ; } }
Get correct banking alias object
@param object $response Response from API
@return \MangoPay\BankingAlias BankingAlias object returned from API
@throws \MangoPay\Libraries\Exception If occur unexpected response from API
Get correct banking alias object