Model/Apiconnector/Customer.php
public function getTotalRefund()
    {
        //filter by customer id
        $customerOrders = $this->orderCollection->create()
            ->addAttributeToFilter('customer_id', $this->model->getId());

        $totalRefunded = 0;
        //calculate total refunded
        foreach ($customerOrders as $order) {
            $refunded = $order->getTotalRefunded();
            $totalRefunded += $refunded;
        }

        return $totalRefunded;
    }
public function getTotalRefund()
    {
        //filter by customer id
        $customerOrders = $this->orderCollection->create()
            ->addAttributeToFilter('customer_id', $this->model->getId());

        $totalRefunded = 0;
        //calculate total refunded
        foreach ($customerOrders as $order) {
            $refunded = $order->getTotalRefunded();
            $totalRefunded += $refunded;
        }

        return $totalRefunded;
    }
public function getTotalRefund ( ) { //filter by customer id $ customerOrders = $ this -> orderCollection -> create ( ) -> addAttributeToFilter ( 'customer_id' , $ this -> model -> getId ( ) ) ; $ totalRefunded = 0 ; //calculate total refunded foreach ( $ customerOrders as $ order ) { $ refunded = $ order -> getTotalRefunded ( ) ; $ totalRefunded += $ refunded ; } return $ totalRefunded ; }
Total value refunded for the customer.

@return float|int
Total value refunded for the customer .