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
|
@@ -62,12 +62,16 @@ module Zernio
|
|
|
62
62
|
# Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads accepts lifetime only (no daily-budget concept on the platform); sending daily returns 422. OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window.
|
|
63
63
|
attr_accessor :budget_type
|
|
64
64
|
|
|
65
|
-
# Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused
|
|
65
|
+
# Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused.
|
|
66
66
|
attr_accessor :status
|
|
67
67
|
|
|
68
|
+
# Meta only. Overrides `status` for the campaign level alone, so you can create a live campaign whose ad set and ad stay paused, or the reverse. Omitted, it follows `status`.
|
|
69
|
+
attr_accessor :campaign_status
|
|
70
|
+
|
|
68
71
|
# Meta only. Where the budget lives, which selects the Meta budget model: - `adset` (default): ABO (Ad-set Budget Optimization). The budget is set on the ad set. This is the back-compatible behaviour — omit this field to keep it. - `campaign`: CBO (Campaign Budget Optimization / Advantage Campaign Budget). The budget AND `bidStrategy` are set on the CAMPAIGN, and Meta distributes spend across ad sets automatically. Meta requires the budget at exactly one level, never both. Non-Meta platforms ignore this field. Ignored on the attach shape (`adSetId`), which inherits the existing budget.
|
|
69
72
|
attr_accessor :budget_level
|
|
70
73
|
|
|
74
|
+
# ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Meta only. Optional: Zernio resolves it from the ad account when omitted. The value selects the minor-unit exponent Zernio converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is).
|
|
71
75
|
attr_accessor :currency
|
|
72
76
|
|
|
73
77
|
# Required for Meta, Google, Pinterest, LinkedIn, and OpenAI Ads on legacy + attach shapes (skip for multi-creative — use `creatives[].headline`). Ignored for TikTok and X/Twitter. Max: Meta=255, Google=30, Pinterest=100, LinkedIn=400, OpenAI=50 (min 3). On LinkedIn this is the ad's headline (the bold text on the creative); for traffic ads it's the link card title. On OpenAI Ads this is the chat card's title.
|
|
@@ -101,7 +105,7 @@ module Zernio
|
|
|
101
105
|
# Meta-only. When present, switches to the multi-creative shape: creates 1 campaign + 1 ad set + N ads (one per entry here). Top-level `headline` / `body` / `imageUrl` / `linkUrl` / `callToAction` are ignored in this mode. Mutually exclusive with `adSetId`.
|
|
102
106
|
attr_accessor :creatives
|
|
103
107
|
|
|
104
|
-
# When present, switches to the attach shape: adds one new ad to this existing ad set without creating a new campaign. Budget, targeting, goal, schedule, AND bid strategy are inherited from the ad set on Meta — passing `bidStrategy` in attach mode returns 400. To change an existing ad set's bid, use `PUT /v1/ads/ad-sets/{adSetId}`. Mutually exclusive with `creatives[]`. The attached ad takes the full single-creative surface: `headline`/`body`/`description`/`callToAction` plus either `imageUrl`/`video` OR `placementAssets` (its own per-placement Feed/Story assets), and `leadGenFormId` when the target is a lead ad set (the parent must be ON_AD
|
|
108
|
+
# When present, switches to the attach shape: adds one new ad to this existing ad set without creating a new campaign. Budget, targeting, goal, schedule, AND bid strategy are inherited from the ad set on Meta — passing `bidStrategy` in attach mode returns 400. To change an existing ad set's bid, use `PUT /v1/ads/ad-sets/{adSetId}`. Mutually exclusive with `creatives[]`. The attached ad takes the full single-creative surface: `headline`/`body`/`description`/`callToAction` plus either `imageUrl`/`video` OR `placementAssets` (its own per-placement Feed/Story assets) OR `translations`/`defaultLocale` (its own per-locale asset feed, Meta only), and `leadGenFormId` when the target is a lead ad set (the parent must be ON_AD, true for ad sets created via goal `lead_generation`; Meta rejects a formless ad there, so pass the form on EVERY attached ad). This is the way to build N full ads sharing one ad set: create the first ad via the normal shape, then attach the rest one call each. Supported on Meta (facebook, instagram), TikTok, and LinkedIn. On TikTok the `adSetId` is the ad group ID; the new ad inherits the ad group's bid + budget + targeting. On LinkedIn the `adSetId` is the LinkedIn Campaign ID (numeric); we attach a new Creative to that Campaign, so the Campaign's `platformSpecificData` bidding, targeting, budget and schedule are inherited (passing those fields returns 400).
|
|
105
109
|
attr_accessor :ad_set_id
|
|
106
110
|
|
|
107
111
|
# Meta + LinkedIn. On Meta: add the new ad set under this EXISTING campaign instead of creating a new one (multi-ad-set audience testing). The new ad set's budget is matched to the campaign's mode automatically: for a CBO campaign (campaign-level budget) omit `budgetAmount`/`budgetType` — the campaign owns the budget; for an ABO campaign pass them (they go on the new ad set). On LinkedIn: create a new Campaign (and its Creative) under this EXISTING CampaignGroup. On failure only the entities we authored are cleaned up; the pre-existing parent is left untouched and is never (re)activated. Mutually exclusive with `adSetId` and `creatives[]`.
|
|
@@ -176,7 +180,7 @@ module Zernio
|
|
|
176
180
|
# Meta only. Ad-set start time (ISO 8601, e.g. \"2026-06-10T09:00:00Z\"), mapped to the ad set's `start_time`. When omitted the ad starts delivering immediately. For lifetime budgets Meta also requires `endDate`. (Same `schedule.startDate` semantics already available on `POST /v1/ads/boost`.)
|
|
177
181
|
attr_accessor :start_date
|
|
178
182
|
|
|
179
|
-
# Meta only. Override the Instagram account the ad is delivered as — pass an Instagram Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`. When omitted we
|
|
183
|
+
# Meta only. Override the Instagram account the ad is delivered as — pass an Instagram Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`. When omitted we use the Instagram actor Meta already runs the Page's other ads as, falling back to the Page's page-backed Instagram account. Useful when a Page has more than one eligible IG account.
|
|
180
184
|
attr_accessor :instagram_account_id
|
|
181
185
|
|
|
182
186
|
attr_accessor :dynamic_creative
|
|
@@ -187,7 +191,7 @@ module Zernio
|
|
|
187
191
|
# Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`.
|
|
188
192
|
attr_accessor :default_locale
|
|
189
193
|
|
|
190
|
-
# Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media — the \"Languages\" toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad's top-level copy is the DEFAULT shown to every locale you do NOT list, and it counts as one of the language variants. IMPORTANT, and the opposite of what you might expect: text does NOT inherit. Every entry must carry its own `headline`, `body` AND `description`, and all of them must be DISTINCT from each other and from the ad's top-level copy. Meta deduplicates identical strings inside the asset feed, so two locales sharing a string collapse into one asset and the create fails with a misleading \"Too few ... texts provided in asset creation\" (subcode 1885817) that names a field which is actually present. We validate this before calling Meta and return a 400 naming the offending locale and field. `description` is therefore effectively required on the ad whenever `translations` is present, even though it is optional otherwise. Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate with \"The language asset feed includes an unsupported targeting field\" (subcode 1885985). Media DOES inherit and is uploaded once when shared, and `linkUrl` inherits too: each locale may name its own landing page and unlisted locales fall back to the ad's top-level `linkUrl`. Note that Meta enforces Dynamic Creative image dimensions on language feeds, so an `imageUrl` that works on a normal ad may be rejected with \"The following images have invalid dimensions for Dynamic Creative\" (subcode 1885558). Video is not affected. Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and `
|
|
194
|
+
# Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media — the \"Languages\" toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad's top-level copy is the DEFAULT shown to every locale you do NOT list, and it counts as one of the language variants. IMPORTANT, and the opposite of what you might expect: text does NOT inherit. Every entry must carry its own `headline`, `body` AND `description`, and all of them must be DISTINCT from each other and from the ad's top-level copy. Meta deduplicates identical strings inside the asset feed, so two locales sharing a string collapse into one asset and the create fails with a misleading \"Too few ... texts provided in asset creation\" (subcode 1885817) that names a field which is actually present. We validate this before calling Meta and return a 400 naming the offending locale and field. `description` is therefore effectively required on the ad whenever `translations` is present, even though it is optional otherwise. Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate with \"The language asset feed includes an unsupported targeting field\" (subcode 1885985). Media DOES inherit and is uploaded once when shared, and `linkUrl` inherits too: each locale may name its own landing page and unlisted locales fall back to the ad's top-level `linkUrl`. Note that Meta enforces Dynamic Creative image dimensions on language feeds, so an `imageUrl` that works on a normal ad may be rejected with \"The following images have invalid dimensions for Dynamic Creative\" (subcode 1885558). Video is not affected. Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards`, `existingCreativeId` and `creatives[]`. Meta allows one `asset_feed_spec` shape per creative.
|
|
191
195
|
attr_accessor :translations
|
|
192
196
|
|
|
193
197
|
attr_accessor :placement_assets
|
|
@@ -219,7 +223,7 @@ module Zernio
|
|
|
219
223
|
# Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
|
|
220
224
|
attr_accessor :gender
|
|
221
225
|
|
|
222
|
-
# Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Meta bid strategy applied to the ad set.
|
|
226
|
+
# Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Meta bid strategy applied to the ad set. OpenAI Ads: required on every ad group via this flat field, the only channel it supports (`platformSpecificData` is Meta/LinkedIn-only and returns 400 for OpenAI). No auto-bid option exists; send `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` together with `bidAmount`, omitting it returns 400.
|
|
223
227
|
attr_accessor :bid_strategy
|
|
224
228
|
|
|
225
229
|
# Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`. Meta only: sending `bidAmount` WITHOUT `bidStrategy` requires `existingCampaignId` (400 otherwise), and sets the new ad set's cap under the joined campaign's COST_CAP / LOWEST_COST_WITH_BID_CAP parent. The strategy itself is inherited from the campaign. Restating bidStrategy here is accepted but has no effect on the ad set. Rejected with 400 in `adSetId` attach mode: that shape inherits its cap from the platform. Use `PUT /v1/ads/ad-sets/{adSetId}` there instead.
|
|
@@ -247,6 +251,9 @@ module Zernio
|
|
|
247
251
|
# TikTok only. Forces the identity attribution on the ad: - `TT_USER`: the posting account's open_id (real @username branding). Requires a connected TikTok posting account on the same profile. - `CUSTOMIZED_USER`: synthetic Brand Identity (display name + avatar). Requires a configured Brand Identity (cached on the `tiktokads` SocialAccount via `PATCH /v1/connect/tiktok-ads`) or an inline `brandIdentity` to create one on the fly. When omitted, defaults to `TT_USER` if a posting account is connected on this profile, else `CUSTOMIZED_USER`. Spark Ads (`POST /v1/ads/boost`) always use `TT_USER` regardless of this field — TikTok requires the original organic post's author identity for Spark.
|
|
248
252
|
attr_accessor :identity_type
|
|
249
253
|
|
|
254
|
+
# TikTok only. Creates the ad as a TikTok Upgraded Smart+ campaign: TikTok automates targeting, bidding and delivery. Supports goals `conversions` (Smart+ Web Conversions), `lead_generation` (Smart+ Lead Generation with a website form on `linkUrl`; TikTok Instant Forms not supported) and `app_promotion` (Smart+ App installs; the ad's destination is the app store, so `linkUrl` is not used). The web goals require `promotedObject.pixelId` AND `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` instead. Targeting works like on any TikTok ad (defaults to `countries: [\"US\"]` when omitted); TikTok automates delivery within it. The budget lives on the Smart+ campaign (Campaign Budget Optimization); a `lifetime` budget additionally requires `endDate`. Cannot be combined with `adSetId`.
|
|
255
|
+
attr_accessor :smart_plus
|
|
256
|
+
|
|
250
257
|
attr_accessor :promoted_object
|
|
251
258
|
|
|
252
259
|
class EnumAttributeValidator
|
|
@@ -292,6 +299,7 @@ module Zernio
|
|
|
292
299
|
:'budget_amount' => :'budgetAmount',
|
|
293
300
|
:'budget_type' => :'budgetType',
|
|
294
301
|
:'status' => :'status',
|
|
302
|
+
:'campaign_status' => :'campaignStatus',
|
|
295
303
|
:'budget_level' => :'budgetLevel',
|
|
296
304
|
:'currency' => :'currency',
|
|
297
305
|
:'headline' => :'headline',
|
|
@@ -356,6 +364,7 @@ module Zernio
|
|
|
356
364
|
:'dsa_payor' => :'dsaPayor',
|
|
357
365
|
:'brand_identity' => :'brandIdentity',
|
|
358
366
|
:'identity_type' => :'identityType',
|
|
367
|
+
:'smart_plus' => :'smartPlus',
|
|
359
368
|
:'promoted_object' => :'promotedObject'
|
|
360
369
|
}
|
|
361
370
|
end
|
|
@@ -391,6 +400,7 @@ module Zernio
|
|
|
391
400
|
:'budget_amount' => :'Float',
|
|
392
401
|
:'budget_type' => :'String',
|
|
393
402
|
:'status' => :'String',
|
|
403
|
+
:'campaign_status' => :'String',
|
|
394
404
|
:'budget_level' => :'String',
|
|
395
405
|
:'currency' => :'String',
|
|
396
406
|
:'headline' => :'String',
|
|
@@ -455,6 +465,7 @@ module Zernio
|
|
|
455
465
|
:'dsa_payor' => :'String',
|
|
456
466
|
:'brand_identity' => :'CreateStandaloneAdRequestBrandIdentity',
|
|
457
467
|
:'identity_type' => :'String',
|
|
468
|
+
:'smart_plus' => :'Boolean',
|
|
458
469
|
:'promoted_object' => :'CreateStandaloneAdRequestPromotedObject'
|
|
459
470
|
}
|
|
460
471
|
end
|
|
@@ -561,6 +572,10 @@ module Zernio
|
|
|
561
572
|
self.status = attributes[:'status']
|
|
562
573
|
end
|
|
563
574
|
|
|
575
|
+
if attributes.key?(:'campaign_status')
|
|
576
|
+
self.campaign_status = attributes[:'campaign_status']
|
|
577
|
+
end
|
|
578
|
+
|
|
564
579
|
if attributes.key?(:'budget_level')
|
|
565
580
|
self.budget_level = attributes[:'budget_level']
|
|
566
581
|
else
|
|
@@ -863,6 +878,10 @@ module Zernio
|
|
|
863
878
|
self.identity_type = attributes[:'identity_type']
|
|
864
879
|
end
|
|
865
880
|
|
|
881
|
+
if attributes.key?(:'smart_plus')
|
|
882
|
+
self.smart_plus = attributes[:'smart_plus']
|
|
883
|
+
end
|
|
884
|
+
|
|
866
885
|
if attributes.key?(:'promoted_object')
|
|
867
886
|
self.promoted_object = attributes[:'promoted_object']
|
|
868
887
|
end
|
|
@@ -901,6 +920,14 @@ module Zernio
|
|
|
901
920
|
invalid_properties.push('invalid value for "ad_name", the character length must be smaller than or equal to 255.')
|
|
902
921
|
end
|
|
903
922
|
|
|
923
|
+
if !@currency.nil? && @currency.to_s.length > 3
|
|
924
|
+
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
|
925
|
+
end
|
|
926
|
+
|
|
927
|
+
if !@currency.nil? && @currency.to_s.length < 3
|
|
928
|
+
invalid_properties.push('invalid value for "currency", the character length must be greater than or equal to 3.')
|
|
929
|
+
end
|
|
930
|
+
|
|
904
931
|
if !@long_headline.nil? && @long_headline.to_s.length > 90
|
|
905
932
|
invalid_properties.push('invalid value for "long_headline", the character length must be smaller than or equal to 90.')
|
|
906
933
|
end
|
|
@@ -994,8 +1021,12 @@ module Zernio
|
|
|
994
1021
|
return false unless budget_type_validator.valid?(@budget_type)
|
|
995
1022
|
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
996
1023
|
return false unless status_validator.valid?(@status)
|
|
1024
|
+
campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
1025
|
+
return false unless campaign_status_validator.valid?(@campaign_status)
|
|
997
1026
|
budget_level_validator = EnumAttributeValidator.new('String', ["adset", "campaign"])
|
|
998
1027
|
return false unless budget_level_validator.valid?(@budget_level)
|
|
1028
|
+
return false if !@currency.nil? && @currency.to_s.length > 3
|
|
1029
|
+
return false if !@currency.nil? && @currency.to_s.length < 3
|
|
999
1030
|
return false if !@long_headline.nil? && @long_headline.to_s.length > 90
|
|
1000
1031
|
return false if !@description.nil? && @description.to_s.length > 255
|
|
1001
1032
|
call_to_action_validator = EnumAttributeValidator.new('String', ["LEARN_MORE", "SHOP_NOW", "SIGN_UP", "BOOK_TRAVEL", "CONTACT_US", "DOWNLOAD", "GET_OFFER", "GET_QUOTE", "SUBSCRIBE", "WATCH_MORE", "ADD_TO_CART", "APPLY_NOW", "BOOK_NOW", "BUY_TICKETS", "DONATE", "DONATE_NOW", "GET_DIRECTIONS", "GET_SHOWTIMES", "LISTEN_NOW", "ORDER_NOW", "PLAY_GAME", "REQUEST_TIME", "SEE_MENU", "START_ORDER", "INSTALL_MOBILE_APP", "USE_APP", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "VIEW_QUOTE", "APPLY", "SEE_MORE", "BUY_NOW"])
|
|
@@ -1154,6 +1185,16 @@ module Zernio
|
|
|
1154
1185
|
@status = status
|
|
1155
1186
|
end
|
|
1156
1187
|
|
|
1188
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
1189
|
+
# @param [Object] campaign_status Object to be assigned
|
|
1190
|
+
def campaign_status=(campaign_status)
|
|
1191
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
1192
|
+
unless validator.valid?(campaign_status)
|
|
1193
|
+
fail ArgumentError, "invalid value for \"campaign_status\", must be one of #{validator.allowable_values}."
|
|
1194
|
+
end
|
|
1195
|
+
@campaign_status = campaign_status
|
|
1196
|
+
end
|
|
1197
|
+
|
|
1157
1198
|
# Custom attribute writer method checking allowed values (enum).
|
|
1158
1199
|
# @param [Object] budget_level Object to be assigned
|
|
1159
1200
|
def budget_level=(budget_level)
|
|
@@ -1164,6 +1205,24 @@ module Zernio
|
|
|
1164
1205
|
@budget_level = budget_level
|
|
1165
1206
|
end
|
|
1166
1207
|
|
|
1208
|
+
# Custom attribute writer method with validation
|
|
1209
|
+
# @param [Object] currency Value to be assigned
|
|
1210
|
+
def currency=(currency)
|
|
1211
|
+
if currency.nil?
|
|
1212
|
+
fail ArgumentError, 'currency cannot be nil'
|
|
1213
|
+
end
|
|
1214
|
+
|
|
1215
|
+
if currency.to_s.length > 3
|
|
1216
|
+
fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
|
|
1217
|
+
end
|
|
1218
|
+
|
|
1219
|
+
if currency.to_s.length < 3
|
|
1220
|
+
fail ArgumentError, 'invalid value for "currency", the character length must be greater than or equal to 3.'
|
|
1221
|
+
end
|
|
1222
|
+
|
|
1223
|
+
@currency = currency
|
|
1224
|
+
end
|
|
1225
|
+
|
|
1167
1226
|
# Custom attribute writer method with validation
|
|
1168
1227
|
# @param [Object] long_headline Value to be assigned
|
|
1169
1228
|
def long_headline=(long_headline)
|
|
@@ -1436,6 +1495,7 @@ module Zernio
|
|
|
1436
1495
|
budget_amount == o.budget_amount &&
|
|
1437
1496
|
budget_type == o.budget_type &&
|
|
1438
1497
|
status == o.status &&
|
|
1498
|
+
campaign_status == o.campaign_status &&
|
|
1439
1499
|
budget_level == o.budget_level &&
|
|
1440
1500
|
currency == o.currency &&
|
|
1441
1501
|
headline == o.headline &&
|
|
@@ -1500,6 +1560,7 @@ module Zernio
|
|
|
1500
1560
|
dsa_payor == o.dsa_payor &&
|
|
1501
1561
|
brand_identity == o.brand_identity &&
|
|
1502
1562
|
identity_type == o.identity_type &&
|
|
1563
|
+
smart_plus == o.smart_plus &&
|
|
1503
1564
|
promoted_object == o.promoted_object
|
|
1504
1565
|
end
|
|
1505
1566
|
|
|
@@ -1512,7 +1573,7 @@ module Zernio
|
|
|
1512
1573
|
# Calculates hash code according to all attributes.
|
|
1513
1574
|
# @return [Integer] Hash code
|
|
1514
1575
|
def hash
|
|
1515
|
-
[account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, budget_level, currency, headline, long_headline, body, description, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, negative_keywords, additional_headlines, additional_descriptions, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, promoted_object].hash
|
|
1576
|
+
[account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, negative_keywords, additional_headlines, additional_descriptions, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, promoted_object].hash
|
|
1516
1577
|
end
|
|
1517
1578
|
|
|
1518
1579
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# Video creative for this entry. Mutually exclusive with `imageUrl`. thumbnailUrl is optional
|
|
17
|
+
# Video creative for this entry. Mutually exclusive with `imageUrl`. thumbnailUrl is optional: when omitted, the poster is auto-generated from Meta's preferred video thumbnail, and the request fails with a 502 platform_error (reason: video_thumbnail_unavailable) if Meta produces no candidate.
|
|
18
18
|
class CreateStandaloneAdRequestCreativesInnerVideo < ApiModelBase
|
|
19
19
|
attr_accessor :url
|
|
20
20
|
|
|
@@ -14,9 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# What the ad optimises against. Behaviour depends on the platform. **Meta**: forwarded to the ad set's `promoted_object` (snake-cased). Required for goals whose ad-set optimization_goal points at a specific event/page/app (without it Meta rejects the ad-set create with `error_subcode: 1815430` \"Please select a promoted object for your ad set\"): - `goal: conversions` / `lead_conversion` (OFFSITE_CONVERSIONS): requires `pixelId` + `customEventType`, or `customConversionId` when optimising against a Custom Conversion (the conversion carries its own event definition). For a pixel CUSTOM event (one you named yourself in CAPI/Events Manager), send `customEventType: OTHER` + `customEventStr` with the event name. - `goal: app_promotion` (APP_INSTALLS): requires `applicationId` + `objectStoreUrl` - `goal: lead_generation` (LEAD_GENERATION): `pageId` is auto-filled from the connected Page when omitted Other Meta goals (engagement, traffic, awareness, video_views) ignore this field. **TikTok**:
|
|
17
|
+
# What the ad optimises against. Behaviour depends on the platform. **Meta**: forwarded to the ad set's `promoted_object` (snake-cased). Required for goals whose ad-set optimization_goal points at a specific event/page/app (without it Meta rejects the ad-set create with `error_subcode: 1815430` \"Please select a promoted object for your ad set\"): - `goal: conversions` / `lead_conversion` (OFFSITE_CONVERSIONS): requires `pixelId` + `customEventType`, or `customConversionId` when optimising against a Custom Conversion (the conversion carries its own event definition). For a pixel CUSTOM event (one you named yourself in CAPI/Events Manager), send `customEventType: OTHER` + `customEventStr` with the event name. - `goal: app_promotion` (APP_INSTALLS): requires `applicationId` + `objectStoreUrl` - `goal: lead_generation` (LEAD_GENERATION): `pageId` is auto-filled from the connected Page when omitted Other Meta goals (engagement, traffic, awareness, video_views) ignore this field. **TikTok**: used by `goal: conversions` and the Smart+ goals (`smartPlus: true`). - `pixelId` maps to the ad group's `pixel_id`. Required: a TikTok website-conversion ad group without a pixel is rejected with `40002: Please select a pixel`. - `customEventType` maps to the ad group's `optimization_event` (the pixel event to optimise for). Optional on the regular conversions flow, required on Smart+. See the `customEventType` field below for the valid TikTok codes. - `applicationId` (Smart+ `goal: app_promotion` only) maps to the ad group's `app_id`: the App ID of an app registered on the TikTok Ads account (Assets → Events → App Events). Install optimization needs the app's MMP tracking configured. The remaining `promotedObject.*` fields are Meta-only. Platforms other than Meta and TikTok ignore `promotedObject` entirely.
|
|
18
18
|
class CreateStandaloneAdRequestPromotedObject < ApiModelBase
|
|
19
|
-
# Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`. **TikTok:** TikTok Pixel ID, required for `goal: conversions`. To discover the pixels an ad account can use, call `GET /v1/accounts/{accountId}/tracking-tags?adAccountId=act_...` (each entry carries `kind` and `ownerAdAccountId`), or `GET /v1/accounts/{accountId}/conversion-destinations`. Note this is a different resource from `GET /v1/ads/{adId}/tracking-tags`, which reads an ad's click-URL params (`url_tags`), not pixels.
|
|
19
|
+
# Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`. Requires `customEventType` alongside it; Meta rejects any promoted_object carrying `pixel_id` without `custom_event_type` (error_subcode 1885014), even when `customConversionId` is also present. **TikTok:** TikTok Pixel ID, required for `goal: conversions`. To discover the pixels an ad account can use, call `GET /v1/accounts/{accountId}/tracking-tags?adAccountId=act_...` (each entry carries `kind` and `ownerAdAccountId`), or `GET /v1/accounts/{accountId}/conversion-destinations`. Note this is a different resource from `GET /v1/ads/{adId}/tracking-tags`, which reads an ad's click-URL params (`url_tags`), not pixels.
|
|
20
20
|
attr_accessor :pixel_id
|
|
21
21
|
|
|
22
22
|
# The event the campaign/ad group optimises against. **Meta:** standard event like `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION`, `ADD_TO_CART`. Uppercased internally so callers can pass any case. Required for `goal: conversions`. **TikTok:** an `optimization_event` code (UPPER_SNAKE, not Meta's vocabulary and not PascalCase), OR the exact event name shown in TikTok Events Manager (auto-resolved to its code). Must be one of the event types your TikTok Pixel tracks; custom events are not optimizable. Current taxonomy: `SHOPPING` (Purchase), `ON_WEB_CART` (Add to Cart), `INITIATE_ORDER` (Initiate Checkout), `FORM` (Lead), `ON_WEB_REGISTER` (Complete Registration), `ON_WEB_DETAIL` (View Content). `ON_WEB_ORDER` is deprecated. On rejection the error lists the event types your pixel actually tracks. Optional for `goal: conversions`.
|
|
@@ -34,7 +34,7 @@ module Zernio
|
|
|
34
34
|
# App Store / Play Store listing URL. Required for `goal: app_promotion`.
|
|
35
35
|
attr_accessor :object_store_url
|
|
36
36
|
|
|
37
|
-
# Custom Conversion ID, when optimising against one instead of a standard event.
|
|
37
|
+
# Custom Conversion ID, when optimising against one instead of a standard event. Accepted alone by this API, without `pixelId` or `customEventType`. If `pixelId` is also sent, `customEventType` is still required on the promoted_object (Meta rejects `pixel_id` without `custom_event_type`, error_subcode 1885014).
|
|
38
38
|
attr_accessor :custom_conversion_id
|
|
39
39
|
|
|
40
40
|
# Catalog ID for catalog/Advantage+ Shopping campaigns.
|
|
@@ -22,7 +22,7 @@ module Zernio
|
|
|
22
22
|
# Meta only. Reuse a video ALREADY uploaded to this ad account instead of re-uploading the file: pass the `videoId` returned by a previous create. Wins over `url`, so N ads that differ only in copy share one upload (`existingCreativeId` only covers the identical-copy case). Provide either `url` or `id`.
|
|
23
23
|
attr_accessor :id
|
|
24
24
|
|
|
25
|
-
# Public URL of a still-image thumbnail for the video. OPTIONAL: when omitted on Meta, the poster is auto-generated from Meta's own preferred video thumbnail (the same candidates Ads Manager shows), so video ads publish without supplying one. Provide it to control the poster frame exactly (uploaded as an ad image and referenced in object_story_spec.video_data). Ignored by LinkedIn (auto-generated poster frame).
|
|
25
|
+
# Public URL of a still-image thumbnail for the video. OPTIONAL: when omitted on Meta, the poster is auto-generated from Meta's own preferred video thumbnail (the same candidates Ads Manager shows), so video ads usually publish without supplying one. When Meta produces no candidate the request fails with a 502 platform_error (reason: video_thumbnail_unavailable) — retry, or supply this field. Provide it to control the poster frame exactly (uploaded as an ad image and referenced in object_story_spec.video_data). Ignored by LinkedIn (auto-generated poster frame).
|
|
26
26
|
attr_accessor :thumbnail_url
|
|
27
27
|
|
|
28
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -48,7 +48,7 @@ module Zernio
|
|
|
48
48
|
# Required unless `adSetId` is set.
|
|
49
49
|
attr_accessor :budget_type
|
|
50
50
|
|
|
51
|
-
# ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Optional
|
|
51
|
+
# ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Optional: Zernio resolves it from the ad account when omitted. The value selects the minor-unit exponent Zernio converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is).
|
|
52
52
|
attr_accessor :currency
|
|
53
53
|
|
|
54
54
|
# ISO 8601 datetime. Required when `budgetType` is `lifetime`.
|
|
@@ -14,14 +14,22 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# A media item on a native (external/synced) post, as carried by post.external.* webhook payloads. Distinct from the richer MediaItem used for Zernio-authored posts: external items are always already-published
|
|
17
|
+
# A media item on a native (external/synced) post, as carried by post.external.* webhook payloads. Distinct from the richer MediaItem used for Zernio-authored posts: external items are always already-published and limited to image or video. Kept as a separate schema so the generated SDK model does not collide with MediaItem.
|
|
18
18
|
class ExternalPostMediaItem < ApiModelBase
|
|
19
19
|
attr_accessor :type
|
|
20
20
|
|
|
21
|
+
# 'Direct URL to the media file. Null when the platform withholds it: check mediaStatus before downloading. Instagram omits the video file for Reels it flags as containing copyrighted material (its docs name audio as the usual cause), so type stays \"video\" while the file is permanently unreachable. For LinkedIn videos where the platform returns no file, url falls back to the cover image and the item carries mediaStatus: unavailable.'
|
|
21
22
|
attr_accessor :url
|
|
22
23
|
|
|
24
|
+
# Cover image. Still present when url is null.
|
|
23
25
|
attr_accessor :thumbnail
|
|
24
26
|
|
|
27
|
+
# unavailable means the media file could not be retrieved (url is null or, for LinkedIn videos, a cover image standing in for the file). available or absent means the file is available at url (older synced items omit the field).
|
|
28
|
+
attr_accessor :media_status
|
|
29
|
+
|
|
30
|
+
# Why the file is missing. platform_withheld means the platform declined to return it and retrying will not help.
|
|
31
|
+
attr_accessor :unavailable_reason
|
|
32
|
+
|
|
25
33
|
class EnumAttributeValidator
|
|
26
34
|
attr_reader :datatype
|
|
27
35
|
attr_reader :allowable_values
|
|
@@ -49,7 +57,9 @@ module Zernio
|
|
|
49
57
|
{
|
|
50
58
|
:'type' => :'type',
|
|
51
59
|
:'url' => :'url',
|
|
52
|
-
:'thumbnail' => :'thumbnail'
|
|
60
|
+
:'thumbnail' => :'thumbnail',
|
|
61
|
+
:'media_status' => :'mediaStatus',
|
|
62
|
+
:'unavailable_reason' => :'unavailableReason'
|
|
53
63
|
}
|
|
54
64
|
end
|
|
55
65
|
|
|
@@ -68,13 +78,16 @@ module Zernio
|
|
|
68
78
|
{
|
|
69
79
|
:'type' => :'String',
|
|
70
80
|
:'url' => :'String',
|
|
71
|
-
:'thumbnail' => :'String'
|
|
81
|
+
:'thumbnail' => :'String',
|
|
82
|
+
:'media_status' => :'String',
|
|
83
|
+
:'unavailable_reason' => :'String'
|
|
72
84
|
}
|
|
73
85
|
end
|
|
74
86
|
|
|
75
87
|
# List of attributes with nullable: true
|
|
76
88
|
def self.openapi_nullable
|
|
77
89
|
Set.new([
|
|
90
|
+
:'url',
|
|
78
91
|
])
|
|
79
92
|
end
|
|
80
93
|
|
|
@@ -109,6 +122,14 @@ module Zernio
|
|
|
109
122
|
if attributes.key?(:'thumbnail')
|
|
110
123
|
self.thumbnail = attributes[:'thumbnail']
|
|
111
124
|
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'media_status')
|
|
127
|
+
self.media_status = attributes[:'media_status']
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'unavailable_reason')
|
|
131
|
+
self.unavailable_reason = attributes[:'unavailable_reason']
|
|
132
|
+
end
|
|
112
133
|
end
|
|
113
134
|
|
|
114
135
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -120,10 +141,6 @@ module Zernio
|
|
|
120
141
|
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
121
142
|
end
|
|
122
143
|
|
|
123
|
-
if @url.nil?
|
|
124
|
-
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
125
|
-
end
|
|
126
|
-
|
|
127
144
|
invalid_properties
|
|
128
145
|
end
|
|
129
146
|
|
|
@@ -134,7 +151,10 @@ module Zernio
|
|
|
134
151
|
return false if @type.nil?
|
|
135
152
|
type_validator = EnumAttributeValidator.new('String', ["image", "video"])
|
|
136
153
|
return false unless type_validator.valid?(@type)
|
|
137
|
-
|
|
154
|
+
media_status_validator = EnumAttributeValidator.new('String', ["available", "unavailable"])
|
|
155
|
+
return false unless media_status_validator.valid?(@media_status)
|
|
156
|
+
unavailable_reason_validator = EnumAttributeValidator.new('String', ["platform_withheld"])
|
|
157
|
+
return false unless unavailable_reason_validator.valid?(@unavailable_reason)
|
|
138
158
|
true
|
|
139
159
|
end
|
|
140
160
|
|
|
@@ -148,14 +168,24 @@ module Zernio
|
|
|
148
168
|
@type = type
|
|
149
169
|
end
|
|
150
170
|
|
|
151
|
-
# Custom attribute writer method
|
|
152
|
-
# @param [Object]
|
|
153
|
-
def
|
|
154
|
-
|
|
155
|
-
|
|
171
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
172
|
+
# @param [Object] media_status Object to be assigned
|
|
173
|
+
def media_status=(media_status)
|
|
174
|
+
validator = EnumAttributeValidator.new('String', ["available", "unavailable"])
|
|
175
|
+
unless validator.valid?(media_status)
|
|
176
|
+
fail ArgumentError, "invalid value for \"media_status\", must be one of #{validator.allowable_values}."
|
|
156
177
|
end
|
|
178
|
+
@media_status = media_status
|
|
179
|
+
end
|
|
157
180
|
|
|
158
|
-
|
|
181
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
182
|
+
# @param [Object] unavailable_reason Object to be assigned
|
|
183
|
+
def unavailable_reason=(unavailable_reason)
|
|
184
|
+
validator = EnumAttributeValidator.new('String', ["platform_withheld"])
|
|
185
|
+
unless validator.valid?(unavailable_reason)
|
|
186
|
+
fail ArgumentError, "invalid value for \"unavailable_reason\", must be one of #{validator.allowable_values}."
|
|
187
|
+
end
|
|
188
|
+
@unavailable_reason = unavailable_reason
|
|
159
189
|
end
|
|
160
190
|
|
|
161
191
|
# Checks equality by comparing each attribute.
|
|
@@ -165,7 +195,9 @@ module Zernio
|
|
|
165
195
|
self.class == o.class &&
|
|
166
196
|
type == o.type &&
|
|
167
197
|
url == o.url &&
|
|
168
|
-
thumbnail == o.thumbnail
|
|
198
|
+
thumbnail == o.thumbnail &&
|
|
199
|
+
media_status == o.media_status &&
|
|
200
|
+
unavailable_reason == o.unavailable_reason
|
|
169
201
|
end
|
|
170
202
|
|
|
171
203
|
# @see the `==` method
|
|
@@ -177,7 +209,7 @@ module Zernio
|
|
|
177
209
|
# Calculates hash code according to all attributes.
|
|
178
210
|
# @return [Integer] Hash code
|
|
179
211
|
def hash
|
|
180
|
-
[type, url, thumbnail].hash
|
|
212
|
+
[type, url, thumbnail, media_status, unavailable_reason].hash
|
|
181
213
|
end
|
|
182
214
|
|
|
183
215
|
# Builds the object from hash
|
|
@@ -34,9 +34,6 @@ module Zernio
|
|
|
34
34
|
# Media type (e.g. image, video, carousel)
|
|
35
35
|
attr_accessor :media_type
|
|
36
36
|
|
|
37
|
-
# Primary media URL
|
|
38
|
-
attr_accessor :media_url
|
|
39
|
-
|
|
40
37
|
# Thumbnail URL
|
|
41
38
|
attr_accessor :thumbnail_url
|
|
42
39
|
|
|
@@ -54,7 +51,6 @@ module Zernio
|
|
|
54
51
|
:'content' => :'content',
|
|
55
52
|
:'published_at' => :'publishedAt',
|
|
56
53
|
:'media_type' => :'mediaType',
|
|
57
|
-
:'media_url' => :'mediaUrl',
|
|
58
54
|
:'thumbnail_url' => :'thumbnailUrl',
|
|
59
55
|
:'media_items' => :'mediaItems',
|
|
60
56
|
:'analytics' => :'analytics'
|
|
@@ -80,7 +76,6 @@ module Zernio
|
|
|
80
76
|
:'content' => :'String',
|
|
81
77
|
:'published_at' => :'Time',
|
|
82
78
|
:'media_type' => :'String',
|
|
83
|
-
:'media_url' => :'String',
|
|
84
79
|
:'thumbnail_url' => :'String',
|
|
85
80
|
:'media_items' => :'Array<Object>',
|
|
86
81
|
:'analytics' => :'ExternalPostSummaryAnalytics'
|
|
@@ -133,10 +128,6 @@ module Zernio
|
|
|
133
128
|
self.media_type = attributes[:'media_type']
|
|
134
129
|
end
|
|
135
130
|
|
|
136
|
-
if attributes.key?(:'media_url')
|
|
137
|
-
self.media_url = attributes[:'media_url']
|
|
138
|
-
end
|
|
139
|
-
|
|
140
131
|
if attributes.key?(:'thumbnail_url')
|
|
141
132
|
self.thumbnail_url = attributes[:'thumbnail_url']
|
|
142
133
|
end
|
|
@@ -178,7 +169,6 @@ module Zernio
|
|
|
178
169
|
content == o.content &&
|
|
179
170
|
published_at == o.published_at &&
|
|
180
171
|
media_type == o.media_type &&
|
|
181
|
-
media_url == o.media_url &&
|
|
182
172
|
thumbnail_url == o.thumbnail_url &&
|
|
183
173
|
media_items == o.media_items &&
|
|
184
174
|
analytics == o.analytics
|
|
@@ -193,7 +183,7 @@ module Zernio
|
|
|
193
183
|
# Calculates hash code according to all attributes.
|
|
194
184
|
# @return [Integer] Hash code
|
|
195
185
|
def hash
|
|
196
|
-
[platform, platform_post_id, platform_post_url, content, published_at, media_type,
|
|
186
|
+
[platform, platform_post_id, platform_post_url, content, published_at, media_type, thumbnail_url, media_items, analytics].hash
|
|
197
187
|
end
|
|
198
188
|
|
|
199
189
|
# Builds the object from hash
|
|
@@ -34,6 +34,7 @@ module Zernio
|
|
|
34
34
|
|
|
35
35
|
attr_accessor :impressions
|
|
36
36
|
|
|
37
|
+
# Percentage, rounded to 2 decimals. Same definition as PostAnalytics.engagementRate: (likes + comments + shares + saves) / (impressions or reach or views) * 100, where the denominator is the first of the three that is non-zero. Clicks and follows are never counted.
|
|
37
38
|
attr_accessor :engagement_rate
|
|
38
39
|
|
|
39
40
|
# When these metrics were last refreshed
|
|
@@ -106,8 +106,8 @@ module Zernio
|
|
|
106
106
|
def list_invalid_properties
|
|
107
107
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
108
108
|
invalid_properties = Array.new
|
|
109
|
-
if !@carousel_cards.nil? && @carousel_cards.length >
|
|
110
|
-
invalid_properties.push('invalid value for "carousel_cards", number of items must be less than or equal to
|
|
109
|
+
if !@carousel_cards.nil? && @carousel_cards.length > 10
|
|
110
|
+
invalid_properties.push('invalid value for "carousel_cards", number of items must be less than or equal to 10.')
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
if !@carousel_cards.nil? && @carousel_cards.length < 2
|
|
@@ -126,7 +126,7 @@ module Zernio
|
|
|
126
126
|
# @return true if the model is valid
|
|
127
127
|
def valid?
|
|
128
128
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
-
return false if !@carousel_cards.nil? && @carousel_cards.length >
|
|
129
|
+
return false if !@carousel_cards.nil? && @carousel_cards.length > 10
|
|
130
130
|
return false if !@carousel_cards.nil? && @carousel_cards.length < 2
|
|
131
131
|
return false if !@text_format_preset_id.nil? && @text_format_preset_id !~ Regexp.new(/^\d+$/)
|
|
132
132
|
true
|
|
@@ -139,8 +139,8 @@ module Zernio
|
|
|
139
139
|
fail ArgumentError, 'carousel_cards cannot be nil'
|
|
140
140
|
end
|
|
141
141
|
|
|
142
|
-
if carousel_cards.length >
|
|
143
|
-
fail ArgumentError, 'invalid value for "carousel_cards", number of items must be less than or equal to
|
|
142
|
+
if carousel_cards.length > 10
|
|
143
|
+
fail ArgumentError, 'invalid value for "carousel_cards", number of items must be less than or equal to 10.'
|
|
144
144
|
end
|
|
145
145
|
|
|
146
146
|
if carousel_cards.length < 2
|
|
@@ -36,6 +36,8 @@ module Zernio
|
|
|
36
36
|
# Actionable recommendations to fix issues
|
|
37
37
|
attr_accessor :recommendations
|
|
38
38
|
|
|
39
|
+
attr_accessor :platform_connection
|
|
40
|
+
|
|
39
41
|
class EnumAttributeValidator
|
|
40
42
|
attr_reader :datatype
|
|
41
43
|
attr_reader :allowable_values
|
|
@@ -69,7 +71,8 @@ module Zernio
|
|
|
69
71
|
:'token_status' => :'tokenStatus',
|
|
70
72
|
:'permissions' => :'permissions',
|
|
71
73
|
:'issues' => :'issues',
|
|
72
|
-
:'recommendations' => :'recommendations'
|
|
74
|
+
:'recommendations' => :'recommendations',
|
|
75
|
+
:'platform_connection' => :'platformConnection'
|
|
73
76
|
}
|
|
74
77
|
end
|
|
75
78
|
|
|
@@ -94,7 +97,8 @@ module Zernio
|
|
|
94
97
|
:'token_status' => :'GetAccountHealth200ResponseTokenStatus',
|
|
95
98
|
:'permissions' => :'GetAccountHealth200ResponsePermissions',
|
|
96
99
|
:'issues' => :'Array<String>',
|
|
97
|
-
:'recommendations' => :'Array<String>'
|
|
100
|
+
:'recommendations' => :'Array<String>',
|
|
101
|
+
:'platform_connection' => :'GetAccountHealth200ResponsePlatformConnection'
|
|
98
102
|
}
|
|
99
103
|
end
|
|
100
104
|
|
|
@@ -159,6 +163,10 @@ module Zernio
|
|
|
159
163
|
self.recommendations = value
|
|
160
164
|
end
|
|
161
165
|
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'platform_connection')
|
|
168
|
+
self.platform_connection = attributes[:'platform_connection']
|
|
169
|
+
end
|
|
162
170
|
end
|
|
163
171
|
|
|
164
172
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -201,7 +209,8 @@ module Zernio
|
|
|
201
209
|
token_status == o.token_status &&
|
|
202
210
|
permissions == o.permissions &&
|
|
203
211
|
issues == o.issues &&
|
|
204
|
-
recommendations == o.recommendations
|
|
212
|
+
recommendations == o.recommendations &&
|
|
213
|
+
platform_connection == o.platform_connection
|
|
205
214
|
end
|
|
206
215
|
|
|
207
216
|
# @see the `==` method
|
|
@@ -213,7 +222,7 @@ module Zernio
|
|
|
213
222
|
# Calculates hash code according to all attributes.
|
|
214
223
|
# @return [Integer] Hash code
|
|
215
224
|
def hash
|
|
216
|
-
[account_id, platform, username, display_name, status, token_status, permissions, issues, recommendations].hash
|
|
225
|
+
[account_id, platform, username, display_name, status, token_status, permissions, issues, recommendations, platform_connection].hash
|
|
217
226
|
end
|
|
218
227
|
|
|
219
228
|
# Builds the object from hash
|