def print_single(id, output = "pdf")
      timenow      = Time.current.strftime("%Y%m%d_-_%H%M")
      resource_url = "#{@base_uri}/envios/#{id}/etiqueta?access_token=#{@access_token}&formato=#{output}"
      begin
        response = RestClient.get resource_url
        send_data(response, :filename => "etiqueta_-_#{timenow}.pdf", :disposition => "attachment", :type => "application/pdf")
      rescue e
        return JSON.parse(e.response, object_class: OpenStruct)
      end
    end
def print_single(id, output = "pdf")
      timenow      = Time.current.strftime("%Y%m%d_-_%H%M")
      resource_url = "#{@base_uri}/envios/#{id}/etiqueta?access_token=#{@access_token}&formato=#{output}"
      begin
        response = RestClient.get resource_url
        send_data(response, :filename => "etiqueta_-_#{timenow}.pdf", :disposition => "attachment", :type => "application/pdf")
      rescue e
        return JSON.parse(e.response, object_class: OpenStruct)
      end
    end
Print shipping ticket
 ID = ticket ID
 Output: PDF or JPG