public function createACHBankAccount( CustomerVault\ACHBankaccounts $bankDetails )
    {
        $bankDetails->setRequiredFields(array(
            'accountHolderName',
            'accountNumber',
            'routingNumber',
            'billingAddressId',
            'accountType'
        ));

        $bankDetails->checkRequiredFields();
        $bankDetails->setOptionalFields(array(
            'nickName',
            'merchantRefNum'
        ));

        $request = new Request(array(
            'method' => Request::POST,
            'uri' => $this->prepareURI("/profiles/" . $bankDetails->id . "/achbankaccounts"),
            'body' => $bankDetails
        ));

        $response = $this->client->processRequest($request);
        return new CustomerVault\ACHBankaccounts($response);
    }
public function createACHBankAccount( CustomerVault\ACHBankaccounts $bankDetails )
    {
        $bankDetails->setRequiredFields(array(
            'accountHolderName',
            'accountNumber',
            'routingNumber',
            'billingAddressId',
            'accountType'
        ));

        $bankDetails->checkRequiredFields();
        $bankDetails->setOptionalFields(array(
            'nickName',
            'merchantRefNum'
        ));

        $request = new Request(array(
            'method' => Request::POST,
            'uri' => $this->prepareURI("/profiles/" . $bankDetails->id . "/achbankaccounts"),
            'body' => $bankDetails
        ));

        $response = $this->client->processRequest($request);
        return new CustomerVault\ACHBankaccounts($response);
    }
public function createACHBankAccount ( CustomerVault \ ACHBankaccounts $ bankDetails ) { $ bankDetails -> setRequiredFields ( array ( 'accountHolderName' , 'accountNumber' , 'routingNumber' , 'billingAddressId' , 'accountType' ) ) ; $ bankDetails -> checkRequiredFields ( ) ; $ bankDetails -> setOptionalFields ( array ( 'nickName' , 'merchantRefNum' ) ) ; $ request = new Request ( array ( 'method' => Request :: POST , 'uri' => $ this -> prepareURI ( "/profiles/" . $ bankDetails -> id . "/achbankaccounts" ) , 'body' => $ bankDetails ) ) ; $ response = $ this -> client -> processRequest ( $ request ) ; return new CustomerVault \ ACHBankaccounts ( $ response ) ; }
Creates ACH bank account for given profile id.

@param CustomerVault\ACHBankaccounts $bankDetails https://developer.optimalpayments.com/en/documentation/customer-vault-api/ach-bank-accounts/
@return \Paysafe\CustomerVault\Profile https://developer.optimalpayments.com/en/documentation/customer-vault-api/profiles/
@throws PaysafeException
Creates ACH bank account for given profile id .