def METHOD_NAME(invoice):
    '''
    Get a json format of deliverables attached to the invoice.
    Used when creating invoice in IntAcct.
    '''
    deliverables = invoice.deliverables.all()
    deliverables_list = []
    for deliverable in deliverables:
        project_deliverable = deliverable.deliverable
        extra_info = project_deliverable.extra_information
        deliverables_list.append(
            {
                'itemid': project_deliverable.external_id,
                'quantity': deliverable.quantity,
                'unit': extra_info['UNIT'],
                'price': project_deliverable.unit_price,
                'locationid': extra_info['LOCATIONID'],
                'departmentid': extra_info['DEPARTMENTID'],
                'projectid': extra_info['PROJECTID'],
                'customerid': extra_info['CUSTOMERID'],
                'classid': extra_info['CLASSID'],
                'billable': extra_info['BILLABLE'],
            }
        )
    return deliverables_list