late-sdk 0.0.771 → 0.0.773

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -0
  3. data/docs/AdCampaignsApi.md +72 -0
  4. data/docs/AnalyticsApi.md +2 -2
  5. data/docs/AttachCampaignAssets201Response.md +24 -0
  6. data/docs/AttachCampaignAssetsRequest.md +24 -0
  7. data/docs/AttachCampaignAssetsRequestSitelinksInner.md +24 -0
  8. data/docs/AttachCampaignAssetsRequestStructuredSnippetsInner.md +20 -0
  9. data/docs/CreateInboxConversationRequest.md +3 -1
  10. data/docs/CreateInboxConversationRequestTemplateButtonParamsInner.md +22 -0
  11. data/docs/CreateStandaloneAdRequest.md +4 -0
  12. data/docs/CreateStandaloneAdRequestStructuredSnippetsInner.md +20 -0
  13. data/docs/GetInboxConversationMessages200ResponseMessagesInner.md +4 -2
  14. data/docs/MessagesApi.md +1 -1
  15. data/docs/PostAnalytics.md +4 -0
  16. data/docs/TargetingSpec.md +2 -2
  17. data/docs/WebhookPayloadMessageMessage.md +3 -1
  18. data/docs/WebhookPayloadMessageSentMessage.md +4 -2
  19. data/lib/zernio-sdk/api/ad_campaigns_api.rb +74 -0
  20. data/lib/zernio-sdk/api/analytics_api.rb +3 -3
  21. data/lib/zernio-sdk/api/messages_api.rb +2 -2
  22. data/lib/zernio-sdk/models/ad_tree_campaign_optimization_goal.rb +1 -0
  23. data/lib/zernio-sdk/models/attach_campaign_assets201_response.rb +180 -0
  24. data/lib/zernio-sdk/models/attach_campaign_assets_request.rb +283 -0
  25. data/lib/zernio-sdk/models/attach_campaign_assets_request_sitelinks_inner.rb +282 -0
  26. data/lib/zernio-sdk/models/attach_campaign_assets_request_structured_snippets_inner.rb +234 -0
  27. data/lib/zernio-sdk/models/create_inbox_conversation_request.rb +33 -2
  28. data/lib/zernio-sdk/models/create_inbox_conversation_request_template_button_params_inner.rb +270 -0
  29. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +81 -1
  30. data/lib/zernio-sdk/models/create_standalone_ad_request_structured_snippets_inner.rb +235 -0
  31. data/lib/zernio-sdk/models/get_inbox_conversation_messages200_response_messages_inner.rb +28 -5
  32. data/lib/zernio-sdk/models/post_analytics.rb +21 -1
  33. data/lib/zernio-sdk/models/targeting_spec.rb +2 -0
  34. data/lib/zernio-sdk/models/webhook_payload_message_message.rb +27 -4
  35. data/lib/zernio-sdk/models/webhook_payload_message_sent_message.rb +28 -5
  36. data/lib/zernio-sdk/version.rb +1 -1
  37. data/lib/zernio-sdk.rb +6 -0
  38. data/openapi.yaml +211 -11
  39. data/spec/api/ad_campaigns_api_spec.rb +13 -0
  40. data/spec/api/analytics_api_spec.rb +1 -1
  41. data/spec/api/messages_api_spec.rb +1 -1
  42. data/spec/models/attach_campaign_assets201_response_spec.rb +54 -0
  43. data/spec/models/attach_campaign_assets_request_sitelinks_inner_spec.rb +54 -0
  44. data/spec/models/attach_campaign_assets_request_spec.rb +54 -0
  45. data/spec/models/attach_campaign_assets_request_structured_snippets_inner_spec.rb +46 -0
  46. data/spec/models/create_inbox_conversation_request_spec.rb +6 -0
  47. data/spec/models/create_inbox_conversation_request_template_button_params_inner_spec.rb +52 -0
  48. data/spec/models/create_standalone_ad_request_spec.rb +12 -0
  49. data/spec/models/create_standalone_ad_request_structured_snippets_inner_spec.rb +46 -0
  50. data/spec/models/get_inbox_conversation_messages200_response_messages_inner_spec.rb +10 -0
  51. data/spec/models/post_analytics_spec.rb +12 -0
  52. data/spec/models/webhook_payload_message_message_spec.rb +10 -0
  53. data/spec/models/webhook_payload_message_sent_message_spec.rb +10 -0
  54. data/zernio-sdk-0.0.773.gem +0 -0
  55. metadata +26 -2
  56. data/zernio-sdk-0.0.771.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37ce52fd9e8de6a481cf352f64c23ba53f8a68a16efa1afa268e1c19c0040dfc
4
- data.tar.gz: 2038e5233a78014a8d0bf3a7c316a7bcc61ea5553bcc09b945167592cb8a7b1d
3
+ metadata.gz: be65385bdd556a7595c208b19d96a86b2a61db7e9b3052985f4a5fc7d471502a
4
+ data.tar.gz: aaff782a58a74185a2f6c628509846b2d4140d6254249e2fb8871caaed1e73ca
5
5
  SHA512:
6
- metadata.gz: 96d2c6d5b7a934f8e93f21dcd2441fbfbbd46b80192bf53dcfc57ca899a974c46ff1ead9f5c874e42c4b5a0ce151f2187ae7f89abd3722012770f07c4a1dee41
7
- data.tar.gz: 8297f25bb87279372d2a0c6eae456689c472ea78045a1e4a309b77c943e201b5ca63f5f3193bb7b7d55decca2d9373a626441bf1ff1201557a783cfc2a24d941
6
+ metadata.gz: 88949bad9fd87e38ec7d5f90903a330566917bf874d2c41964d14f5202c18c94fa2d7713e1a263765196cdf850c74a0354001a910aa460e5a23c347a42652c3f
7
+ data.tar.gz: 1e90d540eabe343c45d45fd30f2d6db6642ee1b8cd8e484990e9e8b95d3dae06e1d7fbb1e1c9dd6fb697f89d603dacc8cfa1890660a8afa96d2f4efc60c81cf5
data/README.md CHANGED
@@ -132,6 +132,7 @@ Class | Method | HTTP request | Description
132
132
  *Zernio::AdAudiencesApi* | [**list_ad_audiences**](docs/AdAudiencesApi.md#list_ad_audiences) | **GET** /v1/ads/audiences | List custom audiences
133
133
  *Zernio::AdAudiencesApi* | [**replace_ad_audience_companies**](docs/AdAudiencesApi.md#replace_ad_audience_companies) | **POST** /v1/ads/audiences/{audienceId}/companies | Replace audience companies
134
134
  *Zernio::AdAudiencesApi* | [**update_ad_audience**](docs/AdAudiencesApi.md#update_ad_audience) | **PUT** /v1/ads/audiences/{audienceId} | Update an audience
135
+ *Zernio::AdCampaignsApi* | [**attach_campaign_assets**](docs/AdCampaignsApi.md#attach_campaign_assets) | **POST** /v1/ads/campaigns/{campaignId}/assets | Attach extension assets to a Google Search campaign
135
136
  *Zernio::AdCampaignsApi* | [**boost_post**](docs/AdCampaignsApi.md#boost_post) | **POST** /v1/ads/boost | Boost post as ad
136
137
  *Zernio::AdCampaignsApi* | [**bulk_update_ad_campaign_status**](docs/AdCampaignsApi.md#bulk_update_ad_campaign_status) | **POST** /v1/ads/campaigns/bulk-status | Pause or resume many campaigns
137
138
  *Zernio::AdCampaignsApi* | [**create_ad_campaign**](docs/AdCampaignsApi.md#create_ad_campaign) | **POST** /v1/ads/campaigns | Create a standalone campaign
@@ -736,6 +737,10 @@ Class | Method | HTTP request | Description
736
737
  - [Zernio::AssignGoogleBusinessLocation200Response](docs/AssignGoogleBusinessLocation200Response.md)
737
738
  - [Zernio::AssignGoogleBusinessLocation200ResponseAccount](docs/AssignGoogleBusinessLocation200ResponseAccount.md)
738
739
  - [Zernio::AssignGoogleBusinessLocationRequest](docs/AssignGoogleBusinessLocationRequest.md)
740
+ - [Zernio::AttachCampaignAssets201Response](docs/AttachCampaignAssets201Response.md)
741
+ - [Zernio::AttachCampaignAssetsRequest](docs/AttachCampaignAssetsRequest.md)
742
+ - [Zernio::AttachCampaignAssetsRequestSitelinksInner](docs/AttachCampaignAssetsRequestSitelinksInner.md)
743
+ - [Zernio::AttachCampaignAssetsRequestStructuredSnippetsInner](docs/AttachCampaignAssetsRequestStructuredSnippetsInner.md)
739
744
  - [Zernio::AttachNumberToSipTrunk200Response](docs/AttachNumberToSipTrunk200Response.md)
740
745
  - [Zernio::AttachNumberToSipTrunkRequest](docs/AttachNumberToSipTrunkRequest.md)
741
746
  - [Zernio::BatchGetGoogleBusinessReviews200Response](docs/BatchGetGoogleBusinessReviews200Response.md)
@@ -906,6 +911,7 @@ Class | Method | HTTP request | Description
906
911
  - [Zernio::CreateInboxConversation429Response](docs/CreateInboxConversation429Response.md)
907
912
  - [Zernio::CreateInboxConversationRequest](docs/CreateInboxConversationRequest.md)
908
913
  - [Zernio::CreateInboxConversationRequestHeaderMedia](docs/CreateInboxConversationRequestHeaderMedia.md)
914
+ - [Zernio::CreateInboxConversationRequestTemplateButtonParamsInner](docs/CreateInboxConversationRequestTemplateButtonParamsInner.md)
909
915
  - [Zernio::CreateInviteToken201Response](docs/CreateInviteToken201Response.md)
910
916
  - [Zernio::CreateInviteTokenRequest](docs/CreateInviteTokenRequest.md)
911
917
  - [Zernio::CreateLeadForm200Response](docs/CreateLeadForm200Response.md)
@@ -971,6 +977,7 @@ Class | Method | HTTP request | Description
971
977
  - [Zernio::CreateStandaloneAdRequestPromotedObject](docs/CreateStandaloneAdRequestPromotedObject.md)
972
978
  - [Zernio::CreateStandaloneAdRequestRegionsInner](docs/CreateStandaloneAdRequestRegionsInner.md)
973
979
  - [Zernio::CreateStandaloneAdRequestSitelinksInner](docs/CreateStandaloneAdRequestSitelinksInner.md)
980
+ - [Zernio::CreateStandaloneAdRequestStructuredSnippetsInner](docs/CreateStandaloneAdRequestStructuredSnippetsInner.md)
974
981
  - [Zernio::CreateStandaloneAdRequestTracking](docs/CreateStandaloneAdRequestTracking.md)
975
982
  - [Zernio::CreateStandaloneAdRequestTranslationsInner](docs/CreateStandaloneAdRequestTranslationsInner.md)
976
983
  - [Zernio::CreateStandaloneAdRequestVideo](docs/CreateStandaloneAdRequestVideo.md)
@@ -4,6 +4,7 @@ All URIs are relative to *https://zernio.com/api*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
+ | [**attach_campaign_assets**](AdCampaignsApi.md#attach_campaign_assets) | **POST** /v1/ads/campaigns/{campaignId}/assets | Attach extension assets to a Google Search campaign |
7
8
  | [**boost_post**](AdCampaignsApi.md#boost_post) | **POST** /v1/ads/boost | Boost post as ad |
8
9
  | [**bulk_update_ad_campaign_status**](AdCampaignsApi.md#bulk_update_ad_campaign_status) | **POST** /v1/ads/campaigns/bulk-status | Pause or resume many campaigns |
9
10
  | [**create_ad_campaign**](AdCampaignsApi.md#create_ad_campaign) | **POST** /v1/ads/campaigns | Create a standalone campaign |
@@ -28,6 +29,77 @@ All URIs are relative to *https://zernio.com/api*
28
29
  | [**update_ad_status**](AdCampaignsApi.md#update_ad_status) | **PUT** /v1/ads/{adId}/status | Pause or resume a single ad |
29
30
 
30
31
 
32
+ ## attach_campaign_assets
33
+
34
+ > <AttachCampaignAssets201Response> attach_campaign_assets(campaign_id, attach_campaign_assets_request)
35
+
36
+ Attach extension assets to a Google Search campaign
37
+
38
+ Attach sitelinks, callouts and/or structured snippets to an already-existing Google Search campaign — the same builders POST /v1/ads/create uses, but without rebuilding the hierarchy. At least one of sitelinks, callouts or structuredSnippets is required. Google-only. Other platforms have no equivalent extension surface and return 501. Approval status is Google-async; poll `asset.policy_summary` after review. Assets stay in the account library even if the campaign is later deleted.
39
+
40
+ ### Examples
41
+
42
+ ```ruby
43
+ require 'time'
44
+ require 'zernio-sdk'
45
+ # setup authorization
46
+ Zernio.configure do |config|
47
+ # Configure Bearer authorization (JWT): bearerAuth
48
+ config.access_token = 'YOUR_BEARER_TOKEN'
49
+ end
50
+
51
+ api_instance = Zernio::AdCampaignsApi.new
52
+ campaign_id = 'campaign_id_example' # String | Numeric Google platform campaign id.
53
+ attach_campaign_assets_request = Zernio::AttachCampaignAssetsRequest.new({account_id: 'account_id_example'}) # AttachCampaignAssetsRequest |
54
+
55
+ begin
56
+ # Attach extension assets to a Google Search campaign
57
+ result = api_instance.attach_campaign_assets(campaign_id, attach_campaign_assets_request)
58
+ p result
59
+ rescue Zernio::ApiError => e
60
+ puts "Error when calling AdCampaignsApi->attach_campaign_assets: #{e}"
61
+ end
62
+ ```
63
+
64
+ #### Using the attach_campaign_assets_with_http_info variant
65
+
66
+ This returns an Array which contains the response data, status code and headers.
67
+
68
+ > <Array(<AttachCampaignAssets201Response>, Integer, Hash)> attach_campaign_assets_with_http_info(campaign_id, attach_campaign_assets_request)
69
+
70
+ ```ruby
71
+ begin
72
+ # Attach extension assets to a Google Search campaign
73
+ data, status_code, headers = api_instance.attach_campaign_assets_with_http_info(campaign_id, attach_campaign_assets_request)
74
+ p status_code # => 2xx
75
+ p headers # => { ... }
76
+ p data # => <AttachCampaignAssets201Response>
77
+ rescue Zernio::ApiError => e
78
+ puts "Error when calling AdCampaignsApi->attach_campaign_assets_with_http_info: #{e}"
79
+ end
80
+ ```
81
+
82
+ ### Parameters
83
+
84
+ | Name | Type | Description | Notes |
85
+ | ---- | ---- | ----------- | ----- |
86
+ | **campaign_id** | **String** | Numeric Google platform campaign id. | |
87
+ | **attach_campaign_assets_request** | [**AttachCampaignAssetsRequest**](AttachCampaignAssetsRequest.md) | | |
88
+
89
+ ### Return type
90
+
91
+ [**AttachCampaignAssets201Response**](AttachCampaignAssets201Response.md)
92
+
93
+ ### Authorization
94
+
95
+ [bearerAuth](../README.md#bearerAuth)
96
+
97
+ ### HTTP request headers
98
+
99
+ - **Content-Type**: application/json
100
+ - **Accept**: application/json
101
+
102
+
31
103
  ## boost_post
32
104
 
33
105
  > <UpdateAd200Response> boost_post(boost_post_request, opts)
data/docs/AnalyticsApi.md CHANGED
@@ -61,7 +61,7 @@ opts = {
61
61
  to_date: Date.parse('2013-10-20'), # Date | Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
62
62
  limit: 56, # Integer | Page size (default 50)
63
63
  page: 56, # Integer | Page number (default 1)
64
- sort_by: 'date', # String | Sort by date, engagement, or a specific metric
64
+ sort_by: 'date', # String | Sort by date, engagement, or a specific metric. Instagram-only metrics (follows, reposts, reels_skip_rate, ig_reels_*) sort posts with no value as 0.
65
65
  order: 'asc' # String | Sort order
66
66
  }
67
67
 
@@ -105,7 +105,7 @@ end
105
105
  | **to_date** | **Date** | Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted. | [optional] |
106
106
  | **limit** | **Integer** | Page size (default 50) | [optional][default to 50] |
107
107
  | **page** | **Integer** | Page number (default 1) | [optional][default to 1] |
108
- | **sort_by** | **String** | Sort by date, engagement, or a specific metric | [optional][default to &#39;date&#39;] |
108
+ | **sort_by** | **String** | Sort by date, engagement, or a specific metric. Instagram-only metrics (follows, reposts, reels_skip_rate, ig_reels_*) sort posts with no value as 0. | [optional][default to &#39;date&#39;] |
109
109
  | **order** | **String** | Sort order | [optional][default to &#39;desc&#39;] |
110
110
 
111
111
  ### Return type
@@ -0,0 +1,24 @@
1
+ # Zernio::AttachCampaignAssets201Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **campaign_id** | **String** | | [optional] |
8
+ | **sitelink_asset_resource_names** | **Array&lt;String&gt;** | | [optional] |
9
+ | **callout_asset_resource_names** | **Array&lt;String&gt;** | | [optional] |
10
+ | **structured_snippet_asset_resource_names** | **Array&lt;String&gt;** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::AttachCampaignAssets201Response.new(
18
+ campaign_id: null,
19
+ sitelink_asset_resource_names: null,
20
+ callout_asset_resource_names: null,
21
+ structured_snippet_asset_resource_names: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,24 @@
1
+ # Zernio::AttachCampaignAssetsRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | Zernio Google Ads SocialAccount id — resolves the customer id + refresh token. | |
8
+ | **sitelinks** | [**Array&lt;AttachCampaignAssetsRequestSitelinksInner&gt;**](AttachCampaignAssetsRequestSitelinksInner.md) | See POST /v1/ads/create sitelinks — same shape. | [optional] |
9
+ | **callouts** | **Array&lt;String&gt;** | | [optional] |
10
+ | **structured_snippets** | [**Array&lt;AttachCampaignAssetsRequestStructuredSnippetsInner&gt;**](AttachCampaignAssetsRequestStructuredSnippetsInner.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::AttachCampaignAssetsRequest.new(
18
+ account_id: null,
19
+ sitelinks: null,
20
+ callouts: null,
21
+ structured_snippets: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,24 @@
1
+ # Zernio::AttachCampaignAssetsRequestSitelinksInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **text** | **String** | | |
8
+ | **link_url** | **String** | | |
9
+ | **description1** | **String** | | [optional] |
10
+ | **description2** | **String** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::AttachCampaignAssetsRequestSitelinksInner.new(
18
+ text: null,
19
+ link_url: null,
20
+ description1: null,
21
+ description2: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,20 @@
1
+ # Zernio::AttachCampaignAssetsRequestStructuredSnippetsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **header** | **String** | | |
8
+ | **values** | **Array&lt;String&gt;** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::AttachCampaignAssetsRequestStructuredSnippetsInner.new(
16
+ header: null,
17
+ values: null
18
+ )
19
+ ```
20
+
@@ -13,7 +13,8 @@
13
13
  | **category** | **String** | WhatsApp only (Meta Direct Send). Combined with message and without templateName, starts the conversation with a business-initiated UTILITY message and no pre-approved template; Meta matches or auto-creates a template asynchronously. The WhatsApp Business Account must be eligible for Direct Send, otherwise the send fails with an error telling you to use an approved message template instead. Cannot be combined with templateName (templates are already categorized at creation). Utility messages only; marketing content is not allowed under this category. Accepted on the JSON body only, not on multipart requests. | [optional] |
14
14
  | **link_preview** | **Boolean** | WhatsApp only. Set false to send the Direct Send (category: &#39;utility&#39;) text message without a link-preview thumbnail for the first URL in the text. Defaults to true, which is how every WhatsApp text has been sent to date. Does not apply to template sends. Accepted on the JSON body only, not on multipart requests. | [optional][default to true] |
15
15
  | **template_language** | **String** | WhatsApp only. Template language code (e.g. en_US). | [optional] |
16
- | **template_params** | **Array&lt;String&gt;** | WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. Media headers (image, video, document) are filled automatically from the approved template and take no value here (use headerMedia to override the header asset per send). | [optional] |
16
+ | **template_params** | **Array&lt;String&gt;** | WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. Media headers (image, video, document) are filled automatically from the approved template and take no value here (use headerMedia to override the header asset per send). Buttons that are not dynamic-URL buttons (copy-code, flow) take no value here either; use templateButtonParams. | [optional] |
17
+ | **template_button_params** | [**Array&lt;CreateInboxConversationRequestTemplateButtonParamsInner&gt;**](CreateInboxConversationRequestTemplateButtonParamsInner.md) | WhatsApp only. Values for template buttons that carry one at send time, each addressed by the button&#39;s position in the approved template. This is the only way to send a copy-code button&#39;s payload (a Pix payment code, a coupon) or a flow token, because templateParams is a flat array of text variables and covers dynamic URL buttons only. Supplying a button here overrides whatever templateParams would have derived for that same index, so the send never carries one button twice; repeating an index within this array is rejected with 400. Each index must name a button of the matching kind on the approved template, which is also checked before the send and returns 400 (INVALID_TEMPLATE_BUTTON_PARAM) rather than a Meta rejection. | [optional] |
17
18
  | **header_media** | [**CreateInboxConversationRequestHeaderMedia**](CreateInboxConversationRequestHeaderMedia.md) | | [optional] |
18
19
 
19
20
  ## Example
@@ -32,6 +33,7 @@ instance = Zernio::CreateInboxConversationRequest.new(
32
33
  link_preview: null,
33
34
  template_language: null,
34
35
  template_params: null,
36
+ template_button_params: null,
35
37
  header_media: null
36
38
  )
37
39
  ```
@@ -0,0 +1,22 @@
1
+ # Zernio::CreateInboxConversationRequestTemplateButtonParamsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **index** | **Integer** | Zero-based position of the button in the approved template&#39;s buttons. | |
8
+ | **sub_type** | **String** | The button kind, which decides how the value is sent: copy_code sends it as the coupon_code payload, flow as the flow token, url as the dynamic suffix appended to the button&#39;s base URL. | |
9
+ | **value** | **String** | The value to send (e.g. the Pix copy-and-paste code for a copy_code button). | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::CreateInboxConversationRequestTemplateButtonParamsInner.new(
17
+ index: null,
18
+ sub_type: null,
19
+ value: null
20
+ )
21
+ ```
22
+
@@ -75,6 +75,8 @@
75
75
  | **additional_headlines** | **Array&lt;String&gt;** | Google Search RSA only. Extra headlines. | [optional] |
76
76
  | **additional_descriptions** | **Array&lt;String&gt;** | Google Search RSA only. Extra descriptions. | [optional] |
77
77
  | **sitelinks** | [**Array&lt;CreateStandaloneAdRequestSitelinksInner&gt;**](CreateStandaloneAdRequestSitelinksInner.md) | Google Search only. Sitelink assets to create and attach at the campaign level. Each entry becomes an Asset (with sitelink_asset + Asset.final_urls) plus a CampaignAsset link (field_type SITELINK). Approval is async — Google reviews assets after creation; poll asset.policy_summary later to read the verdict. Google requires at least two sitelinks to surface them on an ad; four or more is Google&#39;s own recommendation for maximum visibility. The response&#39;s creative.sitelinks[] echoes each input plus its Google resourceName. | [optional] |
78
+ | **callouts** | **Array&lt;String&gt;** | Google Search only. Short callout texts (max 25 chars each) that appear as non-clickable annotations under the ad, e.g. \&quot;Free shipping\&quot;, \&quot;24/7 support\&quot;. Each becomes one Asset (&#x60;callout_asset&#x60;) plus a CampaignAsset link with field_type CALLOUT. Response&#39;s creative.callouts[] echoes each input plus its Google resourceName. | [optional] |
79
+ | **structured_snippets** | [**Array&lt;CreateStandaloneAdRequestStructuredSnippetsInner&gt;**](CreateStandaloneAdRequestStructuredSnippetsInner.md) | Google Search only. Structured snippets — one header from Google&#39;s predefined list plus 3-10 values (max 25 chars each). Each becomes one Asset (&#x60;structured_snippet_asset&#x60;) plus a CampaignAsset link with field_type STRUCTURED_SNIPPET. | [optional] |
78
80
  | **advantage_audience** | **Integer** | Meta only. Controls the Advantage audience feature (targeting_automation). 0 &#x3D; disabled (default), 1 &#x3D; enabled. Meta Marketing API requires this field on all ad set creation requests. | [optional] |
79
81
  | **attribution_spec** | [**Array&lt;CreateStandaloneAdRequestAttributionSpecInner&gt;**](CreateStandaloneAdRequestAttributionSpecInner.md) | Meta only. Conversion attribution window for the ad set — maps 1:1 to Meta&#39;s ad-set &#x60;attribution_spec&#x60;. Only honored for conversion goals (&#x60;conversions&#x60;, &#x60;lead_generation&#x60;, &#x60;app_promotion&#x60;); ignored for awareness/traffic/engagement. Omit to use Meta&#39;s default (&#x60;7-day click&#x60; + &#x60;1-day view&#x60;). Meta enforces the valid combinations: &#x60;VIEW_THROUGH&#x60; only allows &#x60;windowDays: 1&#x60; (7d/28d view windows were removed Jan 2026); &#x60;ENGAGED_VIDEO_VIEW&#x60; only &#x60;1&#x60; and only alongside &#x60;VIEW_THROUGH: 1&#x60;; &#x60;CLICK_THROUGH: 28&#x60; only on certain objectives. Invalid combos surface as a Meta 400. Example: &#x60;[{ \&quot;eventType\&quot;: \&quot;CLICK_THROUGH\&quot;, \&quot;windowDays\&quot;: 7 }, { \&quot;eventType\&quot;: \&quot;VIEW_THROUGH\&quot;, \&quot;windowDays\&quot;: 1 }]&#x60; | [optional] |
80
82
  | **gender** | **String** | Restrict the audience by gender. &#39;male&#39; targets men only, &#39;female&#39; targets women only, &#39;all&#39; (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X. | [optional][default to &#39;all&#39;] |
@@ -168,6 +170,8 @@ instance = Zernio::CreateStandaloneAdRequest.new(
168
170
  additional_headlines: null,
169
171
  additional_descriptions: null,
170
172
  sitelinks: null,
173
+ callouts: null,
174
+ structured_snippets: null,
171
175
  advantage_audience: null,
172
176
  attribution_spec: null,
173
177
  gender: null,
@@ -0,0 +1,20 @@
1
+ # Zernio::CreateStandaloneAdRequestStructuredSnippetsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **header** | **String** | One of Google&#39;s 13 predefined snippet headers. | |
8
+ | **values** | **Array&lt;String&gt;** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::CreateStandaloneAdRequestStructuredSnippetsInner.new(
16
+ header: null,
17
+ values: null
18
+ )
19
+ ```
20
+
@@ -30,7 +30,8 @@
30
30
  | **sent_at** | **Time** | Original send time for outgoing messages (used for Messenger watermark queries). | [optional] |
31
31
  | **delivery_error** | [**GetInboxConversationMessages200ResponseMessagesInnerDeliveryError**](GetInboxConversationMessages200ResponseMessagesInnerDeliveryError.md) | | [optional] |
32
32
  | **reactions** | [**Array&lt;GetInboxConversationMessages200ResponseMessagesInnerReactionsInner&gt;**](GetInboxConversationMessages200ResponseMessagesInnerReactionsInner.md) | Emoji reactions on this message (WhatsApp / Telegram). At most one per party in a 1:1 thread. | [optional] |
33
- | **metadata** | **Hash&lt;String, Object&gt;** | Platform-specific extras. Free-form, but commonly includes: &#x60;quotedMessageId&#x60; (platformMessageId this message replies to), &#x60;waInteractive&#x60; (a compact descriptor of WhatsApp interactive content sent: buttons / list / cta_url / flow / location_request), and for inbound interactive taps &#x60;interactiveType&#x60; / &#x60;interactiveId&#x60;. | [optional] |
33
+ | **metadata** | **Hash&lt;String, Object&gt;** | Platform-specific extras. Free-form, but commonly includes: &#x60;quotedMessageId&#x60; (platformMessageId this message replies to), &#x60;waInteractive&#x60; (a compact descriptor of WhatsApp interactive content sent: buttons / list / cta_url / flow / location_request), and for inbound interactive taps &#x60;interactiveType&#x60; / &#x60;interactiveId&#x60;. It can also carry &#x60;source&#x60; (&#x60;whatsapp_business_app&#x60; / &#x60;coexistence_history&#x60; on a WhatsApp Coexistence number, &#x60;bulk-api&#x60; on a POST /v1/whatsapp/bulk send), which is where the message reached us from rather than who produced it: read &#x60;sentVia&#x60; for that. | [optional] |
34
+ | **sent_via** | **String** | Which Zernio surface produced this outgoing message: &#x60;human&#x60; (an operator in the Zernio inbox), &#x60;api&#x60; (a call to this API), &#x60;broadcast&#x60;, &#x60;sequence&#x60;, &#x60;workflow&#x60;, &#x60;comment_automation&#x60;, or &#x60;bulk-api&#x60; (POST /v1/whatsapp/bulk). Same vocabulary as the &#x60;source&#x60; filter on the inbox analytics endpoints. Always present, and &#x60;null&#x60; whenever the lineage is unknown: every incoming message, any outgoing message sent from the platform&#39;s own app, and every message stored before this field shipped (2026-08). Existing messages are NOT backfilled, so treat &#x60;null&#x60; as \&quot;unknown\&quot;, never as \&quot;sent by a human\&quot;. | [optional] |
34
35
 
35
36
  ## Example
36
37
 
@@ -64,7 +65,8 @@ instance = Zernio::GetInboxConversationMessages200ResponseMessagesInner.new(
64
65
  sent_at: null,
65
66
  delivery_error: null,
66
67
  reactions: null,
67
- metadata: null
68
+ metadata: null,
69
+ sent_via: null
68
70
  )
69
71
  ```
70
72
 
data/docs/MessagesApi.md CHANGED
@@ -100,7 +100,7 @@ end
100
100
 
101
101
  Create conversation
102
102
 
103
- Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
103
+ Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
104
104
 
105
105
  ### Examples
106
106
 
@@ -15,6 +15,8 @@
15
15
  | **follows** | **Integer** | Instagram feed posts and stories only: organic accounts that started following from this post. 0 for reels and other platforms. | [optional] |
16
16
  | **ig_reels_avg_watch_time** | **Integer** | Instagram Reels only: average watch time per play, in milliseconds. 0 for non-Reels media and other platforms. | [optional] |
17
17
  | **ig_reels_video_view_total_time** | **Integer** | Instagram Reels only: total watch time including replays, in milliseconds. 0 for non-Reels media and other platforms. | [optional] |
18
+ | **reels_skip_rate** | **Float** | Instagram Reels only: the rate of initial views that skipped the reel within its first 3 seconds, as reported by Meta. Passed through exactly as Meta reports it, with no rescaling, so do not assume a 0-1 share. Meta labels the metric estimated and in development, so it can move between syncs. 0 for non-Reels media and other platforms. When a post is published to several accounts, the aggregate is weighted by views. | [optional] |
19
+ | **reposts** | **Integer** | Instagram only: reposts of the media by other users, minus deleted reposts. Available on feed posts, reels and stories. 0 for other platforms, including Threads, where reposts are counted in shares instead. | [optional] |
18
20
  | **video_duration_seconds** | **Integer** | Video length in seconds. Currently Instagram Reels only; combine with igReelsAvgWatchTime (ms) to estimate retention. Null when unknown (other platforms, non-video media, or when Instagram does not expose the media URL, e.g. reels with copyrighted audio). | [optional] |
19
21
  | **engagement_rate** | **Float** | Percentage, rounded to 2 decimals: (likes + comments + shares + saves) / (impressions or reach or views) * 100. Clicks and follows are never counted. The denominator is the FIRST of impressions, reach, views that is non-zero, so it is not the same basis on every post: a post with impressions divides by impressions, one without falls back to reach, then to views. If you need a single consistent basis (e.g. interactions / reach), compute it from the raw fields above. The engagementRate on the LinkedIn account endpoints is a different formula. | [optional] |
20
22
  | **last_updated** | **Time** | | [optional] |
@@ -36,6 +38,8 @@ instance = Zernio::PostAnalytics.new(
36
38
  follows: 0,
37
39
  ig_reels_avg_watch_time: 0,
38
40
  ig_reels_video_view_total_time: 0,
41
+ reels_skip_rate: 0,
42
+ reposts: 0,
39
43
  video_duration_seconds: 30,
40
44
  engagement_rate: 6.59,
41
45
  last_updated: null
@@ -11,8 +11,8 @@
11
11
  | **metros** | [**Array&lt;BoostPostRequestTargetingRegionsInner&gt;**](BoostPostRequestTargetingRegionsInner.md) | DMA / metro-area targeting. &#x60;key&#x60; is the platform&#39;s metro ID (e.g. Meta &#x60;DMA:807&#x60;). | [optional] |
12
12
  | **custom_locations** | [**Array&lt;TargetingSpecCustomLocationsInner&gt;**](TargetingSpecCustomLocationsInner.md) | Point-radius (lat/lng) targeting (Meta custom_locations / Google proximity). Honoured only where the capability map allows radius (Meta). | [optional] |
13
13
  | **excluded_locations** | [**TargetingSpecExcludedLocations**](TargetingSpecExcludedLocations.md) | | [optional] |
14
- | **age_min** | **Integer** | | [optional] |
15
- | **age_max** | **Integer** | | [optional] |
14
+ | **age_min** | **Integer** | Minimum age. Applied on Meta, TikTok and Pinterest; ignored on Google, LinkedIn and X. Each platform clamps to its own range: Meta and Pinterest effectively cap at 65 (65 &#x3D; 65+), TikTok maps up to 100. Pinterest has no under-18 bucket, so an ageMin below 18 starts at 18 there. | [optional] |
15
+ | **age_max** | **Integer** | Maximum age. Same per-platform application and clamping as ageMin. | [optional] |
16
16
  | **gender** | **String** | Restrict by gender. &#39;all&#39; (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X. | [optional] |
17
17
  | **income_tier** | **String** | Normalized household-income tier (ZIP/percentile based). Meta and TikTok express all four. Google maps only &#x60;top_10&#x60; (its INCOME_RANGE_90_UP); other tiers on Google, and any income tier on LinkedIn / X / Pinterest, are rejected. On Meta, income/zip targeting requires the relevant &#x60;specialAdCategories&#x60; to be unset (housing/employment/credit ads cannot use it). | [optional] |
18
18
  | **languages** | **Array&lt;String&gt;** | Language codes restricting the audience by language. On Meta, ISO 639-1 codes (e.g. [&#39;en&#39;]); a bare code targets all regional variants (\&quot;en\&quot; &#x3D; all English), or use a region-qualified code (\&quot;en_GB\&quot;, \&quot;pt_BR\&quot;) for a specific one. Unknown codes are rejected. | [optional] |
@@ -14,6 +14,7 @@
14
14
  | **sender** | [**WebhookPayloadMessageMessageSender**](WebhookPayloadMessageMessageSender.md) | | |
15
15
  | **sent_at** | **Time** | When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder&#x3D;desc for the deterministic order. | |
16
16
  | **is_read** | **Boolean** | | |
17
+ | **sent_via** | **String** | Which Zernio surface produced the message. Always present and always &#x60;null&#x60; on this event, since nobody on our side produced an inbound message; it is only informative on &#x60;message.sent&#x60;, which documents the vocabulary. | [optional] |
17
18
 
18
19
  ## Example
19
20
 
@@ -30,7 +31,8 @@ instance = Zernio::WebhookPayloadMessageMessage.new(
30
31
  attachments: null,
31
32
  sender: null,
32
33
  sent_at: null,
33
- is_read: null
34
+ is_read: null,
35
+ sent_via: null
34
36
  )
35
37
  ```
36
38
 
@@ -14,7 +14,8 @@
14
14
  | **sender** | [**WebhookPayloadMessageSentMessageSender**](WebhookPayloadMessageSentMessageSender.md) | | |
15
15
  | **sent_at** | **Time** | When the message was sent, as reported by the platform and passed through unmodified. Full ISO 8601 date-time: Instagram and Facebook carry millisecond precision, while some platforms (for example WhatsApp and Telegram) report whole seconds. Use this field as the chronological ordering key. If two messages share the same value, fetch the conversation messages with sortOrder&#x3D;desc for the deterministic order. | |
16
16
  | **is_read** | **Boolean** | | |
17
- | **source** | **String** | WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts). Absent on non-WhatsApp platforms. This is not the inbox metadata.source lineage field. | [optional] |
17
+ | **source** | **String** | WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts). Absent on non-WhatsApp platforms. Says where WhatsApp saw the send come from, not which Zernio surface produced it: read sentVia for that. | [optional] |
18
+ | **sent_via** | **String** | Which Zernio surface produced this message: &#x60;human&#x60; (an operator in the Zernio inbox), &#x60;api&#x60; (a call to this API), &#x60;broadcast&#x60;, &#x60;sequence&#x60;, &#x60;workflow&#x60;, &#x60;comment_automation&#x60;, or &#x60;bulk-api&#x60; (POST /v1/whatsapp/bulk). Same vocabulary as the &#x60;source&#x60; filter on the inbox analytics endpoints, and the same value a later GET on this message returns. Always present, and &#x60;null&#x60; whenever the lineage is unknown: a message sent from the platform&#39;s own app, and every message stored before this field shipped (2026-08). Existing messages are NOT backfilled, so treat &#x60;null&#x60; as \&quot;unknown\&quot;, never as \&quot;sent by a human\&quot;. | [optional] |
18
19
 
19
20
  ## Example
20
21
 
@@ -32,7 +33,8 @@ instance = Zernio::WebhookPayloadMessageSentMessage.new(
32
33
  sender: null,
33
34
  sent_at: null,
34
35
  is_read: null,
35
- source: null
36
+ source: null,
37
+ sent_via: null
36
38
  )
37
39
  ```
38
40
 
@@ -19,6 +19,80 @@ module Zernio
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Attach extension assets to a Google Search campaign
23
+ # Attach sitelinks, callouts and/or structured snippets to an already-existing Google Search campaign — the same builders POST /v1/ads/create uses, but without rebuilding the hierarchy. At least one of sitelinks, callouts or structuredSnippets is required. Google-only. Other platforms have no equivalent extension surface and return 501. Approval status is Google-async; poll `asset.policy_summary` after review. Assets stay in the account library even if the campaign is later deleted.
24
+ # @param campaign_id [String] Numeric Google platform campaign id.
25
+ # @param attach_campaign_assets_request [AttachCampaignAssetsRequest]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [AttachCampaignAssets201Response]
28
+ def attach_campaign_assets(campaign_id, attach_campaign_assets_request, opts = {})
29
+ data, _status_code, _headers = attach_campaign_assets_with_http_info(campaign_id, attach_campaign_assets_request, opts)
30
+ data
31
+ end
32
+
33
+ # Attach extension assets to a Google Search campaign
34
+ # Attach sitelinks, callouts and/or structured snippets to an already-existing Google Search campaign — the same builders POST /v1/ads/create uses, but without rebuilding the hierarchy. At least one of sitelinks, callouts or structuredSnippets is required. Google-only. Other platforms have no equivalent extension surface and return 501. Approval status is Google-async; poll &#x60;asset.policy_summary&#x60; after review. Assets stay in the account library even if the campaign is later deleted.
35
+ # @param campaign_id [String] Numeric Google platform campaign id.
36
+ # @param attach_campaign_assets_request [AttachCampaignAssetsRequest]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(AttachCampaignAssets201Response, Integer, Hash)>] AttachCampaignAssets201Response data, response status code and response headers
39
+ def attach_campaign_assets_with_http_info(campaign_id, attach_campaign_assets_request, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: AdCampaignsApi.attach_campaign_assets ...'
42
+ end
43
+ # verify the required parameter 'campaign_id' is set
44
+ if @api_client.config.client_side_validation && campaign_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling AdCampaignsApi.attach_campaign_assets"
46
+ end
47
+ # verify the required parameter 'attach_campaign_assets_request' is set
48
+ if @api_client.config.client_side_validation && attach_campaign_assets_request.nil?
49
+ fail ArgumentError, "Missing the required parameter 'attach_campaign_assets_request' when calling AdCampaignsApi.attach_campaign_assets"
50
+ end
51
+ # resource path
52
+ local_var_path = '/v1/ads/campaigns/{campaignId}/assets'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
61
+ # HTTP header 'Content-Type'
62
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(attach_campaign_assets_request)
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'AttachCampaignAssets201Response'
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"AdCampaignsApi.attach_campaign_assets",
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: AdCampaignsApi#attach_campaign_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
22
96
  # Boost post as ad
23
97
  # Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType` and `adSetId` are Meta-only and return 400 on other platforms. **Retries.** Boosts are NOT idempotent and can take minutes when Meta requires re-hosting an Instagram video, so do not retry on client timeout. Send an Idempotency-Key header to make retries safe: same key and body replays the original 201, and distinct keys always create distinct ads. Without the header, an identical request is treated as a retry: while one is in flight it returns 409, and within 10 minutes of a completed boost it returns the already-created ad instead of creating another. To intentionally duplicate an ad, send distinct Idempotency-Keys (or vary the body, e.g. the name).
24
98
  # @param boost_post_request [BoostPostRequest]
@@ -31,7 +31,7 @@ module Zernio
31
31
  # @option opts [Date] :to_date Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
32
32
  # @option opts [Integer] :limit Page size (default 50) (default to 50)
33
33
  # @option opts [Integer] :page Page number (default 1) (default to 1)
34
- # @option opts [String] :sort_by Sort by date, engagement, or a specific metric (default to 'date')
34
+ # @option opts [String] :sort_by Sort by date, engagement, or a specific metric. Instagram-only metrics (follows, reposts, reels_skip_rate, ig_reels_*) sort posts with no value as 0. (default to 'date')
35
35
  # @option opts [String] :order Sort order (default to 'desc')
36
36
  # @return [GetAnalytics200Response]
37
37
  def get_analytics(opts = {})
@@ -51,7 +51,7 @@ module Zernio
51
51
  # @option opts [Date] :to_date Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
52
52
  # @option opts [Integer] :limit Page size (default 50) (default to 50)
53
53
  # @option opts [Integer] :page Page number (default 1) (default to 1)
54
- # @option opts [String] :sort_by Sort by date, engagement, or a specific metric (default to 'date')
54
+ # @option opts [String] :sort_by Sort by date, engagement, or a specific metric. Instagram-only metrics (follows, reposts, reels_skip_rate, ig_reels_*) sort posts with no value as 0. (default to 'date')
55
55
  # @option opts [String] :order Sort order (default to 'desc')
56
56
  # @return [Array<(GetAnalytics200Response, Integer, Hash)>] GetAnalytics200Response data, response status code and response headers
57
57
  def get_analytics_with_http_info(opts = {})
@@ -74,7 +74,7 @@ module Zernio
74
74
  fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.get_analytics, must be greater than or equal to 1.'
75
75
  end
76
76
 
77
- allowable_values = ["date", "engagement", "impressions", "reach", "likes", "comments", "shares", "saves", "clicks", "views", "follows"]
77
+ allowable_values = ["date", "engagement", "impressions", "reach", "likes", "comments", "shares", "saves", "clicks", "views", "follows", "ig_reels_avg_watch_time", "ig_reels_video_view_total_time", "reposts", "reels_skip_rate"]
78
78
  if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
79
79
  fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
80
80
  end
@@ -100,7 +100,7 @@ module Zernio
100
100
  end
101
101
 
102
102
  # Create conversation
103
- # Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
103
+ # Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
104
104
  # @param create_inbox_conversation_request [CreateInboxConversationRequest]
105
105
  # @param [Hash] opts the optional parameters
106
106
  # @return [CreateInboxConversation201Response]
@@ -110,7 +110,7 @@ module Zernio
110
110
  end
111
111
 
112
112
  # Create conversation
113
- # Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template&#39;s approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: &#39;utility&#39; together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X&#39;s DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta&#39;s per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
113
+ # Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template&#39;s approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button&#39;s index; templateParams covers text variables and dynamic URL buttons only. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: &#39;utility&#39; together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X&#39;s DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta&#39;s per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
114
114
  # @param create_inbox_conversation_request [CreateInboxConversationRequest]
115
115
  # @param [Hash] opts the optional parameters
116
116
  # @return [Array<(CreateInboxConversation201Response, Integer, Hash)>] CreateInboxConversation201Response data, response status code and response headers