late-sdk 0.0.122 → 0.0.123

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b5b0c7ab0c5800b52a30336a6611f64e0355379e16cabaf6a679db87ef504ca
4
- data.tar.gz: 71ac1c98480ec88a4234ed15b6a6ba11b278ab41c7a6eff45d361162d8aa526f
3
+ metadata.gz: 71793f075aa79c8502aecc6e20853c8b6e572d3808a7d9043ff73cab84bd4603
4
+ data.tar.gz: 7a904e33e411bdba92d0c4d302738aa3e5967918dd5256f8f4c7736a111d0f4b
5
5
  SHA512:
6
- metadata.gz: d1911d73bc66be34758df9ecfa7cd9cd41a2544fa898b15e85be7e1c17a93ccd10fcc6be8c9ef0f2b4eb593393e0f2832f9fb7d84453b847abd3a84f05bfa8c0
7
- data.tar.gz: a4d85148d0992b689768ae7f8e2dd6ced2efaa83897790083bae0dcfee1f3608d3c76bccbbe7f0c8c1d48b4a0c538329bce9e301f682e5723c626dfce619a16b
6
+ metadata.gz: 2a53768a93972ac2a1b2a833fb2ab706339e8018607ba8efee6a2d37b69c64ea4bfe1e8dd727d67385786c4d7b0a1703390f34c1a03f0fc175a3249838a63924
7
+ data.tar.gz: d20e3eaf2a41c6f23b770efbede5434841ca5acb9d0a7dcb25c59bee1e3bd98777fa51272280bce548696d95861943de8e7a9cad062f2a680ad3f4e7840ef54d
@@ -13,7 +13,9 @@
13
13
  | **is_active** | **Boolean** | | [optional] |
14
14
  | **followers_count** | **Float** | Follower count (only included if user has analytics add-on) | [optional] |
15
15
  | **followers_last_updated** | **Time** | Last time follower count was updated (only included if user has analytics add-on) | [optional] |
16
- | **ads_status** | **String** | Ads connection status for this account. - `connected`: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - `not_connected`: Platform supports ads but requires a separate ads OAuth. Use `GET /v1/connect/{platform}/ads` to connect. - `not_available`: Platform does not support ads (e.g., YouTube, Reddit, Bluesky). | [optional] |
16
+ | **parent_account_id** | **String** | Reference to the parent posting SocialAccount. Set for ads accounts that share or derive from a posting account's OAuth token. null for standalone ads (Google Ads) and all posting accounts. | [optional] |
17
+ | **enabled** | **Boolean** | 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). Posting UI and scheduler ignore accounts with enabled: false. | [optional] |
18
+ | **ads_status** | **String** | **Deprecated.** With the new ads account model, ads accounts are separate SocialAccount documents. Check for accounts with ads platform values (metaads, linkedinads, pinterestads, tiktokads, xads, googleads) instead. Legacy behavior: - `connected`: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - `not_connected`: Platform supports ads but requires a separate ads OAuth. Use `GET /v1/connect/{platform}/ads` to connect. - `not_available`: Platform does not support ads (e.g., YouTube, Reddit, Bluesky). | [optional] |
17
19
  | **metadata** | **Object** | 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`). Messages cannot be sent until the display name is approved by Meta. - `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 | [optional] |
18
20
  | **profile_picture** | **String** | | [optional] |
19
21
  | **current_followers** | **Float** | Current follower count | [optional] |
@@ -38,6 +40,8 @@ instance = Late::AccountWithFollowerStats.new(
38
40
  is_active: null,
39
41
  followers_count: null,
40
42
  followers_last_updated: null,
43
+ parent_account_id: null,
44
+ enabled: null,
41
45
  ads_status: null,
42
46
  metadata: null,
43
47
  profile_picture: null,
data/docs/AccountsApi.md CHANGED
@@ -85,11 +85,11 @@ end
85
85
 
86
86
  ## disconnect_ads
87
87
 
88
- > <DeleteAccountGroup200Response> disconnect_ads(account_id, disconnect_ads_request)
88
+ > <DeleteAccountGroup200Response> disconnect_ads(account_id, opts)
89
89
 
90
90
  Disconnect ads from an account
91
91
 
92
- Disconnects ads from a social account without removing the posting connection. **Same-token platforms** (metaads, linkedinads, pinterestads): Sets an `adsOptOut` flag. The posting account and OAuth token are preserved. Reconnecting ads clears the flag. **Separate-token platforms** (tiktokads, xads): Clears the ads-specific metadata (marketing API tokens). The posting account stays intact. **Standalone platforms** (googleads): Do not use this endpoint. Use `DELETE /v1/accounts/{accountId}` instead, since Google Ads accounts are standalone.
92
+ **Deprecated.** Ads accounts are now standalone SocialAccount documents. Use `DELETE /v1/accounts/{accountId}` instead, passing the ads account's own ID. This endpoint is kept for backward compatibility. It soft-deletes the ads SocialAccount identified by `accountId` (which must be an ads account, not a posting account). The parent posting account is left untouched.
93
93
 
94
94
  ### Examples
95
95
 
@@ -103,12 +103,14 @@ Late.configure do |config|
103
103
  end
104
104
 
105
105
  api_instance = Late::AccountsApi.new
106
- account_id = 'account_id_example' # String | The SocialAccount ID (parent posting account for same-token/separate-token platforms)
107
- disconnect_ads_request = Late::DisconnectAdsRequest.new({ads_platform: 'metaads'}) # DisconnectAdsRequest |
106
+ account_id = 'account_id_example' # String | The ads SocialAccount ID to disconnect
107
+ opts = {
108
+ disconnect_ads_request: Late::DisconnectAdsRequest.new # DisconnectAdsRequest |
109
+ }
108
110
 
109
111
  begin
110
112
  # Disconnect ads from an account
111
- result = api_instance.disconnect_ads(account_id, disconnect_ads_request)
113
+ result = api_instance.disconnect_ads(account_id, opts)
112
114
  p result
113
115
  rescue Late::ApiError => e
114
116
  puts "Error when calling AccountsApi->disconnect_ads: #{e}"
@@ -119,12 +121,12 @@ end
119
121
 
120
122
  This returns an Array which contains the response data, status code and headers.
121
123
 
122
- > <Array(<DeleteAccountGroup200Response>, Integer, Hash)> disconnect_ads_with_http_info(account_id, disconnect_ads_request)
124
+ > <Array(<DeleteAccountGroup200Response>, Integer, Hash)> disconnect_ads_with_http_info(account_id, opts)
123
125
 
124
126
  ```ruby
125
127
  begin
126
128
  # Disconnect ads from an account
127
- data, status_code, headers = api_instance.disconnect_ads_with_http_info(account_id, disconnect_ads_request)
129
+ data, status_code, headers = api_instance.disconnect_ads_with_http_info(account_id, opts)
128
130
  p status_code # => 2xx
129
131
  p headers # => { ... }
130
132
  p data # => <DeleteAccountGroup200Response>
@@ -137,8 +139,8 @@ end
137
139
 
138
140
  | Name | Type | Description | Notes |
139
141
  | ---- | ---- | ----------- | ----- |
140
- | **account_id** | **String** | The SocialAccount ID (parent posting account for same-token/separate-token platforms) | |
141
- | **disconnect_ads_request** | [**DisconnectAdsRequest**](DisconnectAdsRequest.md) | | |
142
+ | **account_id** | **String** | The ads SocialAccount ID to disconnect | |
143
+ | **disconnect_ads_request** | [**DisconnectAdsRequest**](DisconnectAdsRequest.md) | | [optional] |
142
144
 
143
145
  ### Return type
144
146
 
data/docs/ConnectApi.md CHANGED
@@ -113,7 +113,7 @@ end
113
113
 
114
114
  Connect ads for a platform
115
115
 
116
- Unified ads connection endpoint. Handles all platforms through a single route: **Same-token platforms** (facebook, instagram, linkedin, pinterest): If a posting account already exists, returns `alreadyConnected: true` immediately (no extra OAuth needed). If not, starts the normal OAuth flow, and the resulting account supports both posting and ads. **Separate-token platforms** (tiktok, twitter): Requires an existing posting account (`accountId` param). If ads are already connected, returns `alreadyConnected: true`. Otherwise, starts the platform-specific marketing API OAuth flow. **Ads-only platforms** (googleads): If a Google Ads account exists, returns `alreadyConnected: true`. Otherwise, starts the Google Ads OAuth flow. Use the `adsStatus` field from `GET /v1/accounts` to check which accounts need ads connection.
116
+ Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Same-token platforms** (facebook, instagram, linkedin, pinterest): Creates an ads SocialAccount (`metaads`, `linkedinads`, `pinterestads`) with a copied OAuth token from the parent posting account. If the ads account already exists, returns `alreadyConnected: true`. No extra OAuth needed. **Separate-token platforms** (tiktok, twitter): Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (`tiktokads`, `xads`) with its own token. Requires an existing posting account (`accountId` param). If the ads account already exists, returns `alreadyConnected: true`. **Standalone platforms** (googleads): Starts the Google Ads OAuth flow and creates a standalone ads SocialAccount (`googleads`) with no parent. If the account already exists, returns `alreadyConnected: true`. Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., `metaads`, `tiktokads`) in `GET /v1/accounts`.
117
117
 
118
118
  ### Examples
119
119
 
@@ -130,7 +130,7 @@ api_instance = Late::ConnectApi.new
130
130
  platform = 'facebook' # String | Platform to connect ads for. Only platforms with ads support are accepted.
131
131
  profile_id = 'profile_id_example' # String | Your Zernio profile ID
132
132
  opts = {
133
- account_id: 'account_id_example', # String | Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and ads-only platforms.
133
+ account_id: 'account_id_example', # String | Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and standalone platforms.
134
134
  redirect_url: 'redirect_url_example', # String | Custom redirect URL after OAuth completes (same-token platforms only)
135
135
  headless: true # Boolean | Enable headless mode (same-token platforms only)
136
136
  }
@@ -168,7 +168,7 @@ end
168
168
  | ---- | ---- | ----------- | ----- |
169
169
  | **platform** | **String** | Platform to connect ads for. Only platforms with ads support are accepted. | |
170
170
  | **profile_id** | **String** | Your Zernio profile ID | |
171
- | **account_id** | **String** | Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and ads-only platforms. | [optional] |
171
+ | **account_id** | **String** | Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and standalone platforms. | [optional] |
172
172
  | **redirect_url** | **String** | Custom redirect URL after OAuth completes (same-token platforms only) | [optional] |
173
173
  | **headless** | **Boolean** | Enable headless mode (same-token platforms only) | [optional][default to false] |
174
174
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **ads_platform** | **String** | The ads platform to disconnect | |
7
+ | **ads_platform** | **String** | The ads platform (optional, used for logging only) | [optional] |
8
8
 
9
9
  ## Example
10
10
 
@@ -13,7 +13,9 @@
13
13
  | **is_active** | **Boolean** | | [optional] |
14
14
  | **followers_count** | **Float** | Follower count (only included if user has analytics add-on) | [optional] |
15
15
  | **followers_last_updated** | **Time** | Last time follower count was updated (only included if user has analytics add-on) | [optional] |
16
- | **ads_status** | **String** | Ads connection status for this account. - &#x60;connected&#x60;: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - &#x60;not_connected&#x60;: Platform supports ads but requires a separate ads OAuth. Use &#x60;GET /v1/connect/{platform}/ads&#x60; to connect. - &#x60;not_available&#x60;: Platform does not support ads (e.g., YouTube, Reddit, Bluesky). | [optional] |
16
+ | **parent_account_id** | **String** | Reference to the parent posting SocialAccount. Set for ads accounts that share or derive from a posting account&#39;s OAuth token. null for standalone ads (Google Ads) and all posting accounts. | [optional] |
17
+ | **enabled** | **Boolean** | 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). Posting UI and scheduler ignore accounts with enabled: false. | [optional] |
18
+ | **ads_status** | **String** | **Deprecated.** With the new ads account model, ads accounts are separate SocialAccount documents. Check for accounts with ads platform values (metaads, linkedinads, pinterestads, tiktokads, xads, googleads) instead. Legacy behavior: - &#x60;connected&#x60;: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - &#x60;not_connected&#x60;: Platform supports ads but requires a separate ads OAuth. Use &#x60;GET /v1/connect/{platform}/ads&#x60; to connect. - &#x60;not_available&#x60;: Platform does not support ads (e.g., YouTube, Reddit, Bluesky). | [optional] |
17
19
  | **metadata** | **Object** | Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - &#x60;qualityRating&#x60;: Phone number quality rating from Meta (&#x60;GREEN&#x60;, &#x60;YELLOW&#x60;, &#x60;RED&#x60;, or &#x60;UNKNOWN&#x60;) - &#x60;nameStatus&#x60;: Display name review status (&#x60;APPROVED&#x60;, &#x60;PENDING_REVIEW&#x60;, &#x60;DECLINED&#x60;, or &#x60;NONE&#x60;). Messages cannot be sent until the display name is approved by Meta. - &#x60;messagingLimitTier&#x60;: Maximum unique business-initiated conversations per 24h rolling window (&#x60;TIER_250&#x60;, &#x60;TIER_1K&#x60;, &#x60;TIER_10K&#x60;, &#x60;TIER_100K&#x60;, or &#x60;TIER_UNLIMITED&#x60;). Scales automatically as quality rating improves. - &#x60;verifiedName&#x60;: Meta-verified business display name - &#x60;displayPhoneNumber&#x60;: Formatted phone number (e.g., \&quot;+1 555-123-4567\&quot;) - &#x60;wabaId&#x60;: WhatsApp Business Account ID - &#x60;phoneNumberId&#x60;: Meta phone number ID | [optional] |
18
20
 
19
21
  ## Example
@@ -31,6 +33,8 @@ instance = Late::SocialAccount.new(
31
33
  is_active: null,
32
34
  followers_count: null,
33
35
  followers_last_updated: null,
36
+ parent_account_id: null,
37
+ enabled: null,
34
38
  ads_status: null,
35
39
  metadata: null
36
40
  )
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **draft** | **Boolean** | When true, sends the post to the TikTok Creator Inbox as a draft instead of publishing immediately. | [optional] |
7
+ | **draft** | **Boolean** | When true, sends the post to the TikTok Creator Inbox as a draft instead of publishing immediately. The creator receives an inbox notification to complete posting via TikTok&#39;s editing flow. Maps to TikTok API &#x60;post_mode: \&quot;MEDIA_UPLOAD\&quot;&#x60; (photos) or the dedicated inbox endpoint (videos). When false or omitted, publishes directly via &#x60;post_mode: \&quot;DIRECT_POST\&quot;&#x60;. Note: &#x60;publish_type&#x60; is not a supported field. Use this field instead. | [optional] |
8
8
  | **privacy_level** | **String** | One of the values returned by the TikTok creator info API for the account | [optional] |
9
9
  | **allow_comment** | **Boolean** | Allow comments on the post | [optional] |
10
10
  | **allow_duet** | **Boolean** | Allow duets (required for video posts) | [optional] |
@@ -83,23 +83,23 @@ module Late
83
83
  end
84
84
 
85
85
  # Disconnect ads from an account
86
- # Disconnects ads from a social account without removing the posting connection. **Same-token platforms** (metaads, linkedinads, pinterestads): Sets an `adsOptOut` flag. The posting account and OAuth token are preserved. Reconnecting ads clears the flag. **Separate-token platforms** (tiktokads, xads): Clears the ads-specific metadata (marketing API tokens). The posting account stays intact. **Standalone platforms** (googleads): Do not use this endpoint. Use `DELETE /v1/accounts/{accountId}` instead, since Google Ads accounts are standalone.
87
- # @param account_id [String] The SocialAccount ID (parent posting account for same-token/separate-token platforms)
88
- # @param disconnect_ads_request [DisconnectAdsRequest]
86
+ # **Deprecated.** Ads accounts are now standalone SocialAccount documents. Use `DELETE /v1/accounts/{accountId}` instead, passing the ads account's own ID. This endpoint is kept for backward compatibility. It soft-deletes the ads SocialAccount identified by `accountId` (which must be an ads account, not a posting account). The parent posting account is left untouched.
87
+ # @param account_id [String] The ads SocialAccount ID to disconnect
89
88
  # @param [Hash] opts the optional parameters
89
+ # @option opts [DisconnectAdsRequest] :disconnect_ads_request
90
90
  # @return [DeleteAccountGroup200Response]
91
- def disconnect_ads(account_id, disconnect_ads_request, opts = {})
92
- data, _status_code, _headers = disconnect_ads_with_http_info(account_id, disconnect_ads_request, opts)
91
+ def disconnect_ads(account_id, opts = {})
92
+ data, _status_code, _headers = disconnect_ads_with_http_info(account_id, opts)
93
93
  data
94
94
  end
95
95
 
96
96
  # Disconnect ads from an account
97
- # Disconnects ads from a social account without removing the posting connection. **Same-token platforms** (metaads, linkedinads, pinterestads): Sets an &#x60;adsOptOut&#x60; flag. The posting account and OAuth token are preserved. Reconnecting ads clears the flag. **Separate-token platforms** (tiktokads, xads): Clears the ads-specific metadata (marketing API tokens). The posting account stays intact. **Standalone platforms** (googleads): Do not use this endpoint. Use &#x60;DELETE /v1/accounts/{accountId}&#x60; instead, since Google Ads accounts are standalone.
98
- # @param account_id [String] The SocialAccount ID (parent posting account for same-token/separate-token platforms)
99
- # @param disconnect_ads_request [DisconnectAdsRequest]
97
+ # **Deprecated.** Ads accounts are now standalone SocialAccount documents. Use &#x60;DELETE /v1/accounts/{accountId}&#x60; instead, passing the ads account&#39;s own ID. This endpoint is kept for backward compatibility. It soft-deletes the ads SocialAccount identified by &#x60;accountId&#x60; (which must be an ads account, not a posting account). The parent posting account is left untouched.
98
+ # @param account_id [String] The ads SocialAccount ID to disconnect
100
99
  # @param [Hash] opts the optional parameters
100
+ # @option opts [DisconnectAdsRequest] :disconnect_ads_request
101
101
  # @return [Array<(DeleteAccountGroup200Response, Integer, Hash)>] DeleteAccountGroup200Response data, response status code and response headers
102
- def disconnect_ads_with_http_info(account_id, disconnect_ads_request, opts = {})
102
+ def disconnect_ads_with_http_info(account_id, opts = {})
103
103
  if @api_client.config.debugging
104
104
  @api_client.config.logger.debug 'Calling API: AccountsApi.disconnect_ads ...'
105
105
  end
@@ -107,10 +107,6 @@ module Late
107
107
  if @api_client.config.client_side_validation && account_id.nil?
108
108
  fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.disconnect_ads"
109
109
  end
110
- # verify the required parameter 'disconnect_ads_request' is set
111
- if @api_client.config.client_side_validation && disconnect_ads_request.nil?
112
- fail ArgumentError, "Missing the required parameter 'disconnect_ads_request' when calling AccountsApi.disconnect_ads"
113
- end
114
110
  # resource path
115
111
  local_var_path = '/v1/accounts/{accountId}/disconnect-ads'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
116
112
 
@@ -131,7 +127,7 @@ module Late
131
127
  form_params = opts[:form_params] || {}
132
128
 
133
129
  # http body (model)
134
- post_body = opts[:debug_body] || @api_client.object_to_http_body(disconnect_ads_request)
130
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'disconnect_ads_request'])
135
131
 
136
132
  # return_type
137
133
  return_type = opts[:debug_return_type] || 'DeleteAccountGroup200Response'
@@ -84,11 +84,11 @@ module Late
84
84
  end
85
85
 
86
86
  # Connect ads for a platform
87
- # Unified ads connection endpoint. Handles all platforms through a single route: **Same-token platforms** (facebook, instagram, linkedin, pinterest): If a posting account already exists, returns `alreadyConnected: true` immediately (no extra OAuth needed). If not, starts the normal OAuth flow, and the resulting account supports both posting and ads. **Separate-token platforms** (tiktok, twitter): Requires an existing posting account (`accountId` param). If ads are already connected, returns `alreadyConnected: true`. Otherwise, starts the platform-specific marketing API OAuth flow. **Ads-only platforms** (googleads): If a Google Ads account exists, returns `alreadyConnected: true`. Otherwise, starts the Google Ads OAuth flow. Use the `adsStatus` field from `GET /v1/accounts` to check which accounts need ads connection.
87
+ # Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Same-token platforms** (facebook, instagram, linkedin, pinterest): Creates an ads SocialAccount (`metaads`, `linkedinads`, `pinterestads`) with a copied OAuth token from the parent posting account. If the ads account already exists, returns `alreadyConnected: true`. No extra OAuth needed. **Separate-token platforms** (tiktok, twitter): Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (`tiktokads`, `xads`) with its own token. Requires an existing posting account (`accountId` param). If the ads account already exists, returns `alreadyConnected: true`. **Standalone platforms** (googleads): Starts the Google Ads OAuth flow and creates a standalone ads SocialAccount (`googleads`) with no parent. If the account already exists, returns `alreadyConnected: true`. Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., `metaads`, `tiktokads`) in `GET /v1/accounts`.
88
88
  # @param platform [String] Platform to connect ads for. Only platforms with ads support are accepted.
89
89
  # @param profile_id [String] Your Zernio profile ID
90
90
  # @param [Hash] opts the optional parameters
91
- # @option opts [String] :account_id Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and ads-only platforms.
91
+ # @option opts [String] :account_id Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and standalone platforms.
92
92
  # @option opts [String] :redirect_url Custom redirect URL after OAuth completes (same-token platforms only)
93
93
  # @option opts [Boolean] :headless Enable headless mode (same-token platforms only) (default to false)
94
94
  # @return [ConnectAds200Response]
@@ -98,11 +98,11 @@ module Late
98
98
  end
99
99
 
100
100
  # Connect ads for a platform
101
- # Unified ads connection endpoint. Handles all platforms through a single route: **Same-token platforms** (facebook, instagram, linkedin, pinterest): If a posting account already exists, returns &#x60;alreadyConnected: true&#x60; immediately (no extra OAuth needed). If not, starts the normal OAuth flow, and the resulting account supports both posting and ads. **Separate-token platforms** (tiktok, twitter): Requires an existing posting account (&#x60;accountId&#x60; param). If ads are already connected, returns &#x60;alreadyConnected: true&#x60;. Otherwise, starts the platform-specific marketing API OAuth flow. **Ads-only platforms** (googleads): If a Google Ads account exists, returns &#x60;alreadyConnected: true&#x60;. Otherwise, starts the Google Ads OAuth flow. Use the &#x60;adsStatus&#x60; field from &#x60;GET /v1/accounts&#x60; to check which accounts need ads connection.
101
+ # Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Same-token platforms** (facebook, instagram, linkedin, pinterest): Creates an ads SocialAccount (&#x60;metaads&#x60;, &#x60;linkedinads&#x60;, &#x60;pinterestads&#x60;) with a copied OAuth token from the parent posting account. If the ads account already exists, returns &#x60;alreadyConnected: true&#x60;. No extra OAuth needed. **Separate-token platforms** (tiktok, twitter): Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (&#x60;tiktokads&#x60;, &#x60;xads&#x60;) with its own token. Requires an existing posting account (&#x60;accountId&#x60; param). If the ads account already exists, returns &#x60;alreadyConnected: true&#x60;. **Standalone platforms** (googleads): Starts the Google Ads OAuth flow and creates a standalone ads SocialAccount (&#x60;googleads&#x60;) with no parent. If the account already exists, returns &#x60;alreadyConnected: true&#x60;. Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., &#x60;metaads&#x60;, &#x60;tiktokads&#x60;) in &#x60;GET /v1/accounts&#x60;.
102
102
  # @param platform [String] Platform to connect ads for. Only platforms with ads support are accepted.
103
103
  # @param profile_id [String] Your Zernio profile ID
104
104
  # @param [Hash] opts the optional parameters
105
- # @option opts [String] :account_id Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and ads-only platforms.
105
+ # @option opts [String] :account_id Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and standalone platforms.
106
106
  # @option opts [String] :redirect_url Custom redirect URL after OAuth completes (same-token platforms only)
107
107
  # @option opts [Boolean] :headless Enable headless mode (same-token platforms only) (default to false)
108
108
  # @return [Array<(ConnectAds200Response, Integer, Hash)>] ConnectAds200Response data, response status code and response headers
@@ -36,7 +36,13 @@ module Late
36
36
  # Last time follower count was updated (only included if user has analytics add-on)
37
37
  attr_accessor :followers_last_updated
38
38
 
39
- # Ads connection status for this account. - `connected`: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - `not_connected`: Platform supports ads but requires a separate ads OAuth. Use `GET /v1/connect/{platform}/ads` to connect. - `not_available`: Platform does not support ads (e.g., YouTube, Reddit, Bluesky).
39
+ # Reference to the parent posting SocialAccount. Set for ads accounts that share or derive from a posting account's OAuth token. null for standalone ads (Google Ads) and all posting accounts.
40
+ attr_accessor :parent_account_id
41
+
42
+ # 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). Posting UI and scheduler ignore accounts with enabled: false.
43
+ attr_accessor :enabled
44
+
45
+ # **Deprecated.** With the new ads account model, ads accounts are separate SocialAccount documents. Check for accounts with ads platform values (metaads, linkedinads, pinterestads, tiktokads, xads, googleads) instead. Legacy behavior: - `connected`: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - `not_connected`: Platform supports ads but requires a separate ads OAuth. Use `GET /v1/connect/{platform}/ads` to connect. - `not_available`: Platform does not support ads (e.g., YouTube, Reddit, Bluesky).
40
46
  attr_accessor :ads_status
41
47
 
42
48
  # 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`). Messages cannot be sent until the display name is approved by Meta. - `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
@@ -94,6 +100,8 @@ module Late
94
100
  :'is_active' => :'isActive',
95
101
  :'followers_count' => :'followersCount',
96
102
  :'followers_last_updated' => :'followersLastUpdated',
103
+ :'parent_account_id' => :'parentAccountId',
104
+ :'enabled' => :'enabled',
97
105
  :'ads_status' => :'adsStatus',
98
106
  :'metadata' => :'metadata',
99
107
  :'profile_picture' => :'profilePicture',
@@ -128,6 +136,8 @@ module Late
128
136
  :'is_active' => :'Boolean',
129
137
  :'followers_count' => :'Float',
130
138
  :'followers_last_updated' => :'Time',
139
+ :'parent_account_id' => :'String',
140
+ :'enabled' => :'Boolean',
131
141
  :'ads_status' => :'String',
132
142
  :'metadata' => :'Object',
133
143
  :'profile_picture' => :'String',
@@ -205,6 +215,14 @@ module Late
205
215
  self.followers_last_updated = attributes[:'followers_last_updated']
206
216
  end
207
217
 
218
+ if attributes.key?(:'parent_account_id')
219
+ self.parent_account_id = attributes[:'parent_account_id']
220
+ end
221
+
222
+ if attributes.key?(:'enabled')
223
+ self.enabled = attributes[:'enabled']
224
+ end
225
+
208
226
  if attributes.key?(:'ads_status')
209
227
  self.ads_status = attributes[:'ads_status']
210
228
  end
@@ -254,11 +272,23 @@ module Late
254
272
  # @return true if the model is valid
255
273
  def valid?
256
274
  warn '[DEPRECATED] the `valid?` method is obsolete'
275
+ platform_validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads"])
276
+ return false unless platform_validator.valid?(@platform)
257
277
  ads_status_validator = EnumAttributeValidator.new('String', ["connected", "not_connected", "not_available"])
258
278
  return false unless ads_status_validator.valid?(@ads_status)
259
279
  true
260
280
  end
261
281
 
282
+ # Custom attribute writer method checking allowed values (enum).
283
+ # @param [Object] platform Object to be assigned
284
+ def platform=(platform)
285
+ validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads"])
286
+ unless validator.valid?(platform)
287
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
288
+ end
289
+ @platform = platform
290
+ end
291
+
262
292
  # Custom attribute writer method checking allowed values (enum).
263
293
  # @param [Object] ads_status Object to be assigned
264
294
  def ads_status=(ads_status)
@@ -283,6 +313,8 @@ module Late
283
313
  is_active == o.is_active &&
284
314
  followers_count == o.followers_count &&
285
315
  followers_last_updated == o.followers_last_updated &&
316
+ parent_account_id == o.parent_account_id &&
317
+ enabled == o.enabled &&
286
318
  ads_status == o.ads_status &&
287
319
  metadata == o.metadata &&
288
320
  profile_picture == o.profile_picture &&
@@ -303,7 +335,7 @@ module Late
303
335
  # Calculates hash code according to all attributes.
304
336
  # @return [Integer] Hash code
305
337
  def hash
306
- [_id, platform, profile_id, username, display_name, profile_url, is_active, followers_count, followers_last_updated, ads_status, metadata, profile_picture, current_followers, last_updated, growth, growth_percentage, data_points, account_stats].hash
338
+ [_id, platform, profile_id, username, display_name, profile_url, is_active, followers_count, followers_last_updated, parent_account_id, enabled, ads_status, metadata, profile_picture, current_followers, last_updated, growth, growth_percentage, data_points, account_stats].hash
307
339
  end
308
340
 
309
341
  # Builds the object from hash
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Late
17
17
  class DisconnectAdsRequest < ApiModelBase
18
- # The ads platform to disconnect
18
+ # The ads platform (optional, used for logging only)
19
19
  attr_accessor :ads_platform
20
20
 
21
21
  class EnumAttributeValidator
@@ -88,8 +88,6 @@ module Late
88
88
 
89
89
  if attributes.key?(:'ads_platform')
90
90
  self.ads_platform = attributes[:'ads_platform']
91
- else
92
- self.ads_platform = nil
93
91
  end
94
92
  end
95
93
 
@@ -98,10 +96,6 @@ module Late
98
96
  def list_invalid_properties
99
97
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
98
  invalid_properties = Array.new
101
- if @ads_platform.nil?
102
- invalid_properties.push('invalid value for "ads_platform", ads_platform cannot be nil.')
103
- end
104
-
105
99
  invalid_properties
106
100
  end
107
101
 
@@ -109,7 +103,6 @@ module Late
109
103
  # @return true if the model is valid
110
104
  def valid?
111
105
  warn '[DEPRECATED] the `valid?` method is obsolete'
112
- return false if @ads_platform.nil?
113
106
  ads_platform_validator = EnumAttributeValidator.new('String', ["metaads", "linkedinads", "pinterestads", "tiktokads", "xads"])
114
107
  return false unless ads_platform_validator.valid?(@ads_platform)
115
108
  true
@@ -36,7 +36,13 @@ module Late
36
36
  # Last time follower count was updated (only included if user has analytics add-on)
37
37
  attr_accessor :followers_last_updated
38
38
 
39
- # Ads connection status for this account. - `connected`: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - `not_connected`: Platform supports ads but requires a separate ads OAuth. Use `GET /v1/connect/{platform}/ads` to connect. - `not_available`: Platform does not support ads (e.g., YouTube, Reddit, Bluesky).
39
+ # Reference to the parent posting SocialAccount. Set for ads accounts that share or derive from a posting account's OAuth token. null for standalone ads (Google Ads) and all posting accounts.
40
+ attr_accessor :parent_account_id
41
+
42
+ # 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). Posting UI and scheduler ignore accounts with enabled: false.
43
+ attr_accessor :enabled
44
+
45
+ # **Deprecated.** With the new ads account model, ads accounts are separate SocialAccount documents. Check for accounts with ads platform values (metaads, linkedinads, pinterestads, tiktokads, xads, googleads) instead. Legacy behavior: - `connected`: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - `not_connected`: Platform supports ads but requires a separate ads OAuth. Use `GET /v1/connect/{platform}/ads` to connect. - `not_available`: Platform does not support ads (e.g., YouTube, Reddit, Bluesky).
40
46
  attr_accessor :ads_status
41
47
 
42
48
  # 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`). Messages cannot be sent until the display name is approved by Meta. - `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
@@ -76,6 +82,8 @@ module Late
76
82
  :'is_active' => :'isActive',
77
83
  :'followers_count' => :'followersCount',
78
84
  :'followers_last_updated' => :'followersLastUpdated',
85
+ :'parent_account_id' => :'parentAccountId',
86
+ :'enabled' => :'enabled',
79
87
  :'ads_status' => :'adsStatus',
80
88
  :'metadata' => :'metadata'
81
89
  }
@@ -103,6 +111,8 @@ module Late
103
111
  :'is_active' => :'Boolean',
104
112
  :'followers_count' => :'Float',
105
113
  :'followers_last_updated' => :'Time',
114
+ :'parent_account_id' => :'String',
115
+ :'enabled' => :'Boolean',
106
116
  :'ads_status' => :'String',
107
117
  :'metadata' => :'Object'
108
118
  }
@@ -166,6 +176,14 @@ module Late
166
176
  self.followers_last_updated = attributes[:'followers_last_updated']
167
177
  end
168
178
 
179
+ if attributes.key?(:'parent_account_id')
180
+ self.parent_account_id = attributes[:'parent_account_id']
181
+ end
182
+
183
+ if attributes.key?(:'enabled')
184
+ self.enabled = attributes[:'enabled']
185
+ end
186
+
169
187
  if attributes.key?(:'ads_status')
170
188
  self.ads_status = attributes[:'ads_status']
171
189
  end
@@ -187,11 +205,23 @@ module Late
187
205
  # @return true if the model is valid
188
206
  def valid?
189
207
  warn '[DEPRECATED] the `valid?` method is obsolete'
208
+ platform_validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads"])
209
+ return false unless platform_validator.valid?(@platform)
190
210
  ads_status_validator = EnumAttributeValidator.new('String', ["connected", "not_connected", "not_available"])
191
211
  return false unless ads_status_validator.valid?(@ads_status)
192
212
  true
193
213
  end
194
214
 
215
+ # Custom attribute writer method checking allowed values (enum).
216
+ # @param [Object] platform Object to be assigned
217
+ def platform=(platform)
218
+ validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads"])
219
+ unless validator.valid?(platform)
220
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
221
+ end
222
+ @platform = platform
223
+ end
224
+
195
225
  # Custom attribute writer method checking allowed values (enum).
196
226
  # @param [Object] ads_status Object to be assigned
197
227
  def ads_status=(ads_status)
@@ -216,6 +246,8 @@ module Late
216
246
  is_active == o.is_active &&
217
247
  followers_count == o.followers_count &&
218
248
  followers_last_updated == o.followers_last_updated &&
249
+ parent_account_id == o.parent_account_id &&
250
+ enabled == o.enabled &&
219
251
  ads_status == o.ads_status &&
220
252
  metadata == o.metadata
221
253
  end
@@ -229,7 +261,7 @@ module Late
229
261
  # Calculates hash code according to all attributes.
230
262
  # @return [Integer] Hash code
231
263
  def hash
232
- [_id, platform, profile_id, username, display_name, profile_url, is_active, followers_count, followers_last_updated, ads_status, metadata].hash
264
+ [_id, platform, profile_id, username, display_name, profile_url, is_active, followers_count, followers_last_updated, parent_account_id, enabled, ads_status, metadata].hash
233
265
  end
234
266
 
235
267
  # Builds the object from hash
@@ -14,9 +14,9 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Late
17
- # Photo carousels up to 35 images. Video titles up to 2200 chars, photo titles truncated to 90 chars. privacyLevel must match creator_info options. Both camelCase and snake_case accepted.
17
+ # Photo carousels up to 35 images. Video titles up to 2200 chars, photo titles truncated to 90 chars. privacyLevel must match creator_info options. Both camelCase and snake_case accepted. **Creator Inbox (draft mode):** Set `draft: true` to send content to the TikTok Creator Inbox instead of publishing immediately. The creator receives an inbox notification and completes the post using TikTok's editing flow. This maps to TikTok's `post_mode: \"MEDIA_UPLOAD\"` internally. **Important:** The field `publish_type` is NOT supported. Use `draft: true` for Creator Inbox flow. **Photo drafts** use the `/v2/post/publish/content/init/` endpoint with `post_mode: \"MEDIA_UPLOAD\"`. **Video drafts** use the dedicated `/v2/post/publish/inbox/video/init/` endpoint. When `draft: true`, the `video.upload` scope is required. When `draft` is false or omitted (direct post), the `video.publish` scope is required. For Creator Inbox, TikTok app version must be 31.8 or higher.
18
18
  class TikTokPlatformData < ApiModelBase
19
- # When true, sends the post to the TikTok Creator Inbox as a draft instead of publishing immediately.
19
+ # When true, sends the post to the TikTok Creator Inbox as a draft instead of publishing immediately. The creator receives an inbox notification to complete posting via TikTok's editing flow. Maps to TikTok API `post_mode: \"MEDIA_UPLOAD\"` (photos) or the dedicated inbox endpoint (videos). When false or omitted, publishes directly via `post_mode: \"DIRECT_POST\"`. Note: `publish_type` is not a supported field. Use this field instead.
20
20
  attr_accessor :draft
21
21
 
22
22
  # One of the values returned by the TikTok creator info API for the account
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Late
14
- VERSION = '0.0.122'
14
+ VERSION = '0.0.123'
15
15
  end