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
brevo/balance/client.py
ADDED
|
@@ -0,0 +1,2589 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
7
|
+
from ..core.request_options import RequestOptions
|
|
8
|
+
from ..types.balance_definition import BalanceDefinition
|
|
9
|
+
from ..types.balance_limit import BalanceLimit
|
|
10
|
+
from ..types.transaction import Transaction
|
|
11
|
+
from .raw_client import AsyncRawBalanceClient, RawBalanceClient
|
|
12
|
+
from .types.create_balance_limit_request_constraint_type import CreateBalanceLimitRequestConstraintType
|
|
13
|
+
from .types.create_balance_limit_request_duration_unit import CreateBalanceLimitRequestDurationUnit
|
|
14
|
+
from .types.create_balance_limit_request_transaction_type import CreateBalanceLimitRequestTransactionType
|
|
15
|
+
from .types.create_balance_order_response import CreateBalanceOrderResponse
|
|
16
|
+
from .types.get_balance_definition_list_request_sort import GetBalanceDefinitionListRequestSort
|
|
17
|
+
from .types.get_balance_definition_list_request_sort_field import GetBalanceDefinitionListRequestSortField
|
|
18
|
+
from .types.get_balance_definition_list_request_version import GetBalanceDefinitionListRequestVersion
|
|
19
|
+
from .types.get_balance_definition_list_response import GetBalanceDefinitionListResponse
|
|
20
|
+
from .types.get_balance_definition_request_version import GetBalanceDefinitionRequestVersion
|
|
21
|
+
from .types.get_balance_limit_request_version import GetBalanceLimitRequestVersion
|
|
22
|
+
from .types.get_contact_balances_response import GetContactBalancesResponse
|
|
23
|
+
from .types.get_loyalty_balance_programs_pid_transaction_history_request_sort import (
|
|
24
|
+
GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort,
|
|
25
|
+
)
|
|
26
|
+
from .types.get_loyalty_balance_programs_pid_transaction_history_request_sort_field import (
|
|
27
|
+
GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField,
|
|
28
|
+
)
|
|
29
|
+
from .types.get_loyalty_balance_programs_pid_transaction_history_response import (
|
|
30
|
+
GetLoyaltyBalanceProgramsPidTransactionHistoryResponse,
|
|
31
|
+
)
|
|
32
|
+
from .types.get_subscription_balances_response import GetSubscriptionBalancesResponse
|
|
33
|
+
from .types.post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_modifier import (
|
|
34
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier,
|
|
35
|
+
)
|
|
36
|
+
from .types.post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_unit import (
|
|
37
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationUnit,
|
|
38
|
+
)
|
|
39
|
+
from .types.post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_amount_overtaking_strategy import (
|
|
40
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionAmountOvertakingStrategy,
|
|
41
|
+
)
|
|
42
|
+
from .types.post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_credit_rounding import (
|
|
43
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionCreditRounding,
|
|
44
|
+
)
|
|
45
|
+
from .types.post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_debit_rounding import (
|
|
46
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionDebitRounding,
|
|
47
|
+
)
|
|
48
|
+
from .types.post_loyalty_balance_programs_pid_balance_definitions_request_unit import (
|
|
49
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestUnit,
|
|
50
|
+
)
|
|
51
|
+
from .types.post_loyalty_balance_programs_pid_subscriptions_cid_balances_response import (
|
|
52
|
+
PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse,
|
|
53
|
+
)
|
|
54
|
+
from .types.update_balance_definition_request_balance_availability_duration_modifier import (
|
|
55
|
+
UpdateBalanceDefinitionRequestBalanceAvailabilityDurationModifier,
|
|
56
|
+
)
|
|
57
|
+
from .types.update_balance_definition_request_balance_availability_duration_unit import (
|
|
58
|
+
UpdateBalanceDefinitionRequestBalanceAvailabilityDurationUnit,
|
|
59
|
+
)
|
|
60
|
+
from .types.update_balance_definition_request_balance_option_amount_overtaking_strategy import (
|
|
61
|
+
UpdateBalanceDefinitionRequestBalanceOptionAmountOvertakingStrategy,
|
|
62
|
+
)
|
|
63
|
+
from .types.update_balance_definition_request_balance_option_credit_rounding import (
|
|
64
|
+
UpdateBalanceDefinitionRequestBalanceOptionCreditRounding,
|
|
65
|
+
)
|
|
66
|
+
from .types.update_balance_definition_request_balance_option_debit_rounding import (
|
|
67
|
+
UpdateBalanceDefinitionRequestBalanceOptionDebitRounding,
|
|
68
|
+
)
|
|
69
|
+
from .types.update_balance_definition_request_unit import UpdateBalanceDefinitionRequestUnit
|
|
70
|
+
from .types.update_balance_limit_request_constraint_type import UpdateBalanceLimitRequestConstraintType
|
|
71
|
+
from .types.update_balance_limit_request_duration_unit import UpdateBalanceLimitRequestDurationUnit
|
|
72
|
+
from .types.update_balance_limit_request_transaction_type import UpdateBalanceLimitRequestTransactionType
|
|
73
|
+
|
|
74
|
+
# this is used as the default value for optional parameters
|
|
75
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class BalanceClient:
|
|
79
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
80
|
+
self._raw_client = RawBalanceClient(client_wrapper=client_wrapper)
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def with_raw_response(self) -> RawBalanceClient:
|
|
84
|
+
"""
|
|
85
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
86
|
+
|
|
87
|
+
Returns
|
|
88
|
+
-------
|
|
89
|
+
RawBalanceClient
|
|
90
|
+
"""
|
|
91
|
+
return self._raw_client
|
|
92
|
+
|
|
93
|
+
def get_active_balances_api(
|
|
94
|
+
self,
|
|
95
|
+
pid: str,
|
|
96
|
+
*,
|
|
97
|
+
contact_id: int,
|
|
98
|
+
balance_definition_id: str,
|
|
99
|
+
limit: typing.Optional[int] = None,
|
|
100
|
+
offset: typing.Optional[int] = None,
|
|
101
|
+
sort_field: typing.Optional[str] = None,
|
|
102
|
+
sort: typing.Optional[str] = None,
|
|
103
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
104
|
+
) -> BalanceLimit:
|
|
105
|
+
"""
|
|
106
|
+
Returns Active Balances
|
|
107
|
+
|
|
108
|
+
Parameters
|
|
109
|
+
----------
|
|
110
|
+
pid : str
|
|
111
|
+
Loyalty Program Id
|
|
112
|
+
|
|
113
|
+
contact_id : int
|
|
114
|
+
Contact ID
|
|
115
|
+
|
|
116
|
+
balance_definition_id : str
|
|
117
|
+
Balance Definition ID
|
|
118
|
+
|
|
119
|
+
limit : typing.Optional[int]
|
|
120
|
+
Limit
|
|
121
|
+
|
|
122
|
+
offset : typing.Optional[int]
|
|
123
|
+
Offset
|
|
124
|
+
|
|
125
|
+
sort_field : typing.Optional[str]
|
|
126
|
+
Sort Field
|
|
127
|
+
|
|
128
|
+
sort : typing.Optional[str]
|
|
129
|
+
Sort Order
|
|
130
|
+
|
|
131
|
+
request_options : typing.Optional[RequestOptions]
|
|
132
|
+
Request-specific configuration.
|
|
133
|
+
|
|
134
|
+
Returns
|
|
135
|
+
-------
|
|
136
|
+
BalanceLimit
|
|
137
|
+
Successful retrieval of active balance
|
|
138
|
+
|
|
139
|
+
Examples
|
|
140
|
+
--------
|
|
141
|
+
from brevo import Brevo
|
|
142
|
+
|
|
143
|
+
client = Brevo(
|
|
144
|
+
api_key="YOUR_API_KEY",
|
|
145
|
+
)
|
|
146
|
+
client.balance.get_active_balances_api(
|
|
147
|
+
pid="pid",
|
|
148
|
+
contact_id=1,
|
|
149
|
+
balance_definition_id="balance_definition_id",
|
|
150
|
+
)
|
|
151
|
+
"""
|
|
152
|
+
_response = self._raw_client.get_active_balances_api(
|
|
153
|
+
pid,
|
|
154
|
+
contact_id=contact_id,
|
|
155
|
+
balance_definition_id=balance_definition_id,
|
|
156
|
+
limit=limit,
|
|
157
|
+
offset=offset,
|
|
158
|
+
sort_field=sort_field,
|
|
159
|
+
sort=sort,
|
|
160
|
+
request_options=request_options,
|
|
161
|
+
)
|
|
162
|
+
return _response.data
|
|
163
|
+
|
|
164
|
+
def get_balance_definition_list(
|
|
165
|
+
self,
|
|
166
|
+
pid: str,
|
|
167
|
+
*,
|
|
168
|
+
limit: typing.Optional[int] = None,
|
|
169
|
+
offset: typing.Optional[int] = None,
|
|
170
|
+
sort_field: typing.Optional[GetBalanceDefinitionListRequestSortField] = None,
|
|
171
|
+
sort: typing.Optional[GetBalanceDefinitionListRequestSort] = None,
|
|
172
|
+
version: typing.Optional[GetBalanceDefinitionListRequestVersion] = None,
|
|
173
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
174
|
+
) -> GetBalanceDefinitionListResponse:
|
|
175
|
+
"""
|
|
176
|
+
Returns balance definition page
|
|
177
|
+
|
|
178
|
+
Parameters
|
|
179
|
+
----------
|
|
180
|
+
pid : str
|
|
181
|
+
Loyalty Program Id
|
|
182
|
+
|
|
183
|
+
limit : typing.Optional[int]
|
|
184
|
+
Limit the number of records returned
|
|
185
|
+
|
|
186
|
+
offset : typing.Optional[int]
|
|
187
|
+
Offset to paginate records
|
|
188
|
+
|
|
189
|
+
sort_field : typing.Optional[GetBalanceDefinitionListRequestSortField]
|
|
190
|
+
Field to sort by
|
|
191
|
+
|
|
192
|
+
sort : typing.Optional[GetBalanceDefinitionListRequestSort]
|
|
193
|
+
Sort direction
|
|
194
|
+
|
|
195
|
+
version : typing.Optional[GetBalanceDefinitionListRequestVersion]
|
|
196
|
+
Version
|
|
197
|
+
|
|
198
|
+
request_options : typing.Optional[RequestOptions]
|
|
199
|
+
Request-specific configuration.
|
|
200
|
+
|
|
201
|
+
Returns
|
|
202
|
+
-------
|
|
203
|
+
GetBalanceDefinitionListResponse
|
|
204
|
+
Successful retrieval of balance definition page
|
|
205
|
+
|
|
206
|
+
Examples
|
|
207
|
+
--------
|
|
208
|
+
from brevo import Brevo
|
|
209
|
+
|
|
210
|
+
client = Brevo(
|
|
211
|
+
api_key="YOUR_API_KEY",
|
|
212
|
+
)
|
|
213
|
+
client.balance.get_balance_definition_list(
|
|
214
|
+
pid="pid",
|
|
215
|
+
)
|
|
216
|
+
"""
|
|
217
|
+
_response = self._raw_client.get_balance_definition_list(
|
|
218
|
+
pid,
|
|
219
|
+
limit=limit,
|
|
220
|
+
offset=offset,
|
|
221
|
+
sort_field=sort_field,
|
|
222
|
+
sort=sort,
|
|
223
|
+
version=version,
|
|
224
|
+
request_options=request_options,
|
|
225
|
+
)
|
|
226
|
+
return _response.data
|
|
227
|
+
|
|
228
|
+
def create_balance_definition(
|
|
229
|
+
self,
|
|
230
|
+
pid: str,
|
|
231
|
+
*,
|
|
232
|
+
name: str,
|
|
233
|
+
unit: PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestUnit,
|
|
234
|
+
balance_availability_duration_modifier: typing.Optional[
|
|
235
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier
|
|
236
|
+
] = OMIT,
|
|
237
|
+
balance_availability_duration_unit: typing.Optional[
|
|
238
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationUnit
|
|
239
|
+
] = OMIT,
|
|
240
|
+
balance_availability_duration_value: typing.Optional[int] = OMIT,
|
|
241
|
+
balance_expiration_date: typing.Optional[dt.date] = OMIT,
|
|
242
|
+
balance_option_amount_overtaking_strategy: typing.Optional[
|
|
243
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionAmountOvertakingStrategy
|
|
244
|
+
] = OMIT,
|
|
245
|
+
balance_option_credit_rounding: typing.Optional[
|
|
246
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionCreditRounding
|
|
247
|
+
] = OMIT,
|
|
248
|
+
balance_option_debit_rounding: typing.Optional[
|
|
249
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionDebitRounding
|
|
250
|
+
] = OMIT,
|
|
251
|
+
description: typing.Optional[str] = OMIT,
|
|
252
|
+
image_ref: typing.Optional[str] = OMIT,
|
|
253
|
+
max_amount: typing.Optional[float] = OMIT,
|
|
254
|
+
max_credit_amount_limit: typing.Optional[float] = OMIT,
|
|
255
|
+
max_debit_amount_limit: typing.Optional[float] = OMIT,
|
|
256
|
+
meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
257
|
+
min_amount: typing.Optional[float] = OMIT,
|
|
258
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
259
|
+
) -> BalanceDefinition:
|
|
260
|
+
"""
|
|
261
|
+
Creates balance definition and returns information
|
|
262
|
+
|
|
263
|
+
Parameters
|
|
264
|
+
----------
|
|
265
|
+
pid : str
|
|
266
|
+
Loyalty Program Id
|
|
267
|
+
|
|
268
|
+
name : str
|
|
269
|
+
Name of the balance definition.
|
|
270
|
+
|
|
271
|
+
unit : PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestUnit
|
|
272
|
+
Unit of balance measurement.
|
|
273
|
+
|
|
274
|
+
balance_availability_duration_modifier : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier]
|
|
275
|
+
Defines when the balance expires within the selected duration.
|
|
276
|
+
|
|
277
|
+
balance_availability_duration_unit : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationUnit]
|
|
278
|
+
Unit of time for balance validity.
|
|
279
|
+
|
|
280
|
+
balance_availability_duration_value : typing.Optional[int]
|
|
281
|
+
Number of time units before the balance expires.
|
|
282
|
+
|
|
283
|
+
balance_expiration_date : typing.Optional[dt.date]
|
|
284
|
+
Fixed expiration date (`dd/mm` format) as an alternative to duration-based expiry.
|
|
285
|
+
|
|
286
|
+
balance_option_amount_overtaking_strategy : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionAmountOvertakingStrategy]
|
|
287
|
+
Defines whether partial credit is allowed when reaching max balance.
|
|
288
|
+
|
|
289
|
+
balance_option_credit_rounding : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionCreditRounding]
|
|
290
|
+
Defines rounding strategy for credit transactions.
|
|
291
|
+
|
|
292
|
+
balance_option_debit_rounding : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionDebitRounding]
|
|
293
|
+
Defines rounding strategy for debit transactions.
|
|
294
|
+
|
|
295
|
+
description : typing.Optional[str]
|
|
296
|
+
Short description of the balance definition.
|
|
297
|
+
|
|
298
|
+
image_ref : typing.Optional[str]
|
|
299
|
+
URL of an optional image reference.
|
|
300
|
+
|
|
301
|
+
max_amount : typing.Optional[float]
|
|
302
|
+
Maximum allowable balance amount.
|
|
303
|
+
|
|
304
|
+
max_credit_amount_limit : typing.Optional[float]
|
|
305
|
+
Maximum credit allowed per operation.
|
|
306
|
+
|
|
307
|
+
max_debit_amount_limit : typing.Optional[float]
|
|
308
|
+
Maximum debit allowed per operation.
|
|
309
|
+
|
|
310
|
+
meta : typing.Optional[typing.Dict[str, typing.Any]]
|
|
311
|
+
Additional metadata for the balance definition.
|
|
312
|
+
|
|
313
|
+
min_amount : typing.Optional[float]
|
|
314
|
+
Minimum allowable balance amount.
|
|
315
|
+
|
|
316
|
+
request_options : typing.Optional[RequestOptions]
|
|
317
|
+
Request-specific configuration.
|
|
318
|
+
|
|
319
|
+
Returns
|
|
320
|
+
-------
|
|
321
|
+
BalanceDefinition
|
|
322
|
+
Successful creation of balance definition
|
|
323
|
+
|
|
324
|
+
Examples
|
|
325
|
+
--------
|
|
326
|
+
from brevo import Brevo
|
|
327
|
+
|
|
328
|
+
client = Brevo(
|
|
329
|
+
api_key="YOUR_API_KEY",
|
|
330
|
+
)
|
|
331
|
+
client.balance.create_balance_definition(
|
|
332
|
+
pid="pid",
|
|
333
|
+
name="name",
|
|
334
|
+
unit="POINTS",
|
|
335
|
+
)
|
|
336
|
+
"""
|
|
337
|
+
_response = self._raw_client.create_balance_definition(
|
|
338
|
+
pid,
|
|
339
|
+
name=name,
|
|
340
|
+
unit=unit,
|
|
341
|
+
balance_availability_duration_modifier=balance_availability_duration_modifier,
|
|
342
|
+
balance_availability_duration_unit=balance_availability_duration_unit,
|
|
343
|
+
balance_availability_duration_value=balance_availability_duration_value,
|
|
344
|
+
balance_expiration_date=balance_expiration_date,
|
|
345
|
+
balance_option_amount_overtaking_strategy=balance_option_amount_overtaking_strategy,
|
|
346
|
+
balance_option_credit_rounding=balance_option_credit_rounding,
|
|
347
|
+
balance_option_debit_rounding=balance_option_debit_rounding,
|
|
348
|
+
description=description,
|
|
349
|
+
image_ref=image_ref,
|
|
350
|
+
max_amount=max_amount,
|
|
351
|
+
max_credit_amount_limit=max_credit_amount_limit,
|
|
352
|
+
max_debit_amount_limit=max_debit_amount_limit,
|
|
353
|
+
meta=meta,
|
|
354
|
+
min_amount=min_amount,
|
|
355
|
+
request_options=request_options,
|
|
356
|
+
)
|
|
357
|
+
return _response.data
|
|
358
|
+
|
|
359
|
+
def get_balance_definition(
|
|
360
|
+
self,
|
|
361
|
+
pid: str,
|
|
362
|
+
bdid: str,
|
|
363
|
+
*,
|
|
364
|
+
version: typing.Optional[GetBalanceDefinitionRequestVersion] = None,
|
|
365
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
366
|
+
) -> BalanceDefinition:
|
|
367
|
+
"""
|
|
368
|
+
Returns balance definition
|
|
369
|
+
|
|
370
|
+
Parameters
|
|
371
|
+
----------
|
|
372
|
+
pid : str
|
|
373
|
+
Loyalty Program Id
|
|
374
|
+
|
|
375
|
+
bdid : str
|
|
376
|
+
Balance Definition Id
|
|
377
|
+
|
|
378
|
+
version : typing.Optional[GetBalanceDefinitionRequestVersion]
|
|
379
|
+
Version
|
|
380
|
+
|
|
381
|
+
request_options : typing.Optional[RequestOptions]
|
|
382
|
+
Request-specific configuration.
|
|
383
|
+
|
|
384
|
+
Returns
|
|
385
|
+
-------
|
|
386
|
+
BalanceDefinition
|
|
387
|
+
Successful retrieval of balance definition
|
|
388
|
+
|
|
389
|
+
Examples
|
|
390
|
+
--------
|
|
391
|
+
from brevo import Brevo
|
|
392
|
+
|
|
393
|
+
client = Brevo(
|
|
394
|
+
api_key="YOUR_API_KEY",
|
|
395
|
+
)
|
|
396
|
+
client.balance.get_balance_definition(
|
|
397
|
+
pid="pid",
|
|
398
|
+
bdid="bdid",
|
|
399
|
+
)
|
|
400
|
+
"""
|
|
401
|
+
_response = self._raw_client.get_balance_definition(pid, bdid, version=version, request_options=request_options)
|
|
402
|
+
return _response.data
|
|
403
|
+
|
|
404
|
+
def update_balance_definition(
|
|
405
|
+
self,
|
|
406
|
+
pid: str,
|
|
407
|
+
bdid: str,
|
|
408
|
+
*,
|
|
409
|
+
name: str,
|
|
410
|
+
unit: UpdateBalanceDefinitionRequestUnit,
|
|
411
|
+
balance_availability_duration_modifier: typing.Optional[
|
|
412
|
+
UpdateBalanceDefinitionRequestBalanceAvailabilityDurationModifier
|
|
413
|
+
] = OMIT,
|
|
414
|
+
balance_availability_duration_unit: typing.Optional[
|
|
415
|
+
UpdateBalanceDefinitionRequestBalanceAvailabilityDurationUnit
|
|
416
|
+
] = OMIT,
|
|
417
|
+
balance_availability_duration_value: typing.Optional[int] = OMIT,
|
|
418
|
+
balance_expiration_date: typing.Optional[str] = OMIT,
|
|
419
|
+
balance_option_amount_overtaking_strategy: typing.Optional[
|
|
420
|
+
UpdateBalanceDefinitionRequestBalanceOptionAmountOvertakingStrategy
|
|
421
|
+
] = OMIT,
|
|
422
|
+
balance_option_credit_rounding: typing.Optional[
|
|
423
|
+
UpdateBalanceDefinitionRequestBalanceOptionCreditRounding
|
|
424
|
+
] = OMIT,
|
|
425
|
+
balance_option_debit_rounding: typing.Optional[UpdateBalanceDefinitionRequestBalanceOptionDebitRounding] = OMIT,
|
|
426
|
+
description: typing.Optional[str] = OMIT,
|
|
427
|
+
image_ref: typing.Optional[str] = OMIT,
|
|
428
|
+
max_amount: typing.Optional[float] = OMIT,
|
|
429
|
+
max_credit_amount_limit: typing.Optional[float] = OMIT,
|
|
430
|
+
max_debit_amount_limit: typing.Optional[float] = OMIT,
|
|
431
|
+
meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
432
|
+
min_amount: typing.Optional[float] = OMIT,
|
|
433
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
434
|
+
) -> BalanceDefinition:
|
|
435
|
+
"""
|
|
436
|
+
Updates Balance definition
|
|
437
|
+
|
|
438
|
+
Parameters
|
|
439
|
+
----------
|
|
440
|
+
pid : str
|
|
441
|
+
Loyalty Program Id
|
|
442
|
+
|
|
443
|
+
bdid : str
|
|
444
|
+
Balance Definition Id
|
|
445
|
+
|
|
446
|
+
name : str
|
|
447
|
+
Name of the balance definition.
|
|
448
|
+
|
|
449
|
+
unit : UpdateBalanceDefinitionRequestUnit
|
|
450
|
+
Unit of balance measurement.
|
|
451
|
+
|
|
452
|
+
balance_availability_duration_modifier : typing.Optional[UpdateBalanceDefinitionRequestBalanceAvailabilityDurationModifier]
|
|
453
|
+
Defines when the balance expires within the selected duration.
|
|
454
|
+
|
|
455
|
+
balance_availability_duration_unit : typing.Optional[UpdateBalanceDefinitionRequestBalanceAvailabilityDurationUnit]
|
|
456
|
+
Unit of time for balance validity.
|
|
457
|
+
|
|
458
|
+
balance_availability_duration_value : typing.Optional[int]
|
|
459
|
+
Number of time units before the balance expires.
|
|
460
|
+
|
|
461
|
+
balance_expiration_date : typing.Optional[str]
|
|
462
|
+
Expiration date (`dd/mm` format) or empty if not applicable.
|
|
463
|
+
|
|
464
|
+
balance_option_amount_overtaking_strategy : typing.Optional[UpdateBalanceDefinitionRequestBalanceOptionAmountOvertakingStrategy]
|
|
465
|
+
Defines whether partial credit is allowed when reaching max balance.
|
|
466
|
+
|
|
467
|
+
balance_option_credit_rounding : typing.Optional[UpdateBalanceDefinitionRequestBalanceOptionCreditRounding]
|
|
468
|
+
Rounding strategy for credit transactions.
|
|
469
|
+
|
|
470
|
+
balance_option_debit_rounding : typing.Optional[UpdateBalanceDefinitionRequestBalanceOptionDebitRounding]
|
|
471
|
+
Rounding strategy for debit transactions.
|
|
472
|
+
|
|
473
|
+
description : typing.Optional[str]
|
|
474
|
+
Short description of the balance definition.
|
|
475
|
+
|
|
476
|
+
image_ref : typing.Optional[str]
|
|
477
|
+
URL of an optional image reference.
|
|
478
|
+
|
|
479
|
+
max_amount : typing.Optional[float]
|
|
480
|
+
Maximum allowable balance amount.
|
|
481
|
+
|
|
482
|
+
max_credit_amount_limit : typing.Optional[float]
|
|
483
|
+
Maximum credit allowed per operation.
|
|
484
|
+
|
|
485
|
+
max_debit_amount_limit : typing.Optional[float]
|
|
486
|
+
Maximum debit allowed per operation.
|
|
487
|
+
|
|
488
|
+
meta : typing.Optional[typing.Dict[str, typing.Any]]
|
|
489
|
+
Optional metadata for the balance definition.
|
|
490
|
+
|
|
491
|
+
min_amount : typing.Optional[float]
|
|
492
|
+
Minimum allowable balance amount.
|
|
493
|
+
|
|
494
|
+
request_options : typing.Optional[RequestOptions]
|
|
495
|
+
Request-specific configuration.
|
|
496
|
+
|
|
497
|
+
Returns
|
|
498
|
+
-------
|
|
499
|
+
BalanceDefinition
|
|
500
|
+
Successful update of balance definition
|
|
501
|
+
|
|
502
|
+
Examples
|
|
503
|
+
--------
|
|
504
|
+
from brevo import Brevo
|
|
505
|
+
|
|
506
|
+
client = Brevo(
|
|
507
|
+
api_key="YOUR_API_KEY",
|
|
508
|
+
)
|
|
509
|
+
client.balance.update_balance_definition(
|
|
510
|
+
pid="pid",
|
|
511
|
+
bdid="bdid",
|
|
512
|
+
name="name",
|
|
513
|
+
unit="POINTS",
|
|
514
|
+
)
|
|
515
|
+
"""
|
|
516
|
+
_response = self._raw_client.update_balance_definition(
|
|
517
|
+
pid,
|
|
518
|
+
bdid,
|
|
519
|
+
name=name,
|
|
520
|
+
unit=unit,
|
|
521
|
+
balance_availability_duration_modifier=balance_availability_duration_modifier,
|
|
522
|
+
balance_availability_duration_unit=balance_availability_duration_unit,
|
|
523
|
+
balance_availability_duration_value=balance_availability_duration_value,
|
|
524
|
+
balance_expiration_date=balance_expiration_date,
|
|
525
|
+
balance_option_amount_overtaking_strategy=balance_option_amount_overtaking_strategy,
|
|
526
|
+
balance_option_credit_rounding=balance_option_credit_rounding,
|
|
527
|
+
balance_option_debit_rounding=balance_option_debit_rounding,
|
|
528
|
+
description=description,
|
|
529
|
+
image_ref=image_ref,
|
|
530
|
+
max_amount=max_amount,
|
|
531
|
+
max_credit_amount_limit=max_credit_amount_limit,
|
|
532
|
+
max_debit_amount_limit=max_debit_amount_limit,
|
|
533
|
+
meta=meta,
|
|
534
|
+
min_amount=min_amount,
|
|
535
|
+
request_options=request_options,
|
|
536
|
+
)
|
|
537
|
+
return _response.data
|
|
538
|
+
|
|
539
|
+
def delete_balance_definition(
|
|
540
|
+
self, pid: str, bdid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
541
|
+
) -> None:
|
|
542
|
+
"""
|
|
543
|
+
Delete Balance definition
|
|
544
|
+
|
|
545
|
+
Parameters
|
|
546
|
+
----------
|
|
547
|
+
pid : str
|
|
548
|
+
Loyalty Program Id
|
|
549
|
+
|
|
550
|
+
bdid : str
|
|
551
|
+
Balance Definition Id
|
|
552
|
+
|
|
553
|
+
request_options : typing.Optional[RequestOptions]
|
|
554
|
+
Request-specific configuration.
|
|
555
|
+
|
|
556
|
+
Returns
|
|
557
|
+
-------
|
|
558
|
+
None
|
|
559
|
+
|
|
560
|
+
Examples
|
|
561
|
+
--------
|
|
562
|
+
from brevo import Brevo
|
|
563
|
+
|
|
564
|
+
client = Brevo(
|
|
565
|
+
api_key="YOUR_API_KEY",
|
|
566
|
+
)
|
|
567
|
+
client.balance.delete_balance_definition(
|
|
568
|
+
pid="pid",
|
|
569
|
+
bdid="bdid",
|
|
570
|
+
)
|
|
571
|
+
"""
|
|
572
|
+
_response = self._raw_client.delete_balance_definition(pid, bdid, request_options=request_options)
|
|
573
|
+
return _response.data
|
|
574
|
+
|
|
575
|
+
def create_balance_limit(
|
|
576
|
+
self,
|
|
577
|
+
pid: str,
|
|
578
|
+
bdid: str,
|
|
579
|
+
*,
|
|
580
|
+
constraint_type: CreateBalanceLimitRequestConstraintType,
|
|
581
|
+
duration_unit: CreateBalanceLimitRequestDurationUnit,
|
|
582
|
+
duration_value: int,
|
|
583
|
+
transaction_type: CreateBalanceLimitRequestTransactionType,
|
|
584
|
+
value: int,
|
|
585
|
+
sliding_schedule: typing.Optional[bool] = OMIT,
|
|
586
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
587
|
+
) -> BalanceLimit:
|
|
588
|
+
"""
|
|
589
|
+
Creates balance limit and sends the created UUID along with the data
|
|
590
|
+
|
|
591
|
+
Parameters
|
|
592
|
+
----------
|
|
593
|
+
pid : str
|
|
594
|
+
Loyalty Program Id
|
|
595
|
+
|
|
596
|
+
bdid : str
|
|
597
|
+
Balance Definition Id
|
|
598
|
+
|
|
599
|
+
constraint_type : CreateBalanceLimitRequestConstraintType
|
|
600
|
+
Defines whether the limit applies to transaction count or amount.
|
|
601
|
+
|
|
602
|
+
duration_unit : CreateBalanceLimitRequestDurationUnit
|
|
603
|
+
Unit of time for which the limit is applicable.
|
|
604
|
+
|
|
605
|
+
duration_value : int
|
|
606
|
+
Number of time units for the balance limit.
|
|
607
|
+
|
|
608
|
+
transaction_type : CreateBalanceLimitRequestTransactionType
|
|
609
|
+
Specifies whether the limit applies to credit or debit transactions.
|
|
610
|
+
|
|
611
|
+
value : int
|
|
612
|
+
Maximum allowed value for the specified constraint type.
|
|
613
|
+
|
|
614
|
+
sliding_schedule : typing.Optional[bool]
|
|
615
|
+
Determines if the limit resets on a rolling schedule.
|
|
616
|
+
|
|
617
|
+
request_options : typing.Optional[RequestOptions]
|
|
618
|
+
Request-specific configuration.
|
|
619
|
+
|
|
620
|
+
Returns
|
|
621
|
+
-------
|
|
622
|
+
BalanceLimit
|
|
623
|
+
Successful creation of balance limit
|
|
624
|
+
|
|
625
|
+
Examples
|
|
626
|
+
--------
|
|
627
|
+
from brevo import Brevo
|
|
628
|
+
|
|
629
|
+
client = Brevo(
|
|
630
|
+
api_key="YOUR_API_KEY",
|
|
631
|
+
)
|
|
632
|
+
client.balance.create_balance_limit(
|
|
633
|
+
pid="pid",
|
|
634
|
+
bdid="bdid",
|
|
635
|
+
constraint_type="transaction",
|
|
636
|
+
duration_unit="day",
|
|
637
|
+
duration_value=1,
|
|
638
|
+
transaction_type="credit",
|
|
639
|
+
value=1,
|
|
640
|
+
)
|
|
641
|
+
"""
|
|
642
|
+
_response = self._raw_client.create_balance_limit(
|
|
643
|
+
pid,
|
|
644
|
+
bdid,
|
|
645
|
+
constraint_type=constraint_type,
|
|
646
|
+
duration_unit=duration_unit,
|
|
647
|
+
duration_value=duration_value,
|
|
648
|
+
transaction_type=transaction_type,
|
|
649
|
+
value=value,
|
|
650
|
+
sliding_schedule=sliding_schedule,
|
|
651
|
+
request_options=request_options,
|
|
652
|
+
)
|
|
653
|
+
return _response.data
|
|
654
|
+
|
|
655
|
+
def get_balance_limit(
|
|
656
|
+
self,
|
|
657
|
+
pid: str,
|
|
658
|
+
bdid: str,
|
|
659
|
+
blid: str,
|
|
660
|
+
*,
|
|
661
|
+
version: typing.Optional[GetBalanceLimitRequestVersion] = None,
|
|
662
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
663
|
+
) -> BalanceLimit:
|
|
664
|
+
"""
|
|
665
|
+
Fetches balance limits and send the created UUID along with the data
|
|
666
|
+
|
|
667
|
+
Parameters
|
|
668
|
+
----------
|
|
669
|
+
pid : str
|
|
670
|
+
Loyalty Program Id
|
|
671
|
+
|
|
672
|
+
bdid : str
|
|
673
|
+
Balance Definition Id
|
|
674
|
+
|
|
675
|
+
blid : str
|
|
676
|
+
Balance Limit Id
|
|
677
|
+
|
|
678
|
+
version : typing.Optional[GetBalanceLimitRequestVersion]
|
|
679
|
+
Version
|
|
680
|
+
|
|
681
|
+
request_options : typing.Optional[RequestOptions]
|
|
682
|
+
Request-specific configuration.
|
|
683
|
+
|
|
684
|
+
Returns
|
|
685
|
+
-------
|
|
686
|
+
BalanceLimit
|
|
687
|
+
Successful retrieval of balance limit
|
|
688
|
+
|
|
689
|
+
Examples
|
|
690
|
+
--------
|
|
691
|
+
from brevo import Brevo
|
|
692
|
+
|
|
693
|
+
client = Brevo(
|
|
694
|
+
api_key="YOUR_API_KEY",
|
|
695
|
+
)
|
|
696
|
+
client.balance.get_balance_limit(
|
|
697
|
+
pid="pid",
|
|
698
|
+
bdid="bdid",
|
|
699
|
+
blid="blid",
|
|
700
|
+
)
|
|
701
|
+
"""
|
|
702
|
+
_response = self._raw_client.get_balance_limit(
|
|
703
|
+
pid, bdid, blid, version=version, request_options=request_options
|
|
704
|
+
)
|
|
705
|
+
return _response.data
|
|
706
|
+
|
|
707
|
+
def update_balance_limit(
|
|
708
|
+
self,
|
|
709
|
+
pid: str,
|
|
710
|
+
bdid: str,
|
|
711
|
+
blid: str,
|
|
712
|
+
*,
|
|
713
|
+
constraint_type: UpdateBalanceLimitRequestConstraintType,
|
|
714
|
+
duration_unit: UpdateBalanceLimitRequestDurationUnit,
|
|
715
|
+
duration_value: int,
|
|
716
|
+
transaction_type: UpdateBalanceLimitRequestTransactionType,
|
|
717
|
+
value: int,
|
|
718
|
+
sliding_schedule: typing.Optional[bool] = OMIT,
|
|
719
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
720
|
+
) -> BalanceLimit:
|
|
721
|
+
"""
|
|
722
|
+
Updates balance limit
|
|
723
|
+
|
|
724
|
+
Parameters
|
|
725
|
+
----------
|
|
726
|
+
pid : str
|
|
727
|
+
Loyalty Program Id
|
|
728
|
+
|
|
729
|
+
bdid : str
|
|
730
|
+
Balance Definition Id
|
|
731
|
+
|
|
732
|
+
blid : str
|
|
733
|
+
Balance Limit Id
|
|
734
|
+
|
|
735
|
+
constraint_type : UpdateBalanceLimitRequestConstraintType
|
|
736
|
+
Defines whether the limit applies to transaction count or amount.
|
|
737
|
+
|
|
738
|
+
duration_unit : UpdateBalanceLimitRequestDurationUnit
|
|
739
|
+
Unit of time for which the limit is applicable.
|
|
740
|
+
|
|
741
|
+
duration_value : int
|
|
742
|
+
Number of time units for the balance limit.
|
|
743
|
+
|
|
744
|
+
transaction_type : UpdateBalanceLimitRequestTransactionType
|
|
745
|
+
Specifies whether the limit applies to credit or debit transactions.
|
|
746
|
+
|
|
747
|
+
value : int
|
|
748
|
+
Maximum allowed value for the specified constraint type.
|
|
749
|
+
|
|
750
|
+
sliding_schedule : typing.Optional[bool]
|
|
751
|
+
Determines if the limit resets on a rolling schedule.
|
|
752
|
+
|
|
753
|
+
request_options : typing.Optional[RequestOptions]
|
|
754
|
+
Request-specific configuration.
|
|
755
|
+
|
|
756
|
+
Returns
|
|
757
|
+
-------
|
|
758
|
+
BalanceLimit
|
|
759
|
+
Successful update of balance limit
|
|
760
|
+
|
|
761
|
+
Examples
|
|
762
|
+
--------
|
|
763
|
+
from brevo import Brevo
|
|
764
|
+
|
|
765
|
+
client = Brevo(
|
|
766
|
+
api_key="YOUR_API_KEY",
|
|
767
|
+
)
|
|
768
|
+
client.balance.update_balance_limit(
|
|
769
|
+
pid="pid",
|
|
770
|
+
bdid="bdid",
|
|
771
|
+
blid="blid",
|
|
772
|
+
constraint_type="transaction",
|
|
773
|
+
duration_unit="day",
|
|
774
|
+
duration_value=1,
|
|
775
|
+
transaction_type="credit",
|
|
776
|
+
value=1,
|
|
777
|
+
)
|
|
778
|
+
"""
|
|
779
|
+
_response = self._raw_client.update_balance_limit(
|
|
780
|
+
pid,
|
|
781
|
+
bdid,
|
|
782
|
+
blid,
|
|
783
|
+
constraint_type=constraint_type,
|
|
784
|
+
duration_unit=duration_unit,
|
|
785
|
+
duration_value=duration_value,
|
|
786
|
+
transaction_type=transaction_type,
|
|
787
|
+
value=value,
|
|
788
|
+
sliding_schedule=sliding_schedule,
|
|
789
|
+
request_options=request_options,
|
|
790
|
+
)
|
|
791
|
+
return _response.data
|
|
792
|
+
|
|
793
|
+
def delete_balance_limit(
|
|
794
|
+
self, pid: str, bdid: str, blid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
795
|
+
) -> None:
|
|
796
|
+
"""
|
|
797
|
+
Delete balance limit
|
|
798
|
+
|
|
799
|
+
Parameters
|
|
800
|
+
----------
|
|
801
|
+
pid : str
|
|
802
|
+
Loyalty Program Id
|
|
803
|
+
|
|
804
|
+
bdid : str
|
|
805
|
+
Balance Definition Id
|
|
806
|
+
|
|
807
|
+
blid : str
|
|
808
|
+
Balance Limit Id
|
|
809
|
+
|
|
810
|
+
request_options : typing.Optional[RequestOptions]
|
|
811
|
+
Request-specific configuration.
|
|
812
|
+
|
|
813
|
+
Returns
|
|
814
|
+
-------
|
|
815
|
+
None
|
|
816
|
+
|
|
817
|
+
Examples
|
|
818
|
+
--------
|
|
819
|
+
from brevo import Brevo
|
|
820
|
+
|
|
821
|
+
client = Brevo(
|
|
822
|
+
api_key="YOUR_API_KEY",
|
|
823
|
+
)
|
|
824
|
+
client.balance.delete_balance_limit(
|
|
825
|
+
pid="pid",
|
|
826
|
+
bdid="bdid",
|
|
827
|
+
blid="blid",
|
|
828
|
+
)
|
|
829
|
+
"""
|
|
830
|
+
_response = self._raw_client.delete_balance_limit(pid, bdid, blid, request_options=request_options)
|
|
831
|
+
return _response.data
|
|
832
|
+
|
|
833
|
+
def get_contact_balances(
|
|
834
|
+
self, pid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
835
|
+
) -> GetContactBalancesResponse:
|
|
836
|
+
"""
|
|
837
|
+
Returns balance list
|
|
838
|
+
|
|
839
|
+
Parameters
|
|
840
|
+
----------
|
|
841
|
+
pid : str
|
|
842
|
+
Loyalty Program Id
|
|
843
|
+
|
|
844
|
+
request_options : typing.Optional[RequestOptions]
|
|
845
|
+
Request-specific configuration.
|
|
846
|
+
|
|
847
|
+
Returns
|
|
848
|
+
-------
|
|
849
|
+
GetContactBalancesResponse
|
|
850
|
+
Successful retrieval of contact balance
|
|
851
|
+
|
|
852
|
+
Examples
|
|
853
|
+
--------
|
|
854
|
+
from brevo import Brevo
|
|
855
|
+
|
|
856
|
+
client = Brevo(
|
|
857
|
+
api_key="YOUR_API_KEY",
|
|
858
|
+
)
|
|
859
|
+
client.balance.get_contact_balances(
|
|
860
|
+
pid="pid",
|
|
861
|
+
)
|
|
862
|
+
"""
|
|
863
|
+
_response = self._raw_client.get_contact_balances(pid, request_options=request_options)
|
|
864
|
+
return _response.data
|
|
865
|
+
|
|
866
|
+
def create_balance_order(
|
|
867
|
+
self,
|
|
868
|
+
pid: str,
|
|
869
|
+
*,
|
|
870
|
+
amount: float,
|
|
871
|
+
balance_definition_id: str,
|
|
872
|
+
contact_id: int,
|
|
873
|
+
due_at: str,
|
|
874
|
+
source: str,
|
|
875
|
+
expires_at: typing.Optional[str] = OMIT,
|
|
876
|
+
meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
877
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
878
|
+
) -> CreateBalanceOrderResponse:
|
|
879
|
+
"""
|
|
880
|
+
Returns created order
|
|
881
|
+
|
|
882
|
+
Parameters
|
|
883
|
+
----------
|
|
884
|
+
pid : str
|
|
885
|
+
Loyalty Program Id
|
|
886
|
+
|
|
887
|
+
amount : float
|
|
888
|
+
Order amount (must be non-zero).
|
|
889
|
+
|
|
890
|
+
balance_definition_id : str
|
|
891
|
+
Unique identifier (UUID) of the associated balance definition.
|
|
892
|
+
|
|
893
|
+
contact_id : int
|
|
894
|
+
Unique identifier of the contact placing the order (must be ≥ 1).
|
|
895
|
+
|
|
896
|
+
due_at : str
|
|
897
|
+
RFC3339 timestamp specifying when the order is due.
|
|
898
|
+
|
|
899
|
+
source : str
|
|
900
|
+
Specifies the origin of the order (`engine` or `user`).
|
|
901
|
+
|
|
902
|
+
expires_at : typing.Optional[str]
|
|
903
|
+
Optional RFC3339 timestamp defining order expiration.
|
|
904
|
+
|
|
905
|
+
meta : typing.Optional[typing.Dict[str, typing.Any]]
|
|
906
|
+
Optional metadata associated with the order.
|
|
907
|
+
|
|
908
|
+
request_options : typing.Optional[RequestOptions]
|
|
909
|
+
Request-specific configuration.
|
|
910
|
+
|
|
911
|
+
Returns
|
|
912
|
+
-------
|
|
913
|
+
CreateBalanceOrderResponse
|
|
914
|
+
Successful creation of order
|
|
915
|
+
|
|
916
|
+
Examples
|
|
917
|
+
--------
|
|
918
|
+
from brevo import Brevo
|
|
919
|
+
|
|
920
|
+
client = Brevo(
|
|
921
|
+
api_key="YOUR_API_KEY",
|
|
922
|
+
)
|
|
923
|
+
client.balance.create_balance_order(
|
|
924
|
+
pid="pid",
|
|
925
|
+
amount=1.1,
|
|
926
|
+
balance_definition_id="balanceDefinitionId",
|
|
927
|
+
contact_id=1,
|
|
928
|
+
due_at="dueAt",
|
|
929
|
+
source="source",
|
|
930
|
+
)
|
|
931
|
+
"""
|
|
932
|
+
_response = self._raw_client.create_balance_order(
|
|
933
|
+
pid,
|
|
934
|
+
amount=amount,
|
|
935
|
+
balance_definition_id=balance_definition_id,
|
|
936
|
+
contact_id=contact_id,
|
|
937
|
+
due_at=due_at,
|
|
938
|
+
source=source,
|
|
939
|
+
expires_at=expires_at,
|
|
940
|
+
meta=meta,
|
|
941
|
+
request_options=request_options,
|
|
942
|
+
)
|
|
943
|
+
return _response.data
|
|
944
|
+
|
|
945
|
+
def get_subscription_balances(
|
|
946
|
+
self, pid: str, cid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
947
|
+
) -> GetSubscriptionBalancesResponse:
|
|
948
|
+
"""
|
|
949
|
+
Returns subscription balances
|
|
950
|
+
|
|
951
|
+
Parameters
|
|
952
|
+
----------
|
|
953
|
+
pid : str
|
|
954
|
+
Loyalty Program Id
|
|
955
|
+
|
|
956
|
+
cid : str
|
|
957
|
+
Contact Id
|
|
958
|
+
|
|
959
|
+
request_options : typing.Optional[RequestOptions]
|
|
960
|
+
Request-specific configuration.
|
|
961
|
+
|
|
962
|
+
Returns
|
|
963
|
+
-------
|
|
964
|
+
GetSubscriptionBalancesResponse
|
|
965
|
+
Successful retrieval of contact balance
|
|
966
|
+
|
|
967
|
+
Examples
|
|
968
|
+
--------
|
|
969
|
+
from brevo import Brevo
|
|
970
|
+
|
|
971
|
+
client = Brevo(
|
|
972
|
+
api_key="YOUR_API_KEY",
|
|
973
|
+
)
|
|
974
|
+
client.balance.get_subscription_balances(
|
|
975
|
+
pid="pid",
|
|
976
|
+
cid="cid",
|
|
977
|
+
)
|
|
978
|
+
"""
|
|
979
|
+
_response = self._raw_client.get_subscription_balances(pid, cid, request_options=request_options)
|
|
980
|
+
return _response.data
|
|
981
|
+
|
|
982
|
+
def create_subscription_balances(
|
|
983
|
+
self, pid: str, cid: str, *, balance_definition_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
984
|
+
) -> PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse:
|
|
985
|
+
"""
|
|
986
|
+
Creates a balance for a contact
|
|
987
|
+
|
|
988
|
+
Parameters
|
|
989
|
+
----------
|
|
990
|
+
pid : str
|
|
991
|
+
Loyalty Program Id
|
|
992
|
+
|
|
993
|
+
cid : str
|
|
994
|
+
Contact Id
|
|
995
|
+
|
|
996
|
+
balance_definition_id : str
|
|
997
|
+
Unique identifier (UUID) of the balance definition associated with the new balance.
|
|
998
|
+
|
|
999
|
+
request_options : typing.Optional[RequestOptions]
|
|
1000
|
+
Request-specific configuration.
|
|
1001
|
+
|
|
1002
|
+
Returns
|
|
1003
|
+
-------
|
|
1004
|
+
PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse
|
|
1005
|
+
Successful creation of balance
|
|
1006
|
+
|
|
1007
|
+
Examples
|
|
1008
|
+
--------
|
|
1009
|
+
from brevo import Brevo
|
|
1010
|
+
|
|
1011
|
+
client = Brevo(
|
|
1012
|
+
api_key="YOUR_API_KEY",
|
|
1013
|
+
)
|
|
1014
|
+
client.balance.create_subscription_balances(
|
|
1015
|
+
pid="pid",
|
|
1016
|
+
cid="cid",
|
|
1017
|
+
balance_definition_id="balanceDefinitionId",
|
|
1018
|
+
)
|
|
1019
|
+
"""
|
|
1020
|
+
_response = self._raw_client.create_subscription_balances(
|
|
1021
|
+
pid, cid, balance_definition_id=balance_definition_id, request_options=request_options
|
|
1022
|
+
)
|
|
1023
|
+
return _response.data
|
|
1024
|
+
|
|
1025
|
+
def get_transaction_history_api(
|
|
1026
|
+
self,
|
|
1027
|
+
pid: str,
|
|
1028
|
+
*,
|
|
1029
|
+
contact_id: int,
|
|
1030
|
+
balance_definition_id: str,
|
|
1031
|
+
limit: typing.Optional[int] = None,
|
|
1032
|
+
offset: typing.Optional[int] = None,
|
|
1033
|
+
sort_field: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField] = None,
|
|
1034
|
+
sort: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] = None,
|
|
1035
|
+
filters: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
1036
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1037
|
+
) -> GetLoyaltyBalanceProgramsPidTransactionHistoryResponse:
|
|
1038
|
+
"""
|
|
1039
|
+
Returns transaction history
|
|
1040
|
+
|
|
1041
|
+
Parameters
|
|
1042
|
+
----------
|
|
1043
|
+
pid : str
|
|
1044
|
+
Loyalty Program Id
|
|
1045
|
+
|
|
1046
|
+
contact_id : int
|
|
1047
|
+
Contact ID
|
|
1048
|
+
|
|
1049
|
+
balance_definition_id : str
|
|
1050
|
+
Balance Definition ID
|
|
1051
|
+
|
|
1052
|
+
limit : typing.Optional[int]
|
|
1053
|
+
Limit the number of records returned
|
|
1054
|
+
|
|
1055
|
+
offset : typing.Optional[int]
|
|
1056
|
+
Skip a number of records
|
|
1057
|
+
|
|
1058
|
+
sort_field : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField]
|
|
1059
|
+
Field to sort by
|
|
1060
|
+
|
|
1061
|
+
sort : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort]
|
|
1062
|
+
Sort order, either asc or desc
|
|
1063
|
+
|
|
1064
|
+
filters : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
1065
|
+
Filters to apply
|
|
1066
|
+
|
|
1067
|
+
request_options : typing.Optional[RequestOptions]
|
|
1068
|
+
Request-specific configuration.
|
|
1069
|
+
|
|
1070
|
+
Returns
|
|
1071
|
+
-------
|
|
1072
|
+
GetLoyaltyBalanceProgramsPidTransactionHistoryResponse
|
|
1073
|
+
Successful retrieval of transaction history
|
|
1074
|
+
|
|
1075
|
+
Examples
|
|
1076
|
+
--------
|
|
1077
|
+
from brevo import Brevo
|
|
1078
|
+
|
|
1079
|
+
client = Brevo(
|
|
1080
|
+
api_key="YOUR_API_KEY",
|
|
1081
|
+
)
|
|
1082
|
+
client.balance.get_transaction_history_api(
|
|
1083
|
+
pid="pid",
|
|
1084
|
+
contact_id=1,
|
|
1085
|
+
balance_definition_id="balance_definition_id",
|
|
1086
|
+
)
|
|
1087
|
+
"""
|
|
1088
|
+
_response = self._raw_client.get_transaction_history_api(
|
|
1089
|
+
pid,
|
|
1090
|
+
contact_id=contact_id,
|
|
1091
|
+
balance_definition_id=balance_definition_id,
|
|
1092
|
+
limit=limit,
|
|
1093
|
+
offset=offset,
|
|
1094
|
+
sort_field=sort_field,
|
|
1095
|
+
sort=sort,
|
|
1096
|
+
filters=filters,
|
|
1097
|
+
request_options=request_options,
|
|
1098
|
+
)
|
|
1099
|
+
return _response.data
|
|
1100
|
+
|
|
1101
|
+
def begin_transaction(
|
|
1102
|
+
self,
|
|
1103
|
+
pid: str,
|
|
1104
|
+
*,
|
|
1105
|
+
amount: float,
|
|
1106
|
+
balance_definition_id: str,
|
|
1107
|
+
loyalty_subscription_id: typing.Optional[str] = OMIT,
|
|
1108
|
+
auto_complete: typing.Optional[bool] = OMIT,
|
|
1109
|
+
balance_expiry_in_minutes: typing.Optional[int] = OMIT,
|
|
1110
|
+
contact_id: typing.Optional[int] = OMIT,
|
|
1111
|
+
event_time: typing.Optional[str] = OMIT,
|
|
1112
|
+
meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
1113
|
+
ttl: typing.Optional[int] = OMIT,
|
|
1114
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1115
|
+
) -> Transaction:
|
|
1116
|
+
"""
|
|
1117
|
+
Creates new transaction and returns information
|
|
1118
|
+
|
|
1119
|
+
Parameters
|
|
1120
|
+
----------
|
|
1121
|
+
pid : str
|
|
1122
|
+
Loyalty Program Id
|
|
1123
|
+
|
|
1124
|
+
amount : float
|
|
1125
|
+
Transaction amount (must be provided).
|
|
1126
|
+
|
|
1127
|
+
balance_definition_id : str
|
|
1128
|
+
Unique identifier (UUID) of the associated balance definition.
|
|
1129
|
+
|
|
1130
|
+
loyalty_subscription_id : typing.Optional[str]
|
|
1131
|
+
Unique identifier for the loyalty subscription (required unless `contactId` is provided).
|
|
1132
|
+
|
|
1133
|
+
auto_complete : typing.Optional[bool]
|
|
1134
|
+
Whether the transaction should be automatically completed.
|
|
1135
|
+
|
|
1136
|
+
balance_expiry_in_minutes : typing.Optional[int]
|
|
1137
|
+
Optional expiry time for the balance in minutes (must be greater than 0 if provided).
|
|
1138
|
+
|
|
1139
|
+
contact_id : typing.Optional[int]
|
|
1140
|
+
Unique identifier of the contact involved in the transaction (required unless `LoyaltySubscriptionId` is provided).
|
|
1141
|
+
|
|
1142
|
+
event_time : typing.Optional[str]
|
|
1143
|
+
Optional timestamp specifying when the transaction occurred.
|
|
1144
|
+
|
|
1145
|
+
meta : typing.Optional[typing.Dict[str, typing.Any]]
|
|
1146
|
+
Optional metadata associated with the transaction.
|
|
1147
|
+
|
|
1148
|
+
ttl : typing.Optional[int]
|
|
1149
|
+
Optional time-to-live for the transaction (must be greater than 0 if provided).
|
|
1150
|
+
|
|
1151
|
+
request_options : typing.Optional[RequestOptions]
|
|
1152
|
+
Request-specific configuration.
|
|
1153
|
+
|
|
1154
|
+
Returns
|
|
1155
|
+
-------
|
|
1156
|
+
Transaction
|
|
1157
|
+
Transaction information
|
|
1158
|
+
|
|
1159
|
+
Examples
|
|
1160
|
+
--------
|
|
1161
|
+
from brevo import Brevo
|
|
1162
|
+
|
|
1163
|
+
client = Brevo(
|
|
1164
|
+
api_key="YOUR_API_KEY",
|
|
1165
|
+
)
|
|
1166
|
+
client.balance.begin_transaction(
|
|
1167
|
+
pid="pid",
|
|
1168
|
+
amount=1.1,
|
|
1169
|
+
balance_definition_id="balanceDefinitionId",
|
|
1170
|
+
)
|
|
1171
|
+
"""
|
|
1172
|
+
_response = self._raw_client.begin_transaction(
|
|
1173
|
+
pid,
|
|
1174
|
+
amount=amount,
|
|
1175
|
+
balance_definition_id=balance_definition_id,
|
|
1176
|
+
loyalty_subscription_id=loyalty_subscription_id,
|
|
1177
|
+
auto_complete=auto_complete,
|
|
1178
|
+
balance_expiry_in_minutes=balance_expiry_in_minutes,
|
|
1179
|
+
contact_id=contact_id,
|
|
1180
|
+
event_time=event_time,
|
|
1181
|
+
meta=meta,
|
|
1182
|
+
ttl=ttl,
|
|
1183
|
+
request_options=request_options,
|
|
1184
|
+
)
|
|
1185
|
+
return _response.data
|
|
1186
|
+
|
|
1187
|
+
def cancel_transaction(
|
|
1188
|
+
self, pid: str, tid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1189
|
+
) -> Transaction:
|
|
1190
|
+
"""
|
|
1191
|
+
Cancels transaction
|
|
1192
|
+
|
|
1193
|
+
Parameters
|
|
1194
|
+
----------
|
|
1195
|
+
pid : str
|
|
1196
|
+
Loyalty Program Id
|
|
1197
|
+
|
|
1198
|
+
tid : str
|
|
1199
|
+
Transaction Id
|
|
1200
|
+
|
|
1201
|
+
request_options : typing.Optional[RequestOptions]
|
|
1202
|
+
Request-specific configuration.
|
|
1203
|
+
|
|
1204
|
+
Returns
|
|
1205
|
+
-------
|
|
1206
|
+
Transaction
|
|
1207
|
+
Transaction information
|
|
1208
|
+
|
|
1209
|
+
Examples
|
|
1210
|
+
--------
|
|
1211
|
+
from brevo import Brevo
|
|
1212
|
+
|
|
1213
|
+
client = Brevo(
|
|
1214
|
+
api_key="YOUR_API_KEY",
|
|
1215
|
+
)
|
|
1216
|
+
client.balance.cancel_transaction(
|
|
1217
|
+
pid="pid",
|
|
1218
|
+
tid="tid",
|
|
1219
|
+
)
|
|
1220
|
+
"""
|
|
1221
|
+
_response = self._raw_client.cancel_transaction(pid, tid, request_options=request_options)
|
|
1222
|
+
return _response.data
|
|
1223
|
+
|
|
1224
|
+
def complete_transaction(
|
|
1225
|
+
self, pid: str, tid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1226
|
+
) -> Transaction:
|
|
1227
|
+
"""
|
|
1228
|
+
Completes transaction
|
|
1229
|
+
|
|
1230
|
+
Parameters
|
|
1231
|
+
----------
|
|
1232
|
+
pid : str
|
|
1233
|
+
Loyalty Program Id
|
|
1234
|
+
|
|
1235
|
+
tid : str
|
|
1236
|
+
Transaction Id
|
|
1237
|
+
|
|
1238
|
+
request_options : typing.Optional[RequestOptions]
|
|
1239
|
+
Request-specific configuration.
|
|
1240
|
+
|
|
1241
|
+
Returns
|
|
1242
|
+
-------
|
|
1243
|
+
Transaction
|
|
1244
|
+
Transaction information
|
|
1245
|
+
|
|
1246
|
+
Examples
|
|
1247
|
+
--------
|
|
1248
|
+
from brevo import Brevo
|
|
1249
|
+
|
|
1250
|
+
client = Brevo(
|
|
1251
|
+
api_key="YOUR_API_KEY",
|
|
1252
|
+
)
|
|
1253
|
+
client.balance.complete_transaction(
|
|
1254
|
+
pid="pid",
|
|
1255
|
+
tid="tid",
|
|
1256
|
+
)
|
|
1257
|
+
"""
|
|
1258
|
+
_response = self._raw_client.complete_transaction(pid, tid, request_options=request_options)
|
|
1259
|
+
return _response.data
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
class AsyncBalanceClient:
|
|
1263
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
1264
|
+
self._raw_client = AsyncRawBalanceClient(client_wrapper=client_wrapper)
|
|
1265
|
+
|
|
1266
|
+
@property
|
|
1267
|
+
def with_raw_response(self) -> AsyncRawBalanceClient:
|
|
1268
|
+
"""
|
|
1269
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
1270
|
+
|
|
1271
|
+
Returns
|
|
1272
|
+
-------
|
|
1273
|
+
AsyncRawBalanceClient
|
|
1274
|
+
"""
|
|
1275
|
+
return self._raw_client
|
|
1276
|
+
|
|
1277
|
+
async def get_active_balances_api(
|
|
1278
|
+
self,
|
|
1279
|
+
pid: str,
|
|
1280
|
+
*,
|
|
1281
|
+
contact_id: int,
|
|
1282
|
+
balance_definition_id: str,
|
|
1283
|
+
limit: typing.Optional[int] = None,
|
|
1284
|
+
offset: typing.Optional[int] = None,
|
|
1285
|
+
sort_field: typing.Optional[str] = None,
|
|
1286
|
+
sort: typing.Optional[str] = None,
|
|
1287
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1288
|
+
) -> BalanceLimit:
|
|
1289
|
+
"""
|
|
1290
|
+
Returns Active Balances
|
|
1291
|
+
|
|
1292
|
+
Parameters
|
|
1293
|
+
----------
|
|
1294
|
+
pid : str
|
|
1295
|
+
Loyalty Program Id
|
|
1296
|
+
|
|
1297
|
+
contact_id : int
|
|
1298
|
+
Contact ID
|
|
1299
|
+
|
|
1300
|
+
balance_definition_id : str
|
|
1301
|
+
Balance Definition ID
|
|
1302
|
+
|
|
1303
|
+
limit : typing.Optional[int]
|
|
1304
|
+
Limit
|
|
1305
|
+
|
|
1306
|
+
offset : typing.Optional[int]
|
|
1307
|
+
Offset
|
|
1308
|
+
|
|
1309
|
+
sort_field : typing.Optional[str]
|
|
1310
|
+
Sort Field
|
|
1311
|
+
|
|
1312
|
+
sort : typing.Optional[str]
|
|
1313
|
+
Sort Order
|
|
1314
|
+
|
|
1315
|
+
request_options : typing.Optional[RequestOptions]
|
|
1316
|
+
Request-specific configuration.
|
|
1317
|
+
|
|
1318
|
+
Returns
|
|
1319
|
+
-------
|
|
1320
|
+
BalanceLimit
|
|
1321
|
+
Successful retrieval of active balance
|
|
1322
|
+
|
|
1323
|
+
Examples
|
|
1324
|
+
--------
|
|
1325
|
+
import asyncio
|
|
1326
|
+
|
|
1327
|
+
from brevo import AsyncBrevo
|
|
1328
|
+
|
|
1329
|
+
client = AsyncBrevo(
|
|
1330
|
+
api_key="YOUR_API_KEY",
|
|
1331
|
+
)
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
async def main() -> None:
|
|
1335
|
+
await client.balance.get_active_balances_api(
|
|
1336
|
+
pid="pid",
|
|
1337
|
+
contact_id=1,
|
|
1338
|
+
balance_definition_id="balance_definition_id",
|
|
1339
|
+
)
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
asyncio.run(main())
|
|
1343
|
+
"""
|
|
1344
|
+
_response = await self._raw_client.get_active_balances_api(
|
|
1345
|
+
pid,
|
|
1346
|
+
contact_id=contact_id,
|
|
1347
|
+
balance_definition_id=balance_definition_id,
|
|
1348
|
+
limit=limit,
|
|
1349
|
+
offset=offset,
|
|
1350
|
+
sort_field=sort_field,
|
|
1351
|
+
sort=sort,
|
|
1352
|
+
request_options=request_options,
|
|
1353
|
+
)
|
|
1354
|
+
return _response.data
|
|
1355
|
+
|
|
1356
|
+
async def get_balance_definition_list(
|
|
1357
|
+
self,
|
|
1358
|
+
pid: str,
|
|
1359
|
+
*,
|
|
1360
|
+
limit: typing.Optional[int] = None,
|
|
1361
|
+
offset: typing.Optional[int] = None,
|
|
1362
|
+
sort_field: typing.Optional[GetBalanceDefinitionListRequestSortField] = None,
|
|
1363
|
+
sort: typing.Optional[GetBalanceDefinitionListRequestSort] = None,
|
|
1364
|
+
version: typing.Optional[GetBalanceDefinitionListRequestVersion] = None,
|
|
1365
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1366
|
+
) -> GetBalanceDefinitionListResponse:
|
|
1367
|
+
"""
|
|
1368
|
+
Returns balance definition page
|
|
1369
|
+
|
|
1370
|
+
Parameters
|
|
1371
|
+
----------
|
|
1372
|
+
pid : str
|
|
1373
|
+
Loyalty Program Id
|
|
1374
|
+
|
|
1375
|
+
limit : typing.Optional[int]
|
|
1376
|
+
Limit the number of records returned
|
|
1377
|
+
|
|
1378
|
+
offset : typing.Optional[int]
|
|
1379
|
+
Offset to paginate records
|
|
1380
|
+
|
|
1381
|
+
sort_field : typing.Optional[GetBalanceDefinitionListRequestSortField]
|
|
1382
|
+
Field to sort by
|
|
1383
|
+
|
|
1384
|
+
sort : typing.Optional[GetBalanceDefinitionListRequestSort]
|
|
1385
|
+
Sort direction
|
|
1386
|
+
|
|
1387
|
+
version : typing.Optional[GetBalanceDefinitionListRequestVersion]
|
|
1388
|
+
Version
|
|
1389
|
+
|
|
1390
|
+
request_options : typing.Optional[RequestOptions]
|
|
1391
|
+
Request-specific configuration.
|
|
1392
|
+
|
|
1393
|
+
Returns
|
|
1394
|
+
-------
|
|
1395
|
+
GetBalanceDefinitionListResponse
|
|
1396
|
+
Successful retrieval of balance definition page
|
|
1397
|
+
|
|
1398
|
+
Examples
|
|
1399
|
+
--------
|
|
1400
|
+
import asyncio
|
|
1401
|
+
|
|
1402
|
+
from brevo import AsyncBrevo
|
|
1403
|
+
|
|
1404
|
+
client = AsyncBrevo(
|
|
1405
|
+
api_key="YOUR_API_KEY",
|
|
1406
|
+
)
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
async def main() -> None:
|
|
1410
|
+
await client.balance.get_balance_definition_list(
|
|
1411
|
+
pid="pid",
|
|
1412
|
+
)
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
asyncio.run(main())
|
|
1416
|
+
"""
|
|
1417
|
+
_response = await self._raw_client.get_balance_definition_list(
|
|
1418
|
+
pid,
|
|
1419
|
+
limit=limit,
|
|
1420
|
+
offset=offset,
|
|
1421
|
+
sort_field=sort_field,
|
|
1422
|
+
sort=sort,
|
|
1423
|
+
version=version,
|
|
1424
|
+
request_options=request_options,
|
|
1425
|
+
)
|
|
1426
|
+
return _response.data
|
|
1427
|
+
|
|
1428
|
+
async def create_balance_definition(
|
|
1429
|
+
self,
|
|
1430
|
+
pid: str,
|
|
1431
|
+
*,
|
|
1432
|
+
name: str,
|
|
1433
|
+
unit: PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestUnit,
|
|
1434
|
+
balance_availability_duration_modifier: typing.Optional[
|
|
1435
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier
|
|
1436
|
+
] = OMIT,
|
|
1437
|
+
balance_availability_duration_unit: typing.Optional[
|
|
1438
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationUnit
|
|
1439
|
+
] = OMIT,
|
|
1440
|
+
balance_availability_duration_value: typing.Optional[int] = OMIT,
|
|
1441
|
+
balance_expiration_date: typing.Optional[dt.date] = OMIT,
|
|
1442
|
+
balance_option_amount_overtaking_strategy: typing.Optional[
|
|
1443
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionAmountOvertakingStrategy
|
|
1444
|
+
] = OMIT,
|
|
1445
|
+
balance_option_credit_rounding: typing.Optional[
|
|
1446
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionCreditRounding
|
|
1447
|
+
] = OMIT,
|
|
1448
|
+
balance_option_debit_rounding: typing.Optional[
|
|
1449
|
+
PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionDebitRounding
|
|
1450
|
+
] = OMIT,
|
|
1451
|
+
description: typing.Optional[str] = OMIT,
|
|
1452
|
+
image_ref: typing.Optional[str] = OMIT,
|
|
1453
|
+
max_amount: typing.Optional[float] = OMIT,
|
|
1454
|
+
max_credit_amount_limit: typing.Optional[float] = OMIT,
|
|
1455
|
+
max_debit_amount_limit: typing.Optional[float] = OMIT,
|
|
1456
|
+
meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
1457
|
+
min_amount: typing.Optional[float] = OMIT,
|
|
1458
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1459
|
+
) -> BalanceDefinition:
|
|
1460
|
+
"""
|
|
1461
|
+
Creates balance definition and returns information
|
|
1462
|
+
|
|
1463
|
+
Parameters
|
|
1464
|
+
----------
|
|
1465
|
+
pid : str
|
|
1466
|
+
Loyalty Program Id
|
|
1467
|
+
|
|
1468
|
+
name : str
|
|
1469
|
+
Name of the balance definition.
|
|
1470
|
+
|
|
1471
|
+
unit : PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestUnit
|
|
1472
|
+
Unit of balance measurement.
|
|
1473
|
+
|
|
1474
|
+
balance_availability_duration_modifier : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationModifier]
|
|
1475
|
+
Defines when the balance expires within the selected duration.
|
|
1476
|
+
|
|
1477
|
+
balance_availability_duration_unit : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceAvailabilityDurationUnit]
|
|
1478
|
+
Unit of time for balance validity.
|
|
1479
|
+
|
|
1480
|
+
balance_availability_duration_value : typing.Optional[int]
|
|
1481
|
+
Number of time units before the balance expires.
|
|
1482
|
+
|
|
1483
|
+
balance_expiration_date : typing.Optional[dt.date]
|
|
1484
|
+
Fixed expiration date (`dd/mm` format) as an alternative to duration-based expiry.
|
|
1485
|
+
|
|
1486
|
+
balance_option_amount_overtaking_strategy : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionAmountOvertakingStrategy]
|
|
1487
|
+
Defines whether partial credit is allowed when reaching max balance.
|
|
1488
|
+
|
|
1489
|
+
balance_option_credit_rounding : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionCreditRounding]
|
|
1490
|
+
Defines rounding strategy for credit transactions.
|
|
1491
|
+
|
|
1492
|
+
balance_option_debit_rounding : typing.Optional[PostLoyaltyBalanceProgramsPidBalanceDefinitionsRequestBalanceOptionDebitRounding]
|
|
1493
|
+
Defines rounding strategy for debit transactions.
|
|
1494
|
+
|
|
1495
|
+
description : typing.Optional[str]
|
|
1496
|
+
Short description of the balance definition.
|
|
1497
|
+
|
|
1498
|
+
image_ref : typing.Optional[str]
|
|
1499
|
+
URL of an optional image reference.
|
|
1500
|
+
|
|
1501
|
+
max_amount : typing.Optional[float]
|
|
1502
|
+
Maximum allowable balance amount.
|
|
1503
|
+
|
|
1504
|
+
max_credit_amount_limit : typing.Optional[float]
|
|
1505
|
+
Maximum credit allowed per operation.
|
|
1506
|
+
|
|
1507
|
+
max_debit_amount_limit : typing.Optional[float]
|
|
1508
|
+
Maximum debit allowed per operation.
|
|
1509
|
+
|
|
1510
|
+
meta : typing.Optional[typing.Dict[str, typing.Any]]
|
|
1511
|
+
Additional metadata for the balance definition.
|
|
1512
|
+
|
|
1513
|
+
min_amount : typing.Optional[float]
|
|
1514
|
+
Minimum allowable balance amount.
|
|
1515
|
+
|
|
1516
|
+
request_options : typing.Optional[RequestOptions]
|
|
1517
|
+
Request-specific configuration.
|
|
1518
|
+
|
|
1519
|
+
Returns
|
|
1520
|
+
-------
|
|
1521
|
+
BalanceDefinition
|
|
1522
|
+
Successful creation of balance definition
|
|
1523
|
+
|
|
1524
|
+
Examples
|
|
1525
|
+
--------
|
|
1526
|
+
import asyncio
|
|
1527
|
+
|
|
1528
|
+
from brevo import AsyncBrevo
|
|
1529
|
+
|
|
1530
|
+
client = AsyncBrevo(
|
|
1531
|
+
api_key="YOUR_API_KEY",
|
|
1532
|
+
)
|
|
1533
|
+
|
|
1534
|
+
|
|
1535
|
+
async def main() -> None:
|
|
1536
|
+
await client.balance.create_balance_definition(
|
|
1537
|
+
pid="pid",
|
|
1538
|
+
name="name",
|
|
1539
|
+
unit="POINTS",
|
|
1540
|
+
)
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
asyncio.run(main())
|
|
1544
|
+
"""
|
|
1545
|
+
_response = await self._raw_client.create_balance_definition(
|
|
1546
|
+
pid,
|
|
1547
|
+
name=name,
|
|
1548
|
+
unit=unit,
|
|
1549
|
+
balance_availability_duration_modifier=balance_availability_duration_modifier,
|
|
1550
|
+
balance_availability_duration_unit=balance_availability_duration_unit,
|
|
1551
|
+
balance_availability_duration_value=balance_availability_duration_value,
|
|
1552
|
+
balance_expiration_date=balance_expiration_date,
|
|
1553
|
+
balance_option_amount_overtaking_strategy=balance_option_amount_overtaking_strategy,
|
|
1554
|
+
balance_option_credit_rounding=balance_option_credit_rounding,
|
|
1555
|
+
balance_option_debit_rounding=balance_option_debit_rounding,
|
|
1556
|
+
description=description,
|
|
1557
|
+
image_ref=image_ref,
|
|
1558
|
+
max_amount=max_amount,
|
|
1559
|
+
max_credit_amount_limit=max_credit_amount_limit,
|
|
1560
|
+
max_debit_amount_limit=max_debit_amount_limit,
|
|
1561
|
+
meta=meta,
|
|
1562
|
+
min_amount=min_amount,
|
|
1563
|
+
request_options=request_options,
|
|
1564
|
+
)
|
|
1565
|
+
return _response.data
|
|
1566
|
+
|
|
1567
|
+
async def get_balance_definition(
|
|
1568
|
+
self,
|
|
1569
|
+
pid: str,
|
|
1570
|
+
bdid: str,
|
|
1571
|
+
*,
|
|
1572
|
+
version: typing.Optional[GetBalanceDefinitionRequestVersion] = None,
|
|
1573
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1574
|
+
) -> BalanceDefinition:
|
|
1575
|
+
"""
|
|
1576
|
+
Returns balance definition
|
|
1577
|
+
|
|
1578
|
+
Parameters
|
|
1579
|
+
----------
|
|
1580
|
+
pid : str
|
|
1581
|
+
Loyalty Program Id
|
|
1582
|
+
|
|
1583
|
+
bdid : str
|
|
1584
|
+
Balance Definition Id
|
|
1585
|
+
|
|
1586
|
+
version : typing.Optional[GetBalanceDefinitionRequestVersion]
|
|
1587
|
+
Version
|
|
1588
|
+
|
|
1589
|
+
request_options : typing.Optional[RequestOptions]
|
|
1590
|
+
Request-specific configuration.
|
|
1591
|
+
|
|
1592
|
+
Returns
|
|
1593
|
+
-------
|
|
1594
|
+
BalanceDefinition
|
|
1595
|
+
Successful retrieval of balance definition
|
|
1596
|
+
|
|
1597
|
+
Examples
|
|
1598
|
+
--------
|
|
1599
|
+
import asyncio
|
|
1600
|
+
|
|
1601
|
+
from brevo import AsyncBrevo
|
|
1602
|
+
|
|
1603
|
+
client = AsyncBrevo(
|
|
1604
|
+
api_key="YOUR_API_KEY",
|
|
1605
|
+
)
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
async def main() -> None:
|
|
1609
|
+
await client.balance.get_balance_definition(
|
|
1610
|
+
pid="pid",
|
|
1611
|
+
bdid="bdid",
|
|
1612
|
+
)
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
asyncio.run(main())
|
|
1616
|
+
"""
|
|
1617
|
+
_response = await self._raw_client.get_balance_definition(
|
|
1618
|
+
pid, bdid, version=version, request_options=request_options
|
|
1619
|
+
)
|
|
1620
|
+
return _response.data
|
|
1621
|
+
|
|
1622
|
+
async def update_balance_definition(
|
|
1623
|
+
self,
|
|
1624
|
+
pid: str,
|
|
1625
|
+
bdid: str,
|
|
1626
|
+
*,
|
|
1627
|
+
name: str,
|
|
1628
|
+
unit: UpdateBalanceDefinitionRequestUnit,
|
|
1629
|
+
balance_availability_duration_modifier: typing.Optional[
|
|
1630
|
+
UpdateBalanceDefinitionRequestBalanceAvailabilityDurationModifier
|
|
1631
|
+
] = OMIT,
|
|
1632
|
+
balance_availability_duration_unit: typing.Optional[
|
|
1633
|
+
UpdateBalanceDefinitionRequestBalanceAvailabilityDurationUnit
|
|
1634
|
+
] = OMIT,
|
|
1635
|
+
balance_availability_duration_value: typing.Optional[int] = OMIT,
|
|
1636
|
+
balance_expiration_date: typing.Optional[str] = OMIT,
|
|
1637
|
+
balance_option_amount_overtaking_strategy: typing.Optional[
|
|
1638
|
+
UpdateBalanceDefinitionRequestBalanceOptionAmountOvertakingStrategy
|
|
1639
|
+
] = OMIT,
|
|
1640
|
+
balance_option_credit_rounding: typing.Optional[
|
|
1641
|
+
UpdateBalanceDefinitionRequestBalanceOptionCreditRounding
|
|
1642
|
+
] = OMIT,
|
|
1643
|
+
balance_option_debit_rounding: typing.Optional[UpdateBalanceDefinitionRequestBalanceOptionDebitRounding] = OMIT,
|
|
1644
|
+
description: typing.Optional[str] = OMIT,
|
|
1645
|
+
image_ref: typing.Optional[str] = OMIT,
|
|
1646
|
+
max_amount: typing.Optional[float] = OMIT,
|
|
1647
|
+
max_credit_amount_limit: typing.Optional[float] = OMIT,
|
|
1648
|
+
max_debit_amount_limit: typing.Optional[float] = OMIT,
|
|
1649
|
+
meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
1650
|
+
min_amount: typing.Optional[float] = OMIT,
|
|
1651
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1652
|
+
) -> BalanceDefinition:
|
|
1653
|
+
"""
|
|
1654
|
+
Updates Balance definition
|
|
1655
|
+
|
|
1656
|
+
Parameters
|
|
1657
|
+
----------
|
|
1658
|
+
pid : str
|
|
1659
|
+
Loyalty Program Id
|
|
1660
|
+
|
|
1661
|
+
bdid : str
|
|
1662
|
+
Balance Definition Id
|
|
1663
|
+
|
|
1664
|
+
name : str
|
|
1665
|
+
Name of the balance definition.
|
|
1666
|
+
|
|
1667
|
+
unit : UpdateBalanceDefinitionRequestUnit
|
|
1668
|
+
Unit of balance measurement.
|
|
1669
|
+
|
|
1670
|
+
balance_availability_duration_modifier : typing.Optional[UpdateBalanceDefinitionRequestBalanceAvailabilityDurationModifier]
|
|
1671
|
+
Defines when the balance expires within the selected duration.
|
|
1672
|
+
|
|
1673
|
+
balance_availability_duration_unit : typing.Optional[UpdateBalanceDefinitionRequestBalanceAvailabilityDurationUnit]
|
|
1674
|
+
Unit of time for balance validity.
|
|
1675
|
+
|
|
1676
|
+
balance_availability_duration_value : typing.Optional[int]
|
|
1677
|
+
Number of time units before the balance expires.
|
|
1678
|
+
|
|
1679
|
+
balance_expiration_date : typing.Optional[str]
|
|
1680
|
+
Expiration date (`dd/mm` format) or empty if not applicable.
|
|
1681
|
+
|
|
1682
|
+
balance_option_amount_overtaking_strategy : typing.Optional[UpdateBalanceDefinitionRequestBalanceOptionAmountOvertakingStrategy]
|
|
1683
|
+
Defines whether partial credit is allowed when reaching max balance.
|
|
1684
|
+
|
|
1685
|
+
balance_option_credit_rounding : typing.Optional[UpdateBalanceDefinitionRequestBalanceOptionCreditRounding]
|
|
1686
|
+
Rounding strategy for credit transactions.
|
|
1687
|
+
|
|
1688
|
+
balance_option_debit_rounding : typing.Optional[UpdateBalanceDefinitionRequestBalanceOptionDebitRounding]
|
|
1689
|
+
Rounding strategy for debit transactions.
|
|
1690
|
+
|
|
1691
|
+
description : typing.Optional[str]
|
|
1692
|
+
Short description of the balance definition.
|
|
1693
|
+
|
|
1694
|
+
image_ref : typing.Optional[str]
|
|
1695
|
+
URL of an optional image reference.
|
|
1696
|
+
|
|
1697
|
+
max_amount : typing.Optional[float]
|
|
1698
|
+
Maximum allowable balance amount.
|
|
1699
|
+
|
|
1700
|
+
max_credit_amount_limit : typing.Optional[float]
|
|
1701
|
+
Maximum credit allowed per operation.
|
|
1702
|
+
|
|
1703
|
+
max_debit_amount_limit : typing.Optional[float]
|
|
1704
|
+
Maximum debit allowed per operation.
|
|
1705
|
+
|
|
1706
|
+
meta : typing.Optional[typing.Dict[str, typing.Any]]
|
|
1707
|
+
Optional metadata for the balance definition.
|
|
1708
|
+
|
|
1709
|
+
min_amount : typing.Optional[float]
|
|
1710
|
+
Minimum allowable balance amount.
|
|
1711
|
+
|
|
1712
|
+
request_options : typing.Optional[RequestOptions]
|
|
1713
|
+
Request-specific configuration.
|
|
1714
|
+
|
|
1715
|
+
Returns
|
|
1716
|
+
-------
|
|
1717
|
+
BalanceDefinition
|
|
1718
|
+
Successful update of balance definition
|
|
1719
|
+
|
|
1720
|
+
Examples
|
|
1721
|
+
--------
|
|
1722
|
+
import asyncio
|
|
1723
|
+
|
|
1724
|
+
from brevo import AsyncBrevo
|
|
1725
|
+
|
|
1726
|
+
client = AsyncBrevo(
|
|
1727
|
+
api_key="YOUR_API_KEY",
|
|
1728
|
+
)
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
async def main() -> None:
|
|
1732
|
+
await client.balance.update_balance_definition(
|
|
1733
|
+
pid="pid",
|
|
1734
|
+
bdid="bdid",
|
|
1735
|
+
name="name",
|
|
1736
|
+
unit="POINTS",
|
|
1737
|
+
)
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
asyncio.run(main())
|
|
1741
|
+
"""
|
|
1742
|
+
_response = await self._raw_client.update_balance_definition(
|
|
1743
|
+
pid,
|
|
1744
|
+
bdid,
|
|
1745
|
+
name=name,
|
|
1746
|
+
unit=unit,
|
|
1747
|
+
balance_availability_duration_modifier=balance_availability_duration_modifier,
|
|
1748
|
+
balance_availability_duration_unit=balance_availability_duration_unit,
|
|
1749
|
+
balance_availability_duration_value=balance_availability_duration_value,
|
|
1750
|
+
balance_expiration_date=balance_expiration_date,
|
|
1751
|
+
balance_option_amount_overtaking_strategy=balance_option_amount_overtaking_strategy,
|
|
1752
|
+
balance_option_credit_rounding=balance_option_credit_rounding,
|
|
1753
|
+
balance_option_debit_rounding=balance_option_debit_rounding,
|
|
1754
|
+
description=description,
|
|
1755
|
+
image_ref=image_ref,
|
|
1756
|
+
max_amount=max_amount,
|
|
1757
|
+
max_credit_amount_limit=max_credit_amount_limit,
|
|
1758
|
+
max_debit_amount_limit=max_debit_amount_limit,
|
|
1759
|
+
meta=meta,
|
|
1760
|
+
min_amount=min_amount,
|
|
1761
|
+
request_options=request_options,
|
|
1762
|
+
)
|
|
1763
|
+
return _response.data
|
|
1764
|
+
|
|
1765
|
+
async def delete_balance_definition(
|
|
1766
|
+
self, pid: str, bdid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1767
|
+
) -> None:
|
|
1768
|
+
"""
|
|
1769
|
+
Delete Balance definition
|
|
1770
|
+
|
|
1771
|
+
Parameters
|
|
1772
|
+
----------
|
|
1773
|
+
pid : str
|
|
1774
|
+
Loyalty Program Id
|
|
1775
|
+
|
|
1776
|
+
bdid : str
|
|
1777
|
+
Balance Definition Id
|
|
1778
|
+
|
|
1779
|
+
request_options : typing.Optional[RequestOptions]
|
|
1780
|
+
Request-specific configuration.
|
|
1781
|
+
|
|
1782
|
+
Returns
|
|
1783
|
+
-------
|
|
1784
|
+
None
|
|
1785
|
+
|
|
1786
|
+
Examples
|
|
1787
|
+
--------
|
|
1788
|
+
import asyncio
|
|
1789
|
+
|
|
1790
|
+
from brevo import AsyncBrevo
|
|
1791
|
+
|
|
1792
|
+
client = AsyncBrevo(
|
|
1793
|
+
api_key="YOUR_API_KEY",
|
|
1794
|
+
)
|
|
1795
|
+
|
|
1796
|
+
|
|
1797
|
+
async def main() -> None:
|
|
1798
|
+
await client.balance.delete_balance_definition(
|
|
1799
|
+
pid="pid",
|
|
1800
|
+
bdid="bdid",
|
|
1801
|
+
)
|
|
1802
|
+
|
|
1803
|
+
|
|
1804
|
+
asyncio.run(main())
|
|
1805
|
+
"""
|
|
1806
|
+
_response = await self._raw_client.delete_balance_definition(pid, bdid, request_options=request_options)
|
|
1807
|
+
return _response.data
|
|
1808
|
+
|
|
1809
|
+
async def create_balance_limit(
|
|
1810
|
+
self,
|
|
1811
|
+
pid: str,
|
|
1812
|
+
bdid: str,
|
|
1813
|
+
*,
|
|
1814
|
+
constraint_type: CreateBalanceLimitRequestConstraintType,
|
|
1815
|
+
duration_unit: CreateBalanceLimitRequestDurationUnit,
|
|
1816
|
+
duration_value: int,
|
|
1817
|
+
transaction_type: CreateBalanceLimitRequestTransactionType,
|
|
1818
|
+
value: int,
|
|
1819
|
+
sliding_schedule: typing.Optional[bool] = OMIT,
|
|
1820
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1821
|
+
) -> BalanceLimit:
|
|
1822
|
+
"""
|
|
1823
|
+
Creates balance limit and sends the created UUID along with the data
|
|
1824
|
+
|
|
1825
|
+
Parameters
|
|
1826
|
+
----------
|
|
1827
|
+
pid : str
|
|
1828
|
+
Loyalty Program Id
|
|
1829
|
+
|
|
1830
|
+
bdid : str
|
|
1831
|
+
Balance Definition Id
|
|
1832
|
+
|
|
1833
|
+
constraint_type : CreateBalanceLimitRequestConstraintType
|
|
1834
|
+
Defines whether the limit applies to transaction count or amount.
|
|
1835
|
+
|
|
1836
|
+
duration_unit : CreateBalanceLimitRequestDurationUnit
|
|
1837
|
+
Unit of time for which the limit is applicable.
|
|
1838
|
+
|
|
1839
|
+
duration_value : int
|
|
1840
|
+
Number of time units for the balance limit.
|
|
1841
|
+
|
|
1842
|
+
transaction_type : CreateBalanceLimitRequestTransactionType
|
|
1843
|
+
Specifies whether the limit applies to credit or debit transactions.
|
|
1844
|
+
|
|
1845
|
+
value : int
|
|
1846
|
+
Maximum allowed value for the specified constraint type.
|
|
1847
|
+
|
|
1848
|
+
sliding_schedule : typing.Optional[bool]
|
|
1849
|
+
Determines if the limit resets on a rolling schedule.
|
|
1850
|
+
|
|
1851
|
+
request_options : typing.Optional[RequestOptions]
|
|
1852
|
+
Request-specific configuration.
|
|
1853
|
+
|
|
1854
|
+
Returns
|
|
1855
|
+
-------
|
|
1856
|
+
BalanceLimit
|
|
1857
|
+
Successful creation of balance limit
|
|
1858
|
+
|
|
1859
|
+
Examples
|
|
1860
|
+
--------
|
|
1861
|
+
import asyncio
|
|
1862
|
+
|
|
1863
|
+
from brevo import AsyncBrevo
|
|
1864
|
+
|
|
1865
|
+
client = AsyncBrevo(
|
|
1866
|
+
api_key="YOUR_API_KEY",
|
|
1867
|
+
)
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
async def main() -> None:
|
|
1871
|
+
await client.balance.create_balance_limit(
|
|
1872
|
+
pid="pid",
|
|
1873
|
+
bdid="bdid",
|
|
1874
|
+
constraint_type="transaction",
|
|
1875
|
+
duration_unit="day",
|
|
1876
|
+
duration_value=1,
|
|
1877
|
+
transaction_type="credit",
|
|
1878
|
+
value=1,
|
|
1879
|
+
)
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
asyncio.run(main())
|
|
1883
|
+
"""
|
|
1884
|
+
_response = await self._raw_client.create_balance_limit(
|
|
1885
|
+
pid,
|
|
1886
|
+
bdid,
|
|
1887
|
+
constraint_type=constraint_type,
|
|
1888
|
+
duration_unit=duration_unit,
|
|
1889
|
+
duration_value=duration_value,
|
|
1890
|
+
transaction_type=transaction_type,
|
|
1891
|
+
value=value,
|
|
1892
|
+
sliding_schedule=sliding_schedule,
|
|
1893
|
+
request_options=request_options,
|
|
1894
|
+
)
|
|
1895
|
+
return _response.data
|
|
1896
|
+
|
|
1897
|
+
async def get_balance_limit(
|
|
1898
|
+
self,
|
|
1899
|
+
pid: str,
|
|
1900
|
+
bdid: str,
|
|
1901
|
+
blid: str,
|
|
1902
|
+
*,
|
|
1903
|
+
version: typing.Optional[GetBalanceLimitRequestVersion] = None,
|
|
1904
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1905
|
+
) -> BalanceLimit:
|
|
1906
|
+
"""
|
|
1907
|
+
Fetches balance limits and send the created UUID along with the data
|
|
1908
|
+
|
|
1909
|
+
Parameters
|
|
1910
|
+
----------
|
|
1911
|
+
pid : str
|
|
1912
|
+
Loyalty Program Id
|
|
1913
|
+
|
|
1914
|
+
bdid : str
|
|
1915
|
+
Balance Definition Id
|
|
1916
|
+
|
|
1917
|
+
blid : str
|
|
1918
|
+
Balance Limit Id
|
|
1919
|
+
|
|
1920
|
+
version : typing.Optional[GetBalanceLimitRequestVersion]
|
|
1921
|
+
Version
|
|
1922
|
+
|
|
1923
|
+
request_options : typing.Optional[RequestOptions]
|
|
1924
|
+
Request-specific configuration.
|
|
1925
|
+
|
|
1926
|
+
Returns
|
|
1927
|
+
-------
|
|
1928
|
+
BalanceLimit
|
|
1929
|
+
Successful retrieval of balance limit
|
|
1930
|
+
|
|
1931
|
+
Examples
|
|
1932
|
+
--------
|
|
1933
|
+
import asyncio
|
|
1934
|
+
|
|
1935
|
+
from brevo import AsyncBrevo
|
|
1936
|
+
|
|
1937
|
+
client = AsyncBrevo(
|
|
1938
|
+
api_key="YOUR_API_KEY",
|
|
1939
|
+
)
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
async def main() -> None:
|
|
1943
|
+
await client.balance.get_balance_limit(
|
|
1944
|
+
pid="pid",
|
|
1945
|
+
bdid="bdid",
|
|
1946
|
+
blid="blid",
|
|
1947
|
+
)
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
asyncio.run(main())
|
|
1951
|
+
"""
|
|
1952
|
+
_response = await self._raw_client.get_balance_limit(
|
|
1953
|
+
pid, bdid, blid, version=version, request_options=request_options
|
|
1954
|
+
)
|
|
1955
|
+
return _response.data
|
|
1956
|
+
|
|
1957
|
+
async def update_balance_limit(
|
|
1958
|
+
self,
|
|
1959
|
+
pid: str,
|
|
1960
|
+
bdid: str,
|
|
1961
|
+
blid: str,
|
|
1962
|
+
*,
|
|
1963
|
+
constraint_type: UpdateBalanceLimitRequestConstraintType,
|
|
1964
|
+
duration_unit: UpdateBalanceLimitRequestDurationUnit,
|
|
1965
|
+
duration_value: int,
|
|
1966
|
+
transaction_type: UpdateBalanceLimitRequestTransactionType,
|
|
1967
|
+
value: int,
|
|
1968
|
+
sliding_schedule: typing.Optional[bool] = OMIT,
|
|
1969
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1970
|
+
) -> BalanceLimit:
|
|
1971
|
+
"""
|
|
1972
|
+
Updates balance limit
|
|
1973
|
+
|
|
1974
|
+
Parameters
|
|
1975
|
+
----------
|
|
1976
|
+
pid : str
|
|
1977
|
+
Loyalty Program Id
|
|
1978
|
+
|
|
1979
|
+
bdid : str
|
|
1980
|
+
Balance Definition Id
|
|
1981
|
+
|
|
1982
|
+
blid : str
|
|
1983
|
+
Balance Limit Id
|
|
1984
|
+
|
|
1985
|
+
constraint_type : UpdateBalanceLimitRequestConstraintType
|
|
1986
|
+
Defines whether the limit applies to transaction count or amount.
|
|
1987
|
+
|
|
1988
|
+
duration_unit : UpdateBalanceLimitRequestDurationUnit
|
|
1989
|
+
Unit of time for which the limit is applicable.
|
|
1990
|
+
|
|
1991
|
+
duration_value : int
|
|
1992
|
+
Number of time units for the balance limit.
|
|
1993
|
+
|
|
1994
|
+
transaction_type : UpdateBalanceLimitRequestTransactionType
|
|
1995
|
+
Specifies whether the limit applies to credit or debit transactions.
|
|
1996
|
+
|
|
1997
|
+
value : int
|
|
1998
|
+
Maximum allowed value for the specified constraint type.
|
|
1999
|
+
|
|
2000
|
+
sliding_schedule : typing.Optional[bool]
|
|
2001
|
+
Determines if the limit resets on a rolling schedule.
|
|
2002
|
+
|
|
2003
|
+
request_options : typing.Optional[RequestOptions]
|
|
2004
|
+
Request-specific configuration.
|
|
2005
|
+
|
|
2006
|
+
Returns
|
|
2007
|
+
-------
|
|
2008
|
+
BalanceLimit
|
|
2009
|
+
Successful update of balance limit
|
|
2010
|
+
|
|
2011
|
+
Examples
|
|
2012
|
+
--------
|
|
2013
|
+
import asyncio
|
|
2014
|
+
|
|
2015
|
+
from brevo import AsyncBrevo
|
|
2016
|
+
|
|
2017
|
+
client = AsyncBrevo(
|
|
2018
|
+
api_key="YOUR_API_KEY",
|
|
2019
|
+
)
|
|
2020
|
+
|
|
2021
|
+
|
|
2022
|
+
async def main() -> None:
|
|
2023
|
+
await client.balance.update_balance_limit(
|
|
2024
|
+
pid="pid",
|
|
2025
|
+
bdid="bdid",
|
|
2026
|
+
blid="blid",
|
|
2027
|
+
constraint_type="transaction",
|
|
2028
|
+
duration_unit="day",
|
|
2029
|
+
duration_value=1,
|
|
2030
|
+
transaction_type="credit",
|
|
2031
|
+
value=1,
|
|
2032
|
+
)
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
asyncio.run(main())
|
|
2036
|
+
"""
|
|
2037
|
+
_response = await self._raw_client.update_balance_limit(
|
|
2038
|
+
pid,
|
|
2039
|
+
bdid,
|
|
2040
|
+
blid,
|
|
2041
|
+
constraint_type=constraint_type,
|
|
2042
|
+
duration_unit=duration_unit,
|
|
2043
|
+
duration_value=duration_value,
|
|
2044
|
+
transaction_type=transaction_type,
|
|
2045
|
+
value=value,
|
|
2046
|
+
sliding_schedule=sliding_schedule,
|
|
2047
|
+
request_options=request_options,
|
|
2048
|
+
)
|
|
2049
|
+
return _response.data
|
|
2050
|
+
|
|
2051
|
+
async def delete_balance_limit(
|
|
2052
|
+
self, pid: str, bdid: str, blid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2053
|
+
) -> None:
|
|
2054
|
+
"""
|
|
2055
|
+
Delete balance limit
|
|
2056
|
+
|
|
2057
|
+
Parameters
|
|
2058
|
+
----------
|
|
2059
|
+
pid : str
|
|
2060
|
+
Loyalty Program Id
|
|
2061
|
+
|
|
2062
|
+
bdid : str
|
|
2063
|
+
Balance Definition Id
|
|
2064
|
+
|
|
2065
|
+
blid : str
|
|
2066
|
+
Balance Limit Id
|
|
2067
|
+
|
|
2068
|
+
request_options : typing.Optional[RequestOptions]
|
|
2069
|
+
Request-specific configuration.
|
|
2070
|
+
|
|
2071
|
+
Returns
|
|
2072
|
+
-------
|
|
2073
|
+
None
|
|
2074
|
+
|
|
2075
|
+
Examples
|
|
2076
|
+
--------
|
|
2077
|
+
import asyncio
|
|
2078
|
+
|
|
2079
|
+
from brevo import AsyncBrevo
|
|
2080
|
+
|
|
2081
|
+
client = AsyncBrevo(
|
|
2082
|
+
api_key="YOUR_API_KEY",
|
|
2083
|
+
)
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
async def main() -> None:
|
|
2087
|
+
await client.balance.delete_balance_limit(
|
|
2088
|
+
pid="pid",
|
|
2089
|
+
bdid="bdid",
|
|
2090
|
+
blid="blid",
|
|
2091
|
+
)
|
|
2092
|
+
|
|
2093
|
+
|
|
2094
|
+
asyncio.run(main())
|
|
2095
|
+
"""
|
|
2096
|
+
_response = await self._raw_client.delete_balance_limit(pid, bdid, blid, request_options=request_options)
|
|
2097
|
+
return _response.data
|
|
2098
|
+
|
|
2099
|
+
async def get_contact_balances(
|
|
2100
|
+
self, pid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2101
|
+
) -> GetContactBalancesResponse:
|
|
2102
|
+
"""
|
|
2103
|
+
Returns balance list
|
|
2104
|
+
|
|
2105
|
+
Parameters
|
|
2106
|
+
----------
|
|
2107
|
+
pid : str
|
|
2108
|
+
Loyalty Program Id
|
|
2109
|
+
|
|
2110
|
+
request_options : typing.Optional[RequestOptions]
|
|
2111
|
+
Request-specific configuration.
|
|
2112
|
+
|
|
2113
|
+
Returns
|
|
2114
|
+
-------
|
|
2115
|
+
GetContactBalancesResponse
|
|
2116
|
+
Successful retrieval of contact balance
|
|
2117
|
+
|
|
2118
|
+
Examples
|
|
2119
|
+
--------
|
|
2120
|
+
import asyncio
|
|
2121
|
+
|
|
2122
|
+
from brevo import AsyncBrevo
|
|
2123
|
+
|
|
2124
|
+
client = AsyncBrevo(
|
|
2125
|
+
api_key="YOUR_API_KEY",
|
|
2126
|
+
)
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
async def main() -> None:
|
|
2130
|
+
await client.balance.get_contact_balances(
|
|
2131
|
+
pid="pid",
|
|
2132
|
+
)
|
|
2133
|
+
|
|
2134
|
+
|
|
2135
|
+
asyncio.run(main())
|
|
2136
|
+
"""
|
|
2137
|
+
_response = await self._raw_client.get_contact_balances(pid, request_options=request_options)
|
|
2138
|
+
return _response.data
|
|
2139
|
+
|
|
2140
|
+
async def create_balance_order(
|
|
2141
|
+
self,
|
|
2142
|
+
pid: str,
|
|
2143
|
+
*,
|
|
2144
|
+
amount: float,
|
|
2145
|
+
balance_definition_id: str,
|
|
2146
|
+
contact_id: int,
|
|
2147
|
+
due_at: str,
|
|
2148
|
+
source: str,
|
|
2149
|
+
expires_at: typing.Optional[str] = OMIT,
|
|
2150
|
+
meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
2151
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2152
|
+
) -> CreateBalanceOrderResponse:
|
|
2153
|
+
"""
|
|
2154
|
+
Returns created order
|
|
2155
|
+
|
|
2156
|
+
Parameters
|
|
2157
|
+
----------
|
|
2158
|
+
pid : str
|
|
2159
|
+
Loyalty Program Id
|
|
2160
|
+
|
|
2161
|
+
amount : float
|
|
2162
|
+
Order amount (must be non-zero).
|
|
2163
|
+
|
|
2164
|
+
balance_definition_id : str
|
|
2165
|
+
Unique identifier (UUID) of the associated balance definition.
|
|
2166
|
+
|
|
2167
|
+
contact_id : int
|
|
2168
|
+
Unique identifier of the contact placing the order (must be ≥ 1).
|
|
2169
|
+
|
|
2170
|
+
due_at : str
|
|
2171
|
+
RFC3339 timestamp specifying when the order is due.
|
|
2172
|
+
|
|
2173
|
+
source : str
|
|
2174
|
+
Specifies the origin of the order (`engine` or `user`).
|
|
2175
|
+
|
|
2176
|
+
expires_at : typing.Optional[str]
|
|
2177
|
+
Optional RFC3339 timestamp defining order expiration.
|
|
2178
|
+
|
|
2179
|
+
meta : typing.Optional[typing.Dict[str, typing.Any]]
|
|
2180
|
+
Optional metadata associated with the order.
|
|
2181
|
+
|
|
2182
|
+
request_options : typing.Optional[RequestOptions]
|
|
2183
|
+
Request-specific configuration.
|
|
2184
|
+
|
|
2185
|
+
Returns
|
|
2186
|
+
-------
|
|
2187
|
+
CreateBalanceOrderResponse
|
|
2188
|
+
Successful creation of order
|
|
2189
|
+
|
|
2190
|
+
Examples
|
|
2191
|
+
--------
|
|
2192
|
+
import asyncio
|
|
2193
|
+
|
|
2194
|
+
from brevo import AsyncBrevo
|
|
2195
|
+
|
|
2196
|
+
client = AsyncBrevo(
|
|
2197
|
+
api_key="YOUR_API_KEY",
|
|
2198
|
+
)
|
|
2199
|
+
|
|
2200
|
+
|
|
2201
|
+
async def main() -> None:
|
|
2202
|
+
await client.balance.create_balance_order(
|
|
2203
|
+
pid="pid",
|
|
2204
|
+
amount=1.1,
|
|
2205
|
+
balance_definition_id="balanceDefinitionId",
|
|
2206
|
+
contact_id=1,
|
|
2207
|
+
due_at="dueAt",
|
|
2208
|
+
source="source",
|
|
2209
|
+
)
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
asyncio.run(main())
|
|
2213
|
+
"""
|
|
2214
|
+
_response = await self._raw_client.create_balance_order(
|
|
2215
|
+
pid,
|
|
2216
|
+
amount=amount,
|
|
2217
|
+
balance_definition_id=balance_definition_id,
|
|
2218
|
+
contact_id=contact_id,
|
|
2219
|
+
due_at=due_at,
|
|
2220
|
+
source=source,
|
|
2221
|
+
expires_at=expires_at,
|
|
2222
|
+
meta=meta,
|
|
2223
|
+
request_options=request_options,
|
|
2224
|
+
)
|
|
2225
|
+
return _response.data
|
|
2226
|
+
|
|
2227
|
+
async def get_subscription_balances(
|
|
2228
|
+
self, pid: str, cid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2229
|
+
) -> GetSubscriptionBalancesResponse:
|
|
2230
|
+
"""
|
|
2231
|
+
Returns subscription balances
|
|
2232
|
+
|
|
2233
|
+
Parameters
|
|
2234
|
+
----------
|
|
2235
|
+
pid : str
|
|
2236
|
+
Loyalty Program Id
|
|
2237
|
+
|
|
2238
|
+
cid : str
|
|
2239
|
+
Contact Id
|
|
2240
|
+
|
|
2241
|
+
request_options : typing.Optional[RequestOptions]
|
|
2242
|
+
Request-specific configuration.
|
|
2243
|
+
|
|
2244
|
+
Returns
|
|
2245
|
+
-------
|
|
2246
|
+
GetSubscriptionBalancesResponse
|
|
2247
|
+
Successful retrieval of contact balance
|
|
2248
|
+
|
|
2249
|
+
Examples
|
|
2250
|
+
--------
|
|
2251
|
+
import asyncio
|
|
2252
|
+
|
|
2253
|
+
from brevo import AsyncBrevo
|
|
2254
|
+
|
|
2255
|
+
client = AsyncBrevo(
|
|
2256
|
+
api_key="YOUR_API_KEY",
|
|
2257
|
+
)
|
|
2258
|
+
|
|
2259
|
+
|
|
2260
|
+
async def main() -> None:
|
|
2261
|
+
await client.balance.get_subscription_balances(
|
|
2262
|
+
pid="pid",
|
|
2263
|
+
cid="cid",
|
|
2264
|
+
)
|
|
2265
|
+
|
|
2266
|
+
|
|
2267
|
+
asyncio.run(main())
|
|
2268
|
+
"""
|
|
2269
|
+
_response = await self._raw_client.get_subscription_balances(pid, cid, request_options=request_options)
|
|
2270
|
+
return _response.data
|
|
2271
|
+
|
|
2272
|
+
async def create_subscription_balances(
|
|
2273
|
+
self, pid: str, cid: str, *, balance_definition_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
2274
|
+
) -> PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse:
|
|
2275
|
+
"""
|
|
2276
|
+
Creates a balance for a contact
|
|
2277
|
+
|
|
2278
|
+
Parameters
|
|
2279
|
+
----------
|
|
2280
|
+
pid : str
|
|
2281
|
+
Loyalty Program Id
|
|
2282
|
+
|
|
2283
|
+
cid : str
|
|
2284
|
+
Contact Id
|
|
2285
|
+
|
|
2286
|
+
balance_definition_id : str
|
|
2287
|
+
Unique identifier (UUID) of the balance definition associated with the new balance.
|
|
2288
|
+
|
|
2289
|
+
request_options : typing.Optional[RequestOptions]
|
|
2290
|
+
Request-specific configuration.
|
|
2291
|
+
|
|
2292
|
+
Returns
|
|
2293
|
+
-------
|
|
2294
|
+
PostLoyaltyBalanceProgramsPidSubscriptionsCidBalancesResponse
|
|
2295
|
+
Successful creation of balance
|
|
2296
|
+
|
|
2297
|
+
Examples
|
|
2298
|
+
--------
|
|
2299
|
+
import asyncio
|
|
2300
|
+
|
|
2301
|
+
from brevo import AsyncBrevo
|
|
2302
|
+
|
|
2303
|
+
client = AsyncBrevo(
|
|
2304
|
+
api_key="YOUR_API_KEY",
|
|
2305
|
+
)
|
|
2306
|
+
|
|
2307
|
+
|
|
2308
|
+
async def main() -> None:
|
|
2309
|
+
await client.balance.create_subscription_balances(
|
|
2310
|
+
pid="pid",
|
|
2311
|
+
cid="cid",
|
|
2312
|
+
balance_definition_id="balanceDefinitionId",
|
|
2313
|
+
)
|
|
2314
|
+
|
|
2315
|
+
|
|
2316
|
+
asyncio.run(main())
|
|
2317
|
+
"""
|
|
2318
|
+
_response = await self._raw_client.create_subscription_balances(
|
|
2319
|
+
pid, cid, balance_definition_id=balance_definition_id, request_options=request_options
|
|
2320
|
+
)
|
|
2321
|
+
return _response.data
|
|
2322
|
+
|
|
2323
|
+
async def get_transaction_history_api(
|
|
2324
|
+
self,
|
|
2325
|
+
pid: str,
|
|
2326
|
+
*,
|
|
2327
|
+
contact_id: int,
|
|
2328
|
+
balance_definition_id: str,
|
|
2329
|
+
limit: typing.Optional[int] = None,
|
|
2330
|
+
offset: typing.Optional[int] = None,
|
|
2331
|
+
sort_field: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField] = None,
|
|
2332
|
+
sort: typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort] = None,
|
|
2333
|
+
filters: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
2334
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2335
|
+
) -> GetLoyaltyBalanceProgramsPidTransactionHistoryResponse:
|
|
2336
|
+
"""
|
|
2337
|
+
Returns transaction history
|
|
2338
|
+
|
|
2339
|
+
Parameters
|
|
2340
|
+
----------
|
|
2341
|
+
pid : str
|
|
2342
|
+
Loyalty Program Id
|
|
2343
|
+
|
|
2344
|
+
contact_id : int
|
|
2345
|
+
Contact ID
|
|
2346
|
+
|
|
2347
|
+
balance_definition_id : str
|
|
2348
|
+
Balance Definition ID
|
|
2349
|
+
|
|
2350
|
+
limit : typing.Optional[int]
|
|
2351
|
+
Limit the number of records returned
|
|
2352
|
+
|
|
2353
|
+
offset : typing.Optional[int]
|
|
2354
|
+
Skip a number of records
|
|
2355
|
+
|
|
2356
|
+
sort_field : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSortField]
|
|
2357
|
+
Field to sort by
|
|
2358
|
+
|
|
2359
|
+
sort : typing.Optional[GetLoyaltyBalanceProgramsPidTransactionHistoryRequestSort]
|
|
2360
|
+
Sort order, either asc or desc
|
|
2361
|
+
|
|
2362
|
+
filters : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
2363
|
+
Filters to apply
|
|
2364
|
+
|
|
2365
|
+
request_options : typing.Optional[RequestOptions]
|
|
2366
|
+
Request-specific configuration.
|
|
2367
|
+
|
|
2368
|
+
Returns
|
|
2369
|
+
-------
|
|
2370
|
+
GetLoyaltyBalanceProgramsPidTransactionHistoryResponse
|
|
2371
|
+
Successful retrieval of transaction history
|
|
2372
|
+
|
|
2373
|
+
Examples
|
|
2374
|
+
--------
|
|
2375
|
+
import asyncio
|
|
2376
|
+
|
|
2377
|
+
from brevo import AsyncBrevo
|
|
2378
|
+
|
|
2379
|
+
client = AsyncBrevo(
|
|
2380
|
+
api_key="YOUR_API_KEY",
|
|
2381
|
+
)
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
async def main() -> None:
|
|
2385
|
+
await client.balance.get_transaction_history_api(
|
|
2386
|
+
pid="pid",
|
|
2387
|
+
contact_id=1,
|
|
2388
|
+
balance_definition_id="balance_definition_id",
|
|
2389
|
+
)
|
|
2390
|
+
|
|
2391
|
+
|
|
2392
|
+
asyncio.run(main())
|
|
2393
|
+
"""
|
|
2394
|
+
_response = await self._raw_client.get_transaction_history_api(
|
|
2395
|
+
pid,
|
|
2396
|
+
contact_id=contact_id,
|
|
2397
|
+
balance_definition_id=balance_definition_id,
|
|
2398
|
+
limit=limit,
|
|
2399
|
+
offset=offset,
|
|
2400
|
+
sort_field=sort_field,
|
|
2401
|
+
sort=sort,
|
|
2402
|
+
filters=filters,
|
|
2403
|
+
request_options=request_options,
|
|
2404
|
+
)
|
|
2405
|
+
return _response.data
|
|
2406
|
+
|
|
2407
|
+
async def begin_transaction(
|
|
2408
|
+
self,
|
|
2409
|
+
pid: str,
|
|
2410
|
+
*,
|
|
2411
|
+
amount: float,
|
|
2412
|
+
balance_definition_id: str,
|
|
2413
|
+
loyalty_subscription_id: typing.Optional[str] = OMIT,
|
|
2414
|
+
auto_complete: typing.Optional[bool] = OMIT,
|
|
2415
|
+
balance_expiry_in_minutes: typing.Optional[int] = OMIT,
|
|
2416
|
+
contact_id: typing.Optional[int] = OMIT,
|
|
2417
|
+
event_time: typing.Optional[str] = OMIT,
|
|
2418
|
+
meta: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
2419
|
+
ttl: typing.Optional[int] = OMIT,
|
|
2420
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2421
|
+
) -> Transaction:
|
|
2422
|
+
"""
|
|
2423
|
+
Creates new transaction and returns information
|
|
2424
|
+
|
|
2425
|
+
Parameters
|
|
2426
|
+
----------
|
|
2427
|
+
pid : str
|
|
2428
|
+
Loyalty Program Id
|
|
2429
|
+
|
|
2430
|
+
amount : float
|
|
2431
|
+
Transaction amount (must be provided).
|
|
2432
|
+
|
|
2433
|
+
balance_definition_id : str
|
|
2434
|
+
Unique identifier (UUID) of the associated balance definition.
|
|
2435
|
+
|
|
2436
|
+
loyalty_subscription_id : typing.Optional[str]
|
|
2437
|
+
Unique identifier for the loyalty subscription (required unless `contactId` is provided).
|
|
2438
|
+
|
|
2439
|
+
auto_complete : typing.Optional[bool]
|
|
2440
|
+
Whether the transaction should be automatically completed.
|
|
2441
|
+
|
|
2442
|
+
balance_expiry_in_minutes : typing.Optional[int]
|
|
2443
|
+
Optional expiry time for the balance in minutes (must be greater than 0 if provided).
|
|
2444
|
+
|
|
2445
|
+
contact_id : typing.Optional[int]
|
|
2446
|
+
Unique identifier of the contact involved in the transaction (required unless `LoyaltySubscriptionId` is provided).
|
|
2447
|
+
|
|
2448
|
+
event_time : typing.Optional[str]
|
|
2449
|
+
Optional timestamp specifying when the transaction occurred.
|
|
2450
|
+
|
|
2451
|
+
meta : typing.Optional[typing.Dict[str, typing.Any]]
|
|
2452
|
+
Optional metadata associated with the transaction.
|
|
2453
|
+
|
|
2454
|
+
ttl : typing.Optional[int]
|
|
2455
|
+
Optional time-to-live for the transaction (must be greater than 0 if provided).
|
|
2456
|
+
|
|
2457
|
+
request_options : typing.Optional[RequestOptions]
|
|
2458
|
+
Request-specific configuration.
|
|
2459
|
+
|
|
2460
|
+
Returns
|
|
2461
|
+
-------
|
|
2462
|
+
Transaction
|
|
2463
|
+
Transaction information
|
|
2464
|
+
|
|
2465
|
+
Examples
|
|
2466
|
+
--------
|
|
2467
|
+
import asyncio
|
|
2468
|
+
|
|
2469
|
+
from brevo import AsyncBrevo
|
|
2470
|
+
|
|
2471
|
+
client = AsyncBrevo(
|
|
2472
|
+
api_key="YOUR_API_KEY",
|
|
2473
|
+
)
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
async def main() -> None:
|
|
2477
|
+
await client.balance.begin_transaction(
|
|
2478
|
+
pid="pid",
|
|
2479
|
+
amount=1.1,
|
|
2480
|
+
balance_definition_id="balanceDefinitionId",
|
|
2481
|
+
)
|
|
2482
|
+
|
|
2483
|
+
|
|
2484
|
+
asyncio.run(main())
|
|
2485
|
+
"""
|
|
2486
|
+
_response = await self._raw_client.begin_transaction(
|
|
2487
|
+
pid,
|
|
2488
|
+
amount=amount,
|
|
2489
|
+
balance_definition_id=balance_definition_id,
|
|
2490
|
+
loyalty_subscription_id=loyalty_subscription_id,
|
|
2491
|
+
auto_complete=auto_complete,
|
|
2492
|
+
balance_expiry_in_minutes=balance_expiry_in_minutes,
|
|
2493
|
+
contact_id=contact_id,
|
|
2494
|
+
event_time=event_time,
|
|
2495
|
+
meta=meta,
|
|
2496
|
+
ttl=ttl,
|
|
2497
|
+
request_options=request_options,
|
|
2498
|
+
)
|
|
2499
|
+
return _response.data
|
|
2500
|
+
|
|
2501
|
+
async def cancel_transaction(
|
|
2502
|
+
self, pid: str, tid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2503
|
+
) -> Transaction:
|
|
2504
|
+
"""
|
|
2505
|
+
Cancels transaction
|
|
2506
|
+
|
|
2507
|
+
Parameters
|
|
2508
|
+
----------
|
|
2509
|
+
pid : str
|
|
2510
|
+
Loyalty Program Id
|
|
2511
|
+
|
|
2512
|
+
tid : str
|
|
2513
|
+
Transaction Id
|
|
2514
|
+
|
|
2515
|
+
request_options : typing.Optional[RequestOptions]
|
|
2516
|
+
Request-specific configuration.
|
|
2517
|
+
|
|
2518
|
+
Returns
|
|
2519
|
+
-------
|
|
2520
|
+
Transaction
|
|
2521
|
+
Transaction information
|
|
2522
|
+
|
|
2523
|
+
Examples
|
|
2524
|
+
--------
|
|
2525
|
+
import asyncio
|
|
2526
|
+
|
|
2527
|
+
from brevo import AsyncBrevo
|
|
2528
|
+
|
|
2529
|
+
client = AsyncBrevo(
|
|
2530
|
+
api_key="YOUR_API_KEY",
|
|
2531
|
+
)
|
|
2532
|
+
|
|
2533
|
+
|
|
2534
|
+
async def main() -> None:
|
|
2535
|
+
await client.balance.cancel_transaction(
|
|
2536
|
+
pid="pid",
|
|
2537
|
+
tid="tid",
|
|
2538
|
+
)
|
|
2539
|
+
|
|
2540
|
+
|
|
2541
|
+
asyncio.run(main())
|
|
2542
|
+
"""
|
|
2543
|
+
_response = await self._raw_client.cancel_transaction(pid, tid, request_options=request_options)
|
|
2544
|
+
return _response.data
|
|
2545
|
+
|
|
2546
|
+
async def complete_transaction(
|
|
2547
|
+
self, pid: str, tid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2548
|
+
) -> Transaction:
|
|
2549
|
+
"""
|
|
2550
|
+
Completes transaction
|
|
2551
|
+
|
|
2552
|
+
Parameters
|
|
2553
|
+
----------
|
|
2554
|
+
pid : str
|
|
2555
|
+
Loyalty Program Id
|
|
2556
|
+
|
|
2557
|
+
tid : str
|
|
2558
|
+
Transaction Id
|
|
2559
|
+
|
|
2560
|
+
request_options : typing.Optional[RequestOptions]
|
|
2561
|
+
Request-specific configuration.
|
|
2562
|
+
|
|
2563
|
+
Returns
|
|
2564
|
+
-------
|
|
2565
|
+
Transaction
|
|
2566
|
+
Transaction information
|
|
2567
|
+
|
|
2568
|
+
Examples
|
|
2569
|
+
--------
|
|
2570
|
+
import asyncio
|
|
2571
|
+
|
|
2572
|
+
from brevo import AsyncBrevo
|
|
2573
|
+
|
|
2574
|
+
client = AsyncBrevo(
|
|
2575
|
+
api_key="YOUR_API_KEY",
|
|
2576
|
+
)
|
|
2577
|
+
|
|
2578
|
+
|
|
2579
|
+
async def main() -> None:
|
|
2580
|
+
await client.balance.complete_transaction(
|
|
2581
|
+
pid="pid",
|
|
2582
|
+
tid="tid",
|
|
2583
|
+
)
|
|
2584
|
+
|
|
2585
|
+
|
|
2586
|
+
asyncio.run(main())
|
|
2587
|
+
"""
|
|
2588
|
+
_response = await self._raw_client.complete_transaction(pid, tid, request_options=request_options)
|
|
2589
|
+
return _response.data
|