late-sdk 0.0.894 → 0.0.896
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 +26 -3
- data/docs/AdAccountsApi.md +446 -0
- data/docs/AdAnalyticsResponse.md +1 -1
- data/docs/AdAnalyticsResponseAnalytics.md +22 -0
- data/docs/AdCampaign.md +1 -1
- data/docs/AdCampaignBudget.md +11 -3
- data/docs/AdCampaignsApi.md +149 -3
- data/docs/AdInsightsApi.md +1 -1
- data/docs/AdNegativeKeywordList.md +26 -0
- data/docs/AdNegativeKeywordListKeyword.md +22 -0
- data/docs/BoostPostRequest.md +6 -4
- data/docs/CampaignAnalyticsResponseAnalytics.md +3 -1
- data/docs/CampaignAnalyticsResponseAnalyticsImpressionShareCache.md +20 -0
- data/docs/CampaignAnalyticsResponseAnalyticsSummary.md +96 -0
- data/docs/CampaignAnalyticsResponseCampaign.md +2 -0
- data/docs/CreateAdNegativeKeywordList201Response.md +24 -0
- data/docs/CreateAdNegativeKeywordListRequest.md +26 -0
- data/docs/CreateCallAdRequest.md +8 -2
- data/docs/CreateMessagingAdRequest.md +8 -2
- data/docs/CtwaAdRequestBody.md +8 -2
- data/docs/CtwaAdRequestBodyCreativesInner.md +7 -3
- data/docs/DeleteAdNegativeKeywordList200Response.md +20 -0
- data/docs/GetAdAnalytics202Response.md +1 -1
- data/docs/GetAdNegativeKeywordList200Response.md +24 -0
- data/docs/GetAdNegativeKeywordList200ResponseList.md +28 -0
- data/docs/ListAdNegativeKeywordLists200Response.md +24 -0
- data/docs/MediaItem.md +1 -1
- data/docs/MessagingAdsApi.md +10 -10
- data/docs/ReplaceAdNegativeKeywordListKeywords200Response.md +22 -0
- data/docs/ReplaceAdNegativeKeywordListKeywordsRequest.md +24 -0
- data/docs/ReplaceCampaignNegativeKeywordListsRequest.md +20 -0
- data/docs/UpdateAdCampaign200Response.md +1 -1
- data/docs/UpdateAdCampaignRequest.md +2 -0
- data/docs/UpdateAdNegativeKeywordList200Response.md +20 -0
- data/docs/UpdateAdNegativeKeywordListRequest.md +24 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +500 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +160 -6
- data/lib/zernio-sdk/api/ad_insights_api.rb +2 -2
- data/lib/zernio-sdk/api/messaging_ads_api.rb +8 -8
- data/lib/zernio-sdk/models/ad_analytics_response.rb +1 -1
- data/lib/zernio-sdk/models/ad_analytics_response_analytics.rb +169 -0
- data/lib/zernio-sdk/models/ad_campaign.rb +3 -1
- data/lib/zernio-sdk/models/ad_campaign_budget.rb +99 -5
- data/lib/zernio-sdk/models/ad_negative_keyword_list.rb +209 -0
- data/lib/zernio-sdk/models/ad_negative_keyword_list_keyword.rb +222 -0
- data/lib/zernio-sdk/models/boost_post_request.rb +38 -7
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics.rb +11 -2
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics_impression_share_cache.rb +158 -0
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics_summary.rb +550 -0
- data/lib/zernio-sdk/models/campaign_analytics_response_campaign.rb +11 -1
- data/lib/zernio-sdk/models/create_ad_negative_keyword_list201_response.rb +220 -0
- data/lib/zernio-sdk/models/create_ad_negative_keyword_list_request.rb +327 -0
- data/lib/zernio-sdk/models/create_call_ad_request.rb +94 -3
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +94 -3
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +95 -4
- data/lib/zernio-sdk/models/ctwa_ad_request_body_creatives_inner.rb +67 -21
- data/lib/zernio-sdk/models/ctwa_ad_request_body_creatives_inner_video.rb +1 -1
- data/lib/zernio-sdk/models/ctwa_ad_request_body_video.rb +1 -1
- data/lib/zernio-sdk/models/{ad_campaign_campaign_budget.rb → delete_ad_negative_keyword_list200_response.rb} +35 -48
- data/lib/zernio-sdk/models/get_ad_analytics202_response.rb +1 -1
- data/lib/zernio-sdk/models/get_ad_negative_keyword_list200_response.rb +199 -0
- data/lib/zernio-sdk/models/get_ad_negative_keyword_list200_response_list.rb +227 -0
- data/lib/zernio-sdk/models/list_ad_negative_keyword_lists200_response.rb +201 -0
- data/lib/zernio-sdk/models/media_item.rb +1 -0
- data/lib/zernio-sdk/models/replace_ad_negative_keyword_list_keywords200_response.rb +189 -0
- data/lib/zernio-sdk/models/replace_ad_negative_keyword_list_keywords_request.rb +289 -0
- data/lib/zernio-sdk/models/replace_campaign_negative_keyword_lists_request.rb +219 -0
- data/lib/zernio-sdk/models/update_ad_campaign200_response.rb +1 -1
- data/lib/zernio-sdk/models/update_ad_campaign_request.rb +13 -1
- data/lib/zernio-sdk/models/update_ad_campaign_request_budget.rb +1 -1
- data/lib/zernio-sdk/models/update_ad_negative_keyword_list200_response.rb +178 -0
- data/lib/zernio-sdk/models/update_ad_negative_keyword_list_request.rb +296 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +16 -1
- data/openapi.yaml +981 -43
- data/spec/api/ad_accounts_api_spec.rb +82 -0
- data/spec/api/ad_campaigns_api_spec.rb +29 -3
- data/spec/api/ad_insights_api_spec.rb +1 -1
- data/spec/api/messaging_ads_api_spec.rb +4 -4
- data/spec/models/ad_analytics_response_analytics_spec.rb +48 -0
- data/spec/models/ad_campaign_budget_spec.rb +24 -0
- data/spec/models/ad_negative_keyword_list_keyword_spec.rb +52 -0
- data/spec/models/ad_negative_keyword_list_spec.rb +60 -0
- data/spec/models/boost_post_request_spec.rb +7 -1
- data/spec/models/campaign_analytics_response_analytics_impression_share_cache_spec.rb +42 -0
- data/spec/models/campaign_analytics_response_analytics_spec.rb +6 -0
- data/spec/models/campaign_analytics_response_analytics_summary_spec.rb +270 -0
- data/spec/models/campaign_analytics_response_campaign_spec.rb +6 -0
- data/spec/models/create_ad_negative_keyword_list201_response_spec.rb +54 -0
- data/spec/models/create_ad_negative_keyword_list_request_spec.rb +64 -0
- data/spec/models/create_call_ad_request_spec.rb +18 -0
- data/spec/models/create_messaging_ad_request_spec.rb +18 -0
- data/spec/models/ctwa_ad_request_body_creatives_inner_spec.rb +12 -0
- data/spec/models/ctwa_ad_request_body_spec.rb +18 -0
- data/spec/models/delete_ad_negative_keyword_list200_response_spec.rb +42 -0
- data/spec/models/get_ad_negative_keyword_list200_response_list_spec.rb +66 -0
- data/spec/models/get_ad_negative_keyword_list200_response_spec.rb +54 -0
- data/spec/models/list_ad_negative_keyword_lists200_response_spec.rb +54 -0
- data/spec/models/replace_ad_negative_keyword_list_keywords200_response_spec.rb +48 -0
- data/spec/models/replace_ad_negative_keyword_list_keywords_request_spec.rb +58 -0
- data/spec/models/{ad_campaign_campaign_budget_spec.rb → replace_campaign_negative_keyword_lists_request_spec.rb} +12 -12
- data/spec/models/update_ad_campaign_request_spec.rb +6 -0
- data/spec/models/update_ad_negative_keyword_list200_response_spec.rb +42 -0
- data/spec/models/update_ad_negative_keyword_list_request_spec.rb +58 -0
- data/zernio-sdk-0.0.896.gem +0 -0
- metadata +66 -6
- data/docs/AdCampaignCampaignBudget.md +0 -20
- data/zernio-sdk-0.0.894.gem +0 -0
|
@@ -0,0 +1,289 @@
|
|
|
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 ReplaceAdNegativeKeywordListKeywordsRequest < ApiModelBase
|
|
18
|
+
# Zernio SocialAccount id.
|
|
19
|
+
attr_accessor :account_id
|
|
20
|
+
|
|
21
|
+
# Connected Google Ads customer id, without dashes. Required when the connection has multiple customers.
|
|
22
|
+
attr_accessor :customer_id
|
|
23
|
+
|
|
24
|
+
# Optional courtesy field. The resolved account or campaign determines support; other platforms return 501.
|
|
25
|
+
attr_accessor :platform
|
|
26
|
+
|
|
27
|
+
# Full desired keyword set. Bare strings use broad match. Send [] to clear the list.
|
|
28
|
+
attr_accessor :keywords
|
|
29
|
+
|
|
30
|
+
class EnumAttributeValidator
|
|
31
|
+
attr_reader :datatype
|
|
32
|
+
attr_reader :allowable_values
|
|
33
|
+
|
|
34
|
+
def initialize(datatype, allowable_values)
|
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
|
36
|
+
case datatype.to_s
|
|
37
|
+
when /Integer/i
|
|
38
|
+
value.to_i
|
|
39
|
+
when /Float/i
|
|
40
|
+
value.to_f
|
|
41
|
+
else
|
|
42
|
+
value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def valid?(value)
|
|
48
|
+
!value || allowable_values.include?(value)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
def self.attribute_map
|
|
54
|
+
{
|
|
55
|
+
:'account_id' => :'accountId',
|
|
56
|
+
:'customer_id' => :'customerId',
|
|
57
|
+
:'platform' => :'platform',
|
|
58
|
+
:'keywords' => :'keywords'
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns attribute mapping this model knows about
|
|
63
|
+
def self.acceptable_attribute_map
|
|
64
|
+
attribute_map
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns all the JSON keys this model knows about
|
|
68
|
+
def self.acceptable_attributes
|
|
69
|
+
acceptable_attribute_map.values
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Attribute type mapping.
|
|
73
|
+
def self.openapi_types
|
|
74
|
+
{
|
|
75
|
+
:'account_id' => :'String',
|
|
76
|
+
:'customer_id' => :'String',
|
|
77
|
+
:'platform' => :'String',
|
|
78
|
+
:'keywords' => :'Array<KeywordEntry>'
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# List of attributes with nullable: true
|
|
83
|
+
def self.openapi_nullable
|
|
84
|
+
Set.new([
|
|
85
|
+
])
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Initializes the object
|
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
90
|
+
def initialize(attributes = {})
|
|
91
|
+
if (!attributes.is_a?(Hash))
|
|
92
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ReplaceAdNegativeKeywordListKeywordsRequest` initialize method"
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
96
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
97
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
98
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
99
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ReplaceAdNegativeKeywordListKeywordsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
100
|
+
end
|
|
101
|
+
h[k.to_sym] = v
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'account_id')
|
|
105
|
+
self.account_id = attributes[:'account_id']
|
|
106
|
+
else
|
|
107
|
+
self.account_id = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'customer_id')
|
|
111
|
+
self.customer_id = attributes[:'customer_id']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'platform')
|
|
115
|
+
self.platform = attributes[:'platform']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'keywords')
|
|
119
|
+
if (value = attributes[:'keywords']).is_a?(Array)
|
|
120
|
+
self.keywords = value
|
|
121
|
+
end
|
|
122
|
+
else
|
|
123
|
+
self.keywords = nil
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
128
|
+
# @return Array for valid properties with the reasons
|
|
129
|
+
def list_invalid_properties
|
|
130
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
131
|
+
invalid_properties = Array.new
|
|
132
|
+
if @account_id.nil?
|
|
133
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
137
|
+
if @account_id !~ pattern
|
|
138
|
+
invalid_properties.push("invalid value for \"account_id\", must conform to the pattern #{pattern}.")
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
pattern = Regexp.new(/^\d+$/)
|
|
142
|
+
if !@customer_id.nil? && @customer_id !~ pattern
|
|
143
|
+
invalid_properties.push("invalid value for \"customer_id\", must conform to the pattern #{pattern}.")
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if @keywords.nil?
|
|
147
|
+
invalid_properties.push('invalid value for "keywords", keywords cannot be nil.')
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if @keywords.length > 5000
|
|
151
|
+
invalid_properties.push('invalid value for "keywords", number of items must be less than or equal to 5000.')
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
invalid_properties
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Check to see if the all the properties in the model are valid
|
|
158
|
+
# @return true if the model is valid
|
|
159
|
+
def valid?
|
|
160
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
161
|
+
return false if @account_id.nil?
|
|
162
|
+
return false if @account_id !~ Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
163
|
+
return false if !@customer_id.nil? && @customer_id !~ Regexp.new(/^\d+$/)
|
|
164
|
+
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
165
|
+
return false unless platform_validator.valid?(@platform)
|
|
166
|
+
return false if @keywords.nil?
|
|
167
|
+
return false if @keywords.length > 5000
|
|
168
|
+
true
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Custom attribute writer method with validation
|
|
172
|
+
# @param [Object] account_id Value to be assigned
|
|
173
|
+
def account_id=(account_id)
|
|
174
|
+
if account_id.nil?
|
|
175
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
179
|
+
if account_id !~ pattern
|
|
180
|
+
fail ArgumentError, "invalid value for \"account_id\", must conform to the pattern #{pattern}."
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
@account_id = account_id
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Custom attribute writer method with validation
|
|
187
|
+
# @param [Object] customer_id Value to be assigned
|
|
188
|
+
def customer_id=(customer_id)
|
|
189
|
+
if customer_id.nil?
|
|
190
|
+
fail ArgumentError, 'customer_id cannot be nil'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
pattern = Regexp.new(/^\d+$/)
|
|
194
|
+
if customer_id !~ pattern
|
|
195
|
+
fail ArgumentError, "invalid value for \"customer_id\", must conform to the pattern #{pattern}."
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
@customer_id = customer_id
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
202
|
+
# @param [Object] platform Object to be assigned
|
|
203
|
+
def platform=(platform)
|
|
204
|
+
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
205
|
+
unless validator.valid?(platform)
|
|
206
|
+
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
207
|
+
end
|
|
208
|
+
@platform = platform
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Custom attribute writer method with validation
|
|
212
|
+
# @param [Object] keywords Value to be assigned
|
|
213
|
+
def keywords=(keywords)
|
|
214
|
+
if keywords.nil?
|
|
215
|
+
fail ArgumentError, 'keywords cannot be nil'
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if keywords.length > 5000
|
|
219
|
+
fail ArgumentError, 'invalid value for "keywords", number of items must be less than or equal to 5000.'
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
@keywords = keywords
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Checks equality by comparing each attribute.
|
|
226
|
+
# @param [Object] Object to be compared
|
|
227
|
+
def ==(o)
|
|
228
|
+
return true if self.equal?(o)
|
|
229
|
+
self.class == o.class &&
|
|
230
|
+
account_id == o.account_id &&
|
|
231
|
+
customer_id == o.customer_id &&
|
|
232
|
+
platform == o.platform &&
|
|
233
|
+
keywords == o.keywords
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# @see the `==` method
|
|
237
|
+
# @param [Object] Object to be compared
|
|
238
|
+
def eql?(o)
|
|
239
|
+
self == o
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Calculates hash code according to all attributes.
|
|
243
|
+
# @return [Integer] Hash code
|
|
244
|
+
def hash
|
|
245
|
+
[account_id, customer_id, platform, keywords].hash
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Builds the object from hash
|
|
249
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
250
|
+
# @return [Object] Returns the model itself
|
|
251
|
+
def self.build_from_hash(attributes)
|
|
252
|
+
return nil unless attributes.is_a?(Hash)
|
|
253
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
254
|
+
transformed_hash = {}
|
|
255
|
+
openapi_types.each_pair do |key, type|
|
|
256
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
257
|
+
transformed_hash["#{key}"] = nil
|
|
258
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
259
|
+
# check to ensure the input is an array given that the attribute
|
|
260
|
+
# is documented as an array but the input is not
|
|
261
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
262
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
263
|
+
end
|
|
264
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
265
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
new(transformed_hash)
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Returns the object in the form of hash
|
|
272
|
+
# @return [Hash] Returns the object in the form of hash
|
|
273
|
+
def to_hash
|
|
274
|
+
hash = {}
|
|
275
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
276
|
+
value = self.send(attr)
|
|
277
|
+
if value.nil?
|
|
278
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
279
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
hash[param] = _to_hash(value)
|
|
283
|
+
end
|
|
284
|
+
hash
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
end
|
|
@@ -0,0 +1,219 @@
|
|
|
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 ReplaceCampaignNegativeKeywordListsRequest < ApiModelBase
|
|
18
|
+
# Optional courtesy field. The resolved account or campaign determines support; other platforms return 501.
|
|
19
|
+
attr_accessor :platform
|
|
20
|
+
|
|
21
|
+
attr_accessor :list_ids
|
|
22
|
+
|
|
23
|
+
class EnumAttributeValidator
|
|
24
|
+
attr_reader :datatype
|
|
25
|
+
attr_reader :allowable_values
|
|
26
|
+
|
|
27
|
+
def initialize(datatype, allowable_values)
|
|
28
|
+
@allowable_values = allowable_values.map do |value|
|
|
29
|
+
case datatype.to_s
|
|
30
|
+
when /Integer/i
|
|
31
|
+
value.to_i
|
|
32
|
+
when /Float/i
|
|
33
|
+
value.to_f
|
|
34
|
+
else
|
|
35
|
+
value
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def valid?(value)
|
|
41
|
+
!value || allowable_values.include?(value)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
|
+
def self.attribute_map
|
|
47
|
+
{
|
|
48
|
+
:'platform' => :'platform',
|
|
49
|
+
:'list_ids' => :'listIds'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns attribute mapping this model knows about
|
|
54
|
+
def self.acceptable_attribute_map
|
|
55
|
+
attribute_map
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns all the JSON keys this model knows about
|
|
59
|
+
def self.acceptable_attributes
|
|
60
|
+
acceptable_attribute_map.values
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute type mapping.
|
|
64
|
+
def self.openapi_types
|
|
65
|
+
{
|
|
66
|
+
:'platform' => :'String',
|
|
67
|
+
:'list_ids' => :'Array<String>'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
])
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ReplaceCampaignNegativeKeywordListsRequest` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ReplaceCampaignNegativeKeywordListsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'platform')
|
|
94
|
+
self.platform = attributes[:'platform']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'list_ids')
|
|
98
|
+
if (value = attributes[:'list_ids']).is_a?(Array)
|
|
99
|
+
self.list_ids = value
|
|
100
|
+
end
|
|
101
|
+
else
|
|
102
|
+
self.list_ids = nil
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
107
|
+
# @return Array for valid properties with the reasons
|
|
108
|
+
def list_invalid_properties
|
|
109
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
110
|
+
invalid_properties = Array.new
|
|
111
|
+
if @list_ids.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "list_ids", list_ids cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if @list_ids.length > 20
|
|
116
|
+
invalid_properties.push('invalid value for "list_ids", number of items must be less than or equal to 20.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
invalid_properties
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Check to see if the all the properties in the model are valid
|
|
123
|
+
# @return true if the model is valid
|
|
124
|
+
def valid?
|
|
125
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
126
|
+
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
127
|
+
return false unless platform_validator.valid?(@platform)
|
|
128
|
+
return false if @list_ids.nil?
|
|
129
|
+
return false if @list_ids.length > 20
|
|
130
|
+
true
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
134
|
+
# @param [Object] platform Object to be assigned
|
|
135
|
+
def platform=(platform)
|
|
136
|
+
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
137
|
+
unless validator.valid?(platform)
|
|
138
|
+
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
139
|
+
end
|
|
140
|
+
@platform = platform
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Custom attribute writer method with validation
|
|
144
|
+
# @param [Object] list_ids Value to be assigned
|
|
145
|
+
def list_ids=(list_ids)
|
|
146
|
+
if list_ids.nil?
|
|
147
|
+
fail ArgumentError, 'list_ids cannot be nil'
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if list_ids.length > 20
|
|
151
|
+
fail ArgumentError, 'invalid value for "list_ids", number of items must be less than or equal to 20.'
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
@list_ids = list_ids
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Checks equality by comparing each attribute.
|
|
158
|
+
# @param [Object] Object to be compared
|
|
159
|
+
def ==(o)
|
|
160
|
+
return true if self.equal?(o)
|
|
161
|
+
self.class == o.class &&
|
|
162
|
+
platform == o.platform &&
|
|
163
|
+
list_ids == o.list_ids
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @see the `==` method
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def eql?(o)
|
|
169
|
+
self == o
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Calculates hash code according to all attributes.
|
|
173
|
+
# @return [Integer] Hash code
|
|
174
|
+
def hash
|
|
175
|
+
[platform, list_ids].hash
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def self.build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
184
|
+
transformed_hash = {}
|
|
185
|
+
openapi_types.each_pair do |key, type|
|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = nil
|
|
188
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
new(transformed_hash)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the object in the form of hash
|
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
|
203
|
+
def to_hash
|
|
204
|
+
hash = {}
|
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
206
|
+
value = self.send(attr)
|
|
207
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
@@ -33,6 +33,9 @@ module Zernio
|
|
|
33
33
|
# **Google only.** Attach an existing portfolio bid strategy (numeric id from GET /v1/ads/bid-strategies) instead of setting bidStrategy. Exclusive with bidStrategy.
|
|
34
34
|
attr_accessor :portfolio_bid_strategy_id
|
|
35
35
|
|
|
36
|
+
# Google only. Explicitly allow changing a shared campaign budget, affecting every campaign that uses it. Does not bypass an unknown sharing state.
|
|
37
|
+
attr_accessor :allow_shared_budget_update
|
|
38
|
+
|
|
36
39
|
attr_accessor :budget
|
|
37
40
|
|
|
38
41
|
# **Meta only.** Rename the campaign.
|
|
@@ -71,6 +74,7 @@ module Zernio
|
|
|
71
74
|
:'bid_amount' => :'bidAmount',
|
|
72
75
|
:'roas_average_floor' => :'roasAverageFloor',
|
|
73
76
|
:'portfolio_bid_strategy_id' => :'portfolioBidStrategyId',
|
|
77
|
+
:'allow_shared_budget_update' => :'allowSharedBudgetUpdate',
|
|
74
78
|
:'budget' => :'budget',
|
|
75
79
|
:'name' => :'name',
|
|
76
80
|
:'platform_specific_data' => :'platformSpecificData'
|
|
@@ -96,6 +100,7 @@ module Zernio
|
|
|
96
100
|
:'bid_amount' => :'Float',
|
|
97
101
|
:'roas_average_floor' => :'Float',
|
|
98
102
|
:'portfolio_bid_strategy_id' => :'String',
|
|
103
|
+
:'allow_shared_budget_update' => :'Boolean',
|
|
99
104
|
:'budget' => :'UpdateAdCampaignRequestBudget',
|
|
100
105
|
:'name' => :'String',
|
|
101
106
|
:'platform_specific_data' => :'UpdateAdCampaignRequestPlatformSpecificData'
|
|
@@ -150,6 +155,12 @@ module Zernio
|
|
|
150
155
|
self.portfolio_bid_strategy_id = attributes[:'portfolio_bid_strategy_id']
|
|
151
156
|
end
|
|
152
157
|
|
|
158
|
+
if attributes.key?(:'allow_shared_budget_update')
|
|
159
|
+
self.allow_shared_budget_update = attributes[:'allow_shared_budget_update']
|
|
160
|
+
else
|
|
161
|
+
self.allow_shared_budget_update = false
|
|
162
|
+
end
|
|
163
|
+
|
|
153
164
|
if attributes.key?(:'budget')
|
|
154
165
|
self.budget = attributes[:'budget']
|
|
155
166
|
end
|
|
@@ -246,6 +257,7 @@ module Zernio
|
|
|
246
257
|
bid_amount == o.bid_amount &&
|
|
247
258
|
roas_average_floor == o.roas_average_floor &&
|
|
248
259
|
portfolio_bid_strategy_id == o.portfolio_bid_strategy_id &&
|
|
260
|
+
allow_shared_budget_update == o.allow_shared_budget_update &&
|
|
249
261
|
budget == o.budget &&
|
|
250
262
|
name == o.name &&
|
|
251
263
|
platform_specific_data == o.platform_specific_data
|
|
@@ -260,7 +272,7 @@ module Zernio
|
|
|
260
272
|
# Calculates hash code according to all attributes.
|
|
261
273
|
# @return [Integer] Hash code
|
|
262
274
|
def hash
|
|
263
|
-
[platform, account_id, bid_strategy, bid_amount, roas_average_floor, portfolio_bid_strategy_id, budget, name, platform_specific_data].hash
|
|
275
|
+
[platform, account_id, bid_strategy, bid_amount, roas_average_floor, portfolio_bid_strategy_id, allow_shared_budget_update, budget, name, platform_specific_data].hash
|
|
264
276
|
end
|
|
265
277
|
|
|
266
278
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
#
|
|
17
|
+
# Meta CBO or Google daily campaign budget, in whole currency units.
|
|
18
18
|
class UpdateAdCampaignRequestBudget < ApiModelBase
|
|
19
19
|
# Budget amount in the ad account's currency
|
|
20
20
|
attr_accessor :amount
|