     }
     
     fileprivate func getCustomerCards(){
-        
+       
         if self.viewModel!.shouldGetCustomerCardsInfo() {
             self.showLoading()
             MerchantServer.getCustomer({ (customer: Customer) -> Void in

        }
        let index1 = (section  * 2)
        let index2 = (section  * 2) + 1
        
        if index1 + 1 > numberOfCells {
            return 0
        }
        
        let height1 = heightOfItem(indexItem: index1, customerPaymentMethods: customerPaymentMethods)
        
        if index2 + 1 > numberOfCells {
            return height1
        }
        
        let height2 = heightOfItem(indexItem: index2, customerPaymentMethods: customerPaymentMethods)
        
        
        return height1 > height2 ? height1 : height2
        
    }
    
    func heightOfItem(indexItem : Int, customerPaymentMethods : Bool) -> CGFloat {
        
        if customerPaymentMethods {
            let currentPaymentMethod = self.viewModel.customerCards![indexItem]
            return PaymentSearchCollectionViewCell.totalHeight(searchItem: currentPaymentMethod)
        }
        
        let currentPaymentMethod = self.viewModel.currentPaymentMethodSearch![indexItem]
        return PaymentSearchCollectionViewCell.totalHeight(searchItem: currentPaymentMethod)
        
    }
    
    
    public func collectionView(_ collectionView: UICollectionView,
                               layout collectionViewLayout: UICollectionViewLayout,
                               insetForSectionAt section: Int) -> UIEdgeInsets {
        return UIEdgeInsetsMake(8, 8, 8, 8)
    }
    
    public func collectionView(_ collectionView: UICollectionView,
                               layout collectionViewLayout: UICollectionViewLayout,
                               minimumLineSpacingForSectionAt section: Int) -> CGFloat {
        return 8
    }
    
    
 }
 
 
 
 class PaymentVaultViewModel : NSObject {
    
    var amount : Double
    var paymentPreference : PaymentPreference?
    

        }
    }
    


    fileprivate func registerAllCells(){
   
        let collectionSearchCell = UINib(nibName: "PaymentSearchCollectionViewCell", bundle: self.bundle)
        self.collectionSearch.register(collectionSearchCell, forCellWithReuseIdentifier: "searchCollectionCell")
    }
