Class: DocGenerationWrapper::Adapter::PrinceXmlService::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/doc_generation_wrapper/adapters/prince_xml_service/query.rb

Instance Method Summary collapse

Instance Method Details

#status(status_id) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/doc_generation_wrapper/adapters/prince_xml_service/query.rb', line 9

def status status_id
  data    = { id: JSON.parse(status_id)['status_id'] }
  headers = {}
  host    = DocGenerationWrapper.configuration.service_host
  url     = host + '/status'

  request = RestClient::Request.new(method: :get, url: url, payload: data, headers: headers)
  response = request.execute

  JSON.parse(response)
end