late-sdk 0.0.914 → 0.0.916
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 +4 -1
- data/docs/ConnectApi.md +17 -13
- data/docs/CreateAdCampaignRequest.md +1 -1
- data/docs/CreateStandaloneAdRequest.md +1 -1
- data/docs/SelectFacebookPage200Response.md +1 -1
- data/docs/SelectFacebookPageRequest.md +39 -16
- data/docs/SelectFacebookPageRequestOneOf.md +26 -0
- data/docs/SelectFacebookPageRequestOneOf1.md +20 -0
- data/docs/SelectFacebookPageRequestOneOfNot.md +18 -0
- data/docs/{SelectFacebookPageRequestUserProfile.md → SelectFacebookPageRequestOneOfUserProfile.md} +2 -2
- data/lib/zernio-sdk/api/connect_api.rb +20 -25
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +3 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +3 -1
- data/lib/zernio-sdk/models/select_facebook_page200_response.rb +1 -1
- data/lib/zernio-sdk/models/select_facebook_page_request.rb +78 -229
- data/lib/zernio-sdk/models/select_facebook_page_request_one_of.rb +255 -0
- data/lib/zernio-sdk/models/select_facebook_page_request_one_of1.rb +203 -0
- data/lib/zernio-sdk/models/select_facebook_page_request_one_of_not.rb +150 -0
- data/lib/zernio-sdk/models/{select_facebook_page_request_user_profile.rb → select_facebook_page_request_one_of_user_profile.rb} +4 -4
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +4 -1
- data/openapi.yaml +67 -41
- data/spec/api/connect_api_spec.rb +7 -6
- data/spec/models/select_facebook_page_request_one_of1_spec.rb +42 -0
- data/spec/models/select_facebook_page_request_one_of_not_spec.rb +36 -0
- data/spec/models/select_facebook_page_request_one_of_spec.rb +60 -0
- data/spec/models/{select_facebook_page_request_user_profile_spec.rb → select_facebook_page_request_one_of_user_profile_spec.rb} +6 -6
- data/spec/models/select_facebook_page_request_spec.rb +5 -33
- data/zernio-sdk-0.0.916.gem +0 -0
- metadata +18 -6
- data/zernio-sdk-0.0.914.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60bc4fa5202828df4220ea170b3f725ade0e035bca00a4af72fdf9221026b3b3
|
|
4
|
+
data.tar.gz: 02c9adc7f7c011bc691c4ffe25b5db6727a0f1893606bed097d14052e4691341
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53c47649998e3e3c06734599c01e288667bef46b9ea814e60476fdeeffd242c6afbb7f87dc9972459251b2de79b5fb0c0575e24d95f590b9a628840b114218f1
|
|
7
|
+
data.tar.gz: 98613ea559d3e0509bddb2666c16a3e8d396a27cdbb9e268b76444cb94cf12e5bf171bb373753a4f216d7cd3f2b55aa3cd7ee765b66cd0704dbb9fe39d7016e0
|
data/README.md
CHANGED
|
@@ -2221,7 +2221,10 @@ Class | Method | HTTP request | Description
|
|
|
2221
2221
|
- [Zernio::SelectFacebookPage200ResponseAccount](docs/SelectFacebookPage200ResponseAccount.md)
|
|
2222
2222
|
- [Zernio::SelectFacebookPage409Response](docs/SelectFacebookPage409Response.md)
|
|
2223
2223
|
- [Zernio::SelectFacebookPageRequest](docs/SelectFacebookPageRequest.md)
|
|
2224
|
-
- [Zernio::
|
|
2224
|
+
- [Zernio::SelectFacebookPageRequestOneOf](docs/SelectFacebookPageRequestOneOf.md)
|
|
2225
|
+
- [Zernio::SelectFacebookPageRequestOneOf1](docs/SelectFacebookPageRequestOneOf1.md)
|
|
2226
|
+
- [Zernio::SelectFacebookPageRequestOneOfNot](docs/SelectFacebookPageRequestOneOfNot.md)
|
|
2227
|
+
- [Zernio::SelectFacebookPageRequestOneOfUserProfile](docs/SelectFacebookPageRequestOneOfUserProfile.md)
|
|
2225
2228
|
- [Zernio::SelectGoogleBusinessLocation200Response](docs/SelectGoogleBusinessLocation200Response.md)
|
|
2226
2229
|
- [Zernio::SelectGoogleBusinessLocation200ResponseAccount](docs/SelectGoogleBusinessLocation200ResponseAccount.md)
|
|
2227
2230
|
- [Zernio::SelectGoogleBusinessLocationRequest](docs/SelectGoogleBusinessLocationRequest.md)
|
data/docs/ConnectApi.md
CHANGED
|
@@ -135,7 +135,7 @@ end
|
|
|
135
135
|
|
|
136
136
|
Complete Meta business login
|
|
137
137
|
|
|
138
|
-
Facebook Login for Business redirect target. Meta supplies the single-use authorization code and the authenticated state returned by connectAds. The state expires after 30 minutes and binds the user, profile, Page selection and ad-account scope. No bearer token is sent by the browser. Success reconnects only metaads and redirects to the original redirect_url. Invalid state returns 400; inaccessible profiles or missing ads access cannot connect. No token is returned to the browser.
|
|
138
|
+
Facebook Login for Business redirect target. Meta supplies the single-use authorization code and the authenticated state returned by connectAds. The state expires after 30 minutes and binds the user, profile, Page selection and ad-account scope. No bearer token is sent by the browser. Success reconnects only metaads and redirects to the original redirect_url. Invalid state returns 400; inaccessible profiles or missing ads access cannot connect. Dashboard logins with several Pages redirect to the Facebook Page picker with an encrypted selectionToken valid for ten minutes. Listing and selecting require the initiating user and current profile access. No plaintext platform token is returned to the browser.
|
|
139
139
|
|
|
140
140
|
### Examples
|
|
141
141
|
|
|
@@ -415,7 +415,7 @@ end
|
|
|
415
415
|
|
|
416
416
|
Connect ads for a platform
|
|
417
417
|
|
|
418
|
-
Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Meta business login (opt-in).** Set `loginMode=business` for `facebook` or `instagram` to use Facebook Login for Business and a Business Integration System User token. No posting account is created or required. This mode always returns an authUrl; it returns 503 when the server has no META_ADS_CONFIG_ID. Complete the dialog in a browser. The callback creates or reconnects only the metaads account, preserving its ID, history and scopedAdAccountIds. Non-empty successful subscription results replace subscribedAdAccountIds to remove stale grants; an empty result leaves routing unchanged. A reconnect must grant every previously scoped ad account (or every previous grant for an unscoped connection). Missing or unverifiable grants return 409 before changing the account. Pass `pageId` to select a granted Page for creatives and lead forms.
|
|
418
|
+
Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Meta business login (opt-in).** Set `loginMode=business` for `facebook` or `instagram` to use Facebook Login for Business and a Business Integration System User token. No posting account is created or required. This mode always returns an authUrl; it returns 503 when the server has no META_ADS_CONFIG_ID. Complete the dialog in a browser. The callback creates or reconnects only the metaads account, preserving its ID, history and scopedAdAccountIds. Non-empty successful subscription results replace subscribedAdAccountIds to remove stale grants; an empty result leaves routing unchanged. A reconnect must grant every previously scoped ad account (or every previous grant for an unscoped connection). Missing or unverifiable grants return 409 before changing the account. Pass `pageId` to select a granted Page for creatives and lead forms. API integrations otherwise reuse the previous Page or sole granted Page. Multiple Pages without a selection return 400 with available Page IDs for API integrations; restart with pageId. Dashboard session logins use the sole current grant automatically or open the existing Facebook Page picker for several grants, including reconnects. Selection completes the Meta Ads connection. With no Pages granted the callback returns 400 with instructions to connect again and grant a Page. Success redirects with connected=metaads, profileId and accountId. Business login reports metadata.tokenType=system-user in GET /v1/accounts. An absent Meta expires_in leaves tokenExpiresAt absent; no personal-token re-exchange occurs. Subsequent classic requests can change the ad-account scope using the business token; force=true requires loginMode=business to reconnect that connection. **Same-token platforms (facebook, instagram, linkedin, pinterest).** The ads SocialAccount (metaads, linkedinads, pinterestads) reuses the OAuth token of the parent posting account, but only when an active parent exists and, for facebook and instagram, its stored token carries ads_management and ads_read (linkedin and pinterest need no extra scope). In that case no extra OAuth happens and the response is alreadyConnected: true. When no such parent exists, or the scopes are missing, the endpoint returns an authUrl and a full OAuth round trip is required. When a parent exists but carries no token usable for ad accounts, the call fails with 400 RECONNECT_REQUIRED. Independently of the branch, the call can return 403 ADS_ADDON_REQUIRED without the ads add-on and 402 PAYMENT_REQUIRED when the billing gate is closed. Meta Ads prerequisite: connecting Meta Ads (via facebook or instagram) requires a Facebook Page. Not because the ad account is read through a Page, but because both parent posting accounts are: the facebook flow only offers Pages you manage, and the instagram flow with loginMethod=facebook_login only offers Instagram accounts linked to one of those Pages. Without a Page there is no parent account to inherit a token from. A user who manages no Facebook Page cannot complete this connection, and the facebook flow ends with error=no_facebook_pages. **Separate-token platforms (tiktok, twitter).** Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (tiktokads, xads) with its own token. If the ads account already exists, returns alreadyConnected: true. - tiktok: accountId is OPTIONAL. With accountId, the new tiktokads account links to that posting account (parentAccountId set), so Spark Ads + standalone ads using the posting TT_USER identity become available. Without accountId, ads-only mode kicks in: the new tiktokads account has parentAccountId=null and standalone ads use a synthetic CUSTOMIZED_USER (\"Brand Identity\"); Spark Ads are unavailable because TikTok requires a posting account for them. The Brand Identity is configured separately via PATCH /v1/connect/tiktok-ads (or inline on POST /v1/ads/create via the brandIdentity field). - twitter (X Ads): accountId is REQUIRED. There's no ads-only mode, because tweets need to be authored by a real X user. **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.
|
|
419
419
|
|
|
420
420
|
### Examples
|
|
421
421
|
|
|
@@ -2215,11 +2215,11 @@ end
|
|
|
2215
2215
|
|
|
2216
2216
|
## list_facebook_pages
|
|
2217
2217
|
|
|
2218
|
-
> <ListFacebookPages200Response> list_facebook_pages(
|
|
2218
|
+
> <ListFacebookPages200Response> list_facebook_pages(opts)
|
|
2219
2219
|
|
|
2220
2220
|
List Facebook pages
|
|
2221
2221
|
|
|
2222
|
-
Returns
|
|
2222
|
+
Returns Facebook Pages after OAuth. Classic connections require profileId and tempToken from the OAuth redirect. Use X-Connect-Token for headless connections. The dashboard business-login picker instead sends only selectionToken, an encrypted grant valid for ten minutes. This requires the initiating user and current profile access and returns only Page IDs and names. X-Connect-Token cannot authorize business selection.
|
|
2223
2223
|
|
|
2224
2224
|
### Examples
|
|
2225
2225
|
|
|
@@ -2238,12 +2238,15 @@ Zernio.configure do |config|
|
|
|
2238
2238
|
end
|
|
2239
2239
|
|
|
2240
2240
|
api_instance = Zernio::ConnectApi.new
|
|
2241
|
-
|
|
2242
|
-
|
|
2241
|
+
opts = {
|
|
2242
|
+
profile_id: 'profile_id_example', # String | Profile ID from your classic connection flow. Required with tempToken.
|
|
2243
|
+
temp_token: 'temp_token_example', # String | Temporary Facebook access token from the classic OAuth callback. Required with profileId.
|
|
2244
|
+
selection_token: 'ENCRYPTED_SELECTION_TOKEN' # String | Encrypted dashboard business-login grant. Send alone instead of profileId and tempToken. Expires after ten minutes.
|
|
2245
|
+
}
|
|
2243
2246
|
|
|
2244
2247
|
begin
|
|
2245
2248
|
# List Facebook pages
|
|
2246
|
-
result = api_instance.list_facebook_pages(
|
|
2249
|
+
result = api_instance.list_facebook_pages(opts)
|
|
2247
2250
|
p result
|
|
2248
2251
|
rescue Zernio::ApiError => e
|
|
2249
2252
|
puts "Error when calling ConnectApi->list_facebook_pages: #{e}"
|
|
@@ -2254,12 +2257,12 @@ end
|
|
|
2254
2257
|
|
|
2255
2258
|
This returns an Array which contains the response data, status code and headers.
|
|
2256
2259
|
|
|
2257
|
-
> <Array(<ListFacebookPages200Response>, Integer, Hash)> list_facebook_pages_with_http_info(
|
|
2260
|
+
> <Array(<ListFacebookPages200Response>, Integer, Hash)> list_facebook_pages_with_http_info(opts)
|
|
2258
2261
|
|
|
2259
2262
|
```ruby
|
|
2260
2263
|
begin
|
|
2261
2264
|
# List Facebook pages
|
|
2262
|
-
data, status_code, headers = api_instance.list_facebook_pages_with_http_info(
|
|
2265
|
+
data, status_code, headers = api_instance.list_facebook_pages_with_http_info(opts)
|
|
2263
2266
|
p status_code # => 2xx
|
|
2264
2267
|
p headers # => { ... }
|
|
2265
2268
|
p data # => <ListFacebookPages200Response>
|
|
@@ -2272,8 +2275,9 @@ end
|
|
|
2272
2275
|
|
|
2273
2276
|
| Name | Type | Description | Notes |
|
|
2274
2277
|
| ---- | ---- | ----------- | ----- |
|
|
2275
|
-
| **profile_id** | **String** | Profile ID from your connection flow |
|
|
2276
|
-
| **temp_token** | **String** | Temporary Facebook access token from the OAuth callback
|
|
2278
|
+
| **profile_id** | **String** | Profile ID from your classic connection flow. Required with tempToken. | [optional] |
|
|
2279
|
+
| **temp_token** | **String** | Temporary Facebook access token from the classic OAuth callback. Required with profileId. | [optional] |
|
|
2280
|
+
| **selection_token** | **String** | Encrypted dashboard business-login grant. Send alone instead of profileId and tempToken. Expires after ten minutes. | [optional] |
|
|
2277
2281
|
|
|
2278
2282
|
### Return type
|
|
2279
2283
|
|
|
@@ -2824,7 +2828,7 @@ end
|
|
|
2824
2828
|
|
|
2825
2829
|
Select Facebook page
|
|
2826
2830
|
|
|
2827
|
-
Complete
|
|
2831
|
+
Complete a classic Facebook Page connection with profileId, pageId, tempToken and userProfile. Use X-Connect-Token for headless connections. The dashboard business-login picker instead sends only selectionToken and pageId to complete a Meta Ads connection. The server verifies the initiating user, profile access, current grants and connection eligibility. The profile, platform token, ad-account scope and return URL come only from the encrypted grant. Business selection requires a session or bearer authentication for the initiating user; X-Connect-Token is not accepted. It returns redirect_url with connected=metaads on success or an eligibility error redirect.
|
|
2828
2832
|
|
|
2829
2833
|
### Examples
|
|
2830
2834
|
|
|
@@ -2843,7 +2847,7 @@ Zernio.configure do |config|
|
|
|
2843
2847
|
end
|
|
2844
2848
|
|
|
2845
2849
|
api_instance = Zernio::ConnectApi.new
|
|
2846
|
-
select_facebook_page_request = Zernio::
|
|
2850
|
+
select_facebook_page_request = Zernio::SelectFacebookPageRequestOneOf.new({profile_id: 'profile_id_example', page_id: 'page_id_example', temp_token: 'temp_token_example', user_profile: Zernio::SelectFacebookPageRequestOneOfUserProfile.new}) # SelectFacebookPageRequest |
|
|
2847
2851
|
|
|
2848
2852
|
begin
|
|
2849
2853
|
# Select Facebook page
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
| **goal** | **String** | Mapped to the ODAX objective (same mapping as POST /v1/ads/create). | |
|
|
11
11
|
| **is_skadnetwork_attribution** | **Boolean** | Meta app promotion only. Immutable campaign flag. Set true for iOS 14+ SKAdNetwork campaigns and supply promotedObject.applicationId plus promotedObject.objectStoreUrl. The campaign receives promotedObject only when this flag is true. Cannot be changed on an existing campaign. | [optional] |
|
|
12
12
|
| **promoted_object** | [**AdPromotedObject**](AdPromotedObject.md) | | [optional] |
|
|
13
|
-
| **buying_type** | **String** | Meta only. SKAdNetwork app promotion requires AUCTION. | [optional] |
|
|
13
|
+
| **buying_type** | **String** | Meta only. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. SKAdNetwork app promotion requires AUCTION. | [optional][default to 'AUCTION'] |
|
|
14
14
|
| **validate_only** | **Boolean** | Meta only. Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED. | [optional] |
|
|
15
15
|
| **special_ad_categories** | **Array<String>** | | [optional] |
|
|
16
16
|
| **budget_amount** | **Float** | Campaign-level (CBO) budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Requires budgetType. | [optional] |
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
| **goal** | **String** | Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform. **Meta** - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion, or `customEventType: OTHER` + `customEventStr` to optimise against a pixel custom event. - `lead_conversion`: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, but with a leads-class event such as LEAD, SUBMIT_APPLICATION, SCHEDULE or CONTACT (or `promotedObject.customConversionId` to optimise against a Custom Conversion instead). Meta gates conversion events by objective, so leads-class events are rejected under `conversions`. - `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page. - `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`. - `catalog_sales`: Advantage+ catalog ads, for example vehicle inventory. Requires `promotedObject.productSetId`, `promotedObject.pixelId` and `promotedObject.customEventType`. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like {{product.name}} or {{vehicle.make}}. No imageUrl or video is sent; Meta renders the visuals per catalog item. Discover catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/{catalogId}/product-sets. Single shape only, no creatives[], adSetId, dynamicCreative or placementAssets. - `page_likes`: Page Likes conversion location under OUTCOME_ENGAGEMENT (destination_type ON_PAGE, optimization PAGE_LIKES). `promotedObject.pageId` is optional and auto-filled from the connected Page. The creative CTA is fixed to LIKE_PAGE targeting that Page; headline / body / linkUrl / callToAction / imageUrl / video are all optional (Meta derives the link and the Like button from the Page). **TikTok** - `conversions`: website-conversion ad group. Requires `promotedObject.pixelId`, your TikTok Pixel ID. Accepts an optional `promotedObject.customEventType` with a TikTok optimization_event code your pixel tracks (newer pixels use e.g. SHOPPING for purchase events; legacy pixels use ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER or FORM). To inherit pixel and event from an existing ad group, pass `adSetId` instead. **LinkedIn** - `engagement`, `traffic`, `awareness` and `video_views` create standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`. - `lead_generation`: requires `leadGenFormId` (an adForm ID from POST /v1/ads/lead-forms). The campaign objective is set to MAX_LEAD and the creative's `leadgenCallToAction` destination is set to `urn:li:adForm:{id}`. - `job_applicants` requires a `platformSpecificData.jobs` creative. - For `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost. **OpenAI Ads** - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422. | [optional] |
|
|
15
15
|
| **optimization_goal** | **String** | Meta only. Explicit ad-set `optimization_goal` (e.g. `LANDING_PAGE_VIEWS`, `LINK_CLICKS`, `REACH`, `IMPRESSIONS`, `OFFSITE_CONVERSIONS`, `THRUPLAY`, `LEAD_GENERATION`). Overrides the default derived from `goal` (e.g. `traffic` defaults to `LINK_CLICKS`). Forwarded verbatim to Meta, which validates compatibility with the campaign objective and rejects incompatible combinations. | [optional] |
|
|
16
16
|
| **billing_event** | **String** | Meta only. Explicit ad-set `billing_event`. Defaults to `IMPRESSIONS`. Forwarded verbatim to Meta, which validates compatibility with the optimization goal. | [optional] |
|
|
17
|
-
| **buying_type** | **String** | Meta only. RESERVED = Reach & Frequency: requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative). | [optional] |
|
|
17
|
+
| **buying_type** | **String** | Meta only. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. Reusing existingCampaignId does not change the campaign. RESERVED = Reach & Frequency: requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative). | [optional][default to 'AUCTION'] |
|
|
18
18
|
| **rf_prediction_id** | **String** | Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id, so pass that one). Requires buyingType RESERVED. | [optional] |
|
|
19
19
|
| **promotion** | [**MetaPromotion**](MetaPromotion.md) | | [optional] |
|
|
20
20
|
| **creative_features** | **Hash<String, String>** | Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an enhancement; an explicit offer uses promotion. | [optional] |
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **message** | **String** | | [optional] |
|
|
8
|
-
| **redirect_url** | **String** | Redirect URL
|
|
8
|
+
| **redirect_url** | **String** | Redirect URL when a custom redirect_url was provided or a business Page was selected. | [optional] |
|
|
9
9
|
| **account** | [**SelectFacebookPage200ResponseAccount**](SelectFacebookPage200ResponseAccount.md) | | [optional] |
|
|
10
10
|
|
|
11
11
|
## Example
|
|
@@ -1,26 +1,49 @@
|
|
|
1
1
|
# Zernio::SelectFacebookPageRequest
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Class instance methods
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **profile_id** | **String** | Profile ID from your connection flow | |
|
|
8
|
-
| **page_id** | **String** | The Facebook Page ID selected by the user | |
|
|
9
|
-
| **temp_token** | **String** | Temporary Facebook access token from OAuth | |
|
|
10
|
-
| **user_profile** | [**SelectFacebookPageRequestUserProfile**](SelectFacebookPageRequestUserProfile.md) | | |
|
|
11
|
-
| **redirect_url** | **String** | Optional custom redirect URL to return to after selection | [optional] |
|
|
5
|
+
### `openapi_one_of`
|
|
12
6
|
|
|
13
|
-
|
|
7
|
+
Returns the list of classes defined in oneOf.
|
|
8
|
+
|
|
9
|
+
#### Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
Zernio::SelectFacebookPageRequest.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'SelectFacebookPageRequestOneOf',
|
|
18
|
+
# :'SelectFacebookPageRequestOneOf1'
|
|
19
|
+
# ]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### build
|
|
23
|
+
|
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
|
25
|
+
|
|
26
|
+
#### Example
|
|
14
27
|
|
|
15
28
|
```ruby
|
|
16
29
|
require 'zernio-sdk'
|
|
17
30
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
redirect_url: null
|
|
24
|
-
)
|
|
31
|
+
Zernio::SelectFacebookPageRequest.build(data)
|
|
32
|
+
# => #<SelectFacebookPageRequestOneOf:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
Zernio::SelectFacebookPageRequest.build(data_that_doesnt_match)
|
|
35
|
+
# => nil
|
|
25
36
|
```
|
|
26
37
|
|
|
38
|
+
#### Parameters
|
|
39
|
+
|
|
40
|
+
| Name | Type | Description |
|
|
41
|
+
| ---- | ---- | ----------- |
|
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
|
43
|
+
|
|
44
|
+
#### Return type
|
|
45
|
+
|
|
46
|
+
- `SelectFacebookPageRequestOneOf`
|
|
47
|
+
- `SelectFacebookPageRequestOneOf1`
|
|
48
|
+
- `nil` (if no type matches)
|
|
49
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Zernio::SelectFacebookPageRequestOneOf
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **profile_id** | **String** | Profile ID from your classic connection flow. | |
|
|
8
|
+
| **page_id** | **String** | The Facebook Page ID selected by the user. | |
|
|
9
|
+
| **temp_token** | **String** | Temporary Facebook access token from OAuth. | |
|
|
10
|
+
| **user_profile** | [**SelectFacebookPageRequestOneOfUserProfile**](SelectFacebookPageRequestOneOfUserProfile.md) | | |
|
|
11
|
+
| **redirect_url** | **String** | Optional custom redirect URL to return to after selection. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'zernio-sdk'
|
|
17
|
+
|
|
18
|
+
instance = Zernio::SelectFacebookPageRequestOneOf.new(
|
|
19
|
+
profile_id: null,
|
|
20
|
+
page_id: null,
|
|
21
|
+
temp_token: null,
|
|
22
|
+
user_profile: null,
|
|
23
|
+
redirect_url: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::SelectFacebookPageRequestOneOf1
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **selection_token** | **String** | Encrypted dashboard business-login grant. Expires after ten minutes. | |
|
|
8
|
+
| **page_id** | **String** | A Page ID from the granted Pages returned by listFacebookPages. | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::SelectFacebookPageRequestOneOf1.new(
|
|
16
|
+
selection_token: ENCRYPTED_SELECTION_TOKEN,
|
|
17
|
+
page_id: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::SelectFacebookPageRequestOneOfNot
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **selection_token** | **Object** | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::SelectFacebookPageRequestOneOfNot.new(
|
|
15
|
+
selection_token: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/{SelectFacebookPageRequestUserProfile.md → SelectFacebookPageRequestOneOfUserProfile.md}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Zernio::
|
|
1
|
+
# Zernio::SelectFacebookPageRequestOneOfUserProfile
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
```ruby
|
|
14
14
|
require 'zernio-sdk'
|
|
15
15
|
|
|
16
|
-
instance = Zernio::
|
|
16
|
+
instance = Zernio::SelectFacebookPageRequestOneOfUserProfile.new(
|
|
17
17
|
id: null,
|
|
18
18
|
name: null,
|
|
19
19
|
profile_picture: null
|
|
@@ -94,7 +94,7 @@ module Zernio
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# Complete Meta business login
|
|
97
|
-
# Facebook Login for Business redirect target. Meta supplies the single-use authorization code and the authenticated state returned by connectAds. The state expires after 30 minutes and binds the user, profile, Page selection and ad-account scope. No bearer token is sent by the browser. Success reconnects only metaads and redirects to the original redirect_url. Invalid state returns 400; inaccessible profiles or missing ads access cannot connect. No token is returned to the browser.
|
|
97
|
+
# Facebook Login for Business redirect target. Meta supplies the single-use authorization code and the authenticated state returned by connectAds. The state expires after 30 minutes and binds the user, profile, Page selection and ad-account scope. No bearer token is sent by the browser. Success reconnects only metaads and redirects to the original redirect_url. Invalid state returns 400; inaccessible profiles or missing ads access cannot connect. Dashboard logins with several Pages redirect to the Facebook Page picker with an encrypted selectionToken valid for ten minutes. Listing and selecting require the initiating user and current profile access. No plaintext platform token is returned to the browser.
|
|
98
98
|
# @param state [String] Authenticated state from the initial connectAds response.
|
|
99
99
|
# @param [Hash] opts the optional parameters
|
|
100
100
|
# @option opts [String] :code Single-use authorization code returned by Meta.
|
|
@@ -106,7 +106,7 @@ module Zernio
|
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
# Complete Meta business login
|
|
109
|
-
# Facebook Login for Business redirect target. Meta supplies the single-use authorization code and the authenticated state returned by connectAds. The state expires after 30 minutes and binds the user, profile, Page selection and ad-account scope. No bearer token is sent by the browser. Success reconnects only metaads and redirects to the original redirect_url. Invalid state returns 400; inaccessible profiles or missing ads access cannot connect. No token is returned to the browser.
|
|
109
|
+
# Facebook Login for Business redirect target. Meta supplies the single-use authorization code and the authenticated state returned by connectAds. The state expires after 30 minutes and binds the user, profile, Page selection and ad-account scope. No bearer token is sent by the browser. Success reconnects only metaads and redirects to the original redirect_url. Invalid state returns 400; inaccessible profiles or missing ads access cannot connect. Dashboard logins with several Pages redirect to the Facebook Page picker with an encrypted selectionToken valid for ten minutes. Listing and selecting require the initiating user and current profile access. No plaintext platform token is returned to the browser.
|
|
110
110
|
# @param state [String] Authenticated state from the initial connectAds response.
|
|
111
111
|
# @param [Hash] opts the optional parameters
|
|
112
112
|
# @option opts [String] :code Single-use authorization code returned by Meta.
|
|
@@ -367,7 +367,7 @@ module Zernio
|
|
|
367
367
|
end
|
|
368
368
|
|
|
369
369
|
# Connect ads for a platform
|
|
370
|
-
# Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Meta business login (opt-in).** Set `loginMode=business` for `facebook` or `instagram` to use Facebook Login for Business and a Business Integration System User token. No posting account is created or required. This mode always returns an authUrl; it returns 503 when the server has no META_ADS_CONFIG_ID. Complete the dialog in a browser. The callback creates or reconnects only the metaads account, preserving its ID, history and scopedAdAccountIds. Non-empty successful subscription results replace subscribedAdAccountIds to remove stale grants; an empty result leaves routing unchanged. A reconnect must grant every previously scoped ad account (or every previous grant for an unscoped connection). Missing or unverifiable grants return 409 before changing the account. Pass `pageId` to select a granted Page for creatives and lead forms.
|
|
370
|
+
# Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Meta business login (opt-in).** Set `loginMode=business` for `facebook` or `instagram` to use Facebook Login for Business and a Business Integration System User token. No posting account is created or required. This mode always returns an authUrl; it returns 503 when the server has no META_ADS_CONFIG_ID. Complete the dialog in a browser. The callback creates or reconnects only the metaads account, preserving its ID, history and scopedAdAccountIds. Non-empty successful subscription results replace subscribedAdAccountIds to remove stale grants; an empty result leaves routing unchanged. A reconnect must grant every previously scoped ad account (or every previous grant for an unscoped connection). Missing or unverifiable grants return 409 before changing the account. Pass `pageId` to select a granted Page for creatives and lead forms. API integrations otherwise reuse the previous Page or sole granted Page. Multiple Pages without a selection return 400 with available Page IDs for API integrations; restart with pageId. Dashboard session logins use the sole current grant automatically or open the existing Facebook Page picker for several grants, including reconnects. Selection completes the Meta Ads connection. With no Pages granted the callback returns 400 with instructions to connect again and grant a Page. Success redirects with connected=metaads, profileId and accountId. Business login reports metadata.tokenType=system-user in GET /v1/accounts. An absent Meta expires_in leaves tokenExpiresAt absent; no personal-token re-exchange occurs. Subsequent classic requests can change the ad-account scope using the business token; force=true requires loginMode=business to reconnect that connection. **Same-token platforms (facebook, instagram, linkedin, pinterest).** The ads SocialAccount (metaads, linkedinads, pinterestads) reuses the OAuth token of the parent posting account, but only when an active parent exists and, for facebook and instagram, its stored token carries ads_management and ads_read (linkedin and pinterest need no extra scope). In that case no extra OAuth happens and the response is alreadyConnected: true. When no such parent exists, or the scopes are missing, the endpoint returns an authUrl and a full OAuth round trip is required. When a parent exists but carries no token usable for ad accounts, the call fails with 400 RECONNECT_REQUIRED. Independently of the branch, the call can return 403 ADS_ADDON_REQUIRED without the ads add-on and 402 PAYMENT_REQUIRED when the billing gate is closed. Meta Ads prerequisite: connecting Meta Ads (via facebook or instagram) requires a Facebook Page. Not because the ad account is read through a Page, but because both parent posting accounts are: the facebook flow only offers Pages you manage, and the instagram flow with loginMethod=facebook_login only offers Instagram accounts linked to one of those Pages. Without a Page there is no parent account to inherit a token from. A user who manages no Facebook Page cannot complete this connection, and the facebook flow ends with error=no_facebook_pages. **Separate-token platforms (tiktok, twitter).** Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (tiktokads, xads) with its own token. If the ads account already exists, returns alreadyConnected: true. - tiktok: accountId is OPTIONAL. With accountId, the new tiktokads account links to that posting account (parentAccountId set), so Spark Ads + standalone ads using the posting TT_USER identity become available. Without accountId, ads-only mode kicks in: the new tiktokads account has parentAccountId=null and standalone ads use a synthetic CUSTOMIZED_USER (\"Brand Identity\"); Spark Ads are unavailable because TikTok requires a posting account for them. The Brand Identity is configured separately via PATCH /v1/connect/tiktok-ads (or inline on POST /v1/ads/create via the brandIdentity field). - twitter (X Ads): accountId is REQUIRED. There's no ads-only mode, because tweets need to be authored by a real X user. **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.
|
|
371
371
|
# @param platform [String] Platform to connect ads for. Only platforms with ads support are accepted. In classic mode, `instagram` requires an Instagram account connected with loginMethod=facebook_login whose token carries ads_management and ads_read. With an account connected through the default instagram_login flow no ads account can be created; do not use this value for those accounts.
|
|
372
372
|
# @param profile_id [String] Your Zernio profile ID
|
|
373
373
|
# @param [Hash] opts the optional parameters
|
|
@@ -386,7 +386,7 @@ module Zernio
|
|
|
386
386
|
end
|
|
387
387
|
|
|
388
388
|
# Connect ads for a platform
|
|
389
|
-
# Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Meta business login (opt-in).** Set `loginMode=business` for `facebook` or `instagram` to use Facebook Login for Business and a Business Integration System User token. No posting account is created or required. This mode always returns an authUrl; it returns 503 when the server has no META_ADS_CONFIG_ID. Complete the dialog in a browser. The callback creates or reconnects only the metaads account, preserving its ID, history and scopedAdAccountIds. Non-empty successful subscription results replace subscribedAdAccountIds to remove stale grants; an empty result leaves routing unchanged. A reconnect must grant every previously scoped ad account (or every previous grant for an unscoped connection). Missing or unverifiable grants return 409 before changing the account. Pass `pageId` to select a granted Page for creatives and lead forms.
|
|
389
|
+
# Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Meta business login (opt-in).** Set `loginMode=business` for `facebook` or `instagram` to use Facebook Login for Business and a Business Integration System User token. No posting account is created or required. This mode always returns an authUrl; it returns 503 when the server has no META_ADS_CONFIG_ID. Complete the dialog in a browser. The callback creates or reconnects only the metaads account, preserving its ID, history and scopedAdAccountIds. Non-empty successful subscription results replace subscribedAdAccountIds to remove stale grants; an empty result leaves routing unchanged. A reconnect must grant every previously scoped ad account (or every previous grant for an unscoped connection). Missing or unverifiable grants return 409 before changing the account. Pass `pageId` to select a granted Page for creatives and lead forms. API integrations otherwise reuse the previous Page or sole granted Page. Multiple Pages without a selection return 400 with available Page IDs for API integrations; restart with pageId. Dashboard session logins use the sole current grant automatically or open the existing Facebook Page picker for several grants, including reconnects. Selection completes the Meta Ads connection. With no Pages granted the callback returns 400 with instructions to connect again and grant a Page. Success redirects with connected=metaads, profileId and accountId. Business login reports metadata.tokenType=system-user in GET /v1/accounts. An absent Meta expires_in leaves tokenExpiresAt absent; no personal-token re-exchange occurs. Subsequent classic requests can change the ad-account scope using the business token; force=true requires loginMode=business to reconnect that connection. **Same-token platforms (facebook, instagram, linkedin, pinterest).** The ads SocialAccount (metaads, linkedinads, pinterestads) reuses the OAuth token of the parent posting account, but only when an active parent exists and, for facebook and instagram, its stored token carries ads_management and ads_read (linkedin and pinterest need no extra scope). In that case no extra OAuth happens and the response is alreadyConnected: true. When no such parent exists, or the scopes are missing, the endpoint returns an authUrl and a full OAuth round trip is required. When a parent exists but carries no token usable for ad accounts, the call fails with 400 RECONNECT_REQUIRED. Independently of the branch, the call can return 403 ADS_ADDON_REQUIRED without the ads add-on and 402 PAYMENT_REQUIRED when the billing gate is closed. Meta Ads prerequisite: connecting Meta Ads (via facebook or instagram) requires a Facebook Page. Not because the ad account is read through a Page, but because both parent posting accounts are: the facebook flow only offers Pages you manage, and the instagram flow with loginMethod=facebook_login only offers Instagram accounts linked to one of those Pages. Without a Page there is no parent account to inherit a token from. A user who manages no Facebook Page cannot complete this connection, and the facebook flow ends with error=no_facebook_pages. **Separate-token platforms (tiktok, twitter).** Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (tiktokads, xads) with its own token. If the ads account already exists, returns alreadyConnected: true. - tiktok: accountId is OPTIONAL. With accountId, the new tiktokads account links to that posting account (parentAccountId set), so Spark Ads + standalone ads using the posting TT_USER identity become available. Without accountId, ads-only mode kicks in: the new tiktokads account has parentAccountId=null and standalone ads use a synthetic CUSTOMIZED_USER (\"Brand Identity\"); Spark Ads are unavailable because TikTok requires a posting account for them. The Brand Identity is configured separately via PATCH /v1/connect/tiktok-ads (or inline on POST /v1/ads/create via the brandIdentity field). - twitter (X Ads): accountId is REQUIRED. There's no ads-only mode, because tweets need to be authored by a real X user. **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.
|
|
390
390
|
# @param platform [String] Platform to connect ads for. Only platforms with ads support are accepted. In classic mode, `instagram` requires an Instagram account connected with loginMethod=facebook_login whose token carries ads_management and ads_read. With an account connected through the default instagram_login flow no ads account can be created; do not use this value for those accounts.
|
|
391
391
|
# @param profile_id [String] Your Zernio profile ID
|
|
392
392
|
# @param [Hash] opts the optional parameters
|
|
@@ -2189,41 +2189,36 @@ module Zernio
|
|
|
2189
2189
|
end
|
|
2190
2190
|
|
|
2191
2191
|
# List Facebook pages
|
|
2192
|
-
# Returns
|
|
2193
|
-
# @param profile_id [String] Profile ID from your connection flow
|
|
2194
|
-
# @param temp_token [String] Temporary Facebook access token from the OAuth callback redirect
|
|
2192
|
+
# Returns Facebook Pages after OAuth. Classic connections require profileId and tempToken from the OAuth redirect. Use X-Connect-Token for headless connections. The dashboard business-login picker instead sends only selectionToken, an encrypted grant valid for ten minutes. This requires the initiating user and current profile access and returns only Page IDs and names. X-Connect-Token cannot authorize business selection.
|
|
2195
2193
|
# @param [Hash] opts the optional parameters
|
|
2194
|
+
# @option opts [String] :profile_id Profile ID from your classic connection flow. Required with tempToken.
|
|
2195
|
+
# @option opts [String] :temp_token Temporary Facebook access token from the classic OAuth callback. Required with profileId.
|
|
2196
|
+
# @option opts [String] :selection_token Encrypted dashboard business-login grant. Send alone instead of profileId and tempToken. Expires after ten minutes.
|
|
2196
2197
|
# @return [ListFacebookPages200Response]
|
|
2197
|
-
def list_facebook_pages(
|
|
2198
|
-
data, _status_code, _headers = list_facebook_pages_with_http_info(
|
|
2198
|
+
def list_facebook_pages(opts = {})
|
|
2199
|
+
data, _status_code, _headers = list_facebook_pages_with_http_info(opts)
|
|
2199
2200
|
data
|
|
2200
2201
|
end
|
|
2201
2202
|
|
|
2202
2203
|
# List Facebook pages
|
|
2203
|
-
# Returns
|
|
2204
|
-
# @param profile_id [String] Profile ID from your connection flow
|
|
2205
|
-
# @param temp_token [String] Temporary Facebook access token from the OAuth callback redirect
|
|
2204
|
+
# Returns Facebook Pages after OAuth. Classic connections require profileId and tempToken from the OAuth redirect. Use X-Connect-Token for headless connections. The dashboard business-login picker instead sends only selectionToken, an encrypted grant valid for ten minutes. This requires the initiating user and current profile access and returns only Page IDs and names. X-Connect-Token cannot authorize business selection.
|
|
2206
2205
|
# @param [Hash] opts the optional parameters
|
|
2206
|
+
# @option opts [String] :profile_id Profile ID from your classic connection flow. Required with tempToken.
|
|
2207
|
+
# @option opts [String] :temp_token Temporary Facebook access token from the classic OAuth callback. Required with profileId.
|
|
2208
|
+
# @option opts [String] :selection_token Encrypted dashboard business-login grant. Send alone instead of profileId and tempToken. Expires after ten minutes.
|
|
2207
2209
|
# @return [Array<(ListFacebookPages200Response, Integer, Hash)>] ListFacebookPages200Response data, response status code and response headers
|
|
2208
|
-
def list_facebook_pages_with_http_info(
|
|
2210
|
+
def list_facebook_pages_with_http_info(opts = {})
|
|
2209
2211
|
if @api_client.config.debugging
|
|
2210
2212
|
@api_client.config.logger.debug 'Calling API: ConnectApi.list_facebook_pages ...'
|
|
2211
2213
|
end
|
|
2212
|
-
# verify the required parameter 'profile_id' is set
|
|
2213
|
-
if @api_client.config.client_side_validation && profile_id.nil?
|
|
2214
|
-
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.list_facebook_pages"
|
|
2215
|
-
end
|
|
2216
|
-
# verify the required parameter 'temp_token' is set
|
|
2217
|
-
if @api_client.config.client_side_validation && temp_token.nil?
|
|
2218
|
-
fail ArgumentError, "Missing the required parameter 'temp_token' when calling ConnectApi.list_facebook_pages"
|
|
2219
|
-
end
|
|
2220
2214
|
# resource path
|
|
2221
2215
|
local_var_path = '/v1/connect/facebook/select-page'
|
|
2222
2216
|
|
|
2223
2217
|
# query parameters
|
|
2224
2218
|
query_params = opts[:query_params] || {}
|
|
2225
|
-
query_params[:'profileId'] = profile_id
|
|
2226
|
-
query_params[:'tempToken'] = temp_token
|
|
2219
|
+
query_params[:'profileId'] = opts[:'profile_id'] if !opts[:'profile_id'].nil?
|
|
2220
|
+
query_params[:'tempToken'] = opts[:'temp_token'] if !opts[:'temp_token'].nil?
|
|
2221
|
+
query_params[:'selectionToken'] = opts[:'selection_token'] if !opts[:'selection_token'].nil?
|
|
2227
2222
|
|
|
2228
2223
|
# header parameters
|
|
2229
2224
|
header_params = opts[:header_params] || {}
|
|
@@ -2781,7 +2776,7 @@ module Zernio
|
|
|
2781
2776
|
end
|
|
2782
2777
|
|
|
2783
2778
|
# Select Facebook page
|
|
2784
|
-
# Complete
|
|
2779
|
+
# Complete a classic Facebook Page connection with profileId, pageId, tempToken and userProfile. Use X-Connect-Token for headless connections. The dashboard business-login picker instead sends only selectionToken and pageId to complete a Meta Ads connection. The server verifies the initiating user, profile access, current grants and connection eligibility. The profile, platform token, ad-account scope and return URL come only from the encrypted grant. Business selection requires a session or bearer authentication for the initiating user; X-Connect-Token is not accepted. It returns redirect_url with connected=metaads on success or an eligibility error redirect.
|
|
2785
2780
|
# @param select_facebook_page_request [SelectFacebookPageRequest]
|
|
2786
2781
|
# @param [Hash] opts the optional parameters
|
|
2787
2782
|
# @return [SelectFacebookPage200Response]
|
|
@@ -2791,7 +2786,7 @@ module Zernio
|
|
|
2791
2786
|
end
|
|
2792
2787
|
|
|
2793
2788
|
# Select Facebook page
|
|
2794
|
-
# Complete
|
|
2789
|
+
# Complete a classic Facebook Page connection with profileId, pageId, tempToken and userProfile. Use X-Connect-Token for headless connections. The dashboard business-login picker instead sends only selectionToken and pageId to complete a Meta Ads connection. The server verifies the initiating user, profile access, current grants and connection eligibility. The profile, platform token, ad-account scope and return URL come only from the encrypted grant. Business selection requires a session or bearer authentication for the initiating user; X-Connect-Token is not accepted. It returns redirect_url with connected=metaads on success or an eligibility error redirect.
|
|
2795
2790
|
# @param select_facebook_page_request [SelectFacebookPageRequest]
|
|
2796
2791
|
# @param [Hash] opts the optional parameters
|
|
2797
2792
|
# @return [Array<(SelectFacebookPage200Response, Integer, Hash)>] SelectFacebookPage200Response data, response status code and response headers
|
|
@@ -31,7 +31,7 @@ module Zernio
|
|
|
31
31
|
|
|
32
32
|
attr_accessor :promoted_object
|
|
33
33
|
|
|
34
|
-
# Meta only. SKAdNetwork app promotion requires AUCTION.
|
|
34
|
+
# Meta only. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. SKAdNetwork app promotion requires AUCTION.
|
|
35
35
|
attr_accessor :buying_type
|
|
36
36
|
|
|
37
37
|
# Meta only. Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED.
|
|
@@ -190,6 +190,8 @@ module Zernio
|
|
|
190
190
|
|
|
191
191
|
if attributes.key?(:'buying_type')
|
|
192
192
|
self.buying_type = attributes[:'buying_type']
|
|
193
|
+
else
|
|
194
|
+
self.buying_type = 'AUCTION'
|
|
193
195
|
end
|
|
194
196
|
|
|
195
197
|
if attributes.key?(:'validate_only')
|
|
@@ -41,7 +41,7 @@ module Zernio
|
|
|
41
41
|
# Meta only. Explicit ad-set `billing_event`. Defaults to `IMPRESSIONS`. Forwarded verbatim to Meta, which validates compatibility with the optimization goal.
|
|
42
42
|
attr_accessor :billing_event
|
|
43
43
|
|
|
44
|
-
# Meta only. RESERVED = Reach & Frequency: requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative).
|
|
44
|
+
# Meta only. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. Reusing existingCampaignId does not change the campaign. RESERVED = Reach & Frequency: requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative).
|
|
45
45
|
attr_accessor :buying_type
|
|
46
46
|
|
|
47
47
|
# Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id, so pass that one). Requires buyingType RESERVED.
|
|
@@ -633,6 +633,8 @@ module Zernio
|
|
|
633
633
|
|
|
634
634
|
if attributes.key?(:'buying_type')
|
|
635
635
|
self.buying_type = attributes[:'buying_type']
|
|
636
|
+
else
|
|
637
|
+
self.buying_type = 'AUCTION'
|
|
636
638
|
end
|
|
637
639
|
|
|
638
640
|
if attributes.key?(:'rf_prediction_id')
|
|
@@ -17,7 +17,7 @@ module Zernio
|
|
|
17
17
|
class SelectFacebookPage200Response < ApiModelBase
|
|
18
18
|
attr_accessor :message
|
|
19
19
|
|
|
20
|
-
# Redirect URL
|
|
20
|
+
# Redirect URL when a custom redirect_url was provided or a business Page was selected.
|
|
21
21
|
attr_accessor :redirect_url
|
|
22
22
|
|
|
23
23
|
attr_accessor :account
|