public function getLoan()
    {
        $data = $this->client->getJSON($this->url('/loans'));

        if ($data->total_record_count == 1) {
            return Loan::make(
                $this->client,
                User::make($this->client, $data->item_loan[0]->user_id),
                $data->item_loan[0]->loan_id
            )->init($data->item_loan[0]);
        }
    }
public function getLoan()
    {
        $data = $this->client->getJSON($this->url('/loans'));

        if ($data->total_record_count == 1) {
            return Loan::make(
                $this->client,
                User::make($this->client, $data->item_loan[0]->user_id),
                $data->item_loan[0]->loan_id
            )->init($data->item_loan[0]);
        }
    }
public function getLoan ( ) { $ data = $ this -> client -> getJSON ( $ this -> url ( '/loans' ) ) ; if ( $ data -> total_record_count == 1 ) { return Loan :: make ( $ this -> client , User :: make ( $ this -> client , $ data -> item_loan [ 0 ] -> user_id ) , $ data -> item_loan [ 0 ] -> loan_id ) -> init ( $ data -> item_loan [ 0 ] ) ; } }
Get the current loan as a Loan object, or null if the item is not loaned out.

@returns Loan|null
Get the current loan as a Loan object or null if the item is not loaned out .