klaviyo-api-sdk 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +335 -119
- data/docs/AudiencesSubObject.md +20 -0
- data/docs/CampaignCloneQuery.md +18 -0
- data/docs/CampaignCloneQueryAsSubResource.md +20 -0
- data/docs/CampaignCloneQueryAsSubResourceAttributes.md +20 -0
- data/docs/CampaignCreateQuery.md +18 -0
- data/docs/CampaignCreateQueryAsSubResource.md +20 -0
- data/docs/CampaignCreateQueryAsSubResourceAttributes.md +28 -0
- data/docs/CampaignMessageAssignTemplateQuery.md +18 -0
- data/docs/CampaignMessageAssignTemplateQueryAsSubResource.md +20 -0
- data/docs/CampaignMessageAssignTemplateQueryAsSubResourceAttributes.md +20 -0
- data/docs/CampaignMessagePartialUpdateQuery.md +18 -0
- data/docs/CampaignMessagePartialUpdateQueryAsSubResource.md +22 -0
- data/docs/CampaignMessagePartialUpdateQueryAsSubResourceAttributes.md +20 -0
- data/docs/CampaignPartialUpdateQuery.md +18 -0
- data/docs/CampaignPartialUpdateQueryAsSubResource.md +22 -0
- data/docs/CampaignPartialUpdateQueryAsSubResourceAttributes.md +26 -0
- data/docs/CampaignSendJobCreateQuery.md +18 -0
- data/docs/CampaignSendJobCreateQueryAsSubResource.md +20 -0
- data/docs/CampaignSendJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CampaignSendJobPartialUpdateQuery.md +18 -0
- data/docs/CampaignSendJobPartialUpdateQueryAsSubResource.md +22 -0
- data/docs/CampaignSendJobPartialUpdateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogCategoryCreateQueryAsSubResourceAttributes.md +2 -2
- data/docs/CatalogCategoryDeleteQueryAsSubResource.md +1 -1
- data/docs/CatalogCategoryUpdateQueryAsSubResource.md +1 -1
- data/docs/CatalogItemCreateQueryAsSubResourceAttributes.md +4 -4
- data/docs/CatalogItemDeleteQueryAsSubResource.md +1 -1
- data/docs/CatalogItemUpdateQueryAsSubResource.md +1 -1
- data/docs/CatalogVariantCreateQueryAsSubResourceAttributes.md +4 -4
- data/docs/CatalogVariantDeleteQueryAsSubResource.md +1 -1
- data/docs/CatalogVariantUpdateQueryAsSubResource.md +1 -1
- data/docs/CatalogsApi.md +202 -202
- data/docs/ClientApi.md +11 -11
- data/docs/ContentSubObject.md +28 -0
- data/docs/DataPrivacyApi.md +78 -0
- data/docs/DataPrivacyCreateDeletionJobQuery.md +18 -0
- data/docs/DataPrivacyCreateDeletionJobQueryAsSubResource.md +20 -0
- data/docs/DataPrivacyCreateDeletionJobQueryAsSubResourceAttributes.md +22 -0
- data/docs/ErrorSource.md +2 -2
- data/docs/EventCreateQueryAsSubResourceAttributes.md +8 -8
- data/docs/EventsApi.md +36 -36
- data/docs/FlowsApi.md +139 -69
- data/docs/IncludedCategories.md +1 -1
- data/docs/IncludedMetrics.md +1 -1
- data/docs/IncludedMetricsAttributes.md +4 -4
- data/docs/ListsApi.md +101 -25
- data/docs/MetricAggregateQueryAsSubResourceAttributes.md +15 -15
- data/docs/MetricAggregateRowDTO.md +2 -2
- data/docs/MetricCreateQuery.md +3 -3
- data/docs/MetricsApi.md +14 -14
- data/docs/OnsiteSubscriptionCreateQueryAsSubResourceAttributes.md +10 -10
- data/docs/ProfilesApi.md +31 -31
- data/docs/SegmentsApi.md +102 -23
- data/docs/SendOptionsSubObject.md +20 -0
- data/docs/SendStrategySubObject.md +22 -0
- data/docs/SendTimeSubObject.md +20 -0
- data/docs/StaticScheduleOptions.md +22 -0
- data/docs/SubscriptionCreateJobCreateQueryAsSubResourceAttributes.md +3 -3
- data/docs/Suppression.md +1 -1
- data/docs/SuppressionCreateJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/TagCreateQuery.md +18 -0
- data/docs/TagCreateQueryAsSubResource.md +20 -0
- data/docs/TagCreateQueryAsSubResourceAttributes.md +20 -0
- data/docs/TagGroupCreateQuery.md +18 -0
- data/docs/TagGroupCreateQueryAsSubResource.md +20 -0
- data/docs/TagGroupCreateQueryAsSubResourceAttributes.md +20 -0
- data/docs/TagGroupUpdateQuery.md +18 -0
- data/docs/TagGroupUpdateQueryAsSubResource.md +22 -0
- data/docs/{V2TemplateRenderQueryAsSubResourceAttributes.md → TagGroupUpdateQueryAsSubResourceAttributes.md} +4 -4
- data/docs/TagSegmentOp.md +18 -0
- data/docs/{ListDeleteQueryAsSubResource.md → TagSegmentOpDataInner.md} +2 -2
- data/docs/TagUpdateQuery.md +18 -0
- data/docs/TagUpdateQueryAsSubResource.md +22 -0
- data/docs/TagUpdateQueryAsSubResourceAttributes.md +18 -0
- data/docs/TagsApi.md +1205 -0
- data/docs/TemplateCloneQueryAsSubResource.md +2 -0
- data/docs/TemplateCloneQueryAsSubResourceAttributes.md +5 -3
- data/docs/TemplateCreateQueryAsSubResourceAttributes.md +14 -8
- data/docs/TemplateRenderQuery.md +18 -0
- data/docs/TemplateRenderQueryAsSubResource.md +20 -0
- data/docs/TemplateRenderQueryAsSubResourceAttributes.md +22 -0
- data/docs/TemplateUpdateQueryAsSubResource.md +1 -1
- data/docs/TemplateUpdateQueryAsSubResourceAttributes.md +13 -7
- data/docs/TemplatesApi.md +40 -44
- data/docs/ThrottledScheduleOptions.md +20 -0
- data/docs/TrackingOptionsSubObject.md +24 -0
- data/docs/UTMParamsSubObject.md +20 -0
- data/docs/UnsubscriptionCreateJobCreateQueryAsSubResourceAttributes.md +3 -3
- data/docs/UnsuppressionCreateJobCreateQueryAsSubResource.md +1 -1
- data/docs/UnsuppressionCreateJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/V2TemplateRenderQueryAsSubResource.md +2 -4
- data/klaviyo-api-sdk.gemspec +3 -3
- data/lib/klaviyo-api-sdk/api/catalogs_api.rb +277 -277
- data/lib/klaviyo-api-sdk/api/client_api.rb +12 -12
- data/lib/klaviyo-api-sdk/api/data_privacy_api.rb +92 -0
- data/lib/klaviyo-api-sdk/api/events_api.rb +46 -46
- data/lib/klaviyo-api-sdk/api/flows_api.rb +155 -93
- data/lib/klaviyo-api-sdk/api/lists_api.rb +114 -42
- data/lib/klaviyo-api-sdk/api/metrics_api.rb +21 -21
- data/lib/klaviyo-api-sdk/api/profiles_api.rb +51 -51
- data/lib/klaviyo-api-sdk/api/segments_api.rb +112 -33
- data/lib/klaviyo-api-sdk/api/tags_api.rb +1216 -0
- data/lib/klaviyo-api-sdk/api/templates_api.rb +57 -69
- data/lib/klaviyo-api-sdk/api_client.rb +24 -3
- data/lib/klaviyo-api-sdk/api_error.rb +2 -2
- data/lib/klaviyo-api-sdk/configuration.rb +2 -2
- data/lib/klaviyo-api-sdk/models/audiences_sub_object.rb +234 -0
- data/lib/klaviyo-api-sdk/models/{v2_template_render_query.rb → campaign_clone_query.rb} +6 -6
- data/lib/klaviyo-api-sdk/models/campaign_clone_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/campaign_clone_query_as_sub_resource_attributes.rb +235 -0
- data/lib/klaviyo-api-sdk/models/campaign_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/campaign_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/campaign_create_query_as_sub_resource_attributes.rb +291 -0
- data/lib/klaviyo-api-sdk/models/campaign_message_assign_template_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/campaign_message_assign_template_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/campaign_message_assign_template_query_as_sub_resource_attributes.rb +240 -0
- data/lib/klaviyo-api-sdk/models/campaign_message_partial_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/{included_profile.rb → campaign_message_partial_update_query_as_sub_resource.rb} +12 -25
- data/lib/klaviyo-api-sdk/models/campaign_message_partial_update_query_as_sub_resource_attributes.rb +229 -0
- data/lib/klaviyo-api-sdk/models/campaign_partial_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/campaign_partial_update_query_as_sub_resource.rb +287 -0
- data/lib/klaviyo-api-sdk/models/campaign_partial_update_query_as_sub_resource_attributes.rb +256 -0
- data/lib/klaviyo-api-sdk/models/campaign_send_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/campaign_send_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/campaign_send_job_create_query_as_sub_resource_attributes.rb +225 -0
- data/lib/klaviyo-api-sdk/models/campaign_send_job_partial_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/campaign_send_job_partial_update_query_as_sub_resource.rb +287 -0
- data/lib/klaviyo-api-sdk/models/campaign_send_job_partial_update_query_as_sub_resource_attributes.rb +225 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_create_query_as_sub_resource_attributes.rb +4 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_delete_query_as_sub_resource.rb +3 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_item_op.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_update_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_update_query_as_sub_resource.rb +3 -2
- data/lib/klaviyo-api-sdk/models/catalog_category_update_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_category_op.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_attributes.rb +6 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships_categories.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships_categories_data_inner.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_delete_query_as_sub_resource.rb +3 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_update_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_update_query_as_sub_resource.rb +3 -2
- data/lib/klaviyo-api-sdk/models/catalog_item_update_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_job_error_payload.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_attributes.rb +6 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships_items.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships_items_data_inner.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_delete_query_as_sub_resource.rb +3 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_query_as_sub_resource.rb +3 -2
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/content_sub_object.rb +270 -0
- data/lib/klaviyo-api-sdk/models/data_privacy_create_deletion_job_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/data_privacy_create_deletion_job_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/data_privacy_create_deletion_job_query_as_sub_resource_attributes.rb +240 -0
- data/lib/klaviyo-api-sdk/models/email_message_content.rb +2 -2
- data/lib/klaviyo-api-sdk/models/email_tracking_options.rb +2 -2
- data/lib/klaviyo-api-sdk/models/error_source.rb +4 -2
- data/lib/klaviyo-api-sdk/models/event_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/event_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/event_create_query_as_sub_resource_attributes.rb +7 -2
- data/lib/klaviyo-api-sdk/models/flow_update_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/flow_update_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/flow_update_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/get_catalog_items4_xx_response.rb +2 -2
- data/lib/klaviyo-api-sdk/models/get_catalog_items4_xx_response_errors_inner.rb +2 -2
- data/lib/klaviyo-api-sdk/models/get_catalog_items4_xx_response_errors_inner_source.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_categories.rb +3 -2
- data/lib/klaviyo-api-sdk/models/included_categories_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_flow_action.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_flow_actions.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_flow_actions_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_flow_actions_attributes_tracking_options.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_flow_messages.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_flow_messages_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_flow_messages_attributes_content.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_flows.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_flows_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_items.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_items_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_lists.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_lists_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_metrics.rb +3 -2
- data/lib/klaviyo-api-sdk/models/included_metrics_attributes.rb +6 -2
- data/lib/klaviyo-api-sdk/models/included_profiles.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_profiles_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_segments.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_variants.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_variants_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/included_variants_links.rb +2 -2
- data/lib/klaviyo-api-sdk/models/list_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/list_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/list_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/list_members_add_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/list_members_add_query_data_inner.rb +2 -2
- data/lib/klaviyo-api-sdk/models/list_members_delete_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/list_partial_update_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/list_partial_update_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/metric_aggregate_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/metric_aggregate_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/metric_aggregate_query_as_sub_resource_attributes.rb +14 -8
- data/lib/klaviyo-api-sdk/models/metric_aggregate_row_dto.rb +4 -2
- data/lib/klaviyo-api-sdk/models/metric_create_query.rb +4 -2
- data/lib/klaviyo-api-sdk/models/onsite_profile_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/onsite_profile_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/onsite_profile_meta.rb +2 -2
- data/lib/klaviyo-api-sdk/models/onsite_profile_meta_identifiers.rb +2 -2
- data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query_as_sub_resource_attributes.rb +7 -2
- data/lib/klaviyo-api-sdk/models/profile_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/profile_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/profile_create_query_as_sub_resource_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/profile_location.rb +2 -2
- data/lib/klaviyo-api-sdk/models/profile_location_latitude.rb +2 -2
- data/lib/klaviyo-api-sdk/models/profile_partial_update_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/profile_partial_update_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/segment_partial_update_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/segment_partial_update_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/send_options.rb +2 -2
- data/lib/klaviyo-api-sdk/models/send_options_sub_object.rb +230 -0
- data/lib/klaviyo-api-sdk/models/send_strategy_sub_object.rb +243 -0
- data/lib/klaviyo-api-sdk/models/send_time_sub_object.rb +240 -0
- data/lib/klaviyo-api-sdk/models/sms_message_content.rb +2 -2
- data/lib/klaviyo-api-sdk/models/sms_render_options.rb +2 -2
- data/lib/klaviyo-api-sdk/models/sms_tracking_options.rb +2 -2
- data/lib/klaviyo-api-sdk/models/static_schedule_options.rb +245 -0
- data/lib/klaviyo-api-sdk/models/subscription.rb +2 -2
- data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query_as_sub_resource_attributes.rb +5 -2
- data/lib/klaviyo-api-sdk/models/suppression.rb +3 -2
- data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query_as_sub_resource_attributes.rb +3 -2
- data/lib/klaviyo-api-sdk/models/tag_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/tag_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/tag_create_query_as_sub_resource_attributes.rb +235 -0
- data/lib/klaviyo-api-sdk/models/tag_group_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/tag_group_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/tag_group_create_query_as_sub_resource_attributes.rb +234 -0
- data/lib/klaviyo-api-sdk/models/tag_group_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/tag_group_update_query_as_sub_resource.rb +287 -0
- data/lib/klaviyo-api-sdk/models/{v2_template_render_query_as_sub_resource_attributes.rb → tag_group_update_query_as_sub_resource_attributes.rb} +16 -15
- data/lib/klaviyo-api-sdk/models/tag_segment_op.rb +226 -0
- data/lib/klaviyo-api-sdk/models/{list_delete_query_as_sub_resource.rb → tag_segment_op_data_inner.rb} +7 -7
- data/lib/klaviyo-api-sdk/models/tag_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/tag_update_query_as_sub_resource.rb +287 -0
- data/lib/klaviyo-api-sdk/models/tag_update_query_as_sub_resource_attributes.rb +225 -0
- data/lib/klaviyo-api-sdk/models/template_clone_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/template_clone_query_as_sub_resource.rb +14 -3
- data/lib/klaviyo-api-sdk/models/template_clone_query_as_sub_resource_attributes.rb +20 -3
- data/lib/klaviyo-api-sdk/models/template_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/template_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/template_create_query_as_sub_resource_attributes.rb +7 -2
- data/lib/klaviyo-api-sdk/models/template_render_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/{template_delete_query_as_sub_resource.rb → template_render_query_as_sub_resource.rb} +15 -15
- data/lib/klaviyo-api-sdk/models/template_render_query_as_sub_resource_attributes.rb +252 -0
- data/lib/klaviyo-api-sdk/models/template_update_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/template_update_query_as_sub_resource.rb +3 -2
- data/lib/klaviyo-api-sdk/models/template_update_query_as_sub_resource_attributes.rb +6 -2
- data/lib/klaviyo-api-sdk/models/throttled_schedule_options.rb +240 -0
- data/lib/klaviyo-api-sdk/models/tracking_options_sub_object.rb +252 -0
- data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query_as_sub_resource.rb +2 -2
- data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query_as_sub_resource_attributes.rb +5 -7
- data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query.rb +2 -2
- data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query_as_sub_resource.rb +3 -3
- data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query_as_sub_resource_attributes.rb +227 -0
- data/lib/klaviyo-api-sdk/models/utm_param_info.rb +2 -2
- data/lib/klaviyo-api-sdk/models/utm_params_sub_object.rb +240 -0
- data/lib/klaviyo-api-sdk/models/v2_template_render_query_as_sub_resource.rb +11 -62
- data/lib/klaviyo-api-sdk/version.rb +2 -2
- data/lib/klaviyo-api-sdk.rb +55 -7
- data/spec/api/catalogs_api_spec.rb +94 -94
- data/spec/api/client_api_spec.rb +5 -5
- data/spec/api/data_privacy_api_spec.rb +47 -0
- data/spec/api/events_api_spec.rb +19 -19
- data/spec/api/flows_api_spec.rb +44 -33
- data/spec/api/lists_api_spec.rb +28 -15
- data/spec/api/metrics_api_spec.rb +8 -8
- data/spec/api/profiles_api_spec.rb +21 -21
- data/spec/api/segments_api_spec.rb +24 -10
- data/spec/api/tags_api_spec.rb +245 -0
- data/spec/api/templates_api_spec.rb +18 -18
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/audiences_sub_object_spec.rb +40 -0
- data/spec/models/campaign_clone_query_as_sub_resource_attributes_spec.rb +40 -0
- data/spec/models/campaign_clone_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/{v2_template_render_query_spec.rb → campaign_clone_query_spec.rb} +8 -8
- data/spec/models/campaign_create_query_as_sub_resource_attributes_spec.rb +64 -0
- data/spec/models/campaign_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/campaign_create_query_spec.rb +34 -0
- data/spec/models/campaign_message_assign_template_query_as_sub_resource_attributes_spec.rb +40 -0
- data/spec/models/campaign_message_assign_template_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/campaign_message_assign_template_query_spec.rb +34 -0
- data/spec/models/campaign_message_partial_update_query_as_sub_resource_attributes_spec.rb +40 -0
- data/spec/models/campaign_message_partial_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/campaign_message_partial_update_query_spec.rb +34 -0
- data/spec/models/campaign_partial_update_query_as_sub_resource_attributes_spec.rb +58 -0
- data/spec/models/campaign_partial_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/campaign_partial_update_query_spec.rb +34 -0
- data/spec/models/campaign_send_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/campaign_send_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/campaign_send_job_create_query_spec.rb +34 -0
- data/spec/models/campaign_send_job_partial_update_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/campaign_send_job_partial_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/campaign_send_job_partial_update_query_spec.rb +34 -0
- data/spec/models/catalog_category_create_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_category_create_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_category_create_job_create_query_spec.rb +2 -2
- data/spec/models/catalog_category_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_category_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_category_create_query_spec.rb +2 -2
- data/spec/models/catalog_category_delete_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_category_delete_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_category_delete_job_create_query_spec.rb +2 -2
- data/spec/models/catalog_category_delete_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_category_item_op_spec.rb +2 -2
- data/spec/models/catalog_category_update_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_category_update_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_category_update_job_create_query_spec.rb +2 -2
- data/spec/models/catalog_category_update_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_category_update_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_category_update_query_spec.rb +2 -2
- data/spec/models/catalog_item_category_op_spec.rb +2 -2
- data/spec/models/catalog_item_create_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_item_create_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_item_create_job_create_query_spec.rb +2 -2
- data/spec/models/catalog_item_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_item_create_query_as_sub_resource_relationships_categories_data_inner_spec.rb +2 -2
- data/spec/models/catalog_item_create_query_as_sub_resource_relationships_categories_spec.rb +2 -2
- data/spec/models/catalog_item_create_query_as_sub_resource_relationships_spec.rb +2 -2
- data/spec/models/catalog_item_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_item_create_query_spec.rb +2 -2
- data/spec/models/catalog_item_delete_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_item_delete_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_item_delete_job_create_query_spec.rb +2 -2
- data/spec/models/catalog_item_delete_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_item_update_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_item_update_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_item_update_job_create_query_spec.rb +2 -2
- data/spec/models/catalog_item_update_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_item_update_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_item_update_query_spec.rb +2 -2
- data/spec/models/catalog_job_error_payload_spec.rb +2 -2
- data/spec/models/catalog_variant_create_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_variant_create_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_variant_create_job_create_query_spec.rb +2 -2
- data/spec/models/catalog_variant_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_variant_create_query_as_sub_resource_relationships_items_data_inner_spec.rb +2 -2
- data/spec/models/catalog_variant_create_query_as_sub_resource_relationships_items_spec.rb +2 -2
- data/spec/models/catalog_variant_create_query_as_sub_resource_relationships_spec.rb +2 -2
- data/spec/models/catalog_variant_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_variant_create_query_spec.rb +2 -2
- data/spec/models/catalog_variant_delete_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_variant_delete_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_variant_delete_job_create_query_spec.rb +2 -2
- data/spec/models/catalog_variant_delete_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_variant_update_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_variant_update_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_variant_update_job_create_query_spec.rb +2 -2
- data/spec/models/catalog_variant_update_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/catalog_variant_update_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/catalog_variant_update_query_spec.rb +2 -2
- data/spec/models/content_sub_object_spec.rb +64 -0
- data/spec/models/data_privacy_create_deletion_job_query_as_sub_resource_attributes_spec.rb +46 -0
- data/spec/models/data_privacy_create_deletion_job_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/data_privacy_create_deletion_job_query_spec.rb +34 -0
- data/spec/models/email_message_content_spec.rb +2 -2
- data/spec/models/email_tracking_options_spec.rb +2 -2
- data/spec/models/error_source_spec.rb +2 -2
- data/spec/models/event_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/event_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/event_create_query_spec.rb +2 -2
- data/spec/models/flow_update_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/flow_update_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/flow_update_query_spec.rb +2 -2
- data/spec/models/get_catalog_items4_xx_response_errors_inner_source_spec.rb +2 -2
- data/spec/models/get_catalog_items4_xx_response_errors_inner_spec.rb +2 -2
- data/spec/models/get_catalog_items4_xx_response_spec.rb +2 -2
- data/spec/models/included_categories_attributes_spec.rb +2 -2
- data/spec/models/included_categories_spec.rb +2 -2
- data/spec/models/included_flow_action_spec.rb +2 -2
- data/spec/models/included_flow_actions_attributes_spec.rb +2 -2
- data/spec/models/included_flow_actions_attributes_tracking_options_spec.rb +2 -2
- data/spec/models/included_flow_actions_spec.rb +2 -2
- data/spec/models/included_flow_messages_attributes_content_spec.rb +2 -2
- data/spec/models/included_flow_messages_attributes_spec.rb +2 -2
- data/spec/models/included_flow_messages_spec.rb +2 -2
- data/spec/models/included_flows_attributes_spec.rb +2 -2
- data/spec/models/included_flows_spec.rb +2 -2
- data/spec/models/included_items_attributes_spec.rb +2 -2
- data/spec/models/included_items_spec.rb +2 -2
- data/spec/models/included_lists_attributes_spec.rb +2 -2
- data/spec/models/included_lists_spec.rb +2 -2
- data/spec/models/included_metrics_attributes_spec.rb +2 -2
- data/spec/models/included_metrics_spec.rb +2 -2
- data/spec/models/included_profiles_attributes_spec.rb +2 -2
- data/spec/models/included_profiles_spec.rb +2 -2
- data/spec/models/included_segments_spec.rb +2 -2
- data/spec/models/included_variants_attributes_spec.rb +2 -2
- data/spec/models/included_variants_links_spec.rb +2 -2
- data/spec/models/included_variants_spec.rb +2 -2
- data/spec/models/list_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/list_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/list_create_query_spec.rb +2 -2
- data/spec/models/list_members_add_query_data_inner_spec.rb +2 -2
- data/spec/models/list_members_add_query_spec.rb +2 -2
- data/spec/models/list_members_delete_query_spec.rb +2 -2
- data/spec/models/list_partial_update_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/list_partial_update_query_spec.rb +2 -2
- data/spec/models/metric_aggregate_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/metric_aggregate_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/metric_aggregate_query_spec.rb +2 -2
- data/spec/models/metric_aggregate_row_dto_spec.rb +2 -2
- data/spec/models/metric_create_query_spec.rb +2 -2
- data/spec/models/onsite_profile_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/onsite_profile_create_query_spec.rb +2 -2
- data/spec/models/onsite_profile_meta_identifiers_spec.rb +2 -2
- data/spec/models/onsite_profile_meta_spec.rb +2 -2
- data/spec/models/onsite_subscription_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/onsite_subscription_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/onsite_subscription_create_query_spec.rb +2 -2
- data/spec/models/profile_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/profile_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/profile_create_query_spec.rb +2 -2
- data/spec/models/profile_location_latitude_spec.rb +2 -2
- data/spec/models/profile_location_spec.rb +2 -2
- data/spec/models/profile_partial_update_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/profile_partial_update_query_spec.rb +2 -2
- data/spec/models/segment_partial_update_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/segment_partial_update_query_spec.rb +2 -2
- data/spec/models/send_options_spec.rb +2 -2
- data/spec/models/send_options_sub_object_spec.rb +40 -0
- data/spec/models/send_strategy_sub_object_spec.rb +46 -0
- data/spec/models/send_time_sub_object_spec.rb +40 -0
- data/spec/models/sms_message_content_spec.rb +2 -2
- data/spec/models/sms_render_options_spec.rb +2 -2
- data/spec/models/sms_tracking_options_spec.rb +2 -2
- data/spec/models/static_schedule_options_spec.rb +46 -0
- data/spec/models/subscription_create_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/subscription_create_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/subscription_create_job_create_query_spec.rb +2 -2
- data/spec/models/subscription_spec.rb +2 -2
- data/spec/models/suppression_create_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/suppression_create_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/suppression_create_job_create_query_spec.rb +2 -2
- data/spec/models/suppression_spec.rb +2 -2
- data/spec/models/tag_create_query_as_sub_resource_attributes_spec.rb +40 -0
- data/spec/models/tag_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/tag_create_query_spec.rb +34 -0
- data/spec/models/tag_group_create_query_as_sub_resource_attributes_spec.rb +40 -0
- data/spec/models/tag_group_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/tag_group_create_query_spec.rb +34 -0
- data/spec/models/{v2_template_render_query_as_sub_resource_attributes_spec.rb → tag_group_update_query_as_sub_resource_attributes_spec.rb} +9 -9
- data/spec/models/tag_group_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/tag_group_update_query_spec.rb +34 -0
- data/spec/models/{list_delete_query_as_sub_resource_spec.rb → tag_segment_op_data_inner_spec.rb} +9 -9
- data/spec/models/tag_segment_op_spec.rb +34 -0
- data/spec/models/tag_update_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/{included_profile_spec.rb → tag_update_query_as_sub_resource_spec.rb} +9 -15
- data/spec/models/tag_update_query_spec.rb +34 -0
- data/spec/models/template_clone_query_as_sub_resource_attributes_spec.rb +8 -2
- data/spec/models/template_clone_query_as_sub_resource_spec.rb +8 -2
- data/spec/models/template_clone_query_spec.rb +2 -2
- data/spec/models/template_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/template_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/template_create_query_spec.rb +2 -2
- data/spec/models/template_render_query_as_sub_resource_attributes_spec.rb +46 -0
- data/spec/models/{template_delete_query_as_sub_resource_spec.rb → template_render_query_as_sub_resource_spec.rb} +9 -9
- data/spec/models/template_render_query_spec.rb +34 -0
- data/spec/models/template_update_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/template_update_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/template_update_query_spec.rb +2 -2
- data/spec/models/throttled_schedule_options_spec.rb +40 -0
- data/spec/models/tracking_options_sub_object_spec.rb +52 -0
- data/spec/models/unsubscription_create_job_create_query_as_sub_resource_attributes_spec.rb +2 -2
- data/spec/models/unsubscription_create_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/unsubscription_create_job_create_query_spec.rb +2 -2
- data/spec/models/unsuppression_create_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/unsuppression_create_job_create_query_as_sub_resource_spec.rb +2 -2
- data/spec/models/unsuppression_create_job_create_query_spec.rb +2 -2
- data/spec/models/utm_param_info_spec.rb +2 -2
- data/spec/models/utm_params_sub_object_spec.rb +40 -0
- data/spec/models/v2_template_render_query_as_sub_resource_spec.rb +3 -13
- data/spec/spec_helper.rb +2 -2
- metadata +165 -21
- data/docs/IncludedProfile.md +0 -24
- data/docs/TemplateDeleteQueryAsSubResource.md +0 -20
- data/docs/V2TemplateRenderQuery.md +0 -18
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2023-01-24
|
|
7
7
|
Contact: developers@klaviyo.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 6.
|
|
9
|
+
OpenAPI Generator version: 6.2.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -20,8 +20,8 @@ module KlaviyoAPI
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create Template
|
|
23
|
-
# Create a new custom HTML template. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/
|
|
24
|
-
# @param template_create_query [TemplateCreateQuery]
|
|
23
|
+
# Create a new custom HTML template. If there are 1,000 or more templates in an account, creation will fail as there is a limit of 1,000 templates that can be created via the API. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Write`
|
|
24
|
+
# @param template_create_query [TemplateCreateQuery]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [Hash<String, Object>]
|
|
27
27
|
def create_template(template_create_query, opts = {})
|
|
@@ -30,8 +30,8 @@ module KlaviyoAPI
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create Template
|
|
33
|
-
# Create a new custom HTML template. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/
|
|
34
|
-
# @param template_create_query [TemplateCreateQuery]
|
|
33
|
+
# Create a new custom HTML template. If there are 1,000 or more templates in an account, creation will fail as there is a limit of 1,000 templates that can be created via the API. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Write`
|
|
34
|
+
# @param template_create_query [TemplateCreateQuery]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
37
37
|
def create_template_with_http_info(template_create_query, opts = {})
|
|
@@ -51,7 +51,7 @@ module KlaviyoAPI
|
|
|
51
51
|
# header parameters
|
|
52
52
|
header_params = opts[:header_params] || {}
|
|
53
53
|
# klaviyo api revision
|
|
54
|
-
header_params['revision'] = ENV['API_REVISION'] || "
|
|
54
|
+
header_params['revision'] = ENV['API_REVISION'] || "2023-01-24"
|
|
55
55
|
# HTTP header 'Accept' (if needed)
|
|
56
56
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
57
57
|
# HTTP header 'Content-Type'
|
|
@@ -90,36 +90,30 @@ module KlaviyoAPI
|
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
# Create Template Clone
|
|
93
|
-
# Create a clone of a template with the given template ID
|
|
94
|
-
# @param
|
|
95
|
-
# @param template_clone_query [TemplateCloneQuery] Query for cloning a template
|
|
93
|
+
# Create a clone of a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Write`
|
|
94
|
+
# @param template_clone_query [TemplateCloneQuery]
|
|
96
95
|
# @param [Hash] opts the optional parameters
|
|
97
96
|
# @return [Hash<String, Object>]
|
|
98
|
-
def create_template_clone(
|
|
99
|
-
data, _status_code, _headers = create_template_clone_with_http_info(
|
|
97
|
+
def create_template_clone(template_clone_query, opts = {})
|
|
98
|
+
data, _status_code, _headers = create_template_clone_with_http_info(template_clone_query, opts)
|
|
100
99
|
data
|
|
101
100
|
end
|
|
102
101
|
|
|
103
102
|
# Create Template Clone
|
|
104
|
-
# Create a clone of a template with the given template ID
|
|
105
|
-
# @param
|
|
106
|
-
# @param template_clone_query [TemplateCloneQuery] Query for cloning a template
|
|
103
|
+
# Create a clone of a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Write`
|
|
104
|
+
# @param template_clone_query [TemplateCloneQuery]
|
|
107
105
|
# @param [Hash] opts the optional parameters
|
|
108
106
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
109
|
-
def create_template_clone_with_http_info(
|
|
107
|
+
def create_template_clone_with_http_info(template_clone_query, opts = {})
|
|
110
108
|
if @api_client.config.debugging
|
|
111
109
|
@api_client.config.logger.debug 'Calling API: TemplatesApi.create_template_clone ...'
|
|
112
110
|
end
|
|
113
|
-
# verify the required parameter 'id' is set
|
|
114
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
115
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.create_template_clone"
|
|
116
|
-
end
|
|
117
111
|
# verify the required parameter 'template_clone_query' is set
|
|
118
112
|
if @api_client.config.client_side_validation && template_clone_query.nil?
|
|
119
113
|
fail ArgumentError, "Missing the required parameter 'template_clone_query' when calling TemplatesApi.create_template_clone"
|
|
120
114
|
end
|
|
121
115
|
# resource path
|
|
122
|
-
local_var_path = '/api/
|
|
116
|
+
local_var_path = '/api/template-clone/'
|
|
123
117
|
|
|
124
118
|
# query parameters
|
|
125
119
|
query_params = opts[:query_params] || {}
|
|
@@ -127,7 +121,7 @@ module KlaviyoAPI
|
|
|
127
121
|
# header parameters
|
|
128
122
|
header_params = opts[:header_params] || {}
|
|
129
123
|
# klaviyo api revision
|
|
130
|
-
header_params['revision'] = ENV['API_REVISION'] || "
|
|
124
|
+
header_params['revision'] = ENV['API_REVISION'] || "2023-01-24"
|
|
131
125
|
# HTTP header 'Accept' (if needed)
|
|
132
126
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
133
127
|
# HTTP header 'Content-Type'
|
|
@@ -166,36 +160,30 @@ module KlaviyoAPI
|
|
|
166
160
|
end
|
|
167
161
|
|
|
168
162
|
# Create Template Render
|
|
169
|
-
# Render a template with the given template ID and context attribute. Returns the HTML and plain text versions of the email template. **Request body parameters** (nested under `attributes`): * `return_fields`: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/
|
|
170
|
-
# @param
|
|
171
|
-
# @param v2_template_render_query [V2TemplateRenderQuery] Query for rendering a template
|
|
163
|
+
# Render a template with the given template ID and context attribute. Returns the HTML and plain text versions of the email template. **Request body parameters** (nested under `attributes`): * `return_fields`: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets). * `context`: This is the context your email template will be rendered with. You must pass in a `context` object as a JSON object. Email templates are rendered with contexts in a similar manner to Django templates. Nested template variables can be referenced via dot notation. Template variables without corresponding `context` values are treated as `FALSE` and output nothing. Ex. `{ \"name\" : \"George Washington\", \"state\" : \"VA\" }`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Templates Read`
|
|
164
|
+
# @param template_render_query [TemplateRenderQuery]
|
|
172
165
|
# @param [Hash] opts the optional parameters
|
|
173
166
|
# @return [Hash<String, Object>]
|
|
174
|
-
def create_template_render(
|
|
175
|
-
data, _status_code, _headers = create_template_render_with_http_info(
|
|
167
|
+
def create_template_render(template_render_query, opts = {})
|
|
168
|
+
data, _status_code, _headers = create_template_render_with_http_info(template_render_query, opts)
|
|
176
169
|
data
|
|
177
170
|
end
|
|
178
171
|
|
|
179
172
|
# Create Template Render
|
|
180
|
-
# Render a template with the given template ID and context attribute. Returns the HTML and plain text versions of the email template. **Request body parameters** (nested under `attributes`): * `return_fields`: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/
|
|
181
|
-
# @param
|
|
182
|
-
# @param v2_template_render_query [V2TemplateRenderQuery] Query for rendering a template
|
|
173
|
+
# Render a template with the given template ID and context attribute. Returns the HTML and plain text versions of the email template. **Request body parameters** (nested under `attributes`): * `return_fields`: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets). * `context`: This is the context your email template will be rendered with. You must pass in a `context` object as a JSON object. Email templates are rendered with contexts in a similar manner to Django templates. Nested template variables can be referenced via dot notation. Template variables without corresponding `context` values are treated as `FALSE` and output nothing. Ex. `{ \"name\" : \"George Washington\", \"state\" : \"VA\" }`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Templates Read`
|
|
174
|
+
# @param template_render_query [TemplateRenderQuery]
|
|
183
175
|
# @param [Hash] opts the optional parameters
|
|
184
176
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
185
|
-
def create_template_render_with_http_info(
|
|
177
|
+
def create_template_render_with_http_info(template_render_query, opts = {})
|
|
186
178
|
if @api_client.config.debugging
|
|
187
179
|
@api_client.config.logger.debug 'Calling API: TemplatesApi.create_template_render ...'
|
|
188
180
|
end
|
|
189
|
-
# verify the required parameter '
|
|
190
|
-
if @api_client.config.client_side_validation &&
|
|
191
|
-
fail ArgumentError, "Missing the required parameter '
|
|
192
|
-
end
|
|
193
|
-
# verify the required parameter 'v2_template_render_query' is set
|
|
194
|
-
if @api_client.config.client_side_validation && v2_template_render_query.nil?
|
|
195
|
-
fail ArgumentError, "Missing the required parameter 'v2_template_render_query' when calling TemplatesApi.create_template_render"
|
|
181
|
+
# verify the required parameter 'template_render_query' is set
|
|
182
|
+
if @api_client.config.client_side_validation && template_render_query.nil?
|
|
183
|
+
fail ArgumentError, "Missing the required parameter 'template_render_query' when calling TemplatesApi.create_template_render"
|
|
196
184
|
end
|
|
197
185
|
# resource path
|
|
198
|
-
local_var_path = '/api/
|
|
186
|
+
local_var_path = '/api/template-render/'
|
|
199
187
|
|
|
200
188
|
# query parameters
|
|
201
189
|
query_params = opts[:query_params] || {}
|
|
@@ -203,7 +191,7 @@ module KlaviyoAPI
|
|
|
203
191
|
# header parameters
|
|
204
192
|
header_params = opts[:header_params] || {}
|
|
205
193
|
# klaviyo api revision
|
|
206
|
-
header_params['revision'] = ENV['API_REVISION'] || "
|
|
194
|
+
header_params['revision'] = ENV['API_REVISION'] || "2023-01-24"
|
|
207
195
|
# HTTP header 'Accept' (if needed)
|
|
208
196
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
209
197
|
# HTTP header 'Content-Type'
|
|
@@ -216,7 +204,7 @@ module KlaviyoAPI
|
|
|
216
204
|
form_params = opts[:form_params] || {}
|
|
217
205
|
|
|
218
206
|
# http body (model)
|
|
219
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
207
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(template_render_query)
|
|
220
208
|
|
|
221
209
|
# return_type
|
|
222
210
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
@@ -243,7 +231,7 @@ module KlaviyoAPI
|
|
|
243
231
|
|
|
244
232
|
# Delete Template
|
|
245
233
|
# Delete a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Write`
|
|
246
|
-
# @param id [String]
|
|
234
|
+
# @param id [String] The ID of template
|
|
247
235
|
# @param [Hash] opts the optional parameters
|
|
248
236
|
# @return [Hash<String, Object>]
|
|
249
237
|
def delete_template(id, opts = {})
|
|
@@ -253,7 +241,7 @@ module KlaviyoAPI
|
|
|
253
241
|
|
|
254
242
|
# Delete Template
|
|
255
243
|
# Delete a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Write`
|
|
256
|
-
# @param id [String]
|
|
244
|
+
# @param id [String] The ID of template
|
|
257
245
|
# @param [Hash] opts the optional parameters
|
|
258
246
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
259
247
|
def delete_template_with_http_info(id, opts = {})
|
|
@@ -273,7 +261,7 @@ module KlaviyoAPI
|
|
|
273
261
|
# header parameters
|
|
274
262
|
header_params = opts[:header_params] || {}
|
|
275
263
|
# klaviyo api revision
|
|
276
|
-
header_params['revision'] = ENV['API_REVISION'] || "
|
|
264
|
+
header_params['revision'] = ENV['API_REVISION'] || "2023-01-24"
|
|
277
265
|
# HTTP header 'Accept' (if needed)
|
|
278
266
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
279
267
|
|
|
@@ -307,10 +295,10 @@ module KlaviyoAPI
|
|
|
307
295
|
end
|
|
308
296
|
|
|
309
297
|
# Get Template
|
|
310
|
-
# Get a template with the given template ID
|
|
311
|
-
# @param id [String]
|
|
298
|
+
# Get a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Read`
|
|
299
|
+
# @param id [String] The ID of template
|
|
312
300
|
# @param [Hash] opts the optional parameters
|
|
313
|
-
# @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/
|
|
301
|
+
# @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#sparse-fieldsets
|
|
314
302
|
# @return [Hash<String, Object>]
|
|
315
303
|
def get_template(id, opts = {})
|
|
316
304
|
data, _status_code, _headers = get_template_with_http_info(id, opts)
|
|
@@ -318,10 +306,10 @@ module KlaviyoAPI
|
|
|
318
306
|
end
|
|
319
307
|
|
|
320
308
|
# Get Template
|
|
321
|
-
# Get a template with the given template ID
|
|
322
|
-
# @param id [String]
|
|
309
|
+
# Get a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Read`
|
|
310
|
+
# @param id [String] The ID of template
|
|
323
311
|
# @param [Hash] opts the optional parameters
|
|
324
|
-
# @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/
|
|
312
|
+
# @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#sparse-fieldsets
|
|
325
313
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
326
314
|
def get_template_with_http_info(id, opts = {})
|
|
327
315
|
if @api_client.config.debugging
|
|
@@ -345,7 +333,7 @@ module KlaviyoAPI
|
|
|
345
333
|
# header parameters
|
|
346
334
|
header_params = opts[:header_params] || {}
|
|
347
335
|
# klaviyo api revision
|
|
348
|
-
header_params['revision'] = ENV['API_REVISION'] || "
|
|
336
|
+
header_params['revision'] = ENV['API_REVISION'] || "2023-01-24"
|
|
349
337
|
# HTTP header 'Accept' (if needed)
|
|
350
338
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
351
339
|
|
|
@@ -379,12 +367,12 @@ module KlaviyoAPI
|
|
|
379
367
|
end
|
|
380
368
|
|
|
381
369
|
# Get Templates
|
|
382
|
-
# Get all templates in an account. Filter to request a subset of all templates. Templates can be sorted by the following fields, in ascending and descending order: `id`, `name`, `created`, `updated`
|
|
370
|
+
# Get all templates in an account. Filter to request a subset of all templates. Templates can be sorted by the following fields, in ascending and descending order: `id`, `name`, `created`, `updated` Returns a maximum of 20 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Read`
|
|
383
371
|
# @param [Hash] opts the optional parameters
|
|
384
|
-
# @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/
|
|
385
|
-
# @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/
|
|
386
|
-
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/
|
|
387
|
-
# @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/
|
|
372
|
+
# @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#sparse-fieldsets
|
|
373
|
+
# @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`
|
|
374
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#pagination
|
|
375
|
+
# @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#sorting
|
|
388
376
|
# @return [Hash<String, Object>]
|
|
389
377
|
def get_templates(opts = {})
|
|
390
378
|
data, _status_code, _headers = get_templates_with_http_info(opts)
|
|
@@ -392,12 +380,12 @@ module KlaviyoAPI
|
|
|
392
380
|
end
|
|
393
381
|
|
|
394
382
|
# Get Templates
|
|
395
|
-
# Get all templates in an account. Filter to request a subset of all templates. Templates can be sorted by the following fields, in ascending and descending order: `id`, `name`, `created`, `updated`
|
|
383
|
+
# Get all templates in an account. Filter to request a subset of all templates. Templates can be sorted by the following fields, in ascending and descending order: `id`, `name`, `created`, `updated` Returns a maximum of 20 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Read`
|
|
396
384
|
# @param [Hash] opts the optional parameters
|
|
397
|
-
# @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/
|
|
398
|
-
# @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/
|
|
399
|
-
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/
|
|
400
|
-
# @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/
|
|
385
|
+
# @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#sparse-fieldsets
|
|
386
|
+
# @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`
|
|
387
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#pagination
|
|
388
|
+
# @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2023-01-24/reference/api-overview#sorting
|
|
401
389
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
402
390
|
def get_templates_with_http_info(opts = {})
|
|
403
391
|
if @api_client.config.debugging
|
|
@@ -424,7 +412,7 @@ module KlaviyoAPI
|
|
|
424
412
|
# header parameters
|
|
425
413
|
header_params = opts[:header_params] || {}
|
|
426
414
|
# klaviyo api revision
|
|
427
|
-
header_params['revision'] = ENV['API_REVISION'] || "
|
|
415
|
+
header_params['revision'] = ENV['API_REVISION'] || "2023-01-24"
|
|
428
416
|
# HTTP header 'Accept' (if needed)
|
|
429
417
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
430
418
|
|
|
@@ -458,9 +446,9 @@ module KlaviyoAPI
|
|
|
458
446
|
end
|
|
459
447
|
|
|
460
448
|
# Update Template
|
|
461
|
-
# Update a template with the given template ID
|
|
462
|
-
# @param id [String]
|
|
463
|
-
# @param template_update_query [TemplateUpdateQuery]
|
|
449
|
+
# Update a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Write`
|
|
450
|
+
# @param id [String] The ID of template
|
|
451
|
+
# @param template_update_query [TemplateUpdateQuery]
|
|
464
452
|
# @param [Hash] opts the optional parameters
|
|
465
453
|
# @return [Hash<String, Object>]
|
|
466
454
|
def update_template(id, template_update_query, opts = {})
|
|
@@ -469,9 +457,9 @@ module KlaviyoAPI
|
|
|
469
457
|
end
|
|
470
458
|
|
|
471
459
|
# Update Template
|
|
472
|
-
# Update a template with the given template ID
|
|
473
|
-
# @param id [String]
|
|
474
|
-
# @param template_update_query [TemplateUpdateQuery]
|
|
460
|
+
# Update a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Templates Write`
|
|
461
|
+
# @param id [String] The ID of template
|
|
462
|
+
# @param template_update_query [TemplateUpdateQuery]
|
|
475
463
|
# @param [Hash] opts the optional parameters
|
|
476
464
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
477
465
|
def update_template_with_http_info(id, template_update_query, opts = {})
|
|
@@ -495,7 +483,7 @@ module KlaviyoAPI
|
|
|
495
483
|
# header parameters
|
|
496
484
|
header_params = opts[:header_params] || {}
|
|
497
485
|
# klaviyo api revision
|
|
498
|
-
header_params['revision'] = ENV['API_REVISION'] || "
|
|
486
|
+
header_params['revision'] = ENV['API_REVISION'] || "2023-01-24"
|
|
499
487
|
# HTTP header 'Accept' (if needed)
|
|
500
488
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
501
489
|
# HTTP header 'Content-Type'
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2023-01-24
|
|
7
7
|
Contact: developers@klaviyo.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 6.
|
|
9
|
+
OpenAPI Generator version: 6.2.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,6 +15,7 @@ require 'json'
|
|
|
15
15
|
require 'logger'
|
|
16
16
|
require 'tempfile'
|
|
17
17
|
require 'time'
|
|
18
|
+
require 'uri'
|
|
18
19
|
require 'typhoeus'
|
|
19
20
|
|
|
20
21
|
module KlaviyoAPI
|
|
@@ -31,7 +32,7 @@ module KlaviyoAPI
|
|
|
31
32
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
32
33
|
def initialize(config = Configuration.default)
|
|
33
34
|
@config = config
|
|
34
|
-
@user_agent = "klaviyo-api-ruby/1.
|
|
35
|
+
@user_agent = "klaviyo-api-ruby/1.1.0"
|
|
35
36
|
@default_headers = {
|
|
36
37
|
'Content-Type' => 'application/json',
|
|
37
38
|
'User-Agent' => @user_agent
|
|
@@ -96,6 +97,7 @@ module KlaviyoAPI
|
|
|
96
97
|
follow_location = opts[:follow_location] || true
|
|
97
98
|
|
|
98
99
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
|
100
|
+
update_page_cursor! header_params, query_params
|
|
99
101
|
|
|
100
102
|
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
|
101
103
|
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
|
@@ -313,6 +315,25 @@ module KlaviyoAPI
|
|
|
313
315
|
end
|
|
314
316
|
end
|
|
315
317
|
|
|
318
|
+
# Sets page[cursor] in query_params from parsed URI
|
|
319
|
+
#
|
|
320
|
+
# @param [Hash] header_params Header parameters
|
|
321
|
+
# @param [Hash] query_params Query parameters
|
|
322
|
+
def update_page_cursor!(header_params, query_params)
|
|
323
|
+
page_cursor_key = "page[cursor]"
|
|
324
|
+
page_cursor = query_params[page_cursor_key.to_sym]
|
|
325
|
+
|
|
326
|
+
return if page_cursor.nil? || page_cursor.empty?
|
|
327
|
+
|
|
328
|
+
if page_cursor.is_a?(String) && page_cursor.include?('https://')
|
|
329
|
+
query = CGI::parse(URI(page_cursor).query)
|
|
330
|
+
|
|
331
|
+
return if !query.keys.include?(page_cursor_key)
|
|
332
|
+
|
|
333
|
+
query_params[page_cursor_key.to_sym] = query[page_cursor_key].first
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
|
|
316
337
|
# Sets user agent in HTTP header
|
|
317
338
|
#
|
|
318
339
|
# @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0)
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2023-01-24
|
|
7
7
|
Contact: developers@klaviyo.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 6.
|
|
9
|
+
OpenAPI Generator version: 6.2.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2023-01-24
|
|
7
7
|
Contact: developers@klaviyo.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 6.
|
|
9
|
+
OpenAPI Generator version: 6.2.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Klaviyo API
|
|
3
|
+
|
|
4
|
+
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2023-01-24
|
|
7
|
+
Contact: developers@klaviyo.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.2.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module KlaviyoAPI
|
|
17
|
+
class AudiencesSubObject
|
|
18
|
+
# A list of included audiences
|
|
19
|
+
attr_accessor :included
|
|
20
|
+
|
|
21
|
+
# An optional list of excluded audiences
|
|
22
|
+
attr_accessor :excluded
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'included' => :'included',
|
|
28
|
+
:'excluded' => :'excluded'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'included' => :'Array<String>',
|
|
41
|
+
:'excluded' => :'Array<String>'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::AudiencesSubObject` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::AudiencesSubObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'included')
|
|
67
|
+
if (value = attributes[:'included']).is_a?(Array)
|
|
68
|
+
self.included = value
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'excluded')
|
|
73
|
+
if (value = attributes[:'excluded']).is_a?(Array)
|
|
74
|
+
self.excluded = value
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
invalid_properties = Array.new
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
true
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Checks equality by comparing each attribute.
|
|
93
|
+
# @param [Object] Object to be compared
|
|
94
|
+
def ==(o)
|
|
95
|
+
return true if self.equal?(o)
|
|
96
|
+
self.class == o.class &&
|
|
97
|
+
included == o.included &&
|
|
98
|
+
excluded == o.excluded
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# @see the `==` method
|
|
102
|
+
# @param [Object] Object to be compared
|
|
103
|
+
def eql?(o)
|
|
104
|
+
self == o
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Calculates hash code according to all attributes.
|
|
108
|
+
# @return [Integer] Hash code
|
|
109
|
+
def hash
|
|
110
|
+
[included, excluded].hash
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Builds the object from hash
|
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
115
|
+
# @return [Object] Returns the model itself
|
|
116
|
+
def self.build_from_hash(attributes)
|
|
117
|
+
new.build_from_hash(attributes)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Builds the object from hash
|
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
122
|
+
# @return [Object] Returns the model itself
|
|
123
|
+
def build_from_hash(attributes)
|
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
|
125
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
126
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
127
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
128
|
+
self.send("#{key}=", nil)
|
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
130
|
+
# check to ensure the input is an array given that the attribute
|
|
131
|
+
# is documented as an array but the input is not
|
|
132
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
133
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
134
|
+
end
|
|
135
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
136
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
self
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Deserializes the data based on type
|
|
144
|
+
# @param string type Data type
|
|
145
|
+
# @param string value Value to be deserialized
|
|
146
|
+
# @return [Object] Deserialized data
|
|
147
|
+
def _deserialize(type, value)
|
|
148
|
+
case type.to_sym
|
|
149
|
+
when :Time
|
|
150
|
+
Time.parse(value)
|
|
151
|
+
when :Date
|
|
152
|
+
Date.parse(value)
|
|
153
|
+
when :String
|
|
154
|
+
value.to_s
|
|
155
|
+
when :Integer
|
|
156
|
+
value.to_i
|
|
157
|
+
when :Float
|
|
158
|
+
value.to_f
|
|
159
|
+
when :Boolean
|
|
160
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
161
|
+
true
|
|
162
|
+
else
|
|
163
|
+
false
|
|
164
|
+
end
|
|
165
|
+
when :Object
|
|
166
|
+
# generic object (usually a Hash), return directly
|
|
167
|
+
value
|
|
168
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
169
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
170
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
171
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
172
|
+
k_type = Regexp.last_match[:k_type]
|
|
173
|
+
v_type = Regexp.last_match[:v_type]
|
|
174
|
+
{}.tap do |hash|
|
|
175
|
+
value.each do |k, v|
|
|
176
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
else # model
|
|
180
|
+
# models (e.g. Pet) or oneOf
|
|
181
|
+
klass = KlaviyoAPI.const_get(type)
|
|
182
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the string representation of the object
|
|
187
|
+
# @return [String] String presentation of the object
|
|
188
|
+
def to_s
|
|
189
|
+
to_hash.to_s
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
|
194
|
+
def to_body
|
|
195
|
+
to_hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Returns the object in the form of hash
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_hash
|
|
201
|
+
hash = {}
|
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
203
|
+
value = self.send(attr)
|
|
204
|
+
if value.nil?
|
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
hash[param] = _to_hash(value)
|
|
210
|
+
end
|
|
211
|
+
hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Outputs non-array value in the form of hash
|
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
216
|
+
# @param [Object] value Any valid value
|
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
|
218
|
+
def _to_hash(value)
|
|
219
|
+
if value.is_a?(Array)
|
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
|
221
|
+
elsif value.is_a?(Hash)
|
|
222
|
+
{}.tap do |hash|
|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
224
|
+
end
|
|
225
|
+
elsif value.respond_to? :to_hash
|
|
226
|
+
value.to_hash
|
|
227
|
+
else
|
|
228
|
+
value
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
end
|