class Getway::Cms::GetService < Getway::ClientService
  attr_reader :doc_id

  def initialize(doc_id)
    @doc_id = doc_id 
  end

  def call 
    response = get(url)
    code, message, body = render_response(response)
    if code == 200 && body["code"] == 200
      return body 
    else 
      return nil
    end
  end

  def url 
    "/cms/doc/open/baseInfo/#{doc_id}".freeze
  end
end