late-sdk 0.0.1461 → 0.0.1462
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 +6 -1
- data/docs/AdAccountsApi.md +10 -10
- data/docs/CreateAdAccount200Response.md +22 -0
- data/docs/CreateAdAccount201Response.md +39 -20
- data/docs/CreateAdAccountRequest.md +41 -38
- data/docs/CreateGoogleAdAccountRequest.md +30 -0
- data/docs/CreateMetaAdAccountRequest.md +48 -0
- data/docs/CreatedGoogleAdAccount.md +32 -0
- data/docs/CreatedMetaAdAccount.md +30 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +7 -7
- data/lib/zernio-sdk/models/create_ad_account200_response.rb +241 -0
- data/lib/zernio-sdk/models/create_ad_account201_response.rb +78 -314
- data/lib/zernio-sdk/models/create_ad_account_request.rb +78 -585
- data/lib/zernio-sdk/models/create_google_ad_account_request.rb +386 -0
- data/lib/zernio-sdk/models/create_meta_ad_account_request.rb +655 -0
- data/lib/zernio-sdk/models/created_google_ad_account.rb +390 -0
- data/lib/zernio-sdk/models/created_meta_ad_account.rb +340 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +5 -0
- data/openapi.yaml +1 -1
- data/spec/api/ad_accounts_api_spec.rb +3 -3
- data/spec/models/create_ad_account200_response_spec.rb +52 -0
- data/spec/models/create_ad_account201_response_spec.rb +5 -45
- data/spec/models/create_ad_account_request_spec.rb +5 -93
- data/spec/models/create_google_ad_account_request_spec.rb +76 -0
- data/spec/models/create_meta_ad_account_request_spec.rb +130 -0
- data/spec/models/created_google_ad_account_spec.rb +82 -0
- data/spec/models/created_meta_ad_account_spec.rb +72 -0
- data/zernio-sdk-0.0.1462.gem +0 -0
- metadata +2755 -2735
- data/zernio-sdk-0.0.1461.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: 8a343af3897bf71cb401674ca549c461232179e30910ea62b3160398ac1fe923
|
|
4
|
+
data.tar.gz: 8212aebc52ecf6f38e8812c56307d45ed730ecb0d6d0fcfdbdc7f45a825e1893
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9cbd838b273dd23cd976ce9e9a37255c5d390cc814738c1a70764a65f7c66026afb1bb3cf9e0c841944d48477e70833c7572d3529891363d6997f31f2fd58d01
|
|
7
|
+
data.tar.gz: 9109e85e08a8c91db9c3b0f73a586fa674112a00f9c542e88353bef918a45b45c54fe75b5f78e63b10ecd982b46ce64c106e80d37930ea21f1183bbb996d3a4d
|
data/README.md
CHANGED
|
@@ -132,7 +132,7 @@ Class | Method | HTTP request | Description
|
|
|
132
132
|
*Zernio::AdAccountsApi* | [**assign_ad_account_user**](docs/AdAccountsApi.md#assign_ad_account_user) | **POST** /v1/ads/accounts/users | Assign a user to an ad account
|
|
133
133
|
*Zernio::AdAccountsApi* | [**assign_page_user**](docs/AdAccountsApi.md#assign_page_user) | **POST** /v1/ads/page-users | Assign a user to a Page
|
|
134
134
|
*Zernio::AdAccountsApi* | [**attach_ad_label**](docs/AdAccountsApi.md#attach_ad_label) | **POST** /v1/ads/labels/{labelId}/assignments | Attach a Google Ads label
|
|
135
|
-
*Zernio::AdAccountsApi* | [**create_ad_account**](docs/AdAccountsApi.md#create_ad_account) | **POST** /v1/ads/accounts | Create
|
|
135
|
+
*Zernio::AdAccountsApi* | [**create_ad_account**](docs/AdAccountsApi.md#create_ad_account) | **POST** /v1/ads/accounts | Create ad account
|
|
136
136
|
*Zernio::AdAccountsApi* | [**create_ad_label**](docs/AdAccountsApi.md#create_ad_label) | **POST** /v1/ads/labels | Create a Google Ads label
|
|
137
137
|
*Zernio::AdAccountsApi* | [**create_ad_negative_keyword_list**](docs/AdAccountsApi.md#create_ad_negative_keyword_list) | **POST** /v1/ads/accounts/negative-keyword-lists | Create a negative keyword list
|
|
138
138
|
*Zernio::AdAccountsApi* | [**create_custom_conversion**](docs/AdAccountsApi.md#create_custom_conversion) | **POST** /v1/accounts/{accountId}/custom-conversions | Create custom conversion
|
|
@@ -1445,6 +1445,7 @@ Class | Method | HTTP request | Description
|
|
|
1445
1445
|
- [Zernio::CreateAccountGroup201Response](docs/CreateAccountGroup201Response.md)
|
|
1446
1446
|
- [Zernio::CreateAccountGroup201ResponseGroup](docs/CreateAccountGroup201ResponseGroup.md)
|
|
1447
1447
|
- [Zernio::CreateAccountGroupRequest](docs/CreateAccountGroupRequest.md)
|
|
1448
|
+
- [Zernio::CreateAdAccount200Response](docs/CreateAdAccount200Response.md)
|
|
1448
1449
|
- [Zernio::CreateAdAccount201Response](docs/CreateAdAccount201Response.md)
|
|
1449
1450
|
- [Zernio::CreateAdAccountRequest](docs/CreateAdAccountRequest.md)
|
|
1450
1451
|
- [Zernio::CreateAdAudience201Response](docs/CreateAdAudience201Response.md)
|
|
@@ -1554,6 +1555,7 @@ Class | Method | HTTP request | Description
|
|
|
1554
1555
|
- [Zernio::CreateDiscordThread200Response](docs/CreateDiscordThread200Response.md)
|
|
1555
1556
|
- [Zernio::CreateDiscordThread200ResponseData](docs/CreateDiscordThread200ResponseData.md)
|
|
1556
1557
|
- [Zernio::CreateDiscordThreadRequest](docs/CreateDiscordThreadRequest.md)
|
|
1558
|
+
- [Zernio::CreateGoogleAdAccountRequest](docs/CreateGoogleAdAccountRequest.md)
|
|
1557
1559
|
- [Zernio::CreateGoogleAssetGroup200Response](docs/CreateGoogleAssetGroup200Response.md)
|
|
1558
1560
|
- [Zernio::CreateGoogleAssetGroup201Response](docs/CreateGoogleAssetGroup201Response.md)
|
|
1559
1561
|
- [Zernio::CreateGoogleAssetGroup201ResponseAssetGroup](docs/CreateGoogleAssetGroup201ResponseAssetGroup.md)
|
|
@@ -1597,6 +1599,7 @@ Class | Method | HTTP request | Description
|
|
|
1597
1599
|
- [Zernio::CreateMessagingAd200ResponseResultsInner](docs/CreateMessagingAd200ResponseResultsInner.md)
|
|
1598
1600
|
- [Zernio::CreateMessagingAd201Response](docs/CreateMessagingAd201Response.md)
|
|
1599
1601
|
- [Zernio::CreateMessagingAdRequest](docs/CreateMessagingAdRequest.md)
|
|
1602
|
+
- [Zernio::CreateMetaAdAccountRequest](docs/CreateMetaAdAccountRequest.md)
|
|
1600
1603
|
- [Zernio::CreatePhoneNumberKycLink200Response](docs/CreatePhoneNumberKycLink200Response.md)
|
|
1601
1604
|
- [Zernio::CreatePhoneNumberKycLinkRequest](docs/CreatePhoneNumberKycLinkRequest.md)
|
|
1602
1605
|
- [Zernio::CreatePhoneNumberKycLinkRequestBranding](docs/CreatePhoneNumberKycLinkRequestBranding.md)
|
|
@@ -1703,6 +1706,8 @@ Class | Method | HTTP request | Description
|
|
|
1703
1706
|
- [Zernio::CreateYoutubePlaylist201Response](docs/CreateYoutubePlaylist201Response.md)
|
|
1704
1707
|
- [Zernio::CreateYoutubePlaylist201ResponsePlaylist](docs/CreateYoutubePlaylist201ResponsePlaylist.md)
|
|
1705
1708
|
- [Zernio::CreateYoutubePlaylistRequest](docs/CreateYoutubePlaylistRequest.md)
|
|
1709
|
+
- [Zernio::CreatedGoogleAdAccount](docs/CreatedGoogleAdAccount.md)
|
|
1710
|
+
- [Zernio::CreatedMetaAdAccount](docs/CreatedMetaAdAccount.md)
|
|
1706
1711
|
- [Zernio::CrosspostDiscordMessage200Response](docs/CrosspostDiscordMessage200Response.md)
|
|
1707
1712
|
- [Zernio::CtwaAdRequestBody](docs/CtwaAdRequestBody.md)
|
|
1708
1713
|
- [Zernio::CtwaAdRequestBodyCitiesInner](docs/CtwaAdRequestBodyCitiesInner.md)
|
data/docs/AdAccountsApi.md
CHANGED
|
@@ -10,7 +10,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
10
10
|
| [**assign_ad_account_user**](AdAccountsApi.md#assign_ad_account_user) | **POST** /v1/ads/accounts/users | Assign a user to an ad account |
|
|
11
11
|
| [**assign_page_user**](AdAccountsApi.md#assign_page_user) | **POST** /v1/ads/page-users | Assign a user to a Page |
|
|
12
12
|
| [**attach_ad_label**](AdAccountsApi.md#attach_ad_label) | **POST** /v1/ads/labels/{labelId}/assignments | Attach a Google Ads label |
|
|
13
|
-
| [**create_ad_account**](AdAccountsApi.md#create_ad_account) | **POST** /v1/ads/accounts | Create
|
|
13
|
+
| [**create_ad_account**](AdAccountsApi.md#create_ad_account) | **POST** /v1/ads/accounts | Create ad account |
|
|
14
14
|
| [**create_ad_label**](AdAccountsApi.md#create_ad_label) | **POST** /v1/ads/labels | Create a Google Ads label |
|
|
15
15
|
| [**create_ad_negative_keyword_list**](AdAccountsApi.md#create_ad_negative_keyword_list) | **POST** /v1/ads/accounts/negative-keyword-lists | Create a negative keyword list |
|
|
16
16
|
| [**create_custom_conversion**](AdAccountsApi.md#create_custom_conversion) | **POST** /v1/accounts/{accountId}/custom-conversions | Create custom conversion |
|
|
@@ -487,11 +487,11 @@ end
|
|
|
487
487
|
|
|
488
488
|
## create_ad_account
|
|
489
489
|
|
|
490
|
-
> <
|
|
490
|
+
> <CreateAdAccount200Response> create_ad_account(create_ad_account_request)
|
|
491
491
|
|
|
492
|
-
Create
|
|
492
|
+
Create ad account
|
|
493
493
|
|
|
494
|
-
Creates a new Meta ad account in the user's own business portfolio
|
|
494
|
+
Creates a new Meta ad account in the user's own business portfolio, or a Google Ads client account under a manager (MCC) account the connection reaches. Billing must then be set up on the platform. **Meta** (omit `platform` or send `meta`). Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. The Meta flow has no validateOnly or dry-run option. After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated=false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call. **Google** (send `platform: google`). Google only creates accounts through a manager account, so the new client account is created under `managerCustomerId`, which must be a manager the Google user behind the googleads `accountId` reaches (directly or as a sub-manager). List them with GET /v1/ads/accounts/hierarchy. Whose manager it is (the integrator's or the end user's) is the caller's choice: pass the connection that reaches it. `currency` (ISO 4217) and `timeZone` (IANA name, for example Europe/Madrid) cannot be changed after creation. The account starts without billing: set it up in Google Ads before ads can serve. Google caps how many accounts a manager can create and how many active client accounts it can hold. The new customer is added to the connection (and to a scoped connection's allowlist), discovery is nudged immediately, and the returned adAccountId works with every other ads endpoint. `validateOnly: true` asks Google to validate the request without creating anything and returns 200. A real create is not idempotent: after a 502 with details.creationStatus=unknown, check the manager in Google Ads before trying again.
|
|
495
495
|
|
|
496
496
|
### Examples
|
|
497
497
|
|
|
@@ -505,10 +505,10 @@ Zernio.configure do |config|
|
|
|
505
505
|
end
|
|
506
506
|
|
|
507
507
|
api_instance = Zernio::AdAccountsApi.new
|
|
508
|
-
create_ad_account_request = Zernio::
|
|
508
|
+
create_ad_account_request = Zernio::CreateGoogleAdAccountRequest.new({platform: 'google', account_id: 'account_id_example', manager_customer_id: 'manager_customer_id_example', name: 'name_example', currency: 'currency_example', time_zone: 'time_zone_example'}) # CreateAdAccountRequest |
|
|
509
509
|
|
|
510
510
|
begin
|
|
511
|
-
# Create
|
|
511
|
+
# Create ad account
|
|
512
512
|
result = api_instance.create_ad_account(create_ad_account_request)
|
|
513
513
|
p result
|
|
514
514
|
rescue Zernio::ApiError => e
|
|
@@ -520,15 +520,15 @@ end
|
|
|
520
520
|
|
|
521
521
|
This returns an Array which contains the response data, status code and headers.
|
|
522
522
|
|
|
523
|
-
> <Array(<
|
|
523
|
+
> <Array(<CreateAdAccount200Response>, Integer, Hash)> create_ad_account_with_http_info(create_ad_account_request)
|
|
524
524
|
|
|
525
525
|
```ruby
|
|
526
526
|
begin
|
|
527
|
-
# Create
|
|
527
|
+
# Create ad account
|
|
528
528
|
data, status_code, headers = api_instance.create_ad_account_with_http_info(create_ad_account_request)
|
|
529
529
|
p status_code # => 2xx
|
|
530
530
|
p headers # => { ... }
|
|
531
|
-
p data # => <
|
|
531
|
+
p data # => <CreateAdAccount200Response>
|
|
532
532
|
rescue Zernio::ApiError => e
|
|
533
533
|
puts "Error when calling AdAccountsApi->create_ad_account_with_http_info: #{e}"
|
|
534
534
|
end
|
|
@@ -542,7 +542,7 @@ end
|
|
|
542
542
|
|
|
543
543
|
### Return type
|
|
544
544
|
|
|
545
|
-
[**
|
|
545
|
+
[**CreateAdAccount200Response**](CreateAdAccount200Response.md)
|
|
546
546
|
|
|
547
547
|
### Authorization
|
|
548
548
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::CreateAdAccount200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform** | **String** | | |
|
|
8
|
+
| **manager_customer_id** | **String** | | |
|
|
9
|
+
| **validate_only** | **Boolean** | Always true on a 200. | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::CreateAdAccount200Response.new(
|
|
17
|
+
platform: null,
|
|
18
|
+
manager_customer_id: null,
|
|
19
|
+
validate_only: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -1,30 +1,49 @@
|
|
|
1
1
|
# Zernio::CreateAdAccount201Response
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Class instance methods
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **ad_account_id** | **String** | New Meta ad account ID for subsequent ads calls. | |
|
|
8
|
-
| **business_id** | **String** | Owning business portfolio ID. | |
|
|
9
|
-
| **connection_updated** | **Boolean** | Whether the connection scope and discovery schedule were updated. | |
|
|
10
|
-
| **payment_method_required** | **Boolean** | Always true as a delivery prerequisite. This is not a live funding-source check. Confirm payment or invoicing in Ads Manager. | |
|
|
11
|
-
| **ads_manager_url** | **String** | Open the created account in Ads Manager. | |
|
|
12
|
-
| **next_steps** | **String** | Payment setup instructions for the user. | |
|
|
13
|
-
| **warnings** | **Array<String>** | Recovery instructions if the account could not be attached to the connection. | |
|
|
5
|
+
### `openapi_one_of`
|
|
14
6
|
|
|
15
|
-
|
|
7
|
+
Returns the list of classes defined in oneOf.
|
|
8
|
+
|
|
9
|
+
#### Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
Zernio::CreateAdAccount201Response.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'CreatedGoogleAdAccount',
|
|
18
|
+
# :'CreatedMetaAdAccount'
|
|
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
|
|
16
27
|
|
|
17
28
|
```ruby
|
|
18
29
|
require 'zernio-sdk'
|
|
19
30
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
ads_manager_url: null,
|
|
26
|
-
next_steps: null,
|
|
27
|
-
warnings: null
|
|
28
|
-
)
|
|
31
|
+
Zernio::CreateAdAccount201Response.build(data)
|
|
32
|
+
# => #<CreatedGoogleAdAccount:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
Zernio::CreateAdAccount201Response.build(data_that_doesnt_match)
|
|
35
|
+
# => nil
|
|
29
36
|
```
|
|
30
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
|
+
- `CreatedGoogleAdAccount`
|
|
47
|
+
- `CreatedMetaAdAccount`
|
|
48
|
+
- `nil` (if no type matches)
|
|
49
|
+
|
|
@@ -1,46 +1,49 @@
|
|
|
1
1
|
# Zernio::CreateAdAccountRequest
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
3
|
+
## Class instance methods
|
|
4
|
+
|
|
5
|
+
### `openapi_one_of`
|
|
6
|
+
|
|
7
|
+
Returns the list of classes defined in oneOf.
|
|
8
|
+
|
|
9
|
+
#### Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
Zernio::CreateAdAccountRequest.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'CreateGoogleAdAccountRequest',
|
|
18
|
+
# :'CreateMetaAdAccountRequest'
|
|
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
|
|
24
27
|
|
|
25
28
|
```ruby
|
|
26
29
|
require 'zernio-sdk'
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
timezone_id: null,
|
|
34
|
-
end_advertiser: null,
|
|
35
|
-
media_agency: null,
|
|
36
|
-
partner: null,
|
|
37
|
-
invoice: null,
|
|
38
|
-
invoice_group_id: null,
|
|
39
|
-
invoicing_emails: null,
|
|
40
|
-
io: null,
|
|
41
|
-
po_number: null,
|
|
42
|
-
funding_id: null,
|
|
43
|
-
ad_account_created_from_bm_flag: null
|
|
44
|
-
)
|
|
31
|
+
Zernio::CreateAdAccountRequest.build(data)
|
|
32
|
+
# => #<CreateGoogleAdAccountRequest:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
Zernio::CreateAdAccountRequest.build(data_that_doesnt_match)
|
|
35
|
+
# => nil
|
|
45
36
|
```
|
|
46
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
|
+
- `CreateGoogleAdAccountRequest`
|
|
47
|
+
- `CreateMetaAdAccountRequest`
|
|
48
|
+
- `nil` (if no type matches)
|
|
49
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Zernio::CreateGoogleAdAccountRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform** | **String** | | |
|
|
8
|
+
| **account_id** | **String** | Zernio googleads SocialAccount ID whose Google user reaches the manager. | |
|
|
9
|
+
| **manager_customer_id** | **String** | Manager (MCC) customer id without dashes. The new account is created under it. List reachable managers with GET /v1/ads/accounts/hierarchy. | |
|
|
10
|
+
| **name** | **String** | Account name. Whitespace is trimmed. | |
|
|
11
|
+
| **currency** | **String** | Uppercase ISO 4217 currency. Cannot be changed after creation. | |
|
|
12
|
+
| **time_zone** | **String** | IANA time zone name, for example Europe/Madrid. Cannot be changed after creation. | |
|
|
13
|
+
| **validate_only** | **Boolean** | Ask Google to validate the request without creating the account. | [optional][default to false] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'zernio-sdk'
|
|
19
|
+
|
|
20
|
+
instance = Zernio::CreateGoogleAdAccountRequest.new(
|
|
21
|
+
platform: null,
|
|
22
|
+
account_id: null,
|
|
23
|
+
manager_customer_id: null,
|
|
24
|
+
name: null,
|
|
25
|
+
currency: null,
|
|
26
|
+
time_zone: null,
|
|
27
|
+
validate_only: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Zernio::CreateMetaAdAccountRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform** | **String** | Optional. Omit it or send meta for a Meta ad account. | [optional] |
|
|
8
|
+
| **account_id** | **String** | Zernio metaads SocialAccount ID. | |
|
|
9
|
+
| **business_id** | **String** | Business portfolio that will own the account. | |
|
|
10
|
+
| **name** | **String** | Ad account name. Whitespace is trimmed. | |
|
|
11
|
+
| **currency** | **String** | Uppercase ISO 4217 currency supported by Meta. | |
|
|
12
|
+
| **timezone_id** | **Integer** | Numeric Meta timezone ID from the linked timezone list. For example 1 is America/Los_Angeles. | |
|
|
13
|
+
| **end_advertiser** | **String** | End advertiser business or page ID. NONE uses the owning business. | [optional][default to 'NONE'] |
|
|
14
|
+
| **media_agency** | **String** | Media agency business or page ID. NONE for self-serve customers. | [optional][default to 'NONE'] |
|
|
15
|
+
| **partner** | **String** | Partner business or page ID. NONE for self-serve customers. | [optional][default to 'NONE'] |
|
|
16
|
+
| **invoice** | **Boolean** | Request Meta invoicing. Eligibility is determined by Meta. | [optional] |
|
|
17
|
+
| **invoice_group_id** | **String** | Existing Meta invoice group ID. | [optional] |
|
|
18
|
+
| **invoicing_emails** | **Array<String>** | Addresses for Meta invoices. | [optional] |
|
|
19
|
+
| **io** | **Boolean** | Meta insertion-order invoicing option. | [optional] |
|
|
20
|
+
| **po_number** | **String** | Purchase order number. | [optional] |
|
|
21
|
+
| **funding_id** | **String** | Existing Meta funding reference. Does not add a payment method. | [optional] |
|
|
22
|
+
| **ad_account_created_from_bm_flag** | **Boolean** | Meta Business Manager creation flag. | [optional] |
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
require 'zernio-sdk'
|
|
28
|
+
|
|
29
|
+
instance = Zernio::CreateMetaAdAccountRequest.new(
|
|
30
|
+
platform: null,
|
|
31
|
+
account_id: null,
|
|
32
|
+
business_id: null,
|
|
33
|
+
name: null,
|
|
34
|
+
currency: null,
|
|
35
|
+
timezone_id: null,
|
|
36
|
+
end_advertiser: null,
|
|
37
|
+
media_agency: null,
|
|
38
|
+
partner: null,
|
|
39
|
+
invoice: null,
|
|
40
|
+
invoice_group_id: null,
|
|
41
|
+
invoicing_emails: null,
|
|
42
|
+
io: null,
|
|
43
|
+
po_number: null,
|
|
44
|
+
funding_id: null,
|
|
45
|
+
ad_account_created_from_bm_flag: null
|
|
46
|
+
)
|
|
47
|
+
```
|
|
48
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Zernio::CreatedGoogleAdAccount
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform** | **String** | | |
|
|
8
|
+
| **ad_account_id** | **String** | New Google Ads customer id for subsequent ads calls. | |
|
|
9
|
+
| **manager_customer_id** | **String** | Manager the account was created under. | |
|
|
10
|
+
| **connection_updated** | **Boolean** | Whether the customer was added to the connection and discovery was scheduled. When false the account exists: reconnect Google Ads instead of creating it again. | |
|
|
11
|
+
| **warnings** | **Array<String>** | Recovery instructions if the account could not be attached to the connection. | |
|
|
12
|
+
| **payment_method_required** | **Boolean** | Always true. The account has no billing until it is set up in Google Ads. | |
|
|
13
|
+
| **next_steps** | **String** | Billing setup instructions for the user. | |
|
|
14
|
+
| **validate_only** | **Boolean** | Always false on a 201. | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'zernio-sdk'
|
|
20
|
+
|
|
21
|
+
instance = Zernio::CreatedGoogleAdAccount.new(
|
|
22
|
+
platform: null,
|
|
23
|
+
ad_account_id: null,
|
|
24
|
+
manager_customer_id: null,
|
|
25
|
+
connection_updated: null,
|
|
26
|
+
warnings: null,
|
|
27
|
+
payment_method_required: null,
|
|
28
|
+
next_steps: null,
|
|
29
|
+
validate_only: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Zernio::CreatedMetaAdAccount
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | New Meta ad account ID for subsequent ads calls. | |
|
|
8
|
+
| **business_id** | **String** | Owning business portfolio ID. | |
|
|
9
|
+
| **connection_updated** | **Boolean** | Whether the connection scope and discovery schedule were updated. | |
|
|
10
|
+
| **payment_method_required** | **Boolean** | Always true as a delivery prerequisite. This is not a live funding-source check. Confirm payment or invoicing in Ads Manager. | |
|
|
11
|
+
| **ads_manager_url** | **String** | Open the created account in Ads Manager. | |
|
|
12
|
+
| **next_steps** | **String** | Payment setup instructions for the user. | |
|
|
13
|
+
| **warnings** | **Array<String>** | Recovery instructions if the account could not be attached to the connection. | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'zernio-sdk'
|
|
19
|
+
|
|
20
|
+
instance = Zernio::CreatedMetaAdAccount.new(
|
|
21
|
+
ad_account_id: null,
|
|
22
|
+
business_id: null,
|
|
23
|
+
connection_updated: null,
|
|
24
|
+
payment_method_required: null,
|
|
25
|
+
ads_manager_url: null,
|
|
26
|
+
next_steps: null,
|
|
27
|
+
warnings: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -438,21 +438,21 @@ module Zernio
|
|
|
438
438
|
return data, status_code, headers
|
|
439
439
|
end
|
|
440
440
|
|
|
441
|
-
# Create
|
|
442
|
-
# Creates a new Meta ad account in the user's own business portfolio
|
|
441
|
+
# Create ad account
|
|
442
|
+
# Creates a new Meta ad account in the user's own business portfolio, or a Google Ads client account under a manager (MCC) account the connection reaches. Billing must then be set up on the platform. **Meta** (omit `platform` or send `meta`). Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. The Meta flow has no validateOnly or dry-run option. After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated=false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call. **Google** (send `platform: google`). Google only creates accounts through a manager account, so the new client account is created under `managerCustomerId`, which must be a manager the Google user behind the googleads `accountId` reaches (directly or as a sub-manager). List them with GET /v1/ads/accounts/hierarchy. Whose manager it is (the integrator's or the end user's) is the caller's choice: pass the connection that reaches it. `currency` (ISO 4217) and `timeZone` (IANA name, for example Europe/Madrid) cannot be changed after creation. The account starts without billing: set it up in Google Ads before ads can serve. Google caps how many accounts a manager can create and how many active client accounts it can hold. The new customer is added to the connection (and to a scoped connection's allowlist), discovery is nudged immediately, and the returned adAccountId works with every other ads endpoint. `validateOnly: true` asks Google to validate the request without creating anything and returns 200. A real create is not idempotent: after a 502 with details.creationStatus=unknown, check the manager in Google Ads before trying again.
|
|
443
443
|
# @param create_ad_account_request [CreateAdAccountRequest]
|
|
444
444
|
# @param [Hash] opts the optional parameters
|
|
445
|
-
# @return [
|
|
445
|
+
# @return [CreateAdAccount200Response]
|
|
446
446
|
def create_ad_account(create_ad_account_request, opts = {})
|
|
447
447
|
data, _status_code, _headers = create_ad_account_with_http_info(create_ad_account_request, opts)
|
|
448
448
|
data
|
|
449
449
|
end
|
|
450
450
|
|
|
451
|
-
# Create
|
|
452
|
-
# Creates a new Meta ad account in the user's own business portfolio
|
|
451
|
+
# Create ad account
|
|
452
|
+
# Creates a new Meta ad account in the user's own business portfolio, or a Google Ads client account under a manager (MCC) account the connection reaches. Billing must then be set up on the platform. **Meta** (omit `platform` or send `meta`). Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. The Meta flow has no validateOnly or dry-run option. After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated=false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call. **Google** (send `platform: google`). Google only creates accounts through a manager account, so the new client account is created under `managerCustomerId`, which must be a manager the Google user behind the googleads `accountId` reaches (directly or as a sub-manager). List them with GET /v1/ads/accounts/hierarchy. Whose manager it is (the integrator's or the end user's) is the caller's choice: pass the connection that reaches it. `currency` (ISO 4217) and `timeZone` (IANA name, for example Europe/Madrid) cannot be changed after creation. The account starts without billing: set it up in Google Ads before ads can serve. Google caps how many accounts a manager can create and how many active client accounts it can hold. The new customer is added to the connection (and to a scoped connection's allowlist), discovery is nudged immediately, and the returned adAccountId works with every other ads endpoint. `validateOnly: true` asks Google to validate the request without creating anything and returns 200. A real create is not idempotent: after a 502 with details.creationStatus=unknown, check the manager in Google Ads before trying again.
|
|
453
453
|
# @param create_ad_account_request [CreateAdAccountRequest]
|
|
454
454
|
# @param [Hash] opts the optional parameters
|
|
455
|
-
# @return [Array<(
|
|
455
|
+
# @return [Array<(CreateAdAccount200Response, Integer, Hash)>] CreateAdAccount200Response data, response status code and response headers
|
|
456
456
|
def create_ad_account_with_http_info(create_ad_account_request, opts = {})
|
|
457
457
|
if @api_client.config.debugging
|
|
458
458
|
@api_client.config.logger.debug 'Calling API: AdAccountsApi.create_ad_account ...'
|
|
@@ -484,7 +484,7 @@ module Zernio
|
|
|
484
484
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ad_account_request)
|
|
485
485
|
|
|
486
486
|
# return_type
|
|
487
|
-
return_type = opts[:debug_return_type] || '
|
|
487
|
+
return_type = opts[:debug_return_type] || 'CreateAdAccount200Response'
|
|
488
488
|
|
|
489
489
|
# auth_names
|
|
490
490
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|