├── CHANGELOG.md ├── LICENSE ├── README.md ├── pyproject.toml ├── requirements.txt ├── setup.cfg └── src ├── klaviyo_api ├── __init__.py ├── custom_retry.py ├── filter_builder.py └── wrapper.py └── openapi_client ├── __init__.py ├── api ├── __init__.py ├── accounts_api.py ├── campaigns_api.py ├── catalogs_api.py ├── coupons_api.py ├── data_privacy_api.py ├── events_api.py ├── flows_api.py ├── forms_api.py ├── images_api.py ├── lists_api.py ├── metrics_api.py ├── profiles_api.py ├── reporting_api.py ├── reviews_api.py ├── segments_api.py ├── tags_api.py ├── templates_api.py ├── tracking_settings_api.py ├── web_feeds_api.py └── webhooks_api.py ├── api_arg_options.py ├── api_client.py ├── api_response.py ├── configuration.py ├── exceptions.py ├── models ├── __init__.py ├── account_enum.py ├── account_response_object_resource.py ├── account_response_object_resource_attributes.py ├── api_job_error_payload.py ├── attribution_enum.py ├── audiences.py ├── audiences_update.py ├── back_in_stock_subscription_enum.py ├── base_event_create_query_bulk_entry_resource_object.py ├── base_event_create_query_bulk_entry_resource_object_attributes.py ├── bulk_profile_suppressions_create_job_response_object_resource.py ├── bulk_profile_suppressions_create_job_response_object_resource_attributes.py ├── bulk_profile_suppressions_remove_job_response_object_resource.py ├── campaign_clone_query.py ├── campaign_clone_query_resource_object.py ├── campaign_clone_query_resource_object_attributes.py ├── campaign_create_query.py ├── campaign_create_query_resource_object.py ├── campaign_create_query_resource_object_attributes.py ├── campaign_create_query_resource_object_attributes_campaign_messages.py ├── campaign_enum.py ├── campaign_message_assign_template_query.py ├── campaign_message_assign_template_query_resource_object.py ├── campaign_message_assign_template_query_resource_object_relationships.py ├── campaign_message_assign_template_query_resource_object_relationships_template.py ├── campaign_message_assign_template_query_resource_object_relationships_template_data.py ├── campaign_message_create_query_resource_object.py ├── campaign_message_create_query_resource_object_attributes.py ├── campaign_message_create_query_resource_object_relationships.py ├── campaign_message_create_query_resource_object_relationships_image.py ├── campaign_message_create_query_resource_object_relationships_image_data.py ├── campaign_message_enum.py ├── campaign_message_image_update_query.py ├── campaign_message_image_update_query_data.py ├── campaign_message_partial_update_query.py ├── campaign_message_partial_update_query_resource_object.py ├── campaign_message_partial_update_query_resource_object_attributes.py ├── campaign_message_response_object_resource.py ├── campaign_message_response_object_resource_attributes.py ├── campaign_partial_update_query.py ├── campaign_partial_update_query_resource_object.py ├── campaign_partial_update_query_resource_object_attributes.py ├── campaign_recipient_estimation_enum.py ├── campaign_recipient_estimation_job_create_query.py ├── campaign_recipient_estimation_job_create_query_resource_object.py ├── campaign_recipient_estimation_job_enum.py ├── campaign_recipient_estimation_job_response_object_resource.py ├── campaign_recipient_estimation_job_response_object_resource_attributes.py ├── campaign_recipient_estimation_response_object_resource.py ├── campaign_recipient_estimation_response_object_resource_attributes.py ├── campaign_response_object_resource.py ├── campaign_response_object_resource_attributes.py ├── campaign_send_job_create_query.py ├── campaign_send_job_create_query_resource_object.py ├── campaign_send_job_enum.py ├── campaign_send_job_partial_update_query.py ├── campaign_send_job_partial_update_query_resource_object.py ├── campaign_send_job_partial_update_query_resource_object_attributes.py ├── campaign_send_job_response_object_resource.py ├── campaign_send_job_response_object_resource_attributes.py ├── campaign_values_report_enum.py ├── campaign_values_request_dto.py ├── campaign_values_request_dto_resource_object.py ├── campaign_values_request_dto_resource_object_attributes.py ├── catalog_category_bulk_create_job_enum.py ├── catalog_category_bulk_delete_job_enum.py ├── catalog_category_bulk_update_job_enum.py ├── catalog_category_create_job_create_query.py ├── catalog_category_create_job_create_query_resource_object.py ├── catalog_category_create_job_create_query_resource_object_attributes.py ├── catalog_category_create_job_create_query_resource_object_attributes_categories.py ├── catalog_category_create_job_response_object_resource.py ├── catalog_category_create_query.py ├── catalog_category_create_query_resource_object.py ├── catalog_category_create_query_resource_object_attributes.py ├── catalog_category_create_query_resource_object_relationships.py ├── catalog_category_create_query_resource_object_relationships_items.py ├── catalog_category_delete_job_create_query.py ├── catalog_category_delete_job_create_query_resource_object.py ├── catalog_category_delete_job_create_query_resource_object_attributes.py ├── catalog_category_delete_job_create_query_resource_object_attributes_categories.py ├── catalog_category_delete_job_response_object_resource.py ├── catalog_category_delete_query_resource_object.py ├── catalog_category_enum.py ├── catalog_category_item_op.py ├── catalog_category_item_op_data_inner.py ├── catalog_category_response_object_resource.py ├── catalog_category_response_object_resource_attributes.py ├── catalog_category_update_job_create_query.py ├── catalog_category_update_job_create_query_resource_object.py ├── catalog_category_update_job_create_query_resource_object_attributes.py ├── catalog_category_update_job_create_query_resource_object_attributes_categories.py ├── catalog_category_update_job_response_object_resource.py ├── catalog_category_update_query.py ├── catalog_category_update_query_resource_object.py ├── catalog_category_update_query_resource_object_attributes.py ├── catalog_item_bulk_create_job_enum.py ├── catalog_item_bulk_delete_job_enum.py ├── catalog_item_bulk_update_job_enum.py ├── catalog_item_category_op.py ├── catalog_item_create_job_create_query.py ├── catalog_item_create_job_create_query_resource_object.py ├── catalog_item_create_job_create_query_resource_object_attributes.py ├── catalog_item_create_job_create_query_resource_object_attributes_items.py ├── catalog_item_create_job_response_object_resource.py ├── catalog_item_create_query.py ├── catalog_item_create_query_resource_object.py ├── catalog_item_create_query_resource_object_attributes.py ├── catalog_item_create_query_resource_object_relationships.py ├── catalog_item_create_query_resource_object_relationships_categories.py ├── catalog_item_create_query_resource_object_relationships_categories_data_inner.py ├── catalog_item_delete_job_create_query.py ├── catalog_item_delete_job_create_query_resource_object.py ├── catalog_item_delete_job_create_query_resource_object_attributes.py ├── catalog_item_delete_job_create_query_resource_object_attributes_items.py ├── catalog_item_delete_job_response_object_resource.py ├── catalog_item_delete_query_resource_object.py ├── catalog_item_enum.py ├── catalog_item_response_object_resource.py ├── catalog_item_response_object_resource_attributes.py ├── catalog_item_update_job_create_query.py ├── catalog_item_update_job_create_query_resource_object.py ├── catalog_item_update_job_create_query_resource_object_attributes.py ├── catalog_item_update_job_create_query_resource_object_attributes_items.py ├── catalog_item_update_job_response_object_resource.py ├── catalog_item_update_query.py ├── catalog_item_update_query_resource_object.py ├── catalog_item_update_query_resource_object_attributes.py ├── catalog_variant_bulk_create_job_enum.py ├── catalog_variant_bulk_delete_job_enum.py ├── catalog_variant_bulk_update_job_enum.py ├── catalog_variant_create_job_create_query.py ├── catalog_variant_create_job_create_query_resource_object.py ├── catalog_variant_create_job_create_query_resource_object_attributes.py ├── catalog_variant_create_job_create_query_resource_object_attributes_variants.py ├── catalog_variant_create_job_response_object_resource.py ├── catalog_variant_create_query.py ├── catalog_variant_create_query_resource_object.py ├── catalog_variant_create_query_resource_object_attributes.py ├── catalog_variant_create_query_resource_object_relationships.py ├── catalog_variant_create_query_resource_object_relationships_item.py ├── catalog_variant_create_query_resource_object_relationships_item_data.py ├── catalog_variant_delete_job_create_query.py ├── catalog_variant_delete_job_create_query_resource_object.py ├── catalog_variant_delete_job_create_query_resource_object_attributes.py ├── catalog_variant_delete_job_create_query_resource_object_attributes_variants.py ├── catalog_variant_delete_job_response_object_resource.py ├── catalog_variant_delete_query_resource_object.py ├── catalog_variant_enum.py ├── catalog_variant_response_object_resource.py ├── catalog_variant_response_object_resource_attributes.py ├── catalog_variant_update_job_create_query.py ├── catalog_variant_update_job_create_query_resource_object.py ├── catalog_variant_update_job_create_query_resource_object_attributes.py ├── catalog_variant_update_job_create_query_resource_object_attributes_variants.py ├── catalog_variant_update_job_response_object_resource.py ├── catalog_variant_update_query.py ├── catalog_variant_update_query_resource_object.py ├── catalog_variant_update_query_resource_object_attributes.py ├── collection_links.py ├── condition_group.py ├── contact_information.py ├── coupon_code_bulk_create_job_enum.py ├── coupon_code_create_job_create_query.py ├── coupon_code_create_job_create_query_resource_object.py ├── coupon_code_create_job_create_query_resource_object_attributes.py ├── coupon_code_create_job_create_query_resource_object_attributes_coupon_codes.py ├── coupon_code_create_job_response_object_resource.py ├── coupon_code_create_job_response_object_resource_attributes.py ├── coupon_code_create_query.py ├── coupon_code_create_query_resource_object.py ├── coupon_code_create_query_resource_object_attributes.py ├── coupon_code_create_query_resource_object_relationships.py ├── coupon_code_create_query_resource_object_relationships_coupon.py ├── coupon_code_enum.py ├── coupon_code_response_object_resource.py ├── coupon_code_response_object_resource_attributes.py ├── coupon_code_update_query.py ├── coupon_code_update_query_resource_object.py ├── coupon_code_update_query_resource_object_attributes.py ├── coupon_create_query.py ├── coupon_create_query_resource_object.py ├── coupon_enum.py ├── coupon_response_object_resource.py ├── coupon_response_object_resource_attributes.py ├── coupon_update_query.py ├── coupon_update_query_resource_object.py ├── coupon_update_query_resource_object_attributes.py ├── custom_metric_condition.py ├── custom_metric_create_query.py ├── custom_metric_create_query_resource_object.py ├── custom_metric_create_query_resource_object_attributes.py ├── custom_metric_definition.py ├── custom_metric_enum.py ├── custom_metric_group.py ├── custom_metric_partial_update_query.py ├── custom_metric_partial_update_query_resource_object.py ├── custom_metric_partial_update_query_resource_object_attributes.py ├── custom_metric_response_object_resource.py ├── custom_metric_response_object_resource_attributes.py ├── custom_tracking_param_dto.py ├── data_privacy_create_deletion_job_query.py ├── data_privacy_create_deletion_job_query_resource_object.py ├── data_privacy_create_deletion_job_query_resource_object_attributes.py ├── data_privacy_create_deletion_job_query_resource_object_attributes_profile.py ├── data_privacy_deletion_job_enum.py ├── data_privacy_profile_query_resource_object.py ├── data_privacy_profile_query_resource_object_attributes.py ├── delete_tag_group_response.py ├── device_metadata.py ├── email_channel.py ├── email_marketing.py ├── email_marketing_list_suppression.py ├── email_marketing_suppression.py ├── email_subscription_parameters.py ├── email_unsubscription_parameters.py ├── error_source.py ├── event_bulk_create_enum.py ├── event_bulk_create_job_enum.py ├── event_create_query_v2.py ├── event_create_query_v2_resource_object.py ├── event_create_query_v2_resource_object_attributes.py ├── event_create_query_v2_resource_object_attributes_metric.py ├── event_create_query_v2_resource_object_attributes_profile.py ├── event_enum.py ├── event_profile_create_query_resource_object.py ├── event_profile_create_query_resource_object_attributes.py ├── event_response_object_resource.py ├── event_response_object_resource_attributes.py ├── events_bulk_create_job.py ├── events_bulk_create_job_resource_object.py ├── events_bulk_create_job_resource_object_attributes.py ├── events_bulk_create_job_resource_object_attributes_events_bulk_create.py ├── events_bulk_create_query_resource_object.py ├── events_bulk_create_query_resource_object_attributes.py ├── events_bulk_create_query_resource_object_attributes_events.py ├── events_bulk_create_query_resource_object_attributes_profile.py ├── flow_action_enum.py ├── flow_action_response_object_resource.py ├── flow_action_response_object_resource_attributes.py ├── flow_create_query.py ├── flow_create_query_resource_object.py ├── flow_create_query_resource_object_attributes.py ├── flow_definition.py ├── flow_definition_profile_filter.py ├── flow_definition_profile_filter_condition_groups_inner.py ├── flow_enum.py ├── flow_message_enum.py ├── flow_message_response_object_resource.py ├── flow_message_response_object_resource_attributes.py ├── flow_response_object_resource.py ├── flow_response_object_resource_attributes.py ├── flow_series_report_enum.py ├── flow_series_request_dto.py ├── flow_series_request_dto_resource_object.py ├── flow_series_request_dto_resource_object_attributes.py ├── flow_update_query.py ├── flow_update_query_resource_object.py ├── flow_update_query_resource_object_attributes.py ├── flow_v2_response_object_resource_attributes.py ├── flow_v2_response_object_resource_extended.py ├── flow_v2_response_object_resource_extended_attributes.py ├── flow_values_report_enum.py ├── flow_values_request_dto.py ├── flow_values_request_dto_resource_object.py ├── flow_values_request_dto_resource_object_attributes.py ├── form_enum.py ├── form_response_object_resource.py ├── form_response_object_resource_attributes.py ├── form_series_report_enum.py ├── form_series_request_dto.py ├── form_series_request_dto_resource_object.py ├── form_series_request_dto_resource_object_attributes.py ├── form_values_report_enum.py ├── form_values_request_dto.py ├── form_values_request_dto_resource_object.py ├── form_values_request_dto_resource_object_attributes.py ├── form_version_ab_test.py ├── form_version_enum.py ├── form_version_response_object_resource.py ├── form_version_response_object_resource_attributes.py ├── get_account_response.py ├── get_account_response_collection.py ├── get_accounts4_xx_response.py ├── get_accounts4_xx_response_errors_inner.py ├── get_accounts4_xx_response_errors_inner_source.py ├── get_bulk_profile_suppressions_create_job_response.py ├── get_bulk_profile_suppressions_create_job_response_collection.py ├── get_bulk_profile_suppressions_create_job_response_collection_data_inner.py ├── get_bulk_profile_suppressions_create_job_response_collection_data_inner_all_of_relationships.py ├── get_bulk_profile_suppressions_remove_job_response.py ├── get_bulk_profile_suppressions_remove_job_response_collection.py ├── get_bulk_profile_suppressions_remove_job_response_collection_data_inner.py ├── get_campaign_message_campaign_relationship_response.py ├── get_campaign_message_campaign_relationship_response_data.py ├── get_campaign_message_image_relationship_response.py ├── get_campaign_message_image_relationship_response_data.py ├── get_campaign_message_response_collection_compound_document.py ├── get_campaign_message_response_compound_document.py ├── get_campaign_message_response_compound_document_data.py ├── get_campaign_message_response_compound_document_data_all_of_relationships.py ├── get_campaign_message_response_compound_document_data_all_of_relationships_campaign.py ├── get_campaign_message_response_compound_document_data_all_of_relationships_campaign_data.py ├── get_campaign_message_response_compound_document_data_all_of_relationships_image.py ├── get_campaign_message_response_compound_document_data_all_of_relationships_image_data.py ├── get_campaign_message_response_compound_document_data_all_of_relationships_template.py ├── get_campaign_message_response_compound_document_data_all_of_relationships_template_data.py ├── get_campaign_message_template_relationship_response.py ├── get_campaign_messages_relationships_response_collection.py ├── get_campaign_messages_relationships_response_collection_data_inner.py ├── get_campaign_recipient_estimation_job_response.py ├── get_campaign_recipient_estimation_response.py ├── get_campaign_response.py ├── get_campaign_response_collection_compound_document.py ├── get_campaign_response_collection_compound_document_data_inner.py ├── get_campaign_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_campaign_response_collection_compound_document_data_inner_all_of_relationships_campaign_messages.py ├── get_campaign_response_collection_compound_document_data_inner_all_of_relationships_campaign_messages_data_inner.py ├── get_campaign_response_compound_document.py ├── get_campaign_response_data.py ├── get_campaign_response_data_all_of_relationships.py ├── get_campaign_send_job_response.py ├── get_campaign_tags_relationships_response_collection.py ├── get_catalog_category_create_job_response_collection_compound_document.py ├── get_catalog_category_create_job_response_collection_compound_document_data_inner.py ├── get_catalog_category_create_job_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_catalog_category_create_job_response_collection_compound_document_data_inner_all_of_relationships_categories.py ├── get_catalog_category_create_job_response_collection_compound_document_data_inner_all_of_relationships_categories_data_inner.py ├── get_catalog_category_create_job_response_compound_document.py ├── get_catalog_category_delete_job_response.py ├── get_catalog_category_delete_job_response_collection.py ├── get_catalog_category_delete_job_response_collection_data_inner.py ├── get_catalog_category_delete_job_response_collection_data_inner_all_of_relationships.py ├── get_catalog_category_items_relationships_response_collection.py ├── get_catalog_category_items_relationships_response_collection_data_inner.py ├── get_catalog_category_response.py ├── get_catalog_category_response_collection.py ├── get_catalog_category_response_collection_data_inner.py ├── get_catalog_category_response_collection_data_inner_all_of_relationships.py ├── get_catalog_category_update_job_response_collection_compound_document.py ├── get_catalog_category_update_job_response_collection_compound_document_data_inner.py ├── get_catalog_category_update_job_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_catalog_category_update_job_response_collection_compound_document_data_inner_all_of_relationships_categories.py ├── get_catalog_category_update_job_response_collection_compound_document_data_inner_all_of_relationships_categories_data_inner.py ├── get_catalog_category_update_job_response_compound_document.py ├── get_catalog_item_categories_relationships_response_collection.py ├── get_catalog_item_categories_relationships_response_collection_data_inner.py ├── get_catalog_item_create_job_response_collection_compound_document.py ├── get_catalog_item_create_job_response_collection_compound_document_data_inner.py ├── get_catalog_item_create_job_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_catalog_item_create_job_response_collection_compound_document_data_inner_all_of_relationships_items.py ├── get_catalog_item_create_job_response_collection_compound_document_data_inner_all_of_relationships_items_data_inner.py ├── get_catalog_item_create_job_response_compound_document.py ├── get_catalog_item_delete_job_response.py ├── get_catalog_item_delete_job_response_collection.py ├── get_catalog_item_delete_job_response_collection_data_inner.py ├── get_catalog_item_response_collection_compound_document.py ├── get_catalog_item_response_collection_compound_document_data_inner.py ├── get_catalog_item_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_catalog_item_response_collection_compound_document_data_inner_all_of_relationships_variants.py ├── get_catalog_item_response_collection_compound_document_data_inner_all_of_relationships_variants_data_inner.py ├── get_catalog_item_response_compound_document.py ├── get_catalog_item_update_job_response_collection_compound_document.py ├── get_catalog_item_update_job_response_collection_compound_document_data_inner.py ├── get_catalog_item_update_job_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_catalog_item_update_job_response_collection_compound_document_data_inner_all_of_relationships_items.py ├── get_catalog_item_update_job_response_collection_compound_document_data_inner_all_of_relationships_items_data_inner.py ├── get_catalog_item_update_job_response_compound_document.py ├── get_catalog_item_variants_relationships_response_collection.py ├── get_catalog_item_variants_relationships_response_collection_data_inner.py ├── get_catalog_variant_create_job_response_collection_compound_document.py ├── get_catalog_variant_create_job_response_collection_compound_document_data_inner.py ├── get_catalog_variant_create_job_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_catalog_variant_create_job_response_collection_compound_document_data_inner_all_of_relationships_variants.py ├── get_catalog_variant_create_job_response_collection_compound_document_data_inner_all_of_relationships_variants_data_inner.py ├── get_catalog_variant_create_job_response_compound_document.py ├── get_catalog_variant_delete_job_response.py ├── get_catalog_variant_delete_job_response_collection.py ├── get_catalog_variant_delete_job_response_collection_data_inner.py ├── get_catalog_variant_delete_job_response_collection_data_inner_all_of_relationships.py ├── get_catalog_variant_response.py ├── get_catalog_variant_response_collection.py ├── get_catalog_variant_response_collection_data_inner.py ├── get_catalog_variant_response_collection_data_inner_all_of_relationships.py ├── get_catalog_variant_update_job_response_collection_compound_document.py ├── get_catalog_variant_update_job_response_collection_compound_document_data_inner.py ├── get_catalog_variant_update_job_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_catalog_variant_update_job_response_collection_compound_document_data_inner_all_of_relationships_variants.py ├── get_catalog_variant_update_job_response_collection_compound_document_data_inner_all_of_relationships_variants_data_inner.py ├── get_catalog_variant_update_job_response_compound_document.py ├── get_coupon_code_coupon_relationship_response.py ├── get_coupon_code_coupon_relationship_response_data.py ├── get_coupon_code_create_job_response_collection_compound_document.py ├── get_coupon_code_create_job_response_collection_compound_document_data_inner.py ├── get_coupon_code_create_job_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_coupon_code_create_job_response_collection_compound_document_data_inner_all_of_relationships_coupon_codes.py ├── get_coupon_code_create_job_response_collection_compound_document_data_inner_all_of_relationships_coupon_codes_data_inner.py ├── get_coupon_code_create_job_response_compound_document.py ├── get_coupon_code_response_collection.py ├── get_coupon_code_response_collection_compound_document.py ├── get_coupon_code_response_collection_compound_document_data_inner.py ├── get_coupon_code_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_coupon_code_response_collection_compound_document_data_inner_all_of_relationships_coupon.py ├── get_coupon_code_response_collection_compound_document_data_inner_all_of_relationships_coupon_data.py ├── get_coupon_code_response_collection_compound_document_data_inner_all_of_relationships_profile.py ├── get_coupon_code_response_collection_data_inner.py ├── get_coupon_code_response_collection_data_inner_all_of_relationships.py ├── get_coupon_code_response_compound_document.py ├── get_coupon_codes_relationships_response_collection.py ├── get_coupon_codes_relationships_response_collection_data_inner.py ├── get_coupon_response.py ├── get_coupon_response_collection.py ├── get_custom_metric_metrics_relationships_response_collection.py ├── get_custom_metric_response_collection_compound_document.py ├── get_custom_metric_response_collection_compound_document_data_inner.py ├── get_custom_metric_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_custom_metric_response_collection_compound_document_data_inner_all_of_relationships_metrics.py ├── get_custom_metric_response_collection_compound_document_data_inner_all_of_relationships_metrics_data_inner.py ├── get_custom_metric_response_compound_document.py ├── get_event_metric_relationship_response.py ├── get_event_profile_relationship_response.py ├── get_event_profile_relationship_response_data.py ├── get_event_response_collection_compound_document.py ├── get_event_response_collection_compound_document_data_inner.py ├── get_event_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_event_response_collection_compound_document_data_inner_all_of_relationships_attributions.py ├── get_event_response_collection_compound_document_data_inner_all_of_relationships_attributions_data_inner.py ├── get_event_response_collection_compound_document_data_inner_all_of_relationships_metric.py ├── get_event_response_collection_compound_document_data_inner_all_of_relationships_metric_data.py ├── get_event_response_collection_compound_document_data_inner_all_of_relationships_profile.py ├── get_event_response_collection_compound_document_data_inner_all_of_relationships_profile_data.py ├── get_event_response_compound_document.py ├── get_flow_action_flow_message_relationship_response_collection.py ├── get_flow_action_flow_relationship_response.py ├── get_flow_action_response.py ├── get_flow_action_response_collection.py ├── get_flow_action_response_collection_data_inner.py ├── get_flow_action_response_collection_data_inner_all_of_relationships.py ├── get_flow_action_response_compound_document.py ├── get_flow_action_response_compound_document_data.py ├── get_flow_action_response_compound_document_data_all_of_relationships.py ├── get_flow_action_response_compound_document_data_all_of_relationships_flow.py ├── get_flow_action_response_compound_document_data_all_of_relationships_flow_messages.py ├── get_flow_action_response_compound_document_data_all_of_relationships_flow_messages_data_inner.py ├── get_flow_flow_action_relationship_list_response_collection.py ├── get_flow_message_action_relationship_response.py ├── get_flow_message_response_collection.py ├── get_flow_message_response_collection_data_inner.py ├── get_flow_message_response_collection_data_inner_all_of_relationships.py ├── get_flow_message_response_compound_document.py ├── get_flow_message_response_compound_document_data.py ├── get_flow_message_response_compound_document_data_all_of_relationships.py ├── get_flow_message_response_compound_document_data_all_of_relationships_flow_action.py ├── get_flow_message_response_compound_document_data_all_of_relationships_template.py ├── get_flow_message_response_compound_document_data_all_of_relationships_template_data.py ├── get_flow_message_template_relationship_response.py ├── get_flow_message_template_relationship_response_data.py ├── get_flow_response.py ├── get_flow_response_collection.py ├── get_flow_response_collection_compound_document.py ├── get_flow_response_collection_compound_document_data_inner.py ├── get_flow_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_flow_response_collection_compound_document_data_inner_all_of_relationships_flow_actions.py ├── get_flow_response_collection_compound_document_data_inner_all_of_relationships_flow_actions_data_inner.py ├── get_flow_response_collection_data_inner.py ├── get_flow_response_collection_data_inner_all_of_relationships.py ├── get_flow_tags_relationships_response_collection.py ├── get_flow_v2_response_compound_document.py ├── get_flow_v2_response_compound_document_data.py ├── get_form_response.py ├── get_form_response_collection_compound_document.py ├── get_form_response_collection_compound_document_data_inner.py ├── get_form_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_form_response_compound_document.py ├── get_form_response_compound_document_data.py ├── get_form_response_compound_document_data_all_of_relationships.py ├── get_form_response_compound_document_data_all_of_relationships_form_versions.py ├── get_form_response_compound_document_data_all_of_relationships_form_versions_data_inner.py ├── get_form_version_form_relationship_response.py ├── get_form_version_form_relationship_response_data.py ├── get_form_version_response.py ├── get_form_version_response_collection.py ├── get_form_versions_relationships_response_collection.py ├── get_form_versions_relationships_response_collection_data_inner.py ├── get_image_response.py ├── get_image_response_collection.py ├── get_import_error_response_collection.py ├── get_list_flow_triggers_relationships_response_collection.py ├── get_list_list_response_collection_compound_document.py ├── get_list_list_response_collection_compound_document_data_inner.py ├── get_list_list_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_list_list_response_collection_compound_document_data_inner_all_of_relationships_tags.py ├── get_list_list_response_collection_compound_document_data_inner_all_of_relationships_tags_data_inner.py ├── get_list_member_response_collection.py ├── get_list_member_response_collection_data_inner.py ├── get_list_profiles_relationships_response_collection.py ├── get_list_response_collection.py ├── get_list_response_collection_data_inner.py ├── get_list_response_collection_data_inner_all_of_relationships.py ├── get_list_retrieve_response_compound_document.py ├── get_list_retrieve_response_compound_document_data.py ├── get_list_tags_relationships_response_collection.py ├── get_list_tags_relationships_response_collection_data_inner.py ├── get_metric_flow_triggers_relationships_response_collection.py ├── get_metric_properties_relationships_response_collection.py ├── get_metric_properties_relationships_response_collection_data_inner.py ├── get_metric_property_metric_relationship_response.py ├── get_metric_property_response_collection.py ├── get_metric_property_response_collection_data_inner.py ├── get_metric_property_response_collection_data_inner_all_of_relationships.py ├── get_metric_property_response_compound_document.py ├── get_metric_property_response_compound_document_data.py ├── get_metric_property_response_compound_document_data_all_of_relationships.py ├── get_metric_property_response_compound_document_data_all_of_relationships_metric.py ├── get_metric_property_response_compound_document_data_all_of_relationships_metric_data.py ├── get_metric_response.py ├── get_metric_response_collection.py ├── get_metric_response_collection_compound_document.py ├── get_metric_response_collection_compound_document_data_inner.py ├── get_metric_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_metric_response_collection_compound_document_data_inner_all_of_relationships_flow_triggers.py ├── get_metric_response_collection_compound_document_data_inner_all_of_relationships_flow_triggers_data_inner.py ├── get_metric_response_compound_document.py ├── get_metric_response_data.py ├── get_metric_response_data_all_of_relationships.py ├── get_profile_bulk_import_job_lists_relationships_response_collection.py ├── get_profile_bulk_import_job_profiles_relationships_response_collection.py ├── get_profile_import_job_response_collection_compound_document.py ├── get_profile_import_job_response_collection_compound_document_data_inner.py ├── get_profile_import_job_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_profile_import_job_response_collection_compound_document_data_inner_all_of_relationships_import_errors.py ├── get_profile_import_job_response_collection_compound_document_data_inner_all_of_relationships_lists.py ├── get_profile_import_job_response_collection_compound_document_data_inner_all_of_relationships_lists_data_inner.py ├── get_profile_import_job_response_compound_document.py ├── get_profile_lists_relationships_response_collection.py ├── get_profile_lists_relationships_response_collection_data_inner.py ├── get_profile_push_tokens_relationships_response_collection.py ├── get_profile_push_tokens_relationships_response_collection_data_inner.py ├── get_profile_response.py ├── get_profile_response_collection.py ├── get_profile_response_collection_compound_document.py ├── get_profile_response_collection_compound_document_data_inner.py ├── get_profile_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_profile_response_collection_compound_document_data_inner_all_of_relationships_push_tokens.py ├── get_profile_response_collection_compound_document_data_inner_all_of_relationships_push_tokens_data_inner.py ├── get_profile_response_compound_document.py ├── get_profile_response_compound_document_data.py ├── get_profile_response_compound_document_data_all_of_relationships.py ├── get_profile_response_compound_document_data_all_of_relationships_lists.py ├── get_profile_response_compound_document_data_all_of_relationships_lists_data_inner.py ├── get_profile_response_compound_document_data_all_of_relationships_segments.py ├── get_profile_response_compound_document_data_all_of_relationships_segments_data_inner.py ├── get_profile_response_data.py ├── get_profile_response_data_all_of_relationships.py ├── get_profile_segments_relationships_response_collection.py ├── get_push_token_profile_relationship_response.py ├── get_push_token_response_collection.py ├── get_push_token_response_collection_compound_document.py ├── get_push_token_response_collection_compound_document_data_inner.py ├── get_push_token_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_push_token_response_collection_compound_document_data_inner_all_of_relationships_profile.py ├── get_push_token_response_collection_compound_document_data_inner_all_of_relationships_profile_data.py ├── get_push_token_response_collection_data_inner.py ├── get_push_token_response_collection_data_inner_all_of_relationships.py ├── get_push_token_response_compound_document.py ├── get_review_response_dto_collection_compound_document.py ├── get_review_response_dto_collection_compound_document_data_inner.py ├── get_review_response_dto_collection_compound_document_data_inner_all_of_relationships.py ├── get_review_response_dto_collection_compound_document_data_inner_all_of_relationships_events.py ├── get_review_response_dto_collection_compound_document_data_inner_all_of_relationships_events_data_inner.py ├── get_review_response_dto_compound_document.py ├── get_segment_flow_triggers_relationships_response_collection.py ├── get_segment_list_response_collection_compound_document.py ├── get_segment_list_response_collection_compound_document_data_inner.py ├── get_segment_member_response_collection.py ├── get_segment_member_response_collection_data_inner.py ├── get_segment_profiles_relationships_response_collection.py ├── get_segment_response_collection.py ├── get_segment_response_collection_data_inner.py ├── get_segment_retrieve_response_compound_document.py ├── get_segment_retrieve_response_compound_document_data.py ├── get_segment_tags_relationships_response_collection.py ├── get_tag_campaign_relationships_response_collection.py ├── get_tag_campaign_relationships_response_collection_data_inner.py ├── get_tag_flow_relationships_response_collection.py ├── get_tag_flow_relationships_response_collection_data_inner.py ├── get_tag_group_relationship_response.py ├── get_tag_group_relationship_response_data.py ├── get_tag_group_response.py ├── get_tag_group_response_collection.py ├── get_tag_group_response_collection_data_inner.py ├── get_tag_group_response_collection_data_inner_all_of_relationships.py ├── get_tag_group_tags_relationships_response_collection.py ├── get_tag_list_relationships_response_collection.py ├── get_tag_list_relationships_response_collection_data_inner.py ├── get_tag_response_collection.py ├── get_tag_response_collection_compound_document.py ├── get_tag_response_collection_compound_document_data_inner.py ├── get_tag_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_tag_response_collection_compound_document_data_inner_all_of_relationships_tag_group.py ├── get_tag_response_collection_compound_document_data_inner_all_of_relationships_tag_group_data.py ├── get_tag_response_collection_data_inner.py ├── get_tag_response_collection_data_inner_all_of_relationships.py ├── get_tag_response_compound_document.py ├── get_tag_segment_relationships_response_collection.py ├── get_tag_segment_relationships_response_collection_data_inner.py ├── get_template_response.py ├── get_template_response_collection.py ├── get_tracking_setting_response.py ├── get_tracking_setting_response_collection.py ├── get_universal_content_response.py ├── get_universal_content_response_collection.py ├── get_web_feed_response.py ├── get_web_feed_response_collection.py ├── get_webhook_response_collection_compound_document.py ├── get_webhook_response_collection_compound_document_data_inner.py ├── get_webhook_response_collection_compound_document_data_inner_all_of_relationships.py ├── get_webhook_response_collection_compound_document_data_inner_all_of_relationships_webhook_topics.py ├── get_webhook_response_collection_compound_document_data_inner_all_of_relationships_webhook_topics_data_inner.py ├── get_webhook_response_compound_document.py ├── get_webhook_topic_response.py ├── get_webhook_topic_response_collection.py ├── image_create_query.py ├── image_create_query_resource_object.py ├── image_create_query_resource_object_attributes.py ├── image_enum.py ├── image_partial_update_query.py ├── image_partial_update_query_resource_object.py ├── image_partial_update_query_resource_object_attributes.py ├── image_response_object_resource.py ├── image_response_object_resource_attributes.py ├── import_error_enum.py ├── import_error_response_object_resource.py ├── import_error_response_object_resource_attributes.py ├── list_create_query.py ├── list_create_query_resource_object.py ├── list_create_query_resource_object_attributes.py ├── list_enum.py ├── list_list_response_object_resource.py ├── list_list_response_object_resource_attributes.py ├── list_member_response_object_resource_attributes.py ├── list_member_response_object_resource_extended.py ├── list_member_response_object_resource_extended_attributes.py ├── list_members_add_query.py ├── list_members_delete_query.py ├── list_partial_update_query.py ├── list_partial_update_query_resource_object.py ├── list_response_object_resource.py ├── list_retrieve_response_object_resource_attributes.py ├── list_retrieve_response_object_resource_extended.py ├── list_retrieve_response_object_resource_extended_attributes.py ├── metric_aggregate_enum.py ├── metric_aggregate_query.py ├── metric_aggregate_query_resource_object.py ├── metric_aggregate_query_resource_object_attributes.py ├── metric_aggregate_row_dto.py ├── metric_create_query_resource_object.py ├── metric_create_query_resource_object_attributes.py ├── metric_enum.py ├── metric_property_enum.py ├── metric_property_response_object_resource_attributes.py ├── metric_property_response_object_resource_extended.py ├── metric_property_response_object_resource_extended_attributes.py ├── metric_response_object_resource.py ├── metric_response_object_resource_attributes.py ├── object_links.py ├── only_related_links.py ├── onsite_profile_create_query_resource_object.py ├── onsite_profile_create_query_resource_object_attributes.py ├── onsite_profile_meta.py ├── patch_campaign_message_response.py ├── patch_campaign_message_response_data.py ├── patch_campaign_response.py ├── patch_catalog_category_response.py ├── patch_catalog_item_response.py ├── patch_catalog_variant_response.py ├── patch_coupon_code_response.py ├── patch_coupon_response.py ├── patch_custom_metric_response.py ├── patch_flow_response.py ├── patch_flow_response_data.py ├── patch_image_response.py ├── patch_list_partial_update_response.py ├── patch_profile_response.py ├── patch_review_response_dto.py ├── patch_review_response_dto_data.py ├── patch_review_response_dto_data_attributes.py ├── patch_review_response_dto_data_relationships.py ├── patch_review_response_dto_data_relationships_item.py ├── patch_review_response_dto_data_relationships_item_data.py ├── patch_segment_partial_update_response.py ├── patch_tag_group_response.py ├── patch_template_response.py ├── patch_tracking_setting_response.py ├── patch_tracking_setting_response_data.py ├── patch_universal_content_response.py ├── patch_web_feed_response.py ├── patch_webhook_response.py ├── post_bulk_profile_suppressions_create_job_response.py ├── post_bulk_profile_suppressions_create_job_response_data.py ├── post_bulk_profile_suppressions_create_job_response_data_attributes.py ├── post_bulk_profile_suppressions_create_job_response_data_relationships.py ├── post_bulk_profile_suppressions_create_job_response_data_relationships_lists.py ├── post_bulk_profile_suppressions_create_job_response_data_relationships_lists_data_inner.py ├── post_bulk_profile_suppressions_create_job_response_data_relationships_segments.py ├── post_bulk_profile_suppressions_create_job_response_data_relationships_segments_data_inner.py ├── post_bulk_profile_suppressions_remove_job_response.py ├── post_bulk_profile_suppressions_remove_job_response_data.py ├── post_campaign_message_response.py ├── post_campaign_message_response_data.py ├── post_campaign_message_response_data_attributes.py ├── post_campaign_message_response_data_relationships.py ├── post_campaign_recipient_estimation_job_response.py ├── post_campaign_recipient_estimation_job_response_data.py ├── post_campaign_recipient_estimation_job_response_data_attributes.py ├── post_campaign_response.py ├── post_campaign_response_data.py ├── post_campaign_response_data_attributes.py ├── post_campaign_send_job_response.py ├── post_campaign_send_job_response_data.py ├── post_campaign_send_job_response_data_attributes.py ├── post_campaign_values_response_dto.py ├── post_campaign_values_response_dto_data.py ├── post_campaign_values_response_dto_data_attributes.py ├── post_campaign_values_response_dto_data_relationships.py ├── post_catalog_category_create_job_response.py ├── post_catalog_category_create_job_response_data.py ├── post_catalog_category_delete_job_response.py ├── post_catalog_category_delete_job_response_data.py ├── post_catalog_category_delete_job_response_data_relationships.py ├── post_catalog_category_delete_job_response_data_relationships_categories.py ├── post_catalog_category_delete_job_response_data_relationships_categories_data_inner.py ├── post_catalog_category_response.py ├── post_catalog_category_response_data.py ├── post_catalog_category_response_data_relationships.py ├── post_catalog_category_response_data_relationships_items.py ├── post_catalog_category_update_job_response.py ├── post_catalog_category_update_job_response_data.py ├── post_catalog_item_create_job_response.py ├── post_catalog_item_create_job_response_data.py ├── post_catalog_item_delete_job_response.py ├── post_catalog_item_delete_job_response_data.py ├── post_catalog_item_delete_job_response_data_relationships.py ├── post_catalog_item_delete_job_response_data_relationships_items.py ├── post_catalog_item_delete_job_response_data_relationships_items_data_inner.py ├── post_catalog_item_response.py ├── post_catalog_item_response_data.py ├── post_catalog_item_update_job_response.py ├── post_catalog_item_update_job_response_data.py ├── post_catalog_variant_create_job_response.py ├── post_catalog_variant_create_job_response_data.py ├── post_catalog_variant_delete_job_response.py ├── post_catalog_variant_delete_job_response_data.py ├── post_catalog_variant_delete_job_response_data_relationships.py ├── post_catalog_variant_delete_job_response_data_relationships_variants.py ├── post_catalog_variant_delete_job_response_data_relationships_variants_data_inner.py ├── post_catalog_variant_response.py ├── post_catalog_variant_response_data.py ├── post_catalog_variant_response_data_relationships.py ├── post_catalog_variant_response_data_relationships_item.py ├── post_catalog_variant_response_data_relationships_item_data.py ├── post_catalog_variant_update_job_response.py ├── post_catalog_variant_update_job_response_data.py ├── post_coupon_code_create_job_response.py ├── post_coupon_code_create_job_response_data.py ├── post_coupon_code_create_job_response_data_attributes.py ├── post_coupon_code_response.py ├── post_coupon_code_response_data.py ├── post_coupon_code_response_data_relationships.py ├── post_coupon_code_response_data_relationships_profile.py ├── post_coupon_code_response_data_relationships_profile_data.py ├── post_coupon_response.py ├── post_coupon_response_data.py ├── post_coupon_response_data_attributes.py ├── post_custom_metric_response.py ├── post_custom_metric_response_data.py ├── post_custom_metric_response_data_attributes.py ├── post_flow_series_response_dto.py ├── post_flow_series_response_dto_data.py ├── post_flow_series_response_dto_data_attributes.py ├── post_flow_v2_response.py ├── post_flow_v2_response_data.py ├── post_flow_v2_response_data_attributes.py ├── post_flow_values_response_dto.py ├── post_flow_values_response_dto_data.py ├── post_flow_values_response_dto_data_attributes.py ├── post_flow_values_response_dto_data_relationships.py ├── post_form_series_response_dto.py ├── post_form_series_response_dto_data.py ├── post_form_series_response_dto_data_attributes.py ├── post_form_values_response_dto.py ├── post_form_values_response_dto_data.py ├── post_form_values_response_dto_data_attributes.py ├── post_image_response.py ├── post_image_response_data.py ├── post_image_response_data_attributes.py ├── post_list_create_response.py ├── post_list_create_response_data.py ├── post_list_create_response_data_relationships.py ├── post_list_create_response_data_relationships_profiles.py ├── post_list_create_response_data_relationships_profiles_data_inner.py ├── post_metric_aggregate_response.py ├── post_metric_aggregate_response_data.py ├── post_metric_aggregate_response_data_attributes.py ├── post_profile_import_job_response.py ├── post_profile_import_job_response_data.py ├── post_profile_import_job_response_data_attributes.py ├── post_profile_import_job_response_data_relationships.py ├── post_profile_import_job_response_data_relationships_import_errors.py ├── post_profile_import_job_response_data_relationships_import_errors_data_inner.py ├── post_profile_import_job_response_data_relationships_profiles.py ├── post_profile_import_job_response_data_relationships_profiles_data_inner.py ├── post_profile_merge_response.py ├── post_profile_merge_response_data.py ├── post_profile_response.py ├── post_profile_response_data.py ├── post_profile_response_data_attributes.py ├── post_segment_create_response.py ├── post_segment_create_response_data.py ├── post_segment_series_response_dto.py ├── post_segment_series_response_dto_data.py ├── post_segment_series_response_dto_data_attributes.py ├── post_segment_values_response_dto.py ├── post_segment_values_response_dto_data.py ├── post_segment_values_response_dto_data_attributes.py ├── post_tag_group_response.py ├── post_tag_group_response_data.py ├── post_tag_group_response_data_attributes.py ├── post_tag_group_response_data_relationships.py ├── post_tag_response.py ├── post_tag_response_data.py ├── post_tag_response_data_attributes.py ├── post_tag_response_data_relationships.py ├── post_tag_response_data_relationships_campaigns.py ├── post_tag_response_data_relationships_campaigns_data_inner.py ├── post_template_response.py ├── post_template_response_data.py ├── post_template_response_data_attributes.py ├── post_universal_content_response.py ├── post_universal_content_response_data.py ├── post_universal_content_response_data_attributes.py ├── post_web_feed_response.py ├── post_web_feed_response_data.py ├── post_web_feed_response_data_attributes.py ├── post_webhook_response.py ├── post_webhook_response_data.py ├── post_webhook_response_data_attributes.py ├── predictive_analytics.py ├── profile_bulk_import_job_enum.py ├── profile_create_query.py ├── profile_create_query_resource_object.py ├── profile_create_query_resource_object_attributes.py ├── profile_enum.py ├── profile_identifier_dto_resource_object.py ├── profile_identifier_dto_resource_object_attributes.py ├── profile_import_job_create_query.py ├── profile_import_job_create_query_resource_object.py ├── profile_import_job_create_query_resource_object_attributes.py ├── profile_import_job_create_query_resource_object_attributes_profiles.py ├── profile_import_job_create_query_resource_object_relationships.py ├── profile_import_job_create_query_resource_object_relationships_lists.py ├── profile_import_job_create_query_resource_object_relationships_lists_data_inner.py ├── profile_import_job_response_object_resource.py ├── profile_import_job_response_object_resource_attributes.py ├── profile_location.py ├── profile_merge_enum.py ├── profile_merge_query.py ├── profile_merge_query_resource_object.py ├── profile_merge_query_resource_object_relationships.py ├── profile_merge_query_resource_object_relationships_profiles.py ├── profile_merge_query_resource_object_relationships_profiles_data_inner.py ├── profile_meta.py ├── profile_meta_patch_properties.py ├── profile_partial_update_query.py ├── profile_partial_update_query_resource_object.py ├── profile_partial_update_query_resource_object_attributes.py ├── profile_response_object_resource.py ├── profile_response_object_resource_attributes.py ├── profile_response_object_resource_extended.py ├── profile_response_object_resource_extended_attributes.py ├── profile_subscription_bulk_create_job_enum.py ├── profile_subscription_bulk_delete_job_enum.py ├── profile_subscription_create_query_resource_object.py ├── profile_subscription_create_query_resource_object_attributes.py ├── profile_subscription_delete_query_resource_object.py ├── profile_subscription_delete_query_resource_object_attributes.py ├── profile_suppression_bulk_create_job_enum.py ├── profile_suppression_bulk_delete_job_enum.py ├── profile_suppression_create_query_resource_object.py ├── profile_suppression_create_query_resource_object_attributes.py ├── profile_suppression_delete_query_resource_object.py ├── profile_suppression_delete_query_resource_object_attributes.py ├── profile_upsert_query.py ├── profile_upsert_query_resource_object.py ├── profile_upsert_query_resource_object_attributes.py ├── push_channel.py ├── push_marketing.py ├── push_profile_upsert_query_resource_object.py ├── push_profile_upsert_query_resource_object_attributes.py ├── push_token_create_query.py ├── push_token_create_query_resource_object.py ├── push_token_create_query_resource_object_attributes.py ├── push_token_create_query_resource_object_attributes_profile.py ├── push_token_enum.py ├── push_token_response_object_resource.py ├── push_token_response_object_resource_attributes.py ├── relationship_links.py ├── render_options_sub_object.py ├── review_enum.py ├── review_patch_query.py ├── review_patch_query_resource_object.py ├── review_patch_query_resource_object_attributes.py ├── review_product_dto.py ├── review_public_reply.py ├── review_response_dto_object_resource.py ├── review_response_dto_object_resource_attributes.py ├── segment_create_query.py ├── segment_create_query_resource_object.py ├── segment_create_query_resource_object_attributes.py ├── segment_definition.py ├── segment_enum.py ├── segment_list_response_object_resource.py ├── segment_list_response_object_resource_attributes.py ├── segment_member_response_object_resource_attributes.py ├── segment_member_response_object_resource_extended.py ├── segment_member_response_object_resource_extended_attributes.py ├── segment_partial_update_query.py ├── segment_partial_update_query_resource_object.py ├── segment_partial_update_query_resource_object_attributes.py ├── segment_response_object_resource.py ├── segment_retrieve_response_object_resource_attributes.py ├── segment_retrieve_response_object_resource_extended.py ├── segment_retrieve_response_object_resource_extended_attributes.py ├── segment_series_report_enum.py ├── segment_series_request_dto.py ├── segment_series_request_dto_resource_object.py ├── segment_series_request_dto_resource_object_attributes.py ├── segment_values_report_enum.py ├── segment_values_request_dto.py ├── segment_values_request_dto_resource_object.py ├── segment_values_request_dto_resource_object_attributes.py ├── send_options.py ├── send_time.py ├── send_time_sub_object.py ├── series_data.py ├── server_bis_subscription_create_query.py ├── server_bis_subscription_create_query_resource_object.py ├── server_bis_subscription_create_query_resource_object_attributes.py ├── server_bis_subscription_create_query_resource_object_attributes_profile.py ├── server_bis_subscription_create_query_resource_object_relationships.py ├── server_bis_subscription_create_query_resource_object_relationships_variant.py ├── server_bis_subscription_create_query_resource_object_relationships_variant_data.py ├── sms_channel.py ├── sms_marketing.py ├── sms_render_options.py ├── sms_subscription_parameters.py ├── sms_transactional.py ├── sms_unsubscription_parameters.py ├── street_address.py ├── subscription_channels.py ├── subscription_create_job_create_query.py ├── subscription_create_job_create_query_resource_object.py ├── subscription_create_job_create_query_resource_object_attributes.py ├── subscription_create_job_create_query_resource_object_attributes_profiles.py ├── subscription_create_job_create_query_resource_object_relationships.py ├── subscription_create_job_create_query_resource_object_relationships_list.py ├── subscription_create_job_create_query_resource_object_relationships_list_data.py ├── subscription_delete_job_create_query.py ├── subscription_delete_job_create_query_resource_object.py ├── subscription_delete_job_create_query_resource_object_attributes.py ├── subscription_delete_job_create_query_resource_object_attributes_profiles.py ├── subscription_delete_job_create_query_resource_object_relationships.py ├── subscription_delete_job_create_query_resource_object_relationships_list.py ├── subscription_delete_job_create_query_resource_object_relationships_list_data.py ├── subscription_parameters.py ├── subscriptions.py ├── suppression_create_job_create_query.py ├── suppression_create_job_create_query_resource_object.py ├── suppression_create_job_create_query_resource_object_attributes.py ├── suppression_create_job_create_query_resource_object_attributes_profiles.py ├── suppression_create_job_create_query_resource_object_relationships.py ├── suppression_create_job_create_query_resource_object_relationships_list.py ├── suppression_create_job_create_query_resource_object_relationships_list_data.py ├── suppression_create_job_create_query_resource_object_relationships_segment.py ├── suppression_create_job_create_query_resource_object_relationships_segment_data.py ├── suppression_delete_job_create_query.py ├── suppression_delete_job_create_query_resource_object.py ├── suppression_delete_job_create_query_resource_object_attributes.py ├── suppression_delete_job_create_query_resource_object_attributes_profiles.py ├── suppression_delete_job_create_query_resource_object_relationships.py ├── suppression_delete_job_create_query_resource_object_relationships_list.py ├── suppression_delete_job_create_query_resource_object_relationships_list_data.py ├── suppression_delete_job_create_query_resource_object_relationships_segment.py ├── suppression_delete_job_create_query_resource_object_relationships_segment_data.py ├── tag_campaign_op.py ├── tag_campaign_op_data_inner.py ├── tag_create_query.py ├── tag_create_query_resource_object.py ├── tag_create_query_resource_object_relationships.py ├── tag_create_query_resource_object_relationships_tag_group.py ├── tag_create_query_resource_object_relationships_tag_group_data.py ├── tag_enum.py ├── tag_flow_op.py ├── tag_flow_op_data_inner.py ├── tag_group_create_query.py ├── tag_group_create_query_resource_object.py ├── tag_group_create_query_resource_object_attributes.py ├── tag_group_enum.py ├── tag_group_response_object_resource.py ├── tag_group_response_object_resource_attributes.py ├── tag_group_update_query.py ├── tag_group_update_query_resource_object.py ├── tag_group_update_query_resource_object_attributes.py ├── tag_list_op.py ├── tag_list_op_data_inner.py ├── tag_response_object_resource.py ├── tag_response_object_resource_attributes.py ├── tag_segment_op.py ├── tag_segment_op_data_inner.py ├── tag_update_query.py ├── tag_update_query_resource_object.py ├── template_clone_query.py ├── template_clone_query_resource_object.py ├── template_clone_query_resource_object_attributes.py ├── template_create_query.py ├── template_create_query_resource_object.py ├── template_create_query_resource_object_attributes.py ├── template_enum.py ├── template_render_query.py ├── template_render_query_resource_object.py ├── template_render_query_resource_object_attributes.py ├── template_response_object_resource.py ├── template_response_object_resource_attributes.py ├── template_universal_content_enum.py ├── template_update_query.py ├── template_update_query_resource_object.py ├── template_update_query_resource_object_attributes.py ├── tracking_param_dto.py ├── tracking_setting_enum.py ├── tracking_setting_partial_update_query.py ├── tracking_setting_partial_update_query_resource_object.py ├── tracking_setting_partial_update_query_resource_object_attributes.py ├── tracking_setting_response_object_resource.py ├── tracking_setting_response_object_resource_attributes.py ├── universal_content_create_query.py ├── universal_content_create_query_resource_object.py ├── universal_content_create_query_resource_object_attributes.py ├── universal_content_partial_update_query.py ├── universal_content_partial_update_query_resource_object.py ├── universal_content_partial_update_query_resource_object_attributes.py ├── universal_content_response_object_resource.py ├── universal_content_response_object_resource_attributes.py ├── unsubscription_channels.py ├── unsubscription_parameters.py ├── values_data.py ├── web_feed_create_query.py ├── web_feed_create_query_resource_object.py ├── web_feed_create_query_resource_object_attributes.py ├── web_feed_enum.py ├── web_feed_partial_update_query.py ├── web_feed_partial_update_query_resource_object.py ├── web_feed_partial_update_query_resource_object_attributes.py ├── web_feed_response_object_resource.py ├── web_feed_response_object_resource_attributes.py ├── webhook_create_query.py ├── webhook_create_query_resource_object.py ├── webhook_create_query_resource_object_attributes.py ├── webhook_create_query_resource_object_relationships.py ├── webhook_create_query_resource_object_relationships_webhook_topics.py ├── webhook_create_query_resource_object_relationships_webhook_topics_data_inner.py ├── webhook_enum.py ├── webhook_partial_update_query.py ├── webhook_partial_update_query_resource_object.py ├── webhook_partial_update_query_resource_object_attributes.py ├── webhook_partial_update_query_resource_object_relationships.py ├── webhook_response_object_resource.py ├── webhook_response_object_resource_attributes.py ├── webhook_topic_enum.py └── webhook_topic_response_object_resource.py ├── py.typed └── rest.py /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Klaviyo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "openapi_client" 3 | version = "19.0.1" 4 | description = "Klaviyo API" 5 | authors = ["Klaviyo Developer Experience Team "] 6 | license = "License" 7 | readme = "README.md" 8 | repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" 9 | keywords = ["OpenAPI", "OpenAPI-Generator", "Klaviyo API"] 10 | include = ["openapi_client/py.typed"] 11 | 12 | [tool.poetry.dependencies] 13 | python = "^3.7" 14 | 15 | urllib3 = ">= 1.25.3" 16 | python-dateutil = ">=2.8.2" 17 | pydantic = ">=2" 18 | typing-extensions = ">=4.7.1" 19 | 20 | [tool.poetry.dev-dependencies] 21 | pytest = ">=7.2.1" 22 | tox = ">=3.9.0" 23 | flake8 = ">=4.0.0" 24 | types-python-dateutil = ">=2.8.19.14" 25 | mypy = "1.4.1" 26 | 27 | 28 | [build-system] 29 | requires = ["setuptools"] 30 | build-backend = "setuptools.build_meta" 31 | 32 | [tool.pylint.'MESSAGES CONTROL'] 33 | extension-pkg-whitelist = "pydantic" 34 | 35 | [tool.mypy] 36 | files = [ 37 | "openapi_client", 38 | #"test", # auto-generated tests 39 | "tests", # hand-written tests 40 | ] 41 | # TODO: enable "strict" once all these individual checks are passing 42 | # strict = true 43 | 44 | # List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options 45 | warn_unused_configs = true 46 | warn_redundant_casts = true 47 | warn_unused_ignores = true 48 | 49 | ## Getting these passing should be easy 50 | strict_equality = true 51 | strict_concatenate = true 52 | 53 | ## Strongly recommend enabling this one as soon as you can 54 | check_untyped_defs = true 55 | 56 | ## These shouldn't be too much additional work, but may be tricky to 57 | ## get passing if you use a lot of untyped libraries 58 | disallow_subclassing_any = true 59 | disallow_untyped_decorators = true 60 | disallow_any_generics = true 61 | 62 | ### These next few are various gradations of forcing use of type annotations 63 | #disallow_untyped_calls = true 64 | #disallow_incomplete_defs = true 65 | #disallow_untyped_defs = true 66 | # 67 | ### This one isn't too hard to get passing, but return on investment is lower 68 | #no_implicit_reexport = true 69 | # 70 | ### This one can be tricky to get passing if you use a lot of untyped libraries 71 | #warn_return_any = true 72 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | python_dateutil >= 2.5.3 2 | setuptools >= 21.0.0 3 | urllib3 >= 1.25.3, < 2.1.0 4 | pydantic >= 2 5 | typing-extensions >= 4.7.1 6 | aenum >= 3.1.11 7 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = klaviyo-api 3 | version = 19.0.1 4 | author = Klaviyo Developers 5 | author_email = developers@klaviyo.com 6 | description = Klaviyo Python SDK 7 | long_description = file: README.md 8 | long_description_content_type = text/markdown 9 | url = https://github.com/klaviyo/klaviyo-api-python 10 | project_urls = 11 | API Docs = https://developers.klaviyo.com/en/reference/api_overview 12 | classifiers = 13 | Programming Language :: Python :: 3 14 | License :: OSI Approved :: MIT License 15 | Operating System :: OS Independent 16 | 17 | [options] 18 | package_dir = 19 | = src 20 | packages = find: 21 | 22 | python_requires = >=3.7 23 | install_requires = 24 | python_dateutil >= 2.5.3 25 | setuptools >= 21.0.0 26 | urllib3 >= 1.25.3 27 | pydantic >= 2 28 | aenum >= 3.1.11 29 | [options.packages.find] 30 | where = src 31 | 32 | [flake8] 33 | max-line-length=99 34 | -------------------------------------------------------------------------------- /src/klaviyo_api/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from klaviyo_api.wrapper import KlaviyoAPI 4 | from klaviyo_api.wrapper import openapi_client 5 | -------------------------------------------------------------------------------- /src/klaviyo_api/custom_retry.py: -------------------------------------------------------------------------------- 1 | import time 2 | import random 3 | from openapi_client.exceptions import ApiException 4 | 5 | 6 | class RetryWithExponentialBackoff: 7 | 8 | base_interval = 0.5 9 | rand_factor = 0.5 10 | multiplier = 1.5 11 | 12 | def __init__(self, retry_codes, num_retries = 3, max_interval = 60): 13 | self.retry_codes = retry_codes 14 | self.num_retries = num_retries 15 | self.max_interval = max_interval 16 | 17 | def with_retry(self, func_to_call, *args, **kwargs): 18 | last_request_retry_after = None 19 | last_request_timestamp = None 20 | attempt = 0 21 | iteration = 0 22 | 23 | while True: 24 | try: 25 | current_time = time.time() 26 | retry_after_value_elapsed = (last_request_retry_after is None or 27 | current_time - last_request_timestamp > last_request_retry_after) 28 | if retry_after_value_elapsed: 29 | attempt += 1 30 | return func_to_call(*args,**kwargs) 31 | except ApiException as e: 32 | if e.status not in self.retry_codes or attempt >= self.num_retries: 33 | raise e 34 | response_headers = e.headers if e.headers is not None else {} 35 | last_request_retry_after = response_headers.get('Retry-After', None) 36 | if last_request_retry_after is not None: 37 | last_request_retry_after = int(last_request_retry_after) 38 | last_request_timestamp = time.time() 39 | 40 | sleep_seconds = self.exponential_backoff(iteration) 41 | time.sleep(sleep_seconds) 42 | iteration += 1 43 | 44 | def exponential_backoff(self, iteration): 45 | wait_time = min(self.base_interval * (self.multiplier ** iteration), self.max_interval) 46 | 47 | # Apply randomness to avoid thundering herd 48 | delta = self.rand_factor * wait_time 49 | random_neg_1_to_1 = 2 * random.random() - 1 50 | return wait_time + delta * random_neg_1_to_1 51 | -------------------------------------------------------------------------------- /src/openapi_client/api/__init__.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | from typing import TYPE_CHECKING 4 | 5 | # non-runtime imports for type hints 6 | 7 | if TYPE_CHECKING: 8 | from openapi_client.api.accounts_api import AccountsApi 9 | from openapi_client.api.campaigns_api import CampaignsApi 10 | from openapi_client.api.catalogs_api import CatalogsApi 11 | from openapi_client.api.coupons_api import CouponsApi 12 | from openapi_client.api.data_privacy_api import DataPrivacyApi 13 | from openapi_client.api.events_api import EventsApi 14 | from openapi_client.api.flows_api import FlowsApi 15 | from openapi_client.api.forms_api import FormsApi 16 | from openapi_client.api.images_api import ImagesApi 17 | from openapi_client.api.lists_api import ListsApi 18 | from openapi_client.api.metrics_api import MetricsApi 19 | from openapi_client.api.profiles_api import ProfilesApi 20 | from openapi_client.api.reporting_api import ReportingApi 21 | from openapi_client.api.reviews_api import ReviewsApi 22 | from openapi_client.api.segments_api import SegmentsApi 23 | from openapi_client.api.tags_api import TagsApi 24 | from openapi_client.api.templates_api import TemplatesApi 25 | from openapi_client.api.tracking_settings_api import TrackingSettingsApi 26 | from openapi_client.api.web_feeds_api import WebFeedsApi 27 | from openapi_client.api.webhooks_api import WebhooksApi 28 | 29 | 30 | 31 | # lazily import apis into api package (see https://docs.python.org/3/reference/datamodel.html#customizing-module-attribute-access) 32 | 33 | object_origins = { 34 | # import apis into sdk package 35 | "AccountsApi": "openapi_client.api.accounts_api", 36 | "CampaignsApi": "openapi_client.api.campaigns_api", 37 | "CatalogsApi": "openapi_client.api.catalogs_api", 38 | "CouponsApi": "openapi_client.api.coupons_api", 39 | "DataPrivacyApi": "openapi_client.api.data_privacy_api", 40 | "EventsApi": "openapi_client.api.events_api", 41 | "FlowsApi": "openapi_client.api.flows_api", 42 | "FormsApi": "openapi_client.api.forms_api", 43 | "ImagesApi": "openapi_client.api.images_api", 44 | "ListsApi": "openapi_client.api.lists_api", 45 | "MetricsApi": "openapi_client.api.metrics_api", 46 | "ProfilesApi": "openapi_client.api.profiles_api", 47 | "ReportingApi": "openapi_client.api.reporting_api", 48 | "ReviewsApi": "openapi_client.api.reviews_api", 49 | "SegmentsApi": "openapi_client.api.segments_api", 50 | "TagsApi": "openapi_client.api.tags_api", 51 | "TemplatesApi": "openapi_client.api.templates_api", 52 | "TrackingSettingsApi": "openapi_client.api.tracking_settings_api", 53 | "WebFeedsApi": "openapi_client.api.web_feeds_api", 54 | "WebhooksApi": "openapi_client.api.webhooks_api", 55 | 56 | } 57 | 58 | def __getattr__(name): 59 | if name in object_origins: 60 | module = __import__(object_origins[name], None, None, [name]) 61 | return getattr(module, name) 62 | return __import__(f"openapi_client.api.{name}") 63 | -------------------------------------------------------------------------------- /src/openapi_client/api_arg_options.py: -------------------------------------------------------------------------------- 1 | USE_DICTIONARY_FOR_RESPONSE_DATA = "USE_DICTIONARY_FOR_RESPONSE_DATA" 2 | -------------------------------------------------------------------------------- /src/openapi_client/api_response.py: -------------------------------------------------------------------------------- 1 | """API response object.""" 2 | 3 | from __future__ import annotations 4 | from typing import Optional, Generic, Mapping, TypeVar 5 | from pydantic import Field, StrictInt, StrictBytes, BaseModel 6 | 7 | T = TypeVar("T") 8 | 9 | class ApiResponse(BaseModel, Generic[T]): 10 | """ 11 | API response object 12 | """ 13 | 14 | status_code: StrictInt = Field(description="HTTP status code") 15 | headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") 16 | data: T = Field(description="Deserialized data given the data type") 17 | raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") 18 | 19 | model_config = { 20 | "arbitrary_types_allowed": True 21 | } 22 | -------------------------------------------------------------------------------- /src/openapi_client/models/account_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class AccountEnum(str, Enum): 22 | """ 23 | AccountEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | ACCOUNT = 'account' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of AccountEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/attribution_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class AttributionEnum(str, Enum): 22 | """ 23 | AttributionEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | ATTRIBUTION = 'attribution' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of AttributionEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/back_in_stock_subscription_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class BackInStockSubscriptionEnum(str, Enum): 22 | """ 23 | BackInStockSubscriptionEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | BACK_MINUS_IN_MINUS_STOCK_MINUS_SUBSCRIPTION = 'back-in-stock-subscription' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of BackInStockSubscriptionEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/campaign_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CampaignEnum(str, Enum): 22 | """ 23 | CampaignEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CAMPAIGN = 'campaign' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CampaignEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/campaign_message_create_query_resource_object_attributes.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class CampaignMessageCreateQueryResourceObjectAttributes(BaseModel): 26 | """ 27 | CampaignMessageCreateQueryResourceObjectAttributes 28 | """ # noqa: E501 29 | definition: Dict[str, Any] 30 | __properties: ClassVar[List[str]] = ["definition"] 31 | 32 | model_config = ConfigDict( 33 | populate_by_name=True, 34 | validate_assignment=True, 35 | protected_namespaces=(), 36 | ) 37 | 38 | 39 | def to_str(self) -> str: 40 | """Returns the string representation of the model using alias""" 41 | return pprint.pformat(self.model_dump(by_alias=True)) 42 | 43 | def to_json(self) -> str: 44 | """Returns the JSON representation of the model using alias""" 45 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 46 | return json.dumps(self.to_dict()) 47 | 48 | @classmethod 49 | def from_json(cls, json_str: str) -> Optional[Self]: 50 | """Create an instance of CampaignMessageCreateQueryResourceObjectAttributes from a JSON string""" 51 | return cls.from_dict(json.loads(json_str)) 52 | 53 | def to_dict(self) -> Dict[str, Any]: 54 | """Return the dictionary representation of the model using alias. 55 | 56 | This has the following differences from calling pydantic's 57 | `self.model_dump(by_alias=True)`: 58 | 59 | * `None` is only added to the output dict for nullable fields that 60 | were set at model initialization. Other fields with value `None` 61 | are ignored. 62 | """ 63 | excluded_fields: Set[str] = set([ 64 | ]) 65 | 66 | _dict = self.model_dump( 67 | by_alias=True, 68 | exclude=excluded_fields, 69 | exclude_none=True, 70 | ) 71 | return _dict 72 | 73 | @classmethod 74 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 75 | """Create an instance of CampaignMessageCreateQueryResourceObjectAttributes from a dict""" 76 | if obj is None: 77 | return None 78 | 79 | if not isinstance(obj, dict): 80 | return cls.model_validate(obj) 81 | 82 | _obj = cls.model_validate({ 83 | "definition": obj.get("definition") 84 | }) 85 | return _obj 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/openapi_client/models/campaign_message_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CampaignMessageEnum(str, Enum): 22 | """ 23 | CampaignMessageEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CAMPAIGN_MINUS_MESSAGE = 'campaign-message' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CampaignMessageEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/campaign_message_image_update_query_data.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.image_enum import ImageEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class CampaignMessageImageUpdateQueryData(BaseModel): 27 | """ 28 | CampaignMessageImageUpdateQueryData 29 | """ # noqa: E501 30 | type: ImageEnum 31 | id: StrictStr = Field(description="Campaign Message Image") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of CampaignMessageImageUpdateQueryData from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of CampaignMessageImageUpdateQueryData from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/campaign_recipient_estimation_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CampaignRecipientEstimationEnum(str, Enum): 22 | """ 23 | CampaignRecipientEstimationEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CAMPAIGN_MINUS_RECIPIENT_MINUS_ESTIMATION = 'campaign-recipient-estimation' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CampaignRecipientEstimationEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/campaign_recipient_estimation_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CampaignRecipientEstimationJobEnum(str, Enum): 22 | """ 23 | CampaignRecipientEstimationJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CAMPAIGN_MINUS_RECIPIENT_MINUS_ESTIMATION_MINUS_JOB = 'campaign-recipient-estimation-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CampaignRecipientEstimationJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/campaign_send_job_create_query_resource_object.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.campaign_send_job_enum import CampaignSendJobEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class CampaignSendJobCreateQueryResourceObject(BaseModel): 27 | """ 28 | CampaignSendJobCreateQueryResourceObject 29 | """ # noqa: E501 30 | type: CampaignSendJobEnum 31 | id: StrictStr = Field(description="The ID of the campaign to send") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of CampaignSendJobCreateQueryResourceObject from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of CampaignSendJobCreateQueryResourceObject from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/campaign_send_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CampaignSendJobEnum(str, Enum): 22 | """ 23 | CampaignSendJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CAMPAIGN_MINUS_SEND_MINUS_JOB = 'campaign-send-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CampaignSendJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/campaign_values_report_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CampaignValuesReportEnum(str, Enum): 22 | """ 23 | CampaignValuesReportEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CAMPAIGN_MINUS_VALUES_MINUS_REPORT = 'campaign-values-report' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CampaignValuesReportEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_category_bulk_create_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogCategoryBulkCreateJobEnum(str, Enum): 22 | """ 23 | CatalogCategoryBulkCreateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_CATEGORY_MINUS_BULK_MINUS_CREATE_MINUS_JOB = 'catalog-category-bulk-create-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogCategoryBulkCreateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_category_bulk_delete_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogCategoryBulkDeleteJobEnum(str, Enum): 22 | """ 23 | CatalogCategoryBulkDeleteJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_CATEGORY_MINUS_BULK_MINUS_DELETE_MINUS_JOB = 'catalog-category-bulk-delete-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogCategoryBulkDeleteJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_category_bulk_update_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogCategoryBulkUpdateJobEnum(str, Enum): 22 | """ 23 | CatalogCategoryBulkUpdateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_CATEGORY_MINUS_BULK_MINUS_UPDATE_MINUS_JOB = 'catalog-category-bulk-update-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogCategoryBulkUpdateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_category_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogCategoryEnum(str, Enum): 22 | """ 23 | CatalogCategoryEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_CATEGORY = 'catalog-category' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogCategoryEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_category_item_op_data_inner.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.catalog_item_enum import CatalogItemEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class CatalogCategoryItemOpDataInner(BaseModel): 27 | """ 28 | CatalogCategoryItemOpDataInner 29 | """ # noqa: E501 30 | type: CatalogItemEnum 31 | id: StrictStr = Field(description="A list of catalog item IDs that are in the given category.") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of CatalogCategoryItemOpDataInner from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of CatalogCategoryItemOpDataInner from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_item_bulk_create_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogItemBulkCreateJobEnum(str, Enum): 22 | """ 23 | CatalogItemBulkCreateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_ITEM_MINUS_BULK_MINUS_CREATE_MINUS_JOB = 'catalog-item-bulk-create-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogItemBulkCreateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_item_bulk_delete_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogItemBulkDeleteJobEnum(str, Enum): 22 | """ 23 | CatalogItemBulkDeleteJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_ITEM_MINUS_BULK_MINUS_DELETE_MINUS_JOB = 'catalog-item-bulk-delete-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogItemBulkDeleteJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_item_bulk_update_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogItemBulkUpdateJobEnum(str, Enum): 22 | """ 23 | CatalogItemBulkUpdateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_ITEM_MINUS_BULK_MINUS_UPDATE_MINUS_JOB = 'catalog-item-bulk-update-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogItemBulkUpdateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_item_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogItemEnum(str, Enum): 22 | """ 23 | CatalogItemEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_ITEM = 'catalog-item' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogItemEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_variant_bulk_create_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogVariantBulkCreateJobEnum(str, Enum): 22 | """ 23 | CatalogVariantBulkCreateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_VARIANT_MINUS_BULK_MINUS_CREATE_MINUS_JOB = 'catalog-variant-bulk-create-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogVariantBulkCreateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_variant_bulk_delete_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogVariantBulkDeleteJobEnum(str, Enum): 22 | """ 23 | CatalogVariantBulkDeleteJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_VARIANT_MINUS_BULK_MINUS_DELETE_MINUS_JOB = 'catalog-variant-bulk-delete-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogVariantBulkDeleteJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_variant_bulk_update_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogVariantBulkUpdateJobEnum(str, Enum): 22 | """ 23 | CatalogVariantBulkUpdateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_VARIANT_MINUS_BULK_MINUS_UPDATE_MINUS_JOB = 'catalog-variant-bulk-update-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogVariantBulkUpdateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/catalog_variant_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CatalogVariantEnum(str, Enum): 22 | """ 23 | CatalogVariantEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CATALOG_MINUS_VARIANT = 'catalog-variant' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CatalogVariantEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/condition_group.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class ConditionGroup(BaseModel): 26 | """ 27 | ConditionGroup 28 | """ # noqa: E501 29 | conditions: List[Dict[str, Any]] 30 | __properties: ClassVar[List[str]] = ["conditions"] 31 | 32 | model_config = ConfigDict( 33 | populate_by_name=True, 34 | validate_assignment=True, 35 | protected_namespaces=(), 36 | ) 37 | 38 | 39 | def to_str(self) -> str: 40 | """Returns the string representation of the model using alias""" 41 | return pprint.pformat(self.model_dump(by_alias=True)) 42 | 43 | def to_json(self) -> str: 44 | """Returns the JSON representation of the model using alias""" 45 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 46 | return json.dumps(self.to_dict()) 47 | 48 | @classmethod 49 | def from_json(cls, json_str: str) -> Optional[Self]: 50 | """Create an instance of ConditionGroup from a JSON string""" 51 | return cls.from_dict(json.loads(json_str)) 52 | 53 | def to_dict(self) -> Dict[str, Any]: 54 | """Return the dictionary representation of the model using alias. 55 | 56 | This has the following differences from calling pydantic's 57 | `self.model_dump(by_alias=True)`: 58 | 59 | * `None` is only added to the output dict for nullable fields that 60 | were set at model initialization. Other fields with value `None` 61 | are ignored. 62 | """ 63 | excluded_fields: Set[str] = set([ 64 | ]) 65 | 66 | _dict = self.model_dump( 67 | by_alias=True, 68 | exclude=excluded_fields, 69 | exclude_none=True, 70 | ) 71 | return _dict 72 | 73 | @classmethod 74 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 75 | """Create an instance of ConditionGroup from a dict""" 76 | if obj is None: 77 | return None 78 | 79 | if not isinstance(obj, dict): 80 | return cls.model_validate(obj) 81 | 82 | _obj = cls.model_validate({ 83 | "conditions": obj.get("conditions") 84 | }) 85 | return _obj 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/openapi_client/models/coupon_code_bulk_create_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CouponCodeBulkCreateJobEnum(str, Enum): 22 | """ 23 | CouponCodeBulkCreateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | COUPON_MINUS_CODE_MINUS_BULK_MINUS_CREATE_MINUS_JOB = 'coupon-code-bulk-create-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CouponCodeBulkCreateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/coupon_code_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CouponCodeEnum(str, Enum): 22 | """ 23 | CouponCodeEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | COUPON_MINUS_CODE = 'coupon-code' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CouponCodeEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/coupon_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CouponEnum(str, Enum): 22 | """ 23 | CouponEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | COUPON = 'coupon' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CouponEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/custom_metric_condition.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class CustomMetricCondition(BaseModel): 26 | """ 27 | CustomMetricCondition 28 | """ # noqa: E501 29 | var_property: StrictStr = Field(alias="property") 30 | filter: Dict[str, Any] 31 | __properties: ClassVar[List[str]] = ["property", "filter"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of CustomMetricCondition from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | return _dict 73 | 74 | @classmethod 75 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 76 | """Create an instance of CustomMetricCondition from a dict""" 77 | if obj is None: 78 | return None 79 | 80 | if not isinstance(obj, dict): 81 | return cls.model_validate(obj) 82 | 83 | _obj = cls.model_validate({ 84 | "property": obj.get("property"), 85 | "filter": obj.get("filter") 86 | }) 87 | return _obj 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/openapi_client/models/custom_metric_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class CustomMetricEnum(str, Enum): 22 | """ 23 | CustomMetricEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | CUSTOM_MINUS_METRIC = 'custom-metric' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of CustomMetricEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/data_privacy_deletion_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class DataPrivacyDeletionJobEnum(str, Enum): 22 | """ 23 | DataPrivacyDeletionJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | DATA_MINUS_PRIVACY_MINUS_DELETION_MINUS_JOB = 'data-privacy-deletion-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of DataPrivacyDeletionJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/email_channel.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List, Optional 22 | from openapi_client.models.email_marketing import EmailMarketing 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class EmailChannel(BaseModel): 27 | """ 28 | EmailChannel 29 | """ # noqa: E501 30 | marketing: Optional[EmailMarketing] = None 31 | __properties: ClassVar[List[str]] = ["marketing"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of EmailChannel from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of marketing 73 | if self.marketing: 74 | _dict['marketing'] = self.marketing.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of EmailChannel from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "marketing": EmailMarketing.from_dict(obj["marketing"]) if obj.get("marketing") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/event_bulk_create_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class EventBulkCreateEnum(str, Enum): 22 | """ 23 | EventBulkCreateEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | EVENT_MINUS_BULK_MINUS_CREATE = 'event-bulk-create' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of EventBulkCreateEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/event_bulk_create_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class EventBulkCreateJobEnum(str, Enum): 22 | """ 23 | EventBulkCreateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | EVENT_MINUS_BULK_MINUS_CREATE_MINUS_JOB = 'event-bulk-create-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of EventBulkCreateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/event_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class EventEnum(str, Enum): 22 | """ 23 | EventEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | EVENT = 'event' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of EventEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/flow_action_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class FlowActionEnum(str, Enum): 22 | """ 23 | FlowActionEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | FLOW_MINUS_ACTION = 'flow-action' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of FlowActionEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/flow_definition_profile_filter_condition_groups_inner.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class FlowDefinitionProfileFilterConditionGroupsInner(BaseModel): 26 | """ 27 | FlowDefinitionProfileFilterConditionGroupsInner 28 | """ # noqa: E501 29 | conditions: List[Dict[str, Any]] 30 | __properties: ClassVar[List[str]] = ["conditions"] 31 | 32 | model_config = ConfigDict( 33 | populate_by_name=True, 34 | validate_assignment=True, 35 | protected_namespaces=(), 36 | ) 37 | 38 | 39 | def to_str(self) -> str: 40 | """Returns the string representation of the model using alias""" 41 | return pprint.pformat(self.model_dump(by_alias=True)) 42 | 43 | def to_json(self) -> str: 44 | """Returns the JSON representation of the model using alias""" 45 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 46 | return json.dumps(self.to_dict()) 47 | 48 | @classmethod 49 | def from_json(cls, json_str: str) -> Optional[Self]: 50 | """Create an instance of FlowDefinitionProfileFilterConditionGroupsInner from a JSON string""" 51 | return cls.from_dict(json.loads(json_str)) 52 | 53 | def to_dict(self) -> Dict[str, Any]: 54 | """Return the dictionary representation of the model using alias. 55 | 56 | This has the following differences from calling pydantic's 57 | `self.model_dump(by_alias=True)`: 58 | 59 | * `None` is only added to the output dict for nullable fields that 60 | were set at model initialization. Other fields with value `None` 61 | are ignored. 62 | """ 63 | excluded_fields: Set[str] = set([ 64 | ]) 65 | 66 | _dict = self.model_dump( 67 | by_alias=True, 68 | exclude=excluded_fields, 69 | exclude_none=True, 70 | ) 71 | return _dict 72 | 73 | @classmethod 74 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 75 | """Create an instance of FlowDefinitionProfileFilterConditionGroupsInner from a dict""" 76 | if obj is None: 77 | return None 78 | 79 | if not isinstance(obj, dict): 80 | return cls.model_validate(obj) 81 | 82 | _obj = cls.model_validate({ 83 | "conditions": obj.get("conditions") 84 | }) 85 | return _obj 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/openapi_client/models/flow_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class FlowEnum(str, Enum): 22 | """ 23 | FlowEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | FLOW = 'flow' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of FlowEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/flow_message_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class FlowMessageEnum(str, Enum): 22 | """ 23 | FlowMessageEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | FLOW_MINUS_MESSAGE = 'flow-message' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of FlowMessageEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/flow_series_report_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class FlowSeriesReportEnum(str, Enum): 22 | """ 23 | FlowSeriesReportEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | FLOW_MINUS_SERIES_MINUS_REPORT = 'flow-series-report' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of FlowSeriesReportEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/flow_values_report_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class FlowValuesReportEnum(str, Enum): 22 | """ 23 | FlowValuesReportEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | FLOW_MINUS_VALUES_MINUS_REPORT = 'flow-values-report' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of FlowValuesReportEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/form_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class FormEnum(str, Enum): 22 | """ 23 | FormEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | FORM = 'form' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of FormEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/form_series_report_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class FormSeriesReportEnum(str, Enum): 22 | """ 23 | FormSeriesReportEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | FORM_MINUS_SERIES_MINUS_REPORT = 'form-series-report' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of FormSeriesReportEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/form_values_report_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class FormValuesReportEnum(str, Enum): 22 | """ 23 | FormValuesReportEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | FORM_MINUS_VALUES_MINUS_REPORT = 'form-values-report' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of FormValuesReportEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/form_version_ab_test.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class FormVersionABTest(BaseModel): 26 | """ 27 | FormVersionABTest 28 | """ # noqa: E501 29 | variation_name: StrictStr = Field(description="This is the name of the AB test variation.") 30 | __properties: ClassVar[List[str]] = ["variation_name"] 31 | 32 | model_config = ConfigDict( 33 | populate_by_name=True, 34 | validate_assignment=True, 35 | protected_namespaces=(), 36 | ) 37 | 38 | 39 | def to_str(self) -> str: 40 | """Returns the string representation of the model using alias""" 41 | return pprint.pformat(self.model_dump(by_alias=True)) 42 | 43 | def to_json(self) -> str: 44 | """Returns the JSON representation of the model using alias""" 45 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 46 | return json.dumps(self.to_dict()) 47 | 48 | @classmethod 49 | def from_json(cls, json_str: str) -> Optional[Self]: 50 | """Create an instance of FormVersionABTest from a JSON string""" 51 | return cls.from_dict(json.loads(json_str)) 52 | 53 | def to_dict(self) -> Dict[str, Any]: 54 | """Return the dictionary representation of the model using alias. 55 | 56 | This has the following differences from calling pydantic's 57 | `self.model_dump(by_alias=True)`: 58 | 59 | * `None` is only added to the output dict for nullable fields that 60 | were set at model initialization. Other fields with value `None` 61 | are ignored. 62 | """ 63 | excluded_fields: Set[str] = set([ 64 | ]) 65 | 66 | _dict = self.model_dump( 67 | by_alias=True, 68 | exclude=excluded_fields, 69 | exclude_none=True, 70 | ) 71 | return _dict 72 | 73 | @classmethod 74 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 75 | """Create an instance of FormVersionABTest from a dict""" 76 | if obj is None: 77 | return None 78 | 79 | if not isinstance(obj, dict): 80 | return cls.model_validate(obj) 81 | 82 | _obj = cls.model_validate({ 83 | "variation_name": obj.get("variation_name") 84 | }) 85 | return _obj 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/openapi_client/models/form_version_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class FormVersionEnum(str, Enum): 22 | """ 23 | FormVersionEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | FORM_MINUS_VERSION = 'form-version' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of FormVersionEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_accounts4_xx_response_errors_inner_source.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, StrictStr 21 | from typing import Any, ClassVar, Dict, List, Optional 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class GetAccounts4XXResponseErrorsInnerSource(BaseModel): 26 | """ 27 | GetAccounts4XXResponseErrorsInnerSource 28 | """ # noqa: E501 29 | pointer: Optional[StrictStr] = None 30 | parameter: Optional[StrictStr] = None 31 | __properties: ClassVar[List[str]] = ["pointer", "parameter"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of GetAccounts4XXResponseErrorsInnerSource from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | return _dict 73 | 74 | @classmethod 75 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 76 | """Create an instance of GetAccounts4XXResponseErrorsInnerSource from a dict""" 77 | if obj is None: 78 | return None 79 | 80 | if not isinstance(obj, dict): 81 | return cls.model_validate(obj) 82 | 83 | _obj = cls.model_validate({ 84 | "pointer": obj.get("pointer"), 85 | "parameter": obj.get("parameter") 86 | }) 87 | return _obj 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_campaign_message_image_relationship_response_data.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.image_enum import ImageEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class GetCampaignMessageImageRelationshipResponseData(BaseModel): 27 | """ 28 | GetCampaignMessageImageRelationshipResponseData 29 | """ # noqa: E501 30 | type: ImageEnum 31 | id: StrictStr = Field(description="The ID of the image") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of GetCampaignMessageImageRelationshipResponseData from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of GetCampaignMessageImageRelationshipResponseData from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_campaign_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.get_campaign_response_data import GetCampaignResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class GetCampaignResponse(BaseModel): 27 | """ 28 | GetCampaignResponse 29 | """ # noqa: E501 30 | data: GetCampaignResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of GetCampaignResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of GetCampaignResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": GetCampaignResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_flow_message_template_relationship_response_data.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.template_enum import TemplateEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class GetFlowMessageTemplateRelationshipResponseData(BaseModel): 27 | """ 28 | GetFlowMessageTemplateRelationshipResponseData 29 | """ # noqa: E501 30 | type: TemplateEnum 31 | id: StrictStr = Field(description="The ID of template") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of GetFlowMessageTemplateRelationshipResponseData from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of GetFlowMessageTemplateRelationshipResponseData from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_form_version_form_relationship_response_data.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.form_enum import FormEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class GetFormVersionFormRelationshipResponseData(BaseModel): 27 | """ 28 | GetFormVersionFormRelationshipResponseData 29 | """ # noqa: E501 30 | type: FormEnum 31 | id: StrictStr = Field(description="ID of the form. Generated by Klaviyo.") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of GetFormVersionFormRelationshipResponseData from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of GetFormVersionFormRelationshipResponseData from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_image_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.image_response_object_resource import ImageResponseObjectResource 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class GetImageResponse(BaseModel): 27 | """ 28 | GetImageResponse 29 | """ # noqa: E501 30 | data: ImageResponseObjectResource 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of GetImageResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of GetImageResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": ImageResponseObjectResource.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_list_tags_relationships_response_collection_data_inner.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.tag_enum import TagEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class GetListTagsRelationshipsResponseCollectionDataInner(BaseModel): 27 | """ 28 | GetListTagsRelationshipsResponseCollectionDataInner 29 | """ # noqa: E501 30 | type: TagEnum 31 | id: StrictStr = Field(description="The Tag ID") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of GetListTagsRelationshipsResponseCollectionDataInner from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of GetListTagsRelationshipsResponseCollectionDataInner from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_metric_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.get_metric_response_data import GetMetricResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class GetMetricResponse(BaseModel): 27 | """ 28 | GetMetricResponse 29 | """ # noqa: E501 30 | data: GetMetricResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of GetMetricResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of GetMetricResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": GetMetricResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_profile_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.get_profile_response_data import GetProfileResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class GetProfileResponse(BaseModel): 27 | """ 28 | GetProfileResponse 29 | """ # noqa: E501 30 | data: GetProfileResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of GetProfileResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of GetProfileResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": GetProfileResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/get_tag_group_relationship_response_data.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.tag_group_enum import TagGroupEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class GetTagGroupRelationshipResponseData(BaseModel): 27 | """ 28 | GetTagGroupRelationshipResponseData 29 | """ # noqa: E501 30 | type: TagGroupEnum 31 | id: StrictStr = Field(description="The Tag Group ID") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of GetTagGroupRelationshipResponseData from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of GetTagGroupRelationshipResponseData from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/image_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ImageEnum(str, Enum): 22 | """ 23 | ImageEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | IMAGE = 'image' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ImageEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/import_error_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ImportErrorEnum(str, Enum): 22 | """ 23 | ImportErrorEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | IMPORT_MINUS_ERROR = 'import-error' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ImportErrorEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/list_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ListEnum(str, Enum): 22 | """ 23 | ListEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | LIST = 'list' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ListEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/metric_aggregate_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class MetricAggregateEnum(str, Enum): 22 | """ 23 | MetricAggregateEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | METRIC_MINUS_AGGREGATE = 'metric-aggregate' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of MetricAggregateEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/metric_aggregate_row_dto.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class MetricAggregateRowDTO(BaseModel): 26 | """ 27 | MetricAggregateRowDTO 28 | """ # noqa: E501 29 | dimensions: List[StrictStr] = Field(description="List of dimensions associated with this set of measurements") 30 | measurements: Dict[str, Any] = Field(description="Dictionary of measurement_key, values") 31 | __properties: ClassVar[List[str]] = ["dimensions", "measurements"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of MetricAggregateRowDTO from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | return _dict 73 | 74 | @classmethod 75 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 76 | """Create an instance of MetricAggregateRowDTO from a dict""" 77 | if obj is None: 78 | return None 79 | 80 | if not isinstance(obj, dict): 81 | return cls.model_validate(obj) 82 | 83 | _obj = cls.model_validate({ 84 | "dimensions": obj.get("dimensions"), 85 | "measurements": obj.get("measurements") 86 | }) 87 | return _obj 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/openapi_client/models/metric_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class MetricEnum(str, Enum): 22 | """ 23 | MetricEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | METRIC = 'metric' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of MetricEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/metric_property_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class MetricPropertyEnum(str, Enum): 22 | """ 23 | MetricPropertyEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | METRIC_MINUS_PROPERTY = 'metric-property' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of MetricPropertyEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/object_links.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class ObjectLinks(BaseModel): 26 | """ 27 | ObjectLinks 28 | """ # noqa: E501 29 | var_self: StrictStr = Field(alias="self") 30 | __properties: ClassVar[List[str]] = ["self"] 31 | 32 | model_config = ConfigDict( 33 | populate_by_name=True, 34 | validate_assignment=True, 35 | protected_namespaces=(), 36 | ) 37 | 38 | 39 | def to_str(self) -> str: 40 | """Returns the string representation of the model using alias""" 41 | return pprint.pformat(self.model_dump(by_alias=True)) 42 | 43 | def to_json(self) -> str: 44 | """Returns the JSON representation of the model using alias""" 45 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 46 | return json.dumps(self.to_dict()) 47 | 48 | @classmethod 49 | def from_json(cls, json_str: str) -> Optional[Self]: 50 | """Create an instance of ObjectLinks from a JSON string""" 51 | return cls.from_dict(json.loads(json_str)) 52 | 53 | def to_dict(self) -> Dict[str, Any]: 54 | """Return the dictionary representation of the model using alias. 55 | 56 | This has the following differences from calling pydantic's 57 | `self.model_dump(by_alias=True)`: 58 | 59 | * `None` is only added to the output dict for nullable fields that 60 | were set at model initialization. Other fields with value `None` 61 | are ignored. 62 | """ 63 | excluded_fields: Set[str] = set([ 64 | ]) 65 | 66 | _dict = self.model_dump( 67 | by_alias=True, 68 | exclude=excluded_fields, 69 | exclude_none=True, 70 | ) 71 | return _dict 72 | 73 | @classmethod 74 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 75 | """Create an instance of ObjectLinks from a dict""" 76 | if obj is None: 77 | return None 78 | 79 | if not isinstance(obj, dict): 80 | return cls.model_validate(obj) 81 | 82 | _obj = cls.model_validate({ 83 | "self": obj.get("self") 84 | }) 85 | return _obj 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/openapi_client/models/only_related_links.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class OnlyRelatedLinks(BaseModel): 26 | """ 27 | OnlyRelatedLinks 28 | """ # noqa: E501 29 | related: StrictStr 30 | __properties: ClassVar[List[str]] = ["related"] 31 | 32 | model_config = ConfigDict( 33 | populate_by_name=True, 34 | validate_assignment=True, 35 | protected_namespaces=(), 36 | ) 37 | 38 | 39 | def to_str(self) -> str: 40 | """Returns the string representation of the model using alias""" 41 | return pprint.pformat(self.model_dump(by_alias=True)) 42 | 43 | def to_json(self) -> str: 44 | """Returns the JSON representation of the model using alias""" 45 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 46 | return json.dumps(self.to_dict()) 47 | 48 | @classmethod 49 | def from_json(cls, json_str: str) -> Optional[Self]: 50 | """Create an instance of OnlyRelatedLinks from a JSON string""" 51 | return cls.from_dict(json.loads(json_str)) 52 | 53 | def to_dict(self) -> Dict[str, Any]: 54 | """Return the dictionary representation of the model using alias. 55 | 56 | This has the following differences from calling pydantic's 57 | `self.model_dump(by_alias=True)`: 58 | 59 | * `None` is only added to the output dict for nullable fields that 60 | were set at model initialization. Other fields with value `None` 61 | are ignored. 62 | """ 63 | excluded_fields: Set[str] = set([ 64 | ]) 65 | 66 | _dict = self.model_dump( 67 | by_alias=True, 68 | exclude=excluded_fields, 69 | exclude_none=True, 70 | ) 71 | return _dict 72 | 73 | @classmethod 74 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 75 | """Create an instance of OnlyRelatedLinks from a dict""" 76 | if obj is None: 77 | return None 78 | 79 | if not isinstance(obj, dict): 80 | return cls.model_validate(obj) 81 | 82 | _obj = cls.model_validate({ 83 | "related": obj.get("related") 84 | }) 85 | return _obj 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/openapi_client/models/patch_coupon_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.post_coupon_response_data import PostCouponResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PatchCouponResponse(BaseModel): 27 | """ 28 | PatchCouponResponse 29 | """ # noqa: E501 30 | data: PostCouponResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of PatchCouponResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of PatchCouponResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": PostCouponResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/patch_flow_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.patch_flow_response_data import PatchFlowResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PatchFlowResponse(BaseModel): 27 | """ 28 | PatchFlowResponse 29 | """ # noqa: E501 30 | data: PatchFlowResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of PatchFlowResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of PatchFlowResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": PatchFlowResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/patch_image_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.post_image_response_data import PostImageResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PatchImageResponse(BaseModel): 27 | """ 28 | PatchImageResponse 29 | """ # noqa: E501 30 | data: PostImageResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of PatchImageResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of PatchImageResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": PostImageResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_catalog_variant_response_data_relationships_item_data.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.catalog_item_enum import CatalogItemEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PostCatalogVariantResponseDataRelationshipsItemData(BaseModel): 27 | """ 28 | PostCatalogVariantResponseDataRelationshipsItemData 29 | """ # noqa: E501 30 | type: CatalogItemEnum 31 | id: StrictStr 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of PostCatalogVariantResponseDataRelationshipsItemData from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of PostCatalogVariantResponseDataRelationshipsItemData from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_coupon_code_response_data_relationships_profile_data.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.profile_enum import ProfileEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PostCouponCodeResponseDataRelationshipsProfileData(BaseModel): 27 | """ 28 | PostCouponCodeResponseDataRelationshipsProfileData 29 | """ # noqa: E501 30 | type: ProfileEnum 31 | id: StrictStr 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of PostCouponCodeResponseDataRelationshipsProfileData from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of PostCouponCodeResponseDataRelationshipsProfileData from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_coupon_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.post_coupon_response_data import PostCouponResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PostCouponResponse(BaseModel): 27 | """ 28 | PostCouponResponse 29 | """ # noqa: E501 30 | data: PostCouponResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of PostCouponResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of PostCouponResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": PostCouponResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_flow_v2_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.post_flow_v2_response_data import PostFlowV2ResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PostFlowV2Response(BaseModel): 27 | """ 28 | PostFlowV2Response 29 | """ # noqa: E501 30 | data: PostFlowV2ResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of PostFlowV2Response from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of PostFlowV2Response from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": PostFlowV2ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_image_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.post_image_response_data import PostImageResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PostImageResponse(BaseModel): 27 | """ 28 | PostImageResponse 29 | """ # noqa: E501 30 | data: PostImageResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of PostImageResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of PostImageResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": PostImageResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_list_create_response_data_relationships_profiles_data_inner.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.profile_enum import ProfileEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PostListCreateResponseDataRelationshipsProfilesDataInner(BaseModel): 27 | """ 28 | PostListCreateResponseDataRelationshipsProfilesDataInner 29 | """ # noqa: E501 30 | type: ProfileEnum 31 | id: StrictStr 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of PostListCreateResponseDataRelationshipsProfilesDataInner from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of PostListCreateResponseDataRelationshipsProfilesDataInner from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_profile_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.post_profile_response_data import PostProfileResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PostProfileResponse(BaseModel): 27 | """ 28 | PostProfileResponse 29 | """ # noqa: E501 30 | data: PostProfileResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of PostProfileResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of PostProfileResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": PostProfileResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_tag_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.post_tag_response_data import PostTagResponseData 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PostTagResponse(BaseModel): 27 | """ 28 | PostTagResponse 29 | """ # noqa: E501 30 | data: PostTagResponseData 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of PostTagResponse from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of PostTagResponse from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": PostTagResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_tag_response_data_attributes.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class PostTagResponseDataAttributes(BaseModel): 26 | """ 27 | PostTagResponseDataAttributes 28 | """ # noqa: E501 29 | name: StrictStr = Field(description="The Tag name") 30 | __properties: ClassVar[List[str]] = ["name"] 31 | 32 | model_config = ConfigDict( 33 | populate_by_name=True, 34 | validate_assignment=True, 35 | protected_namespaces=(), 36 | ) 37 | 38 | 39 | def to_str(self) -> str: 40 | """Returns the string representation of the model using alias""" 41 | return pprint.pformat(self.model_dump(by_alias=True)) 42 | 43 | def to_json(self) -> str: 44 | """Returns the JSON representation of the model using alias""" 45 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 46 | return json.dumps(self.to_dict()) 47 | 48 | @classmethod 49 | def from_json(cls, json_str: str) -> Optional[Self]: 50 | """Create an instance of PostTagResponseDataAttributes from a JSON string""" 51 | return cls.from_dict(json.loads(json_str)) 52 | 53 | def to_dict(self) -> Dict[str, Any]: 54 | """Return the dictionary representation of the model using alias. 55 | 56 | This has the following differences from calling pydantic's 57 | `self.model_dump(by_alias=True)`: 58 | 59 | * `None` is only added to the output dict for nullable fields that 60 | were set at model initialization. Other fields with value `None` 61 | are ignored. 62 | """ 63 | excluded_fields: Set[str] = set([ 64 | ]) 65 | 66 | _dict = self.model_dump( 67 | by_alias=True, 68 | exclude=excluded_fields, 69 | exclude_none=True, 70 | ) 71 | return _dict 72 | 73 | @classmethod 74 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 75 | """Create an instance of PostTagResponseDataAttributes from a dict""" 76 | if obj is None: 77 | return None 78 | 79 | if not isinstance(obj, dict): 80 | return cls.model_validate(obj) 81 | 82 | _obj = cls.model_validate({ 83 | "name": obj.get("name") 84 | }) 85 | return _obj 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/openapi_client/models/post_tag_response_data_relationships_campaigns_data_inner.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.campaign_enum import CampaignEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PostTagResponseDataRelationshipsCampaignsDataInner(BaseModel): 27 | """ 28 | PostTagResponseDataRelationshipsCampaignsDataInner 29 | """ # noqa: E501 30 | type: CampaignEnum 31 | id: StrictStr 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of PostTagResponseDataRelationshipsCampaignsDataInner from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of PostTagResponseDataRelationshipsCampaignsDataInner from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/profile_bulk_import_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ProfileBulkImportJobEnum(str, Enum): 22 | """ 23 | ProfileBulkImportJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | PROFILE_MINUS_BULK_MINUS_IMPORT_MINUS_JOB = 'profile-bulk-import-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ProfileBulkImportJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/profile_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ProfileEnum(str, Enum): 22 | """ 23 | ProfileEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | PROFILE = 'profile' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ProfileEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/profile_merge_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ProfileMergeEnum(str, Enum): 22 | """ 23 | ProfileMergeEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | PROFILE_MINUS_MERGE = 'profile-merge' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ProfileMergeEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/profile_subscription_bulk_create_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ProfileSubscriptionBulkCreateJobEnum(str, Enum): 22 | """ 23 | ProfileSubscriptionBulkCreateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | PROFILE_MINUS_SUBSCRIPTION_MINUS_BULK_MINUS_CREATE_MINUS_JOB = 'profile-subscription-bulk-create-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ProfileSubscriptionBulkCreateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/profile_subscription_bulk_delete_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ProfileSubscriptionBulkDeleteJobEnum(str, Enum): 22 | """ 23 | ProfileSubscriptionBulkDeleteJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | PROFILE_MINUS_SUBSCRIPTION_MINUS_BULK_MINUS_DELETE_MINUS_JOB = 'profile-subscription-bulk-delete-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ProfileSubscriptionBulkDeleteJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/profile_suppression_bulk_create_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ProfileSuppressionBulkCreateJobEnum(str, Enum): 22 | """ 23 | ProfileSuppressionBulkCreateJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | PROFILE_MINUS_SUPPRESSION_MINUS_BULK_MINUS_CREATE_MINUS_JOB = 'profile-suppression-bulk-create-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ProfileSuppressionBulkCreateJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/profile_suppression_bulk_delete_job_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ProfileSuppressionBulkDeleteJobEnum(str, Enum): 22 | """ 23 | ProfileSuppressionBulkDeleteJobEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | PROFILE_MINUS_SUPPRESSION_MINUS_BULK_MINUS_DELETE_MINUS_JOB = 'profile-suppression-bulk-delete-job' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ProfileSuppressionBulkDeleteJobEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/push_channel.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List, Optional 22 | from openapi_client.models.push_marketing import PushMarketing 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class PushChannel(BaseModel): 27 | """ 28 | PushChannel 29 | """ # noqa: E501 30 | marketing: Optional[PushMarketing] = None 31 | __properties: ClassVar[List[str]] = ["marketing"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of PushChannel from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of marketing 73 | if self.marketing: 74 | _dict['marketing'] = self.marketing.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of PushChannel from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "marketing": PushMarketing.from_dict(obj["marketing"]) if obj.get("marketing") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/push_token_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class PushTokenEnum(str, Enum): 22 | """ 23 | PushTokenEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | PUSH_MINUS_TOKEN = 'push-token' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of PushTokenEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/relationship_links.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class RelationshipLinks(BaseModel): 26 | """ 27 | RelationshipLinks 28 | """ # noqa: E501 29 | var_self: StrictStr = Field(alias="self") 30 | related: StrictStr 31 | __properties: ClassVar[List[str]] = ["self", "related"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of RelationshipLinks from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | return _dict 73 | 74 | @classmethod 75 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 76 | """Create an instance of RelationshipLinks from a dict""" 77 | if obj is None: 78 | return None 79 | 80 | if not isinstance(obj, dict): 81 | return cls.model_validate(obj) 82 | 83 | _obj = cls.model_validate({ 84 | "self": obj.get("self"), 85 | "related": obj.get("related") 86 | }) 87 | return _obj 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/openapi_client/models/review_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class ReviewEnum(str, Enum): 22 | """ 23 | ReviewEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | REVIEW = 'review' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of ReviewEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/segment_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class SegmentEnum(str, Enum): 22 | """ 23 | SegmentEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | SEGMENT = 'segment' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of SegmentEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/segment_series_report_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class SegmentSeriesReportEnum(str, Enum): 22 | """ 23 | SegmentSeriesReportEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | SEGMENT_MINUS_SERIES_MINUS_REPORT = 'segment-series-report' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of SegmentSeriesReportEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/segment_values_report_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class SegmentValuesReportEnum(str, Enum): 22 | """ 23 | SegmentValuesReportEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | SEGMENT_MINUS_VALUES_MINUS_REPORT = 'segment-values-report' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of SegmentValuesReportEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/send_options.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, StrictBool 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class SendOptions(BaseModel): 26 | """ 27 | SendOptions 28 | """ # noqa: E501 29 | use_smart_sending: StrictBool 30 | is_transactional: StrictBool 31 | __properties: ClassVar[List[str]] = ["use_smart_sending", "is_transactional"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of SendOptions from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | return _dict 73 | 74 | @classmethod 75 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 76 | """Create an instance of SendOptions from a dict""" 77 | if obj is None: 78 | return None 79 | 80 | if not isinstance(obj, dict): 81 | return cls.model_validate(obj) 82 | 83 | _obj = cls.model_validate({ 84 | "use_smart_sending": obj.get("use_smart_sending"), 85 | "is_transactional": obj.get("is_transactional") 86 | }) 87 | return _obj 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/openapi_client/models/send_time.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from datetime import datetime 21 | from pydantic import BaseModel, ConfigDict, Field, StrictBool 22 | from typing import Any, ClassVar, Dict, List 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class SendTime(BaseModel): 27 | """ 28 | SendTime 29 | """ # noqa: E501 30 | datetime_: datetime = Field(description="The datetime that the message is to be sent", alias="datetime") 31 | is_local: StrictBool = Field(description="Whether that datetime is to be a local datetime for the recipient") 32 | __properties: ClassVar[List[str]] = ["datetime", "is_local"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of SendTime from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of SendTime from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "datetime": obj.get("datetime"), 86 | "is_local": obj.get("is_local") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/send_time_sub_object.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from datetime import datetime 21 | from pydantic import BaseModel, ConfigDict, Field, StrictBool 22 | from typing import Any, ClassVar, Dict, List 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class SendTimeSubObject(BaseModel): 27 | """ 28 | SendTimeSubObject 29 | """ # noqa: E501 30 | datetime_: datetime = Field(description="The datetime that the message is to be sent", alias="datetime") 31 | is_local: StrictBool = Field(description="Whether that datetime is to be a local datetime for the recipient") 32 | __properties: ClassVar[List[str]] = ["datetime", "is_local"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of SendTimeSubObject from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of SendTimeSubObject from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "datetime": obj.get("datetime"), 86 | "is_local": obj.get("is_local") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/series_data.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class SeriesData(BaseModel): 26 | """ 27 | SeriesData 28 | """ # noqa: E501 29 | groupings: Dict[str, Any] = Field(description="Applied groupings and the values for this object") 30 | statistics: Dict[str, Any] = Field(description="Requested statistics and their series result") 31 | __properties: ClassVar[List[str]] = ["groupings", "statistics"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of SeriesData from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | return _dict 73 | 74 | @classmethod 75 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 76 | """Create an instance of SeriesData from a dict""" 77 | if obj is None: 78 | return None 79 | 80 | if not isinstance(obj, dict): 81 | return cls.model_validate(obj) 82 | 83 | _obj = cls.model_validate({ 84 | "groupings": obj.get("groupings"), 85 | "statistics": obj.get("statistics") 86 | }) 87 | return _obj 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/openapi_client/models/tag_campaign_op_data_inner.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.campaign_enum import CampaignEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class TagCampaignOpDataInner(BaseModel): 27 | """ 28 | TagCampaignOpDataInner 29 | """ # noqa: E501 30 | type: CampaignEnum 31 | id: StrictStr = Field(description="The IDs of the campaigns to link or unlink with the given Tag ID") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of TagCampaignOpDataInner from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of TagCampaignOpDataInner from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/tag_create_query.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.tag_create_query_resource_object import TagCreateQueryResourceObject 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class TagCreateQuery(BaseModel): 27 | """ 28 | TagCreateQuery 29 | """ # noqa: E501 30 | data: TagCreateQueryResourceObject 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of TagCreateQuery from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of TagCreateQuery from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": TagCreateQueryResourceObject.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/tag_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class TagEnum(str, Enum): 22 | """ 23 | TagEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | TAG = 'tag' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of TagEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/tag_flow_op_data_inner.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.flow_enum import FlowEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class TagFlowOpDataInner(BaseModel): 27 | """ 28 | TagFlowOpDataInner 29 | """ # noqa: E501 30 | type: FlowEnum 31 | id: StrictStr = Field(description="The IDs of the flows to link or unlink with the given Tag ID") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of TagFlowOpDataInner from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of TagFlowOpDataInner from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/tag_group_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class TagGroupEnum(str, Enum): 22 | """ 23 | TagGroupEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | TAG_MINUS_GROUP = 'tag-group' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of TagGroupEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/tag_list_op_data_inner.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.list_enum import ListEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class TagListOpDataInner(BaseModel): 27 | """ 28 | TagListOpDataInner 29 | """ # noqa: E501 30 | type: ListEnum 31 | id: StrictStr = Field(description="The IDs of the lists to link or unlink with the given Tag ID") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of TagListOpDataInner from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of TagListOpDataInner from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/tag_segment_op_data_inner.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field, StrictStr 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.segment_enum import SegmentEnum 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class TagSegmentOpDataInner(BaseModel): 27 | """ 28 | TagSegmentOpDataInner 29 | """ # noqa: E501 30 | type: SegmentEnum 31 | id: StrictStr = Field(description="The IDs of the segments to link or unlink with the given Tag ID") 32 | __properties: ClassVar[List[str]] = ["type", "id"] 33 | 34 | model_config = ConfigDict( 35 | populate_by_name=True, 36 | validate_assignment=True, 37 | protected_namespaces=(), 38 | ) 39 | 40 | 41 | def to_str(self) -> str: 42 | """Returns the string representation of the model using alias""" 43 | return pprint.pformat(self.model_dump(by_alias=True)) 44 | 45 | def to_json(self) -> str: 46 | """Returns the JSON representation of the model using alias""" 47 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 48 | return json.dumps(self.to_dict()) 49 | 50 | @classmethod 51 | def from_json(cls, json_str: str) -> Optional[Self]: 52 | """Create an instance of TagSegmentOpDataInner from a JSON string""" 53 | return cls.from_dict(json.loads(json_str)) 54 | 55 | def to_dict(self) -> Dict[str, Any]: 56 | """Return the dictionary representation of the model using alias. 57 | 58 | This has the following differences from calling pydantic's 59 | `self.model_dump(by_alias=True)`: 60 | 61 | * `None` is only added to the output dict for nullable fields that 62 | were set at model initialization. Other fields with value `None` 63 | are ignored. 64 | """ 65 | excluded_fields: Set[str] = set([ 66 | ]) 67 | 68 | _dict = self.model_dump( 69 | by_alias=True, 70 | exclude=excluded_fields, 71 | exclude_none=True, 72 | ) 73 | return _dict 74 | 75 | @classmethod 76 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 77 | """Create an instance of TagSegmentOpDataInner from a dict""" 78 | if obj is None: 79 | return None 80 | 81 | if not isinstance(obj, dict): 82 | return cls.model_validate(obj) 83 | 84 | _obj = cls.model_validate({ 85 | "type": obj.get("type"), 86 | "id": obj.get("id") 87 | }) 88 | return _obj 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/openapi_client/models/tag_update_query.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict 21 | from typing import Any, ClassVar, Dict, List 22 | from openapi_client.models.tag_update_query_resource_object import TagUpdateQueryResourceObject 23 | from typing import Optional, Set 24 | from typing_extensions import Self 25 | 26 | class TagUpdateQuery(BaseModel): 27 | """ 28 | TagUpdateQuery 29 | """ # noqa: E501 30 | data: TagUpdateQueryResourceObject 31 | __properties: ClassVar[List[str]] = ["data"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of TagUpdateQuery from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | # override the default output from pydantic by calling `to_dict()` of data 73 | if self.data: 74 | _dict['data'] = self.data.to_dict() 75 | return _dict 76 | 77 | @classmethod 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 79 | """Create an instance of TagUpdateQuery from a dict""" 80 | if obj is None: 81 | return None 82 | 83 | if not isinstance(obj, dict): 84 | return cls.model_validate(obj) 85 | 86 | _obj = cls.model_validate({ 87 | "data": TagUpdateQueryResourceObject.from_dict(obj["data"]) if obj.get("data") is not None else None 88 | }) 89 | return _obj 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/openapi_client/models/template_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class TemplateEnum(str, Enum): 22 | """ 23 | TemplateEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | TEMPLATE = 'template' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of TemplateEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/template_universal_content_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class TemplateUniversalContentEnum(str, Enum): 22 | """ 23 | TemplateUniversalContentEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | TEMPLATE_MINUS_UNIVERSAL_MINUS_CONTENT = 'template-universal-content' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of TemplateUniversalContentEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/tracking_setting_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class TrackingSettingEnum(str, Enum): 22 | """ 23 | TrackingSettingEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | TRACKING_MINUS_SETTING = 'tracking-setting' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of TrackingSettingEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/values_data.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import pprint 17 | import re # noqa: F401 18 | import json 19 | 20 | from pydantic import BaseModel, ConfigDict, Field 21 | from typing import Any, ClassVar, Dict, List 22 | from typing import Optional, Set 23 | from typing_extensions import Self 24 | 25 | class ValuesData(BaseModel): 26 | """ 27 | ValuesData 28 | """ # noqa: E501 29 | groupings: Dict[str, Any] = Field(description="Applied groupings and the values for this object") 30 | statistics: Dict[str, Any] = Field(description="Requested statistics and their values results") 31 | __properties: ClassVar[List[str]] = ["groupings", "statistics"] 32 | 33 | model_config = ConfigDict( 34 | populate_by_name=True, 35 | validate_assignment=True, 36 | protected_namespaces=(), 37 | ) 38 | 39 | 40 | def to_str(self) -> str: 41 | """Returns the string representation of the model using alias""" 42 | return pprint.pformat(self.model_dump(by_alias=True)) 43 | 44 | def to_json(self) -> str: 45 | """Returns the JSON representation of the model using alias""" 46 | # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 | return json.dumps(self.to_dict()) 48 | 49 | @classmethod 50 | def from_json(cls, json_str: str) -> Optional[Self]: 51 | """Create an instance of ValuesData from a JSON string""" 52 | return cls.from_dict(json.loads(json_str)) 53 | 54 | def to_dict(self) -> Dict[str, Any]: 55 | """Return the dictionary representation of the model using alias. 56 | 57 | This has the following differences from calling pydantic's 58 | `self.model_dump(by_alias=True)`: 59 | 60 | * `None` is only added to the output dict for nullable fields that 61 | were set at model initialization. Other fields with value `None` 62 | are ignored. 63 | """ 64 | excluded_fields: Set[str] = set([ 65 | ]) 66 | 67 | _dict = self.model_dump( 68 | by_alias=True, 69 | exclude=excluded_fields, 70 | exclude_none=True, 71 | ) 72 | return _dict 73 | 74 | @classmethod 75 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 76 | """Create an instance of ValuesData from a dict""" 77 | if obj is None: 78 | return None 79 | 80 | if not isinstance(obj, dict): 81 | return cls.model_validate(obj) 82 | 83 | _obj = cls.model_validate({ 84 | "groupings": obj.get("groupings"), 85 | "statistics": obj.get("statistics") 86 | }) 87 | return _obj 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/openapi_client/models/web_feed_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class WebFeedEnum(str, Enum): 22 | """ 23 | WebFeedEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | WEB_MINUS_FEED = 'web-feed' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of WebFeedEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/webhook_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class WebhookEnum(str, Enum): 22 | """ 23 | WebhookEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | WEBHOOK = 'webhook' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of WebhookEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/models/webhook_topic_enum.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Klaviyo API 5 | 6 | The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. 7 | 8 | Contact: developers@klaviyo.com 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | from __future__ import annotations 16 | import json 17 | from enum import Enum 18 | from typing_extensions import Self 19 | 20 | 21 | class WebhookTopicEnum(str, Enum): 22 | """ 23 | WebhookTopicEnum 24 | """ 25 | 26 | """ 27 | allowed enum values 28 | """ 29 | WEBHOOK_MINUS_TOPIC = 'webhook-topic' 30 | 31 | @classmethod 32 | def from_json(cls, json_str: str) -> Self: 33 | """Create an instance of WebhookTopicEnum from a JSON string""" 34 | return cls(json.loads(json_str)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/openapi_client/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/klaviyo/klaviyo-api-python/1ca9f5e477302e8ef4e20e560f956db70414e84c/src/openapi_client/py.typed --------------------------------------------------------------------------------