def METHOD_NAME(gstin):
    if not frappe.get_cached_doc("User", frappe.session.user).has_desk_access():
        frappe.throw(_("Not allowed"), frappe.PermissionError)
    validate_gstin(gstin)
    response = get_archived_gstin_info(gstin)
    if not response:
        response = PublicAPI().METHOD_NAME(gstin)
        frappe.enqueue(
            "india_compliance.gst_india.doctype.gstin.gstin.create_or_update_gstin_status",
            queue="long",
            response=response,
        )
    business_name = (
        response.tradeNam if response.ctb == "Proprietorship" else response.lgnm
    )
    gstin_info = frappe._dict(
        gstin=response.gstin,
        business_name=titlecase(business_name),
        gst_category=GST_CATEGORIES.get(response.dty, ""),
        status=response.sts,
    )
    if permanent_address := response.get("pradr"):
        # permanent address will be at the first position
        all_addresses = [permanent_address, *response.get("adadr", [])]
        gstin_info.all_addresses = list(map(_get_address, all_addresses))
        gstin_info.permanent_address = gstin_info.all_addresses[0]
    return gstin_info