Skip to content

Commands

billing

Billing related commands

Usage:

billing [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--help boolean Show this message and exit. False

Subcommands

billing charge_health_insurance_invoices

Charge all health insurance invoices with pending payment

Usage:

billing charge_health_insurance_invoices [OPTIONS] [INVOICE_IDS]...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--help boolean Show this message and exit. False

billing charge_healthy_benefits_invoices

Charge all Healthy Benefits invoices with pending payment

Usage:

billing charge_healthy_benefits_invoices [OPTIONS] [INVOICE_IDS]...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--help boolean Show this message and exit. False

billing check_failed_billing_task_executions

Check if there are failed billing tasks and send a Slack message.

Usage:

billing check_failed_billing_task_executions [OPTIONS]

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--post-slack-message boolean Also post the warning message on slack False
--help boolean Show this message and exit. False

billing create_or_update_stripe_customers

Create or update stripe customers for all health contracts that have a sepa_debit payment method.

Usage:

billing create_or_update_stripe_customers [OPTIONS] [HEALTH_CONTRACT_IDS]...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--help boolean Show this message and exit. False

billing create_payment_method_for_all_current_billing_iban

Usage:

billing create_payment_method_for_all_current_billing_iban 
    [OPTIONS]

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--company-limit integer N/A None
--company-with-healthy-benefits-limit integer N/A None
--user-limit integer N/A None
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--help boolean Show this message and exit. False

billing create_payment_method_for_company_current_billing_iban

Usage:

billing create_payment_method_for_company_current_billing_iban 
    [OPTIONS] COMPANY_IDS...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--help boolean Show this message and exit. False

billing create_payment_method_for_member_current_billing_iban

Usage:

billing create_payment_method_for_member_current_billing_iban 
    [OPTIONS] USER_IDS...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--help boolean Show this message and exit. False

billing execute_billing_schedule

Execute the monthly billing schedule tasks.

This command is typically run as a cron job.

Usage:

billing execute_billing_schedule [OPTIONS]

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--help boolean Show this message and exit. False

billing generate_health_insurance_invoices

Generate all invoices for health insurance contracts.

Usage:

billing generate_health_insurance_invoices [OPTIONS] [HEALTH_CONTRACT_IDS]...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--month text Month (YYYY-MM) for which to generate invoice None
--force boolean N/A False
--help boolean Show this message and exit. False

billing generate_healthy_benefits_invoices

Generate all invoices for Healthy Benefits contracts.

Usage:

billing generate_healthy_benefits_invoices [OPTIONS] [SUBSCRIPTION_IDS]...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--month text Month (YYYY-MM) for which to generate invoice _required
--force boolean N/A False
--help boolean Show this message and exit. False

billing generate_healthy_benefits_rectification_invoice

Generate a rectification invoice for a previous Healthy Benefits invoice and upload it to S3.

PREVIOUS_INVOICE_NUMBER is the invoice number of the invoice to rectify.

RECTIFICATION_INVOICE_NUMBER is the invoice number of the generated rectification invoice.

See this page for more context: https://www.notion.so/alaninsurance/Rectification-Amending-Invoices-e43e9f5a3b1f4b24916fabca8925dfad?pvs=4 ⧉

Usage:

billing generate_healthy_benefits_rectification_invoice [OPTIONS] PREVIOUS_INV
                                                        OICE_NUMBER RECTIFICAT
                                                        ION_INVOICE_NUMBER

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--save boolean Save file locally False
--upload-to-s3 boolean Upload file to S3 False
--send boolean Send to company recipients False
--help boolean Show this message and exit. False

billing recompute_invoice_remaining_balances

Recompute invoice remaining balances and settlement statuses for specific contracts.

The contracts are either explicitly specified by ID, or the command can select contracts that need recomputing: these are contracts with payments or invoices create/modified since a given date.

Usage:

billing recompute_invoice_remaining_balances [OPTIONS] [CONTRACT_IDS]...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--contract-type text Supported values: ['health', 'prevoyance', 'policy_option', 'policy_direct_billing', 'policy_unpaid_leave', 'healthy_benefits', 'policy_ani', 'policy', 'mind'] _required
--with-payments-or-invoices-since date_or_relative_date Only consider contracts with payments updated within the specified time frame (in addition to invoices with missing statuses). The time frame can either be an absolute date/time (e.g. 2020-06-13), or a relative delta (e.g. 12h34m56s). None
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--help boolean Show this message and exit. False

billing refund_contract

Refund a contract with negative balance

Usage:

billing refund_contract [OPTIONS] HEALTH_CONTRACT_ID

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--auth boolean Force authentication and authorization (mostly for testing purposes) False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--help boolean Show this message and exit. False

billing send_health_insurance_invoices

Send all health insurance invoices.

Usage:

billing send_health_insurance_invoices [OPTIONS] [INVOICE_IDS]...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--month text Month (YYYY-MM) for which to send invoices None
--force boolean whether we should resend the email if already sent False
--help boolean Show this message and exit. False

billing send_healthy_benefits_invoices

Send all Healthy Benefits invoices.

Usage:

billing send_healthy_benefits_invoices [OPTIONS] [INVOICE_IDS]...

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--month text Month (YYYY-MM) for which to generate invoice _required
--force boolean N/A False
--help boolean Show this message and exit. False

billing upload_health_insurance_appendix

Upload the appendix of a health insurance invoice to S3.

Usage:

billing upload_health_insurance_appendix [OPTIONS] INVOICE_ID

Options:

Name Type Description Default
-k, --use-kay-data boolean Use remote database with anonymized production dump False
--use-shared-kay boolean Use a Kay database shared with all engineers, refreshed daily False
--use-kay choice (personal | shared | on_aurora) Use Kay database: 'personal' for your own database, 'shared' for the shared Kay database, 'on-aurora' for Kay on Aurora None
--profile-memory boolean Memory usage profiler is activated False
--profile-methods-dump boolean Activate profiler for method calls and output one .prof file per run False
--profile-methods boolean Activate profiler for method calls False
--tracking boolean Activate tracking on dev environment False
-m, --mailer boolean Activate mailer on dev environment False
--debug-transactions boolean Print transaction debug information False
--show-logs / --hide-logs boolean Display application logs in the console. Don't use on detached one-offs to avoid duplicated logs. None
--monitor boolean Monitor command and send a notification to Slack if it fails False
--dry-run / --execute boolean Perform a dry run (default) or a live run True
--destination-bucket text The destination S3 bucket _required
--destination-filename text The destination file name _required
--help boolean Show this message and exit. False