brevo-python 4.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- brevo/__init__.py +2253 -0
- brevo/account/__init__.py +79 -0
- brevo/account/client.py +317 -0
- brevo/account/raw_client.py +341 -0
- brevo/account/types/__init__.py +77 -0
- brevo/account/types/get_account_activity_response.py +24 -0
- brevo/account/types/get_account_activity_response_logs_item.py +45 -0
- brevo/account/types/get_account_response.py +85 -0
- brevo/account/types/get_account_response_address.py +43 -0
- brevo/account/types/get_account_response_date_time_preferences.py +38 -0
- brevo/account/types/get_account_response_marketing_automation.py +29 -0
- brevo/account/types/get_account_response_plan_item.py +53 -0
- brevo/account/types/get_account_response_plan_item_type.py +5 -0
- brevo/account/types/get_account_response_plan_verticals_item.py +63 -0
- brevo/account/types/get_account_response_plan_verticals_item_plan_category.py +5 -0
- brevo/account/types/get_account_response_plan_verticals_item_status.py +5 -0
- brevo/account/types/get_account_response_plan_verticals_item_users.py +35 -0
- brevo/account/types/get_account_response_relay.py +34 -0
- brevo/account/types/get_account_response_relay_data.py +40 -0
- brevo/balance/__init__.py +139 -0
- brevo/balance/client.py +2589 -0
- brevo/balance/raw_client.py +4538 -0
- brevo/balance/types/__init__.py +169 -0
- brevo/balance/types/create_balance_limit_request_constraint_type.py +5 -0
- brevo/balance/types/create_balance_limit_request_duration_unit.py +5 -0
- brevo/balance/types/create_balance_limit_request_transaction_type.py +5 -0
- brevo/balance/types/create_balance_order_response.py +96 -0
- brevo/balance/types/get_balance_definition_list_request_sort.py +5 -0
- brevo/balance/types/get_balance_definition_list_request_sort_field.py +5 -0
- brevo/balance/types/get_balance_definition_list_request_version.py +5 -0
- brevo/balance/types/get_balance_definition_list_response.py +24 -0
- brevo/balance/types/get_balance_definition_request_version.py +5 -0
- brevo/balance/types/get_balance_limit_request_version.py +5 -0
- brevo/balance/types/get_contact_balances_response.py +30 -0
- brevo/balance/types/get_contact_balances_response_balances_item.py +33 -0
- brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_request_sort.py +5 -0
- brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_request_sort_field.py +7 -0
- brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response.py +57 -0
- brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item.py +77 -0
- brevo/balance/types/get_subscription_balances_response.py +21 -0
- brevo/balance/types/get_subscription_balances_response_balance_item.py +30 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_modifier.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_unit.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_amount_overtaking_strategy.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_credit_rounding.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_debit_rounding.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_unit.py +26 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_subscriptions_cid_balances_response.py +66 -0
- brevo/balance/types/update_balance_definition_request_balance_availability_duration_modifier.py +7 -0
- brevo/balance/types/update_balance_definition_request_balance_availability_duration_unit.py +7 -0
- brevo/balance/types/update_balance_definition_request_balance_option_amount_overtaking_strategy.py +7 -0
- brevo/balance/types/update_balance_definition_request_balance_option_credit_rounding.py +7 -0
- brevo/balance/types/update_balance_definition_request_balance_option_debit_rounding.py +7 -0
- brevo/balance/types/update_balance_definition_request_unit.py +26 -0
- brevo/balance/types/update_balance_limit_request_constraint_type.py +5 -0
- brevo/balance/types/update_balance_limit_request_duration_unit.py +5 -0
- brevo/balance/types/update_balance_limit_request_transaction_type.py +5 -0
- brevo/client.py +773 -0
- brevo/companies/__init__.py +61 -0
- brevo/companies/client.py +994 -0
- brevo/companies/raw_client.py +1285 -0
- brevo/companies/types/__init__.py +59 -0
- brevo/companies/types/get_companies_request_sort.py +5 -0
- brevo/companies/types/get_companies_response.py +28 -0
- brevo/companies/types/get_crm_attributes_companies_response_item.py +40 -0
- brevo/companies/types/post_companies_import_response.py +26 -0
- brevo/companies/types/post_companies_response.py +27 -0
- brevo/companies/types/post_crm_attributes_request_attribute_type.py +7 -0
- brevo/companies/types/post_crm_attributes_request_object_type.py +5 -0
- brevo/companies/types/post_crm_attributes_response.py +23 -0
- brevo/contacts/__init__.py +289 -0
- brevo/contacts/client.py +3298 -0
- brevo/contacts/raw_client.py +4614 -0
- brevo/contacts/types/__init__.py +309 -0
- brevo/contacts/types/add_contact_to_list_request_body.py +11 -0
- brevo/contacts/types/add_contact_to_list_request_body_emails.py +23 -0
- brevo/contacts/types/add_contact_to_list_request_body_ext_ids.py +29 -0
- brevo/contacts/types/add_contact_to_list_request_body_ids.py +23 -0
- brevo/contacts/types/create_attribute_request_attribute_category.py +7 -0
- brevo/contacts/types/create_attribute_request_enumeration_item.py +28 -0
- brevo/contacts/types/create_attribute_request_type.py +7 -0
- brevo/contacts/types/create_contact_request_attributes_value.py +5 -0
- brevo/contacts/types/create_contact_response.py +23 -0
- brevo/contacts/types/create_doi_contact_request_attributes_value.py +5 -0
- brevo/contacts/types/create_folder_response.py +23 -0
- brevo/contacts/types/create_list_response.py +23 -0
- brevo/contacts/types/delete_attribute_request_attribute_category.py +7 -0
- brevo/contacts/types/delete_contact_request_identifier.py +5 -0
- brevo/contacts/types/delete_contact_request_identifier_type.py +7 -0
- brevo/contacts/types/get_attributes_response.py +24 -0
- brevo/contacts/types/get_attributes_response_attributes_item.py +57 -0
- brevo/contacts/types/get_attributes_response_attributes_item_category.py +7 -0
- brevo/contacts/types/get_attributes_response_attributes_item_enumeration_item.py +28 -0
- brevo/contacts/types/get_attributes_response_attributes_item_type.py +7 -0
- brevo/contacts/types/get_contact_info_request_identifier.py +5 -0
- brevo/contacts/types/get_contact_info_request_identifier_type.py +7 -0
- brevo/contacts/types/get_contact_info_response.py +80 -0
- brevo/contacts/types/get_contact_info_response_attributes.py +22 -0
- brevo/contacts/types/get_contact_info_response_statistics.py +86 -0
- brevo/contacts/types/get_contact_info_response_statistics_clicked_item.py +33 -0
- brevo/contacts/types/get_contact_info_response_statistics_clicked_item_links_item.py +40 -0
- brevo/contacts/types/get_contact_info_response_statistics_complaints_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_delivered_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_hard_bounces_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_messages_sent_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_opened_item.py +40 -0
- brevo/contacts/types/get_contact_info_response_statistics_soft_bounces_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_transac_attributes_item.py +18 -0
- brevo/contacts/types/get_contact_info_response_statistics_unsubscriptions.py +43 -0
- brevo/contacts/types/get_contact_info_response_statistics_unsubscriptions_admin_unsubscription_item.py +30 -0
- brevo/contacts/types/get_contact_info_response_statistics_unsubscriptions_user_unsubscription_item.py +35 -0
- brevo/contacts/types/get_contact_stats_request_identifier.py +5 -0
- brevo/contacts/types/get_contact_stats_response.py +59 -0
- brevo/contacts/types/get_contact_stats_response_clicked_item.py +28 -0
- brevo/contacts/types/get_contact_stats_response_clicked_item_links_item.py +40 -0
- brevo/contacts/types/get_contact_stats_response_complaints_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_delivered_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_hard_bounces_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_messages_sent_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_opened_item.py +40 -0
- brevo/contacts/types/get_contact_stats_response_soft_bounces_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_transac_attributes_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_unsubscriptions.py +39 -0
- brevo/contacts/types/get_contact_stats_response_unsubscriptions_admin_unsubscription_item.py +30 -0
- brevo/contacts/types/get_contact_stats_response_unsubscriptions_user_unsubscription_item.py +35 -0
- brevo/contacts/types/get_contacts_from_list_request_sort.py +5 -0
- brevo/contacts/types/get_contacts_request_sort.py +5 -0
- brevo/contacts/types/get_folder_lists_request_sort.py +5 -0
- brevo/contacts/types/get_folder_lists_response.py +26 -0
- brevo/contacts/types/get_folders_request_sort.py +5 -0
- brevo/contacts/types/get_folders_response.py +26 -0
- brevo/contacts/types/get_list_response.py +68 -0
- brevo/contacts/types/get_list_response_campaign_stats_item.py +26 -0
- brevo/contacts/types/get_lists_request_sort.py +5 -0
- brevo/contacts/types/get_lists_response.py +29 -0
- brevo/contacts/types/get_lists_response_lists_item.py +49 -0
- brevo/contacts/types/get_segments_request_sort.py +5 -0
- brevo/contacts/types/get_segments_response.py +29 -0
- brevo/contacts/types/get_segments_response_segments_item.py +41 -0
- brevo/contacts/types/import_contacts_request_json_body_item.py +25 -0
- brevo/contacts/types/import_contacts_request_new_list.py +41 -0
- brevo/contacts/types/import_contacts_response.py +26 -0
- brevo/contacts/types/remove_contact_from_list_request_body.py +15 -0
- brevo/contacts/types/remove_contact_from_list_request_body_all.py +29 -0
- brevo/contacts/types/remove_contact_from_list_request_body_emails.py +23 -0
- brevo/contacts/types/remove_contact_from_list_request_body_ext_ids.py +29 -0
- brevo/contacts/types/remove_contact_from_list_request_body_ids.py +23 -0
- brevo/contacts/types/request_contact_export_request_custom_contact_filter.py +90 -0
- brevo/contacts/types/request_contact_export_request_custom_contact_filter_action_for_contacts.py +7 -0
- brevo/contacts/types/request_contact_export_request_custom_contact_filter_action_for_email_campaigns.py +8 -0
- brevo/contacts/types/request_contact_export_request_custom_contact_filter_action_for_sms_campaigns.py +7 -0
- brevo/contacts/types/request_contact_export_response.py +26 -0
- brevo/contacts/types/update_attribute_request_attribute_category.py +7 -0
- brevo/contacts/types/update_attribute_request_enumeration_item.py +28 -0
- brevo/contacts/types/update_batch_contacts_request_contacts_item.py +80 -0
- brevo/contacts/types/update_contact_request_attributes_value.py +5 -0
- brevo/contacts/types/update_contact_request_identifier.py +5 -0
- brevo/contacts/types/update_contact_request_identifier_type.py +7 -0
- brevo/conversations/__init__.py +34 -0
- brevo/conversations/client.py +912 -0
- brevo/conversations/raw_client.py +1328 -0
- brevo/conversations/types/__init__.py +36 -0
- brevo/conversations/types/put_conversations_visitor_group_response.py +31 -0
- brevo/core/__init__.py +125 -0
- brevo/core/api_error.py +23 -0
- brevo/core/client_wrapper.py +100 -0
- brevo/core/datetime_utils.py +28 -0
- brevo/core/file.py +67 -0
- brevo/core/force_multipart.py +18 -0
- brevo/core/http_client.py +776 -0
- brevo/core/http_response.py +59 -0
- brevo/core/http_sse/__init__.py +42 -0
- brevo/core/http_sse/_api.py +112 -0
- brevo/core/http_sse/_decoders.py +61 -0
- brevo/core/http_sse/_exceptions.py +7 -0
- brevo/core/http_sse/_models.py +17 -0
- brevo/core/jsonable_encoder.py +108 -0
- brevo/core/logging.py +107 -0
- brevo/core/pydantic_utilities.py +577 -0
- brevo/core/query_encoder.py +58 -0
- brevo/core/remove_none_from_dict.py +11 -0
- brevo/core/request_options.py +35 -0
- brevo/core/serialization.py +276 -0
- brevo/core/unchecked_base_model.py +376 -0
- brevo/coupons/__init__.py +49 -0
- brevo/coupons/client.py +550 -0
- brevo/coupons/raw_client.py +839 -0
- brevo/coupons/types/__init__.py +47 -0
- brevo/coupons/types/create_coupon_collection_response.py +23 -0
- brevo/coupons/types/get_coupon_collections_request_sort.py +5 -0
- brevo/coupons/types/get_coupon_collections_request_sort_by.py +7 -0
- brevo/coupons/types/update_coupon_collection_response.py +35 -0
- brevo/custom_objects/__init__.py +139 -0
- brevo/custom_objects/client.py +437 -0
- brevo/custom_objects/raw_client.py +711 -0
- brevo/custom_objects/types/__init__.py +177 -0
- brevo/custom_objects/types/batch_delete_object_records_request_identifiers.py +10 -0
- brevo/custom_objects/types/batch_delete_object_records_request_identifiers_ext_ids.py +23 -0
- brevo/custom_objects/types/batch_delete_object_records_request_identifiers_ids.py +23 -0
- brevo/custom_objects/types/batch_delete_object_records_response.py +27 -0
- brevo/custom_objects/types/getrecords_request_association.py +5 -0
- brevo/custom_objects/types/getrecords_request_sort.py +5 -0
- brevo/custom_objects/types/getrecords_response.py +26 -0
- brevo/custom_objects/types/getrecords_response_records_item.py +51 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item.py +10 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item.py +15 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_one.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_one_identifiers.py +27 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_zero.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_zero_identifiers.py +27 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item.py +15 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_one.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_one_identifiers.py +27 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_zero.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_zero_identifiers.py +27 -0
- brevo/custom_objects/types/getrecords_response_records_item_identifiers.py +32 -0
- brevo/custom_objects/types/upsertrecords_request_records_item.py +31 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item.py +12 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one.py +28 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item.py +15 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_one.py +20 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero.py +28 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers.py +32 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero.py +28 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item.py +23 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item_identifiers.py +28 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_identifiers.py +32 -0
- brevo/custom_objects/types/upsertrecords_response.py +29 -0
- brevo/deals/__init__.py +52 -0
- brevo/deals/client.py +1013 -0
- brevo/deals/raw_client.py +1326 -0
- brevo/deals/types/__init__.py +50 -0
- brevo/deals/types/get_crm_attributes_deals_response_item.py +40 -0
- brevo/deals/types/get_crm_deals_request_sort.py +5 -0
- brevo/deals/types/get_crm_deals_response.py +28 -0
- brevo/deals/types/post_crm_deals_import_response.py +26 -0
- brevo/deals/types/post_crm_deals_response.py +27 -0
- brevo/domains/__init__.py +79 -0
- brevo/domains/client.py +506 -0
- brevo/domains/raw_client.py +698 -0
- brevo/domains/types/__init__.py +83 -0
- brevo/domains/types/authenticate_domain_response.py +28 -0
- brevo/domains/types/create_domain_response.py +44 -0
- brevo/domains/types/create_domain_response_dns_records.py +40 -0
- brevo/domains/types/create_domain_response_dns_records_brevo_code.py +42 -0
- brevo/domains/types/create_domain_response_dns_records_dkim_record.py +42 -0
- brevo/domains/types/create_domain_response_dns_records_dmarc_record.py +42 -0
- brevo/domains/types/get_domain_configuration_response.py +41 -0
- brevo/domains/types/get_domain_configuration_response_dns_records.py +44 -0
- brevo/domains/types/get_domain_configuration_response_dns_records_brevo_code.py +42 -0
- brevo/domains/types/get_domain_configuration_response_dns_records_dkim_record.py +42 -0
- brevo/domains/types/get_domain_configuration_response_dns_records_dmarc_record.py +42 -0
- brevo/domains/types/get_domains_response.py +39 -0
- brevo/domains/types/get_domains_response_domains_item.py +56 -0
- brevo/domains/types/get_domains_response_domains_item_creator.py +41 -0
- brevo/ecommerce/__init__.py +112 -0
- brevo/ecommerce/client.py +2176 -0
- brevo/ecommerce/raw_client.py +2895 -0
- brevo/ecommerce/types/__init__.py +124 -0
- brevo/ecommerce/types/create_batch_order_response.py +28 -0
- brevo/ecommerce/types/create_product_alert_request_contact_identifiers.py +33 -0
- brevo/ecommerce/types/create_update_batch_category_request_categories_item.py +48 -0
- brevo/ecommerce/types/create_update_batch_category_response.py +31 -0
- brevo/ecommerce/types/create_update_batch_products_request_products_item.py +89 -0
- brevo/ecommerce/types/create_update_batch_products_request_products_item_meta_info_value.py +5 -0
- brevo/ecommerce/types/create_update_batch_products_response.py +31 -0
- brevo/ecommerce/types/create_update_category_response.py +23 -0
- brevo/ecommerce/types/create_update_product_request_meta_info_value.py +5 -0
- brevo/ecommerce/types/create_update_product_response.py +23 -0
- brevo/ecommerce/types/get_categories_request_sort.py +5 -0
- brevo/ecommerce/types/get_categories_response.py +25 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_conversion_source_conversion_source_id_request_conversion_source.py +7 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_conversion_source_conversion_source_id_response.py +40 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_conversion_source_conversion_source_id_response_conversion_source.py +7 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_response.py +30 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_response_totals.py +32 -0
- brevo/ecommerce/types/get_ecommerce_attribution_products_conversion_source_conversion_source_id_request_conversion_source.py +7 -0
- brevo/ecommerce/types/get_ecommerce_attribution_products_conversion_source_conversion_source_id_response.py +28 -0
- brevo/ecommerce/types/get_ecommerce_attribution_products_conversion_source_conversion_source_id_response_products_item.py +33 -0
- brevo/ecommerce/types/get_ecommerce_config_display_currency_response.py +23 -0
- brevo/ecommerce/types/get_orders_request_sort.py +5 -0
- brevo/ecommerce/types/get_products_request_sort.py +5 -0
- brevo/ecommerce/types/get_products_response.py +26 -0
- brevo/ecommerce/types/set_config_display_currency_response.py +23 -0
- brevo/email_campaigns/__init__.py +139 -0
- brevo/email_campaigns/client.py +1864 -0
- brevo/email_campaigns/raw_client.py +2472 -0
- brevo/email_campaigns/types/__init__.py +141 -0
- brevo/email_campaigns/types/create_email_campaign_request_email_expiration_date.py +33 -0
- brevo/email_campaigns/types/create_email_campaign_request_email_expiration_date_unit.py +5 -0
- brevo/email_campaigns/types/create_email_campaign_request_recipients.py +52 -0
- brevo/email_campaigns/types/create_email_campaign_request_sender.py +37 -0
- brevo/email_campaigns/types/create_email_campaign_request_winner_criteria.py +5 -0
- brevo/email_campaigns/types/create_email_campaign_response.py +23 -0
- brevo/email_campaigns/types/email_export_recipients_request_recipients_type.py +10 -0
- brevo/email_campaigns/types/email_export_recipients_response.py +26 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response.py +64 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response_clicked_links.py +28 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response_statistics.py +32 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response_winning_criteria.py +5 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response_winning_version.py +7 -0
- brevo/email_campaigns/types/get_email_campaign_request_statistics.py +7 -0
- brevo/email_campaigns/types/get_email_campaign_response.py +234 -0
- brevo/email_campaigns/types/get_email_campaign_response_sender.py +33 -0
- brevo/email_campaigns/types/get_email_campaign_response_status.py +7 -0
- brevo/email_campaigns/types/get_email_campaign_response_type.py +5 -0
- brevo/email_campaigns/types/get_email_campaigns_request_sort.py +5 -0
- brevo/email_campaigns/types/get_email_campaigns_request_statistics.py +7 -0
- brevo/email_campaigns/types/get_email_campaigns_request_status.py +7 -0
- brevo/email_campaigns/types/get_email_campaigns_request_type.py +5 -0
- brevo/email_campaigns/types/get_email_campaigns_response.py +25 -0
- brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item.py +234 -0
- brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_sender.py +33 -0
- brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_status.py +7 -0
- brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_type.py +5 -0
- brevo/email_campaigns/types/get_shared_template_url_response.py +29 -0
- brevo/email_campaigns/types/update_email_campaign_request_email_expiration_date.py +33 -0
- brevo/email_campaigns/types/update_email_campaign_request_email_expiration_date_unit.py +5 -0
- brevo/email_campaigns/types/update_email_campaign_request_recipients.py +53 -0
- brevo/email_campaigns/types/update_email_campaign_request_sender.py +37 -0
- brevo/email_campaigns/types/update_email_campaign_request_winner_criteria.py +5 -0
- brevo/email_campaigns/types/upload_image_to_gallery_response.py +23 -0
- brevo/environment.py +7 -0
- brevo/errors/__init__.py +80 -0
- brevo/errors/bad_request_error.py +10 -0
- brevo/errors/conflict_error.py +11 -0
- brevo/errors/expectation_failed_error.py +11 -0
- brevo/errors/failed_dependency_error.py +10 -0
- brevo/errors/forbidden_error.py +10 -0
- brevo/errors/internal_server_error.py +10 -0
- brevo/errors/method_not_allowed_error.py +11 -0
- brevo/errors/not_found_error.py +10 -0
- brevo/errors/payment_required_error.py +11 -0
- brevo/errors/precondition_failed_error.py +11 -0
- brevo/errors/too_early_error.py +11 -0
- brevo/errors/too_many_requests_error.py +11 -0
- brevo/errors/unauthorized_error.py +10 -0
- brevo/errors/unprocessable_entity_error.py +11 -0
- brevo/errors/unsupported_media_type_error.py +11 -0
- brevo/event/__init__.py +52 -0
- brevo/event/client.py +184 -0
- brevo/event/raw_client.py +230 -0
- brevo/event/types/__init__.py +50 -0
- brevo/event/types/create_event_request_contact_properties_value.py +5 -0
- brevo/event/types/create_event_request_event_properties_value.py +5 -0
- brevo/event/types/create_event_request_identifiers.py +52 -0
- brevo/event/types/create_event_request_object.py +33 -0
- brevo/event/types/create_event_request_object_identifiers.py +32 -0
- brevo/external_feeds/__init__.py +79 -0
- brevo/external_feeds/client.py +915 -0
- brevo/external_feeds/raw_client.py +1087 -0
- brevo/external_feeds/types/__init__.py +77 -0
- brevo/external_feeds/types/create_external_feed_request_auth_type.py +5 -0
- brevo/external_feeds/types/create_external_feed_request_headers_item.py +28 -0
- brevo/external_feeds/types/create_external_feed_response.py +23 -0
- brevo/external_feeds/types/get_all_external_feeds_request_auth_type.py +5 -0
- brevo/external_feeds/types/get_all_external_feeds_request_sort.py +5 -0
- brevo/external_feeds/types/get_all_external_feeds_response.py +29 -0
- brevo/external_feeds/types/get_all_external_feeds_response_feeds_item.py +96 -0
- brevo/external_feeds/types/get_all_external_feeds_response_feeds_item_auth_type.py +5 -0
- brevo/external_feeds/types/get_all_external_feeds_response_feeds_item_headers_item.py +28 -0
- brevo/external_feeds/types/get_external_feed_by_uuid_response.py +105 -0
- brevo/external_feeds/types/get_external_feed_by_uuid_response_auth_type.py +5 -0
- brevo/external_feeds/types/get_external_feed_by_uuid_response_headers_item.py +28 -0
- brevo/external_feeds/types/update_external_feed_request_auth_type.py +5 -0
- brevo/external_feeds/types/update_external_feed_request_headers_item.py +28 -0
- brevo/files/__init__.py +38 -0
- brevo/files/client.py +479 -0
- brevo/files/raw_client.py +675 -0
- brevo/files/types/__init__.py +40 -0
- brevo/files/types/get_crm_files_id_response.py +30 -0
- brevo/files/types/get_crm_files_request_entity.py +5 -0
- brevo/files/types/get_crm_files_request_sort.py +5 -0
- brevo/inbound_parsing/__init__.py +58 -0
- brevo/inbound_parsing/client.py +323 -0
- brevo/inbound_parsing/raw_client.py +420 -0
- brevo/inbound_parsing/types/__init__.py +60 -0
- brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response.py +72 -0
- brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response_attachments_item.py +40 -0
- brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response_logs_item.py +30 -0
- brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response_logs_item_type.py +7 -0
- brevo/inbound_parsing/types/get_inbound_email_events_request_sort.py +5 -0
- brevo/inbound_parsing/types/get_inbound_email_events_response.py +21 -0
- brevo/inbound_parsing/types/get_inbound_email_events_response_events_item.py +42 -0
- brevo/master_account/__init__.py +202 -0
- brevo/master_account/client.py +2757 -0
- brevo/master_account/raw_client.py +3351 -0
- brevo/master_account/types/__init__.py +244 -0
- brevo/master_account/types/get_corporate_group_id_response.py +31 -0
- brevo/master_account/types/get_corporate_group_id_response_group.py +35 -0
- brevo/master_account/types/get_corporate_group_id_response_sub_accounts_item.py +35 -0
- brevo/master_account/types/get_corporate_group_id_response_users_item.py +36 -0
- brevo/master_account/types/get_corporate_invited_users_list_response.py +24 -0
- brevo/master_account/types/get_corporate_invited_users_list_response_users_item.py +50 -0
- brevo/master_account/types/get_corporate_invited_users_list_response_users_item_feature_access.py +69 -0
- brevo/master_account/types/get_corporate_invited_users_list_response_users_item_groups.py +32 -0
- brevo/master_account/types/get_corporate_ip_response_item.py +22 -0
- brevo/master_account/types/get_corporate_master_account_response.py +57 -0
- brevo/master_account/types/get_corporate_master_account_response_billing_info.py +48 -0
- brevo/master_account/types/get_corporate_master_account_response_billing_info_address.py +50 -0
- brevo/master_account/types/get_corporate_master_account_response_billing_info_name.py +35 -0
- brevo/master_account/types/get_corporate_master_account_response_plan_info.py +63 -0
- brevo/master_account/types/get_corporate_master_account_response_plan_info_features_item.py +62 -0
- brevo/master_account/types/get_corporate_master_account_response_plan_info_plan_period.py +5 -0
- brevo/master_account/types/get_corporate_sub_account_id_response.py +48 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_groups_item.py +28 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info.py +42 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits.py +65 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_emails.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_external_feeds.py +33 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_sms.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_whatsapp.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_wp_subscribers.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features.py +58 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_inbox.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_landing_page.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_sales_users.py +33 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_users.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_response.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_response_sub_accounts_item.py +48 -0
- brevo/master_account/types/get_corporate_sub_account_response_sub_accounts_item_groups_item.py +28 -0
- brevo/master_account/types/get_corporate_user_permission_response.py +40 -0
- brevo/master_account/types/get_corporate_user_permission_response_feature_access.py +62 -0
- brevo/master_account/types/get_corporate_user_permission_response_groups_item.py +32 -0
- brevo/master_account/types/get_sub_account_groups_response_item.py +30 -0
- brevo/master_account/types/invite_admin_user_request_privileges_item.py +38 -0
- brevo/master_account/types/invite_admin_user_request_privileges_item_feature.py +18 -0
- brevo/master_account/types/invite_admin_user_request_privileges_item_permissions_item.py +7 -0
- brevo/master_account/types/invite_admin_user_response.py +20 -0
- brevo/master_account/types/post_corporate_group_response.py +20 -0
- brevo/master_account/types/post_corporate_sub_account_key_response.py +28 -0
- brevo/master_account/types/post_corporate_sub_account_request_language.py +5 -0
- brevo/master_account/types/post_corporate_sub_account_response.py +23 -0
- brevo/master_account/types/post_corporate_sub_account_sso_token_request_target.py +17 -0
- brevo/master_account/types/put_corporate_sub_account_id_plan_request_credits.py +59 -0
- brevo/master_account/types/put_corporate_sub_account_id_plan_request_features.py +44 -0
- brevo/master_account/types/put_corporate_sub_accounts_plan_request_credits.py +59 -0
- brevo/master_account/types/put_corporate_sub_accounts_plan_request_features.py +39 -0
- brevo/master_account/types/put_corporate_user_email_permissions_request_privileges_item.py +42 -0
- brevo/master_account/types/put_corporate_user_email_permissions_request_privileges_item_feature.py +18 -0
- brevo/master_account/types/put_corporate_user_email_permissions_request_privileges_item_permissions_item.py +10 -0
- brevo/master_account/types/put_corporate_user_invitation_action_email_request_action.py +5 -0
- brevo/master_account/types/put_corporate_user_invitation_action_email_response.py +23 -0
- brevo/notes/__init__.py +38 -0
- brevo/notes/client.py +548 -0
- brevo/notes/raw_client.py +766 -0
- brevo/notes/types/__init__.py +40 -0
- brevo/notes/types/get_crm_notes_request_entity.py +5 -0
- brevo/notes/types/get_crm_notes_request_sort.py +5 -0
- brevo/notes/types/post_crm_notes_response.py +27 -0
- brevo/payments/__init__.py +38 -0
- brevo/payments/client.py +315 -0
- brevo/payments/raw_client.py +532 -0
- brevo/payments/types/__init__.py +40 -0
- brevo/payments/types/create_payment_request_response.py +28 -0
- brevo/payments/types/get_payment_request_response.py +47 -0
- brevo/payments/types/get_payment_request_response_status.py +5 -0
- brevo/process/__init__.py +79 -0
- brevo/process/client.py +304 -0
- brevo/process/raw_client.py +372 -0
- brevo/process/types/__init__.py +77 -0
- brevo/process/types/get_process_response.py +62 -0
- brevo/process/types/get_process_response_info.py +36 -0
- brevo/process/types/get_process_response_info_export.py +32 -0
- brevo/process/types/get_process_response_info_import.py +57 -0
- brevo/process/types/get_process_response_name.py +16 -0
- brevo/process/types/get_process_response_status.py +7 -0
- brevo/process/types/get_processes_request_sort.py +5 -0
- brevo/process/types/get_processes_response.py +29 -0
- brevo/process/types/get_processes_response_processes_item.py +62 -0
- brevo/process/types/get_processes_response_processes_item_info.py +36 -0
- brevo/process/types/get_processes_response_processes_item_info_export.py +32 -0
- brevo/process/types/get_processes_response_processes_item_info_import.py +57 -0
- brevo/process/types/get_processes_response_processes_item_name.py +16 -0
- brevo/process/types/get_processes_response_processes_item_status.py +7 -0
- brevo/program/__init__.py +67 -0
- brevo/program/client.py +1128 -0
- brevo/program/raw_client.py +2526 -0
- brevo/program/types/__init__.py +67 -0
- brevo/program/types/get_lp_list_request_sort_field.py +5 -0
- brevo/program/types/get_lp_list_response.py +24 -0
- brevo/program/types/get_parameter_subscription_info_response.py +44 -0
- brevo/program/types/get_parameter_subscription_info_response_balance.py +41 -0
- brevo/program/types/get_parameter_subscription_info_response_balance_balances_item.py +30 -0
- brevo/program/types/get_parameter_subscription_info_response_members_item.py +36 -0
- brevo/program/types/get_parameter_subscription_info_response_reward_item.py +66 -0
- brevo/program/types/get_parameter_subscription_info_response_tier_item.py +56 -0
- brevo/program/types/subscribe_member_to_a_subscription_response.py +46 -0
- brevo/program/types/subscribe_to_loyalty_program_response.py +56 -0
- brevo/py.typed +0 -0
- brevo/reward/__init__.py +115 -0
- brevo/reward/client.py +1285 -0
- brevo/reward/raw_client.py +2564 -0
- brevo/reward/types/__init__.py +139 -0
- brevo/reward/types/create_reward_response.py +64 -0
- brevo/reward/types/create_voucher_response.py +76 -0
- brevo/reward/types/get_code_count_response.py +23 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_offers_request_version.py +5 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_offers_response.py +34 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_offers_response_items_item.py +67 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_request_version.py +5 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response.py +269 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_expiration_modifier.py +7 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_generator.py +52 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_limits_item.py +68 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_products_item.py +40 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_reward_configs.py +33 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule.py +101 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule_event.py +28 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule_results_item.py +43 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule_results_item_parameters_item.py +37 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_request_sort.py +5 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_request_sort_field.py +5 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response.py +49 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response_contact_rewards_item.py +70 -0
- brevo/reward/types/redeem_voucher_request_order.py +85 -0
- brevo/reward/types/redeem_voucher_request_order_billing.py +55 -0
- brevo/reward/types/redeem_voucher_request_order_identifiers.py +28 -0
- brevo/reward/types/redeem_voucher_request_order_products_item.py +46 -0
- brevo/reward/types/validate_reward_response.py +23 -0
- brevo/senders/__init__.py +67 -0
- brevo/senders/client.py +808 -0
- brevo/senders/raw_client.py +1089 -0
- brevo/senders/types/__init__.py +65 -0
- brevo/senders/types/create_sender_request_ips_item.py +36 -0
- brevo/senders/types/create_sender_response.py +42 -0
- brevo/senders/types/get_ips_from_sender_response.py +25 -0
- brevo/senders/types/get_ips_from_sender_response_ips_item.py +38 -0
- brevo/senders/types/get_ips_response.py +25 -0
- brevo/senders/types/get_ips_response_ips_item.py +38 -0
- brevo/senders/types/get_senders_response.py +24 -0
- brevo/senders/types/get_senders_response_senders_item.py +46 -0
- brevo/senders/types/get_senders_response_senders_item_ips_item.py +33 -0
- brevo/senders/types/update_sender_request_ips_item.py +36 -0
- brevo/sms_campaigns/__init__.py +73 -0
- brevo/sms_campaigns/client.py +1078 -0
- brevo/sms_campaigns/raw_client.py +1501 -0
- brevo/sms_campaigns/types/__init__.py +71 -0
- brevo/sms_campaigns/types/create_sms_campaign_request_recipients.py +33 -0
- brevo/sms_campaigns/types/create_sms_campaign_response.py +23 -0
- brevo/sms_campaigns/types/get_sms_campaign_response.py +74 -0
- brevo/sms_campaigns/types/get_sms_campaign_response_status.py +7 -0
- brevo/sms_campaigns/types/get_sms_campaigns_request_sort.py +5 -0
- brevo/sms_campaigns/types/get_sms_campaigns_request_status.py +7 -0
- brevo/sms_campaigns/types/get_sms_campaigns_response.py +25 -0
- brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item.py +74 -0
- brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item_status.py +7 -0
- brevo/sms_campaigns/types/request_sms_recipient_export_request_recipients_type.py +7 -0
- brevo/sms_campaigns/types/request_sms_recipient_export_response.py +26 -0
- brevo/sms_campaigns/types/update_sms_campaign_request_recipients.py +33 -0
- brevo/sms_templates/__init__.py +49 -0
- brevo/sms_templates/client.py +133 -0
- brevo/sms_templates/raw_client.py +151 -0
- brevo/sms_templates/types/__init__.py +47 -0
- brevo/sms_templates/types/get_sms_templates_request_sort.py +5 -0
- brevo/sms_templates/types/get_sms_templates_response.py +26 -0
- brevo/sms_templates/types/get_sms_templates_response_templates_item.py +86 -0
- brevo/sms_templates/types/get_sms_templates_response_templates_item_compliance.py +37 -0
- brevo/tasks/__init__.py +55 -0
- brevo/tasks/client.py +814 -0
- brevo/tasks/raw_client.py +992 -0
- brevo/tasks/types/__init__.py +53 -0
- brevo/tasks/types/get_crm_tasks_request_filter_date.py +5 -0
- brevo/tasks/types/get_crm_tasks_request_filter_status.py +5 -0
- brevo/tasks/types/get_crm_tasks_request_sort.py +5 -0
- brevo/tasks/types/get_crm_tasks_response.py +28 -0
- brevo/tasks/types/get_crm_tasktypes_response.py +32 -0
- brevo/tasks/types/post_crm_tasks_response.py +27 -0
- brevo/tier/__init__.py +79 -0
- brevo/tier/client.py +1144 -0
- brevo/tier/raw_client.py +2360 -0
- brevo/tier/types/__init__.py +79 -0
- brevo/tier/types/add_subscription_to_tier_response.py +53 -0
- brevo/tier/types/create_tier_for_tier_group_request_access_conditions_item.py +31 -0
- brevo/tier/types/create_tier_for_tier_group_request_tier_rewards_item.py +26 -0
- brevo/tier/types/create_tier_group_request_downgrade_strategy.py +7 -0
- brevo/tier/types/create_tier_group_request_upgrade_strategy.py +7 -0
- brevo/tier/types/get_list_of_tier_groups_request_version.py +5 -0
- brevo/tier/types/get_list_of_tier_groups_response.py +21 -0
- brevo/tier/types/get_loyalty_program_tier_request_version.py +5 -0
- brevo/tier/types/get_loyalty_program_tier_response.py +21 -0
- brevo/tier/types/get_tier_group_request_version.py +5 -0
- brevo/tier/types/update_tier_group_request_downgrade_strategy.py +7 -0
- brevo/tier/types/update_tier_group_request_upgrade_strategy.py +7 -0
- brevo/tier/types/update_tier_request_access_conditions_item.py +31 -0
- brevo/tier/types/update_tier_request_tier_rewards_item.py +26 -0
- brevo/transactional_emails/__init__.py +175 -0
- brevo/transactional_emails/client.py +2544 -0
- brevo/transactional_emails/raw_client.py +3240 -0
- brevo/transactional_emails/types/__init__.py +189 -0
- brevo/transactional_emails/types/create_smtp_template_request_sender.py +37 -0
- brevo/transactional_emails/types/create_smtp_template_response.py +23 -0
- brevo/transactional_emails/types/get_aggregated_smtp_report_response.py +85 -0
- brevo/transactional_emails/types/get_blocked_domains_response.py +23 -0
- brevo/transactional_emails/types/get_email_event_report_request_event.py +23 -0
- brevo/transactional_emails/types/get_email_event_report_request_sort.py +5 -0
- brevo/transactional_emails/types/get_email_event_report_response.py +21 -0
- brevo/transactional_emails/types/get_email_event_report_response_events_item.py +79 -0
- brevo/transactional_emails/types/get_email_event_report_response_events_item_event.py +23 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_request_sort.py +5 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_request_status.py +5 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response.py +10 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_batches.py +25 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_batches_batches_item.py +39 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_batches_batches_item_status.py +7 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_created_at.py +37 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_created_at_status.py +7 -0
- brevo/transactional_emails/types/get_smtp_report_request_sort.py +5 -0
- brevo/transactional_emails/types/get_smtp_report_response.py +21 -0
- brevo/transactional_emails/types/get_smtp_report_response_reports_item.py +86 -0
- brevo/transactional_emails/types/get_smtp_templates_request_sort.py +5 -0
- brevo/transactional_emails/types/get_smtp_templates_response.py +26 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_request_sort.py +5 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_response.py +25 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_response_contacts_item.py +44 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_response_contacts_item_reason.py +35 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_response_contacts_item_reason_code.py +15 -0
- brevo/transactional_emails/types/get_transac_email_content_response.py +57 -0
- brevo/transactional_emails/types/get_transac_email_content_response_events_item.py +28 -0
- brevo/transactional_emails/types/get_transac_emails_list_request_sort.py +5 -0
- brevo/transactional_emails/types/get_transac_emails_list_response.py +34 -0
- brevo/transactional_emails/types/get_transac_emails_list_response_transactional_emails_item.py +61 -0
- brevo/transactional_emails/types/post_preview_smtp_email_templates_response.py +49 -0
- brevo/transactional_emails/types/send_transac_email_request_attachment_item.py +33 -0
- brevo/transactional_emails/types/send_transac_email_request_bcc_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_cc_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item.py +73 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item_bcc_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item_cc_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item_reply_to.py +32 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item_to_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_reply_to.py +32 -0
- brevo/transactional_emails/types/send_transac_email_request_sender.py +37 -0
- brevo/transactional_emails/types/send_transac_email_request_to_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_response.py +29 -0
- brevo/transactional_emails/types/update_smtp_template_request_sender.py +37 -0
- brevo/transactional_sms/__init__.py +70 -0
- brevo/transactional_sms/client.py +726 -0
- brevo/transactional_sms/raw_client.py +913 -0
- brevo/transactional_sms/types/__init__.py +68 -0
- brevo/transactional_sms/types/get_sms_events_request_event.py +20 -0
- brevo/transactional_sms/types/get_sms_events_request_sort.py +5 -0
- brevo/transactional_sms/types/get_sms_events_response.py +21 -0
- brevo/transactional_sms/types/get_sms_events_response_events_item.py +52 -0
- brevo/transactional_sms/types/get_sms_events_response_events_item_event.py +20 -0
- brevo/transactional_sms/types/get_transac_aggregated_sms_report_response.py +75 -0
- brevo/transactional_sms/types/get_transac_sms_report_request_sort.py +5 -0
- brevo/transactional_sms/types/get_transac_sms_report_response.py +21 -0
- brevo/transactional_sms/types/get_transac_sms_report_response_reports_item.py +76 -0
- brevo/transactional_sms/types/send_async_transactional_sms_response.py +22 -0
- brevo/transactional_sms/types/send_transac_sms_response.py +38 -0
- brevo/transactional_whats_app/__init__.py +64 -0
- brevo/transactional_whats_app/client.py +283 -0
- brevo/transactional_whats_app/raw_client.py +326 -0
- brevo/transactional_whats_app/types/__init__.py +62 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_request_event.py +7 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_request_sort.py +5 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_response.py +21 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_response_events_item.py +65 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_response_events_item_event.py +7 -0
- brevo/transactional_whats_app/types/send_whatsapp_message_request.py +8 -0
- brevo/transactional_whats_app/types/send_whatsapp_message_request_params.py +41 -0
- brevo/transactional_whats_app/types/send_whatsapp_message_request_text.py +35 -0
- brevo/transactional_whats_app/types/send_whatsapp_message_response.py +26 -0
- brevo/types/__init__.py +373 -0
- brevo/types/ab_test_version_clicks.py +7 -0
- brevo/types/ab_test_version_clicks_item.py +35 -0
- brevo/types/ab_test_version_stats.py +35 -0
- brevo/types/bad_request_error_body.py +29 -0
- brevo/types/bad_request_error_body_code.py +45 -0
- brevo/types/balance_definition.py +139 -0
- brevo/types/balance_definition_balance_availability_duration_modifier.py +7 -0
- brevo/types/balance_limit.py +78 -0
- brevo/types/cart.py +38 -0
- brevo/types/company.py +45 -0
- brevo/types/configuration.py +30 -0
- brevo/types/contact_error_model.py +34 -0
- brevo/types/contact_error_model_code.py +16 -0
- brevo/types/conversations_message.py +187 -0
- brevo/types/conversations_message_attachments_item.py +50 -0
- brevo/types/conversations_message_bcc_item.py +21 -0
- brevo/types/conversations_message_cc_item.py +21 -0
- brevo/types/conversations_message_file.py +46 -0
- brevo/types/conversations_message_file_image_info.py +39 -0
- brevo/types/conversations_message_forwarded_to_source_status.py +29 -0
- brevo/types/conversations_message_from.py +25 -0
- brevo/types/conversations_message_reply_to.py +25 -0
- brevo/types/conversations_message_to_item.py +21 -0
- brevo/types/conversations_message_type.py +5 -0
- brevo/types/conversion_source_metrics.py +35 -0
- brevo/types/conversion_source_metrics_conversion_source.py +7 -0
- brevo/types/create_update_folder.py +23 -0
- brevo/types/deal.py +45 -0
- brevo/types/error_model.py +28 -0
- brevo/types/file_data.py +60 -0
- brevo/types/forbidden_error_body.py +29 -0
- brevo/types/forbidden_error_body_code.py +45 -0
- brevo/types/get_campaign_recipients.py +25 -0
- brevo/types/get_campaign_stats.py +130 -0
- brevo/types/get_category_details.py +54 -0
- brevo/types/get_contact_details.py +75 -0
- brevo/types/get_contact_details_attributes.py +22 -0
- brevo/types/get_contacts.py +25 -0
- brevo/types/get_coupon_collection.py +75 -0
- brevo/types/get_device_browser_stats.py +44 -0
- brevo/types/get_extended_campaign_overview.py +230 -0
- brevo/types/get_extended_campaign_overview_sender.py +33 -0
- brevo/types/get_extended_campaign_overview_status.py +7 -0
- brevo/types/get_extended_campaign_overview_type.py +5 -0
- brevo/types/get_extended_campaign_stats.py +63 -0
- brevo/types/get_extended_campaign_stats_links_stats.py +22 -0
- brevo/types/get_extended_campaign_stats_stats_by_device.py +39 -0
- brevo/types/get_folder.py +46 -0
- brevo/types/get_list.py +46 -0
- brevo/types/get_product_details.py +115 -0
- brevo/types/get_sms_campaign_overview.py +69 -0
- brevo/types/get_sms_campaign_overview_status.py +7 -0
- brevo/types/get_sms_campaign_stats.py +55 -0
- brevo/types/get_smtp_template_overview.py +93 -0
- brevo/types/get_smtp_template_overview_sender.py +33 -0
- brevo/types/get_sso_token.py +23 -0
- brevo/types/get_webhook.py +74 -0
- brevo/types/get_webhook_channel.py +5 -0
- brevo/types/get_webhook_type.py +5 -0
- brevo/types/inviteuser.py +31 -0
- brevo/types/inviteuser_privileges_item.py +34 -0
- brevo/types/inviteuser_privileges_item_feature.py +24 -0
- brevo/types/inviteuser_privileges_item_permissions_item.py +39 -0
- brevo/types/loyalty_program.py +82 -0
- brevo/types/loyalty_program_state.py +5 -0
- brevo/types/node_response.py +63 -0
- brevo/types/not_found_error_body.py +29 -0
- brevo/types/not_found_error_body_code.py +45 -0
- brevo/types/note.py +61 -0
- brevo/types/note_data.py +44 -0
- brevo/types/notification.py +32 -0
- brevo/types/order.py +85 -0
- brevo/types/order_billing.py +66 -0
- brevo/types/order_identifiers.py +42 -0
- brevo/types/order_meta_info_value.py +5 -0
- brevo/types/order_products_item.py +43 -0
- brevo/types/pipeline.py +38 -0
- brevo/types/pipeline_stages_item.py +32 -0
- brevo/types/pipelines.py +7 -0
- brevo/types/post_contact_info.py +21 -0
- brevo/types/post_contact_info_contacts.py +37 -0
- brevo/types/post_contact_info_contacts_failure.py +5 -0
- brevo/types/post_contact_info_contacts_success.py +5 -0
- brevo/types/post_send_failed.py +46 -0
- brevo/types/redeem.py +92 -0
- brevo/types/rule_condition_response.py +52 -0
- brevo/types/send_report.py +30 -0
- brevo/types/send_report_email.py +32 -0
- brevo/types/send_report_language.py +5 -0
- brevo/types/send_test_email.py +29 -0
- brevo/types/send_transac_sms.py +66 -0
- brevo/types/send_transac_sms_tag.py +28 -0
- brevo/types/send_transac_sms_tag_field.py +5 -0
- brevo/types/send_transac_sms_type.py +5 -0
- brevo/types/task.py +55 -0
- brevo/types/task_reminder.py +39 -0
- brevo/types/task_reminder_types_item.py +5 -0
- brevo/types/task_reminder_unit.py +5 -0
- brevo/types/tier.py +63 -0
- brevo/types/tier_access_conditions_item.py +38 -0
- brevo/types/tier_group.py +70 -0
- brevo/types/tier_group_downgrade_strategy.py +7 -0
- brevo/types/tier_group_upgrade_strategy.py +7 -0
- brevo/types/tier_tier_rewards_item.py +33 -0
- brevo/types/transaction.py +110 -0
- brevo/types/unauthorized_error_body.py +29 -0
- brevo/types/unauthorized_error_body_code.py +45 -0
- brevo/types/update_campaign_status.py +28 -0
- brevo/types/update_campaign_status_status.py +8 -0
- brevo/types/value_response.py +67 -0
- brevo/types/variables_items.py +22 -0
- brevo/types/whatsapp_camp_stats.py +26 -0
- brevo/user/__init__.py +67 -0
- brevo/user/client.py +806 -0
- brevo/user/raw_client.py +977 -0
- brevo/user/types/__init__.py +67 -0
- brevo/user/types/edit_user_permission_response.py +33 -0
- brevo/user/types/get_invited_users_list_response.py +24 -0
- brevo/user/types/get_invited_users_list_response_users_item.py +39 -0
- brevo/user/types/get_invited_users_list_response_users_item_feature_access.py +37 -0
- brevo/user/types/get_user_permission_response.py +38 -0
- brevo/user/types/get_user_permission_response_privileges_item.py +21 -0
- brevo/user/types/inviteuser_response.py +28 -0
- brevo/user/types/put_revoke_user_permission_response.py +28 -0
- brevo/user/types/putresendcancelinvitation_request_action.py +5 -0
- brevo/user/types/putresendcancelinvitation_response.py +28 -0
- brevo/version.py +3 -0
- brevo/webhooks/__init__.py +82 -0
- brevo/webhooks/client.py +982 -0
- brevo/webhooks/raw_client.py +1211 -0
- brevo/webhooks/types/__init__.py +80 -0
- brevo/webhooks/types/create_webhook_request_auth.py +32 -0
- brevo/webhooks/types/create_webhook_request_channel.py +5 -0
- brevo/webhooks/types/create_webhook_request_events_item.py +26 -0
- brevo/webhooks/types/create_webhook_request_headers_item.py +28 -0
- brevo/webhooks/types/create_webhook_request_type.py +5 -0
- brevo/webhooks/types/create_webhook_response.py +23 -0
- brevo/webhooks/types/export_webhooks_history_request_event.py +26 -0
- brevo/webhooks/types/export_webhooks_history_request_type.py +5 -0
- brevo/webhooks/types/export_webhooks_history_response.py +26 -0
- brevo/webhooks/types/get_webhooks_request_sort.py +5 -0
- brevo/webhooks/types/get_webhooks_request_type.py +5 -0
- brevo/webhooks/types/get_webhooks_response.py +21 -0
- brevo/webhooks/types/update_webhook_request_auth.py +32 -0
- brevo/webhooks/types/update_webhook_request_events_item.py +26 -0
- brevo/webhooks/types/update_webhook_request_headers_item.py +28 -0
- brevo/whats_app_campaigns/__init__.py +106 -0
- brevo/whats_app_campaigns/client.py +1064 -0
- brevo/whats_app_campaigns/raw_client.py +1311 -0
- brevo/whats_app_campaigns/types/__init__.py +110 -0
- brevo/whats_app_campaigns/types/create_whats_app_campaign_request_recipients.py +41 -0
- brevo/whats_app_campaigns/types/create_whats_app_campaign_response.py +23 -0
- brevo/whats_app_campaigns/types/create_whats_app_template_request_category.py +5 -0
- brevo/whats_app_campaigns/types/create_whats_app_template_request_source.py +5 -0
- brevo/whats_app_campaigns/types/create_whats_app_template_response.py +23 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaign_response.py +69 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaign_response_campaign_status.py +7 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaign_response_template.py +61 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaign_response_template_components_item.py +21 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaigns_request_sort.py +5 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaigns_response.py +25 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaigns_response_campaigns_item.py +84 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaigns_response_campaigns_item_campaign_status.py +7 -0
- brevo/whats_app_campaigns/types/get_whats_app_config_response.py +63 -0
- brevo/whats_app_campaigns/types/get_whats_app_config_response_phone_number_name_status.py +7 -0
- brevo/whats_app_campaigns/types/get_whats_app_config_response_phone_number_quality.py +5 -0
- brevo/whats_app_campaigns/types/get_whats_app_config_response_whatsapp_business_account_status.py +7 -0
- brevo/whats_app_campaigns/types/get_whats_app_templates_request_sort.py +5 -0
- brevo/whats_app_campaigns/types/get_whats_app_templates_request_source.py +5 -0
- brevo/whats_app_campaigns/types/get_whats_app_templates_response.py +26 -0
- brevo/whats_app_campaigns/types/get_whats_app_templates_response_templates_item.py +65 -0
- brevo/whats_app_campaigns/types/update_whats_app_campaign_request_campaign_status.py +5 -0
- brevo/whats_app_campaigns/types/update_whats_app_campaign_request_recipients.py +41 -0
- brevo_python-4.0.1.dist-info/METADATA +1072 -0
- brevo_python-4.0.1.dist-info/RECORD +843 -0
- brevo_python-4.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,2757 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.get_sso_token import GetSsoToken
|
|
8
|
+
from .raw_client import AsyncRawMasterAccountClient, RawMasterAccountClient
|
|
9
|
+
from .types.get_corporate_group_id_response import GetCorporateGroupIdResponse
|
|
10
|
+
from .types.get_corporate_invited_users_list_response import GetCorporateInvitedUsersListResponse
|
|
11
|
+
from .types.get_corporate_ip_response_item import GetCorporateIpResponseItem
|
|
12
|
+
from .types.get_corporate_master_account_response import GetCorporateMasterAccountResponse
|
|
13
|
+
from .types.get_corporate_sub_account_id_response import GetCorporateSubAccountIdResponse
|
|
14
|
+
from .types.get_corporate_sub_account_response import GetCorporateSubAccountResponse
|
|
15
|
+
from .types.get_corporate_user_permission_response import GetCorporateUserPermissionResponse
|
|
16
|
+
from .types.get_sub_account_groups_response_item import GetSubAccountGroupsResponseItem
|
|
17
|
+
from .types.invite_admin_user_request_privileges_item import InviteAdminUserRequestPrivilegesItem
|
|
18
|
+
from .types.invite_admin_user_response import InviteAdminUserResponse
|
|
19
|
+
from .types.post_corporate_group_response import PostCorporateGroupResponse
|
|
20
|
+
from .types.post_corporate_sub_account_key_response import PostCorporateSubAccountKeyResponse
|
|
21
|
+
from .types.post_corporate_sub_account_request_language import PostCorporateSubAccountRequestLanguage
|
|
22
|
+
from .types.post_corporate_sub_account_response import PostCorporateSubAccountResponse
|
|
23
|
+
from .types.post_corporate_sub_account_sso_token_request_target import PostCorporateSubAccountSsoTokenRequestTarget
|
|
24
|
+
from .types.put_corporate_sub_account_id_plan_request_credits import PutCorporateSubAccountIdPlanRequestCredits
|
|
25
|
+
from .types.put_corporate_sub_account_id_plan_request_features import PutCorporateSubAccountIdPlanRequestFeatures
|
|
26
|
+
from .types.put_corporate_sub_accounts_plan_request_credits import PutCorporateSubAccountsPlanRequestCredits
|
|
27
|
+
from .types.put_corporate_sub_accounts_plan_request_features import PutCorporateSubAccountsPlanRequestFeatures
|
|
28
|
+
from .types.put_corporate_user_email_permissions_request_privileges_item import (
|
|
29
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem,
|
|
30
|
+
)
|
|
31
|
+
from .types.put_corporate_user_invitation_action_email_request_action import (
|
|
32
|
+
PutCorporateUserInvitationActionEmailRequestAction,
|
|
33
|
+
)
|
|
34
|
+
from .types.put_corporate_user_invitation_action_email_response import PutCorporateUserInvitationActionEmailResponse
|
|
35
|
+
|
|
36
|
+
# this is used as the default value for optional parameters
|
|
37
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class MasterAccountClient:
|
|
41
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
42
|
+
self._raw_client = RawMasterAccountClient(client_wrapper=client_wrapper)
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def with_raw_response(self) -> RawMasterAccountClient:
|
|
46
|
+
"""
|
|
47
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
RawMasterAccountClient
|
|
52
|
+
"""
|
|
53
|
+
return self._raw_client
|
|
54
|
+
|
|
55
|
+
def create_a_new_group_of_sub_accounts(
|
|
56
|
+
self,
|
|
57
|
+
*,
|
|
58
|
+
group_name: str,
|
|
59
|
+
sub_account_ids: typing.Optional[typing.Sequence[int]] = OMIT,
|
|
60
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
61
|
+
) -> PostCorporateGroupResponse:
|
|
62
|
+
"""
|
|
63
|
+
This endpoint allows to create a group of sub-accounts
|
|
64
|
+
|
|
65
|
+
Parameters
|
|
66
|
+
----------
|
|
67
|
+
group_name : str
|
|
68
|
+
The name of the group of sub-accounts
|
|
69
|
+
|
|
70
|
+
sub_account_ids : typing.Optional[typing.Sequence[int]]
|
|
71
|
+
Pass the list of sub-account Ids to be included in the group
|
|
72
|
+
|
|
73
|
+
request_options : typing.Optional[RequestOptions]
|
|
74
|
+
Request-specific configuration.
|
|
75
|
+
|
|
76
|
+
Returns
|
|
77
|
+
-------
|
|
78
|
+
PostCorporateGroupResponse
|
|
79
|
+
Group ID
|
|
80
|
+
|
|
81
|
+
Examples
|
|
82
|
+
--------
|
|
83
|
+
from brevo import Brevo
|
|
84
|
+
|
|
85
|
+
client = Brevo(
|
|
86
|
+
api_key="YOUR_API_KEY",
|
|
87
|
+
)
|
|
88
|
+
client.master_account.create_a_new_group_of_sub_accounts(
|
|
89
|
+
group_name="My group",
|
|
90
|
+
)
|
|
91
|
+
"""
|
|
92
|
+
_response = self._raw_client.create_a_new_group_of_sub_accounts(
|
|
93
|
+
group_name=group_name, sub_account_ids=sub_account_ids, request_options=request_options
|
|
94
|
+
)
|
|
95
|
+
return _response.data
|
|
96
|
+
|
|
97
|
+
def delete_sub_account_from_group(
|
|
98
|
+
self,
|
|
99
|
+
group_id: str,
|
|
100
|
+
*,
|
|
101
|
+
sub_account_ids: typing.Sequence[int],
|
|
102
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
103
|
+
) -> None:
|
|
104
|
+
"""
|
|
105
|
+
This endpoint allows you to remove a sub-organization from a group.
|
|
106
|
+
|
|
107
|
+
Parameters
|
|
108
|
+
----------
|
|
109
|
+
group_id : str
|
|
110
|
+
Group id
|
|
111
|
+
|
|
112
|
+
sub_account_ids : typing.Sequence[int]
|
|
113
|
+
List of sub-account ids
|
|
114
|
+
|
|
115
|
+
request_options : typing.Optional[RequestOptions]
|
|
116
|
+
Request-specific configuration.
|
|
117
|
+
|
|
118
|
+
Returns
|
|
119
|
+
-------
|
|
120
|
+
None
|
|
121
|
+
|
|
122
|
+
Examples
|
|
123
|
+
--------
|
|
124
|
+
from brevo import Brevo
|
|
125
|
+
|
|
126
|
+
client = Brevo(
|
|
127
|
+
api_key="YOUR_API_KEY",
|
|
128
|
+
)
|
|
129
|
+
client.master_account.delete_sub_account_from_group(
|
|
130
|
+
group_id="groupId",
|
|
131
|
+
sub_account_ids=[423432, 234323, 87678],
|
|
132
|
+
)
|
|
133
|
+
"""
|
|
134
|
+
_response = self._raw_client.delete_sub_account_from_group(
|
|
135
|
+
group_id, sub_account_ids=sub_account_ids, request_options=request_options
|
|
136
|
+
)
|
|
137
|
+
return _response.data
|
|
138
|
+
|
|
139
|
+
def get_a_group_details(
|
|
140
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
141
|
+
) -> GetCorporateGroupIdResponse:
|
|
142
|
+
"""
|
|
143
|
+
This endpoint allows you to retrieve a specific group’s information such as
|
|
144
|
+
the list of sub-organizations and the user associated with the group.
|
|
145
|
+
|
|
146
|
+
Parameters
|
|
147
|
+
----------
|
|
148
|
+
id : str
|
|
149
|
+
Id of the group of sub-organization
|
|
150
|
+
|
|
151
|
+
request_options : typing.Optional[RequestOptions]
|
|
152
|
+
Request-specific configuration.
|
|
153
|
+
|
|
154
|
+
Returns
|
|
155
|
+
-------
|
|
156
|
+
GetCorporateGroupIdResponse
|
|
157
|
+
Group details
|
|
158
|
+
|
|
159
|
+
Examples
|
|
160
|
+
--------
|
|
161
|
+
from brevo import Brevo
|
|
162
|
+
|
|
163
|
+
client = Brevo(
|
|
164
|
+
api_key="YOUR_API_KEY",
|
|
165
|
+
)
|
|
166
|
+
client.master_account.get_a_group_details(
|
|
167
|
+
id="id",
|
|
168
|
+
)
|
|
169
|
+
"""
|
|
170
|
+
_response = self._raw_client.get_a_group_details(id, request_options=request_options)
|
|
171
|
+
return _response.data
|
|
172
|
+
|
|
173
|
+
def update_a_group_of_sub_accounts(
|
|
174
|
+
self,
|
|
175
|
+
id: str,
|
|
176
|
+
*,
|
|
177
|
+
group_name: typing.Optional[str] = OMIT,
|
|
178
|
+
sub_account_ids: typing.Optional[typing.Sequence[int]] = OMIT,
|
|
179
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
180
|
+
) -> None:
|
|
181
|
+
"""
|
|
182
|
+
This endpoint allows to update a group of sub-accounts
|
|
183
|
+
|
|
184
|
+
Parameters
|
|
185
|
+
----------
|
|
186
|
+
id : str
|
|
187
|
+
Id of the group
|
|
188
|
+
|
|
189
|
+
group_name : typing.Optional[str]
|
|
190
|
+
The name of the group of sub-accounts
|
|
191
|
+
|
|
192
|
+
sub_account_ids : typing.Optional[typing.Sequence[int]]
|
|
193
|
+
Pass the list of sub-account Ids to be included in the group
|
|
194
|
+
|
|
195
|
+
request_options : typing.Optional[RequestOptions]
|
|
196
|
+
Request-specific configuration.
|
|
197
|
+
|
|
198
|
+
Returns
|
|
199
|
+
-------
|
|
200
|
+
None
|
|
201
|
+
|
|
202
|
+
Examples
|
|
203
|
+
--------
|
|
204
|
+
from brevo import Brevo
|
|
205
|
+
|
|
206
|
+
client = Brevo(
|
|
207
|
+
api_key="YOUR_API_KEY",
|
|
208
|
+
)
|
|
209
|
+
client.master_account.update_a_group_of_sub_accounts(
|
|
210
|
+
id="id",
|
|
211
|
+
)
|
|
212
|
+
"""
|
|
213
|
+
_response = self._raw_client.update_a_group_of_sub_accounts(
|
|
214
|
+
id, group_name=group_name, sub_account_ids=sub_account_ids, request_options=request_options
|
|
215
|
+
)
|
|
216
|
+
return _response.data
|
|
217
|
+
|
|
218
|
+
def delete_a_group(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
219
|
+
"""
|
|
220
|
+
This endpoint allows you to delete a group of sub-organizations. When a
|
|
221
|
+
group is deleted, the sub-organizations are no longer part of this group.
|
|
222
|
+
The users associated with the group are no longer associated with the group
|
|
223
|
+
once deleted.
|
|
224
|
+
|
|
225
|
+
Parameters
|
|
226
|
+
----------
|
|
227
|
+
id : str
|
|
228
|
+
Id of the group
|
|
229
|
+
|
|
230
|
+
request_options : typing.Optional[RequestOptions]
|
|
231
|
+
Request-specific configuration.
|
|
232
|
+
|
|
233
|
+
Returns
|
|
234
|
+
-------
|
|
235
|
+
None
|
|
236
|
+
|
|
237
|
+
Examples
|
|
238
|
+
--------
|
|
239
|
+
from brevo import Brevo
|
|
240
|
+
|
|
241
|
+
client = Brevo(
|
|
242
|
+
api_key="YOUR_API_KEY",
|
|
243
|
+
)
|
|
244
|
+
client.master_account.delete_a_group(
|
|
245
|
+
id="id",
|
|
246
|
+
)
|
|
247
|
+
"""
|
|
248
|
+
_response = self._raw_client.delete_a_group(id, request_options=request_options)
|
|
249
|
+
return _response.data
|
|
250
|
+
|
|
251
|
+
def get_sub_account_groups(
|
|
252
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
253
|
+
) -> typing.List[GetSubAccountGroupsResponseItem]:
|
|
254
|
+
"""
|
|
255
|
+
This endpoint allows you to list all groups created on your Admin account.
|
|
256
|
+
|
|
257
|
+
Parameters
|
|
258
|
+
----------
|
|
259
|
+
request_options : typing.Optional[RequestOptions]
|
|
260
|
+
Request-specific configuration.
|
|
261
|
+
|
|
262
|
+
Returns
|
|
263
|
+
-------
|
|
264
|
+
typing.List[GetSubAccountGroupsResponseItem]
|
|
265
|
+
list of all the sub-account groups
|
|
266
|
+
|
|
267
|
+
Examples
|
|
268
|
+
--------
|
|
269
|
+
from brevo import Brevo
|
|
270
|
+
|
|
271
|
+
client = Brevo(
|
|
272
|
+
api_key="YOUR_API_KEY",
|
|
273
|
+
)
|
|
274
|
+
client.master_account.get_sub_account_groups()
|
|
275
|
+
"""
|
|
276
|
+
_response = self._raw_client.get_sub_account_groups(request_options=request_options)
|
|
277
|
+
return _response.data
|
|
278
|
+
|
|
279
|
+
def get_corporate_invited_users_list(
|
|
280
|
+
self,
|
|
281
|
+
*,
|
|
282
|
+
type: typing.Optional[str] = None,
|
|
283
|
+
offset: typing.Optional[int] = None,
|
|
284
|
+
limit: typing.Optional[int] = None,
|
|
285
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
286
|
+
) -> GetCorporateInvitedUsersListResponse:
|
|
287
|
+
"""
|
|
288
|
+
This endpoint allows you to list all Admin users of your Admin account. You
|
|
289
|
+
can filter users by type (active or pending) and paginate results using
|
|
290
|
+
offset and limit.
|
|
291
|
+
|
|
292
|
+
Parameters
|
|
293
|
+
----------
|
|
294
|
+
type : typing.Optional[str]
|
|
295
|
+
User type (active | pending). This is required if offset is provided for
|
|
296
|
+
limited result.
|
|
297
|
+
|
|
298
|
+
offset : typing.Optional[int]
|
|
299
|
+
Page number for the result set. This is optional, default value will be
|
|
300
|
+
the 1st page.
|
|
301
|
+
|
|
302
|
+
limit : typing.Optional[int]
|
|
303
|
+
Number of users to be displayed on each page. This is optional, the
|
|
304
|
+
default limit is 20, but max allowed limit is 100.
|
|
305
|
+
|
|
306
|
+
request_options : typing.Optional[RequestOptions]
|
|
307
|
+
Request-specific configuration.
|
|
308
|
+
|
|
309
|
+
Returns
|
|
310
|
+
-------
|
|
311
|
+
GetCorporateInvitedUsersListResponse
|
|
312
|
+
list of all admin users
|
|
313
|
+
|
|
314
|
+
Examples
|
|
315
|
+
--------
|
|
316
|
+
from brevo import Brevo
|
|
317
|
+
|
|
318
|
+
client = Brevo(
|
|
319
|
+
api_key="YOUR_API_KEY",
|
|
320
|
+
)
|
|
321
|
+
client.master_account.get_corporate_invited_users_list()
|
|
322
|
+
"""
|
|
323
|
+
_response = self._raw_client.get_corporate_invited_users_list(
|
|
324
|
+
type=type, offset=offset, limit=limit, request_options=request_options
|
|
325
|
+
)
|
|
326
|
+
return _response.data
|
|
327
|
+
|
|
328
|
+
def list_of_all_i_ps(
|
|
329
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
330
|
+
) -> typing.List[GetCorporateIpResponseItem]:
|
|
331
|
+
"""
|
|
332
|
+
This endpoint allows you to retrieve the list of active IPs on your Admin
|
|
333
|
+
account
|
|
334
|
+
|
|
335
|
+
Parameters
|
|
336
|
+
----------
|
|
337
|
+
request_options : typing.Optional[RequestOptions]
|
|
338
|
+
Request-specific configuration.
|
|
339
|
+
|
|
340
|
+
Returns
|
|
341
|
+
-------
|
|
342
|
+
typing.List[GetCorporateIpResponseItem]
|
|
343
|
+
List of all IPs
|
|
344
|
+
|
|
345
|
+
Examples
|
|
346
|
+
--------
|
|
347
|
+
from brevo import Brevo
|
|
348
|
+
|
|
349
|
+
client = Brevo(
|
|
350
|
+
api_key="YOUR_API_KEY",
|
|
351
|
+
)
|
|
352
|
+
client.master_account.list_of_all_i_ps()
|
|
353
|
+
"""
|
|
354
|
+
_response = self._raw_client.list_of_all_i_ps(request_options=request_options)
|
|
355
|
+
return _response.data
|
|
356
|
+
|
|
357
|
+
def get_the_details_of_requested_master_account(
|
|
358
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
359
|
+
) -> GetCorporateMasterAccountResponse:
|
|
360
|
+
"""
|
|
361
|
+
This endpoint will provide the details of the master account.
|
|
362
|
+
|
|
363
|
+
Parameters
|
|
364
|
+
----------
|
|
365
|
+
request_options : typing.Optional[RequestOptions]
|
|
366
|
+
Request-specific configuration.
|
|
367
|
+
|
|
368
|
+
Returns
|
|
369
|
+
-------
|
|
370
|
+
GetCorporateMasterAccountResponse
|
|
371
|
+
Master account details
|
|
372
|
+
|
|
373
|
+
Examples
|
|
374
|
+
--------
|
|
375
|
+
from brevo import Brevo
|
|
376
|
+
|
|
377
|
+
client = Brevo(
|
|
378
|
+
api_key="YOUR_API_KEY",
|
|
379
|
+
)
|
|
380
|
+
client.master_account.get_the_details_of_requested_master_account()
|
|
381
|
+
"""
|
|
382
|
+
_response = self._raw_client.get_the_details_of_requested_master_account(request_options=request_options)
|
|
383
|
+
return _response.data
|
|
384
|
+
|
|
385
|
+
def generate_sso_token_to_access_admin_account(
|
|
386
|
+
self, *, email: str, request_options: typing.Optional[RequestOptions] = None
|
|
387
|
+
) -> GetSsoToken:
|
|
388
|
+
"""
|
|
389
|
+
This endpoint generates an SSO token to authenticate and access the admin
|
|
390
|
+
account using the endpoint
|
|
391
|
+
https://account-app.brevo.com/account/login/corporate/sso/[token], where
|
|
392
|
+
[token] will be replaced by the actual token.
|
|
393
|
+
|
|
394
|
+
Parameters
|
|
395
|
+
----------
|
|
396
|
+
email : str
|
|
397
|
+
User email of admin account
|
|
398
|
+
|
|
399
|
+
request_options : typing.Optional[RequestOptions]
|
|
400
|
+
Request-specific configuration.
|
|
401
|
+
|
|
402
|
+
Returns
|
|
403
|
+
-------
|
|
404
|
+
GetSsoToken
|
|
405
|
+
Session token
|
|
406
|
+
|
|
407
|
+
Examples
|
|
408
|
+
--------
|
|
409
|
+
from brevo import Brevo
|
|
410
|
+
|
|
411
|
+
client = Brevo(
|
|
412
|
+
api_key="YOUR_API_KEY",
|
|
413
|
+
)
|
|
414
|
+
client.master_account.generate_sso_token_to_access_admin_account(
|
|
415
|
+
email="vipin+ent-user@brevo.com",
|
|
416
|
+
)
|
|
417
|
+
"""
|
|
418
|
+
_response = self._raw_client.generate_sso_token_to_access_admin_account(
|
|
419
|
+
email=email, request_options=request_options
|
|
420
|
+
)
|
|
421
|
+
return _response.data
|
|
422
|
+
|
|
423
|
+
def get_the_list_of_all_the_sub_accounts_of_the_master_account(
|
|
424
|
+
self, *, offset: int, limit: int, request_options: typing.Optional[RequestOptions] = None
|
|
425
|
+
) -> GetCorporateSubAccountResponse:
|
|
426
|
+
"""
|
|
427
|
+
This endpoint will provide the list all the sub-accounts of the master
|
|
428
|
+
account.
|
|
429
|
+
|
|
430
|
+
Parameters
|
|
431
|
+
----------
|
|
432
|
+
offset : int
|
|
433
|
+
Index of the first sub-account in the page
|
|
434
|
+
|
|
435
|
+
limit : int
|
|
436
|
+
Number of sub-accounts to be displayed on each page
|
|
437
|
+
|
|
438
|
+
request_options : typing.Optional[RequestOptions]
|
|
439
|
+
Request-specific configuration.
|
|
440
|
+
|
|
441
|
+
Returns
|
|
442
|
+
-------
|
|
443
|
+
GetCorporateSubAccountResponse
|
|
444
|
+
Sub-accounts list
|
|
445
|
+
|
|
446
|
+
Examples
|
|
447
|
+
--------
|
|
448
|
+
from brevo import Brevo
|
|
449
|
+
|
|
450
|
+
client = Brevo(
|
|
451
|
+
api_key="YOUR_API_KEY",
|
|
452
|
+
)
|
|
453
|
+
client.master_account.get_the_list_of_all_the_sub_accounts_of_the_master_account(
|
|
454
|
+
offset=1,
|
|
455
|
+
limit=1,
|
|
456
|
+
)
|
|
457
|
+
"""
|
|
458
|
+
_response = self._raw_client.get_the_list_of_all_the_sub_accounts_of_the_master_account(
|
|
459
|
+
offset=offset, limit=limit, request_options=request_options
|
|
460
|
+
)
|
|
461
|
+
return _response.data
|
|
462
|
+
|
|
463
|
+
def create_a_new_sub_account_under_a_master_account(
|
|
464
|
+
self,
|
|
465
|
+
*,
|
|
466
|
+
company_name: str,
|
|
467
|
+
email: str,
|
|
468
|
+
group_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
469
|
+
language: typing.Optional[PostCorporateSubAccountRequestLanguage] = OMIT,
|
|
470
|
+
timezone: typing.Optional[str] = OMIT,
|
|
471
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
472
|
+
) -> PostCorporateSubAccountResponse:
|
|
473
|
+
"""
|
|
474
|
+
This endpoint will create a new sub-account under a master account
|
|
475
|
+
|
|
476
|
+
Parameters
|
|
477
|
+
----------
|
|
478
|
+
company_name : str
|
|
479
|
+
Set the name of the sub-account company
|
|
480
|
+
|
|
481
|
+
email : str
|
|
482
|
+
Email address for the organization
|
|
483
|
+
|
|
484
|
+
group_ids : typing.Optional[typing.Sequence[str]]
|
|
485
|
+
Set the group(s) for the sub-account
|
|
486
|
+
|
|
487
|
+
language : typing.Optional[PostCorporateSubAccountRequestLanguage]
|
|
488
|
+
Set the language of the sub-account
|
|
489
|
+
|
|
490
|
+
timezone : typing.Optional[str]
|
|
491
|
+
Set the timezone of the sub-account
|
|
492
|
+
|
|
493
|
+
request_options : typing.Optional[RequestOptions]
|
|
494
|
+
Request-specific configuration.
|
|
495
|
+
|
|
496
|
+
Returns
|
|
497
|
+
-------
|
|
498
|
+
PostCorporateSubAccountResponse
|
|
499
|
+
Created sub-account ID
|
|
500
|
+
|
|
501
|
+
Examples
|
|
502
|
+
--------
|
|
503
|
+
from brevo import Brevo
|
|
504
|
+
|
|
505
|
+
client = Brevo(
|
|
506
|
+
api_key="YOUR_API_KEY",
|
|
507
|
+
)
|
|
508
|
+
client.master_account.create_a_new_sub_account_under_a_master_account(
|
|
509
|
+
company_name="Test Sub-account",
|
|
510
|
+
email="test-sub@example.com",
|
|
511
|
+
group_ids=["5f8f8c3b5f56a02d4433b3a7", "5f8f8c3b5f56a02d4433b3a8"],
|
|
512
|
+
language="fr",
|
|
513
|
+
timezone="Europe/Paris",
|
|
514
|
+
)
|
|
515
|
+
"""
|
|
516
|
+
_response = self._raw_client.create_a_new_sub_account_under_a_master_account(
|
|
517
|
+
company_name=company_name,
|
|
518
|
+
email=email,
|
|
519
|
+
group_ids=group_ids,
|
|
520
|
+
language=language,
|
|
521
|
+
timezone=timezone,
|
|
522
|
+
request_options=request_options,
|
|
523
|
+
)
|
|
524
|
+
return _response.data
|
|
525
|
+
|
|
526
|
+
def associate_an_ip_to_sub_accounts(
|
|
527
|
+
self, *, ids: typing.Sequence[int], ip: str, request_options: typing.Optional[RequestOptions] = None
|
|
528
|
+
) -> typing.Dict[str, typing.Any]:
|
|
529
|
+
"""
|
|
530
|
+
This endpoint allows to associate an IP to sub-accounts
|
|
531
|
+
|
|
532
|
+
Parameters
|
|
533
|
+
----------
|
|
534
|
+
ids : typing.Sequence[int]
|
|
535
|
+
Pass the list of sub-account Ids to be associated with the IP
|
|
536
|
+
address
|
|
537
|
+
|
|
538
|
+
ip : str
|
|
539
|
+
IP address
|
|
540
|
+
|
|
541
|
+
request_options : typing.Optional[RequestOptions]
|
|
542
|
+
Request-specific configuration.
|
|
543
|
+
|
|
544
|
+
Returns
|
|
545
|
+
-------
|
|
546
|
+
typing.Dict[str, typing.Any]
|
|
547
|
+
IP has been associated with sub-accounts successfully
|
|
548
|
+
|
|
549
|
+
Examples
|
|
550
|
+
--------
|
|
551
|
+
from brevo import Brevo
|
|
552
|
+
|
|
553
|
+
client = Brevo(
|
|
554
|
+
api_key="YOUR_API_KEY",
|
|
555
|
+
)
|
|
556
|
+
client.master_account.associate_an_ip_to_sub_accounts(
|
|
557
|
+
ids=[234322, 325553, 893432],
|
|
558
|
+
ip="103.11.32.88",
|
|
559
|
+
)
|
|
560
|
+
"""
|
|
561
|
+
_response = self._raw_client.associate_an_ip_to_sub_accounts(ids=ids, ip=ip, request_options=request_options)
|
|
562
|
+
return _response.data
|
|
563
|
+
|
|
564
|
+
def dissociate_an_ip_to_sub_accounts(
|
|
565
|
+
self, *, ids: typing.Sequence[int], ip: str, request_options: typing.Optional[RequestOptions] = None
|
|
566
|
+
) -> None:
|
|
567
|
+
"""
|
|
568
|
+
This endpoint allows to dissociate an IP from sub-accounts
|
|
569
|
+
|
|
570
|
+
Parameters
|
|
571
|
+
----------
|
|
572
|
+
ids : typing.Sequence[int]
|
|
573
|
+
Pass the list of sub-account Ids to be dissociated from the IP
|
|
574
|
+
address
|
|
575
|
+
|
|
576
|
+
ip : str
|
|
577
|
+
IP address
|
|
578
|
+
|
|
579
|
+
request_options : typing.Optional[RequestOptions]
|
|
580
|
+
Request-specific configuration.
|
|
581
|
+
|
|
582
|
+
Returns
|
|
583
|
+
-------
|
|
584
|
+
None
|
|
585
|
+
|
|
586
|
+
Examples
|
|
587
|
+
--------
|
|
588
|
+
from brevo import Brevo
|
|
589
|
+
|
|
590
|
+
client = Brevo(
|
|
591
|
+
api_key="YOUR_API_KEY",
|
|
592
|
+
)
|
|
593
|
+
client.master_account.dissociate_an_ip_to_sub_accounts(
|
|
594
|
+
ids=[234322, 325553, 893432],
|
|
595
|
+
ip="103.11.32.88",
|
|
596
|
+
)
|
|
597
|
+
"""
|
|
598
|
+
_response = self._raw_client.dissociate_an_ip_to_sub_accounts(ids=ids, ip=ip, request_options=request_options)
|
|
599
|
+
return _response.data
|
|
600
|
+
|
|
601
|
+
def create_an_api_key_for_a_sub_account(
|
|
602
|
+
self, *, id: int, name: str, request_options: typing.Optional[RequestOptions] = None
|
|
603
|
+
) -> PostCorporateSubAccountKeyResponse:
|
|
604
|
+
"""
|
|
605
|
+
This endpoint will generate an API v3 key for a sub-account
|
|
606
|
+
|
|
607
|
+
Parameters
|
|
608
|
+
----------
|
|
609
|
+
id : int
|
|
610
|
+
Id of the sub-account organization
|
|
611
|
+
|
|
612
|
+
name : str
|
|
613
|
+
Name of the API key
|
|
614
|
+
|
|
615
|
+
request_options : typing.Optional[RequestOptions]
|
|
616
|
+
Request-specific configuration.
|
|
617
|
+
|
|
618
|
+
Returns
|
|
619
|
+
-------
|
|
620
|
+
PostCorporateSubAccountKeyResponse
|
|
621
|
+
API key
|
|
622
|
+
|
|
623
|
+
Examples
|
|
624
|
+
--------
|
|
625
|
+
from brevo import Brevo
|
|
626
|
+
|
|
627
|
+
client = Brevo(
|
|
628
|
+
api_key="YOUR_API_KEY",
|
|
629
|
+
)
|
|
630
|
+
client.master_account.create_an_api_key_for_a_sub_account(
|
|
631
|
+
id=3232323,
|
|
632
|
+
name="My Api Key",
|
|
633
|
+
)
|
|
634
|
+
"""
|
|
635
|
+
_response = self._raw_client.create_an_api_key_for_a_sub_account(
|
|
636
|
+
id=id, name=name, request_options=request_options
|
|
637
|
+
)
|
|
638
|
+
return _response.data
|
|
639
|
+
|
|
640
|
+
def generate_sso_token_to_access_sub_account(
|
|
641
|
+
self,
|
|
642
|
+
*,
|
|
643
|
+
id: int,
|
|
644
|
+
email: typing.Optional[str] = OMIT,
|
|
645
|
+
target: typing.Optional[PostCorporateSubAccountSsoTokenRequestTarget] = OMIT,
|
|
646
|
+
url: typing.Optional[str] = OMIT,
|
|
647
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
648
|
+
) -> GetSsoToken:
|
|
649
|
+
"""
|
|
650
|
+
This endpoint generates an sso token to authenticate and access a
|
|
651
|
+
sub-account of the master using the account endpoint
|
|
652
|
+
https://account-app.brevo.com/account/login/sub-account/sso/[token], where
|
|
653
|
+
[token] will be replaced by the actual token.
|
|
654
|
+
|
|
655
|
+
Parameters
|
|
656
|
+
----------
|
|
657
|
+
id : int
|
|
658
|
+
Id of the sub-account organization
|
|
659
|
+
|
|
660
|
+
email : typing.Optional[str]
|
|
661
|
+
User email of sub-account organization
|
|
662
|
+
|
|
663
|
+
target : typing.Optional[PostCorporateSubAccountSsoTokenRequestTarget]
|
|
664
|
+
**Set target after login success** * **automation** - Redirect
|
|
665
|
+
to Automation after login * **email_campaign** - Redirect to
|
|
666
|
+
Email Campaign after login * **contacts** - Redirect to Contacts
|
|
667
|
+
after login * **landing_pages** - Redirect to Landing Pages
|
|
668
|
+
after login * **email_transactional** - Redirect to Email
|
|
669
|
+
Transactional after login * **senders** - Redirect to Senders
|
|
670
|
+
after login * **sms_campaign** - Redirect to Sms Campaign after
|
|
671
|
+
login * **sms_transactional** - Redirect to Sms Transactional
|
|
672
|
+
after login
|
|
673
|
+
|
|
674
|
+
url : typing.Optional[str]
|
|
675
|
+
Set the full target URL after login success. The user will land
|
|
676
|
+
directly on this target URL after login
|
|
677
|
+
|
|
678
|
+
request_options : typing.Optional[RequestOptions]
|
|
679
|
+
Request-specific configuration.
|
|
680
|
+
|
|
681
|
+
Returns
|
|
682
|
+
-------
|
|
683
|
+
GetSsoToken
|
|
684
|
+
Session token
|
|
685
|
+
|
|
686
|
+
Examples
|
|
687
|
+
--------
|
|
688
|
+
from brevo import Brevo
|
|
689
|
+
|
|
690
|
+
client = Brevo(
|
|
691
|
+
api_key="YOUR_API_KEY",
|
|
692
|
+
)
|
|
693
|
+
client.master_account.generate_sso_token_to_access_sub_account(
|
|
694
|
+
id=3232323,
|
|
695
|
+
)
|
|
696
|
+
"""
|
|
697
|
+
_response = self._raw_client.generate_sso_token_to_access_sub_account(
|
|
698
|
+
id=id, email=email, target=target, url=url, request_options=request_options
|
|
699
|
+
)
|
|
700
|
+
return _response.data
|
|
701
|
+
|
|
702
|
+
def get_sub_account_details(
|
|
703
|
+
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
704
|
+
) -> GetCorporateSubAccountIdResponse:
|
|
705
|
+
"""
|
|
706
|
+
This endpoint will provide the details for the specified sub-account company
|
|
707
|
+
|
|
708
|
+
Parameters
|
|
709
|
+
----------
|
|
710
|
+
id : int
|
|
711
|
+
Id of the sub-account organization
|
|
712
|
+
|
|
713
|
+
request_options : typing.Optional[RequestOptions]
|
|
714
|
+
Request-specific configuration.
|
|
715
|
+
|
|
716
|
+
Returns
|
|
717
|
+
-------
|
|
718
|
+
GetCorporateSubAccountIdResponse
|
|
719
|
+
Sub-account organization details
|
|
720
|
+
|
|
721
|
+
Examples
|
|
722
|
+
--------
|
|
723
|
+
from brevo import Brevo
|
|
724
|
+
|
|
725
|
+
client = Brevo(
|
|
726
|
+
api_key="YOUR_API_KEY",
|
|
727
|
+
)
|
|
728
|
+
client.master_account.get_sub_account_details(
|
|
729
|
+
id=1000000,
|
|
730
|
+
)
|
|
731
|
+
"""
|
|
732
|
+
_response = self._raw_client.get_sub_account_details(id, request_options=request_options)
|
|
733
|
+
return _response.data
|
|
734
|
+
|
|
735
|
+
def delete_a_sub_account(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
736
|
+
"""
|
|
737
|
+
Parameters
|
|
738
|
+
----------
|
|
739
|
+
id : int
|
|
740
|
+
Id of the sub-account organization to be deleted
|
|
741
|
+
|
|
742
|
+
request_options : typing.Optional[RequestOptions]
|
|
743
|
+
Request-specific configuration.
|
|
744
|
+
|
|
745
|
+
Returns
|
|
746
|
+
-------
|
|
747
|
+
None
|
|
748
|
+
|
|
749
|
+
Examples
|
|
750
|
+
--------
|
|
751
|
+
from brevo import Brevo
|
|
752
|
+
|
|
753
|
+
client = Brevo(
|
|
754
|
+
api_key="YOUR_API_KEY",
|
|
755
|
+
)
|
|
756
|
+
client.master_account.delete_a_sub_account(
|
|
757
|
+
id=1000000,
|
|
758
|
+
)
|
|
759
|
+
"""
|
|
760
|
+
_response = self._raw_client.delete_a_sub_account(id, request_options=request_options)
|
|
761
|
+
return _response.data
|
|
762
|
+
|
|
763
|
+
def enable_disable_sub_account_application_s(
|
|
764
|
+
self,
|
|
765
|
+
id: int,
|
|
766
|
+
*,
|
|
767
|
+
automation: typing.Optional[bool] = OMIT,
|
|
768
|
+
conversations: typing.Optional[bool] = OMIT,
|
|
769
|
+
crm: typing.Optional[bool] = OMIT,
|
|
770
|
+
email_campaigns: typing.Optional[bool] = OMIT,
|
|
771
|
+
facebook_ads: typing.Optional[bool] = OMIT,
|
|
772
|
+
inbox: typing.Optional[bool] = OMIT,
|
|
773
|
+
landing_pages: typing.Optional[bool] = OMIT,
|
|
774
|
+
meetings: typing.Optional[bool] = OMIT,
|
|
775
|
+
sms_campaigns: typing.Optional[bool] = OMIT,
|
|
776
|
+
transactional_emails: typing.Optional[bool] = OMIT,
|
|
777
|
+
transactional_sms: typing.Optional[bool] = OMIT,
|
|
778
|
+
web_push: typing.Optional[bool] = OMIT,
|
|
779
|
+
whatsapp: typing.Optional[bool] = OMIT,
|
|
780
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
781
|
+
) -> None:
|
|
782
|
+
"""
|
|
783
|
+
API endpoint for the Corporate owner to enable/disable applications on the
|
|
784
|
+
sub-account
|
|
785
|
+
|
|
786
|
+
Parameters
|
|
787
|
+
----------
|
|
788
|
+
id : int
|
|
789
|
+
Id of the sub-account organization (mandatory)
|
|
790
|
+
|
|
791
|
+
automation : typing.Optional[bool]
|
|
792
|
+
Set this field to enable or disable Automation on the
|
|
793
|
+
sub-account
|
|
794
|
+
|
|
795
|
+
conversations : typing.Optional[bool]
|
|
796
|
+
Set this field to enable or disable Conversations on the
|
|
797
|
+
sub-account
|
|
798
|
+
|
|
799
|
+
crm : typing.Optional[bool]
|
|
800
|
+
Set this field to enable or disable Sales CRM on the sub-account
|
|
801
|
+
|
|
802
|
+
email_campaigns : typing.Optional[bool]
|
|
803
|
+
Set this field to enable or disable Email Campaigns on the
|
|
804
|
+
sub-account
|
|
805
|
+
|
|
806
|
+
facebook_ads : typing.Optional[bool]
|
|
807
|
+
Set this field to enable or disable Facebook ads on the
|
|
808
|
+
sub-account
|
|
809
|
+
|
|
810
|
+
inbox : typing.Optional[bool]
|
|
811
|
+
Set this field to enable or disable Inbox on the sub-account /
|
|
812
|
+
Not applicable on ENTv2
|
|
813
|
+
|
|
814
|
+
landing_pages : typing.Optional[bool]
|
|
815
|
+
Set this field to enable or disable Landing pages on the
|
|
816
|
+
sub-account
|
|
817
|
+
|
|
818
|
+
meetings : typing.Optional[bool]
|
|
819
|
+
Set this field to enable or disable Meetings on the sub-account
|
|
820
|
+
|
|
821
|
+
sms_campaigns : typing.Optional[bool]
|
|
822
|
+
Set this field to enable or disable SMS Marketing on the
|
|
823
|
+
sub-account
|
|
824
|
+
|
|
825
|
+
transactional_emails : typing.Optional[bool]
|
|
826
|
+
Set this field to enable or disable Transactional Email on the
|
|
827
|
+
sub-account
|
|
828
|
+
|
|
829
|
+
transactional_sms : typing.Optional[bool]
|
|
830
|
+
Set this field to enable or disable Transactional SMS on the
|
|
831
|
+
sub-account
|
|
832
|
+
|
|
833
|
+
web_push : typing.Optional[bool]
|
|
834
|
+
Set this field to enable or disable Web Push on the sub-account
|
|
835
|
+
|
|
836
|
+
whatsapp : typing.Optional[bool]
|
|
837
|
+
Set this field to enable or disable Whatsapp campaigns on the
|
|
838
|
+
sub-account
|
|
839
|
+
|
|
840
|
+
request_options : typing.Optional[RequestOptions]
|
|
841
|
+
Request-specific configuration.
|
|
842
|
+
|
|
843
|
+
Returns
|
|
844
|
+
-------
|
|
845
|
+
None
|
|
846
|
+
|
|
847
|
+
Examples
|
|
848
|
+
--------
|
|
849
|
+
from brevo import Brevo
|
|
850
|
+
|
|
851
|
+
client = Brevo(
|
|
852
|
+
api_key="YOUR_API_KEY",
|
|
853
|
+
)
|
|
854
|
+
client.master_account.enable_disable_sub_account_application_s(
|
|
855
|
+
id=1000000,
|
|
856
|
+
landing_pages=True,
|
|
857
|
+
meetings=True,
|
|
858
|
+
sms_campaigns=False,
|
|
859
|
+
web_push=False,
|
|
860
|
+
whatsapp=True,
|
|
861
|
+
)
|
|
862
|
+
"""
|
|
863
|
+
_response = self._raw_client.enable_disable_sub_account_application_s(
|
|
864
|
+
id,
|
|
865
|
+
automation=automation,
|
|
866
|
+
conversations=conversations,
|
|
867
|
+
crm=crm,
|
|
868
|
+
email_campaigns=email_campaigns,
|
|
869
|
+
facebook_ads=facebook_ads,
|
|
870
|
+
inbox=inbox,
|
|
871
|
+
landing_pages=landing_pages,
|
|
872
|
+
meetings=meetings,
|
|
873
|
+
sms_campaigns=sms_campaigns,
|
|
874
|
+
transactional_emails=transactional_emails,
|
|
875
|
+
transactional_sms=transactional_sms,
|
|
876
|
+
web_push=web_push,
|
|
877
|
+
whatsapp=whatsapp,
|
|
878
|
+
request_options=request_options,
|
|
879
|
+
)
|
|
880
|
+
return _response.data
|
|
881
|
+
|
|
882
|
+
def update_sub_account_plan(
|
|
883
|
+
self,
|
|
884
|
+
id: int,
|
|
885
|
+
*,
|
|
886
|
+
credits: typing.Optional[PutCorporateSubAccountIdPlanRequestCredits] = OMIT,
|
|
887
|
+
features: typing.Optional[PutCorporateSubAccountIdPlanRequestFeatures] = OMIT,
|
|
888
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
889
|
+
) -> None:
|
|
890
|
+
"""
|
|
891
|
+
This endpoint will update the sub-account plan. On the Corporate solution
|
|
892
|
+
new version v2, you can set an unlimited number of credits in your
|
|
893
|
+
sub-organization. Please pass the value “-1" to set the consumable in
|
|
894
|
+
unlimited mode.
|
|
895
|
+
|
|
896
|
+
Parameters
|
|
897
|
+
----------
|
|
898
|
+
id : int
|
|
899
|
+
Id of the sub-account organization
|
|
900
|
+
|
|
901
|
+
credits : typing.Optional[PutCorporateSubAccountIdPlanRequestCredits]
|
|
902
|
+
Credit details to update
|
|
903
|
+
|
|
904
|
+
features : typing.Optional[PutCorporateSubAccountIdPlanRequestFeatures]
|
|
905
|
+
Features details to update
|
|
906
|
+
|
|
907
|
+
request_options : typing.Optional[RequestOptions]
|
|
908
|
+
Request-specific configuration.
|
|
909
|
+
|
|
910
|
+
Returns
|
|
911
|
+
-------
|
|
912
|
+
None
|
|
913
|
+
|
|
914
|
+
Examples
|
|
915
|
+
--------
|
|
916
|
+
from brevo import Brevo
|
|
917
|
+
from brevo.master_account import (
|
|
918
|
+
PutCorporateSubAccountIdPlanRequestCredits,
|
|
919
|
+
PutCorporateSubAccountIdPlanRequestFeatures,
|
|
920
|
+
)
|
|
921
|
+
|
|
922
|
+
client = Brevo(
|
|
923
|
+
api_key="YOUR_API_KEY",
|
|
924
|
+
)
|
|
925
|
+
client.master_account.update_sub_account_plan(
|
|
926
|
+
id=1000000,
|
|
927
|
+
credits=PutCorporateSubAccountIdPlanRequestCredits(
|
|
928
|
+
email=5000,
|
|
929
|
+
external_feeds=1,
|
|
930
|
+
sms=2000.0,
|
|
931
|
+
whatsapp=100.0,
|
|
932
|
+
wp_subscribers=-1,
|
|
933
|
+
),
|
|
934
|
+
features=PutCorporateSubAccountIdPlanRequestFeatures(
|
|
935
|
+
inbox=10,
|
|
936
|
+
landing_page=20,
|
|
937
|
+
sales_users=6,
|
|
938
|
+
users=15,
|
|
939
|
+
),
|
|
940
|
+
)
|
|
941
|
+
"""
|
|
942
|
+
_response = self._raw_client.update_sub_account_plan(
|
|
943
|
+
id, credits=credits, features=features, request_options=request_options
|
|
944
|
+
)
|
|
945
|
+
return _response.data
|
|
946
|
+
|
|
947
|
+
def update_sub_accounts_plan(
|
|
948
|
+
self,
|
|
949
|
+
*,
|
|
950
|
+
credits: typing.Optional[PutCorporateSubAccountsPlanRequestCredits] = OMIT,
|
|
951
|
+
features: typing.Optional[PutCorporateSubAccountsPlanRequestFeatures] = OMIT,
|
|
952
|
+
sub_account_ids: typing.Optional[typing.Sequence[int]] = OMIT,
|
|
953
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
954
|
+
) -> None:
|
|
955
|
+
"""
|
|
956
|
+
This endpoint will update multiple sub-accounts plan. On the Corporate
|
|
957
|
+
solution new version v2, you can set an unlimited number of credits in your
|
|
958
|
+
sub-organization. Please pass the value “-1" to set the consumable in
|
|
959
|
+
unlimited mode.
|
|
960
|
+
|
|
961
|
+
Parameters
|
|
962
|
+
----------
|
|
963
|
+
credits : typing.Optional[PutCorporateSubAccountsPlanRequestCredits]
|
|
964
|
+
Credit details to update
|
|
965
|
+
|
|
966
|
+
features : typing.Optional[PutCorporateSubAccountsPlanRequestFeatures]
|
|
967
|
+
Features details to update
|
|
968
|
+
|
|
969
|
+
sub_account_ids : typing.Optional[typing.Sequence[int]]
|
|
970
|
+
List of sub-account ids
|
|
971
|
+
|
|
972
|
+
request_options : typing.Optional[RequestOptions]
|
|
973
|
+
Request-specific configuration.
|
|
974
|
+
|
|
975
|
+
Returns
|
|
976
|
+
-------
|
|
977
|
+
None
|
|
978
|
+
|
|
979
|
+
Examples
|
|
980
|
+
--------
|
|
981
|
+
from brevo import Brevo
|
|
982
|
+
from brevo.master_account import (
|
|
983
|
+
PutCorporateSubAccountsPlanRequestCredits,
|
|
984
|
+
PutCorporateSubAccountsPlanRequestFeatures,
|
|
985
|
+
)
|
|
986
|
+
|
|
987
|
+
client = Brevo(
|
|
988
|
+
api_key="YOUR_API_KEY",
|
|
989
|
+
)
|
|
990
|
+
client.master_account.update_sub_accounts_plan(
|
|
991
|
+
credits=PutCorporateSubAccountsPlanRequestCredits(
|
|
992
|
+
email=5000,
|
|
993
|
+
external_feeds=1,
|
|
994
|
+
sms=2000.0,
|
|
995
|
+
whatsapp=100.0,
|
|
996
|
+
wp_subscribers=-1,
|
|
997
|
+
),
|
|
998
|
+
features=PutCorporateSubAccountsPlanRequestFeatures(
|
|
999
|
+
landing_page=20,
|
|
1000
|
+
sales_users=6,
|
|
1001
|
+
users=15,
|
|
1002
|
+
),
|
|
1003
|
+
sub_account_ids=[4534345, 987893, 876785],
|
|
1004
|
+
)
|
|
1005
|
+
"""
|
|
1006
|
+
_response = self._raw_client.update_sub_accounts_plan(
|
|
1007
|
+
credits=credits, features=features, sub_account_ids=sub_account_ids, request_options=request_options
|
|
1008
|
+
)
|
|
1009
|
+
return _response.data
|
|
1010
|
+
|
|
1011
|
+
def invite_admin_user(
|
|
1012
|
+
self,
|
|
1013
|
+
*,
|
|
1014
|
+
all_features_access: bool,
|
|
1015
|
+
email: str,
|
|
1016
|
+
privileges: typing.Sequence[InviteAdminUserRequestPrivilegesItem],
|
|
1017
|
+
group_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1018
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1019
|
+
) -> InviteAdminUserResponse:
|
|
1020
|
+
"""
|
|
1021
|
+
`This endpoint allows you to invite a member to manage the Admin account
|
|
1022
|
+
Features and their respective permissions are as below: - `my_plan`:
|
|
1023
|
+
- "all"
|
|
1024
|
+
- `api`:
|
|
1025
|
+
- "none"
|
|
1026
|
+
- `user_management`:
|
|
1027
|
+
- "all"
|
|
1028
|
+
- `app_management` | Not available in ENTv2:
|
|
1029
|
+
- "all"
|
|
1030
|
+
- `sub_organization_groups`
|
|
1031
|
+
- "create"
|
|
1032
|
+
- "edit_delete"
|
|
1033
|
+
- `create_sub_organizations`
|
|
1034
|
+
- "all"
|
|
1035
|
+
- `manage_sub_organizations`
|
|
1036
|
+
- "all"
|
|
1037
|
+
- `analytics`
|
|
1038
|
+
- "download_data"
|
|
1039
|
+
- "create_alerts"
|
|
1040
|
+
- "my_looks"
|
|
1041
|
+
- "explore_create"
|
|
1042
|
+
- `security`
|
|
1043
|
+
- "all"
|
|
1044
|
+
**Note**: - If `all_features_access: false` then only privileges are
|
|
1045
|
+
required otherwise if `true` then it's assumed that all permissions will be
|
|
1046
|
+
there for the invited admin user.
|
|
1047
|
+
|
|
1048
|
+
Parameters
|
|
1049
|
+
----------
|
|
1050
|
+
all_features_access : bool
|
|
1051
|
+
All access to the features
|
|
1052
|
+
|
|
1053
|
+
email : str
|
|
1054
|
+
Email address for the organization
|
|
1055
|
+
|
|
1056
|
+
privileges : typing.Sequence[InviteAdminUserRequestPrivilegesItem]
|
|
1057
|
+
|
|
1058
|
+
group_ids : typing.Optional[typing.Sequence[str]]
|
|
1059
|
+
Ids of Group
|
|
1060
|
+
|
|
1061
|
+
request_options : typing.Optional[RequestOptions]
|
|
1062
|
+
Request-specific configuration.
|
|
1063
|
+
|
|
1064
|
+
Returns
|
|
1065
|
+
-------
|
|
1066
|
+
InviteAdminUserResponse
|
|
1067
|
+
Invitation ID
|
|
1068
|
+
|
|
1069
|
+
Examples
|
|
1070
|
+
--------
|
|
1071
|
+
from brevo import Brevo
|
|
1072
|
+
from brevo.master_account import InviteAdminUserRequestPrivilegesItem
|
|
1073
|
+
|
|
1074
|
+
client = Brevo(
|
|
1075
|
+
api_key="YOUR_API_KEY",
|
|
1076
|
+
)
|
|
1077
|
+
client.master_account.invite_admin_user(
|
|
1078
|
+
all_features_access=True,
|
|
1079
|
+
email="inviteuser@example.com",
|
|
1080
|
+
privileges=[InviteAdminUserRequestPrivilegesItem()],
|
|
1081
|
+
)
|
|
1082
|
+
"""
|
|
1083
|
+
_response = self._raw_client.invite_admin_user(
|
|
1084
|
+
all_features_access=all_features_access,
|
|
1085
|
+
email=email,
|
|
1086
|
+
privileges=privileges,
|
|
1087
|
+
group_ids=group_ids,
|
|
1088
|
+
request_options=request_options,
|
|
1089
|
+
)
|
|
1090
|
+
return _response.data
|
|
1091
|
+
|
|
1092
|
+
def resend_cancel_admin_user_invitation(
|
|
1093
|
+
self,
|
|
1094
|
+
action: PutCorporateUserInvitationActionEmailRequestAction,
|
|
1095
|
+
email: str,
|
|
1096
|
+
*,
|
|
1097
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1098
|
+
) -> PutCorporateUserInvitationActionEmailResponse:
|
|
1099
|
+
"""
|
|
1100
|
+
This endpoint will allow the user to:
|
|
1101
|
+
- Resend an admin user invitation
|
|
1102
|
+
- Cancel an admin user invitation
|
|
1103
|
+
|
|
1104
|
+
Parameters
|
|
1105
|
+
----------
|
|
1106
|
+
action : PutCorporateUserInvitationActionEmailRequestAction
|
|
1107
|
+
Action to be performed (cancel / resend)
|
|
1108
|
+
|
|
1109
|
+
email : str
|
|
1110
|
+
Email address of the recipient
|
|
1111
|
+
|
|
1112
|
+
request_options : typing.Optional[RequestOptions]
|
|
1113
|
+
Request-specific configuration.
|
|
1114
|
+
|
|
1115
|
+
Returns
|
|
1116
|
+
-------
|
|
1117
|
+
PutCorporateUserInvitationActionEmailResponse
|
|
1118
|
+
Response of the action performed
|
|
1119
|
+
|
|
1120
|
+
Examples
|
|
1121
|
+
--------
|
|
1122
|
+
from brevo import Brevo
|
|
1123
|
+
|
|
1124
|
+
client = Brevo(
|
|
1125
|
+
api_key="YOUR_API_KEY",
|
|
1126
|
+
)
|
|
1127
|
+
client.master_account.resend_cancel_admin_user_invitation(
|
|
1128
|
+
action="resend",
|
|
1129
|
+
email="email",
|
|
1130
|
+
)
|
|
1131
|
+
"""
|
|
1132
|
+
_response = self._raw_client.resend_cancel_admin_user_invitation(action, email, request_options=request_options)
|
|
1133
|
+
return _response.data
|
|
1134
|
+
|
|
1135
|
+
def revoke_an_admin_user(self, email: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
1136
|
+
"""
|
|
1137
|
+
This endpoint allows to revoke/remove an invited member of your Admin
|
|
1138
|
+
account
|
|
1139
|
+
|
|
1140
|
+
Parameters
|
|
1141
|
+
----------
|
|
1142
|
+
email : str
|
|
1143
|
+
Email of the invited user
|
|
1144
|
+
|
|
1145
|
+
request_options : typing.Optional[RequestOptions]
|
|
1146
|
+
Request-specific configuration.
|
|
1147
|
+
|
|
1148
|
+
Returns
|
|
1149
|
+
-------
|
|
1150
|
+
None
|
|
1151
|
+
|
|
1152
|
+
Examples
|
|
1153
|
+
--------
|
|
1154
|
+
from brevo import Brevo
|
|
1155
|
+
|
|
1156
|
+
client = Brevo(
|
|
1157
|
+
api_key="YOUR_API_KEY",
|
|
1158
|
+
)
|
|
1159
|
+
client.master_account.revoke_an_admin_user(
|
|
1160
|
+
email="email",
|
|
1161
|
+
)
|
|
1162
|
+
"""
|
|
1163
|
+
_response = self._raw_client.revoke_an_admin_user(email, request_options=request_options)
|
|
1164
|
+
return _response.data
|
|
1165
|
+
|
|
1166
|
+
def get_corporate_user_permission(
|
|
1167
|
+
self, email: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1168
|
+
) -> GetCorporateUserPermissionResponse:
|
|
1169
|
+
"""
|
|
1170
|
+
This endpoint will provide the list of admin user permissions
|
|
1171
|
+
|
|
1172
|
+
Parameters
|
|
1173
|
+
----------
|
|
1174
|
+
email : str
|
|
1175
|
+
Email of the invited user.
|
|
1176
|
+
|
|
1177
|
+
request_options : typing.Optional[RequestOptions]
|
|
1178
|
+
Request-specific configuration.
|
|
1179
|
+
|
|
1180
|
+
Returns
|
|
1181
|
+
-------
|
|
1182
|
+
GetCorporateUserPermissionResponse
|
|
1183
|
+
List of user's permissions
|
|
1184
|
+
|
|
1185
|
+
Examples
|
|
1186
|
+
--------
|
|
1187
|
+
from brevo import Brevo
|
|
1188
|
+
|
|
1189
|
+
client = Brevo(
|
|
1190
|
+
api_key="YOUR_API_KEY",
|
|
1191
|
+
)
|
|
1192
|
+
client.master_account.get_corporate_user_permission(
|
|
1193
|
+
email="email",
|
|
1194
|
+
)
|
|
1195
|
+
"""
|
|
1196
|
+
_response = self._raw_client.get_corporate_user_permission(email, request_options=request_options)
|
|
1197
|
+
return _response.data
|
|
1198
|
+
|
|
1199
|
+
def change_admin_user_permissions(
|
|
1200
|
+
self,
|
|
1201
|
+
email: str,
|
|
1202
|
+
*,
|
|
1203
|
+
all_features_access: bool,
|
|
1204
|
+
privileges: typing.Sequence[PutCorporateUserEmailPermissionsRequestPrivilegesItem],
|
|
1205
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1206
|
+
) -> None:
|
|
1207
|
+
"""
|
|
1208
|
+
This endpoint will allow you to change the permissions of Admin users of
|
|
1209
|
+
your Admin account
|
|
1210
|
+
|
|
1211
|
+
Parameters
|
|
1212
|
+
----------
|
|
1213
|
+
email : str
|
|
1214
|
+
Email address of Admin user
|
|
1215
|
+
|
|
1216
|
+
all_features_access : bool
|
|
1217
|
+
All access to the features
|
|
1218
|
+
|
|
1219
|
+
privileges : typing.Sequence[PutCorporateUserEmailPermissionsRequestPrivilegesItem]
|
|
1220
|
+
|
|
1221
|
+
request_options : typing.Optional[RequestOptions]
|
|
1222
|
+
Request-specific configuration.
|
|
1223
|
+
|
|
1224
|
+
Returns
|
|
1225
|
+
-------
|
|
1226
|
+
None
|
|
1227
|
+
|
|
1228
|
+
Examples
|
|
1229
|
+
--------
|
|
1230
|
+
from brevo import Brevo
|
|
1231
|
+
from brevo.master_account import (
|
|
1232
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem,
|
|
1233
|
+
)
|
|
1234
|
+
|
|
1235
|
+
client = Brevo(
|
|
1236
|
+
api_key="YOUR_API_KEY",
|
|
1237
|
+
)
|
|
1238
|
+
client.master_account.change_admin_user_permissions(
|
|
1239
|
+
email="email",
|
|
1240
|
+
all_features_access=False,
|
|
1241
|
+
privileges=[
|
|
1242
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
1243
|
+
feature="user_management",
|
|
1244
|
+
permissions=["all"],
|
|
1245
|
+
),
|
|
1246
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
1247
|
+
feature="api",
|
|
1248
|
+
permissions=["all"],
|
|
1249
|
+
),
|
|
1250
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
1251
|
+
feature="my_plan",
|
|
1252
|
+
permissions=["none"],
|
|
1253
|
+
),
|
|
1254
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
1255
|
+
feature="apps_management",
|
|
1256
|
+
permissions=["all"],
|
|
1257
|
+
),
|
|
1258
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
1259
|
+
feature="create_sub_organizations",
|
|
1260
|
+
permissions=["all"],
|
|
1261
|
+
),
|
|
1262
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
1263
|
+
feature="sub_organization_groups",
|
|
1264
|
+
permissions=["create", "edit_delete"],
|
|
1265
|
+
),
|
|
1266
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
1267
|
+
feature="manage_sub_organizations",
|
|
1268
|
+
permissions=["all"],
|
|
1269
|
+
),
|
|
1270
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
1271
|
+
feature="security",
|
|
1272
|
+
permissions=["none"],
|
|
1273
|
+
),
|
|
1274
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
1275
|
+
feature="analytics",
|
|
1276
|
+
permissions=[
|
|
1277
|
+
"create_alerts",
|
|
1278
|
+
"download_data",
|
|
1279
|
+
"my_looks",
|
|
1280
|
+
"explore_create",
|
|
1281
|
+
],
|
|
1282
|
+
),
|
|
1283
|
+
],
|
|
1284
|
+
)
|
|
1285
|
+
"""
|
|
1286
|
+
_response = self._raw_client.change_admin_user_permissions(
|
|
1287
|
+
email, all_features_access=all_features_access, privileges=privileges, request_options=request_options
|
|
1288
|
+
)
|
|
1289
|
+
return _response.data
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
class AsyncMasterAccountClient:
|
|
1293
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
1294
|
+
self._raw_client = AsyncRawMasterAccountClient(client_wrapper=client_wrapper)
|
|
1295
|
+
|
|
1296
|
+
@property
|
|
1297
|
+
def with_raw_response(self) -> AsyncRawMasterAccountClient:
|
|
1298
|
+
"""
|
|
1299
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
1300
|
+
|
|
1301
|
+
Returns
|
|
1302
|
+
-------
|
|
1303
|
+
AsyncRawMasterAccountClient
|
|
1304
|
+
"""
|
|
1305
|
+
return self._raw_client
|
|
1306
|
+
|
|
1307
|
+
async def create_a_new_group_of_sub_accounts(
|
|
1308
|
+
self,
|
|
1309
|
+
*,
|
|
1310
|
+
group_name: str,
|
|
1311
|
+
sub_account_ids: typing.Optional[typing.Sequence[int]] = OMIT,
|
|
1312
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1313
|
+
) -> PostCorporateGroupResponse:
|
|
1314
|
+
"""
|
|
1315
|
+
This endpoint allows to create a group of sub-accounts
|
|
1316
|
+
|
|
1317
|
+
Parameters
|
|
1318
|
+
----------
|
|
1319
|
+
group_name : str
|
|
1320
|
+
The name of the group of sub-accounts
|
|
1321
|
+
|
|
1322
|
+
sub_account_ids : typing.Optional[typing.Sequence[int]]
|
|
1323
|
+
Pass the list of sub-account Ids to be included in the group
|
|
1324
|
+
|
|
1325
|
+
request_options : typing.Optional[RequestOptions]
|
|
1326
|
+
Request-specific configuration.
|
|
1327
|
+
|
|
1328
|
+
Returns
|
|
1329
|
+
-------
|
|
1330
|
+
PostCorporateGroupResponse
|
|
1331
|
+
Group ID
|
|
1332
|
+
|
|
1333
|
+
Examples
|
|
1334
|
+
--------
|
|
1335
|
+
import asyncio
|
|
1336
|
+
|
|
1337
|
+
from brevo import AsyncBrevo
|
|
1338
|
+
|
|
1339
|
+
client = AsyncBrevo(
|
|
1340
|
+
api_key="YOUR_API_KEY",
|
|
1341
|
+
)
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
async def main() -> None:
|
|
1345
|
+
await client.master_account.create_a_new_group_of_sub_accounts(
|
|
1346
|
+
group_name="My group",
|
|
1347
|
+
)
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
asyncio.run(main())
|
|
1351
|
+
"""
|
|
1352
|
+
_response = await self._raw_client.create_a_new_group_of_sub_accounts(
|
|
1353
|
+
group_name=group_name, sub_account_ids=sub_account_ids, request_options=request_options
|
|
1354
|
+
)
|
|
1355
|
+
return _response.data
|
|
1356
|
+
|
|
1357
|
+
async def delete_sub_account_from_group(
|
|
1358
|
+
self,
|
|
1359
|
+
group_id: str,
|
|
1360
|
+
*,
|
|
1361
|
+
sub_account_ids: typing.Sequence[int],
|
|
1362
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1363
|
+
) -> None:
|
|
1364
|
+
"""
|
|
1365
|
+
This endpoint allows you to remove a sub-organization from a group.
|
|
1366
|
+
|
|
1367
|
+
Parameters
|
|
1368
|
+
----------
|
|
1369
|
+
group_id : str
|
|
1370
|
+
Group id
|
|
1371
|
+
|
|
1372
|
+
sub_account_ids : typing.Sequence[int]
|
|
1373
|
+
List of sub-account ids
|
|
1374
|
+
|
|
1375
|
+
request_options : typing.Optional[RequestOptions]
|
|
1376
|
+
Request-specific configuration.
|
|
1377
|
+
|
|
1378
|
+
Returns
|
|
1379
|
+
-------
|
|
1380
|
+
None
|
|
1381
|
+
|
|
1382
|
+
Examples
|
|
1383
|
+
--------
|
|
1384
|
+
import asyncio
|
|
1385
|
+
|
|
1386
|
+
from brevo import AsyncBrevo
|
|
1387
|
+
|
|
1388
|
+
client = AsyncBrevo(
|
|
1389
|
+
api_key="YOUR_API_KEY",
|
|
1390
|
+
)
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
async def main() -> None:
|
|
1394
|
+
await client.master_account.delete_sub_account_from_group(
|
|
1395
|
+
group_id="groupId",
|
|
1396
|
+
sub_account_ids=[423432, 234323, 87678],
|
|
1397
|
+
)
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
asyncio.run(main())
|
|
1401
|
+
"""
|
|
1402
|
+
_response = await self._raw_client.delete_sub_account_from_group(
|
|
1403
|
+
group_id, sub_account_ids=sub_account_ids, request_options=request_options
|
|
1404
|
+
)
|
|
1405
|
+
return _response.data
|
|
1406
|
+
|
|
1407
|
+
async def get_a_group_details(
|
|
1408
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1409
|
+
) -> GetCorporateGroupIdResponse:
|
|
1410
|
+
"""
|
|
1411
|
+
This endpoint allows you to retrieve a specific group’s information such as
|
|
1412
|
+
the list of sub-organizations and the user associated with the group.
|
|
1413
|
+
|
|
1414
|
+
Parameters
|
|
1415
|
+
----------
|
|
1416
|
+
id : str
|
|
1417
|
+
Id of the group of sub-organization
|
|
1418
|
+
|
|
1419
|
+
request_options : typing.Optional[RequestOptions]
|
|
1420
|
+
Request-specific configuration.
|
|
1421
|
+
|
|
1422
|
+
Returns
|
|
1423
|
+
-------
|
|
1424
|
+
GetCorporateGroupIdResponse
|
|
1425
|
+
Group details
|
|
1426
|
+
|
|
1427
|
+
Examples
|
|
1428
|
+
--------
|
|
1429
|
+
import asyncio
|
|
1430
|
+
|
|
1431
|
+
from brevo import AsyncBrevo
|
|
1432
|
+
|
|
1433
|
+
client = AsyncBrevo(
|
|
1434
|
+
api_key="YOUR_API_KEY",
|
|
1435
|
+
)
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
async def main() -> None:
|
|
1439
|
+
await client.master_account.get_a_group_details(
|
|
1440
|
+
id="id",
|
|
1441
|
+
)
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
asyncio.run(main())
|
|
1445
|
+
"""
|
|
1446
|
+
_response = await self._raw_client.get_a_group_details(id, request_options=request_options)
|
|
1447
|
+
return _response.data
|
|
1448
|
+
|
|
1449
|
+
async def update_a_group_of_sub_accounts(
|
|
1450
|
+
self,
|
|
1451
|
+
id: str,
|
|
1452
|
+
*,
|
|
1453
|
+
group_name: typing.Optional[str] = OMIT,
|
|
1454
|
+
sub_account_ids: typing.Optional[typing.Sequence[int]] = OMIT,
|
|
1455
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1456
|
+
) -> None:
|
|
1457
|
+
"""
|
|
1458
|
+
This endpoint allows to update a group of sub-accounts
|
|
1459
|
+
|
|
1460
|
+
Parameters
|
|
1461
|
+
----------
|
|
1462
|
+
id : str
|
|
1463
|
+
Id of the group
|
|
1464
|
+
|
|
1465
|
+
group_name : typing.Optional[str]
|
|
1466
|
+
The name of the group of sub-accounts
|
|
1467
|
+
|
|
1468
|
+
sub_account_ids : typing.Optional[typing.Sequence[int]]
|
|
1469
|
+
Pass the list of sub-account Ids to be included in the group
|
|
1470
|
+
|
|
1471
|
+
request_options : typing.Optional[RequestOptions]
|
|
1472
|
+
Request-specific configuration.
|
|
1473
|
+
|
|
1474
|
+
Returns
|
|
1475
|
+
-------
|
|
1476
|
+
None
|
|
1477
|
+
|
|
1478
|
+
Examples
|
|
1479
|
+
--------
|
|
1480
|
+
import asyncio
|
|
1481
|
+
|
|
1482
|
+
from brevo import AsyncBrevo
|
|
1483
|
+
|
|
1484
|
+
client = AsyncBrevo(
|
|
1485
|
+
api_key="YOUR_API_KEY",
|
|
1486
|
+
)
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
async def main() -> None:
|
|
1490
|
+
await client.master_account.update_a_group_of_sub_accounts(
|
|
1491
|
+
id="id",
|
|
1492
|
+
)
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
asyncio.run(main())
|
|
1496
|
+
"""
|
|
1497
|
+
_response = await self._raw_client.update_a_group_of_sub_accounts(
|
|
1498
|
+
id, group_name=group_name, sub_account_ids=sub_account_ids, request_options=request_options
|
|
1499
|
+
)
|
|
1500
|
+
return _response.data
|
|
1501
|
+
|
|
1502
|
+
async def delete_a_group(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
1503
|
+
"""
|
|
1504
|
+
This endpoint allows you to delete a group of sub-organizations. When a
|
|
1505
|
+
group is deleted, the sub-organizations are no longer part of this group.
|
|
1506
|
+
The users associated with the group are no longer associated with the group
|
|
1507
|
+
once deleted.
|
|
1508
|
+
|
|
1509
|
+
Parameters
|
|
1510
|
+
----------
|
|
1511
|
+
id : str
|
|
1512
|
+
Id of the group
|
|
1513
|
+
|
|
1514
|
+
request_options : typing.Optional[RequestOptions]
|
|
1515
|
+
Request-specific configuration.
|
|
1516
|
+
|
|
1517
|
+
Returns
|
|
1518
|
+
-------
|
|
1519
|
+
None
|
|
1520
|
+
|
|
1521
|
+
Examples
|
|
1522
|
+
--------
|
|
1523
|
+
import asyncio
|
|
1524
|
+
|
|
1525
|
+
from brevo import AsyncBrevo
|
|
1526
|
+
|
|
1527
|
+
client = AsyncBrevo(
|
|
1528
|
+
api_key="YOUR_API_KEY",
|
|
1529
|
+
)
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
async def main() -> None:
|
|
1533
|
+
await client.master_account.delete_a_group(
|
|
1534
|
+
id="id",
|
|
1535
|
+
)
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
asyncio.run(main())
|
|
1539
|
+
"""
|
|
1540
|
+
_response = await self._raw_client.delete_a_group(id, request_options=request_options)
|
|
1541
|
+
return _response.data
|
|
1542
|
+
|
|
1543
|
+
async def get_sub_account_groups(
|
|
1544
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
1545
|
+
) -> typing.List[GetSubAccountGroupsResponseItem]:
|
|
1546
|
+
"""
|
|
1547
|
+
This endpoint allows you to list all groups created on your Admin account.
|
|
1548
|
+
|
|
1549
|
+
Parameters
|
|
1550
|
+
----------
|
|
1551
|
+
request_options : typing.Optional[RequestOptions]
|
|
1552
|
+
Request-specific configuration.
|
|
1553
|
+
|
|
1554
|
+
Returns
|
|
1555
|
+
-------
|
|
1556
|
+
typing.List[GetSubAccountGroupsResponseItem]
|
|
1557
|
+
list of all the sub-account groups
|
|
1558
|
+
|
|
1559
|
+
Examples
|
|
1560
|
+
--------
|
|
1561
|
+
import asyncio
|
|
1562
|
+
|
|
1563
|
+
from brevo import AsyncBrevo
|
|
1564
|
+
|
|
1565
|
+
client = AsyncBrevo(
|
|
1566
|
+
api_key="YOUR_API_KEY",
|
|
1567
|
+
)
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
async def main() -> None:
|
|
1571
|
+
await client.master_account.get_sub_account_groups()
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
asyncio.run(main())
|
|
1575
|
+
"""
|
|
1576
|
+
_response = await self._raw_client.get_sub_account_groups(request_options=request_options)
|
|
1577
|
+
return _response.data
|
|
1578
|
+
|
|
1579
|
+
async def get_corporate_invited_users_list(
|
|
1580
|
+
self,
|
|
1581
|
+
*,
|
|
1582
|
+
type: typing.Optional[str] = None,
|
|
1583
|
+
offset: typing.Optional[int] = None,
|
|
1584
|
+
limit: typing.Optional[int] = None,
|
|
1585
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1586
|
+
) -> GetCorporateInvitedUsersListResponse:
|
|
1587
|
+
"""
|
|
1588
|
+
This endpoint allows you to list all Admin users of your Admin account. You
|
|
1589
|
+
can filter users by type (active or pending) and paginate results using
|
|
1590
|
+
offset and limit.
|
|
1591
|
+
|
|
1592
|
+
Parameters
|
|
1593
|
+
----------
|
|
1594
|
+
type : typing.Optional[str]
|
|
1595
|
+
User type (active | pending). This is required if offset is provided for
|
|
1596
|
+
limited result.
|
|
1597
|
+
|
|
1598
|
+
offset : typing.Optional[int]
|
|
1599
|
+
Page number for the result set. This is optional, default value will be
|
|
1600
|
+
the 1st page.
|
|
1601
|
+
|
|
1602
|
+
limit : typing.Optional[int]
|
|
1603
|
+
Number of users to be displayed on each page. This is optional, the
|
|
1604
|
+
default limit is 20, but max allowed limit is 100.
|
|
1605
|
+
|
|
1606
|
+
request_options : typing.Optional[RequestOptions]
|
|
1607
|
+
Request-specific configuration.
|
|
1608
|
+
|
|
1609
|
+
Returns
|
|
1610
|
+
-------
|
|
1611
|
+
GetCorporateInvitedUsersListResponse
|
|
1612
|
+
list of all admin users
|
|
1613
|
+
|
|
1614
|
+
Examples
|
|
1615
|
+
--------
|
|
1616
|
+
import asyncio
|
|
1617
|
+
|
|
1618
|
+
from brevo import AsyncBrevo
|
|
1619
|
+
|
|
1620
|
+
client = AsyncBrevo(
|
|
1621
|
+
api_key="YOUR_API_KEY",
|
|
1622
|
+
)
|
|
1623
|
+
|
|
1624
|
+
|
|
1625
|
+
async def main() -> None:
|
|
1626
|
+
await client.master_account.get_corporate_invited_users_list()
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
asyncio.run(main())
|
|
1630
|
+
"""
|
|
1631
|
+
_response = await self._raw_client.get_corporate_invited_users_list(
|
|
1632
|
+
type=type, offset=offset, limit=limit, request_options=request_options
|
|
1633
|
+
)
|
|
1634
|
+
return _response.data
|
|
1635
|
+
|
|
1636
|
+
async def list_of_all_i_ps(
|
|
1637
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
1638
|
+
) -> typing.List[GetCorporateIpResponseItem]:
|
|
1639
|
+
"""
|
|
1640
|
+
This endpoint allows you to retrieve the list of active IPs on your Admin
|
|
1641
|
+
account
|
|
1642
|
+
|
|
1643
|
+
Parameters
|
|
1644
|
+
----------
|
|
1645
|
+
request_options : typing.Optional[RequestOptions]
|
|
1646
|
+
Request-specific configuration.
|
|
1647
|
+
|
|
1648
|
+
Returns
|
|
1649
|
+
-------
|
|
1650
|
+
typing.List[GetCorporateIpResponseItem]
|
|
1651
|
+
List of all IPs
|
|
1652
|
+
|
|
1653
|
+
Examples
|
|
1654
|
+
--------
|
|
1655
|
+
import asyncio
|
|
1656
|
+
|
|
1657
|
+
from brevo import AsyncBrevo
|
|
1658
|
+
|
|
1659
|
+
client = AsyncBrevo(
|
|
1660
|
+
api_key="YOUR_API_KEY",
|
|
1661
|
+
)
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
async def main() -> None:
|
|
1665
|
+
await client.master_account.list_of_all_i_ps()
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
asyncio.run(main())
|
|
1669
|
+
"""
|
|
1670
|
+
_response = await self._raw_client.list_of_all_i_ps(request_options=request_options)
|
|
1671
|
+
return _response.data
|
|
1672
|
+
|
|
1673
|
+
async def get_the_details_of_requested_master_account(
|
|
1674
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
1675
|
+
) -> GetCorporateMasterAccountResponse:
|
|
1676
|
+
"""
|
|
1677
|
+
This endpoint will provide the details of the master account.
|
|
1678
|
+
|
|
1679
|
+
Parameters
|
|
1680
|
+
----------
|
|
1681
|
+
request_options : typing.Optional[RequestOptions]
|
|
1682
|
+
Request-specific configuration.
|
|
1683
|
+
|
|
1684
|
+
Returns
|
|
1685
|
+
-------
|
|
1686
|
+
GetCorporateMasterAccountResponse
|
|
1687
|
+
Master account details
|
|
1688
|
+
|
|
1689
|
+
Examples
|
|
1690
|
+
--------
|
|
1691
|
+
import asyncio
|
|
1692
|
+
|
|
1693
|
+
from brevo import AsyncBrevo
|
|
1694
|
+
|
|
1695
|
+
client = AsyncBrevo(
|
|
1696
|
+
api_key="YOUR_API_KEY",
|
|
1697
|
+
)
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
async def main() -> None:
|
|
1701
|
+
await client.master_account.get_the_details_of_requested_master_account()
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
asyncio.run(main())
|
|
1705
|
+
"""
|
|
1706
|
+
_response = await self._raw_client.get_the_details_of_requested_master_account(request_options=request_options)
|
|
1707
|
+
return _response.data
|
|
1708
|
+
|
|
1709
|
+
async def generate_sso_token_to_access_admin_account(
|
|
1710
|
+
self, *, email: str, request_options: typing.Optional[RequestOptions] = None
|
|
1711
|
+
) -> GetSsoToken:
|
|
1712
|
+
"""
|
|
1713
|
+
This endpoint generates an SSO token to authenticate and access the admin
|
|
1714
|
+
account using the endpoint
|
|
1715
|
+
https://account-app.brevo.com/account/login/corporate/sso/[token], where
|
|
1716
|
+
[token] will be replaced by the actual token.
|
|
1717
|
+
|
|
1718
|
+
Parameters
|
|
1719
|
+
----------
|
|
1720
|
+
email : str
|
|
1721
|
+
User email of admin account
|
|
1722
|
+
|
|
1723
|
+
request_options : typing.Optional[RequestOptions]
|
|
1724
|
+
Request-specific configuration.
|
|
1725
|
+
|
|
1726
|
+
Returns
|
|
1727
|
+
-------
|
|
1728
|
+
GetSsoToken
|
|
1729
|
+
Session token
|
|
1730
|
+
|
|
1731
|
+
Examples
|
|
1732
|
+
--------
|
|
1733
|
+
import asyncio
|
|
1734
|
+
|
|
1735
|
+
from brevo import AsyncBrevo
|
|
1736
|
+
|
|
1737
|
+
client = AsyncBrevo(
|
|
1738
|
+
api_key="YOUR_API_KEY",
|
|
1739
|
+
)
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
async def main() -> None:
|
|
1743
|
+
await client.master_account.generate_sso_token_to_access_admin_account(
|
|
1744
|
+
email="vipin+ent-user@brevo.com",
|
|
1745
|
+
)
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
asyncio.run(main())
|
|
1749
|
+
"""
|
|
1750
|
+
_response = await self._raw_client.generate_sso_token_to_access_admin_account(
|
|
1751
|
+
email=email, request_options=request_options
|
|
1752
|
+
)
|
|
1753
|
+
return _response.data
|
|
1754
|
+
|
|
1755
|
+
async def get_the_list_of_all_the_sub_accounts_of_the_master_account(
|
|
1756
|
+
self, *, offset: int, limit: int, request_options: typing.Optional[RequestOptions] = None
|
|
1757
|
+
) -> GetCorporateSubAccountResponse:
|
|
1758
|
+
"""
|
|
1759
|
+
This endpoint will provide the list all the sub-accounts of the master
|
|
1760
|
+
account.
|
|
1761
|
+
|
|
1762
|
+
Parameters
|
|
1763
|
+
----------
|
|
1764
|
+
offset : int
|
|
1765
|
+
Index of the first sub-account in the page
|
|
1766
|
+
|
|
1767
|
+
limit : int
|
|
1768
|
+
Number of sub-accounts to be displayed on each page
|
|
1769
|
+
|
|
1770
|
+
request_options : typing.Optional[RequestOptions]
|
|
1771
|
+
Request-specific configuration.
|
|
1772
|
+
|
|
1773
|
+
Returns
|
|
1774
|
+
-------
|
|
1775
|
+
GetCorporateSubAccountResponse
|
|
1776
|
+
Sub-accounts list
|
|
1777
|
+
|
|
1778
|
+
Examples
|
|
1779
|
+
--------
|
|
1780
|
+
import asyncio
|
|
1781
|
+
|
|
1782
|
+
from brevo import AsyncBrevo
|
|
1783
|
+
|
|
1784
|
+
client = AsyncBrevo(
|
|
1785
|
+
api_key="YOUR_API_KEY",
|
|
1786
|
+
)
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
async def main() -> None:
|
|
1790
|
+
await client.master_account.get_the_list_of_all_the_sub_accounts_of_the_master_account(
|
|
1791
|
+
offset=1,
|
|
1792
|
+
limit=1,
|
|
1793
|
+
)
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
asyncio.run(main())
|
|
1797
|
+
"""
|
|
1798
|
+
_response = await self._raw_client.get_the_list_of_all_the_sub_accounts_of_the_master_account(
|
|
1799
|
+
offset=offset, limit=limit, request_options=request_options
|
|
1800
|
+
)
|
|
1801
|
+
return _response.data
|
|
1802
|
+
|
|
1803
|
+
async def create_a_new_sub_account_under_a_master_account(
|
|
1804
|
+
self,
|
|
1805
|
+
*,
|
|
1806
|
+
company_name: str,
|
|
1807
|
+
email: str,
|
|
1808
|
+
group_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1809
|
+
language: typing.Optional[PostCorporateSubAccountRequestLanguage] = OMIT,
|
|
1810
|
+
timezone: typing.Optional[str] = OMIT,
|
|
1811
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1812
|
+
) -> PostCorporateSubAccountResponse:
|
|
1813
|
+
"""
|
|
1814
|
+
This endpoint will create a new sub-account under a master account
|
|
1815
|
+
|
|
1816
|
+
Parameters
|
|
1817
|
+
----------
|
|
1818
|
+
company_name : str
|
|
1819
|
+
Set the name of the sub-account company
|
|
1820
|
+
|
|
1821
|
+
email : str
|
|
1822
|
+
Email address for the organization
|
|
1823
|
+
|
|
1824
|
+
group_ids : typing.Optional[typing.Sequence[str]]
|
|
1825
|
+
Set the group(s) for the sub-account
|
|
1826
|
+
|
|
1827
|
+
language : typing.Optional[PostCorporateSubAccountRequestLanguage]
|
|
1828
|
+
Set the language of the sub-account
|
|
1829
|
+
|
|
1830
|
+
timezone : typing.Optional[str]
|
|
1831
|
+
Set the timezone of the sub-account
|
|
1832
|
+
|
|
1833
|
+
request_options : typing.Optional[RequestOptions]
|
|
1834
|
+
Request-specific configuration.
|
|
1835
|
+
|
|
1836
|
+
Returns
|
|
1837
|
+
-------
|
|
1838
|
+
PostCorporateSubAccountResponse
|
|
1839
|
+
Created sub-account ID
|
|
1840
|
+
|
|
1841
|
+
Examples
|
|
1842
|
+
--------
|
|
1843
|
+
import asyncio
|
|
1844
|
+
|
|
1845
|
+
from brevo import AsyncBrevo
|
|
1846
|
+
|
|
1847
|
+
client = AsyncBrevo(
|
|
1848
|
+
api_key="YOUR_API_KEY",
|
|
1849
|
+
)
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
async def main() -> None:
|
|
1853
|
+
await client.master_account.create_a_new_sub_account_under_a_master_account(
|
|
1854
|
+
company_name="Test Sub-account",
|
|
1855
|
+
email="test-sub@example.com",
|
|
1856
|
+
group_ids=["5f8f8c3b5f56a02d4433b3a7", "5f8f8c3b5f56a02d4433b3a8"],
|
|
1857
|
+
language="fr",
|
|
1858
|
+
timezone="Europe/Paris",
|
|
1859
|
+
)
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
asyncio.run(main())
|
|
1863
|
+
"""
|
|
1864
|
+
_response = await self._raw_client.create_a_new_sub_account_under_a_master_account(
|
|
1865
|
+
company_name=company_name,
|
|
1866
|
+
email=email,
|
|
1867
|
+
group_ids=group_ids,
|
|
1868
|
+
language=language,
|
|
1869
|
+
timezone=timezone,
|
|
1870
|
+
request_options=request_options,
|
|
1871
|
+
)
|
|
1872
|
+
return _response.data
|
|
1873
|
+
|
|
1874
|
+
async def associate_an_ip_to_sub_accounts(
|
|
1875
|
+
self, *, ids: typing.Sequence[int], ip: str, request_options: typing.Optional[RequestOptions] = None
|
|
1876
|
+
) -> typing.Dict[str, typing.Any]:
|
|
1877
|
+
"""
|
|
1878
|
+
This endpoint allows to associate an IP to sub-accounts
|
|
1879
|
+
|
|
1880
|
+
Parameters
|
|
1881
|
+
----------
|
|
1882
|
+
ids : typing.Sequence[int]
|
|
1883
|
+
Pass the list of sub-account Ids to be associated with the IP
|
|
1884
|
+
address
|
|
1885
|
+
|
|
1886
|
+
ip : str
|
|
1887
|
+
IP address
|
|
1888
|
+
|
|
1889
|
+
request_options : typing.Optional[RequestOptions]
|
|
1890
|
+
Request-specific configuration.
|
|
1891
|
+
|
|
1892
|
+
Returns
|
|
1893
|
+
-------
|
|
1894
|
+
typing.Dict[str, typing.Any]
|
|
1895
|
+
IP has been associated with sub-accounts successfully
|
|
1896
|
+
|
|
1897
|
+
Examples
|
|
1898
|
+
--------
|
|
1899
|
+
import asyncio
|
|
1900
|
+
|
|
1901
|
+
from brevo import AsyncBrevo
|
|
1902
|
+
|
|
1903
|
+
client = AsyncBrevo(
|
|
1904
|
+
api_key="YOUR_API_KEY",
|
|
1905
|
+
)
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
async def main() -> None:
|
|
1909
|
+
await client.master_account.associate_an_ip_to_sub_accounts(
|
|
1910
|
+
ids=[234322, 325553, 893432],
|
|
1911
|
+
ip="103.11.32.88",
|
|
1912
|
+
)
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
asyncio.run(main())
|
|
1916
|
+
"""
|
|
1917
|
+
_response = await self._raw_client.associate_an_ip_to_sub_accounts(
|
|
1918
|
+
ids=ids, ip=ip, request_options=request_options
|
|
1919
|
+
)
|
|
1920
|
+
return _response.data
|
|
1921
|
+
|
|
1922
|
+
async def dissociate_an_ip_to_sub_accounts(
|
|
1923
|
+
self, *, ids: typing.Sequence[int], ip: str, request_options: typing.Optional[RequestOptions] = None
|
|
1924
|
+
) -> None:
|
|
1925
|
+
"""
|
|
1926
|
+
This endpoint allows to dissociate an IP from sub-accounts
|
|
1927
|
+
|
|
1928
|
+
Parameters
|
|
1929
|
+
----------
|
|
1930
|
+
ids : typing.Sequence[int]
|
|
1931
|
+
Pass the list of sub-account Ids to be dissociated from the IP
|
|
1932
|
+
address
|
|
1933
|
+
|
|
1934
|
+
ip : str
|
|
1935
|
+
IP address
|
|
1936
|
+
|
|
1937
|
+
request_options : typing.Optional[RequestOptions]
|
|
1938
|
+
Request-specific configuration.
|
|
1939
|
+
|
|
1940
|
+
Returns
|
|
1941
|
+
-------
|
|
1942
|
+
None
|
|
1943
|
+
|
|
1944
|
+
Examples
|
|
1945
|
+
--------
|
|
1946
|
+
import asyncio
|
|
1947
|
+
|
|
1948
|
+
from brevo import AsyncBrevo
|
|
1949
|
+
|
|
1950
|
+
client = AsyncBrevo(
|
|
1951
|
+
api_key="YOUR_API_KEY",
|
|
1952
|
+
)
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
async def main() -> None:
|
|
1956
|
+
await client.master_account.dissociate_an_ip_to_sub_accounts(
|
|
1957
|
+
ids=[234322, 325553, 893432],
|
|
1958
|
+
ip="103.11.32.88",
|
|
1959
|
+
)
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
asyncio.run(main())
|
|
1963
|
+
"""
|
|
1964
|
+
_response = await self._raw_client.dissociate_an_ip_to_sub_accounts(
|
|
1965
|
+
ids=ids, ip=ip, request_options=request_options
|
|
1966
|
+
)
|
|
1967
|
+
return _response.data
|
|
1968
|
+
|
|
1969
|
+
async def create_an_api_key_for_a_sub_account(
|
|
1970
|
+
self, *, id: int, name: str, request_options: typing.Optional[RequestOptions] = None
|
|
1971
|
+
) -> PostCorporateSubAccountKeyResponse:
|
|
1972
|
+
"""
|
|
1973
|
+
This endpoint will generate an API v3 key for a sub-account
|
|
1974
|
+
|
|
1975
|
+
Parameters
|
|
1976
|
+
----------
|
|
1977
|
+
id : int
|
|
1978
|
+
Id of the sub-account organization
|
|
1979
|
+
|
|
1980
|
+
name : str
|
|
1981
|
+
Name of the API key
|
|
1982
|
+
|
|
1983
|
+
request_options : typing.Optional[RequestOptions]
|
|
1984
|
+
Request-specific configuration.
|
|
1985
|
+
|
|
1986
|
+
Returns
|
|
1987
|
+
-------
|
|
1988
|
+
PostCorporateSubAccountKeyResponse
|
|
1989
|
+
API key
|
|
1990
|
+
|
|
1991
|
+
Examples
|
|
1992
|
+
--------
|
|
1993
|
+
import asyncio
|
|
1994
|
+
|
|
1995
|
+
from brevo import AsyncBrevo
|
|
1996
|
+
|
|
1997
|
+
client = AsyncBrevo(
|
|
1998
|
+
api_key="YOUR_API_KEY",
|
|
1999
|
+
)
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
async def main() -> None:
|
|
2003
|
+
await client.master_account.create_an_api_key_for_a_sub_account(
|
|
2004
|
+
id=3232323,
|
|
2005
|
+
name="My Api Key",
|
|
2006
|
+
)
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
asyncio.run(main())
|
|
2010
|
+
"""
|
|
2011
|
+
_response = await self._raw_client.create_an_api_key_for_a_sub_account(
|
|
2012
|
+
id=id, name=name, request_options=request_options
|
|
2013
|
+
)
|
|
2014
|
+
return _response.data
|
|
2015
|
+
|
|
2016
|
+
async def generate_sso_token_to_access_sub_account(
|
|
2017
|
+
self,
|
|
2018
|
+
*,
|
|
2019
|
+
id: int,
|
|
2020
|
+
email: typing.Optional[str] = OMIT,
|
|
2021
|
+
target: typing.Optional[PostCorporateSubAccountSsoTokenRequestTarget] = OMIT,
|
|
2022
|
+
url: typing.Optional[str] = OMIT,
|
|
2023
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2024
|
+
) -> GetSsoToken:
|
|
2025
|
+
"""
|
|
2026
|
+
This endpoint generates an sso token to authenticate and access a
|
|
2027
|
+
sub-account of the master using the account endpoint
|
|
2028
|
+
https://account-app.brevo.com/account/login/sub-account/sso/[token], where
|
|
2029
|
+
[token] will be replaced by the actual token.
|
|
2030
|
+
|
|
2031
|
+
Parameters
|
|
2032
|
+
----------
|
|
2033
|
+
id : int
|
|
2034
|
+
Id of the sub-account organization
|
|
2035
|
+
|
|
2036
|
+
email : typing.Optional[str]
|
|
2037
|
+
User email of sub-account organization
|
|
2038
|
+
|
|
2039
|
+
target : typing.Optional[PostCorporateSubAccountSsoTokenRequestTarget]
|
|
2040
|
+
**Set target after login success** * **automation** - Redirect
|
|
2041
|
+
to Automation after login * **email_campaign** - Redirect to
|
|
2042
|
+
Email Campaign after login * **contacts** - Redirect to Contacts
|
|
2043
|
+
after login * **landing_pages** - Redirect to Landing Pages
|
|
2044
|
+
after login * **email_transactional** - Redirect to Email
|
|
2045
|
+
Transactional after login * **senders** - Redirect to Senders
|
|
2046
|
+
after login * **sms_campaign** - Redirect to Sms Campaign after
|
|
2047
|
+
login * **sms_transactional** - Redirect to Sms Transactional
|
|
2048
|
+
after login
|
|
2049
|
+
|
|
2050
|
+
url : typing.Optional[str]
|
|
2051
|
+
Set the full target URL after login success. The user will land
|
|
2052
|
+
directly on this target URL after login
|
|
2053
|
+
|
|
2054
|
+
request_options : typing.Optional[RequestOptions]
|
|
2055
|
+
Request-specific configuration.
|
|
2056
|
+
|
|
2057
|
+
Returns
|
|
2058
|
+
-------
|
|
2059
|
+
GetSsoToken
|
|
2060
|
+
Session token
|
|
2061
|
+
|
|
2062
|
+
Examples
|
|
2063
|
+
--------
|
|
2064
|
+
import asyncio
|
|
2065
|
+
|
|
2066
|
+
from brevo import AsyncBrevo
|
|
2067
|
+
|
|
2068
|
+
client = AsyncBrevo(
|
|
2069
|
+
api_key="YOUR_API_KEY",
|
|
2070
|
+
)
|
|
2071
|
+
|
|
2072
|
+
|
|
2073
|
+
async def main() -> None:
|
|
2074
|
+
await client.master_account.generate_sso_token_to_access_sub_account(
|
|
2075
|
+
id=3232323,
|
|
2076
|
+
)
|
|
2077
|
+
|
|
2078
|
+
|
|
2079
|
+
asyncio.run(main())
|
|
2080
|
+
"""
|
|
2081
|
+
_response = await self._raw_client.generate_sso_token_to_access_sub_account(
|
|
2082
|
+
id=id, email=email, target=target, url=url, request_options=request_options
|
|
2083
|
+
)
|
|
2084
|
+
return _response.data
|
|
2085
|
+
|
|
2086
|
+
async def get_sub_account_details(
|
|
2087
|
+
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
2088
|
+
) -> GetCorporateSubAccountIdResponse:
|
|
2089
|
+
"""
|
|
2090
|
+
This endpoint will provide the details for the specified sub-account company
|
|
2091
|
+
|
|
2092
|
+
Parameters
|
|
2093
|
+
----------
|
|
2094
|
+
id : int
|
|
2095
|
+
Id of the sub-account organization
|
|
2096
|
+
|
|
2097
|
+
request_options : typing.Optional[RequestOptions]
|
|
2098
|
+
Request-specific configuration.
|
|
2099
|
+
|
|
2100
|
+
Returns
|
|
2101
|
+
-------
|
|
2102
|
+
GetCorporateSubAccountIdResponse
|
|
2103
|
+
Sub-account organization details
|
|
2104
|
+
|
|
2105
|
+
Examples
|
|
2106
|
+
--------
|
|
2107
|
+
import asyncio
|
|
2108
|
+
|
|
2109
|
+
from brevo import AsyncBrevo
|
|
2110
|
+
|
|
2111
|
+
client = AsyncBrevo(
|
|
2112
|
+
api_key="YOUR_API_KEY",
|
|
2113
|
+
)
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
async def main() -> None:
|
|
2117
|
+
await client.master_account.get_sub_account_details(
|
|
2118
|
+
id=1000000,
|
|
2119
|
+
)
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
asyncio.run(main())
|
|
2123
|
+
"""
|
|
2124
|
+
_response = await self._raw_client.get_sub_account_details(id, request_options=request_options)
|
|
2125
|
+
return _response.data
|
|
2126
|
+
|
|
2127
|
+
async def delete_a_sub_account(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
2128
|
+
"""
|
|
2129
|
+
Parameters
|
|
2130
|
+
----------
|
|
2131
|
+
id : int
|
|
2132
|
+
Id of the sub-account organization to be deleted
|
|
2133
|
+
|
|
2134
|
+
request_options : typing.Optional[RequestOptions]
|
|
2135
|
+
Request-specific configuration.
|
|
2136
|
+
|
|
2137
|
+
Returns
|
|
2138
|
+
-------
|
|
2139
|
+
None
|
|
2140
|
+
|
|
2141
|
+
Examples
|
|
2142
|
+
--------
|
|
2143
|
+
import asyncio
|
|
2144
|
+
|
|
2145
|
+
from brevo import AsyncBrevo
|
|
2146
|
+
|
|
2147
|
+
client = AsyncBrevo(
|
|
2148
|
+
api_key="YOUR_API_KEY",
|
|
2149
|
+
)
|
|
2150
|
+
|
|
2151
|
+
|
|
2152
|
+
async def main() -> None:
|
|
2153
|
+
await client.master_account.delete_a_sub_account(
|
|
2154
|
+
id=1000000,
|
|
2155
|
+
)
|
|
2156
|
+
|
|
2157
|
+
|
|
2158
|
+
asyncio.run(main())
|
|
2159
|
+
"""
|
|
2160
|
+
_response = await self._raw_client.delete_a_sub_account(id, request_options=request_options)
|
|
2161
|
+
return _response.data
|
|
2162
|
+
|
|
2163
|
+
async def enable_disable_sub_account_application_s(
|
|
2164
|
+
self,
|
|
2165
|
+
id: int,
|
|
2166
|
+
*,
|
|
2167
|
+
automation: typing.Optional[bool] = OMIT,
|
|
2168
|
+
conversations: typing.Optional[bool] = OMIT,
|
|
2169
|
+
crm: typing.Optional[bool] = OMIT,
|
|
2170
|
+
email_campaigns: typing.Optional[bool] = OMIT,
|
|
2171
|
+
facebook_ads: typing.Optional[bool] = OMIT,
|
|
2172
|
+
inbox: typing.Optional[bool] = OMIT,
|
|
2173
|
+
landing_pages: typing.Optional[bool] = OMIT,
|
|
2174
|
+
meetings: typing.Optional[bool] = OMIT,
|
|
2175
|
+
sms_campaigns: typing.Optional[bool] = OMIT,
|
|
2176
|
+
transactional_emails: typing.Optional[bool] = OMIT,
|
|
2177
|
+
transactional_sms: typing.Optional[bool] = OMIT,
|
|
2178
|
+
web_push: typing.Optional[bool] = OMIT,
|
|
2179
|
+
whatsapp: typing.Optional[bool] = OMIT,
|
|
2180
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2181
|
+
) -> None:
|
|
2182
|
+
"""
|
|
2183
|
+
API endpoint for the Corporate owner to enable/disable applications on the
|
|
2184
|
+
sub-account
|
|
2185
|
+
|
|
2186
|
+
Parameters
|
|
2187
|
+
----------
|
|
2188
|
+
id : int
|
|
2189
|
+
Id of the sub-account organization (mandatory)
|
|
2190
|
+
|
|
2191
|
+
automation : typing.Optional[bool]
|
|
2192
|
+
Set this field to enable or disable Automation on the
|
|
2193
|
+
sub-account
|
|
2194
|
+
|
|
2195
|
+
conversations : typing.Optional[bool]
|
|
2196
|
+
Set this field to enable or disable Conversations on the
|
|
2197
|
+
sub-account
|
|
2198
|
+
|
|
2199
|
+
crm : typing.Optional[bool]
|
|
2200
|
+
Set this field to enable or disable Sales CRM on the sub-account
|
|
2201
|
+
|
|
2202
|
+
email_campaigns : typing.Optional[bool]
|
|
2203
|
+
Set this field to enable or disable Email Campaigns on the
|
|
2204
|
+
sub-account
|
|
2205
|
+
|
|
2206
|
+
facebook_ads : typing.Optional[bool]
|
|
2207
|
+
Set this field to enable or disable Facebook ads on the
|
|
2208
|
+
sub-account
|
|
2209
|
+
|
|
2210
|
+
inbox : typing.Optional[bool]
|
|
2211
|
+
Set this field to enable or disable Inbox on the sub-account /
|
|
2212
|
+
Not applicable on ENTv2
|
|
2213
|
+
|
|
2214
|
+
landing_pages : typing.Optional[bool]
|
|
2215
|
+
Set this field to enable or disable Landing pages on the
|
|
2216
|
+
sub-account
|
|
2217
|
+
|
|
2218
|
+
meetings : typing.Optional[bool]
|
|
2219
|
+
Set this field to enable or disable Meetings on the sub-account
|
|
2220
|
+
|
|
2221
|
+
sms_campaigns : typing.Optional[bool]
|
|
2222
|
+
Set this field to enable or disable SMS Marketing on the
|
|
2223
|
+
sub-account
|
|
2224
|
+
|
|
2225
|
+
transactional_emails : typing.Optional[bool]
|
|
2226
|
+
Set this field to enable or disable Transactional Email on the
|
|
2227
|
+
sub-account
|
|
2228
|
+
|
|
2229
|
+
transactional_sms : typing.Optional[bool]
|
|
2230
|
+
Set this field to enable or disable Transactional SMS on the
|
|
2231
|
+
sub-account
|
|
2232
|
+
|
|
2233
|
+
web_push : typing.Optional[bool]
|
|
2234
|
+
Set this field to enable or disable Web Push on the sub-account
|
|
2235
|
+
|
|
2236
|
+
whatsapp : typing.Optional[bool]
|
|
2237
|
+
Set this field to enable or disable Whatsapp campaigns on the
|
|
2238
|
+
sub-account
|
|
2239
|
+
|
|
2240
|
+
request_options : typing.Optional[RequestOptions]
|
|
2241
|
+
Request-specific configuration.
|
|
2242
|
+
|
|
2243
|
+
Returns
|
|
2244
|
+
-------
|
|
2245
|
+
None
|
|
2246
|
+
|
|
2247
|
+
Examples
|
|
2248
|
+
--------
|
|
2249
|
+
import asyncio
|
|
2250
|
+
|
|
2251
|
+
from brevo import AsyncBrevo
|
|
2252
|
+
|
|
2253
|
+
client = AsyncBrevo(
|
|
2254
|
+
api_key="YOUR_API_KEY",
|
|
2255
|
+
)
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
async def main() -> None:
|
|
2259
|
+
await client.master_account.enable_disable_sub_account_application_s(
|
|
2260
|
+
id=1000000,
|
|
2261
|
+
landing_pages=True,
|
|
2262
|
+
meetings=True,
|
|
2263
|
+
sms_campaigns=False,
|
|
2264
|
+
web_push=False,
|
|
2265
|
+
whatsapp=True,
|
|
2266
|
+
)
|
|
2267
|
+
|
|
2268
|
+
|
|
2269
|
+
asyncio.run(main())
|
|
2270
|
+
"""
|
|
2271
|
+
_response = await self._raw_client.enable_disable_sub_account_application_s(
|
|
2272
|
+
id,
|
|
2273
|
+
automation=automation,
|
|
2274
|
+
conversations=conversations,
|
|
2275
|
+
crm=crm,
|
|
2276
|
+
email_campaigns=email_campaigns,
|
|
2277
|
+
facebook_ads=facebook_ads,
|
|
2278
|
+
inbox=inbox,
|
|
2279
|
+
landing_pages=landing_pages,
|
|
2280
|
+
meetings=meetings,
|
|
2281
|
+
sms_campaigns=sms_campaigns,
|
|
2282
|
+
transactional_emails=transactional_emails,
|
|
2283
|
+
transactional_sms=transactional_sms,
|
|
2284
|
+
web_push=web_push,
|
|
2285
|
+
whatsapp=whatsapp,
|
|
2286
|
+
request_options=request_options,
|
|
2287
|
+
)
|
|
2288
|
+
return _response.data
|
|
2289
|
+
|
|
2290
|
+
async def update_sub_account_plan(
|
|
2291
|
+
self,
|
|
2292
|
+
id: int,
|
|
2293
|
+
*,
|
|
2294
|
+
credits: typing.Optional[PutCorporateSubAccountIdPlanRequestCredits] = OMIT,
|
|
2295
|
+
features: typing.Optional[PutCorporateSubAccountIdPlanRequestFeatures] = OMIT,
|
|
2296
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2297
|
+
) -> None:
|
|
2298
|
+
"""
|
|
2299
|
+
This endpoint will update the sub-account plan. On the Corporate solution
|
|
2300
|
+
new version v2, you can set an unlimited number of credits in your
|
|
2301
|
+
sub-organization. Please pass the value “-1" to set the consumable in
|
|
2302
|
+
unlimited mode.
|
|
2303
|
+
|
|
2304
|
+
Parameters
|
|
2305
|
+
----------
|
|
2306
|
+
id : int
|
|
2307
|
+
Id of the sub-account organization
|
|
2308
|
+
|
|
2309
|
+
credits : typing.Optional[PutCorporateSubAccountIdPlanRequestCredits]
|
|
2310
|
+
Credit details to update
|
|
2311
|
+
|
|
2312
|
+
features : typing.Optional[PutCorporateSubAccountIdPlanRequestFeatures]
|
|
2313
|
+
Features details to update
|
|
2314
|
+
|
|
2315
|
+
request_options : typing.Optional[RequestOptions]
|
|
2316
|
+
Request-specific configuration.
|
|
2317
|
+
|
|
2318
|
+
Returns
|
|
2319
|
+
-------
|
|
2320
|
+
None
|
|
2321
|
+
|
|
2322
|
+
Examples
|
|
2323
|
+
--------
|
|
2324
|
+
import asyncio
|
|
2325
|
+
|
|
2326
|
+
from brevo import AsyncBrevo
|
|
2327
|
+
from brevo.master_account import (
|
|
2328
|
+
PutCorporateSubAccountIdPlanRequestCredits,
|
|
2329
|
+
PutCorporateSubAccountIdPlanRequestFeatures,
|
|
2330
|
+
)
|
|
2331
|
+
|
|
2332
|
+
client = AsyncBrevo(
|
|
2333
|
+
api_key="YOUR_API_KEY",
|
|
2334
|
+
)
|
|
2335
|
+
|
|
2336
|
+
|
|
2337
|
+
async def main() -> None:
|
|
2338
|
+
await client.master_account.update_sub_account_plan(
|
|
2339
|
+
id=1000000,
|
|
2340
|
+
credits=PutCorporateSubAccountIdPlanRequestCredits(
|
|
2341
|
+
email=5000,
|
|
2342
|
+
external_feeds=1,
|
|
2343
|
+
sms=2000.0,
|
|
2344
|
+
whatsapp=100.0,
|
|
2345
|
+
wp_subscribers=-1,
|
|
2346
|
+
),
|
|
2347
|
+
features=PutCorporateSubAccountIdPlanRequestFeatures(
|
|
2348
|
+
inbox=10,
|
|
2349
|
+
landing_page=20,
|
|
2350
|
+
sales_users=6,
|
|
2351
|
+
users=15,
|
|
2352
|
+
),
|
|
2353
|
+
)
|
|
2354
|
+
|
|
2355
|
+
|
|
2356
|
+
asyncio.run(main())
|
|
2357
|
+
"""
|
|
2358
|
+
_response = await self._raw_client.update_sub_account_plan(
|
|
2359
|
+
id, credits=credits, features=features, request_options=request_options
|
|
2360
|
+
)
|
|
2361
|
+
return _response.data
|
|
2362
|
+
|
|
2363
|
+
async def update_sub_accounts_plan(
|
|
2364
|
+
self,
|
|
2365
|
+
*,
|
|
2366
|
+
credits: typing.Optional[PutCorporateSubAccountsPlanRequestCredits] = OMIT,
|
|
2367
|
+
features: typing.Optional[PutCorporateSubAccountsPlanRequestFeatures] = OMIT,
|
|
2368
|
+
sub_account_ids: typing.Optional[typing.Sequence[int]] = OMIT,
|
|
2369
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2370
|
+
) -> None:
|
|
2371
|
+
"""
|
|
2372
|
+
This endpoint will update multiple sub-accounts plan. On the Corporate
|
|
2373
|
+
solution new version v2, you can set an unlimited number of credits in your
|
|
2374
|
+
sub-organization. Please pass the value “-1" to set the consumable in
|
|
2375
|
+
unlimited mode.
|
|
2376
|
+
|
|
2377
|
+
Parameters
|
|
2378
|
+
----------
|
|
2379
|
+
credits : typing.Optional[PutCorporateSubAccountsPlanRequestCredits]
|
|
2380
|
+
Credit details to update
|
|
2381
|
+
|
|
2382
|
+
features : typing.Optional[PutCorporateSubAccountsPlanRequestFeatures]
|
|
2383
|
+
Features details to update
|
|
2384
|
+
|
|
2385
|
+
sub_account_ids : typing.Optional[typing.Sequence[int]]
|
|
2386
|
+
List of sub-account ids
|
|
2387
|
+
|
|
2388
|
+
request_options : typing.Optional[RequestOptions]
|
|
2389
|
+
Request-specific configuration.
|
|
2390
|
+
|
|
2391
|
+
Returns
|
|
2392
|
+
-------
|
|
2393
|
+
None
|
|
2394
|
+
|
|
2395
|
+
Examples
|
|
2396
|
+
--------
|
|
2397
|
+
import asyncio
|
|
2398
|
+
|
|
2399
|
+
from brevo import AsyncBrevo
|
|
2400
|
+
from brevo.master_account import (
|
|
2401
|
+
PutCorporateSubAccountsPlanRequestCredits,
|
|
2402
|
+
PutCorporateSubAccountsPlanRequestFeatures,
|
|
2403
|
+
)
|
|
2404
|
+
|
|
2405
|
+
client = AsyncBrevo(
|
|
2406
|
+
api_key="YOUR_API_KEY",
|
|
2407
|
+
)
|
|
2408
|
+
|
|
2409
|
+
|
|
2410
|
+
async def main() -> None:
|
|
2411
|
+
await client.master_account.update_sub_accounts_plan(
|
|
2412
|
+
credits=PutCorporateSubAccountsPlanRequestCredits(
|
|
2413
|
+
email=5000,
|
|
2414
|
+
external_feeds=1,
|
|
2415
|
+
sms=2000.0,
|
|
2416
|
+
whatsapp=100.0,
|
|
2417
|
+
wp_subscribers=-1,
|
|
2418
|
+
),
|
|
2419
|
+
features=PutCorporateSubAccountsPlanRequestFeatures(
|
|
2420
|
+
landing_page=20,
|
|
2421
|
+
sales_users=6,
|
|
2422
|
+
users=15,
|
|
2423
|
+
),
|
|
2424
|
+
sub_account_ids=[4534345, 987893, 876785],
|
|
2425
|
+
)
|
|
2426
|
+
|
|
2427
|
+
|
|
2428
|
+
asyncio.run(main())
|
|
2429
|
+
"""
|
|
2430
|
+
_response = await self._raw_client.update_sub_accounts_plan(
|
|
2431
|
+
credits=credits, features=features, sub_account_ids=sub_account_ids, request_options=request_options
|
|
2432
|
+
)
|
|
2433
|
+
return _response.data
|
|
2434
|
+
|
|
2435
|
+
async def invite_admin_user(
|
|
2436
|
+
self,
|
|
2437
|
+
*,
|
|
2438
|
+
all_features_access: bool,
|
|
2439
|
+
email: str,
|
|
2440
|
+
privileges: typing.Sequence[InviteAdminUserRequestPrivilegesItem],
|
|
2441
|
+
group_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
2442
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2443
|
+
) -> InviteAdminUserResponse:
|
|
2444
|
+
"""
|
|
2445
|
+
`This endpoint allows you to invite a member to manage the Admin account
|
|
2446
|
+
Features and their respective permissions are as below: - `my_plan`:
|
|
2447
|
+
- "all"
|
|
2448
|
+
- `api`:
|
|
2449
|
+
- "none"
|
|
2450
|
+
- `user_management`:
|
|
2451
|
+
- "all"
|
|
2452
|
+
- `app_management` | Not available in ENTv2:
|
|
2453
|
+
- "all"
|
|
2454
|
+
- `sub_organization_groups`
|
|
2455
|
+
- "create"
|
|
2456
|
+
- "edit_delete"
|
|
2457
|
+
- `create_sub_organizations`
|
|
2458
|
+
- "all"
|
|
2459
|
+
- `manage_sub_organizations`
|
|
2460
|
+
- "all"
|
|
2461
|
+
- `analytics`
|
|
2462
|
+
- "download_data"
|
|
2463
|
+
- "create_alerts"
|
|
2464
|
+
- "my_looks"
|
|
2465
|
+
- "explore_create"
|
|
2466
|
+
- `security`
|
|
2467
|
+
- "all"
|
|
2468
|
+
**Note**: - If `all_features_access: false` then only privileges are
|
|
2469
|
+
required otherwise if `true` then it's assumed that all permissions will be
|
|
2470
|
+
there for the invited admin user.
|
|
2471
|
+
|
|
2472
|
+
Parameters
|
|
2473
|
+
----------
|
|
2474
|
+
all_features_access : bool
|
|
2475
|
+
All access to the features
|
|
2476
|
+
|
|
2477
|
+
email : str
|
|
2478
|
+
Email address for the organization
|
|
2479
|
+
|
|
2480
|
+
privileges : typing.Sequence[InviteAdminUserRequestPrivilegesItem]
|
|
2481
|
+
|
|
2482
|
+
group_ids : typing.Optional[typing.Sequence[str]]
|
|
2483
|
+
Ids of Group
|
|
2484
|
+
|
|
2485
|
+
request_options : typing.Optional[RequestOptions]
|
|
2486
|
+
Request-specific configuration.
|
|
2487
|
+
|
|
2488
|
+
Returns
|
|
2489
|
+
-------
|
|
2490
|
+
InviteAdminUserResponse
|
|
2491
|
+
Invitation ID
|
|
2492
|
+
|
|
2493
|
+
Examples
|
|
2494
|
+
--------
|
|
2495
|
+
import asyncio
|
|
2496
|
+
|
|
2497
|
+
from brevo import AsyncBrevo
|
|
2498
|
+
from brevo.master_account import InviteAdminUserRequestPrivilegesItem
|
|
2499
|
+
|
|
2500
|
+
client = AsyncBrevo(
|
|
2501
|
+
api_key="YOUR_API_KEY",
|
|
2502
|
+
)
|
|
2503
|
+
|
|
2504
|
+
|
|
2505
|
+
async def main() -> None:
|
|
2506
|
+
await client.master_account.invite_admin_user(
|
|
2507
|
+
all_features_access=True,
|
|
2508
|
+
email="inviteuser@example.com",
|
|
2509
|
+
privileges=[InviteAdminUserRequestPrivilegesItem()],
|
|
2510
|
+
)
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
asyncio.run(main())
|
|
2514
|
+
"""
|
|
2515
|
+
_response = await self._raw_client.invite_admin_user(
|
|
2516
|
+
all_features_access=all_features_access,
|
|
2517
|
+
email=email,
|
|
2518
|
+
privileges=privileges,
|
|
2519
|
+
group_ids=group_ids,
|
|
2520
|
+
request_options=request_options,
|
|
2521
|
+
)
|
|
2522
|
+
return _response.data
|
|
2523
|
+
|
|
2524
|
+
async def resend_cancel_admin_user_invitation(
|
|
2525
|
+
self,
|
|
2526
|
+
action: PutCorporateUserInvitationActionEmailRequestAction,
|
|
2527
|
+
email: str,
|
|
2528
|
+
*,
|
|
2529
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2530
|
+
) -> PutCorporateUserInvitationActionEmailResponse:
|
|
2531
|
+
"""
|
|
2532
|
+
This endpoint will allow the user to:
|
|
2533
|
+
- Resend an admin user invitation
|
|
2534
|
+
- Cancel an admin user invitation
|
|
2535
|
+
|
|
2536
|
+
Parameters
|
|
2537
|
+
----------
|
|
2538
|
+
action : PutCorporateUserInvitationActionEmailRequestAction
|
|
2539
|
+
Action to be performed (cancel / resend)
|
|
2540
|
+
|
|
2541
|
+
email : str
|
|
2542
|
+
Email address of the recipient
|
|
2543
|
+
|
|
2544
|
+
request_options : typing.Optional[RequestOptions]
|
|
2545
|
+
Request-specific configuration.
|
|
2546
|
+
|
|
2547
|
+
Returns
|
|
2548
|
+
-------
|
|
2549
|
+
PutCorporateUserInvitationActionEmailResponse
|
|
2550
|
+
Response of the action performed
|
|
2551
|
+
|
|
2552
|
+
Examples
|
|
2553
|
+
--------
|
|
2554
|
+
import asyncio
|
|
2555
|
+
|
|
2556
|
+
from brevo import AsyncBrevo
|
|
2557
|
+
|
|
2558
|
+
client = AsyncBrevo(
|
|
2559
|
+
api_key="YOUR_API_KEY",
|
|
2560
|
+
)
|
|
2561
|
+
|
|
2562
|
+
|
|
2563
|
+
async def main() -> None:
|
|
2564
|
+
await client.master_account.resend_cancel_admin_user_invitation(
|
|
2565
|
+
action="resend",
|
|
2566
|
+
email="email",
|
|
2567
|
+
)
|
|
2568
|
+
|
|
2569
|
+
|
|
2570
|
+
asyncio.run(main())
|
|
2571
|
+
"""
|
|
2572
|
+
_response = await self._raw_client.resend_cancel_admin_user_invitation(
|
|
2573
|
+
action, email, request_options=request_options
|
|
2574
|
+
)
|
|
2575
|
+
return _response.data
|
|
2576
|
+
|
|
2577
|
+
async def revoke_an_admin_user(
|
|
2578
|
+
self, email: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2579
|
+
) -> None:
|
|
2580
|
+
"""
|
|
2581
|
+
This endpoint allows to revoke/remove an invited member of your Admin
|
|
2582
|
+
account
|
|
2583
|
+
|
|
2584
|
+
Parameters
|
|
2585
|
+
----------
|
|
2586
|
+
email : str
|
|
2587
|
+
Email of the invited user
|
|
2588
|
+
|
|
2589
|
+
request_options : typing.Optional[RequestOptions]
|
|
2590
|
+
Request-specific configuration.
|
|
2591
|
+
|
|
2592
|
+
Returns
|
|
2593
|
+
-------
|
|
2594
|
+
None
|
|
2595
|
+
|
|
2596
|
+
Examples
|
|
2597
|
+
--------
|
|
2598
|
+
import asyncio
|
|
2599
|
+
|
|
2600
|
+
from brevo import AsyncBrevo
|
|
2601
|
+
|
|
2602
|
+
client = AsyncBrevo(
|
|
2603
|
+
api_key="YOUR_API_KEY",
|
|
2604
|
+
)
|
|
2605
|
+
|
|
2606
|
+
|
|
2607
|
+
async def main() -> None:
|
|
2608
|
+
await client.master_account.revoke_an_admin_user(
|
|
2609
|
+
email="email",
|
|
2610
|
+
)
|
|
2611
|
+
|
|
2612
|
+
|
|
2613
|
+
asyncio.run(main())
|
|
2614
|
+
"""
|
|
2615
|
+
_response = await self._raw_client.revoke_an_admin_user(email, request_options=request_options)
|
|
2616
|
+
return _response.data
|
|
2617
|
+
|
|
2618
|
+
async def get_corporate_user_permission(
|
|
2619
|
+
self, email: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2620
|
+
) -> GetCorporateUserPermissionResponse:
|
|
2621
|
+
"""
|
|
2622
|
+
This endpoint will provide the list of admin user permissions
|
|
2623
|
+
|
|
2624
|
+
Parameters
|
|
2625
|
+
----------
|
|
2626
|
+
email : str
|
|
2627
|
+
Email of the invited user.
|
|
2628
|
+
|
|
2629
|
+
request_options : typing.Optional[RequestOptions]
|
|
2630
|
+
Request-specific configuration.
|
|
2631
|
+
|
|
2632
|
+
Returns
|
|
2633
|
+
-------
|
|
2634
|
+
GetCorporateUserPermissionResponse
|
|
2635
|
+
List of user's permissions
|
|
2636
|
+
|
|
2637
|
+
Examples
|
|
2638
|
+
--------
|
|
2639
|
+
import asyncio
|
|
2640
|
+
|
|
2641
|
+
from brevo import AsyncBrevo
|
|
2642
|
+
|
|
2643
|
+
client = AsyncBrevo(
|
|
2644
|
+
api_key="YOUR_API_KEY",
|
|
2645
|
+
)
|
|
2646
|
+
|
|
2647
|
+
|
|
2648
|
+
async def main() -> None:
|
|
2649
|
+
await client.master_account.get_corporate_user_permission(
|
|
2650
|
+
email="email",
|
|
2651
|
+
)
|
|
2652
|
+
|
|
2653
|
+
|
|
2654
|
+
asyncio.run(main())
|
|
2655
|
+
"""
|
|
2656
|
+
_response = await self._raw_client.get_corporate_user_permission(email, request_options=request_options)
|
|
2657
|
+
return _response.data
|
|
2658
|
+
|
|
2659
|
+
async def change_admin_user_permissions(
|
|
2660
|
+
self,
|
|
2661
|
+
email: str,
|
|
2662
|
+
*,
|
|
2663
|
+
all_features_access: bool,
|
|
2664
|
+
privileges: typing.Sequence[PutCorporateUserEmailPermissionsRequestPrivilegesItem],
|
|
2665
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2666
|
+
) -> None:
|
|
2667
|
+
"""
|
|
2668
|
+
This endpoint will allow you to change the permissions of Admin users of
|
|
2669
|
+
your Admin account
|
|
2670
|
+
|
|
2671
|
+
Parameters
|
|
2672
|
+
----------
|
|
2673
|
+
email : str
|
|
2674
|
+
Email address of Admin user
|
|
2675
|
+
|
|
2676
|
+
all_features_access : bool
|
|
2677
|
+
All access to the features
|
|
2678
|
+
|
|
2679
|
+
privileges : typing.Sequence[PutCorporateUserEmailPermissionsRequestPrivilegesItem]
|
|
2680
|
+
|
|
2681
|
+
request_options : typing.Optional[RequestOptions]
|
|
2682
|
+
Request-specific configuration.
|
|
2683
|
+
|
|
2684
|
+
Returns
|
|
2685
|
+
-------
|
|
2686
|
+
None
|
|
2687
|
+
|
|
2688
|
+
Examples
|
|
2689
|
+
--------
|
|
2690
|
+
import asyncio
|
|
2691
|
+
|
|
2692
|
+
from brevo import AsyncBrevo
|
|
2693
|
+
from brevo.master_account import (
|
|
2694
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem,
|
|
2695
|
+
)
|
|
2696
|
+
|
|
2697
|
+
client = AsyncBrevo(
|
|
2698
|
+
api_key="YOUR_API_KEY",
|
|
2699
|
+
)
|
|
2700
|
+
|
|
2701
|
+
|
|
2702
|
+
async def main() -> None:
|
|
2703
|
+
await client.master_account.change_admin_user_permissions(
|
|
2704
|
+
email="email",
|
|
2705
|
+
all_features_access=False,
|
|
2706
|
+
privileges=[
|
|
2707
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
2708
|
+
feature="user_management",
|
|
2709
|
+
permissions=["all"],
|
|
2710
|
+
),
|
|
2711
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
2712
|
+
feature="api",
|
|
2713
|
+
permissions=["all"],
|
|
2714
|
+
),
|
|
2715
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
2716
|
+
feature="my_plan",
|
|
2717
|
+
permissions=["none"],
|
|
2718
|
+
),
|
|
2719
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
2720
|
+
feature="apps_management",
|
|
2721
|
+
permissions=["all"],
|
|
2722
|
+
),
|
|
2723
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
2724
|
+
feature="create_sub_organizations",
|
|
2725
|
+
permissions=["all"],
|
|
2726
|
+
),
|
|
2727
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
2728
|
+
feature="sub_organization_groups",
|
|
2729
|
+
permissions=["create", "edit_delete"],
|
|
2730
|
+
),
|
|
2731
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
2732
|
+
feature="manage_sub_organizations",
|
|
2733
|
+
permissions=["all"],
|
|
2734
|
+
),
|
|
2735
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
2736
|
+
feature="security",
|
|
2737
|
+
permissions=["none"],
|
|
2738
|
+
),
|
|
2739
|
+
PutCorporateUserEmailPermissionsRequestPrivilegesItem(
|
|
2740
|
+
feature="analytics",
|
|
2741
|
+
permissions=[
|
|
2742
|
+
"create_alerts",
|
|
2743
|
+
"download_data",
|
|
2744
|
+
"my_looks",
|
|
2745
|
+
"explore_create",
|
|
2746
|
+
],
|
|
2747
|
+
),
|
|
2748
|
+
],
|
|
2749
|
+
)
|
|
2750
|
+
|
|
2751
|
+
|
|
2752
|
+
asyncio.run(main())
|
|
2753
|
+
"""
|
|
2754
|
+
_response = await self._raw_client.change_admin_user_permissions(
|
|
2755
|
+
email, all_features_access=all_features_access, privileges=privileges, request_options=request_options
|
|
2756
|
+
)
|
|
2757
|
+
return _response.data
|