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;
    }