late-sdk 0.0.1307 → 0.0.1308
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/docs/AccountWithFollowerStats.md +5 -1
- data/docs/ConnectApi.md +6 -2
- data/docs/SocialAccount.md +5 -1
- data/lib/zernio-sdk/api/connect_api.rb +16 -2
- data/lib/zernio-sdk/models/account_with_follower_stats.rb +34 -2
- data/lib/zernio-sdk/models/social_account.rb +34 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +1 -1
- data/spec/api/connect_api_spec.rb +3 -1
- data/spec/models/account_with_follower_stats_spec.rb +16 -0
- data/spec/models/social_account_spec.rb +16 -0
- data/zernio-sdk-0.0.1308.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.1307.gem +0 -0
|
@@ -25,6 +25,12 @@ module Zernio
|
|
|
25
25
|
|
|
26
26
|
attr_accessor :display_name
|
|
27
27
|
|
|
28
|
+
# The account's id on its platform as the platform reports it to Zernio; stable across reconnects, so it is the key to match an account against your own records. Instagram: the app-scoped user id on Instagram Login accounts (the professional account id is in `metadata.instagramScopedId`), the professional account id (`17841...`) on Facebook Login accounts. TikTok: the open_id of Zernio's TikTok app, which differs from the open_id any other app sees for the same user. Either value can be passed back as `expectedPlatformUserId` on GET /v1/connect/{platform}.
|
|
29
|
+
attr_accessor :platform_user_id
|
|
30
|
+
|
|
31
|
+
# TikTok accounts only. The account type TikTok reported when the account was connected. `personal` accounts cannot use TikTok direct messages through the API (TikTok limits Business Messaging to Business Accounts): skip the inbox for them and tell the user to switch to a Business Account in the TikTok app, then reconnect. `business` is the prerequisite, not a guarantee; messaging also needs the messaging scopes granted and TikTok's regional availability. `unknown` on accounts connected before this was captured or whose grant left out the account-type scope.
|
|
32
|
+
attr_accessor :tiktok_account_type
|
|
33
|
+
|
|
28
34
|
# URL to the account's profile picture on the platform. May be null if the platform does not provide one.
|
|
29
35
|
attr_accessor :profile_picture
|
|
30
36
|
|
|
@@ -48,7 +54,7 @@ module Zernio
|
|
|
48
54
|
# Whether the user explicitly activated this account. false means the account was created as a side effect (e.g., posting account auto-created when user connected ads first). Such accounts are hidden from this list, cannot be posted to (`ACCOUNT_NOT_ENABLED_FOR_POSTING`), and are not billed as connected accounts.
|
|
49
55
|
attr_accessor :enabled
|
|
50
56
|
|
|
51
|
-
# Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID For Meta ads business-login accounts: - tokenType: system-user - businessId: The owning Business Manager ID when there is one owner; null for multiple owners. - businessIds: Owning Business Manager IDs discovered from granted ad accounts. - grantedAdAccountIds: Ad-account IDs granted to the token. - adAccountBusinesses: Map from ad-account ID to its owning business ID or null. - availablePages: Granted Page IDs and names. No Page tokens are exposed. - selectedPageId: The Page selected for creatives and lead forms, or null. - scopedAdAccountIds: Existing sync scope preserved on reconnect. Non-expiring tokens have no tokenExpiresAt field. Parent posting reconnects do not replace this token. For LinkedIn accounts, profileData carries the profile details refreshed on each daily snapshot: - profileData.bio: The member's headline for personal accounts, or the organization description for organization accounts. null when the member has not set one. - profileData.extraData.vanityName: The member's profile slug, i.e. the /in/{vanityName} segment of profileUrl. Personal accounts only; an organization's own slug is in metadata.organizationInfo.vanityName. For Instagram accounts: - loginMethod: \"facebook_login\" when the account was connected through Facebook Login. Absent on accounts connected with Instagram Login. On facebook_login accounts, comment reads leave hidden comments out entirely instead of returning them with isHidden true. For X (Twitter) accounts: - profileData.extraData.isPremium: Whether X reports a paid subscription (Basic, Premium, Premium+, or a blue verified badge), which raises the post length limit from 280 to 25,000 characters. Read live at connect and reconnect and refreshed by the daily follower snapshot; because X intermittently reports no subscription for subscribed accounts, a cancellation is stored on the fourth consecutive daily snapshot that reports it (about four days). Accounts connected before the extraData layout carry the same flag at profileData.isPremium.
|
|
57
|
+
# Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID For Meta ads business-login accounts: - tokenType: system-user - businessId: The owning Business Manager ID when there is one owner; null for multiple owners. - businessIds: Owning Business Manager IDs discovered from granted ad accounts. - grantedAdAccountIds: Ad-account IDs granted to the token. - adAccountBusinesses: Map from ad-account ID to its owning business ID or null. - availablePages: Granted Page IDs and names. No Page tokens are exposed. - selectedPageId: The Page selected for creatives and lead forms, or null. - scopedAdAccountIds: Existing sync scope preserved on reconnect. Non-expiring tokens have no tokenExpiresAt field. Parent posting reconnects do not replace this token. For LinkedIn accounts, profileData carries the profile details refreshed on each daily snapshot: - profileData.bio: The member's headline for personal accounts, or the organization description for organization accounts. null when the member has not set one. - profileData.extraData.vanityName: The member's profile slug, i.e. the /in/{vanityName} segment of profileUrl. Personal accounts only; an organization's own slug is in metadata.organizationInfo.vanityName. For Instagram accounts: - loginMethod: \"facebook_login\" when the account was connected through Facebook Login. Absent on accounts connected with Instagram Login. On facebook_login accounts, comment reads leave hidden comments out entirely instead of returning them with isHidden true. - instagramScopedId: the Instagram professional account id (`17841...`). On Instagram Login accounts this is the id that is the same whichever app connected the account, while platformUserId is app-scoped; Facebook Login accounts hold this id as platformUserId. For X (Twitter) accounts: - profileData.extraData.isPremium: Whether X reports a paid subscription (Basic, Premium, Premium+, or a blue verified badge), which raises the post length limit from 280 to 25,000 characters. Read live at connect and reconnect and refreshed by the daily follower snapshot; because X intermittently reports no subscription for subscribed accounts, a cancellation is stored on the fourth consecutive daily snapshot that reports it (about four days). Accounts connected before the extraData layout carry the same flag at profileData.isPremium.
|
|
52
58
|
attr_accessor :metadata
|
|
53
59
|
|
|
54
60
|
class EnumAttributeValidator
|
|
@@ -81,6 +87,8 @@ module Zernio
|
|
|
81
87
|
:'profile_id' => :'profileId',
|
|
82
88
|
:'username' => :'username',
|
|
83
89
|
:'display_name' => :'displayName',
|
|
90
|
+
:'platform_user_id' => :'platformUserId',
|
|
91
|
+
:'tiktok_account_type' => :'tiktokAccountType',
|
|
84
92
|
:'profile_picture' => :'profilePicture',
|
|
85
93
|
:'profile_url' => :'profileUrl',
|
|
86
94
|
:'is_active' => :'isActive',
|
|
@@ -111,6 +119,8 @@ module Zernio
|
|
|
111
119
|
:'profile_id' => :'SocialAccountProfileId',
|
|
112
120
|
:'username' => :'String',
|
|
113
121
|
:'display_name' => :'String',
|
|
122
|
+
:'platform_user_id' => :'String',
|
|
123
|
+
:'tiktok_account_type' => :'String',
|
|
114
124
|
:'profile_picture' => :'String',
|
|
115
125
|
:'profile_url' => :'String',
|
|
116
126
|
:'is_active' => :'Boolean',
|
|
@@ -173,6 +183,14 @@ module Zernio
|
|
|
173
183
|
self.display_name = attributes[:'display_name']
|
|
174
184
|
end
|
|
175
185
|
|
|
186
|
+
if attributes.key?(:'platform_user_id')
|
|
187
|
+
self.platform_user_id = attributes[:'platform_user_id']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'tiktok_account_type')
|
|
191
|
+
self.tiktok_account_type = attributes[:'tiktok_account_type']
|
|
192
|
+
end
|
|
193
|
+
|
|
176
194
|
if attributes.key?(:'profile_picture')
|
|
177
195
|
self.profile_picture = attributes[:'profile_picture']
|
|
178
196
|
end
|
|
@@ -245,6 +263,8 @@ module Zernio
|
|
|
245
263
|
platform_validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "slack", "whatsapp", "shopify", "wordpress", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads", "sms", "phone", "rcs", "whopads"])
|
|
246
264
|
return false unless platform_validator.valid?(@platform)
|
|
247
265
|
return false if @profile_id.nil?
|
|
266
|
+
tiktok_account_type_validator = EnumAttributeValidator.new('String', ["business", "personal", "unknown"])
|
|
267
|
+
return false unless tiktok_account_type_validator.valid?(@tiktok_account_type)
|
|
248
268
|
return false if @is_active.nil?
|
|
249
269
|
true
|
|
250
270
|
end
|
|
@@ -279,6 +299,16 @@ module Zernio
|
|
|
279
299
|
@profile_id = profile_id
|
|
280
300
|
end
|
|
281
301
|
|
|
302
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
303
|
+
# @param [Object] tiktok_account_type Object to be assigned
|
|
304
|
+
def tiktok_account_type=(tiktok_account_type)
|
|
305
|
+
validator = EnumAttributeValidator.new('String', ["business", "personal", "unknown"])
|
|
306
|
+
unless validator.valid?(tiktok_account_type)
|
|
307
|
+
fail ArgumentError, "invalid value for \"tiktok_account_type\", must be one of #{validator.allowable_values}."
|
|
308
|
+
end
|
|
309
|
+
@tiktok_account_type = tiktok_account_type
|
|
310
|
+
end
|
|
311
|
+
|
|
282
312
|
# Custom attribute writer method with validation
|
|
283
313
|
# @param [Object] is_active Value to be assigned
|
|
284
314
|
def is_active=(is_active)
|
|
@@ -299,6 +329,8 @@ module Zernio
|
|
|
299
329
|
profile_id == o.profile_id &&
|
|
300
330
|
username == o.username &&
|
|
301
331
|
display_name == o.display_name &&
|
|
332
|
+
platform_user_id == o.platform_user_id &&
|
|
333
|
+
tiktok_account_type == o.tiktok_account_type &&
|
|
302
334
|
profile_picture == o.profile_picture &&
|
|
303
335
|
profile_url == o.profile_url &&
|
|
304
336
|
is_active == o.is_active &&
|
|
@@ -319,7 +351,7 @@ module Zernio
|
|
|
319
351
|
# Calculates hash code according to all attributes.
|
|
320
352
|
# @return [Integer] Hash code
|
|
321
353
|
def hash
|
|
322
|
-
[_id, platform, profile_id, username, display_name, profile_picture, profile_url, is_active, needs_reconnection, followers_count, followers_last_updated, parent_account_id, enabled, metadata].hash
|
|
354
|
+
[_id, platform, profile_id, username, display_name, platform_user_id, tiktok_account_type, profile_picture, profile_url, is_active, needs_reconnection, followers_count, followers_last_updated, parent_account_id, enabled, metadata].hash
|
|
323
355
|
end
|
|
324
356
|
|
|
325
357
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED