klaviyo-api-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +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,840 @@
|
|
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 ProfilesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create Profile
|
23
|
+
# Create a new profile.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Profiles Write`
|
24
|
+
# @param profile_create_query [ProfileCreateQuery]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Hash<String, Object>]
|
27
|
+
def create_profile(profile_create_query, opts = {})
|
28
|
+
data, _status_code, _headers = create_profile_with_http_info(profile_create_query, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create Profile
|
33
|
+
# Create a new profile.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Profiles Write`
|
34
|
+
# @param profile_create_query [ProfileCreateQuery]
|
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_profile_with_http_info(profile_create_query, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.create_profile ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'profile_create_query' is set
|
42
|
+
if @api_client.config.client_side_validation && profile_create_query.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'profile_create_query' when calling ProfilesApi.create_profile"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/api/profiles/'
|
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(profile_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 => :"ProfilesApi.create_profile",
|
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: ProfilesApi#create_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Get Profile
|
93
|
+
# Get the profile with the given profile ID. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Include parameters can be provided to get the following related resource data: `lists` memberships, `segments` memberships\"<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Profiles Read`
|
94
|
+
# @param id [String]
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
97
|
+
# @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
98
|
+
# @option opts [Array<String>] :fields_segment For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
99
|
+
# @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
|
100
|
+
# @return [Hash<String, Object>]
|
101
|
+
def get_profile(id, opts = {})
|
102
|
+
data, _status_code, _headers = get_profile_with_http_info(id, opts)
|
103
|
+
data
|
104
|
+
end
|
105
|
+
|
106
|
+
# Get Profile
|
107
|
+
# Get the profile with the given profile ID. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Include parameters can be provided to get the following related resource data: `lists` memberships, `segments` memberships\"<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Profiles Read`
|
108
|
+
# @param id [String]
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
111
|
+
# @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
112
|
+
# @option opts [Array<String>] :fields_segment For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
113
|
+
# @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
|
114
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
115
|
+
def get_profile_with_http_info(id, opts = {})
|
116
|
+
if @api_client.config.debugging
|
117
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile ...'
|
118
|
+
end
|
119
|
+
# verify the required parameter 'id' is set
|
120
|
+
if @api_client.config.client_side_validation && id.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_profile"
|
122
|
+
end
|
123
|
+
allowable_values = ["name", "created", "updated"]
|
124
|
+
if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) }
|
125
|
+
fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}"
|
126
|
+
end
|
127
|
+
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"]
|
128
|
+
if @api_client.config.client_side_validation && opts[:'fields_profile'] && !opts[:'fields_profile'].all? { |item| allowable_values.include?(item) }
|
129
|
+
fail ArgumentError, "invalid value for \"fields_profile\", must include one of #{allowable_values}"
|
130
|
+
end
|
131
|
+
allowable_values = ["name", "created", "updated"]
|
132
|
+
if @api_client.config.client_side_validation && opts[:'fields_segment'] && !opts[:'fields_segment'].all? { |item| allowable_values.include?(item) }
|
133
|
+
fail ArgumentError, "invalid value for \"fields_segment\", must include one of #{allowable_values}"
|
134
|
+
end
|
135
|
+
allowable_values = ["lists", "segments"]
|
136
|
+
if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
|
137
|
+
fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
|
138
|
+
end
|
139
|
+
# resource path
|
140
|
+
local_var_path = '/api/profiles/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
141
|
+
|
142
|
+
# query parameters
|
143
|
+
query_params = opts[:query_params] || {}
|
144
|
+
query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil?
|
145
|
+
query_params[:'fields[profile]'] = @api_client.build_collection_param(opts[:'fields_profile'], :csv) if !opts[:'fields_profile'].nil?
|
146
|
+
query_params[:'fields[segment]'] = @api_client.build_collection_param(opts[:'fields_segment'], :csv) if !opts[:'fields_segment'].nil?
|
147
|
+
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
|
148
|
+
|
149
|
+
# header parameters
|
150
|
+
header_params = opts[:header_params] || {}
|
151
|
+
# klaviyo api revision
|
152
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
153
|
+
# HTTP header 'Accept' (if needed)
|
154
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
155
|
+
|
156
|
+
# form parameters
|
157
|
+
form_params = opts[:form_params] || {}
|
158
|
+
|
159
|
+
# http body (model)
|
160
|
+
post_body = opts[:debug_body]
|
161
|
+
|
162
|
+
# return_type
|
163
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
164
|
+
|
165
|
+
# auth_names
|
166
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
167
|
+
|
168
|
+
new_options = opts.merge(
|
169
|
+
:operation => :"ProfilesApi.get_profile",
|
170
|
+
:header_params => header_params,
|
171
|
+
:query_params => query_params,
|
172
|
+
:form_params => form_params,
|
173
|
+
:body => post_body,
|
174
|
+
:auth_names => auth_names,
|
175
|
+
:return_type => return_type
|
176
|
+
)
|
177
|
+
|
178
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug "API called: ProfilesApi#get_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
181
|
+
end
|
182
|
+
return data, status_code, headers
|
183
|
+
end
|
184
|
+
|
185
|
+
# Get Profile Lists
|
186
|
+
# Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `List Read` `Profiles Read`
|
187
|
+
# @param profile_id [String]
|
188
|
+
# @param [Hash] opts the optional parameters
|
189
|
+
# @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
190
|
+
# @return [Hash<String, Object>]
|
191
|
+
def get_profile_lists(profile_id, opts = {})
|
192
|
+
data, _status_code, _headers = get_profile_lists_with_http_info(profile_id, opts)
|
193
|
+
data
|
194
|
+
end
|
195
|
+
|
196
|
+
# Get Profile Lists
|
197
|
+
# Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `List Read` `Profiles Read`
|
198
|
+
# @param profile_id [String]
|
199
|
+
# @param [Hash] opts the optional parameters
|
200
|
+
# @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
201
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
202
|
+
def get_profile_lists_with_http_info(profile_id, opts = {})
|
203
|
+
if @api_client.config.debugging
|
204
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile_lists ...'
|
205
|
+
end
|
206
|
+
# verify the required parameter 'profile_id' is set
|
207
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
208
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.get_profile_lists"
|
209
|
+
end
|
210
|
+
allowable_values = ["name", "created", "updated"]
|
211
|
+
if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) }
|
212
|
+
fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}"
|
213
|
+
end
|
214
|
+
# resource path
|
215
|
+
local_var_path = '/api/profiles/{profile_id}/lists/'.sub('{' + 'profile_id' + '}', CGI.escape(profile_id.to_s))
|
216
|
+
|
217
|
+
# query parameters
|
218
|
+
query_params = opts[:query_params] || {}
|
219
|
+
query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil?
|
220
|
+
|
221
|
+
# header parameters
|
222
|
+
header_params = opts[:header_params] || {}
|
223
|
+
# klaviyo api revision
|
224
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
225
|
+
# HTTP header 'Accept' (if needed)
|
226
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
227
|
+
|
228
|
+
# form parameters
|
229
|
+
form_params = opts[:form_params] || {}
|
230
|
+
|
231
|
+
# http body (model)
|
232
|
+
post_body = opts[:debug_body]
|
233
|
+
|
234
|
+
# return_type
|
235
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
236
|
+
|
237
|
+
# auth_names
|
238
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
239
|
+
|
240
|
+
new_options = opts.merge(
|
241
|
+
:operation => :"ProfilesApi.get_profile_lists",
|
242
|
+
:header_params => header_params,
|
243
|
+
:query_params => query_params,
|
244
|
+
:form_params => form_params,
|
245
|
+
:body => post_body,
|
246
|
+
:auth_names => auth_names,
|
247
|
+
:return_type => return_type
|
248
|
+
)
|
249
|
+
|
250
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
251
|
+
if @api_client.config.debugging
|
252
|
+
@api_client.config.logger.debug "API called: ProfilesApi#get_profile_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
253
|
+
end
|
254
|
+
return data, status_code, headers
|
255
|
+
end
|
256
|
+
|
257
|
+
# Get Profile Relationships
|
258
|
+
# Get list membership or segment membership relationships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Profiles Read` `Segments Read`
|
259
|
+
# @param id [String]
|
260
|
+
# @param related_resource [String]
|
261
|
+
# @param [Hash] opts the optional parameters
|
262
|
+
# @return [Hash<String, Object>]
|
263
|
+
def get_profile_relationships(id, related_resource, opts = {})
|
264
|
+
data, _status_code, _headers = get_profile_relationships_with_http_info(id, related_resource, opts)
|
265
|
+
data
|
266
|
+
end
|
267
|
+
|
268
|
+
# Get Profile Relationships
|
269
|
+
# Get list membership or segment membership relationships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Profiles Read` `Segments Read`
|
270
|
+
# @param id [String]
|
271
|
+
# @param related_resource [String]
|
272
|
+
# @param [Hash] opts the optional parameters
|
273
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
274
|
+
def get_profile_relationships_with_http_info(id, related_resource, opts = {})
|
275
|
+
if @api_client.config.debugging
|
276
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile_relationships ...'
|
277
|
+
end
|
278
|
+
# verify the required parameter 'id' is set
|
279
|
+
if @api_client.config.client_side_validation && id.nil?
|
280
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_profile_relationships"
|
281
|
+
end
|
282
|
+
# verify the required parameter 'related_resource' is set
|
283
|
+
if @api_client.config.client_side_validation && related_resource.nil?
|
284
|
+
fail ArgumentError, "Missing the required parameter 'related_resource' when calling ProfilesApi.get_profile_relationships"
|
285
|
+
end
|
286
|
+
# verify enum value
|
287
|
+
allowable_values = ["lists", "segments"]
|
288
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
|
289
|
+
fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
|
290
|
+
end
|
291
|
+
# resource path
|
292
|
+
local_var_path = '/api/profiles/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
|
293
|
+
|
294
|
+
# query parameters
|
295
|
+
query_params = opts[:query_params] || {}
|
296
|
+
|
297
|
+
# header parameters
|
298
|
+
header_params = opts[:header_params] || {}
|
299
|
+
# klaviyo api revision
|
300
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
301
|
+
# HTTP header 'Accept' (if needed)
|
302
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
303
|
+
|
304
|
+
# form parameters
|
305
|
+
form_params = opts[:form_params] || {}
|
306
|
+
|
307
|
+
# http body (model)
|
308
|
+
post_body = opts[:debug_body]
|
309
|
+
|
310
|
+
# return_type
|
311
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
312
|
+
|
313
|
+
# auth_names
|
314
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
315
|
+
|
316
|
+
new_options = opts.merge(
|
317
|
+
:operation => :"ProfilesApi.get_profile_relationships",
|
318
|
+
:header_params => header_params,
|
319
|
+
:query_params => query_params,
|
320
|
+
:form_params => form_params,
|
321
|
+
:body => post_body,
|
322
|
+
:auth_names => auth_names,
|
323
|
+
:return_type => return_type
|
324
|
+
)
|
325
|
+
|
326
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
327
|
+
if @api_client.config.debugging
|
328
|
+
@api_client.config.logger.debug "API called: ProfilesApi#get_profile_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
329
|
+
end
|
330
|
+
return data, status_code, headers
|
331
|
+
end
|
332
|
+
|
333
|
+
# Get Profile Segments
|
334
|
+
# Get segment memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Profiles Read` `Segments Read`
|
335
|
+
# @param profile_id [String]
|
336
|
+
# @param [Hash] opts the optional parameters
|
337
|
+
# @option opts [Array<String>] :fields_segment For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
338
|
+
# @return [Hash<String, Object>]
|
339
|
+
def get_profile_segments(profile_id, opts = {})
|
340
|
+
data, _status_code, _headers = get_profile_segments_with_http_info(profile_id, opts)
|
341
|
+
data
|
342
|
+
end
|
343
|
+
|
344
|
+
# Get Profile Segments
|
345
|
+
# Get segment memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Profiles Read` `Segments Read`
|
346
|
+
# @param profile_id [String]
|
347
|
+
# @param [Hash] opts the optional parameters
|
348
|
+
# @option opts [Array<String>] :fields_segment For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
349
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
350
|
+
def get_profile_segments_with_http_info(profile_id, opts = {})
|
351
|
+
if @api_client.config.debugging
|
352
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile_segments ...'
|
353
|
+
end
|
354
|
+
# verify the required parameter 'profile_id' is set
|
355
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
356
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ProfilesApi.get_profile_segments"
|
357
|
+
end
|
358
|
+
allowable_values = ["name", "created", "updated"]
|
359
|
+
if @api_client.config.client_side_validation && opts[:'fields_segment'] && !opts[:'fields_segment'].all? { |item| allowable_values.include?(item) }
|
360
|
+
fail ArgumentError, "invalid value for \"fields_segment\", must include one of #{allowable_values}"
|
361
|
+
end
|
362
|
+
# resource path
|
363
|
+
local_var_path = '/api/profiles/{profile_id}/segments/'.sub('{' + 'profile_id' + '}', CGI.escape(profile_id.to_s))
|
364
|
+
|
365
|
+
# query parameters
|
366
|
+
query_params = opts[:query_params] || {}
|
367
|
+
query_params[:'fields[segment]'] = @api_client.build_collection_param(opts[:'fields_segment'], :csv) if !opts[:'fields_segment'].nil?
|
368
|
+
|
369
|
+
# header parameters
|
370
|
+
header_params = opts[:header_params] || {}
|
371
|
+
# klaviyo api revision
|
372
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
373
|
+
# HTTP header 'Accept' (if needed)
|
374
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
375
|
+
|
376
|
+
# form parameters
|
377
|
+
form_params = opts[:form_params] || {}
|
378
|
+
|
379
|
+
# http body (model)
|
380
|
+
post_body = opts[:debug_body]
|
381
|
+
|
382
|
+
# return_type
|
383
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
384
|
+
|
385
|
+
# auth_names
|
386
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
387
|
+
|
388
|
+
new_options = opts.merge(
|
389
|
+
:operation => :"ProfilesApi.get_profile_segments",
|
390
|
+
:header_params => header_params,
|
391
|
+
:query_params => query_params,
|
392
|
+
:form_params => form_params,
|
393
|
+
:body => post_body,
|
394
|
+
:auth_names => auth_names,
|
395
|
+
:return_type => return_type
|
396
|
+
)
|
397
|
+
|
398
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
399
|
+
if @api_client.config.debugging
|
400
|
+
@api_client.config.logger.debug "API called: ProfilesApi#get_profile_segments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
401
|
+
end
|
402
|
+
return data, status_code, headers
|
403
|
+
end
|
404
|
+
|
405
|
+
# Get Profiles
|
406
|
+
# Get all profiles in an account. Profiles can be sorted by the following fields in ascending and descending order: `id`, `created`, `email` Use filters to narrow your results. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Returns a maximum of 20 profiles 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:** `Profiles Write`
|
407
|
+
# @param [Hash] opts the optional parameters
|
408
|
+
# @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
409
|
+
# @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>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`anonymous_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than`
|
410
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
|
411
|
+
# @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
|
412
|
+
# @return [Hash<String, Object>]
|
413
|
+
def get_profiles(opts = {})
|
414
|
+
data, _status_code, _headers = get_profiles_with_http_info(opts)
|
415
|
+
data
|
416
|
+
end
|
417
|
+
|
418
|
+
# Get Profiles
|
419
|
+
# Get all profiles in an account. Profiles can be sorted by the following fields in ascending and descending order: `id`, `created`, `email` Use filters to narrow your results. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Returns a maximum of 20 profiles 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:** `Profiles Write`
|
420
|
+
# @param [Hash] opts the optional parameters
|
421
|
+
# @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
|
422
|
+
# @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>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`anonymous_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than`
|
423
|
+
# @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
|
424
|
+
# @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
|
425
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
426
|
+
def get_profiles_with_http_info(opts = {})
|
427
|
+
if @api_client.config.debugging
|
428
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.get_profiles ...'
|
429
|
+
end
|
430
|
+
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"]
|
431
|
+
if @api_client.config.client_side_validation && opts[:'fields_profile'] && !opts[:'fields_profile'].all? { |item| allowable_values.include?(item) }
|
432
|
+
fail ArgumentError, "invalid value for \"fields_profile\", must include one of #{allowable_values}"
|
433
|
+
end
|
434
|
+
allowable_values = ["created", "-created", "email", "-email", "id", "-id"]
|
435
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
436
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
437
|
+
end
|
438
|
+
# resource path
|
439
|
+
local_var_path = '/api/profiles/'
|
440
|
+
|
441
|
+
# query parameters
|
442
|
+
query_params = opts[:query_params] || {}
|
443
|
+
query_params[:'fields[profile]'] = @api_client.build_collection_param(opts[:'fields_profile'], :csv) if !opts[:'fields_profile'].nil?
|
444
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
445
|
+
query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
|
446
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
447
|
+
|
448
|
+
# header parameters
|
449
|
+
header_params = opts[:header_params] || {}
|
450
|
+
# klaviyo api revision
|
451
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
452
|
+
# HTTP header 'Accept' (if needed)
|
453
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
454
|
+
|
455
|
+
# form parameters
|
456
|
+
form_params = opts[:form_params] || {}
|
457
|
+
|
458
|
+
# http body (model)
|
459
|
+
post_body = opts[:debug_body]
|
460
|
+
|
461
|
+
# return_type
|
462
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
463
|
+
|
464
|
+
# auth_names
|
465
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
466
|
+
|
467
|
+
new_options = opts.merge(
|
468
|
+
:operation => :"ProfilesApi.get_profiles",
|
469
|
+
:header_params => header_params,
|
470
|
+
:query_params => query_params,
|
471
|
+
:form_params => form_params,
|
472
|
+
:body => post_body,
|
473
|
+
:auth_names => auth_names,
|
474
|
+
:return_type => return_type
|
475
|
+
)
|
476
|
+
|
477
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
478
|
+
if @api_client.config.debugging
|
479
|
+
@api_client.config.logger.debug "API called: ProfilesApi#get_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
480
|
+
end
|
481
|
+
return data, status_code, headers
|
482
|
+
end
|
483
|
+
|
484
|
+
# Subscribe Profiles
|
485
|
+
# Subscribe one or more profiles to email marketing, SMS marketing, or both. If the list has double opt-in enabled, profiles will receive a message requiring their confirmation before subscribing. Otherwise, profiles will be immediately subscribed without receiving a confirmation message. To add someone to a list without changing their subscription status, use [Add Profile to List](https://developers.klaviyo.com/en/v2022-10-17/reference/create_list_relationships).<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `List Write` `Profiles Write` `Subscriptions Write`
|
486
|
+
# @param subscription_create_job_create_query [SubscriptionCreateJobCreateQuery] Subscribes one or more profiles to marketing. Currently, supports email and SMS only. All profiles will be added to the provided list. Either email or phone number is required. Both may be specified to subscribe to both channels. If a profile cannot be found matching the given identifier(s), a new profile will be created and then subscribed.
|
487
|
+
# @param [Hash] opts the optional parameters
|
488
|
+
# @return [nil]
|
489
|
+
def subscribe_profiles(subscription_create_job_create_query, opts = {})
|
490
|
+
subscribe_profiles_with_http_info(subscription_create_job_create_query, opts)
|
491
|
+
nil
|
492
|
+
end
|
493
|
+
|
494
|
+
# Subscribe Profiles
|
495
|
+
# Subscribe one or more profiles to email marketing, SMS marketing, or both. If the list has double opt-in enabled, profiles will receive a message requiring their confirmation before subscribing. Otherwise, profiles will be immediately subscribed without receiving a confirmation message. To add someone to a list without changing their subscription status, use [Add Profile to List](https://developers.klaviyo.com/en/v2022-10-17/reference/create_list_relationships).<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `List Write` `Profiles Write` `Subscriptions Write`
|
496
|
+
# @param subscription_create_job_create_query [SubscriptionCreateJobCreateQuery] Subscribes one or more profiles to marketing. Currently, supports email and SMS only. All profiles will be added to the provided list. Either email or phone number is required. Both may be specified to subscribe to both channels. If a profile cannot be found matching the given identifier(s), a new profile will be created and then subscribed.
|
497
|
+
# @param [Hash] opts the optional parameters
|
498
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
499
|
+
def subscribe_profiles_with_http_info(subscription_create_job_create_query, opts = {})
|
500
|
+
if @api_client.config.debugging
|
501
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.subscribe_profiles ...'
|
502
|
+
end
|
503
|
+
# verify the required parameter 'subscription_create_job_create_query' is set
|
504
|
+
if @api_client.config.client_side_validation && subscription_create_job_create_query.nil?
|
505
|
+
fail ArgumentError, "Missing the required parameter 'subscription_create_job_create_query' when calling ProfilesApi.subscribe_profiles"
|
506
|
+
end
|
507
|
+
# resource path
|
508
|
+
local_var_path = '/api/profile-subscription-bulk-create-jobs/'
|
509
|
+
|
510
|
+
# query parameters
|
511
|
+
query_params = opts[:query_params] || {}
|
512
|
+
|
513
|
+
# header parameters
|
514
|
+
header_params = opts[:header_params] || {}
|
515
|
+
# klaviyo api revision
|
516
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
517
|
+
# HTTP header 'Accept' (if needed)
|
518
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
519
|
+
# HTTP header 'Content-Type'
|
520
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
521
|
+
if !content_type.nil?
|
522
|
+
header_params['Content-Type'] = content_type
|
523
|
+
end
|
524
|
+
|
525
|
+
# form parameters
|
526
|
+
form_params = opts[:form_params] || {}
|
527
|
+
|
528
|
+
# http body (model)
|
529
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_create_job_create_query)
|
530
|
+
|
531
|
+
# return_type
|
532
|
+
return_type = opts[:debug_return_type]
|
533
|
+
|
534
|
+
# auth_names
|
535
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
536
|
+
|
537
|
+
new_options = opts.merge(
|
538
|
+
:operation => :"ProfilesApi.subscribe_profiles",
|
539
|
+
:header_params => header_params,
|
540
|
+
:query_params => query_params,
|
541
|
+
:form_params => form_params,
|
542
|
+
:body => post_body,
|
543
|
+
:auth_names => auth_names,
|
544
|
+
:return_type => return_type
|
545
|
+
)
|
546
|
+
|
547
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
548
|
+
if @api_client.config.debugging
|
549
|
+
@api_client.config.logger.debug "API called: ProfilesApi#subscribe_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
550
|
+
end
|
551
|
+
return data, status_code, headers
|
552
|
+
end
|
553
|
+
|
554
|
+
# Suppress Profiles
|
555
|
+
# Manually suppress one or more profiles. Manually suppressed profiles will not receive email marketing. Not supported for SMS marketing.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Profiles Write` `Subscriptions Write`
|
556
|
+
# @param suppression_create_job_create_query [SuppressionCreateJobCreateQuery] Suppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, one will be created and immediately suppressed.
|
557
|
+
# @param [Hash] opts the optional parameters
|
558
|
+
# @return [nil]
|
559
|
+
def suppress_profiles(suppression_create_job_create_query, opts = {})
|
560
|
+
suppress_profiles_with_http_info(suppression_create_job_create_query, opts)
|
561
|
+
nil
|
562
|
+
end
|
563
|
+
|
564
|
+
# Suppress Profiles
|
565
|
+
# Manually suppress one or more profiles. Manually suppressed profiles will not receive email marketing. Not supported for SMS marketing.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Profiles Write` `Subscriptions Write`
|
566
|
+
# @param suppression_create_job_create_query [SuppressionCreateJobCreateQuery] Suppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, one will be created and immediately suppressed.
|
567
|
+
# @param [Hash] opts the optional parameters
|
568
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
569
|
+
def suppress_profiles_with_http_info(suppression_create_job_create_query, opts = {})
|
570
|
+
if @api_client.config.debugging
|
571
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.suppress_profiles ...'
|
572
|
+
end
|
573
|
+
# verify the required parameter 'suppression_create_job_create_query' is set
|
574
|
+
if @api_client.config.client_side_validation && suppression_create_job_create_query.nil?
|
575
|
+
fail ArgumentError, "Missing the required parameter 'suppression_create_job_create_query' when calling ProfilesApi.suppress_profiles"
|
576
|
+
end
|
577
|
+
# resource path
|
578
|
+
local_var_path = '/api/profile-suppression-bulk-create-jobs/'
|
579
|
+
|
580
|
+
# query parameters
|
581
|
+
query_params = opts[:query_params] || {}
|
582
|
+
|
583
|
+
# header parameters
|
584
|
+
header_params = opts[:header_params] || {}
|
585
|
+
# klaviyo api revision
|
586
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
587
|
+
# HTTP header 'Accept' (if needed)
|
588
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
589
|
+
# HTTP header 'Content-Type'
|
590
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
591
|
+
if !content_type.nil?
|
592
|
+
header_params['Content-Type'] = content_type
|
593
|
+
end
|
594
|
+
|
595
|
+
# form parameters
|
596
|
+
form_params = opts[:form_params] || {}
|
597
|
+
|
598
|
+
# http body (model)
|
599
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(suppression_create_job_create_query)
|
600
|
+
|
601
|
+
# return_type
|
602
|
+
return_type = opts[:debug_return_type]
|
603
|
+
|
604
|
+
# auth_names
|
605
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
606
|
+
|
607
|
+
new_options = opts.merge(
|
608
|
+
:operation => :"ProfilesApi.suppress_profiles",
|
609
|
+
:header_params => header_params,
|
610
|
+
:query_params => query_params,
|
611
|
+
:form_params => form_params,
|
612
|
+
:body => post_body,
|
613
|
+
:auth_names => auth_names,
|
614
|
+
:return_type => return_type
|
615
|
+
)
|
616
|
+
|
617
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
618
|
+
if @api_client.config.debugging
|
619
|
+
@api_client.config.logger.debug "API called: ProfilesApi#suppress_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
620
|
+
end
|
621
|
+
return data, status_code, headers
|
622
|
+
end
|
623
|
+
|
624
|
+
# Unsubscribe Profiles
|
625
|
+
# Unsubscribe one or more profiles to email marketing, SMS marketing, or both. To remove someone from a list without changing their subscription status, use [Remove Profile from List](https://developers.klaviyo.com/en/v2022-10-17/reference/delete_list_relationships).<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `List Write` `Profiles Write` `Subscriptions Write`
|
626
|
+
# @param unsubscription_create_job_create_query [UnsubscriptionCreateJobCreateQuery] Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed.
|
627
|
+
# @param [Hash] opts the optional parameters
|
628
|
+
# @return [nil]
|
629
|
+
def unsubscribe_profiles(unsubscription_create_job_create_query, opts = {})
|
630
|
+
unsubscribe_profiles_with_http_info(unsubscription_create_job_create_query, opts)
|
631
|
+
nil
|
632
|
+
end
|
633
|
+
|
634
|
+
# Unsubscribe Profiles
|
635
|
+
# Unsubscribe one or more profiles to email marketing, SMS marketing, or both. To remove someone from a list without changing their subscription status, use [Remove Profile from List](https://developers.klaviyo.com/en/v2022-10-17/reference/delete_list_relationships).<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `List Write` `Profiles Write` `Subscriptions Write`
|
636
|
+
# @param unsubscription_create_job_create_query [UnsubscriptionCreateJobCreateQuery] Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed.
|
637
|
+
# @param [Hash] opts the optional parameters
|
638
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
639
|
+
def unsubscribe_profiles_with_http_info(unsubscription_create_job_create_query, opts = {})
|
640
|
+
if @api_client.config.debugging
|
641
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.unsubscribe_profiles ...'
|
642
|
+
end
|
643
|
+
# verify the required parameter 'unsubscription_create_job_create_query' is set
|
644
|
+
if @api_client.config.client_side_validation && unsubscription_create_job_create_query.nil?
|
645
|
+
fail ArgumentError, "Missing the required parameter 'unsubscription_create_job_create_query' when calling ProfilesApi.unsubscribe_profiles"
|
646
|
+
end
|
647
|
+
# resource path
|
648
|
+
local_var_path = '/api/profile-unsubscription-bulk-create-jobs/'
|
649
|
+
|
650
|
+
# query parameters
|
651
|
+
query_params = opts[:query_params] || {}
|
652
|
+
|
653
|
+
# header parameters
|
654
|
+
header_params = opts[:header_params] || {}
|
655
|
+
# klaviyo api revision
|
656
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
657
|
+
# HTTP header 'Accept' (if needed)
|
658
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
659
|
+
# HTTP header 'Content-Type'
|
660
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
661
|
+
if !content_type.nil?
|
662
|
+
header_params['Content-Type'] = content_type
|
663
|
+
end
|
664
|
+
|
665
|
+
# form parameters
|
666
|
+
form_params = opts[:form_params] || {}
|
667
|
+
|
668
|
+
# http body (model)
|
669
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unsubscription_create_job_create_query)
|
670
|
+
|
671
|
+
# return_type
|
672
|
+
return_type = opts[:debug_return_type]
|
673
|
+
|
674
|
+
# auth_names
|
675
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
676
|
+
|
677
|
+
new_options = opts.merge(
|
678
|
+
:operation => :"ProfilesApi.unsubscribe_profiles",
|
679
|
+
:header_params => header_params,
|
680
|
+
:query_params => query_params,
|
681
|
+
:form_params => form_params,
|
682
|
+
:body => post_body,
|
683
|
+
:auth_names => auth_names,
|
684
|
+
:return_type => return_type
|
685
|
+
)
|
686
|
+
|
687
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
688
|
+
if @api_client.config.debugging
|
689
|
+
@api_client.config.logger.debug "API called: ProfilesApi#unsubscribe_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
690
|
+
end
|
691
|
+
return data, status_code, headers
|
692
|
+
end
|
693
|
+
|
694
|
+
# Unsuppress Profiles
|
695
|
+
# Unsuppress one or more profiles. Unsuppressed profiles will receive email marketing. Not supported for SMS marketing. Profiles suppressed due to a hard bounced email will not be unsuppressed.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Subscriptions Write`
|
696
|
+
# @param unsuppression_create_job_create_query [UnsuppressionCreateJobCreateQuery] Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken.
|
697
|
+
# @param [Hash] opts the optional parameters
|
698
|
+
# @return [nil]
|
699
|
+
def unsuppress_profiles(unsuppression_create_job_create_query, opts = {})
|
700
|
+
unsuppress_profiles_with_http_info(unsuppression_create_job_create_query, opts)
|
701
|
+
nil
|
702
|
+
end
|
703
|
+
|
704
|
+
# Unsuppress Profiles
|
705
|
+
# Unsuppress one or more profiles. Unsuppressed profiles will receive email marketing. Not supported for SMS marketing. Profiles suppressed due to a hard bounced email will not be unsuppressed.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Subscriptions Write`
|
706
|
+
# @param unsuppression_create_job_create_query [UnsuppressionCreateJobCreateQuery] Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken.
|
707
|
+
# @param [Hash] opts the optional parameters
|
708
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
709
|
+
def unsuppress_profiles_with_http_info(unsuppression_create_job_create_query, opts = {})
|
710
|
+
if @api_client.config.debugging
|
711
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.unsuppress_profiles ...'
|
712
|
+
end
|
713
|
+
# verify the required parameter 'unsuppression_create_job_create_query' is set
|
714
|
+
if @api_client.config.client_side_validation && unsuppression_create_job_create_query.nil?
|
715
|
+
fail ArgumentError, "Missing the required parameter 'unsuppression_create_job_create_query' when calling ProfilesApi.unsuppress_profiles"
|
716
|
+
end
|
717
|
+
# resource path
|
718
|
+
local_var_path = '/api/profile-unsuppression-bulk-create-jobs/'
|
719
|
+
|
720
|
+
# query parameters
|
721
|
+
query_params = opts[:query_params] || {}
|
722
|
+
|
723
|
+
# header parameters
|
724
|
+
header_params = opts[:header_params] || {}
|
725
|
+
# klaviyo api revision
|
726
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
727
|
+
# HTTP header 'Accept' (if needed)
|
728
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
729
|
+
# HTTP header 'Content-Type'
|
730
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
731
|
+
if !content_type.nil?
|
732
|
+
header_params['Content-Type'] = content_type
|
733
|
+
end
|
734
|
+
|
735
|
+
# form parameters
|
736
|
+
form_params = opts[:form_params] || {}
|
737
|
+
|
738
|
+
# http body (model)
|
739
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unsuppression_create_job_create_query)
|
740
|
+
|
741
|
+
# return_type
|
742
|
+
return_type = opts[:debug_return_type]
|
743
|
+
|
744
|
+
# auth_names
|
745
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
746
|
+
|
747
|
+
new_options = opts.merge(
|
748
|
+
:operation => :"ProfilesApi.unsuppress_profiles",
|
749
|
+
:header_params => header_params,
|
750
|
+
:query_params => query_params,
|
751
|
+
:form_params => form_params,
|
752
|
+
:body => post_body,
|
753
|
+
:auth_names => auth_names,
|
754
|
+
:return_type => return_type
|
755
|
+
)
|
756
|
+
|
757
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
758
|
+
if @api_client.config.debugging
|
759
|
+
@api_client.config.logger.debug "API called: ProfilesApi#unsuppress_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
760
|
+
end
|
761
|
+
return data, status_code, headers
|
762
|
+
end
|
763
|
+
|
764
|
+
# Update Profile
|
765
|
+
# Update the profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Profiles Write`
|
766
|
+
# @param id [String]
|
767
|
+
# @param profile_partial_update_query [ProfilePartialUpdateQuery]
|
768
|
+
# @param [Hash] opts the optional parameters
|
769
|
+
# @return [Hash<String, Object>]
|
770
|
+
def update_profile(id, profile_partial_update_query, opts = {})
|
771
|
+
data, _status_code, _headers = update_profile_with_http_info(id, profile_partial_update_query, opts)
|
772
|
+
data
|
773
|
+
end
|
774
|
+
|
775
|
+
# Update Profile
|
776
|
+
# Update the profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Profiles Write`
|
777
|
+
# @param id [String]
|
778
|
+
# @param profile_partial_update_query [ProfilePartialUpdateQuery]
|
779
|
+
# @param [Hash] opts the optional parameters
|
780
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
781
|
+
def update_profile_with_http_info(id, profile_partial_update_query, opts = {})
|
782
|
+
if @api_client.config.debugging
|
783
|
+
@api_client.config.logger.debug 'Calling API: ProfilesApi.update_profile ...'
|
784
|
+
end
|
785
|
+
# verify the required parameter 'id' is set
|
786
|
+
if @api_client.config.client_side_validation && id.nil?
|
787
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.update_profile"
|
788
|
+
end
|
789
|
+
# verify the required parameter 'profile_partial_update_query' is set
|
790
|
+
if @api_client.config.client_side_validation && profile_partial_update_query.nil?
|
791
|
+
fail ArgumentError, "Missing the required parameter 'profile_partial_update_query' when calling ProfilesApi.update_profile"
|
792
|
+
end
|
793
|
+
# resource path
|
794
|
+
local_var_path = '/api/profiles/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
795
|
+
|
796
|
+
# query parameters
|
797
|
+
query_params = opts[:query_params] || {}
|
798
|
+
|
799
|
+
# header parameters
|
800
|
+
header_params = opts[:header_params] || {}
|
801
|
+
# klaviyo api revision
|
802
|
+
header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
|
803
|
+
# HTTP header 'Accept' (if needed)
|
804
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
805
|
+
# HTTP header 'Content-Type'
|
806
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
807
|
+
if !content_type.nil?
|
808
|
+
header_params['Content-Type'] = content_type
|
809
|
+
end
|
810
|
+
|
811
|
+
# form parameters
|
812
|
+
form_params = opts[:form_params] || {}
|
813
|
+
|
814
|
+
# http body (model)
|
815
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_partial_update_query)
|
816
|
+
|
817
|
+
# return_type
|
818
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
819
|
+
|
820
|
+
# auth_names
|
821
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
822
|
+
|
823
|
+
new_options = opts.merge(
|
824
|
+
:operation => :"ProfilesApi.update_profile",
|
825
|
+
:header_params => header_params,
|
826
|
+
:query_params => query_params,
|
827
|
+
:form_params => form_params,
|
828
|
+
:body => post_body,
|
829
|
+
:auth_names => auth_names,
|
830
|
+
:return_type => return_type
|
831
|
+
)
|
832
|
+
|
833
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
834
|
+
if @api_client.config.debugging
|
835
|
+
@api_client.config.logger.debug "API called: ProfilesApi#update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
836
|
+
end
|
837
|
+
return data, status_code, headers
|
838
|
+
end
|
839
|
+
end
|
840
|
+
end
|