lib/ecoportal/api/v2/pages.rb in ecoportal-api-v2-0.9.2 vs lib/ecoportal/api/v2/pages.rb in ecoportal-api-v2-0.9.3

- old
+ new

@@ -7,10 +7,11 @@ extend Common::BaseClass include Common::Content::DocHelpers class_resolver :stages_class, "Ecoportal::API::V2::Pages::Stages" class_resolver :page_class, "Ecoportal::API::V2::Page" + class_resolver :page_stage_class, "Ecoportal::API::V2::Pages::PageStage" class_resolver :create_page_response_class, "Ecoportal::API::V2::Pages::PageCreateResponse" attr_reader :client # @param client [Common::Client] a `Common::Client` object that holds the configuration of the api connection. @@ -63,10 +64,10 @@ # @param from [String, Hash, Page] template or `id` of the template # @return [Ecoportal::API::V2::Page] the new page object. def get_new(from) id = get_id(from) response = client.get("/pages/new", params: {template_id: id}) - wrapped = Common::Content::WrappedResponse.new(response, page_class) + wrapped = Common::Content::WrappedResponse.new(response, page_stage_class) return wrapped.result if wrapped.success? raise "Could not get new page from template #{id} - Error #{response.status}: #{response.body}" end