late-sdk 0.0.899 → 0.0.900
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 +21 -2
- data/docs/AdAccountsApi.md +463 -3
- data/docs/AdCampaignsApi.md +4 -4
- data/docs/AdTracking.md +20 -0
- data/docs/CreateAdCampaign200Response.md +26 -0
- data/docs/CreateAdCampaignRequest.md +8 -0
- data/docs/CreateCallAdRequest.md +2 -0
- data/docs/CreateMessagingAdRequest.md +2 -0
- data/docs/CreateStandaloneAdRequest.md +11 -3
- data/docs/CtwaAdRequestBody.md +2 -0
- data/docs/GetAdComments200ResponseMeta.md +10 -4
- data/docs/GetIosFourteenCampaignLimits200Response.md +18 -0
- data/docs/GetIosFourteenCampaignLimits200ResponseLimits.md +22 -0
- data/docs/HideAdComment200Response.md +22 -0
- data/docs/HideAdCommentRequest.md +18 -0
- data/docs/ListAdsInstagramAccounts200Response.md +22 -0
- data/docs/ListAdsInstagramAccounts200ResponseAccountsInner.md +26 -0
- data/docs/ListAdsInstagramAccounts200ResponsePagesInner.md +24 -0
- data/docs/ListAdsInstagramAccounts200ResponseResolved.md +22 -0
- data/docs/ListAdvertisableApplications200Response.md +18 -0
- data/docs/ListAdvertisableApplications200ResponseApplicationsInner.md +24 -0
- data/docs/MetaInstagramIdentityRef.md +22 -0
- data/docs/ReplyToAdComment200Response.md +20 -0
- data/docs/ReplyToAdCommentRequest.md +18 -0
- data/docs/TargetingSpec.md +4 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +512 -4
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +3 -3
- data/lib/zernio-sdk/models/{create_standalone_ad_request_tracking.rb → ad_tracking.rb} +5 -5
- data/lib/zernio-sdk/models/create_ad_campaign200_response.rb +231 -0
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +52 -1
- data/lib/zernio-sdk/models/create_call_ad_request.rb +10 -1
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +10 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +98 -4
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +10 -1
- data/lib/zernio-sdk/models/get_ad_comments200_response_meta.rb +36 -46
- data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response.rb +164 -0
- data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response_limits.rb +172 -0
- data/lib/zernio-sdk/models/hide_ad_comment200_response.rb +225 -0
- data/lib/zernio-sdk/models/hide_ad_comment_request.rb +165 -0
- data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response.rb +220 -0
- data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_accounts_inner.rb +287 -0
- data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_pages_inner.rb +210 -0
- data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_resolved.rb +211 -0
- data/lib/zernio-sdk/models/list_advertisable_applications200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_advertisable_applications200_response_applications_inner.rb +250 -0
- data/lib/zernio-sdk/models/meta_instagram_identity_ref.rb +202 -0
- data/lib/zernio-sdk/models/reply_to_ad_comment200_response.rb +215 -0
- data/lib/zernio-sdk/models/reply_to_ad_comment_request.rb +174 -0
- data/lib/zernio-sdk/models/targeting_spec.rb +63 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +15 -2
- data/openapi.yaml +618 -143
- data/spec/api/ad_accounts_api_spec.rb +91 -2
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- data/spec/models/{create_standalone_ad_request_tracking_spec.rb → ad_tracking_spec.rb} +6 -6
- data/spec/models/create_ad_campaign200_response_spec.rb +68 -0
- data/spec/models/create_ad_campaign_request_spec.rb +28 -0
- data/spec/models/create_call_ad_request_spec.rb +6 -0
- data/spec/models/create_messaging_ad_request_spec.rb +6 -0
- data/spec/models/create_standalone_ad_request_spec.rb +28 -0
- data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
- data/spec/models/get_ad_comments200_response_meta_spec.rb +19 -1
- data/spec/models/get_ios_fourteen_campaign_limits200_response_limits_spec.rb +48 -0
- data/spec/models/get_ios_fourteen_campaign_limits200_response_spec.rb +36 -0
- data/spec/models/hide_ad_comment200_response_spec.rb +52 -0
- data/spec/models/hide_ad_comment_request_spec.rb +36 -0
- data/spec/models/list_ads_instagram_accounts200_response_accounts_inner_spec.rb +64 -0
- data/spec/models/list_ads_instagram_accounts200_response_pages_inner_spec.rb +54 -0
- data/spec/models/list_ads_instagram_accounts200_response_resolved_spec.rb +52 -0
- data/spec/models/list_ads_instagram_accounts200_response_spec.rb +48 -0
- data/spec/models/list_advertisable_applications200_response_applications_inner_spec.rb +54 -0
- data/spec/models/list_advertisable_applications200_response_spec.rb +36 -0
- data/spec/models/meta_instagram_identity_ref_spec.rb +48 -0
- data/spec/models/reply_to_ad_comment200_response_spec.rb +46 -0
- data/spec/models/reply_to_ad_comment_request_spec.rb +36 -0
- data/spec/models/targeting_spec_spec.rb +12 -0
- data/zernio-sdk-0.0.900.gem +0 -0
- metadata +62 -10
- data/docs/CreateStandaloneAdRequestPromotedObject.md +0 -38
- data/docs/CreateStandaloneAdRequestTracking.md +0 -20
- data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +0 -249
- data/spec/models/create_standalone_ad_request_promoted_object_spec.rb +0 -96
- data/zernio-sdk-0.0.899.gem +0 -0
|
@@ -19,6 +19,8 @@ module Zernio
|
|
|
19
19
|
# Meta enhancement settings for single or attached ads, and defaults for creatives[]. An item replaces the entire map, including with an empty object.
|
|
20
20
|
attr_accessor :creative_features
|
|
21
21
|
|
|
22
|
+
attr_accessor :tracking
|
|
23
|
+
|
|
22
24
|
# Facebook or Instagram SocialAccount ID.
|
|
23
25
|
attr_accessor :account_id
|
|
24
26
|
|
|
@@ -156,6 +158,7 @@ module Zernio
|
|
|
156
158
|
def self.attribute_map
|
|
157
159
|
{
|
|
158
160
|
:'creative_features' => :'creativeFeatures',
|
|
161
|
+
:'tracking' => :'tracking',
|
|
159
162
|
:'account_id' => :'accountId',
|
|
160
163
|
:'ad_account_id' => :'adAccountId',
|
|
161
164
|
:'name' => :'name',
|
|
@@ -212,6 +215,7 @@ module Zernio
|
|
|
212
215
|
def self.openapi_types
|
|
213
216
|
{
|
|
214
217
|
:'creative_features' => :'Hash<String, String>',
|
|
218
|
+
:'tracking' => :'AdTracking',
|
|
215
219
|
:'account_id' => :'String',
|
|
216
220
|
:'ad_account_id' => :'String',
|
|
217
221
|
:'name' => :'String',
|
|
@@ -282,6 +286,10 @@ module Zernio
|
|
|
282
286
|
end
|
|
283
287
|
end
|
|
284
288
|
|
|
289
|
+
if attributes.key?(:'tracking')
|
|
290
|
+
self.tracking = attributes[:'tracking']
|
|
291
|
+
end
|
|
292
|
+
|
|
285
293
|
if attributes.key?(:'account_id')
|
|
286
294
|
self.account_id = attributes[:'account_id']
|
|
287
295
|
else
|
|
@@ -879,6 +887,7 @@ module Zernio
|
|
|
879
887
|
return true if self.equal?(o)
|
|
880
888
|
self.class == o.class &&
|
|
881
889
|
creative_features == o.creative_features &&
|
|
890
|
+
tracking == o.tracking &&
|
|
882
891
|
account_id == o.account_id &&
|
|
883
892
|
ad_account_id == o.ad_account_id &&
|
|
884
893
|
name == o.name &&
|
|
@@ -929,7 +938,7 @@ module Zernio
|
|
|
929
938
|
# Calculates hash code according to all attributes.
|
|
930
939
|
# @return [Integer] Hash code
|
|
931
940
|
def hash
|
|
932
|
-
[creative_features, account_id, ad_account_id, name, existing_post_id, object_story_id, whatsapp_phone_number, headline, body, image_url, video, welcome_message, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, regional_regulation_identities].hash
|
|
941
|
+
[creative_features, tracking, account_id, ad_account_id, name, existing_post_id, object_story_id, whatsapp_phone_number, headline, body, image_url, video, welcome_message, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, regional_regulation_identities].hash
|
|
933
942
|
end
|
|
934
943
|
|
|
935
944
|
# Builds the object from hash
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class GetAdComments200ResponseMeta < ApiModelBase
|
|
18
|
-
#
|
|
18
|
+
# Platform of the comments.
|
|
19
19
|
attr_accessor :platform
|
|
20
20
|
|
|
21
21
|
# The placement these comments are for, useful when you didn't pass ?placement= and want to know which one you got.
|
|
@@ -24,12 +24,21 @@ module Zernio
|
|
|
24
24
|
# Internal Zernio ad ID.
|
|
25
25
|
attr_accessor :ad_id
|
|
26
26
|
|
|
27
|
-
#
|
|
27
|
+
# Platform ad ID.
|
|
28
28
|
attr_accessor :platform_ad_id
|
|
29
29
|
|
|
30
30
|
# Underlying post ID the comments belong to. effective_object_story_id for the Facebook side, effective_instagram_media_id for the Instagram side.
|
|
31
31
|
attr_accessor :effective_story_id
|
|
32
32
|
|
|
33
|
+
# TikTok-only video item ID. Null when the ad and comments do not expose it.
|
|
34
|
+
attr_accessor :tiktok_item_id
|
|
35
|
+
|
|
36
|
+
# TikTok-only resolved start date.
|
|
37
|
+
attr_accessor :since
|
|
38
|
+
|
|
39
|
+
# TikTok-only resolved end date.
|
|
40
|
+
attr_accessor :_until
|
|
41
|
+
|
|
33
42
|
# Facebook-only. The connected Facebook Page SocialAccount these comments were read through. Pass it as `accountId` (with `effectiveStoryId` as the postId) to /v1/inbox/comments to reply/hide/delete. Null when no connected Page was used (then moderation isn't possible).
|
|
34
43
|
attr_accessor :facebook_account_id
|
|
35
44
|
|
|
@@ -77,6 +86,9 @@ module Zernio
|
|
|
77
86
|
:'ad_id' => :'adId',
|
|
78
87
|
:'platform_ad_id' => :'platformAdId',
|
|
79
88
|
:'effective_story_id' => :'effectiveStoryId',
|
|
89
|
+
:'tiktok_item_id' => :'tiktokItemId',
|
|
90
|
+
:'since' => :'since',
|
|
91
|
+
:'_until' => :'until',
|
|
80
92
|
:'facebook_account_id' => :'facebookAccountId',
|
|
81
93
|
:'instagram_user_id' => :'instagramUserId',
|
|
82
94
|
:'instagram_permalink' => :'instagramPermalink',
|
|
@@ -104,6 +116,9 @@ module Zernio
|
|
|
104
116
|
:'ad_id' => :'String',
|
|
105
117
|
:'platform_ad_id' => :'String',
|
|
106
118
|
:'effective_story_id' => :'String',
|
|
119
|
+
:'tiktok_item_id' => :'String',
|
|
120
|
+
:'since' => :'Date',
|
|
121
|
+
:'_until' => :'Date',
|
|
107
122
|
:'facebook_account_id' => :'String',
|
|
108
123
|
:'instagram_user_id' => :'String',
|
|
109
124
|
:'instagram_permalink' => :'String',
|
|
@@ -116,6 +131,7 @@ module Zernio
|
|
|
116
131
|
# List of attributes with nullable: true
|
|
117
132
|
def self.openapi_nullable
|
|
118
133
|
Set.new([
|
|
134
|
+
:'tiktok_item_id',
|
|
119
135
|
:'facebook_account_id',
|
|
120
136
|
])
|
|
121
137
|
end
|
|
@@ -144,8 +160,6 @@ module Zernio
|
|
|
144
160
|
|
|
145
161
|
if attributes.key?(:'placement')
|
|
146
162
|
self.placement = attributes[:'placement']
|
|
147
|
-
else
|
|
148
|
-
self.placement = nil
|
|
149
163
|
end
|
|
150
164
|
|
|
151
165
|
if attributes.key?(:'ad_id')
|
|
@@ -156,14 +170,22 @@ module Zernio
|
|
|
156
170
|
|
|
157
171
|
if attributes.key?(:'platform_ad_id')
|
|
158
172
|
self.platform_ad_id = attributes[:'platform_ad_id']
|
|
159
|
-
else
|
|
160
|
-
self.platform_ad_id = nil
|
|
161
173
|
end
|
|
162
174
|
|
|
163
175
|
if attributes.key?(:'effective_story_id')
|
|
164
176
|
self.effective_story_id = attributes[:'effective_story_id']
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'tiktok_item_id')
|
|
180
|
+
self.tiktok_item_id = attributes[:'tiktok_item_id']
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'since')
|
|
184
|
+
self.since = attributes[:'since']
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'_until')
|
|
188
|
+
self._until = attributes[:'_until']
|
|
167
189
|
end
|
|
168
190
|
|
|
169
191
|
if attributes.key?(:'facebook_account_id')
|
|
@@ -204,22 +226,10 @@ module Zernio
|
|
|
204
226
|
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
205
227
|
end
|
|
206
228
|
|
|
207
|
-
if @placement.nil?
|
|
208
|
-
invalid_properties.push('invalid value for "placement", placement cannot be nil.')
|
|
209
|
-
end
|
|
210
|
-
|
|
211
229
|
if @ad_id.nil?
|
|
212
230
|
invalid_properties.push('invalid value for "ad_id", ad_id cannot be nil.')
|
|
213
231
|
end
|
|
214
232
|
|
|
215
|
-
if @platform_ad_id.nil?
|
|
216
|
-
invalid_properties.push('invalid value for "platform_ad_id", platform_ad_id cannot be nil.')
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
if @effective_story_id.nil?
|
|
220
|
-
invalid_properties.push('invalid value for "effective_story_id", effective_story_id cannot be nil.')
|
|
221
|
-
end
|
|
222
|
-
|
|
223
233
|
if @account_id.nil?
|
|
224
234
|
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
225
235
|
end
|
|
@@ -236,14 +246,11 @@ module Zernio
|
|
|
236
246
|
def valid?
|
|
237
247
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
238
248
|
return false if @platform.nil?
|
|
239
|
-
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram"])
|
|
249
|
+
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok"])
|
|
240
250
|
return false unless platform_validator.valid?(@platform)
|
|
241
|
-
return false if @placement.nil?
|
|
242
251
|
placement_validator = EnumAttributeValidator.new('String', ["facebook", "instagram"])
|
|
243
252
|
return false unless placement_validator.valid?(@placement)
|
|
244
253
|
return false if @ad_id.nil?
|
|
245
|
-
return false if @platform_ad_id.nil?
|
|
246
|
-
return false if @effective_story_id.nil?
|
|
247
254
|
return false if @account_id.nil?
|
|
248
255
|
return false if @last_updated.nil?
|
|
249
256
|
true
|
|
@@ -252,7 +259,7 @@ module Zernio
|
|
|
252
259
|
# Custom attribute writer method checking allowed values (enum).
|
|
253
260
|
# @param [Object] platform Object to be assigned
|
|
254
261
|
def platform=(platform)
|
|
255
|
-
validator = EnumAttributeValidator.new('String', ["facebook", "instagram"])
|
|
262
|
+
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok"])
|
|
256
263
|
unless validator.valid?(platform)
|
|
257
264
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
258
265
|
end
|
|
@@ -279,26 +286,6 @@ module Zernio
|
|
|
279
286
|
@ad_id = ad_id
|
|
280
287
|
end
|
|
281
288
|
|
|
282
|
-
# Custom attribute writer method with validation
|
|
283
|
-
# @param [Object] platform_ad_id Value to be assigned
|
|
284
|
-
def platform_ad_id=(platform_ad_id)
|
|
285
|
-
if platform_ad_id.nil?
|
|
286
|
-
fail ArgumentError, 'platform_ad_id cannot be nil'
|
|
287
|
-
end
|
|
288
|
-
|
|
289
|
-
@platform_ad_id = platform_ad_id
|
|
290
|
-
end
|
|
291
|
-
|
|
292
|
-
# Custom attribute writer method with validation
|
|
293
|
-
# @param [Object] effective_story_id Value to be assigned
|
|
294
|
-
def effective_story_id=(effective_story_id)
|
|
295
|
-
if effective_story_id.nil?
|
|
296
|
-
fail ArgumentError, 'effective_story_id cannot be nil'
|
|
297
|
-
end
|
|
298
|
-
|
|
299
|
-
@effective_story_id = effective_story_id
|
|
300
|
-
end
|
|
301
|
-
|
|
302
289
|
# Custom attribute writer method with validation
|
|
303
290
|
# @param [Object] account_id Value to be assigned
|
|
304
291
|
def account_id=(account_id)
|
|
@@ -329,6 +316,9 @@ module Zernio
|
|
|
329
316
|
ad_id == o.ad_id &&
|
|
330
317
|
platform_ad_id == o.platform_ad_id &&
|
|
331
318
|
effective_story_id == o.effective_story_id &&
|
|
319
|
+
tiktok_item_id == o.tiktok_item_id &&
|
|
320
|
+
since == o.since &&
|
|
321
|
+
_until == o._until &&
|
|
332
322
|
facebook_account_id == o.facebook_account_id &&
|
|
333
323
|
instagram_user_id == o.instagram_user_id &&
|
|
334
324
|
instagram_permalink == o.instagram_permalink &&
|
|
@@ -346,7 +336,7 @@ module Zernio
|
|
|
346
336
|
# Calculates hash code according to all attributes.
|
|
347
337
|
# @return [Integer] Hash code
|
|
348
338
|
def hash
|
|
349
|
-
[platform, placement, ad_id, platform_ad_id, effective_story_id, facebook_account_id, instagram_user_id, instagram_permalink, instagram_account_id, account_id, last_updated].hash
|
|
339
|
+
[platform, placement, ad_id, platform_ad_id, effective_story_id, tiktok_item_id, since, _until, facebook_account_id, instagram_user_id, instagram_permalink, instagram_account_id, account_id, last_updated].hash
|
|
350
340
|
end
|
|
351
341
|
|
|
352
342
|
# Builds the object from hash
|
|
@@ -0,0 +1,164 @@
|
|
|
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 GetIosFourteenCampaignLimits200Response < ApiModelBase
|
|
18
|
+
attr_accessor :limits
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'limits' => :'limits'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'limits' => :'GetIosFourteenCampaignLimits200ResponseLimits'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetIosFourteenCampaignLimits200Response` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetIosFourteenCampaignLimits200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'limits')
|
|
67
|
+
self.limits = attributes[:'limits']
|
|
68
|
+
else
|
|
69
|
+
self.limits = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @limits.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "limits", limits cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @limits.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] limits Value to be assigned
|
|
95
|
+
def limits=(limits)
|
|
96
|
+
if limits.nil?
|
|
97
|
+
fail ArgumentError, 'limits cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@limits = limits
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
limits == o.limits
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[limits].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the object in the form of hash
|
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
|
148
|
+
def to_hash
|
|
149
|
+
hash = {}
|
|
150
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
@@ -0,0 +1,172 @@
|
|
|
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 GetIosFourteenCampaignLimits200ResponseLimits < ApiModelBase
|
|
18
|
+
# Campaign group limit reported by Meta.
|
|
19
|
+
attr_accessor :campaign_group_limit
|
|
20
|
+
|
|
21
|
+
# Campaign limit reported by Meta.
|
|
22
|
+
attr_accessor :campaign_limit
|
|
23
|
+
|
|
24
|
+
# Campaign group limit details returned by Meta.
|
|
25
|
+
attr_accessor :campaign_group_limits_details
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'campaign_group_limit' => :'campaignGroupLimit',
|
|
31
|
+
:'campaign_limit' => :'campaignLimit',
|
|
32
|
+
:'campaign_group_limits_details' => :'campaignGroupLimitsDetails'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'campaign_group_limit' => :'Float',
|
|
50
|
+
:'campaign_limit' => :'Float',
|
|
51
|
+
:'campaign_group_limits_details' => :'Array<Object>'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
:'campaign_group_limit',
|
|
59
|
+
:'campaign_limit',
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetIosFourteenCampaignLimits200ResponseLimits` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetIosFourteenCampaignLimits200ResponseLimits`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'campaign_group_limit')
|
|
80
|
+
self.campaign_group_limit = attributes[:'campaign_group_limit']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'campaign_limit')
|
|
84
|
+
self.campaign_limit = attributes[:'campaign_limit']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'campaign_group_limits_details')
|
|
88
|
+
if (value = attributes[:'campaign_group_limits_details']).is_a?(Array)
|
|
89
|
+
self.campaign_group_limits_details = value
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properties with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
106
|
+
true
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Checks equality by comparing each attribute.
|
|
110
|
+
# @param [Object] Object to be compared
|
|
111
|
+
def ==(o)
|
|
112
|
+
return true if self.equal?(o)
|
|
113
|
+
self.class == o.class &&
|
|
114
|
+
campaign_group_limit == o.campaign_group_limit &&
|
|
115
|
+
campaign_limit == o.campaign_limit &&
|
|
116
|
+
campaign_group_limits_details == o.campaign_group_limits_details
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @see the `==` method
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def eql?(o)
|
|
122
|
+
self == o
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Calculates hash code according to all attributes.
|
|
126
|
+
# @return [Integer] Hash code
|
|
127
|
+
def hash
|
|
128
|
+
[campaign_group_limit, campaign_limit, campaign_group_limits_details].hash
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Builds the object from hash
|
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
|
+
# @return [Object] Returns the model itself
|
|
134
|
+
def self.build_from_hash(attributes)
|
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
|
136
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
137
|
+
transformed_hash = {}
|
|
138
|
+
openapi_types.each_pair do |key, type|
|
|
139
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = nil
|
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
142
|
+
# check to ensure the input is an array given that the attribute
|
|
143
|
+
# is documented as an array but the input is not
|
|
144
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
145
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
146
|
+
end
|
|
147
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
148
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
new(transformed_hash)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Returns the object in the form of hash
|
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
|
156
|
+
def to_hash
|
|
157
|
+
hash = {}
|
|
158
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
159
|
+
value = self.send(attr)
|
|
160
|
+
if value.nil?
|
|
161
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
162
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
hash[param] = _to_hash(value)
|
|
166
|
+
end
|
|
167
|
+
hash
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
end
|