def print_batch(ids)
      timenow      = Time.current.strftime("%Y%m%d_-_%H%M")
      ids_string   = ids.to_csv.delete("\n")
      resource_url = "#{@base_uri}/envios/etiquetas?access_token=#{@access_token}&ids=#{ids_string}"
      begin
        response = RestClient.get resource_url
        send_data(response, :filename => "etiquetas_-_#{timenow}.pdf", :disposition => "attachment", :type => "application/pdf")
      rescue e
        return JSON.parse(e.response, object_class: OpenStruct)
      end
    end
def print_batch(ids)
      timenow      = Time.current.strftime("%Y%m%d_-_%H%M")
      ids_string   = ids.to_csv.delete("\n")
      resource_url = "#{@base_uri}/envios/etiquetas?access_token=#{@access_token}&ids=#{ids_string}"
      begin
        response = RestClient.get resource_url
        send_data(response, :filename => "etiquetas_-_#{timenow}.pdf", :disposition => "attachment", :type => "application/pdf")
      rescue e
        return JSON.parse(e.response, object_class: OpenStruct)
      end
    end
Print batch tickets
 Pass Array of ids: ids = [1,2...9]