late-sdk 0.0.738 → 0.0.740

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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -0
  3. data/docs/AdCreativesApi.md +145 -1
  4. data/docs/AdTreeAdSet.md +2 -0
  5. data/docs/AdTreeCampaign.md +2 -0
  6. data/docs/CommentsApi.md +2 -2
  7. data/docs/CreateCallAdRequest.md +1 -1
  8. data/docs/CreateMessagingAdRequest.md +1 -1
  9. data/docs/CtwaAdRequestBody.md +1 -1
  10. data/docs/DeleteAdVideo200Response.md +22 -0
  11. data/docs/UploadAdVideo201Response.md +20 -0
  12. data/docs/UploadAdVideo201ResponseVideo.md +20 -0
  13. data/docs/UploadAdVideoRequest.md +26 -0
  14. data/lib/zernio-sdk/api/ad_creatives_api.rb +147 -2
  15. data/lib/zernio-sdk/api/comments_api.rb +4 -4
  16. data/lib/zernio-sdk/models/ad_tree_ad_set.rb +12 -1
  17. data/lib/zernio-sdk/models/ad_tree_campaign.rb +12 -1
  18. data/lib/zernio-sdk/models/create_call_ad_request.rb +1 -1
  19. data/lib/zernio-sdk/models/create_messaging_ad_request.rb +1 -1
  20. data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +1 -1
  21. data/lib/zernio-sdk/models/delete_ad_video200_response.rb +165 -0
  22. data/lib/zernio-sdk/models/upload_ad_video201_response.rb +156 -0
  23. data/lib/zernio-sdk/models/upload_ad_video201_response_video.rb +159 -0
  24. data/lib/zernio-sdk/models/upload_ad_video_request.rb +222 -0
  25. data/lib/zernio-sdk/version.rb +1 -1
  26. data/lib/zernio-sdk.rb +4 -0
  27. data/openapi.yaml +112 -4
  28. data/spec/api/ad_creatives_api_spec.rb +27 -1
  29. data/spec/api/comments_api_spec.rb +2 -2
  30. data/spec/models/ad_tree_ad_set_spec.rb +6 -0
  31. data/spec/models/ad_tree_campaign_spec.rb +6 -0
  32. data/spec/models/delete_ad_video200_response_spec.rb +48 -0
  33. data/spec/models/upload_ad_video201_response_spec.rb +42 -0
  34. data/spec/models/upload_ad_video201_response_video_spec.rb +42 -0
  35. data/spec/models/upload_ad_video_request_spec.rb +60 -0
  36. data/zernio-sdk-0.0.740.gem +0 -0
  37. metadata +18 -2
  38. data/zernio-sdk-0.0.738.gem +0 -0
@@ -177,7 +177,7 @@ module Zernio
177
177
  end
178
178
 
179
179
  # Get post comments
180
- # Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id.
180
+ # Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id. Responses are cached for up to 10 minutes, so a page may lag new comments by that window. Do not poll this endpoint for real-time updates: subscribe to the `comment.received` webhook, which delivers new comments as they arrive. Your own writes (creating, replying to, or deleting a comment) refresh the cache immediately.
181
181
  # @param post_id [String] Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID. On Facebook and Instagram, a comment ID is also accepted here and returns that comment's replies.
182
182
  # @param account_id [String]
183
183
  # @param [Hash] opts the optional parameters
@@ -192,7 +192,7 @@ module Zernio
192
192
  end
193
193
 
194
194
  # Get post comments
195
- # Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id.
195
+ # Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id. Responses are cached for up to 10 minutes, so a page may lag new comments by that window. Do not poll this endpoint for real-time updates: subscribe to the `comment.received` webhook, which delivers new comments as they arrive. Your own writes (creating, replying to, or deleting a comment) refresh the cache immediately.
196
196
  # @param post_id [String] Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID. On Facebook and Instagram, a comment ID is also accepted here and returns that comment's replies.
197
197
  # @param account_id [String]
198
198
  # @param [Hash] opts the optional parameters
@@ -501,7 +501,7 @@ module Zernio
501
501
  end
502
502
 
503
503
  # List commented posts
504
- # Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted. Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook, Instagram, Threads, LinkedIn and YouTube, since they are the platforms that support a server-side date window; on the others the listing stops at its first page. Cursor pagination is only coherent for the default sort (`sortBy=date`, `sortOrder=desc`): with `sortOrder=asc`, or with `sortBy=comments`, the cursor filter does not match the sort order and the second page is unreliable. `nextCursor` is opaque: pass it back verbatim, never construct or parse it, its composition may change without notice. Because each page re-queries a live window, results can still shift between requests, so dedupe by `id` on the client. `commentCount` semantics differ by platform: YouTube's includes replies, Facebook's counts top-level comments only.
504
+ # Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. Responses are cached for up to 10 minutes, so the feed may lag new comments by that window. Do not poll this endpoint for real-time updates: subscribe to the `comment.received` webhook, which fires for every new comment across your posts and carries the post reference needed to keep this list current. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted. Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook, Instagram, Threads, LinkedIn and YouTube, since they are the platforms that support a server-side date window; on the others the listing stops at its first page. Cursor pagination is only coherent for the default sort (`sortBy=date`, `sortOrder=desc`): with `sortOrder=asc`, or with `sortBy=comments`, the cursor filter does not match the sort order and the second page is unreliable. `nextCursor` is opaque: pass it back verbatim, never construct or parse it, its composition may change without notice. Because each page re-queries a live window, results can still shift between requests, so dedupe by `id` on the client. `commentCount` semantics differ by platform: YouTube's includes replies, Facebook's counts top-level comments only.
505
505
  # @param [Hash] opts the optional parameters
506
506
  # @option opts [String] :profile_id Filter by profile ID
507
507
  # @option opts [String] :platform Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only.
@@ -519,7 +519,7 @@ module Zernio
519
519
  end
520
520
 
521
521
  # List commented posts
522
- # Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted. Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook, Instagram, Threads, LinkedIn and YouTube, since they are the platforms that support a server-side date window; on the others the listing stops at its first page. Cursor pagination is only coherent for the default sort (`sortBy=date`, `sortOrder=desc`): with `sortOrder=asc`, or with `sortBy=comments`, the cursor filter does not match the sort order and the second page is unreliable. `nextCursor` is opaque: pass it back verbatim, never construct or parse it, its composition may change without notice. Because each page re-queries a live window, results can still shift between requests, so dedupe by `id` on the client. `commentCount` semantics differ by platform: YouTube's includes replies, Facebook's counts top-level comments only.
522
+ # Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. Responses are cached for up to 10 minutes, so the feed may lag new comments by that window. Do not poll this endpoint for real-time updates: subscribe to the `comment.received` webhook, which fires for every new comment across your posts and carries the post reference needed to keep this list current. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted. Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook, Instagram, Threads, LinkedIn and YouTube, since they are the platforms that support a server-side date window; on the others the listing stops at its first page. Cursor pagination is only coherent for the default sort (`sortBy=date`, `sortOrder=desc`): with `sortOrder=asc`, or with `sortBy=comments`, the cursor filter does not match the sort order and the second page is unreliable. `nextCursor` is opaque: pass it back verbatim, never construct or parse it, its composition may change without notice. Because each page re-queries a live window, results can still shift between requests, so dedupe by `id` on the client. `commentCount` semantics differ by platform: YouTube's includes replies, Facebook's counts top-level comments only.
523
523
  # @param [Hash] opts the optional parameters
524
524
  # @option opts [String] :profile_id Filter by profile ID
525
525
  # @option opts [String] :platform Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only.
@@ -23,6 +23,9 @@ module Zernio
23
23
  # Derived from child ad statuses
24
24
  attr_accessor :status
25
25
 
26
+ # Earliest `platformCreatedAt` (platform ad creation time; falls back to `createdAt`, Zernio's sync time, for ads synced before that field existed) across this ad set's ads. Not the ad set's own creation time on the platform — a proxy usable for sorting.
27
+ attr_accessor :created_time
28
+
26
29
  attr_accessor :ad_count
27
30
 
28
31
  attr_accessor :budget
@@ -84,6 +87,7 @@ module Zernio
84
87
  :'platform_ad_set_id' => :'platformAdSetId',
85
88
  :'ad_set_name' => :'adSetName',
86
89
  :'status' => :'status',
90
+ :'created_time' => :'createdTime',
87
91
  :'ad_count' => :'adCount',
88
92
  :'budget' => :'budget',
89
93
  :'ad_set_budget' => :'adSetBudget',
@@ -116,6 +120,7 @@ module Zernio
116
120
  :'platform_ad_set_id' => :'String',
117
121
  :'ad_set_name' => :'String',
118
122
  :'status' => :'AdStatus',
123
+ :'created_time' => :'Time',
119
124
  :'ad_count' => :'Integer',
120
125
  :'budget' => :'AdTreeAdSetBudget',
121
126
  :'ad_set_budget' => :'AdTreeAdSetAdSetBudget',
@@ -135,6 +140,7 @@ module Zernio
135
140
  # List of attributes with nullable: true
136
141
  def self.openapi_nullable
137
142
  Set.new([
143
+ :'created_time',
138
144
  :'optimization_goal',
139
145
  :'bid_strategy',
140
146
  :'bid_amount',
@@ -171,6 +177,10 @@ module Zernio
171
177
  self.status = attributes[:'status']
172
178
  end
173
179
 
180
+ if attributes.key?(:'created_time')
181
+ self.created_time = attributes[:'created_time']
182
+ end
183
+
174
184
  if attributes.key?(:'ad_count')
175
185
  self.ad_count = attributes[:'ad_count']
176
186
  end
@@ -253,6 +263,7 @@ module Zernio
253
263
  platform_ad_set_id == o.platform_ad_set_id &&
254
264
  ad_set_name == o.ad_set_name &&
255
265
  status == o.status &&
266
+ created_time == o.created_time &&
256
267
  ad_count == o.ad_count &&
257
268
  budget == o.budget &&
258
269
  ad_set_budget == o.ad_set_budget &&
@@ -277,7 +288,7 @@ module Zernio
277
288
  # Calculates hash code according to all attributes.
278
289
  # @return [Integer] Hash code
279
290
  def hash
280
- [platform_ad_set_id, ad_set_name, status, ad_count, budget, ad_set_budget, metrics, optimization_goal, bid_strategy, bid_amount, roas_average_floor, cost_type, serving_statuses, promoted_object, ads, daily].hash
291
+ [platform_ad_set_id, ad_set_name, status, created_time, ad_count, budget, ad_set_budget, metrics, optimization_goal, bid_strategy, bid_amount, roas_average_floor, cost_type, serving_statuses, promoted_object, ads, daily].hash
281
292
  end
282
293
 
283
294
  # Builds the object from hash
@@ -22,6 +22,9 @@ module Zernio
22
22
 
23
23
  attr_accessor :campaign_name
24
24
 
25
+ # Earliest `platformCreatedAt` (platform ad creation time; falls back to `createdAt`, Zernio's sync time, for ads synced before that field existed) across every ad in the campaign. Not the platform campaign's own creation time (Meta's `Campaign.created_time` etc. is not synced) — a campaign created empty and populated later will show its first ad's time, not the campaign's. Usable for sorting \"most recently created\" without the numeric-campaign-id heuristic. Same source as `AdTreeAdSet.createdTime` and `Ad.platformCreatedAt`; mirrors `AdCampaign.earliestAd`.
26
+ attr_accessor :created_time
27
+
25
28
  # Delivery status derived from child ad statuses. Distinct from `reviewStatus`, which reflects the platform-side review state.
26
29
  attr_accessor :status
27
30
 
@@ -113,6 +116,7 @@ module Zernio
113
116
  :'platform_campaign_id' => :'platformCampaignId',
114
117
  :'platform' => :'platform',
115
118
  :'campaign_name' => :'campaignName',
119
+ :'created_time' => :'createdTime',
116
120
  :'status' => :'status',
117
121
  :'review_status' => :'reviewStatus',
118
122
  :'platform_campaign_status' => :'platformCampaignStatus',
@@ -157,6 +161,7 @@ module Zernio
157
161
  :'platform_campaign_id' => :'String',
158
162
  :'platform' => :'String',
159
163
  :'campaign_name' => :'String',
164
+ :'created_time' => :'Time',
160
165
  :'status' => :'AdStatus',
161
166
  :'review_status' => :'AdReviewStatus',
162
167
  :'platform_campaign_status' => :'String',
@@ -188,6 +193,7 @@ module Zernio
188
193
  # List of attributes with nullable: true
189
194
  def self.openapi_nullable
190
195
  Set.new([
196
+ :'created_time',
191
197
  :'review_status',
192
198
  :'platform_campaign_status',
193
199
  :'campaign_issues_info',
@@ -230,6 +236,10 @@ module Zernio
230
236
  self.campaign_name = attributes[:'campaign_name']
231
237
  end
232
238
 
239
+ if attributes.key?(:'created_time')
240
+ self.created_time = attributes[:'created_time']
241
+ end
242
+
233
243
  if attributes.key?(:'status')
234
244
  self.status = attributes[:'status']
235
245
  end
@@ -386,6 +396,7 @@ module Zernio
386
396
  platform_campaign_id == o.platform_campaign_id &&
387
397
  platform == o.platform &&
388
398
  campaign_name == o.campaign_name &&
399
+ created_time == o.created_time &&
389
400
  status == o.status &&
390
401
  review_status == o.review_status &&
391
402
  platform_campaign_status == o.platform_campaign_status &&
@@ -422,7 +433,7 @@ module Zernio
422
433
  # Calculates hash code according to all attributes.
423
434
  # @return [Integer] Hash code
424
435
  def hash
425
- [platform_campaign_id, platform, campaign_name, status, review_status, platform_campaign_status, campaign_issues_info, ad_count, ad_set_count, budget, campaign_budget, budget_level, is_budget_schedule_enabled, currency, metrics, platform_ad_account_id, platform_ad_account_name, account_id, profile_id, advertising_channel_type, platform_objective, optimization_goal, bid_strategy, bid_amount, roas_average_floor, promoted_object, ad_sets, daily].hash
436
+ [platform_campaign_id, platform, campaign_name, created_time, status, review_status, platform_campaign_status, campaign_issues_info, ad_count, ad_set_count, budget, campaign_budget, budget_level, is_budget_schedule_enabled, currency, metrics, platform_ad_account_id, platform_ad_account_name, account_id, profile_id, advertising_channel_type, platform_objective, optimization_goal, bid_strategy, bid_amount, roas_average_floor, promoted_object, ad_sets, daily].hash
426
437
  end
427
438
 
428
439
  # Builds the object from hash
@@ -35,7 +35,7 @@ module Zernio
35
35
 
36
36
  attr_accessor :video
37
37
 
38
- # Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
38
+ # Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`): setting both is a 400, unlike `POST /v1/ads/create` where the top-level fields are silently ignored in multi-creative mode. Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
39
39
  attr_accessor :creatives
40
40
 
41
41
  # Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests`, `audienceId` and `campaignStatus` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
@@ -35,7 +35,7 @@ module Zernio
35
35
 
36
36
  attr_accessor :video
37
37
 
38
- # Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
38
+ # Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`): setting both is a 400, unlike `POST /v1/ads/create` where the top-level fields are silently ignored in multi-creative mode. Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
39
39
  attr_accessor :creatives
40
40
 
41
41
  # Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests`, `audienceId` and `campaignStatus` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
@@ -36,7 +36,7 @@ module Zernio
36
36
 
37
37
  attr_accessor :video
38
38
 
39
- # Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
39
+ # Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`): setting both is a 400, unlike `POST /v1/ads/create` where the top-level fields are silently ignored in multi-creative mode. Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
40
40
  attr_accessor :creatives
41
41
 
42
42
  # Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests`, `audienceId` and `campaignStatus` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
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 DeleteAdVideo200Response < ApiModelBase
18
+ attr_accessor :ad_account_id
19
+
20
+ attr_accessor :video_id
21
+
22
+ attr_accessor :success
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'ad_account_id' => :'adAccountId',
28
+ :'video_id' => :'videoId',
29
+ :'success' => :'success'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'ad_account_id' => :'String',
47
+ :'video_id' => :'String',
48
+ :'success' => :'Boolean'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DeleteAdVideo200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DeleteAdVideo200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'ad_account_id')
75
+ self.ad_account_id = attributes[:'ad_account_id']
76
+ end
77
+
78
+ if attributes.key?(:'video_id')
79
+ self.video_id = attributes[:'video_id']
80
+ end
81
+
82
+ if attributes.key?(:'success')
83
+ self.success = attributes[:'success']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ ad_account_id == o.ad_account_id &&
108
+ video_id == o.video_id &&
109
+ success == o.success
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [ad_account_id, video_id, success].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
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 UploadAdVideo201Response < ApiModelBase
18
+ attr_accessor :ad_account_id
19
+
20
+ attr_accessor :video
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'ad_account_id' => :'adAccountId',
26
+ :'video' => :'video'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'ad_account_id' => :'String',
44
+ :'video' => :'UploadAdVideo201ResponseVideo'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UploadAdVideo201Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UploadAdVideo201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'ad_account_id')
71
+ self.ad_account_id = attributes[:'ad_account_id']
72
+ end
73
+
74
+ if attributes.key?(:'video')
75
+ self.video = attributes[:'video']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ ad_account_id == o.ad_account_id &&
100
+ video == o.video
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [ad_account_id, video].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end