klaviyo-api-sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +9 -0
- data/LICENSE.md +21 -0
- data/README.md +1316 -0
- data/Rakefile +10 -0
- data/docs/CatalogCategoryCreateJobCreateQuery.md +18 -0
- data/docs/CatalogCategoryCreateJobCreateQueryAsSubResource.md +20 -0
- data/docs/CatalogCategoryCreateJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogCategoryCreateQuery.md +18 -0
- data/docs/CatalogCategoryCreateQueryAsSubResource.md +22 -0
- data/docs/CatalogCategoryCreateQueryAsSubResourceAttributes.md +24 -0
- data/docs/CatalogCategoryDeleteJobCreateQuery.md +18 -0
- data/docs/CatalogCategoryDeleteJobCreateQueryAsSubResource.md +20 -0
- data/docs/CatalogCategoryDeleteJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogCategoryDeleteQueryAsSubResource.md +20 -0
- data/docs/CatalogCategoryItemOp.md +18 -0
- data/docs/CatalogCategoryUpdateJobCreateQuery.md +18 -0
- data/docs/CatalogCategoryUpdateJobCreateQueryAsSubResource.md +20 -0
- data/docs/CatalogCategoryUpdateJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogCategoryUpdateQuery.md +18 -0
- data/docs/CatalogCategoryUpdateQueryAsSubResource.md +24 -0
- data/docs/CatalogCategoryUpdateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogItemCategoryOp.md +18 -0
- data/docs/CatalogItemCreateJobCreateQuery.md +18 -0
- data/docs/CatalogItemCreateJobCreateQueryAsSubResource.md +20 -0
- data/docs/CatalogItemCreateJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogItemCreateQuery.md +18 -0
- data/docs/CatalogItemCreateQueryAsSubResource.md +22 -0
- data/docs/CatalogItemCreateQueryAsSubResourceAttributes.md +38 -0
- data/docs/CatalogItemCreateQueryAsSubResourceRelationships.md +18 -0
- data/docs/CatalogItemCreateQueryAsSubResourceRelationshipsCategories.md +18 -0
- data/docs/CatalogItemCreateQueryAsSubResourceRelationshipsCategoriesDataInner.md +20 -0
- data/docs/CatalogItemDeleteJobCreateQuery.md +18 -0
- data/docs/CatalogItemDeleteJobCreateQueryAsSubResource.md +20 -0
- data/docs/CatalogItemDeleteJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogItemDeleteQueryAsSubResource.md +20 -0
- data/docs/CatalogItemUpdateJobCreateQuery.md +18 -0
- data/docs/CatalogItemUpdateJobCreateQueryAsSubResource.md +20 -0
- data/docs/CatalogItemUpdateJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogItemUpdateQuery.md +18 -0
- data/docs/CatalogItemUpdateQueryAsSubResource.md +24 -0
- data/docs/CatalogItemUpdateQueryAsSubResourceAttributes.md +32 -0
- data/docs/CatalogJobErrorPayload.md +26 -0
- data/docs/CatalogVariantCreateJobCreateQuery.md +18 -0
- data/docs/CatalogVariantCreateJobCreateQueryAsSubResource.md +20 -0
- data/docs/CatalogVariantCreateJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogVariantCreateQuery.md +18 -0
- data/docs/CatalogVariantCreateQueryAsSubResource.md +22 -0
- data/docs/CatalogVariantCreateQueryAsSubResourceAttributes.md +46 -0
- data/docs/CatalogVariantCreateQueryAsSubResourceRelationships.md +18 -0
- data/docs/CatalogVariantCreateQueryAsSubResourceRelationshipsItems.md +18 -0
- data/docs/CatalogVariantCreateQueryAsSubResourceRelationshipsItemsDataInner.md +20 -0
- data/docs/CatalogVariantDeleteJobCreateQuery.md +18 -0
- data/docs/CatalogVariantDeleteJobCreateQueryAsSubResource.md +20 -0
- data/docs/CatalogVariantDeleteJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogVariantDeleteQueryAsSubResource.md +20 -0
- data/docs/CatalogVariantUpdateJobCreateQuery.md +18 -0
- data/docs/CatalogVariantUpdateJobCreateQueryAsSubResource.md +20 -0
- data/docs/CatalogVariantUpdateJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/CatalogVariantUpdateQuery.md +18 -0
- data/docs/CatalogVariantUpdateQueryAsSubResource.md +22 -0
- data/docs/CatalogVariantUpdateQueryAsSubResourceAttributes.md +38 -0
- data/docs/CatalogsApi.md +4048 -0
- data/docs/ClientApi.md +205 -0
- data/docs/EmailMessageContent.md +24 -0
- data/docs/EmailTrackingOptions.md +24 -0
- data/docs/ErrorSource.md +18 -0
- data/docs/EventCreateQuery.md +18 -0
- data/docs/EventCreateQueryAsSubResource.md +20 -0
- data/docs/EventCreateQueryAsSubResourceAttributes.md +28 -0
- data/docs/EventsApi.md +472 -0
- data/docs/FlowUpdateQuery.md +18 -0
- data/docs/FlowUpdateQueryAsSubResource.md +22 -0
- data/docs/FlowUpdateQueryAsSubResourceAttributes.md +18 -0
- data/docs/FlowsApi.md +951 -0
- data/docs/GetCatalogItems4XXResponse.md +18 -0
- data/docs/GetCatalogItems4XXResponseErrorsInner.md +26 -0
- data/docs/GetCatalogItems4XXResponseErrorsInnerSource.md +20 -0
- data/docs/IncludedCategories.md +24 -0
- data/docs/IncludedCategoriesAttributes.md +22 -0
- data/docs/IncludedFlowAction.md +24 -0
- data/docs/IncludedFlowActions.md +24 -0
- data/docs/IncludedFlowActionsAttributes.md +32 -0
- data/docs/IncludedFlowActionsAttributesTrackingOptions.md +49 -0
- data/docs/IncludedFlowMessages.md +24 -0
- data/docs/IncludedFlowMessagesAttributes.md +26 -0
- data/docs/IncludedFlowMessagesAttributesContent.md +49 -0
- data/docs/IncludedFlows.md +24 -0
- data/docs/IncludedFlowsAttributes.md +28 -0
- data/docs/IncludedItems.md +24 -0
- data/docs/IncludedItemsAttributes.md +38 -0
- data/docs/IncludedLists.md +24 -0
- data/docs/IncludedListsAttributes.md +22 -0
- data/docs/IncludedMetrics.md +24 -0
- data/docs/IncludedMetricsAttributes.md +24 -0
- data/docs/IncludedProfile.md +24 -0
- data/docs/IncludedProfiles.md +24 -0
- data/docs/IncludedProfilesAttributes.md +44 -0
- data/docs/IncludedSegments.md +24 -0
- data/docs/IncludedVariants.md +24 -0
- data/docs/IncludedVariantsAttributes.md +46 -0
- data/docs/IncludedVariantsLinks.md +18 -0
- data/docs/ListCreateQuery.md +18 -0
- data/docs/ListCreateQueryAsSubResource.md +20 -0
- data/docs/ListCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/ListDeleteQueryAsSubResource.md +20 -0
- data/docs/ListMembersAddQuery.md +18 -0
- data/docs/ListMembersAddQueryDataInner.md +20 -0
- data/docs/ListMembersDeleteQuery.md +18 -0
- data/docs/ListPartialUpdateQuery.md +18 -0
- data/docs/ListPartialUpdateQueryAsSubResource.md +22 -0
- data/docs/ListsApi.md +686 -0
- data/docs/MetricAggregateQuery.md +18 -0
- data/docs/MetricAggregateQueryAsSubResource.md +20 -0
- data/docs/MetricAggregateQueryAsSubResourceAttributes.md +36 -0
- data/docs/MetricAggregateRowDTO.md +20 -0
- data/docs/MetricCreateQuery.md +20 -0
- data/docs/MetricsApi.md +233 -0
- data/docs/OnsiteProfileCreateQuery.md +18 -0
- data/docs/OnsiteProfileCreateQueryAsSubResource.md +22 -0
- data/docs/OnsiteProfileMeta.md +18 -0
- data/docs/OnsiteProfileMetaIdentifiers.md +28 -0
- data/docs/OnsiteSubscriptionCreateQuery.md +18 -0
- data/docs/OnsiteSubscriptionCreateQueryAsSubResource.md +20 -0
- data/docs/OnsiteSubscriptionCreateQueryAsSubResourceAttributes.md +26 -0
- data/docs/ProfileCreateQuery.md +18 -0
- data/docs/ProfileCreateQueryAsSubResource.md +20 -0
- data/docs/ProfileCreateQueryAsSubResourceAttributes.md +38 -0
- data/docs/ProfileLocation.md +34 -0
- data/docs/ProfileLocationLatitude.md +49 -0
- data/docs/ProfilePartialUpdateQuery.md +18 -0
- data/docs/ProfilePartialUpdateQueryAsSubResource.md +22 -0
- data/docs/ProfilesApi.md +825 -0
- data/docs/SMSMessageContent.md +20 -0
- data/docs/SMSRenderOptions.md +24 -0
- data/docs/SMSTrackingOptions.md +20 -0
- data/docs/SegmentPartialUpdateQuery.md +18 -0
- data/docs/SegmentPartialUpdateQueryAsSubResource.md +22 -0
- data/docs/SegmentsApi.md +390 -0
- data/docs/SendOptions.md +20 -0
- data/docs/Subscription.md +20 -0
- data/docs/SubscriptionCreateJobCreateQuery.md +18 -0
- data/docs/SubscriptionCreateJobCreateQueryAsSubResource.md +20 -0
- data/docs/SubscriptionCreateJobCreateQueryAsSubResourceAttributes.md +22 -0
- data/docs/Suppression.md +18 -0
- data/docs/SuppressionCreateJobCreateQuery.md +18 -0
- data/docs/SuppressionCreateJobCreateQueryAsSubResource.md +20 -0
- data/docs/SuppressionCreateJobCreateQueryAsSubResourceAttributes.md +18 -0
- data/docs/TemplateCloneQuery.md +18 -0
- data/docs/TemplateCloneQueryAsSubResource.md +20 -0
- data/docs/TemplateCloneQueryAsSubResourceAttributes.md +20 -0
- data/docs/TemplateCreateQuery.md +18 -0
- data/docs/TemplateCreateQueryAsSubResource.md +20 -0
- data/docs/TemplateCreateQueryAsSubResourceAttributes.md +26 -0
- data/docs/TemplateDeleteQueryAsSubResource.md +20 -0
- data/docs/TemplateUpdateQuery.md +18 -0
- data/docs/TemplateUpdateQueryAsSubResource.md +22 -0
- data/docs/TemplateUpdateQueryAsSubResourceAttributes.md +24 -0
- data/docs/TemplatesApi.md +529 -0
- data/docs/UnsubscriptionCreateJobCreateQuery.md +18 -0
- data/docs/UnsubscriptionCreateJobCreateQueryAsSubResource.md +20 -0
- data/docs/UnsubscriptionCreateJobCreateQueryAsSubResourceAttributes.md +22 -0
- data/docs/UnsuppressionCreateJobCreateQuery.md +18 -0
- data/docs/UnsuppressionCreateJobCreateQueryAsSubResource.md +20 -0
- data/docs/UtmParamInfo.md +20 -0
- data/docs/V2TemplateRenderQuery.md +18 -0
- data/docs/V2TemplateRenderQueryAsSubResource.md +20 -0
- data/docs/V2TemplateRenderQueryAsSubResourceAttributes.md +20 -0
- data/git_push.sh +57 -0
- data/klaviyo-api-sdk.gemspec +40 -0
- data/lib/klaviyo-api-sdk/api/catalogs_api.rb +4095 -0
- data/lib/klaviyo-api-sdk/api/client_api.rb +249 -0
- data/lib/klaviyo-api-sdk/api/events_api.rb +505 -0
- data/lib/klaviyo-api-sdk/api/flows_api.rb +1009 -0
- data/lib/klaviyo-api-sdk/api/lists_api.rb +708 -0
- data/lib/klaviyo-api-sdk/api/metrics_api.rb +236 -0
- data/lib/klaviyo-api-sdk/api/profiles_api.rb +840 -0
- data/lib/klaviyo-api-sdk/api/segments_api.rb +392 -0
- data/lib/klaviyo-api-sdk/api/templates_api.rb +536 -0
- data/lib/klaviyo-api-sdk/api_client.rb +390 -0
- data/lib/klaviyo-api-sdk/api_error.rb +57 -0
- data/lib/klaviyo-api-sdk/configuration.rb +283 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_create_query_as_sub_resource.rb +281 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_create_query_as_sub_resource_attributes.rb +291 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_delete_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_item_op.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_update_query_as_sub_resource.rb +295 -0
- data/lib/klaviyo-api-sdk/models/catalog_category_update_query_as_sub_resource_attributes.rb +219 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_category_op.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource.rb +281 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_attributes.rb +366 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships.rb +219 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships_categories.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships_categories_data_inner.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_delete_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_update_query_as_sub_resource.rb +295 -0
- data/lib/klaviyo-api-sdk/models/catalog_item_update_query_as_sub_resource_attributes.rb +284 -0
- data/lib/klaviyo-api-sdk/models/catalog_job_error_payload.rb +280 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource.rb +281 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_attributes.rb +435 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships.rb +219 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships_items.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships_items_data_inner.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_delete_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_query_as_sub_resource.rb +286 -0
- data/lib/klaviyo-api-sdk/models/catalog_variant_update_query_as_sub_resource_attributes.rb +346 -0
- data/lib/klaviyo-api-sdk/models/email_message_content.rb +266 -0
- data/lib/klaviyo-api-sdk/models/email_tracking_options.rb +268 -0
- data/lib/klaviyo-api-sdk/models/error_source.rb +224 -0
- data/lib/klaviyo-api-sdk/models/event_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/event_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/event_create_query_as_sub_resource_attributes.rb +279 -0
- data/lib/klaviyo-api-sdk/models/flow_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/flow_update_query_as_sub_resource.rb +286 -0
- data/lib/klaviyo-api-sdk/models/flow_update_query_as_sub_resource_attributes.rb +224 -0
- data/lib/klaviyo-api-sdk/models/get_catalog_items4_xx_response.rb +226 -0
- data/lib/klaviyo-api-sdk/models/get_catalog_items4_xx_response_errors_inner.rb +275 -0
- data/lib/klaviyo-api-sdk/models/get_catalog_items4_xx_response_errors_inner_source.rb +228 -0
- data/lib/klaviyo-api-sdk/models/included_categories.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_categories_attributes.rb +237 -0
- data/lib/klaviyo-api-sdk/models/included_flow_action.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_flow_actions.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_flow_actions_attributes.rb +282 -0
- data/lib/klaviyo-api-sdk/models/included_flow_actions_attributes_tracking_options.rb +105 -0
- data/lib/klaviyo-api-sdk/models/included_flow_messages.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_flow_messages_attributes.rb +270 -0
- data/lib/klaviyo-api-sdk/models/included_flow_messages_attributes_content.rb +105 -0
- data/lib/klaviyo-api-sdk/models/included_flows.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_flows_attributes.rb +264 -0
- data/lib/klaviyo-api-sdk/models/included_items.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_items_attributes.rb +311 -0
- data/lib/klaviyo-api-sdk/models/included_lists.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_lists_attributes.rb +237 -0
- data/lib/klaviyo-api-sdk/models/included_metrics.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_metrics_attributes.rb +246 -0
- data/lib/klaviyo-api-sdk/models/included_profile.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_profiles.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_profiles_attributes.rb +336 -0
- data/lib/klaviyo-api-sdk/models/included_segments.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_variants.rb +300 -0
- data/lib/klaviyo-api-sdk/models/included_variants_attributes.rb +382 -0
- data/lib/klaviyo-api-sdk/models/included_variants_links.rb +224 -0
- data/lib/klaviyo-api-sdk/models/list_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/list_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/list_create_query_as_sub_resource_attributes.rb +224 -0
- data/lib/klaviyo-api-sdk/models/list_delete_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/list_members_add_query.rb +226 -0
- data/lib/klaviyo-api-sdk/models/list_members_add_query_data_inner.rb +272 -0
- data/lib/klaviyo-api-sdk/models/list_members_delete_query.rb +226 -0
- data/lib/klaviyo-api-sdk/models/list_partial_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/list_partial_update_query_as_sub_resource.rb +286 -0
- data/lib/klaviyo-api-sdk/models/metric_aggregate_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/metric_aggregate_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/metric_aggregate_query_as_sub_resource_attributes.rb +380 -0
- data/lib/klaviyo-api-sdk/models/metric_aggregate_row_dto.rb +240 -0
- data/lib/klaviyo-api-sdk/models/metric_create_query.rb +233 -0
- data/lib/klaviyo-api-sdk/models/onsite_profile_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/onsite_profile_create_query_as_sub_resource.rb +281 -0
- data/lib/klaviyo-api-sdk/models/onsite_profile_meta.rb +224 -0
- data/lib/klaviyo-api-sdk/models/onsite_profile_meta_identifiers.rb +264 -0
- data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query_as_sub_resource_attributes.rb +260 -0
- data/lib/klaviyo-api-sdk/models/profile_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/profile_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/profile_create_query_as_sub_resource_attributes.rb +309 -0
- data/lib/klaviyo-api-sdk/models/profile_location.rb +291 -0
- data/lib/klaviyo-api-sdk/models/profile_location_latitude.rb +105 -0
- data/lib/klaviyo-api-sdk/models/profile_partial_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/profile_partial_update_query_as_sub_resource.rb +286 -0
- data/lib/klaviyo-api-sdk/models/segment_partial_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/segment_partial_update_query_as_sub_resource.rb +286 -0
- data/lib/klaviyo-api-sdk/models/send_options.rb +238 -0
- data/lib/klaviyo-api-sdk/models/sms_message_content.rb +238 -0
- data/lib/klaviyo-api-sdk/models/sms_render_options.rb +266 -0
- data/lib/klaviyo-api-sdk/models/sms_tracking_options.rb +240 -0
- data/lib/klaviyo-api-sdk/models/subscription.rb +228 -0
- data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query_as_sub_resource_attributes.rb +249 -0
- data/lib/klaviyo-api-sdk/models/suppression.rb +224 -0
- data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query_as_sub_resource_attributes.rb +226 -0
- data/lib/klaviyo-api-sdk/models/template_clone_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/template_clone_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/template_clone_query_as_sub_resource_attributes.rb +230 -0
- data/lib/klaviyo-api-sdk/models/template_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/template_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/template_create_query_as_sub_resource_attributes.rb +267 -0
- data/lib/klaviyo-api-sdk/models/template_delete_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/template_update_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/template_update_query_as_sub_resource.rb +286 -0
- data/lib/klaviyo-api-sdk/models/template_update_query_as_sub_resource_attributes.rb +248 -0
- data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query_as_sub_resource_attributes.rb +246 -0
- data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/utm_param_info.rb +238 -0
- data/lib/klaviyo-api-sdk/models/v2_template_render_query.rb +224 -0
- data/lib/klaviyo-api-sdk/models/v2_template_render_query_as_sub_resource.rb +272 -0
- data/lib/klaviyo-api-sdk/models/v2_template_render_query_as_sub_resource_attributes.rb +235 -0
- data/lib/klaviyo-api-sdk/version.rb +15 -0
- data/lib/klaviyo-api-sdk.rb +253 -0
- data/spec/api/catalogs_api_spec.rb +759 -0
- data/spec/api/client_api_spec.rb +74 -0
- data/spec/api/events_api_spec.rb +120 -0
- data/spec/api/flows_api_spec.rb +209 -0
- data/spec/api/lists_api_spec.rb +156 -0
- data/spec/api/metrics_api_spec.rb +74 -0
- data/spec/api/profiles_api_spec.rb +178 -0
- data/spec/api/segments_api_spec.rb +103 -0
- data/spec/api/templates_api_spec.rb +126 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/catalog_category_create_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_category_create_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_category_create_job_create_query_spec.rb +34 -0
- data/spec/models/catalog_category_create_query_as_sub_resource_attributes_spec.rb +56 -0
- data/spec/models/catalog_category_create_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/catalog_category_create_query_spec.rb +34 -0
- data/spec/models/catalog_category_delete_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_category_delete_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_category_delete_job_create_query_spec.rb +34 -0
- data/spec/models/catalog_category_delete_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_category_item_op_spec.rb +34 -0
- data/spec/models/catalog_category_update_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_category_update_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_category_update_job_create_query_spec.rb +34 -0
- data/spec/models/catalog_category_update_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_category_update_query_as_sub_resource_spec.rb +56 -0
- data/spec/models/catalog_category_update_query_spec.rb +34 -0
- data/spec/models/catalog_item_category_op_spec.rb +34 -0
- data/spec/models/catalog_item_create_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_item_create_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_item_create_job_create_query_spec.rb +34 -0
- data/spec/models/catalog_item_create_query_as_sub_resource_attributes_spec.rb +98 -0
- data/spec/models/catalog_item_create_query_as_sub_resource_relationships_categories_data_inner_spec.rb +44 -0
- data/spec/models/catalog_item_create_query_as_sub_resource_relationships_categories_spec.rb +34 -0
- data/spec/models/catalog_item_create_query_as_sub_resource_relationships_spec.rb +34 -0
- data/spec/models/catalog_item_create_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/catalog_item_create_query_spec.rb +34 -0
- data/spec/models/catalog_item_delete_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_item_delete_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_item_delete_job_create_query_spec.rb +34 -0
- data/spec/models/catalog_item_delete_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_item_update_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_item_update_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_item_update_job_create_query_spec.rb +34 -0
- data/spec/models/catalog_item_update_query_as_sub_resource_attributes_spec.rb +76 -0
- data/spec/models/catalog_item_update_query_as_sub_resource_spec.rb +56 -0
- data/spec/models/catalog_item_update_query_spec.rb +34 -0
- data/spec/models/catalog_job_error_payload_spec.rb +58 -0
- data/spec/models/catalog_variant_create_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_variant_create_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_variant_create_job_create_query_spec.rb +34 -0
- data/spec/models/catalog_variant_create_query_as_sub_resource_attributes_spec.rb +126 -0
- data/spec/models/catalog_variant_create_query_as_sub_resource_relationships_items_data_inner_spec.rb +44 -0
- data/spec/models/catalog_variant_create_query_as_sub_resource_relationships_items_spec.rb +34 -0
- data/spec/models/catalog_variant_create_query_as_sub_resource_relationships_spec.rb +34 -0
- data/spec/models/catalog_variant_create_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/catalog_variant_create_query_spec.rb +34 -0
- data/spec/models/catalog_variant_delete_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_variant_delete_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_variant_delete_job_create_query_spec.rb +34 -0
- data/spec/models/catalog_variant_delete_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_variant_update_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/catalog_variant_update_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/catalog_variant_update_job_create_query_spec.rb +34 -0
- data/spec/models/catalog_variant_update_query_as_sub_resource_attributes_spec.rb +98 -0
- data/spec/models/catalog_variant_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/catalog_variant_update_query_spec.rb +34 -0
- data/spec/models/email_message_content_spec.rb +52 -0
- data/spec/models/email_tracking_options_spec.rb +52 -0
- data/spec/models/error_source_spec.rb +34 -0
- data/spec/models/event_create_query_as_sub_resource_attributes_spec.rb +64 -0
- data/spec/models/event_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/event_create_query_spec.rb +34 -0
- data/spec/models/flow_update_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/flow_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/flow_update_query_spec.rb +34 -0
- data/spec/models/get_catalog_items4_xx_response_errors_inner_source_spec.rb +40 -0
- data/spec/models/get_catalog_items4_xx_response_errors_inner_spec.rb +58 -0
- data/spec/models/get_catalog_items4_xx_response_spec.rb +34 -0
- data/spec/models/included_categories_attributes_spec.rb +46 -0
- data/spec/models/included_categories_spec.rb +56 -0
- data/spec/models/included_flow_action_spec.rb +56 -0
- data/spec/models/included_flow_actions_attributes_spec.rb +76 -0
- data/spec/models/included_flow_actions_attributes_tracking_options_spec.rb +31 -0
- data/spec/models/included_flow_actions_spec.rb +56 -0
- data/spec/models/included_flow_messages_attributes_content_spec.rb +31 -0
- data/spec/models/included_flow_messages_attributes_spec.rb +58 -0
- data/spec/models/included_flow_messages_spec.rb +56 -0
- data/spec/models/included_flows_attributes_spec.rb +64 -0
- data/spec/models/included_flows_spec.rb +56 -0
- data/spec/models/included_items_attributes_spec.rb +94 -0
- data/spec/models/included_items_spec.rb +56 -0
- data/spec/models/included_lists_attributes_spec.rb +46 -0
- data/spec/models/included_lists_spec.rb +56 -0
- data/spec/models/included_metrics_attributes_spec.rb +52 -0
- data/spec/models/included_metrics_spec.rb +56 -0
- data/spec/models/included_profile_spec.rb +56 -0
- data/spec/models/included_profiles_attributes_spec.rb +112 -0
- data/spec/models/included_profiles_spec.rb +56 -0
- data/spec/models/included_segments_spec.rb +56 -0
- data/spec/models/included_variants_attributes_spec.rb +122 -0
- data/spec/models/included_variants_links_spec.rb +34 -0
- data/spec/models/included_variants_spec.rb +56 -0
- data/spec/models/list_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/list_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/list_create_query_spec.rb +34 -0
- data/spec/models/list_delete_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/list_members_add_query_data_inner_spec.rb +44 -0
- data/spec/models/list_members_add_query_spec.rb +34 -0
- data/spec/models/list_members_delete_query_spec.rb +34 -0
- data/spec/models/list_partial_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/list_partial_update_query_spec.rb +34 -0
- data/spec/models/metric_aggregate_query_as_sub_resource_attributes_spec.rb +104 -0
- data/spec/models/metric_aggregate_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/metric_aggregate_query_spec.rb +34 -0
- data/spec/models/metric_aggregate_row_dto_spec.rb +40 -0
- data/spec/models/metric_create_query_spec.rb +40 -0
- data/spec/models/onsite_profile_create_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/onsite_profile_create_query_spec.rb +34 -0
- data/spec/models/onsite_profile_meta_identifiers_spec.rb +64 -0
- data/spec/models/onsite_profile_meta_spec.rb +34 -0
- data/spec/models/onsite_subscription_create_query_as_sub_resource_attributes_spec.rb +58 -0
- data/spec/models/onsite_subscription_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/onsite_subscription_create_query_spec.rb +34 -0
- data/spec/models/profile_create_query_as_sub_resource_attributes_spec.rb +94 -0
- data/spec/models/profile_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/profile_create_query_spec.rb +34 -0
- data/spec/models/profile_location_latitude_spec.rb +31 -0
- data/spec/models/profile_location_spec.rb +82 -0
- data/spec/models/profile_partial_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/profile_partial_update_query_spec.rb +34 -0
- data/spec/models/segment_partial_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/segment_partial_update_query_spec.rb +34 -0
- data/spec/models/send_options_spec.rb +40 -0
- data/spec/models/sms_message_content_spec.rb +40 -0
- data/spec/models/sms_render_options_spec.rb +52 -0
- data/spec/models/sms_tracking_options_spec.rb +40 -0
- data/spec/models/subscription_create_job_create_query_as_sub_resource_attributes_spec.rb +46 -0
- data/spec/models/subscription_create_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/subscription_create_job_create_query_spec.rb +34 -0
- data/spec/models/subscription_spec.rb +40 -0
- data/spec/models/suppression_create_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
- data/spec/models/suppression_create_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/suppression_create_job_create_query_spec.rb +34 -0
- data/spec/models/suppression_spec.rb +34 -0
- data/spec/models/template_clone_query_as_sub_resource_attributes_spec.rb +40 -0
- data/spec/models/template_clone_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/template_clone_query_spec.rb +34 -0
- data/spec/models/template_create_query_as_sub_resource_attributes_spec.rb +58 -0
- data/spec/models/template_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/template_create_query_spec.rb +34 -0
- data/spec/models/template_delete_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/template_update_query_as_sub_resource_attributes_spec.rb +52 -0
- data/spec/models/template_update_query_as_sub_resource_spec.rb +50 -0
- data/spec/models/template_update_query_spec.rb +34 -0
- data/spec/models/unsubscription_create_job_create_query_as_sub_resource_attributes_spec.rb +46 -0
- data/spec/models/unsubscription_create_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/unsubscription_create_job_create_query_spec.rb +34 -0
- data/spec/models/unsuppression_create_job_create_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/unsuppression_create_job_create_query_spec.rb +34 -0
- data/spec/models/utm_param_info_spec.rb +40 -0
- data/spec/models/v2_template_render_query_as_sub_resource_attributes_spec.rb +40 -0
- data/spec/models/v2_template_render_query_as_sub_resource_spec.rb +44 -0
- data/spec/models/v2_template_render_query_spec.rb +34 -0
- data/spec/spec_helper.rb +111 -0
- metadata +583 -0
@@ -0,0 +1,708 @@
|
|
1
|
+
=begin
|
2
|
+
#Klaviyo API
|
3
|
+
|
4
|
+
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2022-10-17
|
7
|
+
Contact: developers@klaviyo.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module KlaviyoAPI
|
16
|
+
class ListsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create List
|
23
|
+
# Create a new list.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write`
|
24
|
+
# @param list_create_query [ListCreateQuery]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Hash<String, Object>]
|
27
|
+
def create_list(list_create_query, opts = {})
|
28
|
+
data, _status_code, _headers = create_list_with_http_info(list_create_query, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create List
|
33
|
+
# Create a new list.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write`
|
34
|
+
# @param list_create_query [ListCreateQuery]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
37
|
+
def create_list_with_http_info(list_create_query, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ListsApi.create_list ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'list_create_query' is set
|
42
|
+
if @api_client.config.client_side_validation && list_create_query.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'list_create_query' when calling ListsApi.create_list"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/api/lists/'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# klaviyo api revision
|
54
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
59
|
+
if !content_type.nil?
|
60
|
+
header_params['Content-Type'] = content_type
|
61
|
+
end
|
62
|
+
|
63
|
+
# form parameters
|
64
|
+
form_params = opts[:form_params] || {}
|
65
|
+
|
66
|
+
# http body (model)
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(list_create_query)
|
68
|
+
|
69
|
+
# return_type
|
70
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
71
|
+
|
72
|
+
# auth_names
|
73
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
74
|
+
|
75
|
+
new_options = opts.merge(
|
76
|
+
:operation => :"ListsApi.create_list",
|
77
|
+
:header_params => header_params,
|
78
|
+
:query_params => query_params,
|
79
|
+
:form_params => form_params,
|
80
|
+
:body => post_body,
|
81
|
+
:auth_names => auth_names,
|
82
|
+
:return_type => return_type
|
83
|
+
)
|
84
|
+
|
85
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: ListsApi#create_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Add Profile to List
|
93
|
+
# Add a profile to a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write` `Profiles Write`
|
94
|
+
# @param id [String]
|
95
|
+
# @param related_resource [String]
|
96
|
+
# @param list_members_add_query [ListMembersAddQuery]
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [nil]
|
99
|
+
def create_list_relationships(id, related_resource, list_members_add_query, opts = {})
|
100
|
+
create_list_relationships_with_http_info(id, related_resource, list_members_add_query, opts)
|
101
|
+
nil
|
102
|
+
end
|
103
|
+
|
104
|
+
# Add Profile to List
|
105
|
+
# Add a profile to a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write` `Profiles Write`
|
106
|
+
# @param id [String]
|
107
|
+
# @param related_resource [String]
|
108
|
+
# @param list_members_add_query [ListMembersAddQuery]
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
111
|
+
def create_list_relationships_with_http_info(id, related_resource, list_members_add_query, opts = {})
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug 'Calling API: ListsApi.create_list_relationships ...'
|
114
|
+
end
|
115
|
+
# verify the required parameter 'id' is set
|
116
|
+
if @api_client.config.client_side_validation && id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.create_list_relationships"
|
118
|
+
end
|
119
|
+
# verify the required parameter 'related_resource' is set
|
120
|
+
if @api_client.config.client_side_validation && related_resource.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'related_resource' when calling ListsApi.create_list_relationships"
|
122
|
+
end
|
123
|
+
# verify enum value
|
124
|
+
allowable_values = ["profiles"]
|
125
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
|
126
|
+
fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
|
127
|
+
end
|
128
|
+
# verify the required parameter 'list_members_add_query' is set
|
129
|
+
if @api_client.config.client_side_validation && list_members_add_query.nil?
|
130
|
+
fail ArgumentError, "Missing the required parameter 'list_members_add_query' when calling ListsApi.create_list_relationships"
|
131
|
+
end
|
132
|
+
# resource path
|
133
|
+
local_var_path = '/api/lists/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
|
134
|
+
|
135
|
+
# query parameters
|
136
|
+
query_params = opts[:query_params] || {}
|
137
|
+
|
138
|
+
# header parameters
|
139
|
+
header_params = opts[:header_params] || {}
|
140
|
+
# klaviyo api revision
|
141
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
142
|
+
# HTTP header 'Accept' (if needed)
|
143
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
144
|
+
# HTTP header 'Content-Type'
|
145
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
146
|
+
if !content_type.nil?
|
147
|
+
header_params['Content-Type'] = content_type
|
148
|
+
end
|
149
|
+
|
150
|
+
# form parameters
|
151
|
+
form_params = opts[:form_params] || {}
|
152
|
+
|
153
|
+
# http body (model)
|
154
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(list_members_add_query)
|
155
|
+
|
156
|
+
# return_type
|
157
|
+
return_type = opts[:debug_return_type]
|
158
|
+
|
159
|
+
# auth_names
|
160
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
161
|
+
|
162
|
+
new_options = opts.merge(
|
163
|
+
:operation => :"ListsApi.create_list_relationships",
|
164
|
+
:header_params => header_params,
|
165
|
+
:query_params => query_params,
|
166
|
+
:form_params => form_params,
|
167
|
+
:body => post_body,
|
168
|
+
:auth_names => auth_names,
|
169
|
+
:return_type => return_type
|
170
|
+
)
|
171
|
+
|
172
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug "API called: ListsApi#create_list_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
175
|
+
end
|
176
|
+
return data, status_code, headers
|
177
|
+
end
|
178
|
+
|
179
|
+
# Delete List
|
180
|
+
# Delete a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write`
|
181
|
+
# @param id [String]
|
182
|
+
# @param [Hash] opts the optional parameters
|
183
|
+
# @return [nil]
|
184
|
+
def delete_list(id, opts = {})
|
185
|
+
delete_list_with_http_info(id, opts)
|
186
|
+
nil
|
187
|
+
end
|
188
|
+
|
189
|
+
# Delete List
|
190
|
+
# Delete a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write`
|
191
|
+
# @param id [String]
|
192
|
+
# @param [Hash] opts the optional parameters
|
193
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
194
|
+
def delete_list_with_http_info(id, opts = {})
|
195
|
+
if @api_client.config.debugging
|
196
|
+
@api_client.config.logger.debug 'Calling API: ListsApi.delete_list ...'
|
197
|
+
end
|
198
|
+
# verify the required parameter 'id' is set
|
199
|
+
if @api_client.config.client_side_validation && id.nil?
|
200
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.delete_list"
|
201
|
+
end
|
202
|
+
# resource path
|
203
|
+
local_var_path = '/api/lists/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
204
|
+
|
205
|
+
# query parameters
|
206
|
+
query_params = opts[:query_params] || {}
|
207
|
+
|
208
|
+
# header parameters
|
209
|
+
header_params = opts[:header_params] || {}
|
210
|
+
# klaviyo api revision
|
211
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
212
|
+
# HTTP header 'Accept' (if needed)
|
213
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
214
|
+
|
215
|
+
# form parameters
|
216
|
+
form_params = opts[:form_params] || {}
|
217
|
+
|
218
|
+
# http body (model)
|
219
|
+
post_body = opts[:debug_body]
|
220
|
+
|
221
|
+
# return_type
|
222
|
+
return_type = opts[:debug_return_type]
|
223
|
+
|
224
|
+
# auth_names
|
225
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
226
|
+
|
227
|
+
new_options = opts.merge(
|
228
|
+
:operation => :"ListsApi.delete_list",
|
229
|
+
:header_params => header_params,
|
230
|
+
:query_params => query_params,
|
231
|
+
:form_params => form_params,
|
232
|
+
:body => post_body,
|
233
|
+
:auth_names => auth_names,
|
234
|
+
:return_type => return_type
|
235
|
+
)
|
236
|
+
|
237
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
238
|
+
if @api_client.config.debugging
|
239
|
+
@api_client.config.logger.debug "API called: ListsApi#delete_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
240
|
+
end
|
241
|
+
return data, status_code, headers
|
242
|
+
end
|
243
|
+
|
244
|
+
# Remove Profile from List
|
245
|
+
# Remove a profile from a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write` `Profiles Write`
|
246
|
+
# @param id [String]
|
247
|
+
# @param related_resource [String]
|
248
|
+
# @param list_members_delete_query [ListMembersDeleteQuery]
|
249
|
+
# @param [Hash] opts the optional parameters
|
250
|
+
# @return [nil]
|
251
|
+
def delete_list_relationships(id, related_resource, list_members_delete_query, opts = {})
|
252
|
+
delete_list_relationships_with_http_info(id, related_resource, list_members_delete_query, opts)
|
253
|
+
nil
|
254
|
+
end
|
255
|
+
|
256
|
+
# Remove Profile from List
|
257
|
+
# Remove a profile from a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write` `Profiles Write`
|
258
|
+
# @param id [String]
|
259
|
+
# @param related_resource [String]
|
260
|
+
# @param list_members_delete_query [ListMembersDeleteQuery]
|
261
|
+
# @param [Hash] opts the optional parameters
|
262
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
263
|
+
def delete_list_relationships_with_http_info(id, related_resource, list_members_delete_query, opts = {})
|
264
|
+
if @api_client.config.debugging
|
265
|
+
@api_client.config.logger.debug 'Calling API: ListsApi.delete_list_relationships ...'
|
266
|
+
end
|
267
|
+
# verify the required parameter 'id' is set
|
268
|
+
if @api_client.config.client_side_validation && id.nil?
|
269
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.delete_list_relationships"
|
270
|
+
end
|
271
|
+
# verify the required parameter 'related_resource' is set
|
272
|
+
if @api_client.config.client_side_validation && related_resource.nil?
|
273
|
+
fail ArgumentError, "Missing the required parameter 'related_resource' when calling ListsApi.delete_list_relationships"
|
274
|
+
end
|
275
|
+
# verify enum value
|
276
|
+
allowable_values = ["profiles"]
|
277
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
|
278
|
+
fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
|
279
|
+
end
|
280
|
+
# verify the required parameter 'list_members_delete_query' is set
|
281
|
+
if @api_client.config.client_side_validation && list_members_delete_query.nil?
|
282
|
+
fail ArgumentError, "Missing the required parameter 'list_members_delete_query' when calling ListsApi.delete_list_relationships"
|
283
|
+
end
|
284
|
+
# resource path
|
285
|
+
local_var_path = '/api/lists/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
|
286
|
+
|
287
|
+
# query parameters
|
288
|
+
query_params = opts[:query_params] || {}
|
289
|
+
|
290
|
+
# header parameters
|
291
|
+
header_params = opts[:header_params] || {}
|
292
|
+
# klaviyo api revision
|
293
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
294
|
+
# HTTP header 'Accept' (if needed)
|
295
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
296
|
+
# HTTP header 'Content-Type'
|
297
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
298
|
+
if !content_type.nil?
|
299
|
+
header_params['Content-Type'] = content_type
|
300
|
+
end
|
301
|
+
|
302
|
+
# form parameters
|
303
|
+
form_params = opts[:form_params] || {}
|
304
|
+
|
305
|
+
# http body (model)
|
306
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(list_members_delete_query)
|
307
|
+
|
308
|
+
# return_type
|
309
|
+
return_type = opts[:debug_return_type]
|
310
|
+
|
311
|
+
# auth_names
|
312
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
313
|
+
|
314
|
+
new_options = opts.merge(
|
315
|
+
:operation => :"ListsApi.delete_list_relationships",
|
316
|
+
:header_params => header_params,
|
317
|
+
:query_params => query_params,
|
318
|
+
:form_params => form_params,
|
319
|
+
:body => post_body,
|
320
|
+
:auth_names => auth_names,
|
321
|
+
:return_type => return_type
|
322
|
+
)
|
323
|
+
|
324
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
325
|
+
if @api_client.config.debugging
|
326
|
+
@api_client.config.logger.debug "API called: ListsApi#delete_list_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
327
|
+
end
|
328
|
+
return data, status_code, headers
|
329
|
+
end
|
330
|
+
|
331
|
+
# Get List
|
332
|
+
# Get a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write`
|
333
|
+
# @param id [String]
|
334
|
+
# @param [Hash] opts the optional parameters
|
335
|
+
# @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
336
|
+
# @return [Hash<String, Object>]
|
337
|
+
def get_list(id, opts = {})
|
338
|
+
data, _status_code, _headers = get_list_with_http_info(id, opts)
|
339
|
+
data
|
340
|
+
end
|
341
|
+
|
342
|
+
# Get List
|
343
|
+
# Get a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write`
|
344
|
+
# @param id [String]
|
345
|
+
# @param [Hash] opts the optional parameters
|
346
|
+
# @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
347
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
348
|
+
def get_list_with_http_info(id, opts = {})
|
349
|
+
if @api_client.config.debugging
|
350
|
+
@api_client.config.logger.debug 'Calling API: ListsApi.get_list ...'
|
351
|
+
end
|
352
|
+
# verify the required parameter 'id' is set
|
353
|
+
if @api_client.config.client_side_validation && id.nil?
|
354
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_list"
|
355
|
+
end
|
356
|
+
allowable_values = ["name", "created", "updated"]
|
357
|
+
if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) }
|
358
|
+
fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}"
|
359
|
+
end
|
360
|
+
# resource path
|
361
|
+
local_var_path = '/api/lists/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
362
|
+
|
363
|
+
# query parameters
|
364
|
+
query_params = opts[:query_params] || {}
|
365
|
+
query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil?
|
366
|
+
|
367
|
+
# header parameters
|
368
|
+
header_params = opts[:header_params] || {}
|
369
|
+
# klaviyo api revision
|
370
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
371
|
+
# HTTP header 'Accept' (if needed)
|
372
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
373
|
+
|
374
|
+
# form parameters
|
375
|
+
form_params = opts[:form_params] || {}
|
376
|
+
|
377
|
+
# http body (model)
|
378
|
+
post_body = opts[:debug_body]
|
379
|
+
|
380
|
+
# return_type
|
381
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
382
|
+
|
383
|
+
# auth_names
|
384
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
385
|
+
|
386
|
+
new_options = opts.merge(
|
387
|
+
:operation => :"ListsApi.get_list",
|
388
|
+
:header_params => header_params,
|
389
|
+
:query_params => query_params,
|
390
|
+
:form_params => form_params,
|
391
|
+
:body => post_body,
|
392
|
+
:auth_names => auth_names,
|
393
|
+
:return_type => return_type
|
394
|
+
)
|
395
|
+
|
396
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
397
|
+
if @api_client.config.debugging
|
398
|
+
@api_client.config.logger.debug "API called: ListsApi#get_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
399
|
+
end
|
400
|
+
return data, status_code, headers
|
401
|
+
end
|
402
|
+
|
403
|
+
# Get List Profiles
|
404
|
+
# Get all profiles within a list with the given list ID. Use filters to narrow your results. Returns a maximum of 10 results per page, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Read` `Profiles Read`
|
405
|
+
# @param list_id [String]
|
406
|
+
# @param [Hash] opts the optional parameters
|
407
|
+
# @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
408
|
+
# @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals`
|
409
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
|
410
|
+
# @return [Hash<String, Object>]
|
411
|
+
def get_list_profiles(list_id, opts = {})
|
412
|
+
data, _status_code, _headers = get_list_profiles_with_http_info(list_id, opts)
|
413
|
+
data
|
414
|
+
end
|
415
|
+
|
416
|
+
# Get List Profiles
|
417
|
+
# Get all profiles within a list with the given list ID. Use filters to narrow your results. Returns a maximum of 10 results per page, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Read` `Profiles Read`
|
418
|
+
# @param list_id [String]
|
419
|
+
# @param [Hash] opts the optional parameters
|
420
|
+
# @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
421
|
+
# @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals`
|
422
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
|
423
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
424
|
+
def get_list_profiles_with_http_info(list_id, opts = {})
|
425
|
+
if @api_client.config.debugging
|
426
|
+
@api_client.config.logger.debug 'Calling API: ListsApi.get_list_profiles ...'
|
427
|
+
end
|
428
|
+
# verify the required parameter 'list_id' is set
|
429
|
+
if @api_client.config.client_side_validation && list_id.nil?
|
430
|
+
fail ArgumentError, "Missing the required parameter 'list_id' when calling ListsApi.get_list_profiles"
|
431
|
+
end
|
432
|
+
allowable_values = ["email", "phone_number", "external_id", "anonymous_id", "first_name", "last_name", "organization", "title", "image", "created", "updated", "last_event_date", "location", "location.address1", "location.address2", "location.city", "location.country", "location.latitude", "location.longitude", "location.region", "location.zip", "location.timezone", "properties"]
|
433
|
+
if @api_client.config.client_side_validation && opts[:'fields_profile'] && !opts[:'fields_profile'].all? { |item| allowable_values.include?(item) }
|
434
|
+
fail ArgumentError, "invalid value for \"fields_profile\", must include one of #{allowable_values}"
|
435
|
+
end
|
436
|
+
# resource path
|
437
|
+
local_var_path = '/api/lists/{list_id}/profiles/'.sub('{' + 'list_id' + '}', CGI.escape(list_id.to_s))
|
438
|
+
|
439
|
+
# query parameters
|
440
|
+
query_params = opts[:query_params] || {}
|
441
|
+
query_params[:'fields[profile]'] = @api_client.build_collection_param(opts[:'fields_profile'], :csv) if !opts[:'fields_profile'].nil?
|
442
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
443
|
+
query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
|
444
|
+
|
445
|
+
# header parameters
|
446
|
+
header_params = opts[:header_params] || {}
|
447
|
+
# klaviyo api revision
|
448
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
449
|
+
# HTTP header 'Accept' (if needed)
|
450
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
451
|
+
|
452
|
+
# form parameters
|
453
|
+
form_params = opts[:form_params] || {}
|
454
|
+
|
455
|
+
# http body (model)
|
456
|
+
post_body = opts[:debug_body]
|
457
|
+
|
458
|
+
# return_type
|
459
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
460
|
+
|
461
|
+
# auth_names
|
462
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
463
|
+
|
464
|
+
new_options = opts.merge(
|
465
|
+
:operation => :"ListsApi.get_list_profiles",
|
466
|
+
:header_params => header_params,
|
467
|
+
:query_params => query_params,
|
468
|
+
:form_params => form_params,
|
469
|
+
:body => post_body,
|
470
|
+
:auth_names => auth_names,
|
471
|
+
:return_type => return_type
|
472
|
+
)
|
473
|
+
|
474
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
475
|
+
if @api_client.config.debugging
|
476
|
+
@api_client.config.logger.debug "API called: ListsApi#get_list_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
477
|
+
end
|
478
|
+
return data, status_code, headers
|
479
|
+
end
|
480
|
+
|
481
|
+
# Get List Profile Relationships
|
482
|
+
# Get profile membership [relationships](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#relationships) for a list with the given list ID. Returns a maximum of 10 results per page, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Read` `Profiles Read`
|
483
|
+
# @param id [String]
|
484
|
+
# @param related_resource [String]
|
485
|
+
# @param [Hash] opts the optional parameters
|
486
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
|
487
|
+
# @return [Hash<String, Object>]
|
488
|
+
def get_list_relationships(id, related_resource, opts = {})
|
489
|
+
data, _status_code, _headers = get_list_relationships_with_http_info(id, related_resource, opts)
|
490
|
+
data
|
491
|
+
end
|
492
|
+
|
493
|
+
# Get List Profile Relationships
|
494
|
+
# Get profile membership [relationships](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#relationships) for a list with the given list ID. Returns a maximum of 10 results per page, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Read` `Profiles Read`
|
495
|
+
# @param id [String]
|
496
|
+
# @param related_resource [String]
|
497
|
+
# @param [Hash] opts the optional parameters
|
498
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
|
499
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
500
|
+
def get_list_relationships_with_http_info(id, related_resource, opts = {})
|
501
|
+
if @api_client.config.debugging
|
502
|
+
@api_client.config.logger.debug 'Calling API: ListsApi.get_list_relationships ...'
|
503
|
+
end
|
504
|
+
# verify the required parameter 'id' is set
|
505
|
+
if @api_client.config.client_side_validation && id.nil?
|
506
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_list_relationships"
|
507
|
+
end
|
508
|
+
# verify the required parameter 'related_resource' is set
|
509
|
+
if @api_client.config.client_side_validation && related_resource.nil?
|
510
|
+
fail ArgumentError, "Missing the required parameter 'related_resource' when calling ListsApi.get_list_relationships"
|
511
|
+
end
|
512
|
+
# verify enum value
|
513
|
+
allowable_values = ["profiles"]
|
514
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
|
515
|
+
fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
|
516
|
+
end
|
517
|
+
# resource path
|
518
|
+
local_var_path = '/api/lists/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
|
519
|
+
|
520
|
+
# query parameters
|
521
|
+
query_params = opts[:query_params] || {}
|
522
|
+
query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
|
523
|
+
|
524
|
+
# header parameters
|
525
|
+
header_params = opts[:header_params] || {}
|
526
|
+
# klaviyo api revision
|
527
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
528
|
+
# HTTP header 'Accept' (if needed)
|
529
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
530
|
+
|
531
|
+
# form parameters
|
532
|
+
form_params = opts[:form_params] || {}
|
533
|
+
|
534
|
+
# http body (model)
|
535
|
+
post_body = opts[:debug_body]
|
536
|
+
|
537
|
+
# return_type
|
538
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
539
|
+
|
540
|
+
# auth_names
|
541
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
542
|
+
|
543
|
+
new_options = opts.merge(
|
544
|
+
:operation => :"ListsApi.get_list_relationships",
|
545
|
+
:header_params => header_params,
|
546
|
+
:query_params => query_params,
|
547
|
+
:form_params => form_params,
|
548
|
+
:body => post_body,
|
549
|
+
:auth_names => auth_names,
|
550
|
+
:return_type => return_type
|
551
|
+
)
|
552
|
+
|
553
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
554
|
+
if @api_client.config.debugging
|
555
|
+
@api_client.config.logger.debug "API called: ListsApi#get_list_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
556
|
+
end
|
557
|
+
return data, status_code, headers
|
558
|
+
end
|
559
|
+
|
560
|
+
# Get Lists
|
561
|
+
# Get all lists in an account. Use filters to narrow your results. Returns a maximum of 10 results per page, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Read`
|
562
|
+
# @param [Hash] opts the optional parameters
|
563
|
+
# @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
564
|
+
# @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than`
|
565
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
|
566
|
+
# @return [Hash<String, Object>]
|
567
|
+
def get_lists(opts = {})
|
568
|
+
data, _status_code, _headers = get_lists_with_http_info(opts)
|
569
|
+
data
|
570
|
+
end
|
571
|
+
|
572
|
+
# Get Lists
|
573
|
+
# Get all lists in an account. Use filters to narrow your results. Returns a maximum of 10 results per page, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Read`
|
574
|
+
# @param [Hash] opts the optional parameters
|
575
|
+
# @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
576
|
+
# @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than`
|
577
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
|
578
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
579
|
+
def get_lists_with_http_info(opts = {})
|
580
|
+
if @api_client.config.debugging
|
581
|
+
@api_client.config.logger.debug 'Calling API: ListsApi.get_lists ...'
|
582
|
+
end
|
583
|
+
allowable_values = ["name", "created", "updated"]
|
584
|
+
if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) }
|
585
|
+
fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}"
|
586
|
+
end
|
587
|
+
# resource path
|
588
|
+
local_var_path = '/api/lists/'
|
589
|
+
|
590
|
+
# query parameters
|
591
|
+
query_params = opts[:query_params] || {}
|
592
|
+
query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil?
|
593
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
594
|
+
query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
|
595
|
+
|
596
|
+
# header parameters
|
597
|
+
header_params = opts[:header_params] || {}
|
598
|
+
# klaviyo api revision
|
599
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
600
|
+
# HTTP header 'Accept' (if needed)
|
601
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
602
|
+
|
603
|
+
# form parameters
|
604
|
+
form_params = opts[:form_params] || {}
|
605
|
+
|
606
|
+
# http body (model)
|
607
|
+
post_body = opts[:debug_body]
|
608
|
+
|
609
|
+
# return_type
|
610
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
611
|
+
|
612
|
+
# auth_names
|
613
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
614
|
+
|
615
|
+
new_options = opts.merge(
|
616
|
+
:operation => :"ListsApi.get_lists",
|
617
|
+
:header_params => header_params,
|
618
|
+
:query_params => query_params,
|
619
|
+
:form_params => form_params,
|
620
|
+
:body => post_body,
|
621
|
+
:auth_names => auth_names,
|
622
|
+
:return_type => return_type
|
623
|
+
)
|
624
|
+
|
625
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
626
|
+
if @api_client.config.debugging
|
627
|
+
@api_client.config.logger.debug "API called: ListsApi#get_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
628
|
+
end
|
629
|
+
return data, status_code, headers
|
630
|
+
end
|
631
|
+
|
632
|
+
# Update List
|
633
|
+
# Update the name of a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write`
|
634
|
+
# @param id [String]
|
635
|
+
# @param list_partial_update_query [ListPartialUpdateQuery]
|
636
|
+
# @param [Hash] opts the optional parameters
|
637
|
+
# @return [Hash<String, Object>]
|
638
|
+
def update_list(id, list_partial_update_query, opts = {})
|
639
|
+
data, _status_code, _headers = update_list_with_http_info(id, list_partial_update_query, opts)
|
640
|
+
data
|
641
|
+
end
|
642
|
+
|
643
|
+
# Update List
|
644
|
+
# Update the name of a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `List Write`
|
645
|
+
# @param id [String]
|
646
|
+
# @param list_partial_update_query [ListPartialUpdateQuery]
|
647
|
+
# @param [Hash] opts the optional parameters
|
648
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
649
|
+
def update_list_with_http_info(id, list_partial_update_query, opts = {})
|
650
|
+
if @api_client.config.debugging
|
651
|
+
@api_client.config.logger.debug 'Calling API: ListsApi.update_list ...'
|
652
|
+
end
|
653
|
+
# verify the required parameter 'id' is set
|
654
|
+
if @api_client.config.client_side_validation && id.nil?
|
655
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.update_list"
|
656
|
+
end
|
657
|
+
# verify the required parameter 'list_partial_update_query' is set
|
658
|
+
if @api_client.config.client_side_validation && list_partial_update_query.nil?
|
659
|
+
fail ArgumentError, "Missing the required parameter 'list_partial_update_query' when calling ListsApi.update_list"
|
660
|
+
end
|
661
|
+
# resource path
|
662
|
+
local_var_path = '/api/lists/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
663
|
+
|
664
|
+
# query parameters
|
665
|
+
query_params = opts[:query_params] || {}
|
666
|
+
|
667
|
+
# header parameters
|
668
|
+
header_params = opts[:header_params] || {}
|
669
|
+
# klaviyo api revision
|
670
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
671
|
+
# HTTP header 'Accept' (if needed)
|
672
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
673
|
+
# HTTP header 'Content-Type'
|
674
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
675
|
+
if !content_type.nil?
|
676
|
+
header_params['Content-Type'] = content_type
|
677
|
+
end
|
678
|
+
|
679
|
+
# form parameters
|
680
|
+
form_params = opts[:form_params] || {}
|
681
|
+
|
682
|
+
# http body (model)
|
683
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(list_partial_update_query)
|
684
|
+
|
685
|
+
# return_type
|
686
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
687
|
+
|
688
|
+
# auth_names
|
689
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
690
|
+
|
691
|
+
new_options = opts.merge(
|
692
|
+
:operation => :"ListsApi.update_list",
|
693
|
+
:header_params => header_params,
|
694
|
+
:query_params => query_params,
|
695
|
+
:form_params => form_params,
|
696
|
+
:body => post_body,
|
697
|
+
:auth_names => auth_names,
|
698
|
+
:return_type => return_type
|
699
|
+
)
|
700
|
+
|
701
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
702
|
+
if @api_client.config.debugging
|
703
|
+
@api_client.config.logger.debug "API called: ListsApi#update_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
704
|
+
end
|
705
|
+
return data, status_code, headers
|
706
|
+
end
|
707
|
+
end
|
708
|
+
end
|