late-sdk 0.0.722 → 0.0.724
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/docs/AdCreativesApi.md +80 -0
- data/docs/CreateInboxConversation404Response.md +20 -0
- data/docs/CreateInboxConversation429Response.md +20 -0
- data/docs/ListAdVideos200Response.md +22 -0
- data/docs/UploadedOrDerivedAudience.md +3 -1
- data/lib/zernio-sdk/api/ad_creatives_api.rb +88 -0
- data/lib/zernio-sdk/models/create_inbox_conversation404_response.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation429_response.rb +190 -0
- data/lib/zernio-sdk/models/create_standalone_ad_request_video.rb +1 -1
- data/lib/zernio-sdk/models/list_ad_videos200_response.rb +167 -0
- data/lib/zernio-sdk/models/uploaded_or_derived_audience.rb +12 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +95 -5
- data/spec/api/ad_creatives_api_spec.rb +16 -0
- data/spec/models/create_inbox_conversation404_response_spec.rb +46 -0
- data/spec/models/create_inbox_conversation429_response_spec.rb +46 -0
- data/spec/models/list_ad_videos200_response_spec.rb +48 -0
- data/spec/models/uploaded_or_derived_audience_spec.rb +6 -0
- data/zernio-sdk-0.0.724.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.722.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8fe0affec7337a54f5a5626b8088c3a1055623f6fe609b396ef60e85d79ae7d5
|
|
4
|
+
data.tar.gz: 424bfdbebe8746e244c9db88f82109fd8169f9cbc4273a29e91c210b3de380cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7f44b04c676081d1b6f89235840b1569878b9917248ef15e6abc338144ee86b2d9d573aedff1ba107d005944181ca62d40a8a5c298c3cc213b5437f7a32dfaa
|
|
7
|
+
data.tar.gz: 965f7286746280990b7f59721a344db6600caf191ce78f95f456ac2fd33e24dca192f0f574ea7ce00eff3fb51f9e0472d9560142915717e5597cece7f80c69d4
|
data/README.md
CHANGED
|
@@ -153,6 +153,7 @@ Class | Method | HTTP request | Description
|
|
|
153
153
|
*Zernio::AdCreativesApi* | [**list_ad_catalogs**](docs/AdCreativesApi.md#list_ad_catalogs) | **GET** /v1/ads/catalogs | List Meta product catalogs
|
|
154
154
|
*Zernio::AdCreativesApi* | [**list_ad_creatives**](docs/AdCreativesApi.md#list_ad_creatives) | **GET** /v1/ads/creatives | Creative library
|
|
155
155
|
*Zernio::AdCreativesApi* | [**list_ad_images**](docs/AdCreativesApi.md#list_ad_images) | **GET** /v1/ads/images | Ad image library
|
|
156
|
+
*Zernio::AdCreativesApi* | [**list_ad_videos**](docs/AdCreativesApi.md#list_ad_videos) | **GET** /v1/ads/videos | Ad video library
|
|
156
157
|
*Zernio::AdCreativesApi* | [**update_ad_creative**](docs/AdCreativesApi.md#update_ad_creative) | **PUT** /v1/ads/creatives/{creativeId} | Rename a creative
|
|
157
158
|
*Zernio::AdCreativesApi* | [**upload_ad_image**](docs/AdCreativesApi.md#upload_ad_image) | **POST** /v1/ads/images | Upload an ad image from base64
|
|
158
159
|
*Zernio::AdInsightsApi* | [**create_ad_insights_report**](docs/AdInsightsApi.md#create_ad_insights_report) | **POST** /v1/ads/insights/reports | Submit an async insights report run
|
|
@@ -869,7 +870,9 @@ Class | Method | HTTP request | Description
|
|
|
869
870
|
- [Zernio::CreateInboxConversation201Response](docs/CreateInboxConversation201Response.md)
|
|
870
871
|
- [Zernio::CreateInboxConversation201ResponseData](docs/CreateInboxConversation201ResponseData.md)
|
|
871
872
|
- [Zernio::CreateInboxConversation400Response](docs/CreateInboxConversation400Response.md)
|
|
873
|
+
- [Zernio::CreateInboxConversation404Response](docs/CreateInboxConversation404Response.md)
|
|
872
874
|
- [Zernio::CreateInboxConversation422Response](docs/CreateInboxConversation422Response.md)
|
|
875
|
+
- [Zernio::CreateInboxConversation429Response](docs/CreateInboxConversation429Response.md)
|
|
873
876
|
- [Zernio::CreateInboxConversationRequest](docs/CreateInboxConversationRequest.md)
|
|
874
877
|
- [Zernio::CreateInboxConversationRequestHeaderMedia](docs/CreateInboxConversationRequestHeaderMedia.md)
|
|
875
878
|
- [Zernio::CreateInviteToken201Response](docs/CreateInviteToken201Response.md)
|
|
@@ -1499,6 +1502,7 @@ Class | Method | HTTP request | Description
|
|
|
1499
1502
|
- [Zernio::ListAdKeywords200ResponseKeywordsInner](docs/ListAdKeywords200ResponseKeywordsInner.md)
|
|
1500
1503
|
- [Zernio::ListAdLabels200Response](docs/ListAdLabels200Response.md)
|
|
1501
1504
|
- [Zernio::ListAdStudies200Response](docs/ListAdStudies200Response.md)
|
|
1505
|
+
- [Zernio::ListAdVideos200Response](docs/ListAdVideos200Response.md)
|
|
1502
1506
|
- [Zernio::ListAds202Response](docs/ListAds202Response.md)
|
|
1503
1507
|
- [Zernio::ListAdsBusinessCenters200Response](docs/ListAdsBusinessCenters200Response.md)
|
|
1504
1508
|
- [Zernio::ListApiKeys200Response](docs/ListApiKeys200Response.md)
|
data/docs/AdCreativesApi.md
CHANGED
|
@@ -13,6 +13,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
13
13
|
| [**list_ad_catalogs**](AdCreativesApi.md#list_ad_catalogs) | **GET** /v1/ads/catalogs | List Meta product catalogs |
|
|
14
14
|
| [**list_ad_creatives**](AdCreativesApi.md#list_ad_creatives) | **GET** /v1/ads/creatives | Creative library |
|
|
15
15
|
| [**list_ad_images**](AdCreativesApi.md#list_ad_images) | **GET** /v1/ads/images | Ad image library |
|
|
16
|
+
| [**list_ad_videos**](AdCreativesApi.md#list_ad_videos) | **GET** /v1/ads/videos | Ad video library |
|
|
16
17
|
| [**update_ad_creative**](AdCreativesApi.md#update_ad_creative) | **PUT** /v1/ads/creatives/{creativeId} | Rename a creative |
|
|
17
18
|
| [**upload_ad_image**](AdCreativesApi.md#upload_ad_image) | **POST** /v1/ads/images | Upload an ad image from base64 |
|
|
18
19
|
|
|
@@ -674,6 +675,85 @@ end
|
|
|
674
675
|
- **Accept**: application/json
|
|
675
676
|
|
|
676
677
|
|
|
678
|
+
## list_ad_videos
|
|
679
|
+
|
|
680
|
+
> <ListAdVideos200Response> list_ad_videos(account_id, ad_account_id, opts)
|
|
681
|
+
|
|
682
|
+
Ad video library
|
|
683
|
+
|
|
684
|
+
Lists the ad account's video library (Meta's `/act_X/advideos`), rows returned verbatim. The default projection covers id, title, status, poster frames and length; `fields` is a raw-passthrough override. Any `id` here is reusable as `video.id` on the create endpoints, so N ads that differ only in copy share one upload. This is the only way to reach a video uploaded OUTSIDE Zernio (Ads Manager, another tool); videos we uploaded also come back as `creative.videoId` on GET /v1/ads. Meta transcodes asynchronously, so a row is only usable once `status.video_status` reads `ready`. There is no upload operation here: upload by URL inline via `video.url` on POST /v1/ads/create.
|
|
685
|
+
|
|
686
|
+
### Examples
|
|
687
|
+
|
|
688
|
+
```ruby
|
|
689
|
+
require 'time'
|
|
690
|
+
require 'zernio-sdk'
|
|
691
|
+
# setup authorization
|
|
692
|
+
Zernio.configure do |config|
|
|
693
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
694
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
api_instance = Zernio::AdCreativesApi.new
|
|
698
|
+
account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
699
|
+
ad_account_id = 'ad_account_id_example' # String | Meta ad account id (act_<n>).
|
|
700
|
+
opts = {
|
|
701
|
+
fields: 'fields_example', # String | Comma-separated Graph field override (supports nested {} projections).
|
|
702
|
+
limit: 56, # Integer | Rows per page
|
|
703
|
+
after: 'after_example' # String | Cursor from paging.after of the previous page.
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
begin
|
|
707
|
+
# Ad video library
|
|
708
|
+
result = api_instance.list_ad_videos(account_id, ad_account_id, opts)
|
|
709
|
+
p result
|
|
710
|
+
rescue Zernio::ApiError => e
|
|
711
|
+
puts "Error when calling AdCreativesApi->list_ad_videos: #{e}"
|
|
712
|
+
end
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
#### Using the list_ad_videos_with_http_info variant
|
|
716
|
+
|
|
717
|
+
This returns an Array which contains the response data, status code and headers.
|
|
718
|
+
|
|
719
|
+
> <Array(<ListAdVideos200Response>, Integer, Hash)> list_ad_videos_with_http_info(account_id, ad_account_id, opts)
|
|
720
|
+
|
|
721
|
+
```ruby
|
|
722
|
+
begin
|
|
723
|
+
# Ad video library
|
|
724
|
+
data, status_code, headers = api_instance.list_ad_videos_with_http_info(account_id, ad_account_id, opts)
|
|
725
|
+
p status_code # => 2xx
|
|
726
|
+
p headers # => { ... }
|
|
727
|
+
p data # => <ListAdVideos200Response>
|
|
728
|
+
rescue Zernio::ApiError => e
|
|
729
|
+
puts "Error when calling AdCreativesApi->list_ad_videos_with_http_info: #{e}"
|
|
730
|
+
end
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
### Parameters
|
|
734
|
+
|
|
735
|
+
| Name | Type | Description | Notes |
|
|
736
|
+
| ---- | ---- | ----------- | ----- |
|
|
737
|
+
| **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
|
|
738
|
+
| **ad_account_id** | **String** | Meta ad account id (act_<n>). | |
|
|
739
|
+
| **fields** | **String** | Comma-separated Graph field override (supports nested {} projections). | [optional] |
|
|
740
|
+
| **limit** | **Integer** | Rows per page | [optional][default to 25] |
|
|
741
|
+
| **after** | **String** | Cursor from paging.after of the previous page. | [optional] |
|
|
742
|
+
|
|
743
|
+
### Return type
|
|
744
|
+
|
|
745
|
+
[**ListAdVideos200Response**](ListAdVideos200Response.md)
|
|
746
|
+
|
|
747
|
+
### Authorization
|
|
748
|
+
|
|
749
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
750
|
+
|
|
751
|
+
### HTTP request headers
|
|
752
|
+
|
|
753
|
+
- **Content-Type**: Not defined
|
|
754
|
+
- **Accept**: application/json
|
|
755
|
+
|
|
756
|
+
|
|
677
757
|
## update_ad_creative
|
|
678
758
|
|
|
679
759
|
> <UpdateAdCreative200Response> update_ad_creative(creative_id, update_ad_creative_request)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::CreateInboxConversation404Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error** | **String** | | [optional] |
|
|
8
|
+
| **code** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::CreateInboxConversation404Response.new(
|
|
16
|
+
error: null,
|
|
17
|
+
code: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::CreateInboxConversation429Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error** | **String** | | [optional] |
|
|
8
|
+
| **code** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::CreateInboxConversation429Response.new(
|
|
16
|
+
error: null,
|
|
17
|
+
code: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::ListAdVideos200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **data** | **Array<Object>** | | [optional] |
|
|
9
|
+
| **paging** | [**GetAdsActivityLog200ResponsePaging**](GetAdsActivityLog200ResponsePaging.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::ListAdVideos200Response.new(
|
|
17
|
+
ad_account_id: null,
|
|
18
|
+
data: null,
|
|
19
|
+
paging: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
| **source_audience_id** | **String** | Required for lookalike audiences | [optional] |
|
|
24
24
|
| **country** | **String** | 2-letter code, required for lookalike audiences | [optional] |
|
|
25
25
|
| **ratio** | **Float** | Required for lookalike audiences | [optional] |
|
|
26
|
-
| **
|
|
26
|
+
| **url_contains** | **String** | website only. Narrows the audience from all visitors to visitors of URLs containing this substring. Ignored when `rule` is supplied. | [optional] |
|
|
27
|
+
| **rule** | **Object** | Optional raw Meta rule, replacing the one we build. Omit it for all visitors of `pixelId`, or use `urlContains` for the common page-match case. For `website` this is Meta's Flexible Audience Rule and is VALIDATED before we call Meta: every entry in `inclusions.rules` (and `exclusions.rules`) must carry `event_sources`, `retention_seconds` AND `filter`. Meta rejects a rule missing any of the three with code 100 / subcode 1713098 (\"Invalid rule JSON format\"), so a bad shape is a 400 here instead. The pre-2018 flat shapes (`{url: ...}`, `{event: ...}`) are not accepted by Meta at all (subcode 1870029). Example, visitors of /checkout in the last 30 days: `{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"<pixelId>\",\"type\":\"pixel\"}],\"retention_seconds\":2592000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"url\",\"operator\":\"i_contains\",\"value\":\"/checkout\"}]}}]}}` Note Meta DERIVES `retention_days` from `retention_seconds` and stores `event_sources[].id` as a number, so a rule read back will not be byte-identical to the one you sent. For `meta_engagement` the rule is forwarded verbatim and NOT validated: that type has two dialects (the `video` source uses a legacy flat array), so no single schema covers both. | [optional] |
|
|
27
28
|
| **customer_file_source** | **String** | Data source declaration for GDPR compliance (customer_list only) | [optional] |
|
|
28
29
|
|
|
29
30
|
## Example
|
|
@@ -51,6 +52,7 @@ instance = Zernio::UploadedOrDerivedAudience.new(
|
|
|
51
52
|
source_audience_id: null,
|
|
52
53
|
country: null,
|
|
53
54
|
ratio: null,
|
|
55
|
+
url_contains: null,
|
|
54
56
|
rule: null,
|
|
55
57
|
customer_file_source: null
|
|
56
58
|
)
|
|
@@ -681,6 +681,94 @@ module Zernio
|
|
|
681
681
|
return data, status_code, headers
|
|
682
682
|
end
|
|
683
683
|
|
|
684
|
+
# Ad video library
|
|
685
|
+
# Lists the ad account's video library (Meta's `/act_X/advideos`), rows returned verbatim. The default projection covers id, title, status, poster frames and length; `fields` is a raw-passthrough override. Any `id` here is reusable as `video.id` on the create endpoints, so N ads that differ only in copy share one upload. This is the only way to reach a video uploaded OUTSIDE Zernio (Ads Manager, another tool); videos we uploaded also come back as `creative.videoId` on GET /v1/ads. Meta transcodes asynchronously, so a row is only usable once `status.video_status` reads `ready`. There is no upload operation here: upload by URL inline via `video.url` on POST /v1/ads/create.
|
|
686
|
+
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
687
|
+
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
688
|
+
# @param [Hash] opts the optional parameters
|
|
689
|
+
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
690
|
+
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
691
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
692
|
+
# @return [ListAdVideos200Response]
|
|
693
|
+
def list_ad_videos(account_id, ad_account_id, opts = {})
|
|
694
|
+
data, _status_code, _headers = list_ad_videos_with_http_info(account_id, ad_account_id, opts)
|
|
695
|
+
data
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
# Ad video library
|
|
699
|
+
# Lists the ad account's video library (Meta's `/act_X/advideos`), rows returned verbatim. The default projection covers id, title, status, poster frames and length; `fields` is a raw-passthrough override. Any `id` here is reusable as `video.id` on the create endpoints, so N ads that differ only in copy share one upload. This is the only way to reach a video uploaded OUTSIDE Zernio (Ads Manager, another tool); videos we uploaded also come back as `creative.videoId` on GET /v1/ads. Meta transcodes asynchronously, so a row is only usable once `status.video_status` reads `ready`. There is no upload operation here: upload by URL inline via `video.url` on POST /v1/ads/create.
|
|
700
|
+
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
701
|
+
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
702
|
+
# @param [Hash] opts the optional parameters
|
|
703
|
+
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
704
|
+
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
705
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
706
|
+
# @return [Array<(ListAdVideos200Response, Integer, Hash)>] ListAdVideos200Response data, response status code and response headers
|
|
707
|
+
def list_ad_videos_with_http_info(account_id, ad_account_id, opts = {})
|
|
708
|
+
if @api_client.config.debugging
|
|
709
|
+
@api_client.config.logger.debug 'Calling API: AdCreativesApi.list_ad_videos ...'
|
|
710
|
+
end
|
|
711
|
+
# verify the required parameter 'account_id' is set
|
|
712
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
713
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdCreativesApi.list_ad_videos"
|
|
714
|
+
end
|
|
715
|
+
# verify the required parameter 'ad_account_id' is set
|
|
716
|
+
if @api_client.config.client_side_validation && ad_account_id.nil?
|
|
717
|
+
fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AdCreativesApi.list_ad_videos"
|
|
718
|
+
end
|
|
719
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
720
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdCreativesApi.list_ad_videos, must be smaller than or equal to 100.'
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
724
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdCreativesApi.list_ad_videos, must be greater than or equal to 1.'
|
|
725
|
+
end
|
|
726
|
+
|
|
727
|
+
# resource path
|
|
728
|
+
local_var_path = '/v1/ads/videos'
|
|
729
|
+
|
|
730
|
+
# query parameters
|
|
731
|
+
query_params = opts[:query_params] || {}
|
|
732
|
+
query_params[:'accountId'] = account_id
|
|
733
|
+
query_params[:'adAccountId'] = ad_account_id
|
|
734
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
735
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
736
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
737
|
+
|
|
738
|
+
# header parameters
|
|
739
|
+
header_params = opts[:header_params] || {}
|
|
740
|
+
# HTTP header 'Accept' (if needed)
|
|
741
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
742
|
+
|
|
743
|
+
# form parameters
|
|
744
|
+
form_params = opts[:form_params] || {}
|
|
745
|
+
|
|
746
|
+
# http body (model)
|
|
747
|
+
post_body = opts[:debug_body]
|
|
748
|
+
|
|
749
|
+
# return_type
|
|
750
|
+
return_type = opts[:debug_return_type] || 'ListAdVideos200Response'
|
|
751
|
+
|
|
752
|
+
# auth_names
|
|
753
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
754
|
+
|
|
755
|
+
new_options = opts.merge(
|
|
756
|
+
:operation => :"AdCreativesApi.list_ad_videos",
|
|
757
|
+
:header_params => header_params,
|
|
758
|
+
:query_params => query_params,
|
|
759
|
+
:form_params => form_params,
|
|
760
|
+
:body => post_body,
|
|
761
|
+
:auth_names => auth_names,
|
|
762
|
+
:return_type => return_type
|
|
763
|
+
)
|
|
764
|
+
|
|
765
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
766
|
+
if @api_client.config.debugging
|
|
767
|
+
@api_client.config.logger.debug "API called: AdCreativesApi#list_ad_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
768
|
+
end
|
|
769
|
+
return data, status_code, headers
|
|
770
|
+
end
|
|
771
|
+
|
|
684
772
|
# Rename a creative
|
|
685
773
|
# Renames a creative. Creatives are immutable on Meta beyond `name` — for content changes create a new creative (POST /v1/ads/creatives) and swap it onto the ad (PUT /v1/ads/{adId} with `creative`).
|
|
686
774
|
# @param creative_id [String] Platform creative id
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class CreateInboxConversation404Response < ApiModelBase
|
|
18
|
+
attr_accessor :error
|
|
19
|
+
|
|
20
|
+
attr_accessor :code
|
|
21
|
+
|
|
22
|
+
class EnumAttributeValidator
|
|
23
|
+
attr_reader :datatype
|
|
24
|
+
attr_reader :allowable_values
|
|
25
|
+
|
|
26
|
+
def initialize(datatype, allowable_values)
|
|
27
|
+
@allowable_values = allowable_values.map do |value|
|
|
28
|
+
case datatype.to_s
|
|
29
|
+
when /Integer/i
|
|
30
|
+
value.to_i
|
|
31
|
+
when /Float/i
|
|
32
|
+
value.to_f
|
|
33
|
+
else
|
|
34
|
+
value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def valid?(value)
|
|
40
|
+
!value || allowable_values.include?(value)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
|
+
def self.attribute_map
|
|
46
|
+
{
|
|
47
|
+
:'error' => :'error',
|
|
48
|
+
:'code' => :'code'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute mapping this model knows about
|
|
53
|
+
def self.acceptable_attribute_map
|
|
54
|
+
attribute_map
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns all the JSON keys this model knows about
|
|
58
|
+
def self.acceptable_attributes
|
|
59
|
+
acceptable_attribute_map.values
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute type mapping.
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'error' => :'String',
|
|
66
|
+
:'code' => :'String'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateInboxConversation404Response` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
86
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateInboxConversation404Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
88
|
+
end
|
|
89
|
+
h[k.to_sym] = v
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'error')
|
|
93
|
+
self.error = attributes[:'error']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'code')
|
|
97
|
+
self.code = attributes[:'code']
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
code_validator = EnumAttributeValidator.new('String', ["account_not_found", "PARTICIPANT_NOT_FOUND"])
|
|
114
|
+
return false unless code_validator.valid?(@code)
|
|
115
|
+
true
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
119
|
+
# @param [Object] code Object to be assigned
|
|
120
|
+
def code=(code)
|
|
121
|
+
validator = EnumAttributeValidator.new('String', ["account_not_found", "PARTICIPANT_NOT_FOUND"])
|
|
122
|
+
unless validator.valid?(code)
|
|
123
|
+
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
124
|
+
end
|
|
125
|
+
@code = code
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
error == o.error &&
|
|
134
|
+
code == o.code
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[error, code].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
new(transformed_hash)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|