klaviyo-api-sdk 1.0.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +513 -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/CampaignRecipientEstimationJobCreateQuery.md +18 -0
- data/docs/CampaignRecipientEstimationJobCreateQueryAsSubResource.md +20 -0
- data/docs/CampaignRecipientEstimationJobCreateQueryAsSubResourceAttributes.md +18 -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/CampaignTagOp.md +18 -0
- data/docs/{ListDeleteQueryAsSubResource.md → CampaignTagOpDataInner.md} +2 -2
- data/docs/CampaignsApi.md +1277 -0
- data/docs/CatalogCategoryCreateJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/CatalogCategoryCreateQueryAsSubResourceAttributes.md +7 -7
- data/docs/CatalogCategoryDeleteJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/CatalogCategoryDeleteQueryAsSubResource.md +2 -2
- data/docs/CatalogCategoryUpdateJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/CatalogCategoryUpdateQueryAsSubResource.md +2 -2
- data/docs/CatalogCategoryUpdateQueryAsSubResourceAttributes.md +2 -2
- data/docs/CatalogItemCreateJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/CatalogItemCreateQueryAsSubResourceAttributes.md +23 -21
- data/docs/CatalogItemDeleteJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/CatalogItemDeleteQueryAsSubResource.md +2 -2
- data/docs/CatalogItemUpdateJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/CatalogItemUpdateQueryAsSubResource.md +2 -2
- data/docs/CatalogItemUpdateQueryAsSubResourceAttributes.md +18 -16
- data/docs/CatalogJobErrorPayload.md +8 -8
- data/docs/CatalogVariantCreateJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/CatalogVariantCreateQueryAsSubResourceAttributes.md +29 -29
- data/docs/CatalogVariantDeleteJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/CatalogVariantDeleteQueryAsSubResource.md +2 -2
- data/docs/CatalogVariantUpdateJobCreateQueryAsSubResourceAttributes.md +1 -1
- data/docs/CatalogVariantUpdateQueryAsSubResource.md +2 -2
- data/docs/CatalogVariantUpdateQueryAsSubResourceAttributes.md +22 -22
- data/docs/CatalogsApi.md +256 -256
- 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 +147 -69
- data/docs/GetCampaigns4XXResponse.md +18 -0
- data/docs/GetCampaigns4XXResponseErrorsInner.md +26 -0
- data/docs/GetCampaigns4XXResponseErrorsInnerSource.md +20 -0
- data/docs/IncludedCategories.md +2 -2
- data/docs/IncludedCategoriesAttributes.md +5 -5
- data/docs/IncludedItems.md +2 -2
- data/docs/IncludedItemsAttributes.md +22 -20
- data/docs/IncludedLists.md +2 -2
- data/docs/IncludedListsAttributes.md +4 -4
- data/docs/IncludedMetrics.md +1 -1
- data/docs/IncludedMetricsAttributes.md +4 -4
- data/docs/IncludedProfiles.md +2 -2
- data/docs/IncludedProfilesAttributes.md +21 -21
- data/docs/IncludedSegments.md +1 -1
- data/docs/IncludedSegmentsAttributes.md +22 -0
- data/docs/{IncludedProfile.md → IncludedTags.md} +5 -5
- data/docs/IncludedVariants.md +2 -2
- data/docs/IncludedVariantsAttributes.md +28 -28
- data/docs/ListCreateQueryAsSubResourceAttributes.md +2 -2
- data/docs/ListPartialUpdateQueryAsSubResource.md +2 -2
- data/docs/ListsApi.md +111 -35
- data/docs/MetricAggregateQueryAsSubResourceAttributes.md +19 -19
- data/docs/MetricAggregateRowDTO.md +2 -2
- data/docs/MetricCreateQuery.md +3 -3
- data/docs/MetricsApi.md +14 -14
- data/docs/OnsiteProfileMetaIdentifiers.md +10 -10
- data/docs/OnsiteSubscriptionCreateQueryAsSubResourceAttributes.md +10 -10
- data/docs/ProfileCreateQueryAsSubResourceAttributes.md +18 -18
- data/docs/ProfileLocation.md +15 -15
- data/docs/ProfileLocationLongitude.md +49 -0
- data/docs/ProfilePartialUpdateQueryAsSubResource.md +2 -2
- data/docs/ProfilesApi.md +36 -36
- data/docs/STOScheduleOptions.md +18 -0
- data/docs/SegmentPartialUpdateQueryAsSubResource.md +1 -1
- data/docs/SegmentPartialUpdateQueryAsSubResourceAttributes.md +18 -0
- data/docs/SegmentsApi.md +103 -24
- data/docs/SendOptionsSubObject.md +18 -0
- data/docs/SendStrategySubObject.md +24 -0
- data/docs/SendTimeSubObject.md +20 -0
- data/docs/StaticScheduleOptions.md +22 -0
- data/docs/Subscription.md +8 -4
- data/docs/SubscriptionChannels.md +20 -0
- data/docs/SubscriptionCreateJobCreateQueryAsSubResourceAttributes.md +5 -5
- data/docs/Suppression.md +2 -2
- 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/{TemplateDeleteQueryAsSubResource.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/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 +6 -6
- 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/campaigns_api.rb +1275 -0
- data/lib/klaviyo-api-sdk/api/catalogs_api.rb +338 -338
- 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 +167 -93
- data/lib/klaviyo-api-sdk/api/lists_api.rb +122 -50
- data/lib/klaviyo-api-sdk/api/metrics_api.rb +21 -21
- data/lib/klaviyo-api-sdk/api/profiles_api.rb +53 -53
- 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 +3 -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/campaign_message_partial_update_query_as_sub_resource.rb +287 -0
- 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_recipient_estimation_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/campaign_recipient_estimation_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/campaign_recipient_estimation_job_create_query_as_sub_resource_attributes.rb +225 -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/campaign_tag_op.rb +226 -0
- data/lib/klaviyo-api-sdk/models/{list_delete_query_as_sub_resource.rb → campaign_tag_op_data_inner.rb} +7 -7
- 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 +3 -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 +8 -3
- 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 +3 -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 +3 -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 +3 -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 +3 -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 +28 -4
- 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 +3 -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 +3 -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 +21 -3
- data/lib/klaviyo-api-sdk/models/catalog_job_error_payload.rb +6 -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 +3 -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 +21 -9
- 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 +3 -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 +3 -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 +13 -3
- 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 +5 -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_campaigns4_xx_response.rb +226 -0
- data/lib/klaviyo-api-sdk/models/get_campaigns4_xx_response_errors_inner.rb +275 -0
- data/lib/klaviyo-api-sdk/models/get_campaigns4_xx_response_errors_inner_source.rb +228 -0
- 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 +5 -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 +3 -2
- data/lib/klaviyo-api-sdk/models/included_items_attributes.rb +24 -3
- data/lib/klaviyo-api-sdk/models/included_lists.rb +3 -2
- data/lib/klaviyo-api-sdk/models/included_lists_attributes.rb +5 -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 +3 -2
- data/lib/klaviyo-api-sdk/models/included_profiles_attributes.rb +14 -2
- data/lib/klaviyo-api-sdk/models/included_segments.rb +3 -3
- data/lib/klaviyo-api-sdk/models/included_segments_attributes.rb +240 -0
- data/lib/klaviyo-api-sdk/models/{included_profile.rb → included_tags.rb} +9 -8
- data/lib/klaviyo-api-sdk/models/included_variants.rb +3 -2
- data/lib/klaviyo-api-sdk/models/included_variants_attributes.rb +17 -3
- 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 +3 -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 +3 -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 +29 -21
- 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 +17 -12
- 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 +11 -2
- data/lib/klaviyo-api-sdk/models/profile_location.rb +10 -3
- data/lib/klaviyo-api-sdk/models/profile_location_latitude.rb +3 -2
- data/lib/klaviyo-api-sdk/models/profile_location_longitude.rb +106 -0
- 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 +3 -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 +3 -3
- data/lib/klaviyo-api-sdk/models/segment_partial_update_query_as_sub_resource_attributes.rb +224 -0
- data/lib/klaviyo-api-sdk/models/send_options.rb +2 -2
- data/lib/klaviyo-api-sdk/models/send_options_sub_object.rb +220 -0
- data/lib/klaviyo-api-sdk/models/send_strategy_sub_object.rb +252 -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/sto_schedule_options.rb +225 -0
- data/lib/klaviyo-api-sdk/models/subscription.rb +27 -6
- data/lib/klaviyo-api-sdk/models/subscription_channels.rb +256 -0
- 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/{template_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 +2 -2
- 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_render_query_as_sub_resource.rb +272 -0
- 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 +68 -11
- data/spec/api/campaigns_api_spec.rb +284 -0
- 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_recipient_estimation_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/campaign_recipient_estimation_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/campaign_recipient_estimation_job_create_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/{list_delete_query_as_sub_resource_spec.rb → campaign_tag_op_data_inner_spec.rb} +9 -9
- data/spec/models/campaign_tag_op_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_campaigns4_xx_response_errors_inner_source_spec.rb +40 -0
- data/spec/models/get_campaigns4_xx_response_errors_inner_spec.rb +58 -0
- data/spec/models/get_campaigns4_xx_response_spec.rb +34 -0
- 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_attributes_spec.rb +46 -0
- data/spec/models/included_segments_spec.rb +2 -2
- data/spec/models/{included_profile_spec.rb → included_tags_spec.rb} +9 -9
- 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_longitude_spec.rb +31 -0
- 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_attributes_spec.rb +34 -0
- 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/sto_schedule_options_spec.rb +34 -0
- data/spec/models/subscription_channels_spec.rb +48 -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/tag_segment_op_data_inner_spec.rb +44 -0
- 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/tag_update_query_as_sub_resource_spec.rb +50 -0
- 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 +207 -19
- data/docs/V2TemplateRenderQuery.md +0 -18
- data/test.rb +0 -50
@@ -0,0 +1,1277 @@
|
|
1
|
+
# KlaviyoAPI::CampaignsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://a.klaviyo.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_campaign**](CampaignsApi.md#create_campaign) | **POST** /api/campaigns/ | Create Campaign |
|
8
|
+
| [**create_campaign_clone**](CampaignsApi.md#create_campaign_clone) | **POST** /api/campaign-clone/ | Create Campaign Clone |
|
9
|
+
| [**create_campaign_message_assign_template**](CampaignsApi.md#create_campaign_message_assign_template) | **POST** /api/campaign-message-assign-template/ | Create Campaign Message Assign Template |
|
10
|
+
| [**create_campaign_recipient_estimation_job**](CampaignsApi.md#create_campaign_recipient_estimation_job) | **POST** /api/campaign-recipient-estimation-jobs/ | Create Campaign Recipient Estimation Job |
|
11
|
+
| [**create_campaign_send_job**](CampaignsApi.md#create_campaign_send_job) | **POST** /api/campaign-send-jobs/ | Create Campaign Send Job |
|
12
|
+
| [**delete_campaign**](CampaignsApi.md#delete_campaign) | **DELETE** /api/campaigns/{id}/ | Delete Campaign |
|
13
|
+
| [**get_campaign**](CampaignsApi.md#get_campaign) | **GET** /api/campaigns/{id}/ | Get Campaign |
|
14
|
+
| [**get_campaign_message**](CampaignsApi.md#get_campaign_message) | **GET** /api/campaign-messages/{id}/ | Get Campaign Message |
|
15
|
+
| [**get_campaign_recipient_estimation**](CampaignsApi.md#get_campaign_recipient_estimation) | **GET** /api/campaign-recipient-estimations/{id}/ | Get Campaign Recipient Estimation |
|
16
|
+
| [**get_campaign_recipient_estimation_job**](CampaignsApi.md#get_campaign_recipient_estimation_job) | **GET** /api/campaign-recipient-estimation-jobs/{id}/ | Get Campaign Recipient Estimation Job |
|
17
|
+
| [**get_campaign_relationships**](CampaignsApi.md#get_campaign_relationships) | **GET** /api/campaigns/{id}/relationships/{related_resource}/ | Get Campaign Relationships |
|
18
|
+
| [**get_campaign_send_job**](CampaignsApi.md#get_campaign_send_job) | **GET** /api/campaign-send-jobs/{id}/ | Get Campaign Send Job |
|
19
|
+
| [**get_campaign_tags**](CampaignsApi.md#get_campaign_tags) | **GET** /api/campaigns/{campaign_id}/tags/ | Get Campaign Tags |
|
20
|
+
| [**get_campaigns**](CampaignsApi.md#get_campaigns) | **GET** /api/campaigns/ | Get Campaigns |
|
21
|
+
| [**update_campaign**](CampaignsApi.md#update_campaign) | **PATCH** /api/campaigns/{id}/ | Update Campaign |
|
22
|
+
| [**update_campaign_message**](CampaignsApi.md#update_campaign_message) | **PATCH** /api/campaign-messages/{id}/ | Update Campaign Message |
|
23
|
+
| [**update_campaign_send_job**](CampaignsApi.md#update_campaign_send_job) | **PATCH** /api/campaign-send-jobs/{id}/ | Update Campaign Send Job |
|
24
|
+
|
25
|
+
|
26
|
+
## create_campaign
|
27
|
+
|
28
|
+
> Hash<String, Object> create_campaign(campaign_create_query)
|
29
|
+
|
30
|
+
Create Campaign
|
31
|
+
|
32
|
+
Creates a campaign given a set of parameters, then returns it.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write`
|
33
|
+
|
34
|
+
### Examples
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
require 'time'
|
38
|
+
require 'klaviyo-api-sdk'
|
39
|
+
# setup authorization
|
40
|
+
KlaviyoAPI.configure do |config|
|
41
|
+
# Configure API key authorization: Klaviyo-API-Key
|
42
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
43
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
44
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
45
|
+
end
|
46
|
+
|
47
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
48
|
+
campaign_create_query = KlaviyoAPI::CampaignCreateQuery.new({data: KlaviyoAPI::CampaignCreateQueryAsSubResource.new({type: 'campaign', attributes: KlaviyoAPI::CampaignCreateQueryAsSubResourceAttributes.new({name: 'My new campaign', channel: 'email', audiences: KlaviyoAPI::AudiencesSubObject.new, send_strategy: KlaviyoAPI::SendStrategySubObject.new({method: 'static'}), send_options: KlaviyoAPI::SendOptionsSubObject.new})})}) # CampaignCreateQuery | Creates a campaign from parameters
|
49
|
+
|
50
|
+
begin
|
51
|
+
# Create Campaign
|
52
|
+
result = api_instance.create_campaign(campaign_create_query)
|
53
|
+
p result
|
54
|
+
rescue KlaviyoAPI::ApiError => e
|
55
|
+
puts "Error when calling CampaignsApi->create_campaign: #{e}"
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
#### Using the create_campaign_with_http_info variant
|
60
|
+
|
61
|
+
This returns an Array which contains the response data, status code and headers.
|
62
|
+
|
63
|
+
> <Array(Hash<String, Object>, Integer, Hash)> create_campaign_with_http_info(campaign_create_query)
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
begin
|
67
|
+
# Create Campaign
|
68
|
+
data, status_code, headers = api_instance.create_campaign_with_http_info(campaign_create_query)
|
69
|
+
p status_code # => 2xx
|
70
|
+
p headers # => { ... }
|
71
|
+
p data # => Hash<String, Object>
|
72
|
+
rescue KlaviyoAPI::ApiError => e
|
73
|
+
puts "Error when calling CampaignsApi->create_campaign_with_http_info: #{e}"
|
74
|
+
end
|
75
|
+
```
|
76
|
+
|
77
|
+
### Parameters
|
78
|
+
|
79
|
+
| Name | Type | Description | Notes |
|
80
|
+
| ---- | ---- | ----------- | ----- |
|
81
|
+
| **campaign_create_query** | [**CampaignCreateQuery**](CampaignCreateQuery.md) | Creates a campaign from parameters | |
|
82
|
+
|
83
|
+
### Return type
|
84
|
+
|
85
|
+
**Hash<String, Object>**
|
86
|
+
|
87
|
+
### Authorization
|
88
|
+
|
89
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
90
|
+
|
91
|
+
### HTTP request headers
|
92
|
+
|
93
|
+
- **Content-Type**: application/json
|
94
|
+
- **Accept**: application/json
|
95
|
+
|
96
|
+
|
97
|
+
## create_campaign_clone
|
98
|
+
|
99
|
+
> Hash<String, Object> create_campaign_clone(campaign_clone_query)
|
100
|
+
|
101
|
+
Create Campaign Clone
|
102
|
+
|
103
|
+
Clones an existing campaign, returning a new campaign based on the original with a new ID and name.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write`
|
104
|
+
|
105
|
+
### Examples
|
106
|
+
|
107
|
+
```ruby
|
108
|
+
require 'time'
|
109
|
+
require 'klaviyo-api-sdk'
|
110
|
+
# setup authorization
|
111
|
+
KlaviyoAPI.configure do |config|
|
112
|
+
# Configure API key authorization: Klaviyo-API-Key
|
113
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
114
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
115
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
116
|
+
end
|
117
|
+
|
118
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
119
|
+
campaign_clone_query = KlaviyoAPI::CampaignCloneQuery.new({data: KlaviyoAPI::CampaignCloneQueryAsSubResource.new({type: 'campaign', attributes: KlaviyoAPI::CampaignCloneQueryAsSubResourceAttributes.new({id: 'id_example'})})}) # CampaignCloneQuery | Clones a campaign from an existing campaign
|
120
|
+
|
121
|
+
begin
|
122
|
+
# Create Campaign Clone
|
123
|
+
result = api_instance.create_campaign_clone(campaign_clone_query)
|
124
|
+
p result
|
125
|
+
rescue KlaviyoAPI::ApiError => e
|
126
|
+
puts "Error when calling CampaignsApi->create_campaign_clone: #{e}"
|
127
|
+
end
|
128
|
+
```
|
129
|
+
|
130
|
+
#### Using the create_campaign_clone_with_http_info variant
|
131
|
+
|
132
|
+
This returns an Array which contains the response data, status code and headers.
|
133
|
+
|
134
|
+
> <Array(Hash<String, Object>, Integer, Hash)> create_campaign_clone_with_http_info(campaign_clone_query)
|
135
|
+
|
136
|
+
```ruby
|
137
|
+
begin
|
138
|
+
# Create Campaign Clone
|
139
|
+
data, status_code, headers = api_instance.create_campaign_clone_with_http_info(campaign_clone_query)
|
140
|
+
p status_code # => 2xx
|
141
|
+
p headers # => { ... }
|
142
|
+
p data # => Hash<String, Object>
|
143
|
+
rescue KlaviyoAPI::ApiError => e
|
144
|
+
puts "Error when calling CampaignsApi->create_campaign_clone_with_http_info: #{e}"
|
145
|
+
end
|
146
|
+
```
|
147
|
+
|
148
|
+
### Parameters
|
149
|
+
|
150
|
+
| Name | Type | Description | Notes |
|
151
|
+
| ---- | ---- | ----------- | ----- |
|
152
|
+
| **campaign_clone_query** | [**CampaignCloneQuery**](CampaignCloneQuery.md) | Clones a campaign from an existing campaign | |
|
153
|
+
|
154
|
+
### Return type
|
155
|
+
|
156
|
+
**Hash<String, Object>**
|
157
|
+
|
158
|
+
### Authorization
|
159
|
+
|
160
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
161
|
+
|
162
|
+
### HTTP request headers
|
163
|
+
|
164
|
+
- **Content-Type**: application/json
|
165
|
+
- **Accept**: application/json
|
166
|
+
|
167
|
+
|
168
|
+
## create_campaign_message_assign_template
|
169
|
+
|
170
|
+
> Hash<String, Object> create_campaign_message_assign_template(campaign_message_assign_template_query)
|
171
|
+
|
172
|
+
Create Campaign Message Assign Template
|
173
|
+
|
174
|
+
Creates a non-reusable version of the template and assigns it to the message.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write`
|
175
|
+
|
176
|
+
### Examples
|
177
|
+
|
178
|
+
```ruby
|
179
|
+
require 'time'
|
180
|
+
require 'klaviyo-api-sdk'
|
181
|
+
# setup authorization
|
182
|
+
KlaviyoAPI.configure do |config|
|
183
|
+
# Configure API key authorization: Klaviyo-API-Key
|
184
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
185
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
186
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
187
|
+
end
|
188
|
+
|
189
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
190
|
+
campaign_message_assign_template_query = KlaviyoAPI::CampaignMessageAssignTemplateQuery.new({data: KlaviyoAPI::CampaignMessageAssignTemplateQueryAsSubResource.new({type: 'campaign-message', attributes: KlaviyoAPI::CampaignMessageAssignTemplateQueryAsSubResourceAttributes.new({id: 'id_example', template_id: 'RipRmi'})})}) # CampaignMessageAssignTemplateQuery | Takes a reusable template, clones it, and assigns the non-reusable clone to the message.
|
191
|
+
|
192
|
+
begin
|
193
|
+
# Create Campaign Message Assign Template
|
194
|
+
result = api_instance.create_campaign_message_assign_template(campaign_message_assign_template_query)
|
195
|
+
p result
|
196
|
+
rescue KlaviyoAPI::ApiError => e
|
197
|
+
puts "Error when calling CampaignsApi->create_campaign_message_assign_template: #{e}"
|
198
|
+
end
|
199
|
+
```
|
200
|
+
|
201
|
+
#### Using the create_campaign_message_assign_template_with_http_info variant
|
202
|
+
|
203
|
+
This returns an Array which contains the response data, status code and headers.
|
204
|
+
|
205
|
+
> <Array(Hash<String, Object>, Integer, Hash)> create_campaign_message_assign_template_with_http_info(campaign_message_assign_template_query)
|
206
|
+
|
207
|
+
```ruby
|
208
|
+
begin
|
209
|
+
# Create Campaign Message Assign Template
|
210
|
+
data, status_code, headers = api_instance.create_campaign_message_assign_template_with_http_info(campaign_message_assign_template_query)
|
211
|
+
p status_code # => 2xx
|
212
|
+
p headers # => { ... }
|
213
|
+
p data # => Hash<String, Object>
|
214
|
+
rescue KlaviyoAPI::ApiError => e
|
215
|
+
puts "Error when calling CampaignsApi->create_campaign_message_assign_template_with_http_info: #{e}"
|
216
|
+
end
|
217
|
+
```
|
218
|
+
|
219
|
+
### Parameters
|
220
|
+
|
221
|
+
| Name | Type | Description | Notes |
|
222
|
+
| ---- | ---- | ----------- | ----- |
|
223
|
+
| **campaign_message_assign_template_query** | [**CampaignMessageAssignTemplateQuery**](CampaignMessageAssignTemplateQuery.md) | Takes a reusable template, clones it, and assigns the non-reusable clone to the message. | |
|
224
|
+
|
225
|
+
### Return type
|
226
|
+
|
227
|
+
**Hash<String, Object>**
|
228
|
+
|
229
|
+
### Authorization
|
230
|
+
|
231
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
232
|
+
|
233
|
+
### HTTP request headers
|
234
|
+
|
235
|
+
- **Content-Type**: application/json
|
236
|
+
- **Accept**: application/json
|
237
|
+
|
238
|
+
|
239
|
+
## create_campaign_recipient_estimation_job
|
240
|
+
|
241
|
+
> Hash<String, Object> create_campaign_recipient_estimation_job(campaign_recipient_estimation_job_create_query)
|
242
|
+
|
243
|
+
Create Campaign Recipient Estimation Job
|
244
|
+
|
245
|
+
Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write`
|
246
|
+
|
247
|
+
### Examples
|
248
|
+
|
249
|
+
```ruby
|
250
|
+
require 'time'
|
251
|
+
require 'klaviyo-api-sdk'
|
252
|
+
# setup authorization
|
253
|
+
KlaviyoAPI.configure do |config|
|
254
|
+
# Configure API key authorization: Klaviyo-API-Key
|
255
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
256
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
257
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
258
|
+
end
|
259
|
+
|
260
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
261
|
+
campaign_recipient_estimation_job_create_query = KlaviyoAPI::CampaignRecipientEstimationJobCreateQuery.new({data: KlaviyoAPI::CampaignRecipientEstimationJobCreateQueryAsSubResource.new({type: 'campaign-recipient-estimation-job', attributes: KlaviyoAPI::CampaignRecipientEstimationJobCreateQueryAsSubResourceAttributes.new({id: 'id_example'})})}) # CampaignRecipientEstimationJobCreateQuery | Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.
|
262
|
+
|
263
|
+
begin
|
264
|
+
# Create Campaign Recipient Estimation Job
|
265
|
+
result = api_instance.create_campaign_recipient_estimation_job(campaign_recipient_estimation_job_create_query)
|
266
|
+
p result
|
267
|
+
rescue KlaviyoAPI::ApiError => e
|
268
|
+
puts "Error when calling CampaignsApi->create_campaign_recipient_estimation_job: #{e}"
|
269
|
+
end
|
270
|
+
```
|
271
|
+
|
272
|
+
#### Using the create_campaign_recipient_estimation_job_with_http_info variant
|
273
|
+
|
274
|
+
This returns an Array which contains the response data, status code and headers.
|
275
|
+
|
276
|
+
> <Array(Hash<String, Object>, Integer, Hash)> create_campaign_recipient_estimation_job_with_http_info(campaign_recipient_estimation_job_create_query)
|
277
|
+
|
278
|
+
```ruby
|
279
|
+
begin
|
280
|
+
# Create Campaign Recipient Estimation Job
|
281
|
+
data, status_code, headers = api_instance.create_campaign_recipient_estimation_job_with_http_info(campaign_recipient_estimation_job_create_query)
|
282
|
+
p status_code # => 2xx
|
283
|
+
p headers # => { ... }
|
284
|
+
p data # => Hash<String, Object>
|
285
|
+
rescue KlaviyoAPI::ApiError => e
|
286
|
+
puts "Error when calling CampaignsApi->create_campaign_recipient_estimation_job_with_http_info: #{e}"
|
287
|
+
end
|
288
|
+
```
|
289
|
+
|
290
|
+
### Parameters
|
291
|
+
|
292
|
+
| Name | Type | Description | Notes |
|
293
|
+
| ---- | ---- | ----------- | ----- |
|
294
|
+
| **campaign_recipient_estimation_job_create_query** | [**CampaignRecipientEstimationJobCreateQuery**](CampaignRecipientEstimationJobCreateQuery.md) | Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign. | |
|
295
|
+
|
296
|
+
### Return type
|
297
|
+
|
298
|
+
**Hash<String, Object>**
|
299
|
+
|
300
|
+
### Authorization
|
301
|
+
|
302
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
303
|
+
|
304
|
+
### HTTP request headers
|
305
|
+
|
306
|
+
- **Content-Type**: application/json
|
307
|
+
- **Accept**: application/json
|
308
|
+
|
309
|
+
|
310
|
+
## create_campaign_send_job
|
311
|
+
|
312
|
+
> Hash<String, Object> create_campaign_send_job(campaign_send_job_create_query)
|
313
|
+
|
314
|
+
Create Campaign Send Job
|
315
|
+
|
316
|
+
Trigger a campaign to send asynchronously<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write`
|
317
|
+
|
318
|
+
### Examples
|
319
|
+
|
320
|
+
```ruby
|
321
|
+
require 'time'
|
322
|
+
require 'klaviyo-api-sdk'
|
323
|
+
# setup authorization
|
324
|
+
KlaviyoAPI.configure do |config|
|
325
|
+
# Configure API key authorization: Klaviyo-API-Key
|
326
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
327
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
328
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
329
|
+
end
|
330
|
+
|
331
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
332
|
+
campaign_send_job_create_query = KlaviyoAPI::CampaignSendJobCreateQuery.new({data: KlaviyoAPI::CampaignSendJobCreateQueryAsSubResource.new({type: 'campaign-send-job', attributes: KlaviyoAPI::CampaignSendJobCreateQueryAsSubResourceAttributes.new({id: 'id_example'})})}) # CampaignSendJobCreateQuery | Trigger the campaign to send asynchronously
|
333
|
+
|
334
|
+
begin
|
335
|
+
# Create Campaign Send Job
|
336
|
+
result = api_instance.create_campaign_send_job(campaign_send_job_create_query)
|
337
|
+
p result
|
338
|
+
rescue KlaviyoAPI::ApiError => e
|
339
|
+
puts "Error when calling CampaignsApi->create_campaign_send_job: #{e}"
|
340
|
+
end
|
341
|
+
```
|
342
|
+
|
343
|
+
#### Using the create_campaign_send_job_with_http_info variant
|
344
|
+
|
345
|
+
This returns an Array which contains the response data, status code and headers.
|
346
|
+
|
347
|
+
> <Array(Hash<String, Object>, Integer, Hash)> create_campaign_send_job_with_http_info(campaign_send_job_create_query)
|
348
|
+
|
349
|
+
```ruby
|
350
|
+
begin
|
351
|
+
# Create Campaign Send Job
|
352
|
+
data, status_code, headers = api_instance.create_campaign_send_job_with_http_info(campaign_send_job_create_query)
|
353
|
+
p status_code # => 2xx
|
354
|
+
p headers # => { ... }
|
355
|
+
p data # => Hash<String, Object>
|
356
|
+
rescue KlaviyoAPI::ApiError => e
|
357
|
+
puts "Error when calling CampaignsApi->create_campaign_send_job_with_http_info: #{e}"
|
358
|
+
end
|
359
|
+
```
|
360
|
+
|
361
|
+
### Parameters
|
362
|
+
|
363
|
+
| Name | Type | Description | Notes |
|
364
|
+
| ---- | ---- | ----------- | ----- |
|
365
|
+
| **campaign_send_job_create_query** | [**CampaignSendJobCreateQuery**](CampaignSendJobCreateQuery.md) | Trigger the campaign to send asynchronously | |
|
366
|
+
|
367
|
+
### Return type
|
368
|
+
|
369
|
+
**Hash<String, Object>**
|
370
|
+
|
371
|
+
### Authorization
|
372
|
+
|
373
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
374
|
+
|
375
|
+
### HTTP request headers
|
376
|
+
|
377
|
+
- **Content-Type**: application/json
|
378
|
+
- **Accept**: application/json
|
379
|
+
|
380
|
+
|
381
|
+
## delete_campaign
|
382
|
+
|
383
|
+
> delete_campaign(id)
|
384
|
+
|
385
|
+
Delete Campaign
|
386
|
+
|
387
|
+
Delete a campaign with the given campaign ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write`
|
388
|
+
|
389
|
+
### Examples
|
390
|
+
|
391
|
+
```ruby
|
392
|
+
require 'time'
|
393
|
+
require 'klaviyo-api-sdk'
|
394
|
+
# setup authorization
|
395
|
+
KlaviyoAPI.configure do |config|
|
396
|
+
# Configure API key authorization: Klaviyo-API-Key
|
397
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
398
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
399
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
400
|
+
end
|
401
|
+
|
402
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
403
|
+
id = 'id_example' # String | The campaign ID to be deleted
|
404
|
+
|
405
|
+
begin
|
406
|
+
# Delete Campaign
|
407
|
+
api_instance.delete_campaign(id)
|
408
|
+
rescue KlaviyoAPI::ApiError => e
|
409
|
+
puts "Error when calling CampaignsApi->delete_campaign: #{e}"
|
410
|
+
end
|
411
|
+
```
|
412
|
+
|
413
|
+
#### Using the delete_campaign_with_http_info variant
|
414
|
+
|
415
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
416
|
+
|
417
|
+
> <Array(nil, Integer, Hash)> delete_campaign_with_http_info(id)
|
418
|
+
|
419
|
+
```ruby
|
420
|
+
begin
|
421
|
+
# Delete Campaign
|
422
|
+
data, status_code, headers = api_instance.delete_campaign_with_http_info(id)
|
423
|
+
p status_code # => 2xx
|
424
|
+
p headers # => { ... }
|
425
|
+
p data # => nil
|
426
|
+
rescue KlaviyoAPI::ApiError => e
|
427
|
+
puts "Error when calling CampaignsApi->delete_campaign_with_http_info: #{e}"
|
428
|
+
end
|
429
|
+
```
|
430
|
+
|
431
|
+
### Parameters
|
432
|
+
|
433
|
+
| Name | Type | Description | Notes |
|
434
|
+
| ---- | ---- | ----------- | ----- |
|
435
|
+
| **id** | **String** | The campaign ID to be deleted | |
|
436
|
+
|
437
|
+
### Return type
|
438
|
+
|
439
|
+
nil (empty response body)
|
440
|
+
|
441
|
+
### Authorization
|
442
|
+
|
443
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
444
|
+
|
445
|
+
### HTTP request headers
|
446
|
+
|
447
|
+
- **Content-Type**: Not defined
|
448
|
+
- **Accept**: application/json
|
449
|
+
|
450
|
+
|
451
|
+
## get_campaign
|
452
|
+
|
453
|
+
> Hash<String, Object> get_campaign(id, opts)
|
454
|
+
|
455
|
+
Get Campaign
|
456
|
+
|
457
|
+
Returns a specific campaign based on a required id.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Read`
|
458
|
+
|
459
|
+
### Examples
|
460
|
+
|
461
|
+
```ruby
|
462
|
+
require 'time'
|
463
|
+
require 'klaviyo-api-sdk'
|
464
|
+
# setup authorization
|
465
|
+
KlaviyoAPI.configure do |config|
|
466
|
+
# Configure API key authorization: Klaviyo-API-Key
|
467
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
468
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
469
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
470
|
+
end
|
471
|
+
|
472
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
473
|
+
id = 'id_example' # String | The campaign ID to be retrieved
|
474
|
+
opts = {
|
475
|
+
fields_campaign: ['name'], # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets
|
476
|
+
fields_tag: ['name'], # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets
|
477
|
+
include: ['tags'] # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships
|
478
|
+
}
|
479
|
+
|
480
|
+
begin
|
481
|
+
# Get Campaign
|
482
|
+
result = api_instance.get_campaign(id, opts)
|
483
|
+
p result
|
484
|
+
rescue KlaviyoAPI::ApiError => e
|
485
|
+
puts "Error when calling CampaignsApi->get_campaign: #{e}"
|
486
|
+
end
|
487
|
+
```
|
488
|
+
|
489
|
+
#### Using the get_campaign_with_http_info variant
|
490
|
+
|
491
|
+
This returns an Array which contains the response data, status code and headers.
|
492
|
+
|
493
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_campaign_with_http_info(id, opts)
|
494
|
+
|
495
|
+
```ruby
|
496
|
+
begin
|
497
|
+
# Get Campaign
|
498
|
+
data, status_code, headers = api_instance.get_campaign_with_http_info(id, opts)
|
499
|
+
p status_code # => 2xx
|
500
|
+
p headers # => { ... }
|
501
|
+
p data # => Hash<String, Object>
|
502
|
+
rescue KlaviyoAPI::ApiError => e
|
503
|
+
puts "Error when calling CampaignsApi->get_campaign_with_http_info: #{e}"
|
504
|
+
end
|
505
|
+
```
|
506
|
+
|
507
|
+
### Parameters
|
508
|
+
|
509
|
+
| Name | Type | Description | Notes |
|
510
|
+
| ---- | ---- | ----------- | ----- |
|
511
|
+
| **id** | **String** | The campaign ID to be retrieved | |
|
512
|
+
| **fields_campaign** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets | [optional] |
|
513
|
+
| **fields_tag** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets | [optional] |
|
514
|
+
| **include** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships | [optional] |
|
515
|
+
|
516
|
+
### Return type
|
517
|
+
|
518
|
+
**Hash<String, Object>**
|
519
|
+
|
520
|
+
### Authorization
|
521
|
+
|
522
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
523
|
+
|
524
|
+
### HTTP request headers
|
525
|
+
|
526
|
+
- **Content-Type**: Not defined
|
527
|
+
- **Accept**: application/json
|
528
|
+
|
529
|
+
|
530
|
+
## get_campaign_message
|
531
|
+
|
532
|
+
> Hash<String, Object> get_campaign_message(id, opts)
|
533
|
+
|
534
|
+
Get Campaign Message
|
535
|
+
|
536
|
+
Returns a specific message based on a required id.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Read`
|
537
|
+
|
538
|
+
### Examples
|
539
|
+
|
540
|
+
```ruby
|
541
|
+
require 'time'
|
542
|
+
require 'klaviyo-api-sdk'
|
543
|
+
# setup authorization
|
544
|
+
KlaviyoAPI.configure do |config|
|
545
|
+
# Configure API key authorization: Klaviyo-API-Key
|
546
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
547
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
548
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
549
|
+
end
|
550
|
+
|
551
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
552
|
+
id = 'id_example' # String | The message ID to be retrieved
|
553
|
+
opts = {
|
554
|
+
fields_campaign_message: ['label'] # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets
|
555
|
+
}
|
556
|
+
|
557
|
+
begin
|
558
|
+
# Get Campaign Message
|
559
|
+
result = api_instance.get_campaign_message(id, opts)
|
560
|
+
p result
|
561
|
+
rescue KlaviyoAPI::ApiError => e
|
562
|
+
puts "Error when calling CampaignsApi->get_campaign_message: #{e}"
|
563
|
+
end
|
564
|
+
```
|
565
|
+
|
566
|
+
#### Using the get_campaign_message_with_http_info variant
|
567
|
+
|
568
|
+
This returns an Array which contains the response data, status code and headers.
|
569
|
+
|
570
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_campaign_message_with_http_info(id, opts)
|
571
|
+
|
572
|
+
```ruby
|
573
|
+
begin
|
574
|
+
# Get Campaign Message
|
575
|
+
data, status_code, headers = api_instance.get_campaign_message_with_http_info(id, opts)
|
576
|
+
p status_code # => 2xx
|
577
|
+
p headers # => { ... }
|
578
|
+
p data # => Hash<String, Object>
|
579
|
+
rescue KlaviyoAPI::ApiError => e
|
580
|
+
puts "Error when calling CampaignsApi->get_campaign_message_with_http_info: #{e}"
|
581
|
+
end
|
582
|
+
```
|
583
|
+
|
584
|
+
### Parameters
|
585
|
+
|
586
|
+
| Name | Type | Description | Notes |
|
587
|
+
| ---- | ---- | ----------- | ----- |
|
588
|
+
| **id** | **String** | The message ID to be retrieved | |
|
589
|
+
| **fields_campaign_message** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets | [optional] |
|
590
|
+
|
591
|
+
### Return type
|
592
|
+
|
593
|
+
**Hash<String, Object>**
|
594
|
+
|
595
|
+
### Authorization
|
596
|
+
|
597
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
598
|
+
|
599
|
+
### HTTP request headers
|
600
|
+
|
601
|
+
- **Content-Type**: Not defined
|
602
|
+
- **Accept**: application/json
|
603
|
+
|
604
|
+
|
605
|
+
## get_campaign_recipient_estimation
|
606
|
+
|
607
|
+
> Hash<String, Object> get_campaign_recipient_estimation(id, opts)
|
608
|
+
|
609
|
+
Get Campaign Recipient Estimation
|
610
|
+
|
611
|
+
Get the estimated recipient count for a campaign with the provided campaign ID. You can refresh this count by using the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Read`
|
612
|
+
|
613
|
+
### Examples
|
614
|
+
|
615
|
+
```ruby
|
616
|
+
require 'time'
|
617
|
+
require 'klaviyo-api-sdk'
|
618
|
+
# setup authorization
|
619
|
+
KlaviyoAPI.configure do |config|
|
620
|
+
# Configure API key authorization: Klaviyo-API-Key
|
621
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
622
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
623
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
624
|
+
end
|
625
|
+
|
626
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
627
|
+
id = 'id_example' # String | The ID of the campaign for which to get the estimated number of recipients
|
628
|
+
opts = {
|
629
|
+
fields_campaign_recipient_estimation: ['estimated_recipient_count'] # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets
|
630
|
+
}
|
631
|
+
|
632
|
+
begin
|
633
|
+
# Get Campaign Recipient Estimation
|
634
|
+
result = api_instance.get_campaign_recipient_estimation(id, opts)
|
635
|
+
p result
|
636
|
+
rescue KlaviyoAPI::ApiError => e
|
637
|
+
puts "Error when calling CampaignsApi->get_campaign_recipient_estimation: #{e}"
|
638
|
+
end
|
639
|
+
```
|
640
|
+
|
641
|
+
#### Using the get_campaign_recipient_estimation_with_http_info variant
|
642
|
+
|
643
|
+
This returns an Array which contains the response data, status code and headers.
|
644
|
+
|
645
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_campaign_recipient_estimation_with_http_info(id, opts)
|
646
|
+
|
647
|
+
```ruby
|
648
|
+
begin
|
649
|
+
# Get Campaign Recipient Estimation
|
650
|
+
data, status_code, headers = api_instance.get_campaign_recipient_estimation_with_http_info(id, opts)
|
651
|
+
p status_code # => 2xx
|
652
|
+
p headers # => { ... }
|
653
|
+
p data # => Hash<String, Object>
|
654
|
+
rescue KlaviyoAPI::ApiError => e
|
655
|
+
puts "Error when calling CampaignsApi->get_campaign_recipient_estimation_with_http_info: #{e}"
|
656
|
+
end
|
657
|
+
```
|
658
|
+
|
659
|
+
### Parameters
|
660
|
+
|
661
|
+
| Name | Type | Description | Notes |
|
662
|
+
| ---- | ---- | ----------- | ----- |
|
663
|
+
| **id** | **String** | The ID of the campaign for which to get the estimated number of recipients | |
|
664
|
+
| **fields_campaign_recipient_estimation** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets | [optional] |
|
665
|
+
|
666
|
+
### Return type
|
667
|
+
|
668
|
+
**Hash<String, Object>**
|
669
|
+
|
670
|
+
### Authorization
|
671
|
+
|
672
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
673
|
+
|
674
|
+
### HTTP request headers
|
675
|
+
|
676
|
+
- **Content-Type**: Not defined
|
677
|
+
- **Accept**: application/json
|
678
|
+
|
679
|
+
|
680
|
+
## get_campaign_recipient_estimation_job
|
681
|
+
|
682
|
+
> Hash<String, Object> get_campaign_recipient_estimation_job(id, opts)
|
683
|
+
|
684
|
+
Get Campaign Recipient Estimation Job
|
685
|
+
|
686
|
+
Retrieve the status of a recipient estimation job triggered with the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Read`
|
687
|
+
|
688
|
+
### Examples
|
689
|
+
|
690
|
+
```ruby
|
691
|
+
require 'time'
|
692
|
+
require 'klaviyo-api-sdk'
|
693
|
+
# setup authorization
|
694
|
+
KlaviyoAPI.configure do |config|
|
695
|
+
# Configure API key authorization: Klaviyo-API-Key
|
696
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
697
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
698
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
699
|
+
end
|
700
|
+
|
701
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
702
|
+
id = 'id_example' # String | The ID of the campaign to get recipient estimation status
|
703
|
+
opts = {
|
704
|
+
fields_campaign_recipient_estimation_job: ['status'] # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets
|
705
|
+
}
|
706
|
+
|
707
|
+
begin
|
708
|
+
# Get Campaign Recipient Estimation Job
|
709
|
+
result = api_instance.get_campaign_recipient_estimation_job(id, opts)
|
710
|
+
p result
|
711
|
+
rescue KlaviyoAPI::ApiError => e
|
712
|
+
puts "Error when calling CampaignsApi->get_campaign_recipient_estimation_job: #{e}"
|
713
|
+
end
|
714
|
+
```
|
715
|
+
|
716
|
+
#### Using the get_campaign_recipient_estimation_job_with_http_info variant
|
717
|
+
|
718
|
+
This returns an Array which contains the response data, status code and headers.
|
719
|
+
|
720
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_campaign_recipient_estimation_job_with_http_info(id, opts)
|
721
|
+
|
722
|
+
```ruby
|
723
|
+
begin
|
724
|
+
# Get Campaign Recipient Estimation Job
|
725
|
+
data, status_code, headers = api_instance.get_campaign_recipient_estimation_job_with_http_info(id, opts)
|
726
|
+
p status_code # => 2xx
|
727
|
+
p headers # => { ... }
|
728
|
+
p data # => Hash<String, Object>
|
729
|
+
rescue KlaviyoAPI::ApiError => e
|
730
|
+
puts "Error when calling CampaignsApi->get_campaign_recipient_estimation_job_with_http_info: #{e}"
|
731
|
+
end
|
732
|
+
```
|
733
|
+
|
734
|
+
### Parameters
|
735
|
+
|
736
|
+
| Name | Type | Description | Notes |
|
737
|
+
| ---- | ---- | ----------- | ----- |
|
738
|
+
| **id** | **String** | The ID of the campaign to get recipient estimation status | |
|
739
|
+
| **fields_campaign_recipient_estimation_job** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets | [optional] |
|
740
|
+
|
741
|
+
### Return type
|
742
|
+
|
743
|
+
**Hash<String, Object>**
|
744
|
+
|
745
|
+
### Authorization
|
746
|
+
|
747
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
748
|
+
|
749
|
+
### HTTP request headers
|
750
|
+
|
751
|
+
- **Content-Type**: Not defined
|
752
|
+
- **Accept**: application/json
|
753
|
+
|
754
|
+
|
755
|
+
## get_campaign_relationships
|
756
|
+
|
757
|
+
> Hash<String, Object> get_campaign_relationships(id, related_resource)
|
758
|
+
|
759
|
+
Get Campaign Relationships
|
760
|
+
|
761
|
+
If the `related_resource` is `tags`, returns the IDs of all tags associated with the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Campaigns Read` `Tags Read`
|
762
|
+
|
763
|
+
### Examples
|
764
|
+
|
765
|
+
```ruby
|
766
|
+
require 'time'
|
767
|
+
require 'klaviyo-api-sdk'
|
768
|
+
# setup authorization
|
769
|
+
KlaviyoAPI.configure do |config|
|
770
|
+
# Configure API key authorization: Klaviyo-API-Key
|
771
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
772
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
773
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
774
|
+
end
|
775
|
+
|
776
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
777
|
+
id = 'id_example' # String |
|
778
|
+
related_resource = 'related_resource_example' # String |
|
779
|
+
|
780
|
+
begin
|
781
|
+
# Get Campaign Relationships
|
782
|
+
result = api_instance.get_campaign_relationships(id, related_resource)
|
783
|
+
p result
|
784
|
+
rescue KlaviyoAPI::ApiError => e
|
785
|
+
puts "Error when calling CampaignsApi->get_campaign_relationships: #{e}"
|
786
|
+
end
|
787
|
+
```
|
788
|
+
|
789
|
+
#### Using the get_campaign_relationships_with_http_info variant
|
790
|
+
|
791
|
+
This returns an Array which contains the response data, status code and headers.
|
792
|
+
|
793
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_campaign_relationships_with_http_info(id, related_resource)
|
794
|
+
|
795
|
+
```ruby
|
796
|
+
begin
|
797
|
+
# Get Campaign Relationships
|
798
|
+
data, status_code, headers = api_instance.get_campaign_relationships_with_http_info(id, related_resource)
|
799
|
+
p status_code # => 2xx
|
800
|
+
p headers # => { ... }
|
801
|
+
p data # => Hash<String, Object>
|
802
|
+
rescue KlaviyoAPI::ApiError => e
|
803
|
+
puts "Error when calling CampaignsApi->get_campaign_relationships_with_http_info: #{e}"
|
804
|
+
end
|
805
|
+
```
|
806
|
+
|
807
|
+
### Parameters
|
808
|
+
|
809
|
+
| Name | Type | Description | Notes |
|
810
|
+
| ---- | ---- | ----------- | ----- |
|
811
|
+
| **id** | **String** | | |
|
812
|
+
| **related_resource** | **String** | | |
|
813
|
+
|
814
|
+
### Return type
|
815
|
+
|
816
|
+
**Hash<String, Object>**
|
817
|
+
|
818
|
+
### Authorization
|
819
|
+
|
820
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
821
|
+
|
822
|
+
### HTTP request headers
|
823
|
+
|
824
|
+
- **Content-Type**: Not defined
|
825
|
+
- **Accept**: application/json
|
826
|
+
|
827
|
+
|
828
|
+
## get_campaign_send_job
|
829
|
+
|
830
|
+
> Hash<String, Object> get_campaign_send_job(id, opts)
|
831
|
+
|
832
|
+
Get Campaign Send Job
|
833
|
+
|
834
|
+
Get a campaign send job<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Read`
|
835
|
+
|
836
|
+
### Examples
|
837
|
+
|
838
|
+
```ruby
|
839
|
+
require 'time'
|
840
|
+
require 'klaviyo-api-sdk'
|
841
|
+
# setup authorization
|
842
|
+
KlaviyoAPI.configure do |config|
|
843
|
+
# Configure API key authorization: Klaviyo-API-Key
|
844
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
845
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
846
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
847
|
+
end
|
848
|
+
|
849
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
850
|
+
id = 'id_example' # String | The ID of the campaign to send
|
851
|
+
opts = {
|
852
|
+
fields_campaign_send_job: ['status'] # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets
|
853
|
+
}
|
854
|
+
|
855
|
+
begin
|
856
|
+
# Get Campaign Send Job
|
857
|
+
result = api_instance.get_campaign_send_job(id, opts)
|
858
|
+
p result
|
859
|
+
rescue KlaviyoAPI::ApiError => e
|
860
|
+
puts "Error when calling CampaignsApi->get_campaign_send_job: #{e}"
|
861
|
+
end
|
862
|
+
```
|
863
|
+
|
864
|
+
#### Using the get_campaign_send_job_with_http_info variant
|
865
|
+
|
866
|
+
This returns an Array which contains the response data, status code and headers.
|
867
|
+
|
868
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_campaign_send_job_with_http_info(id, opts)
|
869
|
+
|
870
|
+
```ruby
|
871
|
+
begin
|
872
|
+
# Get Campaign Send Job
|
873
|
+
data, status_code, headers = api_instance.get_campaign_send_job_with_http_info(id, opts)
|
874
|
+
p status_code # => 2xx
|
875
|
+
p headers # => { ... }
|
876
|
+
p data # => Hash<String, Object>
|
877
|
+
rescue KlaviyoAPI::ApiError => e
|
878
|
+
puts "Error when calling CampaignsApi->get_campaign_send_job_with_http_info: #{e}"
|
879
|
+
end
|
880
|
+
```
|
881
|
+
|
882
|
+
### Parameters
|
883
|
+
|
884
|
+
| Name | Type | Description | Notes |
|
885
|
+
| ---- | ---- | ----------- | ----- |
|
886
|
+
| **id** | **String** | The ID of the campaign to send | |
|
887
|
+
| **fields_campaign_send_job** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets | [optional] |
|
888
|
+
|
889
|
+
### Return type
|
890
|
+
|
891
|
+
**Hash<String, Object>**
|
892
|
+
|
893
|
+
### Authorization
|
894
|
+
|
895
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
896
|
+
|
897
|
+
### HTTP request headers
|
898
|
+
|
899
|
+
- **Content-Type**: Not defined
|
900
|
+
- **Accept**: application/json
|
901
|
+
|
902
|
+
|
903
|
+
## get_campaign_tags
|
904
|
+
|
905
|
+
> Hash<String, Object> get_campaign_tags(campaign_id, opts)
|
906
|
+
|
907
|
+
Get Campaign Tags
|
908
|
+
|
909
|
+
Return all tags that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Campaigns Read` `Tags Read`
|
910
|
+
|
911
|
+
### Examples
|
912
|
+
|
913
|
+
```ruby
|
914
|
+
require 'time'
|
915
|
+
require 'klaviyo-api-sdk'
|
916
|
+
# setup authorization
|
917
|
+
KlaviyoAPI.configure do |config|
|
918
|
+
# Configure API key authorization: Klaviyo-API-Key
|
919
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
920
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
921
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
922
|
+
end
|
923
|
+
|
924
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
925
|
+
campaign_id = 'campaign_id_example' # String |
|
926
|
+
opts = {
|
927
|
+
fields_tag: ['name'] # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets
|
928
|
+
}
|
929
|
+
|
930
|
+
begin
|
931
|
+
# Get Campaign Tags
|
932
|
+
result = api_instance.get_campaign_tags(campaign_id, opts)
|
933
|
+
p result
|
934
|
+
rescue KlaviyoAPI::ApiError => e
|
935
|
+
puts "Error when calling CampaignsApi->get_campaign_tags: #{e}"
|
936
|
+
end
|
937
|
+
```
|
938
|
+
|
939
|
+
#### Using the get_campaign_tags_with_http_info variant
|
940
|
+
|
941
|
+
This returns an Array which contains the response data, status code and headers.
|
942
|
+
|
943
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_campaign_tags_with_http_info(campaign_id, opts)
|
944
|
+
|
945
|
+
```ruby
|
946
|
+
begin
|
947
|
+
# Get Campaign Tags
|
948
|
+
data, status_code, headers = api_instance.get_campaign_tags_with_http_info(campaign_id, opts)
|
949
|
+
p status_code # => 2xx
|
950
|
+
p headers # => { ... }
|
951
|
+
p data # => Hash<String, Object>
|
952
|
+
rescue KlaviyoAPI::ApiError => e
|
953
|
+
puts "Error when calling CampaignsApi->get_campaign_tags_with_http_info: #{e}"
|
954
|
+
end
|
955
|
+
```
|
956
|
+
|
957
|
+
### Parameters
|
958
|
+
|
959
|
+
| Name | Type | Description | Notes |
|
960
|
+
| ---- | ---- | ----------- | ----- |
|
961
|
+
| **campaign_id** | **String** | | |
|
962
|
+
| **fields_tag** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets | [optional] |
|
963
|
+
|
964
|
+
### Return type
|
965
|
+
|
966
|
+
**Hash<String, Object>**
|
967
|
+
|
968
|
+
### Authorization
|
969
|
+
|
970
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
971
|
+
|
972
|
+
### HTTP request headers
|
973
|
+
|
974
|
+
- **Content-Type**: Not defined
|
975
|
+
- **Accept**: application/json
|
976
|
+
|
977
|
+
|
978
|
+
## get_campaigns
|
979
|
+
|
980
|
+
> Hash<String, Object> get_campaigns(opts)
|
981
|
+
|
982
|
+
Get Campaigns
|
983
|
+
|
984
|
+
Returns some or all campaigns based on [optional] filters<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Read`
|
985
|
+
|
986
|
+
### Examples
|
987
|
+
|
988
|
+
```ruby
|
989
|
+
require 'time'
|
990
|
+
require 'klaviyo-api-sdk'
|
991
|
+
# setup authorization
|
992
|
+
KlaviyoAPI.configure do |config|
|
993
|
+
# Configure API key authorization: Klaviyo-API-Key
|
994
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
995
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
996
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
997
|
+
end
|
998
|
+
|
999
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
1000
|
+
opts = {
|
1001
|
+
fields_campaign: ['name'], # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets
|
1002
|
+
fields_tag: ['name'], # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets
|
1003
|
+
filter: 'filter_example', # String | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`
|
1004
|
+
include: ['tags'], # Array<String> | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships
|
1005
|
+
page_cursor: 'page_cursor_example', # String | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination
|
1006
|
+
sort: 'created_at' # String | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting
|
1007
|
+
}
|
1008
|
+
|
1009
|
+
begin
|
1010
|
+
# Get Campaigns
|
1011
|
+
result = api_instance.get_campaigns(opts)
|
1012
|
+
p result
|
1013
|
+
rescue KlaviyoAPI::ApiError => e
|
1014
|
+
puts "Error when calling CampaignsApi->get_campaigns: #{e}"
|
1015
|
+
end
|
1016
|
+
```
|
1017
|
+
|
1018
|
+
#### Using the get_campaigns_with_http_info variant
|
1019
|
+
|
1020
|
+
This returns an Array which contains the response data, status code and headers.
|
1021
|
+
|
1022
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_campaigns_with_http_info(opts)
|
1023
|
+
|
1024
|
+
```ruby
|
1025
|
+
begin
|
1026
|
+
# Get Campaigns
|
1027
|
+
data, status_code, headers = api_instance.get_campaigns_with_http_info(opts)
|
1028
|
+
p status_code # => 2xx
|
1029
|
+
p headers # => { ... }
|
1030
|
+
p data # => Hash<String, Object>
|
1031
|
+
rescue KlaviyoAPI::ApiError => e
|
1032
|
+
puts "Error when calling CampaignsApi->get_campaigns_with_http_info: #{e}"
|
1033
|
+
end
|
1034
|
+
```
|
1035
|
+
|
1036
|
+
### Parameters
|
1037
|
+
|
1038
|
+
| Name | Type | Description | Notes |
|
1039
|
+
| ---- | ---- | ----------- | ----- |
|
1040
|
+
| **fields_campaign** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets | [optional] |
|
1041
|
+
| **fields_tag** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets | [optional] |
|
1042
|
+
| **filter** | **String** | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` | [optional] |
|
1043
|
+
| **include** | [**Array<String>**](String.md) | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships | [optional] |
|
1044
|
+
| **page_cursor** | **String** | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination | [optional] |
|
1045
|
+
| **sort** | **String** | For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting | [optional] |
|
1046
|
+
|
1047
|
+
### Return type
|
1048
|
+
|
1049
|
+
**Hash<String, Object>**
|
1050
|
+
|
1051
|
+
### Authorization
|
1052
|
+
|
1053
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
1054
|
+
|
1055
|
+
### HTTP request headers
|
1056
|
+
|
1057
|
+
- **Content-Type**: Not defined
|
1058
|
+
- **Accept**: application/json
|
1059
|
+
|
1060
|
+
|
1061
|
+
## update_campaign
|
1062
|
+
|
1063
|
+
> Hash<String, Object> update_campaign(id, campaign_partial_update_query)
|
1064
|
+
|
1065
|
+
Update Campaign
|
1066
|
+
|
1067
|
+
Update a campaign with the given campaign ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write`
|
1068
|
+
|
1069
|
+
### Examples
|
1070
|
+
|
1071
|
+
```ruby
|
1072
|
+
require 'time'
|
1073
|
+
require 'klaviyo-api-sdk'
|
1074
|
+
# setup authorization
|
1075
|
+
KlaviyoAPI.configure do |config|
|
1076
|
+
# Configure API key authorization: Klaviyo-API-Key
|
1077
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
1078
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1079
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
1080
|
+
end
|
1081
|
+
|
1082
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
1083
|
+
id = 'id_example' # String | The campaign ID to be retrieved
|
1084
|
+
campaign_partial_update_query = KlaviyoAPI::CampaignPartialUpdateQuery.new({data: KlaviyoAPI::CampaignPartialUpdateQueryAsSubResource.new({type: 'campaign', id: 'id_example', attributes: KlaviyoAPI::CampaignPartialUpdateQueryAsSubResourceAttributes.new})}) # CampaignPartialUpdateQuery | Update a campaign and return it
|
1085
|
+
|
1086
|
+
begin
|
1087
|
+
# Update Campaign
|
1088
|
+
result = api_instance.update_campaign(id, campaign_partial_update_query)
|
1089
|
+
p result
|
1090
|
+
rescue KlaviyoAPI::ApiError => e
|
1091
|
+
puts "Error when calling CampaignsApi->update_campaign: #{e}"
|
1092
|
+
end
|
1093
|
+
```
|
1094
|
+
|
1095
|
+
#### Using the update_campaign_with_http_info variant
|
1096
|
+
|
1097
|
+
This returns an Array which contains the response data, status code and headers.
|
1098
|
+
|
1099
|
+
> <Array(Hash<String, Object>, Integer, Hash)> update_campaign_with_http_info(id, campaign_partial_update_query)
|
1100
|
+
|
1101
|
+
```ruby
|
1102
|
+
begin
|
1103
|
+
# Update Campaign
|
1104
|
+
data, status_code, headers = api_instance.update_campaign_with_http_info(id, campaign_partial_update_query)
|
1105
|
+
p status_code # => 2xx
|
1106
|
+
p headers # => { ... }
|
1107
|
+
p data # => Hash<String, Object>
|
1108
|
+
rescue KlaviyoAPI::ApiError => e
|
1109
|
+
puts "Error when calling CampaignsApi->update_campaign_with_http_info: #{e}"
|
1110
|
+
end
|
1111
|
+
```
|
1112
|
+
|
1113
|
+
### Parameters
|
1114
|
+
|
1115
|
+
| Name | Type | Description | Notes |
|
1116
|
+
| ---- | ---- | ----------- | ----- |
|
1117
|
+
| **id** | **String** | The campaign ID to be retrieved | |
|
1118
|
+
| **campaign_partial_update_query** | [**CampaignPartialUpdateQuery**](CampaignPartialUpdateQuery.md) | Update a campaign and return it | |
|
1119
|
+
|
1120
|
+
### Return type
|
1121
|
+
|
1122
|
+
**Hash<String, Object>**
|
1123
|
+
|
1124
|
+
### Authorization
|
1125
|
+
|
1126
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
1127
|
+
|
1128
|
+
### HTTP request headers
|
1129
|
+
|
1130
|
+
- **Content-Type**: application/json
|
1131
|
+
- **Accept**: application/json
|
1132
|
+
|
1133
|
+
|
1134
|
+
## update_campaign_message
|
1135
|
+
|
1136
|
+
> Hash<String, Object> update_campaign_message(id, campaign_message_partial_update_query)
|
1137
|
+
|
1138
|
+
Update Campaign Message
|
1139
|
+
|
1140
|
+
Update a campaign message<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write`
|
1141
|
+
|
1142
|
+
### Examples
|
1143
|
+
|
1144
|
+
```ruby
|
1145
|
+
require 'time'
|
1146
|
+
require 'klaviyo-api-sdk'
|
1147
|
+
# setup authorization
|
1148
|
+
KlaviyoAPI.configure do |config|
|
1149
|
+
# Configure API key authorization: Klaviyo-API-Key
|
1150
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
1151
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1152
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
1156
|
+
id = 'id_example' # String | The message ID to be retrieved
|
1157
|
+
campaign_message_partial_update_query = KlaviyoAPI::CampaignMessagePartialUpdateQuery.new({data: KlaviyoAPI::CampaignMessagePartialUpdateQueryAsSubResource.new({type: 'campaign-message', id: 'id_example', attributes: KlaviyoAPI::CampaignMessagePartialUpdateQueryAsSubResourceAttributes.new})}) # CampaignMessagePartialUpdateQuery | Update a message and return it
|
1158
|
+
|
1159
|
+
begin
|
1160
|
+
# Update Campaign Message
|
1161
|
+
result = api_instance.update_campaign_message(id, campaign_message_partial_update_query)
|
1162
|
+
p result
|
1163
|
+
rescue KlaviyoAPI::ApiError => e
|
1164
|
+
puts "Error when calling CampaignsApi->update_campaign_message: #{e}"
|
1165
|
+
end
|
1166
|
+
```
|
1167
|
+
|
1168
|
+
#### Using the update_campaign_message_with_http_info variant
|
1169
|
+
|
1170
|
+
This returns an Array which contains the response data, status code and headers.
|
1171
|
+
|
1172
|
+
> <Array(Hash<String, Object>, Integer, Hash)> update_campaign_message_with_http_info(id, campaign_message_partial_update_query)
|
1173
|
+
|
1174
|
+
```ruby
|
1175
|
+
begin
|
1176
|
+
# Update Campaign Message
|
1177
|
+
data, status_code, headers = api_instance.update_campaign_message_with_http_info(id, campaign_message_partial_update_query)
|
1178
|
+
p status_code # => 2xx
|
1179
|
+
p headers # => { ... }
|
1180
|
+
p data # => Hash<String, Object>
|
1181
|
+
rescue KlaviyoAPI::ApiError => e
|
1182
|
+
puts "Error when calling CampaignsApi->update_campaign_message_with_http_info: #{e}"
|
1183
|
+
end
|
1184
|
+
```
|
1185
|
+
|
1186
|
+
### Parameters
|
1187
|
+
|
1188
|
+
| Name | Type | Description | Notes |
|
1189
|
+
| ---- | ---- | ----------- | ----- |
|
1190
|
+
| **id** | **String** | The message ID to be retrieved | |
|
1191
|
+
| **campaign_message_partial_update_query** | [**CampaignMessagePartialUpdateQuery**](CampaignMessagePartialUpdateQuery.md) | Update a message and return it | |
|
1192
|
+
|
1193
|
+
### Return type
|
1194
|
+
|
1195
|
+
**Hash<String, Object>**
|
1196
|
+
|
1197
|
+
### Authorization
|
1198
|
+
|
1199
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
1200
|
+
|
1201
|
+
### HTTP request headers
|
1202
|
+
|
1203
|
+
- **Content-Type**: application/json
|
1204
|
+
- **Accept**: application/json
|
1205
|
+
|
1206
|
+
|
1207
|
+
## update_campaign_send_job
|
1208
|
+
|
1209
|
+
> update_campaign_send_job(id, campaign_send_job_partial_update_query)
|
1210
|
+
|
1211
|
+
Update Campaign Send Job
|
1212
|
+
|
1213
|
+
Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write`
|
1214
|
+
|
1215
|
+
### Examples
|
1216
|
+
|
1217
|
+
```ruby
|
1218
|
+
require 'time'
|
1219
|
+
require 'klaviyo-api-sdk'
|
1220
|
+
# setup authorization
|
1221
|
+
KlaviyoAPI.configure do |config|
|
1222
|
+
# Configure API key authorization: Klaviyo-API-Key
|
1223
|
+
config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY'
|
1224
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1225
|
+
# config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer'
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
api_instance = KlaviyoAPI::CampaignsApi.new
|
1229
|
+
id = 'id_example' # String | The ID of the currently sending campaign to cancel or revert
|
1230
|
+
campaign_send_job_partial_update_query = KlaviyoAPI::CampaignSendJobPartialUpdateQuery.new({data: KlaviyoAPI::CampaignSendJobPartialUpdateQueryAsSubResource.new({type: 'campaign-send-job', id: 'id_example', attributes: KlaviyoAPI::CampaignSendJobPartialUpdateQueryAsSubResourceAttributes.new({action: 'cancel'})})}) # CampaignSendJobPartialUpdateQuery | Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT
|
1231
|
+
|
1232
|
+
begin
|
1233
|
+
# Update Campaign Send Job
|
1234
|
+
api_instance.update_campaign_send_job(id, campaign_send_job_partial_update_query)
|
1235
|
+
rescue KlaviyoAPI::ApiError => e
|
1236
|
+
puts "Error when calling CampaignsApi->update_campaign_send_job: #{e}"
|
1237
|
+
end
|
1238
|
+
```
|
1239
|
+
|
1240
|
+
#### Using the update_campaign_send_job_with_http_info variant
|
1241
|
+
|
1242
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1243
|
+
|
1244
|
+
> <Array(nil, Integer, Hash)> update_campaign_send_job_with_http_info(id, campaign_send_job_partial_update_query)
|
1245
|
+
|
1246
|
+
```ruby
|
1247
|
+
begin
|
1248
|
+
# Update Campaign Send Job
|
1249
|
+
data, status_code, headers = api_instance.update_campaign_send_job_with_http_info(id, campaign_send_job_partial_update_query)
|
1250
|
+
p status_code # => 2xx
|
1251
|
+
p headers # => { ... }
|
1252
|
+
p data # => nil
|
1253
|
+
rescue KlaviyoAPI::ApiError => e
|
1254
|
+
puts "Error when calling CampaignsApi->update_campaign_send_job_with_http_info: #{e}"
|
1255
|
+
end
|
1256
|
+
```
|
1257
|
+
|
1258
|
+
### Parameters
|
1259
|
+
|
1260
|
+
| Name | Type | Description | Notes |
|
1261
|
+
| ---- | ---- | ----------- | ----- |
|
1262
|
+
| **id** | **String** | The ID of the currently sending campaign to cancel or revert | |
|
1263
|
+
| **campaign_send_job_partial_update_query** | [**CampaignSendJobPartialUpdateQuery**](CampaignSendJobPartialUpdateQuery.md) | Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT | |
|
1264
|
+
|
1265
|
+
### Return type
|
1266
|
+
|
1267
|
+
nil (empty response body)
|
1268
|
+
|
1269
|
+
### Authorization
|
1270
|
+
|
1271
|
+
[Klaviyo-API-Key](../README.md#Klaviyo-API-Key)
|
1272
|
+
|
1273
|
+
### HTTP request headers
|
1274
|
+
|
1275
|
+
- **Content-Type**: application/json
|
1276
|
+
- **Accept**: application/json
|
1277
|
+
|