late-sdk 0.0.633 → 0.0.635

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: 6924835bf4e631e7f11a480af2929a627cb01930a5884c90faa3925e60289b6c
4
- data.tar.gz: d330a5ff5587826b7d40878ff9184a8bc638f947128aeb13b7906368859a31fd
3
+ metadata.gz: 51f78f2d39bbe9f14ec50a3447242d7ec4b4cc920b80d91535d7732a02aaeb80
4
+ data.tar.gz: b2fcda4651ef50b5d32df9e8fc78a26acc8b2968c69564d379000f5b3d528bf1
5
5
  SHA512:
6
- metadata.gz: 3c377a97a879692a7fec7d902ca62152da09bd646050c7ff05036b8d466da3b94f02ee179ccca184577109b692d7fbf5c387d8874628b7312507a1cb1306f208
7
- data.tar.gz: c53a0a1a0ff5998f52a4be0447c6955d12acc3b95121da38016a8366915184a67ccf3f8523bc448526c8ab2bebdfa43b04d78d8a524a86e837568f7f009c136d
6
+ metadata.gz: e53970e0d7067f46da208f0234d2f1606eb2e68544fa821e5dedc949c8eece5b34d368b084cdf8ab65e338a9c260a4bbd8ba0f0cb355c0bb8938e0dfb3957384
7
+ data.tar.gz: b03d3cb37d5d3e56b36be0a82e1ae6ca5f7531822c6af456de1081c6f6b448ee5a0069c3e7c7f145fbcef2f75d1ca7c06a96cd58d50638b60425f3a55a2ce071
@@ -1020,6 +1020,7 @@ end
1020
1020
 
1021
1021
  api_instance = Zernio::AdCampaignsApi.new
1022
1022
  opts = {
1023
+ include_empty: true, # Boolean | Meta only. Campaign reads aggregate over ad documents, so a campaign with ZERO ads is normally invisible here — the state the two-step create (campaign, then ads via `existingCampaignId`) leaves behind whenever Meta rejects the ad step. Set true to list those too, with `adCount: 0` and zeroed metrics. Requires `accountId` and `adAccountId`, since an empty campaign has no ad row to resolve a token or ad account from.
1023
1024
  page: 56, # Integer | Page number (1-based)
1024
1025
  limit: 56, # Integer |
1025
1026
  source: 'zernio', # String | `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that.
@@ -1064,6 +1065,7 @@ end
1064
1065
 
1065
1066
  | Name | Type | Description | Notes |
1066
1067
  | ---- | ---- | ----------- | ----- |
1068
+ | **include_empty** | **Boolean** | Meta only. Campaign reads aggregate over ad documents, so a campaign with ZERO ads is normally invisible here — the state the two-step create (campaign, then ads via `existingCampaignId`) leaves behind whenever Meta rejects the ad step. Set true to list those too, with `adCount: 0` and zeroed metrics. Requires `accountId` and `adAccountId`, since an empty campaign has no ad row to resolve a token or ad account from. | [optional] |
1067
1069
  | **page** | **Integer** | Page number (1-based) | [optional][default to 1] |
1068
1070
  | **limit** | **Integer** | | [optional][default to 20] |
1069
1071
  | **source** | **String** | `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that. | [optional][default to 'all'] |
@@ -1357,7 +1359,7 @@ end
1357
1359
 
1358
1360
  Update a campaign
1359
1361
 
1360
- Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required. - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH. - `bidStrategy` sets the campaign-level default bid strategy. Per Meta's spec, `bid_amount` and `bid_constraints` do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}. - `platformSpecificData.spendCap` (Meta only) sets the campaign's lifetime spend cap, in the ad account's currency. Meta-only for now. Other platforms return 501 Not Implemented.
1362
+ Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so this would 404 even though it exists on Meta. Send `accountId` in the body to skip the local lookup and forward the update to Meta. The response then carries `updated: 0`, since there are no local rows to mirror onto. `accountId` is ignored when the campaign does have ads. - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH. - `bidStrategy` sets the campaign-level default bid strategy. Per Meta's spec, `bid_amount` and `bid_constraints` do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}. - `platformSpecificData.spendCap` (Meta only) sets the campaign's lifetime spend cap, in the ad account's currency. Meta-only for now. Other platforms return 501 Not Implemented.
1361
1363
 
1362
1364
  ### Examples
1363
1365
 
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | | |
8
- | **platform_identifier** | **String** | | |
8
+ | **platform_identifier** | **String** | Required when the top-level accountId is set (channel mode). A row missing it in that mode is rejected individually and reported in errors[], not a 400 for the whole import. | [optional] |
9
9
  | **display_identifier** | **String** | | [optional] |
10
10
  | **email** | **String** | | [optional] |
11
11
  | **company** | **String** | | [optional] |
data/docs/ContactsApi.md CHANGED
@@ -19,7 +19,7 @@ All URIs are relative to *https://zernio.com/api*
19
19
 
20
20
  Bulk create contacts
21
21
 
22
- Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
22
+ Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. When accountId is set, each contact must carry a platformIdentifier; a row missing it is rejected individually (reported in errors[], HTTP 200), not a 400 for the whole import. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
23
23
 
24
24
  ### Examples
25
25
 
@@ -33,7 +33,7 @@ Zernio.configure do |config|
33
33
  end
34
34
 
35
35
  api_instance = Zernio::ContactsApi.new
36
- bulk_create_contacts_request = Zernio::BulkCreateContactsRequest.new({profile_id: 'profile_id_example', contacts: [Zernio::BulkCreateContactsRequestContactsInner.new({name: 'name_example', platform_identifier: 'platform_identifier_example'})]}) # BulkCreateContactsRequest |
36
+ bulk_create_contacts_request = Zernio::BulkCreateContactsRequest.new({profile_id: 'profile_id_example', contacts: [Zernio::BulkCreateContactsRequestContactsInner.new({name: 'name_example'})]}) # BulkCreateContactsRequest |
37
37
 
38
38
  begin
39
39
  # Bulk create contacts
@@ -4,6 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | Zernio SocialAccount id owning the ad account. Required only to update an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from. | [optional] |
7
8
  | **platform** | **String** | | |
8
9
  | **budget** | [**UpdateAdCampaignRequestBudget**](UpdateAdCampaignRequestBudget.md) | | [optional] |
9
10
  | **bid_strategy** | [**BidStrategy**](BidStrategy.md) | Campaign-level default. Ad sets inherit this unless they override. | [optional] |
@@ -16,6 +17,7 @@
16
17
  require 'zernio-sdk'
17
18
 
18
19
  instance = Zernio::UpdateAdCampaignRequest.new(
20
+ account_id: null,
19
21
  platform: null,
20
22
  budget: null,
21
23
  bid_strategy: null,
@@ -1034,6 +1034,7 @@ module Zernio
1034
1034
  # List campaigns
1035
1035
  # Returns campaigns as virtual aggregations over ad documents grouped by platform campaign ID. Metrics (spend, impressions, clicks, etc.) are summed across all ads in each campaign. Campaign status is derived from child ad statuses (active > pending_review > paused > error > completed > cancelled > rejected).
1036
1036
  # @param [Hash] opts the optional parameters
1037
+ # @option opts [Boolean] :include_empty Meta only. Campaign reads aggregate over ad documents, so a campaign with ZERO ads is normally invisible here — the state the two-step create (campaign, then ads via `existingCampaignId`) leaves behind whenever Meta rejects the ad step. Set true to list those too, with `adCount: 0` and zeroed metrics. Requires `accountId` and `adAccountId`, since an empty campaign has no ad row to resolve a token or ad account from.
1037
1038
  # @option opts [Integer] :page Page number (1-based) (default to 1)
1038
1039
  # @option opts [Integer] :limit (default to 20)
1039
1040
  # @option opts [String] :source `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that. (default to 'all')
@@ -1054,6 +1055,7 @@ module Zernio
1054
1055
  # List campaigns
1055
1056
  # Returns campaigns as virtual aggregations over ad documents grouped by platform campaign ID. Metrics (spend, impressions, clicks, etc.) are summed across all ads in each campaign. Campaign status is derived from child ad statuses (active > pending_review > paused > error > completed > cancelled > rejected).
1056
1057
  # @param [Hash] opts the optional parameters
1058
+ # @option opts [Boolean] :include_empty Meta only. Campaign reads aggregate over ad documents, so a campaign with ZERO ads is normally invisible here — the state the two-step create (campaign, then ads via `existingCampaignId`) leaves behind whenever Meta rejects the ad step. Set true to list those too, with `adCount: 0` and zeroed metrics. Requires `accountId` and `adAccountId`, since an empty campaign has no ad row to resolve a token or ad account from.
1057
1059
  # @option opts [Integer] :page Page number (1-based) (default to 1)
1058
1060
  # @option opts [Integer] :limit (default to 20)
1059
1061
  # @option opts [String] :source `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that. (default to 'all')
@@ -1095,6 +1097,7 @@ module Zernio
1095
1097
 
1096
1098
  # query parameters
1097
1099
  query_params = opts[:query_params] || {}
1100
+ query_params[:'includeEmpty'] = opts[:'include_empty'] if !opts[:'include_empty'].nil?
1098
1101
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1099
1102
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1100
1103
  query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
@@ -1452,7 +1455,7 @@ module Zernio
1452
1455
  end
1453
1456
 
1454
1457
  # Update a campaign
1455
- # Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required. - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH. - `bidStrategy` sets the campaign-level default bid strategy. Per Meta's spec, `bid_amount` and `bid_constraints` do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}. - `platformSpecificData.spendCap` (Meta only) sets the campaign's lifetime spend cap, in the ad account's currency. Meta-only for now. Other platforms return 501 Not Implemented.
1458
+ # Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so this would 404 even though it exists on Meta. Send `accountId` in the body to skip the local lookup and forward the update to Meta. The response then carries `updated: 0`, since there are no local rows to mirror onto. `accountId` is ignored when the campaign does have ads. - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH. - `bidStrategy` sets the campaign-level default bid strategy. Per Meta's spec, `bid_amount` and `bid_constraints` do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}. - `platformSpecificData.spendCap` (Meta only) sets the campaign's lifetime spend cap, in the ad account's currency. Meta-only for now. Other platforms return 501 Not Implemented.
1456
1459
  # @param campaign_id [String] Platform campaign ID
1457
1460
  # @param update_ad_campaign_request [UpdateAdCampaignRequest]
1458
1461
  # @param [Hash] opts the optional parameters
@@ -1463,7 +1466,7 @@ module Zernio
1463
1466
  end
1464
1467
 
1465
1468
  # Update a campaign
1466
- # Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required. - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH. - `bidStrategy` sets the campaign-level default bid strategy. Per Meta's spec, `bid_amount` and `bid_constraints` do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}. - `platformSpecificData.spendCap` (Meta only) sets the campaign's lifetime spend cap, in the ad account's currency. Meta-only for now. Other platforms return 501 Not Implemented.
1469
+ # Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so this would 404 even though it exists on Meta. Send `accountId` in the body to skip the local lookup and forward the update to Meta. The response then carries `updated: 0`, since there are no local rows to mirror onto. `accountId` is ignored when the campaign does have ads. - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH. - `bidStrategy` sets the campaign-level default bid strategy. Per Meta's spec, `bid_amount` and `bid_constraints` do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}. - `platformSpecificData.spendCap` (Meta only) sets the campaign's lifetime spend cap, in the ad account's currency. Meta-only for now. Other platforms return 501 Not Implemented.
1467
1470
  # @param campaign_id [String] Platform campaign ID
1468
1471
  # @param update_ad_campaign_request [UpdateAdCampaignRequest]
1469
1472
  # @param [Hash] opts the optional parameters
@@ -20,7 +20,7 @@ module Zernio
20
20
  @api_client = api_client
21
21
  end
22
22
  # Bulk create contacts
23
- # Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
23
+ # Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. When accountId is set, each contact must carry a platformIdentifier; a row missing it is rejected individually (reported in errors[], HTTP 200), not a 400 for the whole import. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
24
24
  # @param bulk_create_contacts_request [BulkCreateContactsRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [BulkCreateContacts200Response]
@@ -30,7 +30,7 @@ module Zernio
30
30
  end
31
31
 
32
32
  # Bulk create contacts
33
- # Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
33
+ # Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. When accountId is set, each contact must carry a platformIdentifier; a row missing it is rejected individually (reported in errors[], HTTP 200), not a 400 for the whole import. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
34
34
  # @param bulk_create_contacts_request [BulkCreateContactsRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(BulkCreateContacts200Response, Integer, Hash)>] BulkCreateContacts200Response data, response status code and response headers
@@ -17,6 +17,7 @@ module Zernio
17
17
  class BulkCreateContactsRequestContactsInner < ApiModelBase
18
18
  attr_accessor :name
19
19
 
20
+ # Required when the top-level accountId is set (channel mode). A row missing it in that mode is rejected individually and reported in errors[], not a 400 for the whole import.
20
21
  attr_accessor :platform_identifier
21
22
 
22
23
  attr_accessor :display_identifier
@@ -91,8 +92,6 @@ module Zernio
91
92
 
92
93
  if attributes.key?(:'platform_identifier')
93
94
  self.platform_identifier = attributes[:'platform_identifier']
94
- else
95
- self.platform_identifier = nil
96
95
  end
97
96
 
98
97
  if attributes.key?(:'display_identifier')
@@ -123,10 +122,6 @@ module Zernio
123
122
  invalid_properties.push('invalid value for "name", name cannot be nil.')
124
123
  end
125
124
 
126
- if @platform_identifier.nil?
127
- invalid_properties.push('invalid value for "platform_identifier", platform_identifier cannot be nil.')
128
- end
129
-
130
125
  invalid_properties
131
126
  end
132
127
 
@@ -135,7 +130,6 @@ module Zernio
135
130
  def valid?
136
131
  warn '[DEPRECATED] the `valid?` method is obsolete'
137
132
  return false if @name.nil?
138
- return false if @platform_identifier.nil?
139
133
  true
140
134
  end
141
135
 
@@ -149,16 +143,6 @@ module Zernio
149
143
  @name = name
150
144
  end
151
145
 
152
- # Custom attribute writer method with validation
153
- # @param [Object] platform_identifier Value to be assigned
154
- def platform_identifier=(platform_identifier)
155
- if platform_identifier.nil?
156
- fail ArgumentError, 'platform_identifier cannot be nil'
157
- end
158
-
159
- @platform_identifier = platform_identifier
160
- end
161
-
162
146
  # Checks equality by comparing each attribute.
163
147
  # @param [Object] Object to be compared
164
148
  def ==(o)
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module Zernio
17
17
  class UpdateAdCampaignRequest < ApiModelBase
18
+ # Zernio SocialAccount id owning the ad account. Required only to update an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
19
+ attr_accessor :account_id
20
+
18
21
  attr_accessor :platform
19
22
 
20
23
  attr_accessor :budget
@@ -52,6 +55,7 @@ module Zernio
52
55
  # Attribute mapping from ruby-style variable name to JSON key.
53
56
  def self.attribute_map
54
57
  {
58
+ :'account_id' => :'accountId',
55
59
  :'platform' => :'platform',
56
60
  :'budget' => :'budget',
57
61
  :'bid_strategy' => :'bidStrategy',
@@ -73,6 +77,7 @@ module Zernio
73
77
  # Attribute type mapping.
74
78
  def self.openapi_types
75
79
  {
80
+ :'account_id' => :'String',
76
81
  :'platform' => :'String',
77
82
  :'budget' => :'UpdateAdCampaignRequestBudget',
78
83
  :'bid_strategy' => :'BidStrategy',
@@ -103,6 +108,10 @@ module Zernio
103
108
  h[k.to_sym] = v
104
109
  }
105
110
 
111
+ if attributes.key?(:'account_id')
112
+ self.account_id = attributes[:'account_id']
113
+ end
114
+
106
115
  if attributes.key?(:'platform')
107
116
  self.platform = attributes[:'platform']
108
117
  else
@@ -182,6 +191,7 @@ module Zernio
182
191
  def ==(o)
183
192
  return true if self.equal?(o)
184
193
  self.class == o.class &&
194
+ account_id == o.account_id &&
185
195
  platform == o.platform &&
186
196
  budget == o.budget &&
187
197
  bid_strategy == o.bid_strategy &&
@@ -198,7 +208,7 @@ module Zernio
198
208
  # Calculates hash code according to all attributes.
199
209
  # @return [Integer] Hash code
200
210
  def hash
201
- [platform, budget, bid_strategy, name, platform_specific_data].hash
211
+ [account_id, platform, budget, bid_strategy, name, platform_specific_data].hash
202
212
  end
203
213
 
204
214
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.633'
14
+ VERSION = '0.0.635'
15
15
  end
data/openapi.yaml CHANGED
@@ -32897,7 +32897,7 @@ paths:
32897
32897
  post:
32898
32898
  operationId: bulkCreateContacts
32899
32899
  summary: Bulk create contacts
32900
- description: 'Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.'
32900
+ description: 'Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. When accountId is set, each contact must carry a platformIdentifier; a row missing it is rejected individually (reported in errors[], HTTP 200), not a 400 for the whole import. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.'
32901
32901
  tags: [Contacts]
32902
32902
  requestBody:
32903
32903
  required: true
@@ -32915,10 +32915,10 @@ paths:
32915
32915
  maxItems: 1000
32916
32916
  items:
32917
32917
  type: object
32918
- required: [name, platformIdentifier]
32918
+ required: [name]
32919
32919
  properties:
32920
32920
  name: { type: string }
32921
- platformIdentifier: { type: string }
32921
+ platformIdentifier: { type: string, description: 'Required when the top-level accountId is set (channel mode). A row missing it in that mode is rejected individually and reported in errors[], not a 400 for the whole import.' }
32922
32922
  displayIdentifier: { type: string }
32923
32923
  email: { type: string }
32924
32924
  company: { type: string }
@@ -32936,7 +32936,7 @@ paths:
32936
32936
  skipped: { type: integer }
32937
32937
  errors: { type: array, items: { type: string }, description: 'Per-contact failures, e.g. an identifier that is not a valid phone number' }
32938
32938
  total: { type: integer }
32939
- '400': { description: 'Missing required field, or a row carries platformIdentifier/accountId with no top-level accountId to attach it to' }
32939
+ '400': { description: 'Contact missing required field name, or a row carries platformIdentifier/accountId with no top-level accountId to attach it to. A row missing platformIdentifier while accountId IS set is not a 400: it is reported in errors[] under a 200.' }
32940
32940
  '401': { $ref: '#/components/responses/Unauthorized' }
32941
32941
 
32942
32942
  /v1/contacts/{contactId}/fields/{slug}:
@@ -34910,6 +34910,18 @@ paths:
34910
34910
  security:
34911
34911
  - bearerAuth: []
34912
34912
  parameters:
34913
+ - name: includeEmpty
34914
+ in: query
34915
+ required: false
34916
+ schema: { type: boolean }
34917
+ description: >-
34918
+ Meta only. Campaign reads aggregate over ad documents, so a campaign
34919
+ with ZERO ads is normally invisible here — the state the two-step
34920
+ create (campaign, then ads via `existingCampaignId`) leaves behind
34921
+ whenever Meta rejects the ad step. Set true to list those too, with
34922
+ `adCount: 0` and zeroed metrics. Requires `accountId` and
34923
+ `adAccountId`, since an empty campaign has no ad row to resolve a
34924
+ token or ad account from.
34913
34925
  - $ref: '#/components/parameters/PageParam'
34914
34926
  - { name: limit, in: query, schema: { type: integer, minimum: 1, maximum: 100, default: 20 } }
34915
34927
  - { name: source, in: query, schema: { type: string, enum: [zernio, all], default: all }, description: "`all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that." }
@@ -35057,6 +35069,12 @@ paths:
35057
35069
  description: |
35058
35070
  Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required.
35059
35071
 
35072
+ **Empty campaigns.** A campaign with zero ads has no local Ad documents to
35073
+ resolve, so this would 404 even though it exists on Meta. Send `accountId`
35074
+ in the body to skip the local lookup and forward the update to Meta. The
35075
+ response then carries `updated: 0`, since there are no local rows to mirror
35076
+ onto. `accountId` is ignored when the campaign does have ads.
35077
+
35060
35078
  - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns
35061
35079
  (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint
35062
35080
  will return 409 with code BUDGET_LEVEL_MISMATCH.
@@ -35078,6 +35096,7 @@ paths:
35078
35096
  type: object
35079
35097
  required: [platform]
35080
35098
  properties:
35099
+ accountId: { type: string, description: "Zernio SocialAccount id owning the ad account. Required only to update an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from." }
35081
35100
  platform: { type: string, enum: [facebook, instagram] }
35082
35101
  budget:
35083
35102
  type: object
@@ -221,6 +221,7 @@ describe 'AdCampaignsApi' do
221
221
  # List campaigns
222
222
  # Returns campaigns as virtual aggregations over ad documents grouped by platform campaign ID. Metrics (spend, impressions, clicks, etc.) are summed across all ads in each campaign. Campaign status is derived from child ad statuses (active &gt; pending_review &gt; paused &gt; error &gt; completed &gt; cancelled &gt; rejected).
223
223
  # @param [Hash] opts the optional parameters
224
+ # @option opts [Boolean] :include_empty Meta only. Campaign reads aggregate over ad documents, so a campaign with ZERO ads is normally invisible here — the state the two-step create (campaign, then ads via &#x60;existingCampaignId&#x60;) leaves behind whenever Meta rejects the ad step. Set true to list those too, with &#x60;adCount: 0&#x60; and zeroed metrics. Requires &#x60;accountId&#x60; and &#x60;adAccountId&#x60;, since an empty campaign has no ad row to resolve a token or ad account from.
224
225
  # @option opts [Integer] :page Page number (1-based)
225
226
  # @option opts [Integer] :limit
226
227
  # @option opts [String] :source &#x60;all&#x60; (default) returns both Zernio-created ads and those discovered from the platform&#39;s ad manager — matches the web UI&#39;s default view. Pass &#x60;zernio&#x60; to restrict to isExternal&#x3D;false only. Status is NOT filtered by default — use the &#x60;status&#x60; param for that.
@@ -302,7 +303,7 @@ describe 'AdCampaignsApi' do
302
303
 
303
304
  # unit tests for update_ad_campaign
304
305
  # Update a campaign
305
- # Campaign-level edits. At least one of &#x60;budget&#x60;, &#x60;bidStrategy&#x60;, &#x60;name&#x60; or &#x60;platformSpecificData&#x60; is required. - &#x60;budget&#x60; updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH. - &#x60;bidStrategy&#x60; sets the campaign-level default bid strategy. Per Meta&#39;s spec, &#x60;bid_amount&#x60; and &#x60;bid_constraints&#x60; do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}. - &#x60;platformSpecificData.spendCap&#x60; (Meta only) sets the campaign&#39;s lifetime spend cap, in the ad account&#39;s currency. Meta-only for now. Other platforms return 501 Not Implemented.
306
+ # Campaign-level edits. At least one of &#x60;budget&#x60;, &#x60;bidStrategy&#x60;, &#x60;name&#x60; or &#x60;platformSpecificData&#x60; is required. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so this would 404 even though it exists on Meta. Send &#x60;accountId&#x60; in the body to skip the local lookup and forward the update to Meta. The response then carries &#x60;updated: 0&#x60;, since there are no local rows to mirror onto. &#x60;accountId&#x60; is ignored when the campaign does have ads. - &#x60;budget&#x60; updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH. - &#x60;bidStrategy&#x60; sets the campaign-level default bid strategy. Per Meta&#39;s spec, &#x60;bid_amount&#x60; and &#x60;bid_constraints&#x60; do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}. - &#x60;platformSpecificData.spendCap&#x60; (Meta only) sets the campaign&#39;s lifetime spend cap, in the ad account&#39;s currency. Meta-only for now. Other platforms return 501 Not Implemented.
306
307
  # @param campaign_id Platform campaign ID
307
308
  # @param update_ad_campaign_request
308
309
  # @param [Hash] opts the optional parameters
@@ -34,7 +34,7 @@ describe 'ContactsApi' do
34
34
 
35
35
  # unit tests for bulk_create_contacts
36
36
  # Bulk create contacts
37
- # Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
37
+ # Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact. accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId); platform is always derived from the resolved account, never used to decide whether channels are created, and a mismatched platform 404s as account not found. When accountId is set, each contact must carry a platformIdentifier; a row missing it is rejected individually (reported in errors[], HTTP 200), not a 400 for the whole import. On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits and a value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
38
38
  # @param bulk_create_contacts_request
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [BulkCreateContacts200Response]
@@ -27,6 +27,12 @@ describe Zernio::UpdateAdCampaignRequest do
27
27
  end
28
28
  end
29
29
 
30
+ describe 'test attribute "account_id"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
30
36
  describe 'test attribute "platform"' do
31
37
  it 'should work' do
32
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: late-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.633
4
+ version: 0.0.635
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-31 00:00:00.000000000 Z
11
+ date: 2026-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -4919,7 +4919,7 @@ files:
4919
4919
  - spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
4920
4920
  - spec/models/you_tube_video_retention_response_spec.rb
4921
4921
  - spec/spec_helper.rb
4922
- - zernio-sdk-0.0.633.gem
4922
+ - zernio-sdk-0.0.635.gem
4923
4923
  - zernio-sdk.gemspec
4924
4924
  homepage: https://openapi-generator.tech
4925
4925
  licenses:
Binary file