late-sdk 0.0.715 → 0.0.717
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +96 -10
- data/docs/AccountsApi.md +142 -1
- data/docs/AdAnalyticsResponse.md +22 -0
- data/docs/{GetAdAnalytics200ResponseAd.md → AdAnalyticsResponseAd.md} +2 -4
- data/docs/AdCampaignsApi.md +34 -22
- data/docs/AdCreative.md +2 -0
- data/docs/AdDailyMetrics.md +1 -1
- data/docs/AdEngagementCounts.md +4 -4
- data/docs/AdInsightsApi.md +172 -8
- data/docs/AdMetrics.md +1 -1
- data/docs/AdTargetingApi.md +3 -3
- data/docs/AdTreeCampaign.md +1 -1
- data/docs/AdTreeResponse.md +22 -0
- data/docs/AddBroadcastRecipientsRequest.md +1 -1
- data/docs/AdsListResponse.md +22 -0
- data/docs/AdsTimelineResponse.md +20 -0
- data/docs/{GetAdsTimeline200ResponseRowsInner.md → AdsTimelineResponseRowsInner.md} +2 -2
- data/docs/AnalyticsListResponsePostsInner.md +1 -1
- data/docs/AnalyticsListResponsePostsInnerMediaItemsInner.md +24 -0
- data/docs/AnalyticsSinglePostResponseMediaItemsInner.md +7 -3
- data/docs/BillingSnapshot.md +2 -0
- data/docs/BillingSnapshotPlan.md +3 -1
- data/docs/Blog.md +24 -0
- data/docs/BlogArticle.md +44 -0
- data/docs/BlogArticleImage.md +20 -0
- data/docs/BlogsApi.md +747 -0
- data/docs/BlueskyPlatformData.md +2 -0
- data/docs/BoostPostRequest.md +2 -2
- data/docs/CampaignAnalyticsResponse.md +22 -0
- data/docs/{GetCampaignAnalytics200ResponseAnalytics.md → CampaignAnalyticsResponseAnalytics.md} +3 -3
- data/docs/{GetCampaignAnalytics200ResponseAnalyticsDailyInner.md → CampaignAnalyticsResponseAnalyticsDailyInner.md} +3 -3
- data/docs/{GetCampaignAnalytics200ResponseCampaign.md → CampaignAnalyticsResponseCampaign.md} +2 -2
- data/docs/CommentsApi.md +8 -8
- data/docs/ConnectApi.md +149 -1
- data/docs/ConnectShopifyWithToken200Response.md +18 -0
- data/docs/ConnectShopifyWithToken200ResponseAccount.md +26 -0
- data/docs/ConnectShopifyWithTokenRequest.md +22 -0
- data/docs/CreateBlog201Response.md +20 -0
- data/docs/CreateBlogArticle201Response.md +20 -0
- data/docs/CreateBlogArticleRequest.md +36 -0
- data/docs/CreateBlogArticleRequestImage.md +20 -0
- data/docs/CreateBlogArticleRequestSeo.md +20 -0
- data/docs/CreateBlogRequest.md +20 -0
- data/docs/CreateCallAdRequest.md +1 -1
- data/docs/CreateInboxConversationRequest.md +2 -0
- data/docs/CreateMessagingAdRequest.md +1 -1
- data/docs/CreatePostRequest.md +1 -1
- data/docs/CreateStandaloneAdRequest.md +10 -6
- data/docs/CreateStandaloneAdRequestPromotedObject.md +2 -2
- data/docs/CreateStandaloneAdRequestVideo.md +1 -1
- data/docs/CtwaAdRequestBody.md +1 -1
- data/docs/ExternalPostMediaItem.md +7 -3
- data/docs/ExternalPostSummary.md +0 -2
- data/docs/ExternalPostSummaryAnalytics.md +1 -1
- data/docs/GetAccountHealth200Response.md +3 -1
- data/docs/GetAccountHealth200ResponsePlatformConnection.md +24 -0
- data/docs/GetAccountHealth200ResponsePlatformConnectionMetaError.md +22 -0
- data/docs/GetAdAnalytics202Response.md +22 -0
- data/docs/GetAdTree202Response.md +22 -0
- data/docs/GetAdsTimeline202Response.md +20 -0
- data/docs/GetBlueskySettings200Response.md +18 -0
- data/docs/GetCampaignAnalytics202Response.md +22 -0
- data/docs/GetInboxPostComments200ResponseCommentsInner.md +4 -2
- data/docs/GetLinkedInPostAnalytics200ResponseAnalytics.md +1 -1
- data/docs/GetPhoneNumberKycForm200Response.md +3 -1
- data/docs/GetWhatsAppNumberKycForm200Response.md +3 -1
- data/docs/LinkedInAggregateAnalyticsTotalResponseAnalytics.md +1 -1
- data/docs/LinkedInPlatformData.md +4 -2
- data/docs/LinkedInPlatformDataPoll.md +22 -0
- data/docs/ListAds202Response.md +22 -0
- data/docs/ListBlogArticles200Response.md +22 -0
- data/docs/ListBlogs200Response.md +22 -0
- data/docs/ListInboxConversations200ResponseDataInnerMetadata.md +3 -3
- data/docs/ListLeads200ResponseLeadsInner.md +3 -3
- data/docs/ListLocalServicesLeadConversations200Response.md +22 -0
- data/docs/ListLocalServicesLeadConversations200ResponseDataInner.md +28 -0
- data/docs/ListLocalServicesLeadConversations200ResponseDataInnerMessage.md +20 -0
- data/docs/ListLocalServicesLeadConversations200ResponseDataInnerPhoneCall.md +20 -0
- data/docs/ListLocalServicesLeads200Response.md +22 -0
- data/docs/ListLocalServicesLeads200ResponseDataInner.md +38 -0
- data/docs/ListLocalServicesLeads200ResponseDataInnerContact.md +22 -0
- data/docs/ListPhoneNumbers200ResponseConnectedInner.md +3 -1
- data/docs/ListPhoneNumbers200ResponseNumbersInner.md +2 -0
- data/docs/ListWhatsAppAccountEvents200Response.md +18 -0
- data/docs/ListWhatsAppAccountEvents200ResponseEventsInner.md +28 -0
- data/docs/MessagesApi.md +4 -4
- data/docs/OnVerificationApprovedRequest.md +1 -1
- data/docs/OnVerificationFailedRequest.md +1 -1
- data/docs/OnWhatsAppAutomaticEventRequest.md +1 -1
- data/docs/OnWhatsAppNumberActionRequiredRequest.md +1 -1
- data/docs/OnWhatsAppNumberActivatedRequest.md +1 -1
- data/docs/OnWhatsAppNumberDeclinedRequest.md +1 -1
- data/docs/OnWhatsAppNumberKycSubmittedRequest.md +1 -1
- data/docs/OnWhatsAppNumberReactivatedRequest.md +1 -1
- data/docs/OnWhatsAppNumberReleasedRequest.md +1 -1
- data/docs/OnWhatsAppNumberSuspendedRequest.md +1 -1
- data/docs/OnWhatsAppNumberVerificationRequiredRequest.md +1 -1
- data/docs/PlatformTarget.md +2 -2
- data/docs/PostAnalytics.md +3 -3
- data/docs/PostsApi.md +1 -1
- data/docs/SMSApi.md +1 -1
- data/docs/SearchAdTargeting200ResponseResultsInner.md +1 -1
- data/docs/SendInboxMessageRequest.md +4 -2
- data/docs/SubmitPhoneNumberKycRequest.md +1 -1
- data/docs/SubmitPhoneNumberKycRequestAddress.md +2 -0
- data/docs/SubmitWhatsAppNumberKycRequest.md +1 -1
- data/docs/TwitterPlatformData.md +2 -0
- data/docs/UpdateAdCampaignStatus200Response.md +6 -6
- data/docs/UpdateAdSet200Response.md +7 -3
- data/docs/UpdateAdSetRequest.md +1 -1
- data/docs/UpdateAdSetStatus200Response.md +9 -3
- data/docs/UpdateBlogArticleRequest.md +36 -0
- data/docs/UpdateBlogRequest.md +20 -0
- data/docs/UpdateBlueskySettingsRequest.md +18 -0
- data/docs/ValidatePhoneNumberKycAddressRequest.md +2 -0
- data/docs/WebhookEventsApi.md +138 -0
- data/docs/WebhookPayloadAccountAdsInitialSyncCompleted.md +1 -1
- data/docs/WebhookPayloadAccountConnected.md +1 -1
- data/docs/WebhookPayloadAccountDisconnected.md +1 -1
- data/docs/WebhookPayloadAdStatusChanged.md +1 -1
- data/docs/WebhookPayloadCallEnded.md +1 -1
- data/docs/WebhookPayloadCallEndedCall.md +4 -0
- data/docs/WebhookPayloadCallFailed.md +1 -1
- data/docs/WebhookPayloadCallPermissionRequest.md +1 -1
- data/docs/WebhookPayloadCallReceived.md +1 -1
- data/docs/WebhookPayloadComment.md +1 -1
- data/docs/WebhookPayloadCommentCommentAuthor.md +2 -0
- data/docs/WebhookPayloadConversationStarted.md +1 -1
- data/docs/WebhookPayloadExternalPost.md +1 -1
- data/docs/WebhookPayloadLead.md +1 -1
- data/docs/WebhookPayloadMessage.md +1 -1
- data/docs/WebhookPayloadMessageDeleted.md +1 -1
- data/docs/WebhookPayloadMessageDeliveryStatus.md +1 -1
- data/docs/WebhookPayloadMessageEdited.md +1 -1
- data/docs/WebhookPayloadMessageMetadata.md +5 -1
- data/docs/WebhookPayloadMessageMetadataReferral.md +5 -3
- data/docs/WebhookPayloadMessageMetadataUnsupported.md +22 -0
- data/docs/WebhookPayloadMessageSent.md +1 -1
- data/docs/WebhookPayloadPost.md +1 -1
- data/docs/WebhookPayloadPostPlatform.md +1 -1
- data/docs/WebhookPayloadReaction.md +1 -1
- data/docs/WebhookPayloadReferral.md +30 -0
- data/docs/WebhookPayloadReferralReferral.md +28 -0
- data/docs/WebhookPayloadReferralReferralAdsContextData.md +28 -0
- data/docs/WebhookPayloadReferralSender.md +20 -0
- data/docs/WebhookPayloadReviewNew.md +1 -1
- data/docs/WebhookPayloadReviewUpdated.md +1 -1
- data/docs/WebhookPayloadTest.md +1 -1
- data/docs/WebhookPayloadWhatsAppTemplateCategoryUpdated.md +26 -0
- data/docs/WebhookPayloadWhatsAppTemplateCategoryUpdatedTemplate.md +32 -0
- data/docs/WebhookPayloadWhatsAppTemplateStatusUpdated.md +1 -1
- data/docs/WhatsAppApi.md +74 -0
- data/docs/WorkflowNode.md +3 -1
- data/docs/XArticle.md +24 -0
- data/docs/XArticleBlock.md +28 -0
- data/docs/XArticleBlockData.md +24 -0
- data/docs/XArticleContentState.md +20 -0
- data/docs/XArticleCover.md +20 -0
- data/docs/XArticleEntity.md +57 -0
- data/docs/XArticleEntityOneOf.md +20 -0
- data/docs/XArticleEntityOneOf1.md +20 -0
- data/docs/XArticleEntityOneOf1Value.md +22 -0
- data/docs/XArticleEntityOneOf1ValueData.md +18 -0
- data/docs/XArticleEntityOneOf2.md +20 -0
- data/docs/XArticleEntityOneOf2Value.md +22 -0
- data/docs/XArticleEntityOneOf2ValueData.md +22 -0
- data/docs/XArticleEntityOneOf3.md +20 -0
- data/docs/XArticleEntityOneOf3Value.md +22 -0
- data/docs/XArticleEntityOneOf3ValueData.md +18 -0
- data/docs/XArticleEntityOneOf4.md +20 -0
- data/docs/XArticleEntityOneOf4Value.md +22 -0
- data/docs/XArticleEntityOneOf4ValueData.md +18 -0
- data/docs/XArticleEntityOneOf5.md +20 -0
- data/docs/XArticleEntityOneOf5Value.md +22 -0
- data/docs/XArticleEntityOneOfValue.md +22 -0
- data/docs/XArticleEntityOneOfValueData.md +18 -0
- data/docs/XArticleEntityRange.md +22 -0
- data/docs/XArticleInlineStyleRange.md +22 -0
- data/docs/XArticleTextRange.md +22 -0
- data/docs/YouTubeVideoRetentionResponse.md +1 -1
- data/docs/YouTubeVideoRetentionResponseRetentionCurveInner.md +2 -2
- data/lib/zernio-sdk/api/accounts_api.rb +139 -2
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +44 -17
- data/lib/zernio-sdk/api/ad_insights_api.rb +171 -6
- data/lib/zernio-sdk/api/ad_targeting_api.rb +5 -5
- data/lib/zernio-sdk/api/blogs_api.rb +845 -0
- data/lib/zernio-sdk/api/comments_api.rb +10 -10
- data/lib/zernio-sdk/api/connect_api.rb +149 -0
- data/lib/zernio-sdk/api/messages_api.rb +4 -4
- data/lib/zernio-sdk/api/posts_api.rb +2 -2
- data/lib/zernio-sdk/api/sms_api.rb +2 -2
- data/lib/zernio-sdk/api/webhook_events_api.rb +132 -0
- data/lib/zernio-sdk/api/whats_app_api.rb +75 -0
- data/lib/zernio-sdk/models/account_with_follower_stats.rb +2 -2
- data/lib/zernio-sdk/models/{get_ad_analytics200_response.rb → ad_analytics_response.rb} +15 -15
- data/lib/zernio-sdk/models/{get_ad_analytics200_response_ad.rb → ad_analytics_response_ad.rb} +4 -47
- data/lib/zernio-sdk/models/ad_creative.rb +12 -1
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +1 -1
- data/lib/zernio-sdk/models/ad_engagement_counts.rb +5 -5
- data/lib/zernio-sdk/models/ad_metrics.rb +1 -1
- data/lib/zernio-sdk/models/ad_tree_campaign.rb +1 -1
- data/lib/zernio-sdk/models/{get_ad_tree200_response.rb → ad_tree_response.rb} +17 -17
- data/lib/zernio-sdk/models/add_broadcast_recipients_request.rb +1 -1
- data/lib/zernio-sdk/models/{list_ads200_response.rb → ads_list_response.rb} +17 -17
- data/lib/zernio-sdk/models/{get_ads_timeline200_response.rb → ads_timeline_response.rb} +17 -17
- data/lib/zernio-sdk/models/{get_ads_timeline200_response_rows_inner.rb → ads_timeline_response_rows_inner.rb} +3 -3
- data/lib/zernio-sdk/models/analytics_list_response_posts_inner.rb +1 -1
- data/lib/zernio-sdk/models/analytics_list_response_posts_inner_media_items_inner.rb +211 -0
- data/lib/zernio-sdk/models/analytics_single_post_response_media_items_inner.rb +52 -6
- data/lib/zernio-sdk/models/billing_snapshot.rb +14 -3
- data/lib/zernio-sdk/models/billing_snapshot_plan.rb +14 -4
- data/lib/zernio-sdk/models/blog.rb +211 -0
- data/lib/zernio-sdk/models/blog_article.rb +315 -0
- data/lib/zernio-sdk/models/blog_article_image.rb +158 -0
- data/lib/zernio-sdk/models/bluesky_platform_data.rb +42 -2
- data/lib/zernio-sdk/models/boost_post_request.rb +30 -1
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response.rb → campaign_analytics_response.rb} +15 -15
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response_analytics.rb → campaign_analytics_response_analytics.rb} +4 -4
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response_analytics_daily_inner.rb → campaign_analytics_response_analytics_daily_inner.rb} +4 -4
- data/lib/zernio-sdk/models/{get_campaign_analytics200_response_campaign.rb → campaign_analytics_response_campaign.rb} +3 -3
- data/lib/zernio-sdk/models/connect_shopify_with_token200_response.rb +147 -0
- data/lib/zernio-sdk/models/connect_shopify_with_token200_response_account.rb +218 -0
- data/lib/zernio-sdk/models/connect_shopify_with_token_request.rb +219 -0
- data/lib/zernio-sdk/models/create_blog201_response.rb +190 -0
- data/lib/zernio-sdk/models/create_blog_article201_response.rb +190 -0
- data/lib/zernio-sdk/models/create_blog_article_request.rb +262 -0
- data/lib/zernio-sdk/models/create_blog_article_request_image.rb +174 -0
- data/lib/zernio-sdk/models/create_blog_article_request_seo.rb +157 -0
- data/lib/zernio-sdk/models/create_blog_request.rb +202 -0
- data/lib/zernio-sdk/models/create_call_ad_request.rb +1 -1
- data/lib/zernio-sdk/models/create_inbox_conversation_request.rb +13 -1
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +1 -1
- data/lib/zernio-sdk/models/create_post_request.rb +1 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +67 -6
- data/lib/zernio-sdk/models/create_standalone_ad_request_creatives_inner_video.rb +1 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +3 -3
- data/lib/zernio-sdk/models/create_standalone_ad_request_video.rb +1 -1
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +1 -1
- data/lib/zernio-sdk/models/external_post_media_item.rb +48 -16
- data/lib/zernio-sdk/models/external_post_summary.rb +1 -11
- data/lib/zernio-sdk/models/external_post_summary_analytics.rb +1 -0
- data/lib/zernio-sdk/models/facebook_settings.rb +5 -5
- data/lib/zernio-sdk/models/get_account_health200_response.rb +13 -4
- data/lib/zernio-sdk/models/get_account_health200_response_platform_connection.rb +213 -0
- data/lib/zernio-sdk/models/get_account_health200_response_platform_connection_meta_error.rb +168 -0
- data/lib/zernio-sdk/models/get_ad_analytics202_response.rb +213 -0
- data/lib/zernio-sdk/models/get_ad_tree202_response.rb +215 -0
- data/lib/zernio-sdk/models/get_ads_timeline202_response.rb +206 -0
- data/lib/zernio-sdk/models/get_bluesky_settings200_response.rb +150 -0
- data/lib/zernio-sdk/models/get_campaign_analytics202_response.rb +213 -0
- data/lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb +13 -2
- data/lib/zernio-sdk/models/get_linked_in_post_analytics200_response_analytics.rb +1 -1
- data/lib/zernio-sdk/models/get_phone_number_kyc_form200_response.rb +14 -4
- data/lib/zernio-sdk/models/get_whats_app_number_kyc_form200_response.rb +14 -4
- data/lib/zernio-sdk/models/inbox_webhook_message.rb +2 -2
- data/lib/zernio-sdk/models/linked_in_aggregate_analytics_total_response_analytics.rb +1 -1
- data/lib/zernio-sdk/models/linked_in_platform_data.rb +15 -6
- data/lib/zernio-sdk/models/linked_in_platform_data_poll.rb +277 -0
- data/lib/zernio-sdk/models/list_ads202_response.rb +215 -0
- data/lib/zernio-sdk/models/list_blog_articles200_response.rb +203 -0
- data/lib/zernio-sdk/models/list_blogs200_response.rb +203 -0
- data/lib/zernio-sdk/models/list_broadcast_recipients200_response_recipients_inner.rb +1 -0
- data/lib/zernio-sdk/models/list_inbox_conversations200_response_data_inner_metadata.rb +4 -4
- data/lib/zernio-sdk/models/list_leads200_response_leads_inner.rb +3 -2
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response_data_inner.rb +198 -0
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response_data_inner_message.rb +160 -0
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response_data_inner_phone_call.rb +159 -0
- data/lib/zernio-sdk/models/list_local_services_leads200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_local_services_leads200_response_data_inner.rb +249 -0
- data/lib/zernio-sdk/models/list_local_services_leads200_response_data_inner_contact.rb +169 -0
- data/lib/zernio-sdk/models/list_phone_numbers200_response_connected_inner.rb +15 -5
- data/lib/zernio-sdk/models/list_phone_numbers200_response_numbers_inner.rb +11 -1
- data/lib/zernio-sdk/models/list_sequence_enrollments200_response_enrollments_inner.rb +3 -0
- data/lib/zernio-sdk/models/list_whats_app_account_events200_response.rb +149 -0
- data/lib/zernio-sdk/models/list_whats_app_account_events200_response_events_inner.rb +228 -0
- data/lib/zernio-sdk/models/on_verification_approved_request.rb +1 -0
- data/lib/zernio-sdk/models/on_verification_failed_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_automatic_event_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_action_required_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_activated_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_declined_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_kyc_submitted_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_reactivated_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_released_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_suspended_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_verification_required_request.rb +1 -0
- data/lib/zernio-sdk/models/platform_target.rb +5 -4
- data/lib/zernio-sdk/models/post_analytics.rb +2 -1
- data/lib/zernio-sdk/models/search_ad_targeting200_response_results_inner.rb +1 -1
- data/lib/zernio-sdk/models/send_inbox_message_request.rb +15 -3
- data/lib/zernio-sdk/models/social_account.rb +2 -2
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request.rb +1 -1
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request_address.rb +11 -1
- data/lib/zernio-sdk/models/submit_whats_app_number_kyc_request.rb +1 -1
- data/lib/zernio-sdk/models/twitter_platform_data.rb +11 -2
- data/lib/zernio-sdk/models/update_ad_campaign_status200_response.rb +50 -15
- data/lib/zernio-sdk/models/update_ad_set200_response.rb +26 -1
- data/lib/zernio-sdk/models/update_ad_set_request.rb +1 -1
- data/lib/zernio-sdk/models/update_ad_set_status200_response.rb +72 -4
- data/lib/zernio-sdk/models/update_blog_article_request.rb +257 -0
- data/lib/zernio-sdk/models/update_blog_request.rb +196 -0
- data/lib/zernio-sdk/models/update_bluesky_settings_request.rb +176 -0
- data/lib/zernio-sdk/models/validate_phone_number_kyc_address_request.rb +11 -1
- data/lib/zernio-sdk/models/webhook_payload_account_ads_initial_sync_completed.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_account_connected.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_account_disconnected.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_ad_status_changed.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_call_ended.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_call_ended_call.rb +23 -1
- data/lib/zernio-sdk/models/webhook_payload_call_failed.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_call_permission_request.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_call_received.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_comment.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_comment_comment_author.rb +11 -1
- data/lib/zernio-sdk/models/webhook_payload_conversation_started.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_external_post.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_lead.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_deleted.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_delivery_status.rb +2 -1
- data/lib/zernio-sdk/models/webhook_payload_message_edited.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_message.rb +2 -2
- data/lib/zernio-sdk/models/webhook_payload_message_metadata.rb +23 -4
- data/lib/zernio-sdk/models/webhook_payload_message_metadata_referral.rb +15 -5
- data/lib/zernio-sdk/models/webhook_payload_message_metadata_unsupported.rb +169 -0
- data/lib/zernio-sdk/models/webhook_payload_message_sent.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_post.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_post_platform.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_reaction.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_reaction_reaction_sender.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_referral.rb +347 -0
- data/lib/zernio-sdk/models/webhook_payload_referral_referral.rb +198 -0
- data/lib/zernio-sdk/models/webhook_payload_referral_referral_ads_context_data.rb +193 -0
- data/lib/zernio-sdk/models/webhook_payload_referral_sender.rb +176 -0
- data/lib/zernio-sdk/models/webhook_payload_review_new.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_review_updated.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_test.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_whats_app_template_category_updated.rb +295 -0
- data/lib/zernio-sdk/models/webhook_payload_whats_app_template_category_updated_template.rb +353 -0
- data/lib/zernio-sdk/models/webhook_payload_whats_app_template_status_updated.rb +1 -1
- data/lib/zernio-sdk/models/workflow_node.rb +42 -4
- data/lib/zernio-sdk/models/x_article.rb +255 -0
- data/lib/zernio-sdk/models/x_article_block.rb +273 -0
- data/lib/zernio-sdk/models/x_article_block_data.rb +182 -0
- data/lib/zernio-sdk/models/x_article_content_state.rb +204 -0
- data/lib/zernio-sdk/models/x_article_cover.rb +204 -0
- data/lib/zernio-sdk/models/x_article_entity.rb +109 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of1.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of1_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of1_value_data.rb +164 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of2.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of2_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of2_value_data.rb +214 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of3.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of3_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of3_value_data.rb +173 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of4.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of4_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of4_value_data.rb +164 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of5.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of5_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of_value_data.rb +173 -0
- data/lib/zernio-sdk/models/x_article_entity_range.rb +245 -0
- data/lib/zernio-sdk/models/x_article_inline_style_range.rb +259 -0
- data/lib/zernio-sdk/models/x_article_text_range.rb +237 -0
- data/lib/zernio-sdk/models/you_tube_video_retention_response.rb +1 -1
- data/lib/zernio-sdk/models/you_tube_video_retention_response_retention_curve_inner.rb +2 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +80 -10
- data/openapi.yaml +2141 -282
- data/spec/api/accounts_api_spec.rb +26 -1
- data/spec/api/ad_campaigns_api_spec.rb +12 -7
- data/spec/api/ad_insights_api_spec.rb +36 -2
- data/spec/api/ad_targeting_api_spec.rb +2 -2
- data/spec/api/blogs_api_spec.rb +174 -0
- data/spec/api/comments_api_spec.rb +5 -5
- data/spec/api/connect_api_spec.rb +27 -0
- data/spec/api/messages_api_spec.rb +2 -2
- data/spec/api/posts_api_spec.rb +1 -1
- data/spec/api/sms_api_spec.rb +1 -1
- data/spec/api/whats_app_api_spec.rb +13 -0
- data/spec/models/account_with_follower_stats_spec.rb +1 -1
- data/spec/models/{get_campaign_analytics200_response_campaign_spec.rb → ad_analytics_response_ad_spec.rb} +6 -6
- data/spec/models/{get_ad_analytics200_response_spec.rb → ad_analytics_response_spec.rb} +8 -8
- data/spec/models/ad_creative_spec.rb +6 -0
- data/spec/models/{get_ad_tree200_response_spec.rb → ad_tree_response_spec.rb} +8 -8
- data/spec/models/{list_ads200_response_spec.rb → ads_list_response_spec.rb} +8 -8
- data/spec/models/{get_ads_timeline200_response_rows_inner_spec.rb → ads_timeline_response_rows_inner_spec.rb} +6 -6
- data/spec/models/{get_ads_timeline200_response_spec.rb → ads_timeline_response_spec.rb} +8 -8
- data/spec/models/analytics_list_response_posts_inner_media_items_inner_spec.rb +58 -0
- data/spec/models/analytics_single_post_response_media_items_inner_spec.rb +20 -0
- data/spec/models/billing_snapshot_plan_spec.rb +6 -0
- data/spec/models/billing_snapshot_spec.rb +7 -1
- data/spec/models/blog_article_image_spec.rb +42 -0
- data/spec/models/blog_article_spec.rb +118 -0
- data/spec/models/blog_spec.rb +58 -0
- data/spec/models/bluesky_platform_data_spec.rb +6 -0
- data/spec/models/{get_campaign_analytics200_response_analytics_daily_inner_spec.rb → campaign_analytics_response_analytics_daily_inner_spec.rb} +6 -6
- data/spec/models/{get_campaign_analytics200_response_analytics_spec.rb → campaign_analytics_response_analytics_spec.rb} +6 -6
- data/spec/models/campaign_analytics_response_campaign_spec.rb +60 -0
- data/spec/models/{get_campaign_analytics200_response_spec.rb → campaign_analytics_response_spec.rb} +8 -8
- data/spec/models/connect_shopify_with_token200_response_account_spec.rb +64 -0
- data/spec/models/connect_shopify_with_token200_response_spec.rb +36 -0
- data/spec/models/connect_shopify_with_token_request_spec.rb +48 -0
- data/spec/models/create_blog201_response_spec.rb +46 -0
- data/spec/models/create_blog_article201_response_spec.rb +46 -0
- data/spec/models/create_blog_article_request_image_spec.rb +42 -0
- data/spec/models/create_blog_article_request_seo_spec.rb +42 -0
- data/spec/models/create_blog_article_request_spec.rb +90 -0
- data/spec/models/create_blog_request_spec.rb +42 -0
- data/spec/models/create_inbox_conversation_request_spec.rb +6 -0
- data/spec/models/create_standalone_ad_request_spec.rb +16 -0
- data/spec/models/create_webhook_settings_request_spec.rb +1 -1
- data/spec/models/external_post_media_item_spec.rb +20 -0
- data/spec/models/external_post_summary_spec.rb +0 -6
- data/spec/models/get_account_health200_response_platform_connection_meta_error_spec.rb +48 -0
- data/spec/models/get_account_health200_response_platform_connection_spec.rb +58 -0
- data/spec/models/get_account_health200_response_spec.rb +6 -0
- data/spec/models/get_ad_analytics202_response_spec.rb +52 -0
- data/spec/models/get_ad_tree202_response_spec.rb +52 -0
- data/spec/models/get_ads_timeline202_response_spec.rb +46 -0
- data/spec/models/get_bluesky_settings200_response_spec.rb +36 -0
- data/spec/models/get_campaign_analytics202_response_spec.rb +52 -0
- data/spec/models/get_inbox_post_comments200_response_comments_inner_spec.rb +6 -0
- data/spec/models/get_phone_number_kyc_form200_response_spec.rb +6 -0
- data/spec/models/get_whats_app_number_kyc_form200_response_spec.rb +6 -0
- data/spec/models/inbox_webhook_message_spec.rb +1 -1
- data/spec/models/linked_in_platform_data_poll_spec.rb +52 -0
- data/spec/models/linked_in_platform_data_spec.rb +6 -0
- data/spec/models/list_ads202_response_spec.rb +52 -0
- data/spec/models/list_blog_articles200_response_spec.rb +52 -0
- data/spec/models/list_blogs200_response_spec.rb +52 -0
- data/spec/models/list_local_services_lead_conversations200_response_data_inner_message_spec.rb +42 -0
- data/spec/models/list_local_services_lead_conversations200_response_data_inner_phone_call_spec.rb +42 -0
- data/spec/models/list_local_services_lead_conversations200_response_data_inner_spec.rb +66 -0
- data/spec/models/list_local_services_lead_conversations200_response_spec.rb +48 -0
- data/spec/models/list_local_services_leads200_response_data_inner_contact_spec.rb +48 -0
- data/spec/models/list_local_services_leads200_response_data_inner_spec.rb +96 -0
- data/spec/models/list_local_services_leads200_response_spec.rb +48 -0
- data/spec/models/list_phone_numbers200_response_connected_inner_spec.rb +6 -0
- data/spec/models/list_phone_numbers200_response_numbers_inner_spec.rb +6 -0
- data/spec/models/list_whats_app_account_events200_response_events_inner_spec.rb +70 -0
- data/spec/models/list_whats_app_account_events200_response_spec.rb +36 -0
- data/spec/models/platform_target_spec.rb +1 -1
- data/spec/models/send_inbox_message_request_spec.rb +6 -0
- data/spec/models/social_account_spec.rb +1 -1
- data/spec/models/submit_phone_number_kyc_request_address_spec.rb +6 -0
- data/spec/models/twitter_platform_data_spec.rb +6 -0
- data/spec/models/update_ad_campaign_status200_response_spec.rb +8 -4
- data/spec/models/update_ad_set200_response_spec.rb +12 -0
- data/spec/models/update_ad_set_status200_response_spec.rb +22 -0
- data/spec/models/update_blog_article_request_spec.rb +90 -0
- data/spec/models/update_blog_request_spec.rb +42 -0
- data/spec/models/update_bluesky_settings_request_spec.rb +36 -0
- data/spec/models/update_webhook_settings_request_spec.rb +1 -1
- data/spec/models/validate_phone_number_kyc_address_request_spec.rb +6 -0
- data/spec/models/webhook_payload_call_ended_call_spec.rb +12 -0
- data/spec/models/webhook_payload_comment_comment_author_spec.rb +6 -0
- data/spec/models/webhook_payload_message_message_spec.rb +1 -1
- data/spec/models/webhook_payload_message_metadata_referral_spec.rb +6 -0
- data/spec/models/webhook_payload_message_metadata_spec.rb +12 -0
- data/spec/models/webhook_payload_message_metadata_unsupported_spec.rb +48 -0
- data/spec/models/webhook_payload_referral_referral_ads_context_data_spec.rb +66 -0
- data/spec/models/webhook_payload_referral_referral_spec.rb +66 -0
- data/spec/models/webhook_payload_referral_sender_spec.rb +42 -0
- data/spec/models/webhook_payload_referral_spec.rb +76 -0
- data/spec/models/webhook_payload_whats_app_template_category_updated_spec.rb +64 -0
- data/spec/models/webhook_payload_whats_app_template_category_updated_template_spec.rb +94 -0
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/models/workflow_node_spec.rb +6 -0
- data/spec/models/x_article_block_data_spec.rb +54 -0
- data/spec/models/{get_ad_analytics200_response_ad_spec.rb → x_article_block_spec.rb} +16 -16
- data/spec/models/x_article_content_state_spec.rb +42 -0
- data/spec/models/x_article_cover_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of1_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of1_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of1_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of2_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of2_value_data_spec.rb +48 -0
- data/spec/models/x_article_entity_one_of2_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of3_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of3_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of3_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of4_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of4_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of4_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of5_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of5_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of_value_spec.rb +56 -0
- data/spec/models/x_article_entity_range_spec.rb +48 -0
- data/spec/models/x_article_entity_spec.rb +32 -0
- data/spec/models/x_article_inline_style_range_spec.rb +52 -0
- data/spec/models/x_article_spec.rb +58 -0
- data/spec/models/x_article_text_range_spec.rb +48 -0
- data/zernio-sdk-0.0.717.gem +0 -0
- metadata +1914 -1634
- data/docs/GetAdAnalytics200Response.md +0 -22
- data/docs/GetAdTree200Response.md +0 -22
- data/docs/GetAdsTimeline200Response.md +0 -20
- data/docs/GetCampaignAnalytics200Response.md +0 -22
- data/docs/ListAds200Response.md +0 -22
- data/zernio-sdk-0.0.715.gem +0 -0
|
@@ -20,9 +20,10 @@ module Zernio
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Boost post as ad
|
|
23
|
-
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType` and `adSetId` are Meta-only and return 400 on other platforms.
|
|
23
|
+
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType` and `adSetId` are Meta-only and return 400 on other platforms. **Retries.** Boosts are NOT idempotent and can take minutes when Meta requires re-hosting an Instagram video, so do not retry on client timeout. Send an Idempotency-Key header to make retries safe: same key and body replays the original 201, and distinct keys always create distinct ads. Without the header, an identical request is treated as a retry: while one is in flight it returns 409, and within 10 minutes of a completed boost it returns the already-created ad instead of creating another. To intentionally duplicate an ad, send distinct Idempotency-Keys (or vary the body, e.g. the name).
|
|
24
24
|
# @param boost_post_request [BoostPostRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
26
27
|
# @return [UpdateAd200Response]
|
|
27
28
|
def boost_post(boost_post_request, opts = {})
|
|
28
29
|
data, _status_code, _headers = boost_post_with_http_info(boost_post_request, opts)
|
|
@@ -30,9 +31,10 @@ module Zernio
|
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
# Boost post as ad
|
|
33
|
-
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType` and `adSetId` are Meta-only and return 400 on other platforms.
|
|
34
|
+
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType` and `adSetId` are Meta-only and return 400 on other platforms. **Retries.** Boosts are NOT idempotent and can take minutes when Meta requires re-hosting an Instagram video, so do not retry on client timeout. Send an Idempotency-Key header to make retries safe: same key and body replays the original 201, and distinct keys always create distinct ads. Without the header, an identical request is treated as a retry: while one is in flight it returns 409, and within 10 minutes of a completed boost it returns the already-created ad instead of creating another. To intentionally duplicate an ad, send distinct Idempotency-Keys (or vary the body, e.g. the name).
|
|
34
35
|
# @param boost_post_request [BoostPostRequest]
|
|
35
36
|
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
36
38
|
# @return [Array<(UpdateAd200Response, Integer, Hash)>] UpdateAd200Response data, response status code and response headers
|
|
37
39
|
def boost_post_with_http_info(boost_post_request, opts = {})
|
|
38
40
|
if @api_client.config.debugging
|
|
@@ -42,6 +44,10 @@ module Zernio
|
|
|
42
44
|
if @api_client.config.client_side_validation && boost_post_request.nil?
|
|
43
45
|
fail ArgumentError, "Missing the required parameter 'boost_post_request' when calling AdCampaignsApi.boost_post"
|
|
44
46
|
end
|
|
47
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
48
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AdCampaignsApi.boost_post, the character length must be smaller than or equal to 255.'
|
|
49
|
+
end
|
|
50
|
+
|
|
45
51
|
# resource path
|
|
46
52
|
local_var_path = '/v1/ads/boost'
|
|
47
53
|
|
|
@@ -57,6 +63,7 @@ module Zernio
|
|
|
57
63
|
if !content_type.nil?
|
|
58
64
|
header_params['Content-Type'] = content_type
|
|
59
65
|
end
|
|
66
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
60
67
|
|
|
61
68
|
# form parameters
|
|
62
69
|
form_params = opts[:form_params] || {}
|
|
@@ -830,12 +837,14 @@ module Zernio
|
|
|
830
837
|
# @option opts [String] :account_id Social account ID
|
|
831
838
|
# @option opts [String] :profile_id Profile ID
|
|
832
839
|
# @option opts [String] :campaign_id Restrict the tree to a single campaign by its platform campaign id (the id the platform assigns, e.g. Meta's numeric campaign id). Filters the campaign set itself, so it works regardless of account size and pagination — pass this when you already hold a campaign id instead of paging the tree to find it. Mirrors the `campaignId` filter on GET /v1/ads.
|
|
833
|
-
# @option opts [Date] :from_date Start of the METRICS date range (YYYY-MM-DD).
|
|
840
|
+
# @option opts [Date] :from_date Start of the METRICS date range (YYYY-MM-DD). On its own it affects only the spend/impression numbers overlaid on each node, not which campaigns are returned — pass `hasDelivery` or `minSpend` to also filter the campaign set to this window. Defaults to 90 days ago.
|
|
834
841
|
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
842
|
+
# @option opts [Boolean] :has_delivery Return only campaigns that delivered between `fromDate` and `toDate` — spend above zero, or impressions served at zero spend. Unlike `status`, which reads a campaign's CURRENT state, this filters on what happened inside the window, so a campaign that spent then and is paused today is still returned. Filters the campaign set itself, so `pagination.total` counts only matching campaigns.
|
|
843
|
+
# @option opts [Float] :min_spend Return only campaigns whose spend between `fromDate` and `toDate` reaches this amount. Expressed in each campaign's OWN currency (the `currency` field on the campaign node): spend is stored per ad account in its native currency and one response can span several. Implies `hasDelivery`; `minSpend=0` applies no filter.
|
|
835
844
|
# @option opts [String] :sort Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end. (default to 'newest')
|
|
836
845
|
# @option opts [Integer] :time_increment Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except `reach` on Meta and TikTok: the range total is the platform's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
|
|
837
846
|
# @option opts [String] :daily_level Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset. (default to 'campaign')
|
|
838
|
-
# @return [
|
|
847
|
+
# @return [AdTreeResponse]
|
|
839
848
|
def get_ad_tree(opts = {})
|
|
840
849
|
data, _status_code, _headers = get_ad_tree_with_http_info(opts)
|
|
841
850
|
data
|
|
@@ -854,12 +863,14 @@ module Zernio
|
|
|
854
863
|
# @option opts [String] :account_id Social account ID
|
|
855
864
|
# @option opts [String] :profile_id Profile ID
|
|
856
865
|
# @option opts [String] :campaign_id Restrict the tree to a single campaign by its platform campaign id (the id the platform assigns, e.g. Meta's numeric campaign id). Filters the campaign set itself, so it works regardless of account size and pagination — pass this when you already hold a campaign id instead of paging the tree to find it. Mirrors the `campaignId` filter on GET /v1/ads.
|
|
857
|
-
# @option opts [Date] :from_date Start of the METRICS date range (YYYY-MM-DD).
|
|
866
|
+
# @option opts [Date] :from_date Start of the METRICS date range (YYYY-MM-DD). On its own it affects only the spend/impression numbers overlaid on each node, not which campaigns are returned — pass `hasDelivery` or `minSpend` to also filter the campaign set to this window. Defaults to 90 days ago.
|
|
858
867
|
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
868
|
+
# @option opts [Boolean] :has_delivery Return only campaigns that delivered between `fromDate` and `toDate` — spend above zero, or impressions served at zero spend. Unlike `status`, which reads a campaign's CURRENT state, this filters on what happened inside the window, so a campaign that spent then and is paused today is still returned. Filters the campaign set itself, so `pagination.total` counts only matching campaigns.
|
|
869
|
+
# @option opts [Float] :min_spend Return only campaigns whose spend between `fromDate` and `toDate` reaches this amount. Expressed in each campaign's OWN currency (the `currency` field on the campaign node): spend is stored per ad account in its native currency and one response can span several. Implies `hasDelivery`; `minSpend=0` applies no filter.
|
|
859
870
|
# @option opts [String] :sort Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end. (default to 'newest')
|
|
860
871
|
# @option opts [Integer] :time_increment Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except `reach` on Meta and TikTok: the range total is the platform's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
|
|
861
872
|
# @option opts [String] :daily_level Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset. (default to 'campaign')
|
|
862
|
-
# @return [Array<(
|
|
873
|
+
# @return [Array<(AdTreeResponse, Integer, Hash)>] AdTreeResponse data, response status code and response headers
|
|
863
874
|
def get_ad_tree_with_http_info(opts = {})
|
|
864
875
|
if @api_client.config.debugging
|
|
865
876
|
@api_client.config.logger.debug 'Calling API: AdCampaignsApi.get_ad_tree ...'
|
|
@@ -884,6 +895,10 @@ module Zernio
|
|
|
884
895
|
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
885
896
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
886
897
|
end
|
|
898
|
+
if @api_client.config.client_side_validation && !opts[:'min_spend'].nil? && opts[:'min_spend'] < 0
|
|
899
|
+
fail ArgumentError, 'invalid value for "opts[:"min_spend"]" when calling AdCampaignsApi.get_ad_tree, must be greater than or equal to 0.'
|
|
900
|
+
end
|
|
901
|
+
|
|
887
902
|
allowable_values = ["newest", "oldest", "spend_desc", "spend_asc"]
|
|
888
903
|
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
889
904
|
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
@@ -913,6 +928,8 @@ module Zernio
|
|
|
913
928
|
query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
|
|
914
929
|
query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil?
|
|
915
930
|
query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil?
|
|
931
|
+
query_params[:'hasDelivery'] = opts[:'has_delivery'] if !opts[:'has_delivery'].nil?
|
|
932
|
+
query_params[:'minSpend'] = opts[:'min_spend'] if !opts[:'min_spend'].nil?
|
|
916
933
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
917
934
|
query_params[:'timeIncrement'] = opts[:'time_increment'] if !opts[:'time_increment'].nil?
|
|
918
935
|
query_params[:'dailyLevel'] = opts[:'daily_level'] if !opts[:'daily_level'].nil?
|
|
@@ -929,7 +946,7 @@ module Zernio
|
|
|
929
946
|
post_body = opts[:debug_body]
|
|
930
947
|
|
|
931
948
|
# return_type
|
|
932
|
-
return_type = opts[:debug_return_type] || '
|
|
949
|
+
return_type = opts[:debug_return_type] || 'AdTreeResponse'
|
|
933
950
|
|
|
934
951
|
# auth_names
|
|
935
952
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -959,7 +976,7 @@ module Zernio
|
|
|
959
976
|
# @option opts [Date] :from_date Inclusive start of metrics range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
960
977
|
# @option opts [Date] :to_date Inclusive end of metrics range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
961
978
|
# @option opts [String] :platform Restrict to one platform.
|
|
962
|
-
# @return [
|
|
979
|
+
# @return [AdsTimelineResponse]
|
|
963
980
|
def get_ads_timeline(account_id, opts = {})
|
|
964
981
|
data, _status_code, _headers = get_ads_timeline_with_http_info(account_id, opts)
|
|
965
982
|
data
|
|
@@ -973,7 +990,7 @@ module Zernio
|
|
|
973
990
|
# @option opts [Date] :from_date Inclusive start of metrics range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
974
991
|
# @option opts [Date] :to_date Inclusive end of metrics range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
975
992
|
# @option opts [String] :platform Restrict to one platform.
|
|
976
|
-
# @return [Array<(
|
|
993
|
+
# @return [Array<(AdsTimelineResponse, Integer, Hash)>] AdsTimelineResponse data, response status code and response headers
|
|
977
994
|
def get_ads_timeline_with_http_info(account_id, opts = {})
|
|
978
995
|
if @api_client.config.debugging
|
|
979
996
|
@api_client.config.logger.debug 'Calling API: AdCampaignsApi.get_ads_timeline ...'
|
|
@@ -1009,7 +1026,7 @@ module Zernio
|
|
|
1009
1026
|
post_body = opts[:debug_body]
|
|
1010
1027
|
|
|
1011
1028
|
# return_type
|
|
1012
|
-
return_type = opts[:debug_return_type] || '
|
|
1029
|
+
return_type = opts[:debug_return_type] || 'AdsTimelineResponse'
|
|
1013
1030
|
|
|
1014
1031
|
# auth_names
|
|
1015
1032
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -1046,6 +1063,8 @@ module Zernio
|
|
|
1046
1063
|
# @option opts [String] :profile_id Profile ID
|
|
1047
1064
|
# @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD, inclusive). Defaults to 90 days ago when both date params are omitted.
|
|
1048
1065
|
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD, inclusive). Defaults to today. Max 730-day range.
|
|
1066
|
+
# @option opts [Boolean] :has_delivery Return only campaigns that delivered between `fromDate` and `toDate` — spend above zero, or impressions served at zero spend. Unlike `status`, which reads a campaign's CURRENT state, this filters on what happened inside the window. Filters the campaign set itself, so `pagination.total` counts only matching campaigns. Mirrors the same filter on /v1/ads/tree.
|
|
1067
|
+
# @option opts [Float] :min_spend Return only campaigns whose spend between `fromDate` and `toDate` reaches this amount, in each campaign's OWN currency (the `currency` field on the campaign). Implies `hasDelivery`; `minSpend=0` applies no filter. Mirrors the same filter on /v1/ads/tree.
|
|
1049
1068
|
# @return [ListAdCampaigns200Response]
|
|
1050
1069
|
def list_ad_campaigns(opts = {})
|
|
1051
1070
|
data, _status_code, _headers = list_ad_campaigns_with_http_info(opts)
|
|
@@ -1067,6 +1086,8 @@ module Zernio
|
|
|
1067
1086
|
# @option opts [String] :profile_id Profile ID
|
|
1068
1087
|
# @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD, inclusive). Defaults to 90 days ago when both date params are omitted.
|
|
1069
1088
|
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD, inclusive). Defaults to today. Max 730-day range.
|
|
1089
|
+
# @option opts [Boolean] :has_delivery Return only campaigns that delivered between `fromDate` and `toDate` — spend above zero, or impressions served at zero spend. Unlike `status`, which reads a campaign's CURRENT state, this filters on what happened inside the window. Filters the campaign set itself, so `pagination.total` counts only matching campaigns. Mirrors the same filter on /v1/ads/tree.
|
|
1090
|
+
# @option opts [Float] :min_spend Return only campaigns whose spend between `fromDate` and `toDate` reaches this amount, in each campaign's OWN currency (the `currency` field on the campaign). Implies `hasDelivery`; `minSpend=0` applies no filter. Mirrors the same filter on /v1/ads/tree.
|
|
1070
1091
|
# @return [Array<(ListAdCampaigns200Response, Integer, Hash)>] ListAdCampaigns200Response data, response status code and response headers
|
|
1071
1092
|
def list_ad_campaigns_with_http_info(opts = {})
|
|
1072
1093
|
if @api_client.config.debugging
|
|
@@ -1092,6 +1113,10 @@ module Zernio
|
|
|
1092
1113
|
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
1093
1114
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
1094
1115
|
end
|
|
1116
|
+
if @api_client.config.client_side_validation && !opts[:'min_spend'].nil? && opts[:'min_spend'] < 0
|
|
1117
|
+
fail ArgumentError, 'invalid value for "opts[:"min_spend"]" when calling AdCampaignsApi.list_ad_campaigns, must be greater than or equal to 0.'
|
|
1118
|
+
end
|
|
1119
|
+
|
|
1095
1120
|
# resource path
|
|
1096
1121
|
local_var_path = '/v1/ads/campaigns'
|
|
1097
1122
|
|
|
@@ -1109,6 +1134,8 @@ module Zernio
|
|
|
1109
1134
|
query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].nil?
|
|
1110
1135
|
query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil?
|
|
1111
1136
|
query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil?
|
|
1137
|
+
query_params[:'hasDelivery'] = opts[:'has_delivery'] if !opts[:'has_delivery'].nil?
|
|
1138
|
+
query_params[:'minSpend'] = opts[:'min_spend'] if !opts[:'min_spend'].nil?
|
|
1112
1139
|
|
|
1113
1140
|
# header parameters
|
|
1114
1141
|
header_params = opts[:header_params] || {}
|
|
@@ -1276,7 +1303,7 @@ module Zernio
|
|
|
1276
1303
|
# @option opts [String] :effective_instagram_media_id Instagram media ID of the boosted post (Meta `effective_instagram_media_id`). Use to map a Business-Manager-visible IG post back to the Zernio ad.
|
|
1277
1304
|
# @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
1278
1305
|
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
1279
|
-
# @return [
|
|
1306
|
+
# @return [AdsListResponse]
|
|
1280
1307
|
def list_ads(opts = {})
|
|
1281
1308
|
data, _status_code, _headers = list_ads_with_http_info(opts)
|
|
1282
1309
|
data
|
|
@@ -1300,7 +1327,7 @@ module Zernio
|
|
|
1300
1327
|
# @option opts [String] :effective_instagram_media_id Instagram media ID of the boosted post (Meta `effective_instagram_media_id`). Use to map a Business-Manager-visible IG post back to the Zernio ad.
|
|
1301
1328
|
# @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
1302
1329
|
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
1303
|
-
# @return [Array<(
|
|
1330
|
+
# @return [Array<(AdsListResponse, Integer, Hash)>] AdsListResponse data, response status code and response headers
|
|
1304
1331
|
def list_ads_with_http_info(opts = {})
|
|
1305
1332
|
if @api_client.config.debugging
|
|
1306
1333
|
@api_client.config.logger.debug 'Calling API: AdCampaignsApi.list_ads ...'
|
|
@@ -1358,7 +1385,7 @@ module Zernio
|
|
|
1358
1385
|
post_body = opts[:debug_body]
|
|
1359
1386
|
|
|
1360
1387
|
# return_type
|
|
1361
|
-
return_type = opts[:debug_return_type] || '
|
|
1388
|
+
return_type = opts[:debug_return_type] || 'AdsListResponse'
|
|
1362
1389
|
|
|
1363
1390
|
# auth_names
|
|
1364
1391
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -1529,7 +1556,7 @@ module Zernio
|
|
|
1529
1556
|
end
|
|
1530
1557
|
|
|
1531
1558
|
# Pause or resume a campaign
|
|
1532
|
-
#
|
|
1559
|
+
# Writes the campaign's own on/off switch, then lets the platform cascade delivery to its ad sets and ads. Makes one platform API call, not one per ad. The switch is always written, whatever delivery status the ads underneath report: an ad still in review does not block resuming its campaign. The echoed `status` is the confirmation that it landed. `updated` / `skipped` describe only the ads whose own stored status CHANGED alongside it, so `updated: 0` is a normal successful response, not a no-op. Ads are skipped when they are in a terminal status (rejected, completed, cancelled), already in the target state, or switched on but not yet delivering — the last group keeps its `pending_review` / `error` status until the platform reports what it became. `skippedReasons` names which case applies. On Meta this flips the campaign only. An ad set paused in its own right stays paused, so pair this with PUT /v1/ads/ad-sets/{adSetId}/status when you also need the ad set switched back on.
|
|
1533
1560
|
# @param campaign_id [String] Platform campaign ID
|
|
1534
1561
|
# @param update_ad_campaign_status_request [UpdateAdCampaignStatusRequest]
|
|
1535
1562
|
# @param [Hash] opts the optional parameters
|
|
@@ -1540,7 +1567,7 @@ module Zernio
|
|
|
1540
1567
|
end
|
|
1541
1568
|
|
|
1542
1569
|
# Pause or resume a campaign
|
|
1543
|
-
#
|
|
1570
|
+
# Writes the campaign's own on/off switch, then lets the platform cascade delivery to its ad sets and ads. Makes one platform API call, not one per ad. The switch is always written, whatever delivery status the ads underneath report: an ad still in review does not block resuming its campaign. The echoed `status` is the confirmation that it landed. `updated` / `skipped` describe only the ads whose own stored status CHANGED alongside it, so `updated: 0` is a normal successful response, not a no-op. Ads are skipped when they are in a terminal status (rejected, completed, cancelled), already in the target state, or switched on but not yet delivering — the last group keeps its `pending_review` / `error` status until the platform reports what it became. `skippedReasons` names which case applies. On Meta this flips the campaign only. An ad set paused in its own right stays paused, so pair this with PUT /v1/ads/ad-sets/{adSetId}/status when you also need the ad set switched back on.
|
|
1544
1571
|
# @param campaign_id [String] Platform campaign ID
|
|
1545
1572
|
# @param update_ad_campaign_status_request [UpdateAdCampaignStatusRequest]
|
|
1546
1573
|
# @param [Hash] opts the optional parameters
|
|
@@ -1677,7 +1704,7 @@ module Zernio
|
|
|
1677
1704
|
end
|
|
1678
1705
|
|
|
1679
1706
|
# Pause or resume a single ad set
|
|
1680
|
-
# Ad-set-scoped pause/resume (doesn't touch sibling ad sets). Thin wrapper over PUT /v1/ads/ad-sets/{adSetId} for callers that only want the status toggle and prefer a symmetric URL to /v1/ads/campaigns/{campaignId}/status.
|
|
1707
|
+
# Ad-set-scoped pause/resume (doesn't touch sibling ad sets). Thin wrapper over PUT /v1/ads/ad-sets/{adSetId} for callers that only want the status toggle and prefer a symmetric URL to /v1/ads/campaigns/{campaignId}/status. On Meta and LinkedIn this writes the ad set's own on/off switch (Meta: `configured_status`), whatever delivery status its ads report — an ad still in review does not block resuming its ad set. The echoed `status` is the confirmation that it landed. Where the platform has no ad-set switch (TikTok and others) the toggle is emulated by flipping the child ads; a call with no actionable ad then writes nothing and returns a `message` with no `status`. `updated` / `skipped` describe only the ads whose own stored status CHANGED alongside the switch, so `updated: 0` is a normal successful response. See `skippedReasons` for which of the three cases applies (terminal, already in the target state, or switched on but not yet delivering). A campaign created paused needs its campaign resumed as well: pair this with PUT /v1/ads/campaigns/{campaignId}/status.
|
|
1681
1708
|
# @param ad_set_id [String] Platform ad set ID
|
|
1682
1709
|
# @param update_ad_campaign_status_request [UpdateAdCampaignStatusRequest]
|
|
1683
1710
|
# @param [Hash] opts the optional parameters
|
|
@@ -1688,7 +1715,7 @@ module Zernio
|
|
|
1688
1715
|
end
|
|
1689
1716
|
|
|
1690
1717
|
# Pause or resume a single ad set
|
|
1691
|
-
# Ad-set-scoped pause/resume (doesn't touch sibling ad sets). Thin wrapper over PUT /v1/ads/ad-sets/{adSetId} for callers that only want the status toggle and prefer a symmetric URL to /v1/ads/campaigns/{campaignId}/status.
|
|
1718
|
+
# Ad-set-scoped pause/resume (doesn't touch sibling ad sets). Thin wrapper over PUT /v1/ads/ad-sets/{adSetId} for callers that only want the status toggle and prefer a symmetric URL to /v1/ads/campaigns/{campaignId}/status. On Meta and LinkedIn this writes the ad set's own on/off switch (Meta: `configured_status`), whatever delivery status its ads report — an ad still in review does not block resuming its ad set. The echoed `status` is the confirmation that it landed. Where the platform has no ad-set switch (TikTok and others) the toggle is emulated by flipping the child ads; a call with no actionable ad then writes nothing and returns a `message` with no `status`. `updated` / `skipped` describe only the ads whose own stored status CHANGED alongside the switch, so `updated: 0` is a normal successful response. See `skippedReasons` for which of the three cases applies (terminal, already in the target state, or switched on but not yet delivering). A campaign created paused needs its campaign resumed as well: pair this with PUT /v1/ads/campaigns/{campaignId}/status.
|
|
1692
1719
|
# @param ad_set_id [String] Platform ad set ID
|
|
1693
1720
|
# @param update_ad_campaign_status_request [UpdateAdCampaignStatusRequest]
|
|
1694
1721
|
# @param [Hash] opts the optional parameters
|
|
@@ -230,7 +230,7 @@ module Zernio
|
|
|
230
230
|
# @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
231
231
|
# @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
232
232
|
# @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region. **TikTok**: gender, age, country_code, platform, ac, language. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot `value` plus a resolved `name`. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
|
|
233
|
-
# @return [
|
|
233
|
+
# @return [AdAnalyticsResponse]
|
|
234
234
|
def get_ad_analytics(ad_id, opts = {})
|
|
235
235
|
data, _status_code, _headers = get_ad_analytics_with_http_info(ad_id, opts)
|
|
236
236
|
data
|
|
@@ -243,7 +243,7 @@ module Zernio
|
|
|
243
243
|
# @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
244
244
|
# @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
245
245
|
# @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region. **TikTok**: gender, age, country_code, platform, ac, language. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot `value` plus a resolved `name`. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
|
|
246
|
-
# @return [Array<(
|
|
246
|
+
# @return [Array<(AdAnalyticsResponse, Integer, Hash)>] AdAnalyticsResponse data, response status code and response headers
|
|
247
247
|
def get_ad_analytics_with_http_info(ad_id, opts = {})
|
|
248
248
|
if @api_client.config.debugging
|
|
249
249
|
@api_client.config.logger.debug 'Calling API: AdInsightsApi.get_ad_analytics ...'
|
|
@@ -273,7 +273,7 @@ module Zernio
|
|
|
273
273
|
post_body = opts[:debug_body]
|
|
274
274
|
|
|
275
275
|
# return_type
|
|
276
|
-
return_type = opts[:debug_return_type] || '
|
|
276
|
+
return_type = opts[:debug_return_type] || 'AdAnalyticsResponse'
|
|
277
277
|
|
|
278
278
|
# auth_names
|
|
279
279
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -469,7 +469,7 @@ module Zernio
|
|
|
469
469
|
# @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
470
470
|
# @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
471
471
|
# @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region, platform_position, impression_device, video_asset, image_asset, body_asset, title_asset. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot `value` plus a resolved `name`. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
|
|
472
|
-
# @return [
|
|
472
|
+
# @return [CampaignAnalyticsResponse]
|
|
473
473
|
def get_campaign_analytics(campaign_id, opts = {})
|
|
474
474
|
data, _status_code, _headers = get_campaign_analytics_with_http_info(campaign_id, opts)
|
|
475
475
|
data
|
|
@@ -483,7 +483,7 @@ module Zernio
|
|
|
483
483
|
# @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
484
484
|
# @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
485
485
|
# @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region, platform_position, impression_device, video_asset, image_asset, body_asset, title_asset. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot `value` plus a resolved `name`. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
|
|
486
|
-
# @return [Array<(
|
|
486
|
+
# @return [Array<(CampaignAnalyticsResponse, Integer, Hash)>] CampaignAnalyticsResponse data, response status code and response headers
|
|
487
487
|
def get_campaign_analytics_with_http_info(campaign_id, opts = {})
|
|
488
488
|
if @api_client.config.debugging
|
|
489
489
|
@api_client.config.logger.debug 'Calling API: AdInsightsApi.get_campaign_analytics ...'
|
|
@@ -514,7 +514,7 @@ module Zernio
|
|
|
514
514
|
post_body = opts[:debug_body]
|
|
515
515
|
|
|
516
516
|
# return_type
|
|
517
|
-
return_type = opts[:debug_return_type] || '
|
|
517
|
+
return_type = opts[:debug_return_type] || 'CampaignAnalyticsResponse'
|
|
518
518
|
|
|
519
519
|
# auth_names
|
|
520
520
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -536,6 +536,171 @@ module Zernio
|
|
|
536
536
|
return data, status_code, headers
|
|
537
537
|
end
|
|
538
538
|
|
|
539
|
+
# Conversations of a Local Services lead
|
|
540
|
+
# Conversation entries of one Local Services lead: phone calls (duration, recording URL) and messages (text, attachment URLs), oldest first. Read live from `local_services_lead_conversation`, always scoped to a single lead. Call-recording URLs require read access on the Google Ads account. Draws on the shared Google Ads operations budget.
|
|
541
|
+
# @param lead_id [String] Numeric lead id from /v1/ads/local-services/leads.
|
|
542
|
+
# @param account_id [String] Google ads SocialAccount id.
|
|
543
|
+
# @param [Hash] opts the optional parameters
|
|
544
|
+
# @option opts [String] :customer_id Numeric Google Ads customer id (no dashes). Defaults to the account's connected customer.
|
|
545
|
+
# @option opts [String] :page_token Cursor from paging.nextPageToken of the previous page.
|
|
546
|
+
# @return [ListLocalServicesLeadConversations200Response]
|
|
547
|
+
def list_local_services_lead_conversations(lead_id, account_id, opts = {})
|
|
548
|
+
data, _status_code, _headers = list_local_services_lead_conversations_with_http_info(lead_id, account_id, opts)
|
|
549
|
+
data
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
# Conversations of a Local Services lead
|
|
553
|
+
# Conversation entries of one Local Services lead: phone calls (duration, recording URL) and messages (text, attachment URLs), oldest first. Read live from `local_services_lead_conversation`, always scoped to a single lead. Call-recording URLs require read access on the Google Ads account. Draws on the shared Google Ads operations budget.
|
|
554
|
+
# @param lead_id [String] Numeric lead id from /v1/ads/local-services/leads.
|
|
555
|
+
# @param account_id [String] Google ads SocialAccount id.
|
|
556
|
+
# @param [Hash] opts the optional parameters
|
|
557
|
+
# @option opts [String] :customer_id Numeric Google Ads customer id (no dashes). Defaults to the account's connected customer.
|
|
558
|
+
# @option opts [String] :page_token Cursor from paging.nextPageToken of the previous page.
|
|
559
|
+
# @return [Array<(ListLocalServicesLeadConversations200Response, Integer, Hash)>] ListLocalServicesLeadConversations200Response data, response status code and response headers
|
|
560
|
+
def list_local_services_lead_conversations_with_http_info(lead_id, account_id, opts = {})
|
|
561
|
+
if @api_client.config.debugging
|
|
562
|
+
@api_client.config.logger.debug 'Calling API: AdInsightsApi.list_local_services_lead_conversations ...'
|
|
563
|
+
end
|
|
564
|
+
# verify the required parameter 'lead_id' is set
|
|
565
|
+
if @api_client.config.client_side_validation && lead_id.nil?
|
|
566
|
+
fail ArgumentError, "Missing the required parameter 'lead_id' when calling AdInsightsApi.list_local_services_lead_conversations"
|
|
567
|
+
end
|
|
568
|
+
# verify the required parameter 'account_id' is set
|
|
569
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
570
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdInsightsApi.list_local_services_lead_conversations"
|
|
571
|
+
end
|
|
572
|
+
# resource path
|
|
573
|
+
local_var_path = '/v1/ads/local-services/leads/{leadId}/conversations'.sub('{' + 'leadId' + '}', CGI.escape(lead_id.to_s))
|
|
574
|
+
|
|
575
|
+
# query parameters
|
|
576
|
+
query_params = opts[:query_params] || {}
|
|
577
|
+
query_params[:'accountId'] = account_id
|
|
578
|
+
query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
|
|
579
|
+
query_params[:'pageToken'] = opts[:'page_token'] if !opts[:'page_token'].nil?
|
|
580
|
+
|
|
581
|
+
# header parameters
|
|
582
|
+
header_params = opts[:header_params] || {}
|
|
583
|
+
# HTTP header 'Accept' (if needed)
|
|
584
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
585
|
+
|
|
586
|
+
# form parameters
|
|
587
|
+
form_params = opts[:form_params] || {}
|
|
588
|
+
|
|
589
|
+
# http body (model)
|
|
590
|
+
post_body = opts[:debug_body]
|
|
591
|
+
|
|
592
|
+
# return_type
|
|
593
|
+
return_type = opts[:debug_return_type] || 'ListLocalServicesLeadConversations200Response'
|
|
594
|
+
|
|
595
|
+
# auth_names
|
|
596
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
597
|
+
|
|
598
|
+
new_options = opts.merge(
|
|
599
|
+
:operation => :"AdInsightsApi.list_local_services_lead_conversations",
|
|
600
|
+
:header_params => header_params,
|
|
601
|
+
:query_params => query_params,
|
|
602
|
+
:form_params => form_params,
|
|
603
|
+
:body => post_body,
|
|
604
|
+
:auth_names => auth_names,
|
|
605
|
+
:return_type => return_type
|
|
606
|
+
)
|
|
607
|
+
|
|
608
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
609
|
+
if @api_client.config.debugging
|
|
610
|
+
@api_client.config.logger.debug "API called: AdInsightsApi#list_local_services_lead_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
611
|
+
end
|
|
612
|
+
return data, status_code, headers
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
# Google Local Services Ads leads
|
|
616
|
+
# Leads generated by Local Services Ads (phone calls, messages, bookings), read live from Google's `local_services_lead` resource, newest first. No persistence: Google is the source of truth and lead/credit statuses keep changing server-side. Google never returns healthcare-category leads, and `WIPED_OUT` leads arrive with contact erased (`contact` is null). Draws on the shared Google Ads operations budget.
|
|
617
|
+
# @param account_id [String] Google ads SocialAccount id.
|
|
618
|
+
# @param [Hash] opts the optional parameters
|
|
619
|
+
# @option opts [String] :customer_id Numeric Google Ads customer id (no dashes). Defaults to the account's connected customer.
|
|
620
|
+
# @option opts [Date] :from_date Leads created at/after this day.
|
|
621
|
+
# @option opts [Date] :to_date Leads created at/before this day.
|
|
622
|
+
# @option opts [String] :lead_type
|
|
623
|
+
# @option opts [String] :lead_status Google LocalServicesLeadStatus enum value (e.g. NEW, BOOKED, WIPED_OUT).
|
|
624
|
+
# @option opts [Boolean] :charged_only true = only leads Google charged for.
|
|
625
|
+
# @option opts [String] :page_token Cursor from paging.nextPageToken of the previous page.
|
|
626
|
+
# @return [ListLocalServicesLeads200Response]
|
|
627
|
+
def list_local_services_leads(account_id, opts = {})
|
|
628
|
+
data, _status_code, _headers = list_local_services_leads_with_http_info(account_id, opts)
|
|
629
|
+
data
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
# Google Local Services Ads leads
|
|
633
|
+
# Leads generated by Local Services Ads (phone calls, messages, bookings), read live from Google's `local_services_lead` resource, newest first. No persistence: Google is the source of truth and lead/credit statuses keep changing server-side. Google never returns healthcare-category leads, and `WIPED_OUT` leads arrive with contact erased (`contact` is null). Draws on the shared Google Ads operations budget.
|
|
634
|
+
# @param account_id [String] Google ads SocialAccount id.
|
|
635
|
+
# @param [Hash] opts the optional parameters
|
|
636
|
+
# @option opts [String] :customer_id Numeric Google Ads customer id (no dashes). Defaults to the account's connected customer.
|
|
637
|
+
# @option opts [Date] :from_date Leads created at/after this day.
|
|
638
|
+
# @option opts [Date] :to_date Leads created at/before this day.
|
|
639
|
+
# @option opts [String] :lead_type
|
|
640
|
+
# @option opts [String] :lead_status Google LocalServicesLeadStatus enum value (e.g. NEW, BOOKED, WIPED_OUT).
|
|
641
|
+
# @option opts [Boolean] :charged_only true = only leads Google charged for.
|
|
642
|
+
# @option opts [String] :page_token Cursor from paging.nextPageToken of the previous page.
|
|
643
|
+
# @return [Array<(ListLocalServicesLeads200Response, Integer, Hash)>] ListLocalServicesLeads200Response data, response status code and response headers
|
|
644
|
+
def list_local_services_leads_with_http_info(account_id, opts = {})
|
|
645
|
+
if @api_client.config.debugging
|
|
646
|
+
@api_client.config.logger.debug 'Calling API: AdInsightsApi.list_local_services_leads ...'
|
|
647
|
+
end
|
|
648
|
+
# verify the required parameter 'account_id' is set
|
|
649
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
650
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdInsightsApi.list_local_services_leads"
|
|
651
|
+
end
|
|
652
|
+
allowable_values = ["PHONE_CALL", "MESSAGE", "BOOKING"]
|
|
653
|
+
if @api_client.config.client_side_validation && opts[:'lead_type'] && !allowable_values.include?(opts[:'lead_type'])
|
|
654
|
+
fail ArgumentError, "invalid value for \"lead_type\", must be one of #{allowable_values}"
|
|
655
|
+
end
|
|
656
|
+
# resource path
|
|
657
|
+
local_var_path = '/v1/ads/local-services/leads'
|
|
658
|
+
|
|
659
|
+
# query parameters
|
|
660
|
+
query_params = opts[:query_params] || {}
|
|
661
|
+
query_params[:'accountId'] = account_id
|
|
662
|
+
query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
|
|
663
|
+
query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil?
|
|
664
|
+
query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil?
|
|
665
|
+
query_params[:'leadType'] = opts[:'lead_type'] if !opts[:'lead_type'].nil?
|
|
666
|
+
query_params[:'leadStatus'] = opts[:'lead_status'] if !opts[:'lead_status'].nil?
|
|
667
|
+
query_params[:'chargedOnly'] = opts[:'charged_only'] if !opts[:'charged_only'].nil?
|
|
668
|
+
query_params[:'pageToken'] = opts[:'page_token'] if !opts[:'page_token'].nil?
|
|
669
|
+
|
|
670
|
+
# header parameters
|
|
671
|
+
header_params = opts[:header_params] || {}
|
|
672
|
+
# HTTP header 'Accept' (if needed)
|
|
673
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
674
|
+
|
|
675
|
+
# form parameters
|
|
676
|
+
form_params = opts[:form_params] || {}
|
|
677
|
+
|
|
678
|
+
# http body (model)
|
|
679
|
+
post_body = opts[:debug_body]
|
|
680
|
+
|
|
681
|
+
# return_type
|
|
682
|
+
return_type = opts[:debug_return_type] || 'ListLocalServicesLeads200Response'
|
|
683
|
+
|
|
684
|
+
# auth_names
|
|
685
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
686
|
+
|
|
687
|
+
new_options = opts.merge(
|
|
688
|
+
:operation => :"AdInsightsApi.list_local_services_leads",
|
|
689
|
+
:header_params => header_params,
|
|
690
|
+
:query_params => query_params,
|
|
691
|
+
:form_params => form_params,
|
|
692
|
+
:body => post_body,
|
|
693
|
+
:auth_names => auth_names,
|
|
694
|
+
:return_type => return_type
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
698
|
+
if @api_client.config.debugging
|
|
699
|
+
@api_client.config.logger.debug "API called: AdInsightsApi#list_local_services_leads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
700
|
+
end
|
|
701
|
+
return data, status_code, headers
|
|
702
|
+
end
|
|
703
|
+
|
|
539
704
|
# Flexible live insights query
|
|
540
705
|
# Live, flexible insights query. The account's platform picks the contract: **Meta (facebook/instagram)**: forwards caller-chosen `fields`, `breakdowns` and `filtering` to any Meta insights node and returns Meta's rows verbatim. `objectId` (required) selects the node; `level` sets row granularity. Semantic validation is Meta's: an unknown field or invalid breakdown combination returns a 400 carrying Meta's message. For long ranges or agency-scale accounts prefer the async variant (POST /v1/ads/insights/reports). **Google Ads (googleads)**: raw GAQL passthrough. Send any read-only GAQL SELECT via `query` (campaign/keyword/search-term/geo/demographic/asset/shopping resources, `change_event`, any `segments.*`) and rows come back verbatim (camelCase, counters as strings). Results are paged at a fixed 10,000 rows; follow `paging.nextPageToken` with `pageToken`. `customerId` is only needed when the connection has several Google Ads accounts. Semantic validation is Google's: an invalid query returns a 400 carrying Google's message (note: selecting `segments.date` requires a finite date filter).
|
|
541
706
|
# @param account_id [String] Zernio SocialAccount id (posting or ads variant); its platform selects the Meta or Google contract.
|
|
@@ -295,12 +295,12 @@ module Zernio
|
|
|
295
295
|
end
|
|
296
296
|
|
|
297
297
|
# Search targeting options
|
|
298
|
-
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
298
|
+
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
299
299
|
# @param account_id [String] Social account ID (a connected account on the target ad platform).
|
|
300
300
|
# @param q [String] Search query. For geo, the locality name only (no region/country suffix).
|
|
301
301
|
# @param [Hash] opts the optional parameters
|
|
302
302
|
# @option opts [String] :dimension What to search. `geo` resolves locations (scope further with `geoType`), `interest`/`behavior` resolve audience entities, `income` resolves income-tier options. Defaults to `interest` for backward compatibility with the deprecated /v1/ads/interests alias. (default to 'interest')
|
|
303
|
-
# @option opts [String] :geo_type Only used when `dimension=geo`. The kind of location to resolve. Defaults to `city`. (default to 'city')
|
|
303
|
+
# @option opts [String] :geo_type Only used when `dimension=geo`. The kind of location to resolve. `all` searches every type in one relevance-ranked call. Defaults to `city`. (default to 'city')
|
|
304
304
|
# @option opts [String] :country_code ISO 3166-1 alpha-2 country code (e.g. NL) to scope a geo search.
|
|
305
305
|
# @option opts [Integer] :limit Maximum results to return. (default to 25)
|
|
306
306
|
# @return [SearchAdTargeting200Response]
|
|
@@ -310,12 +310,12 @@ module Zernio
|
|
|
310
310
|
end
|
|
311
311
|
|
|
312
312
|
# Search targeting options
|
|
313
|
-
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
313
|
+
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
314
314
|
# @param account_id [String] Social account ID (a connected account on the target ad platform).
|
|
315
315
|
# @param q [String] Search query. For geo, the locality name only (no region/country suffix).
|
|
316
316
|
# @param [Hash] opts the optional parameters
|
|
317
317
|
# @option opts [String] :dimension What to search. `geo` resolves locations (scope further with `geoType`), `interest`/`behavior` resolve audience entities, `income` resolves income-tier options. Defaults to `interest` for backward compatibility with the deprecated /v1/ads/interests alias. (default to 'interest')
|
|
318
|
-
# @option opts [String] :geo_type Only used when `dimension=geo`. The kind of location to resolve. Defaults to `city`. (default to 'city')
|
|
318
|
+
# @option opts [String] :geo_type Only used when `dimension=geo`. The kind of location to resolve. `all` searches every type in one relevance-ranked call. Defaults to `city`. (default to 'city')
|
|
319
319
|
# @option opts [String] :country_code ISO 3166-1 alpha-2 country code (e.g. NL) to scope a geo search.
|
|
320
320
|
# @option opts [Integer] :limit Maximum results to return. (default to 25)
|
|
321
321
|
# @return [Array<(SearchAdTargeting200Response, Integer, Hash)>] SearchAdTargeting200Response data, response status code and response headers
|
|
@@ -335,7 +335,7 @@ module Zernio
|
|
|
335
335
|
if @api_client.config.client_side_validation && opts[:'dimension'] && !allowable_values.include?(opts[:'dimension'])
|
|
336
336
|
fail ArgumentError, "invalid value for \"dimension\", must be one of #{allowable_values}"
|
|
337
337
|
end
|
|
338
|
-
allowable_values = ["country", "region", "city", "zip", "
|
|
338
|
+
allowable_values = ["all", "country", "region", "city", "subcity", "neighborhood", "place", "zip", "metro_area", "geo_market"]
|
|
339
339
|
if @api_client.config.client_side_validation && opts[:'geo_type'] && !allowable_values.include?(opts[:'geo_type'])
|
|
340
340
|
fail ArgumentError, "invalid value for \"geo_type\", must be one of #{allowable_values}"
|
|
341
341
|
end
|