src/Resource/Orders.php
private function structure(stdClass $response, $resource, $class)
    {
        $structures = [];

        foreach ($response->$resource as $responseResource) {
            $structure = new $class($this->orders->moip);
            $structure->populate($responseResource);

            $structures[] = $structure;
        }

        return $structures;
    }
private function structure(stdClass $response, $resource, $class)
    {
        $structures = [];

        foreach ($response->$resource as $responseResource) {
            $structure = new $class($this->orders->moip);
            $structure->populate($responseResource);

            $structures[] = $structure;
        }

        return $structures;
    }
private function structure ( stdClass $ response , $ resource , $ class ) { $ structures = [ ] ; foreach ( $ response -> $ resource as $ responseResource ) { $ structure = new $ class ( $ this -> orders -> moip ) ; $ structure -> populate ( $ responseResource ) ; $ structures [ ] = $ structure ; } return $ structures ; }
Structure resource.

@param stdClass                                                                               $response
@param string                                                                                 $resource
@param \Moip\Resource\Payment|\Moip\Resource\Refund|\Moip\Resource\Entry|\Moip\Resource\Event $class

@return array
Structure resource .