Exemplo n.º 1
0
def create_order_summary_on_salesforce_task(success, sp_id):
    tm = TaskManager()

    invoice_json = tm.get_subprocess_data(sp_id)

    return tm.process_task(sp_id, 'CREATE ORDER SUMMARY', success,
                           lambda: create_order_summary(invoice_json))
def send_collections_email_task(success, customer_email, sp_id):
    tm = TaskManager()

    json = tm.get_subprocess_data(sp_id)

    file_name = json['file_name']

    return tm.process_task(sp_id, 'SENDING EMAIL', success, lambda : send_email(COLLECTIONS_EMAIL_TITLE, COLLECTIONS_EMAIL_BODY, EMAIL_FROM, customer_email, file_name, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', json))
def send_invoice_email_task(success, sp_id):
    tm = TaskManager()

    json = tm.get_subprocess_data(sp_id)

    customer_email = json['customer']['email']
    file_name      = json['pdf_file_name']

    return tm.process_task(sp_id, 'SENDING EMAIL', success, lambda : send_email(INVOCE_EMAIL_TITLE, INVOICE_EMAIL_BODY, EMAIL_FROM, customer_email, file_name, 'application/pdf', json))
Exemplo n.º 4
0
def send_invoice_email_task(success, sp_id):
    tm = TaskManager()

    json = tm.get_subprocess_data(sp_id)

    customer_email = json['customer']['email']
    file_name = json['pdf_file_name']

    return tm.process_task(
        sp_id, 'SENDING EMAIL', success,
        lambda: send_email(INVOCE_EMAIL_TITLE, INVOICE_EMAIL_BODY, EMAIL_FROM,
                           customer_email, file_name, 'application/pdf', json))
Exemplo n.º 5
0
def send_collections_email_task(success, customer_email, sp_id):
    tm = TaskManager()

    json = tm.get_subprocess_data(sp_id)

    file_name = json['file_name']

    return tm.process_task(
        sp_id, 'SENDING EMAIL', success, lambda: send_email(
            COLLECTIONS_EMAIL_TITLE, COLLECTIONS_EMAIL_BODY, EMAIL_FROM,
            customer_email, file_name,
            'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
            json))
Exemplo n.º 6
0
def get_customer_details_from_sf_task(success, sp_id):
    tm = TaskManager()
    return tm.process_task(
        sp_id, 'CUSTOMER DATA', success,
        lambda: customer_details_from_sf(tm.get_subprocess_data(sp_id)))
def create_order_task(success, sp_id):
    tm = TaskManager()
    return tm.process_task(sp_id, 'RATING', success, lambda : create_order(tm.get_subprocess_data(sp_id)))
Exemplo n.º 8
0
def generate_pdf_and_upload_task(success, sp_id):
    tm = TaskManager()
    return tm.process_task(
        sp_id, 'INVOICING', success,
        lambda: generate_pdf_and_upload(tm.get_subprocess_data(sp_id)))
Exemplo n.º 9
0
def generate_journal_task(success, orders, sp_id):
    tm = TaskManager()

    json = tm.get_subprocess_data(sp_id)

    return tm.process_task(sp_id, 'GENERATING JOURNAL', success, lambda : generate_journal(json, orders))
Exemplo n.º 10
0
def charge_user_task(success, sp_id):
    tm = TaskManager()

    json = tm.get_subprocess_data(sp_id)

    return tm.process_task(sp_id, 'CHARGING',success, lambda : charge_user(json))
def create_order_summary_on_salesforce_task(success, sp_id):
    tm = TaskManager()
    
    invoice_json = tm.get_subprocess_data(sp_id)
    
    return tm.process_task(sp_id, 'CREATE ORDER SUMMARY', success, lambda : create_order_summary(invoice_json))
def get_customer_details_from_sf_task(success, sp_id):
    tm = TaskManager()
    return tm.process_task(sp_id, 'CUSTOMER DATA', success, lambda : customer_details_from_sf(tm.get_subprocess_data(sp_id)))