module CloudPrint::PrintJob::Util

Public Class Methods

normalize_response_data(response_hash) click to toggle source
# File lib/cloudprint/print_job.rb, line 39
def self.normalize_response_data(response_hash)
  {
    :id => response_hash['id'],
    :status => response_hash['status'],
    :error_code => response_hash['errorCode'],
    :printer_id => response_hash['printerid'],
    :title => response_hash['title'],
    :content_type => response_hash['contentType'],
    :file_url => response_hash['fileUrl'],
    :ticket_url => response_hash['ticketUrl'],
    :create_time => Time.at(response_hash['createTime'].to_f / 1000),
    :update_time => Time.at(response_hash['updateTime'].to_f / 1000),
    :message => response_hash['message'],
    :tags => response_hash['tags'],
    :ticket => response_hash['ticket']
  }
end