late-sdk 0.0.856 → 0.0.858
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 +27 -2
- data/docs/AdCampaignsApi.md +364 -6
- data/docs/{ListAdKeywords200ResponseKeywordsInner.md → AdKeyword.md} +7 -3
- data/docs/AdKeywordMetrics.md +30 -0
- data/docs/AddAdKeywords201Response.md +18 -0
- data/docs/AddAdKeywordsRequest.md +24 -0
- data/docs/AddAdKeywordsRequestKeywordsInner.md +20 -0
- data/docs/AddAdKeywordsRequestKeywordsInnerAnyOf.md +20 -0
- data/docs/ChannelPicker.md +20 -0
- data/docs/ChannelPickerChannelsInner.md +24 -0
- data/docs/ChannelPickerTeam.md +22 -0
- data/docs/ConnectApi.md +78 -0
- data/docs/CreatePost200Response.md +22 -0
- data/docs/CreatePost200ResponseTiktokInner.md +24 -0
- data/docs/CreatePostRequest.md +2 -0
- data/docs/CreateStandaloneAdRequest.md +4 -2
- data/docs/KeywordEntry.md +49 -0
- data/docs/ListAdKeywords200Response.md +1 -1
- data/docs/ListCampaignNegativeKeywords200Response.md +18 -0
- data/docs/ListCampaignNegativeKeywords200ResponseKeywordsInner.md +22 -0
- data/docs/ListSlackChannels200Response.md +49 -0
- data/docs/PlatformTarget.md +1 -1
- data/docs/Post.md +1 -1
- data/docs/PostsApi.md +4 -4
- data/docs/RemoveAdKeyword200Response.md +20 -0
- data/docs/ReplaceCampaignNegativeKeywords200Response.md +22 -0
- data/docs/ReplaceCampaignNegativeKeywordsRequest.md +20 -0
- data/docs/StartOAuth.md +20 -0
- data/docs/UpdateAdKeyword200Response.md +18 -0
- data/docs/{UpdateAdStatusRequest.md → UpdateAdKeywordRequest.md} +2 -2
- data/docs/WebhookLog.md +1 -1
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +358 -9
- data/lib/zernio-sdk/api/connect_api.rb +77 -0
- data/lib/zernio-sdk/api/posts_api.rb +4 -4
- data/lib/zernio-sdk/models/{list_ad_keywords200_response_keywords_inner.rb → ad_keyword.rb} +28 -8
- data/lib/zernio-sdk/models/ad_keyword_metrics.rb +207 -0
- data/lib/zernio-sdk/models/add_ad_keywords201_response.rb +149 -0
- data/lib/zernio-sdk/models/add_ad_keywords_request.rb +250 -0
- data/lib/zernio-sdk/models/add_ad_keywords_request_keywords_inner.rb +103 -0
- data/lib/zernio-sdk/models/add_ad_keywords_request_keywords_inner_any_of.rb +225 -0
- data/lib/zernio-sdk/models/channel_picker.rb +192 -0
- data/lib/zernio-sdk/models/channel_picker_channels_inner.rb +244 -0
- data/lib/zernio-sdk/models/channel_picker_team.rb +169 -0
- data/lib/zernio-sdk/models/create_post200_response.rb +221 -0
- data/lib/zernio-sdk/models/create_post200_response_tiktok_inner.rb +227 -0
- data/lib/zernio-sdk/models/create_post_request.rb +13 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +55 -5
- data/lib/zernio-sdk/models/keyword_entry.rb +105 -0
- data/lib/zernio-sdk/models/list_ad_keywords200_response.rb +1 -1
- data/lib/zernio-sdk/models/list_campaign_negative_keywords200_response.rb +149 -0
- data/lib/zernio-sdk/models/list_campaign_negative_keywords200_response_keywords_inner.rb +199 -0
- data/lib/zernio-sdk/models/list_slack_channels200_response.rb +104 -0
- data/lib/zernio-sdk/models/platform_target.rb +1 -1
- data/lib/zernio-sdk/models/post.rb +3 -2
- data/lib/zernio-sdk/models/remove_ad_keyword200_response.rb +157 -0
- data/lib/zernio-sdk/models/replace_campaign_negative_keywords200_response.rb +170 -0
- data/lib/zernio-sdk/models/replace_campaign_negative_keywords_request.rb +219 -0
- data/lib/zernio-sdk/models/start_o_auth.rb +190 -0
- data/lib/zernio-sdk/models/update_ad_keyword200_response.rb +147 -0
- data/lib/zernio-sdk/models/{update_ad_status_request.rb → update_ad_keyword_request.rb} +3 -3
- data/lib/zernio-sdk/models/webhook_log.rb +1 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +21 -2
- data/openapi.yaml +390 -27
- data/spec/api/ad_campaigns_api_spec.rb +64 -1
- data/spec/api/connect_api_spec.rb +15 -0
- data/spec/api/posts_api_spec.rb +1 -1
- data/spec/models/ad_keyword_metrics_spec.rb +72 -0
- data/spec/models/{list_ad_keywords200_response_keywords_inner_spec.rb → ad_keyword_spec.rb} +18 -6
- data/spec/models/add_ad_keywords201_response_spec.rb +36 -0
- data/spec/models/add_ad_keywords_request_keywords_inner_any_of_spec.rb +46 -0
- data/spec/models/add_ad_keywords_request_keywords_inner_spec.rb +21 -0
- data/spec/models/add_ad_keywords_request_spec.rb +54 -0
- data/spec/models/channel_picker_channels_inner_spec.rb +54 -0
- data/spec/models/channel_picker_spec.rb +42 -0
- data/spec/models/channel_picker_team_spec.rb +48 -0
- data/spec/models/create_post200_response_spec.rb +48 -0
- data/spec/models/create_post200_response_tiktok_inner_spec.rb +54 -0
- data/spec/models/create_post_request_spec.rb +6 -0
- data/spec/models/create_standalone_ad_request_spec.rb +6 -0
- data/spec/models/keyword_entry_spec.rb +32 -0
- data/spec/models/list_campaign_negative_keywords200_response_keywords_inner_spec.rb +52 -0
- data/spec/models/list_campaign_negative_keywords200_response_spec.rb +36 -0
- data/spec/models/list_slack_channels200_response_spec.rb +32 -0
- data/spec/models/post_spec.rb +1 -1
- data/spec/models/remove_ad_keyword200_response_spec.rb +42 -0
- data/spec/models/replace_campaign_negative_keywords200_response_spec.rb +48 -0
- data/spec/models/replace_campaign_negative_keywords_request_spec.rb +46 -0
- data/spec/models/start_o_auth_spec.rb +42 -0
- data/spec/models/update_ad_keyword200_response_spec.rb +36 -0
- data/spec/models/{update_ad_status_request_spec.rb → update_ad_keyword_request_spec.rb} +6 -6
- data/zernio-sdk-0.0.858.gem +0 -0
- metadata +86 -10
- data/zernio-sdk-0.0.856.gem +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
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 CreatePost200Response < ApiModelBase
|
|
18
|
+
# Always true on this response
|
|
19
|
+
attr_accessor :dry_run
|
|
20
|
+
|
|
21
|
+
# True only when every evaluated TikTok account can publish now
|
|
22
|
+
attr_accessor :can_publish
|
|
23
|
+
|
|
24
|
+
# One verdict per `tiktok` entry in the request, in request order
|
|
25
|
+
attr_accessor :tiktok
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'dry_run' => :'dryRun',
|
|
31
|
+
:'can_publish' => :'canPublish',
|
|
32
|
+
:'tiktok' => :'tiktok'
|
|
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
|
+
:'dry_run' => :'Boolean',
|
|
50
|
+
:'can_publish' => :'Boolean',
|
|
51
|
+
:'tiktok' => :'Array<CreatePost200ResponseTiktokInner>'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreatePost200Response` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreatePost200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'dry_run')
|
|
78
|
+
self.dry_run = attributes[:'dry_run']
|
|
79
|
+
else
|
|
80
|
+
self.dry_run = nil
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'can_publish')
|
|
84
|
+
self.can_publish = attributes[:'can_publish']
|
|
85
|
+
else
|
|
86
|
+
self.can_publish = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'tiktok')
|
|
90
|
+
if (value = attributes[:'tiktok']).is_a?(Array)
|
|
91
|
+
self.tiktok = value
|
|
92
|
+
end
|
|
93
|
+
else
|
|
94
|
+
self.tiktok = nil
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
99
|
+
# @return Array for valid properties with the reasons
|
|
100
|
+
def list_invalid_properties
|
|
101
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
102
|
+
invalid_properties = Array.new
|
|
103
|
+
if @dry_run.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "dry_run", dry_run cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if @can_publish.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "can_publish", can_publish cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if @tiktok.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "tiktok", tiktok cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
+
return false if @dry_run.nil?
|
|
123
|
+
return false if @can_publish.nil?
|
|
124
|
+
return false if @tiktok.nil?
|
|
125
|
+
true
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method with validation
|
|
129
|
+
# @param [Object] dry_run Value to be assigned
|
|
130
|
+
def dry_run=(dry_run)
|
|
131
|
+
if dry_run.nil?
|
|
132
|
+
fail ArgumentError, 'dry_run cannot be nil'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
@dry_run = dry_run
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Custom attribute writer method with validation
|
|
139
|
+
# @param [Object] can_publish Value to be assigned
|
|
140
|
+
def can_publish=(can_publish)
|
|
141
|
+
if can_publish.nil?
|
|
142
|
+
fail ArgumentError, 'can_publish cannot be nil'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@can_publish = can_publish
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param [Object] tiktok Value to be assigned
|
|
150
|
+
def tiktok=(tiktok)
|
|
151
|
+
if tiktok.nil?
|
|
152
|
+
fail ArgumentError, 'tiktok cannot be nil'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@tiktok = tiktok
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Checks equality by comparing each attribute.
|
|
159
|
+
# @param [Object] Object to be compared
|
|
160
|
+
def ==(o)
|
|
161
|
+
return true if self.equal?(o)
|
|
162
|
+
self.class == o.class &&
|
|
163
|
+
dry_run == o.dry_run &&
|
|
164
|
+
can_publish == o.can_publish &&
|
|
165
|
+
tiktok == o.tiktok
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# @see the `==` method
|
|
169
|
+
# @param [Object] Object to be compared
|
|
170
|
+
def eql?(o)
|
|
171
|
+
self == o
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Calculates hash code according to all attributes.
|
|
175
|
+
# @return [Integer] Hash code
|
|
176
|
+
def hash
|
|
177
|
+
[dry_run, can_publish, tiktok].hash
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Builds the object from hash
|
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
182
|
+
# @return [Object] Returns the model itself
|
|
183
|
+
def self.build_from_hash(attributes)
|
|
184
|
+
return nil unless attributes.is_a?(Hash)
|
|
185
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
186
|
+
transformed_hash = {}
|
|
187
|
+
openapi_types.each_pair do |key, type|
|
|
188
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
189
|
+
transformed_hash["#{key}"] = nil
|
|
190
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
191
|
+
# check to ensure the input is an array given that the attribute
|
|
192
|
+
# is documented as an array but the input is not
|
|
193
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
194
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
195
|
+
end
|
|
196
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
197
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
new(transformed_hash)
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Returns the object in the form of hash
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_hash
|
|
206
|
+
hash = {}
|
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
208
|
+
value = self.send(attr)
|
|
209
|
+
if value.nil?
|
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
hash[param] = _to_hash(value)
|
|
215
|
+
end
|
|
216
|
+
hash
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
@@ -0,0 +1,227 @@
|
|
|
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 CreatePost200ResponseTiktokInner < ApiModelBase
|
|
18
|
+
attr_accessor :account_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :can_publish
|
|
21
|
+
|
|
22
|
+
# Whether this account already published a Direct Post today (an account that did can keep publishing). Absent for Creator Inbox drafts and when no per-user limit applies.
|
|
23
|
+
attr_accessor :already_posted_today
|
|
24
|
+
|
|
25
|
+
# Human-readable explanation of the verdict
|
|
26
|
+
attr_accessor :reason
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'account_id' => :'accountId',
|
|
32
|
+
:'can_publish' => :'canPublish',
|
|
33
|
+
:'already_posted_today' => :'alreadyPostedToday',
|
|
34
|
+
:'reason' => :'reason'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns attribute mapping this model knows about
|
|
39
|
+
def self.acceptable_attribute_map
|
|
40
|
+
attribute_map
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
def self.acceptable_attributes
|
|
45
|
+
acceptable_attribute_map.values
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'account_id' => :'String',
|
|
52
|
+
:'can_publish' => :'Boolean',
|
|
53
|
+
:'already_posted_today' => :'Boolean',
|
|
54
|
+
:'reason' => :'String'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List of attributes with nullable: true
|
|
59
|
+
def self.openapi_nullable
|
|
60
|
+
Set.new([
|
|
61
|
+
])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreatePost200ResponseTiktokInner` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreatePost200ResponseTiktokInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'account_id')
|
|
81
|
+
self.account_id = attributes[:'account_id']
|
|
82
|
+
else
|
|
83
|
+
self.account_id = nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'can_publish')
|
|
87
|
+
self.can_publish = attributes[:'can_publish']
|
|
88
|
+
else
|
|
89
|
+
self.can_publish = nil
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'already_posted_today')
|
|
93
|
+
self.already_posted_today = attributes[:'already_posted_today']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'reason')
|
|
97
|
+
self.reason = attributes[:'reason']
|
|
98
|
+
else
|
|
99
|
+
self.reason = nil
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
104
|
+
# @return Array for valid properties with the reasons
|
|
105
|
+
def list_invalid_properties
|
|
106
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
107
|
+
invalid_properties = Array.new
|
|
108
|
+
if @account_id.nil?
|
|
109
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if @can_publish.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "can_publish", can_publish cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @reason.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
invalid_properties
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Check to see if the all the properties in the model are valid
|
|
124
|
+
# @return true if the model is valid
|
|
125
|
+
def valid?
|
|
126
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
|
+
return false if @account_id.nil?
|
|
128
|
+
return false if @can_publish.nil?
|
|
129
|
+
return false if @reason.nil?
|
|
130
|
+
true
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Custom attribute writer method with validation
|
|
134
|
+
# @param [Object] account_id Value to be assigned
|
|
135
|
+
def account_id=(account_id)
|
|
136
|
+
if account_id.nil?
|
|
137
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
@account_id = account_id
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Custom attribute writer method with validation
|
|
144
|
+
# @param [Object] can_publish Value to be assigned
|
|
145
|
+
def can_publish=(can_publish)
|
|
146
|
+
if can_publish.nil?
|
|
147
|
+
fail ArgumentError, 'can_publish cannot be nil'
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
@can_publish = can_publish
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Custom attribute writer method with validation
|
|
154
|
+
# @param [Object] reason Value to be assigned
|
|
155
|
+
def reason=(reason)
|
|
156
|
+
if reason.nil?
|
|
157
|
+
fail ArgumentError, 'reason cannot be nil'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
@reason = reason
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Checks equality by comparing each attribute.
|
|
164
|
+
# @param [Object] Object to be compared
|
|
165
|
+
def ==(o)
|
|
166
|
+
return true if self.equal?(o)
|
|
167
|
+
self.class == o.class &&
|
|
168
|
+
account_id == o.account_id &&
|
|
169
|
+
can_publish == o.can_publish &&
|
|
170
|
+
already_posted_today == o.already_posted_today &&
|
|
171
|
+
reason == o.reason
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# @see the `==` method
|
|
175
|
+
# @param [Object] Object to be compared
|
|
176
|
+
def eql?(o)
|
|
177
|
+
self == o
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Calculates hash code according to all attributes.
|
|
181
|
+
# @return [Integer] Hash code
|
|
182
|
+
def hash
|
|
183
|
+
[account_id, can_publish, already_posted_today, reason].hash
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Builds the object from hash
|
|
187
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
188
|
+
# @return [Object] Returns the model itself
|
|
189
|
+
def self.build_from_hash(attributes)
|
|
190
|
+
return nil unless attributes.is_a?(Hash)
|
|
191
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
192
|
+
transformed_hash = {}
|
|
193
|
+
openapi_types.each_pair do |key, type|
|
|
194
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
195
|
+
transformed_hash["#{key}"] = nil
|
|
196
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
197
|
+
# check to ensure the input is an array given that the attribute
|
|
198
|
+
# is documented as an array but the input is not
|
|
199
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
200
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
201
|
+
end
|
|
202
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
203
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
new(transformed_hash)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Returns the object in the form of hash
|
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
|
211
|
+
def to_hash
|
|
212
|
+
hash = {}
|
|
213
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
214
|
+
value = self.send(attr)
|
|
215
|
+
if value.nil?
|
|
216
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
217
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
hash[param] = _to_hash(value)
|
|
221
|
+
end
|
|
222
|
+
hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
end
|
|
@@ -36,6 +36,9 @@ module Zernio
|
|
|
36
36
|
# When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
|
|
37
37
|
attr_accessor :is_draft
|
|
38
38
|
|
|
39
|
+
# TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`.
|
|
40
|
+
attr_accessor :dry_run
|
|
41
|
+
|
|
39
42
|
# IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.
|
|
40
43
|
attr_accessor :timezone
|
|
41
44
|
|
|
@@ -78,6 +81,7 @@ module Zernio
|
|
|
78
81
|
:'scheduled_for' => :'scheduledFor',
|
|
79
82
|
:'publish_now' => :'publishNow',
|
|
80
83
|
:'is_draft' => :'isDraft',
|
|
84
|
+
:'dry_run' => :'dryRun',
|
|
81
85
|
:'timezone' => :'timezone',
|
|
82
86
|
:'tags' => :'tags',
|
|
83
87
|
:'hashtags' => :'hashtags',
|
|
@@ -112,6 +116,7 @@ module Zernio
|
|
|
112
116
|
:'scheduled_for' => :'Time',
|
|
113
117
|
:'publish_now' => :'Boolean',
|
|
114
118
|
:'is_draft' => :'Boolean',
|
|
119
|
+
:'dry_run' => :'Boolean',
|
|
115
120
|
:'timezone' => :'String',
|
|
116
121
|
:'tags' => :'Array<String>',
|
|
117
122
|
:'hashtags' => :'Array<String>',
|
|
@@ -184,6 +189,12 @@ module Zernio
|
|
|
184
189
|
self.is_draft = false
|
|
185
190
|
end
|
|
186
191
|
|
|
192
|
+
if attributes.key?(:'dry_run')
|
|
193
|
+
self.dry_run = attributes[:'dry_run']
|
|
194
|
+
else
|
|
195
|
+
self.dry_run = false
|
|
196
|
+
end
|
|
197
|
+
|
|
187
198
|
if attributes.key?(:'timezone')
|
|
188
199
|
self.timezone = attributes[:'timezone']
|
|
189
200
|
else
|
|
@@ -268,6 +279,7 @@ module Zernio
|
|
|
268
279
|
scheduled_for == o.scheduled_for &&
|
|
269
280
|
publish_now == o.publish_now &&
|
|
270
281
|
is_draft == o.is_draft &&
|
|
282
|
+
dry_run == o.dry_run &&
|
|
271
283
|
timezone == o.timezone &&
|
|
272
284
|
tags == o.tags &&
|
|
273
285
|
hashtags == o.hashtags &&
|
|
@@ -290,7 +302,7 @@ module Zernio
|
|
|
290
302
|
# Calculates hash code according to all attributes.
|
|
291
303
|
# @return [Integer] Hash code
|
|
292
304
|
def hash
|
|
293
|
-
[title, content, media_items, platforms, scheduled_for, publish_now, is_draft, timezone, tags, hashtags, mentions, crossposting_enabled, metadata, tiktok_settings, facebook_settings, recycling, queued_from_profile, queue_id].hash
|
|
305
|
+
[title, content, media_items, platforms, scheduled_for, publish_now, is_draft, dry_run, timezone, tags, hashtags, mentions, crossposting_enabled, metadata, tiktok_settings, facebook_settings, recycling, queued_from_profile, queue_id].hash
|
|
294
306
|
end
|
|
295
307
|
|
|
296
308
|
# Builds the object from hash
|
|
@@ -226,12 +226,15 @@ module Zernio
|
|
|
226
226
|
# Google only
|
|
227
227
|
attr_accessor :campaign_type
|
|
228
228
|
|
|
229
|
-
# Google Search only.
|
|
229
|
+
# Google Search only. Keywords on the new ad group; entries are strings (BROAD) or { text, matchType }. Editable later via PUT /v1/ads/{adId} targeting.keywords.
|
|
230
230
|
attr_accessor :keywords
|
|
231
231
|
|
|
232
|
-
# Google Search only; other platforms return 400.
|
|
232
|
+
# Google Search only; other platforms return 400. Ad-group-level negative keywords on the new ad group. Editable later via PUT /v1/ads/{adId} targeting.negativeKeywords.
|
|
233
233
|
attr_accessor :negative_keywords
|
|
234
234
|
|
|
235
|
+
# Google Search only; other platforms return 400. Campaign-level negative keywords (campaign_criterion.negative), created alongside the ad group. Editable later via PUT /v1/ads/campaigns/{campaignId}/negative-keywords.
|
|
236
|
+
attr_accessor :campaign_negative_keywords
|
|
237
|
+
|
|
235
238
|
# Google Search RSA only. Extra headlines.
|
|
236
239
|
attr_accessor :additional_headlines
|
|
237
240
|
|
|
@@ -390,6 +393,7 @@ module Zernio
|
|
|
390
393
|
:'campaign_type' => :'campaignType',
|
|
391
394
|
:'keywords' => :'keywords',
|
|
392
395
|
:'negative_keywords' => :'negativeKeywords',
|
|
396
|
+
:'campaign_negative_keywords' => :'campaignNegativeKeywords',
|
|
393
397
|
:'additional_headlines' => :'additionalHeadlines',
|
|
394
398
|
:'additional_descriptions' => :'additionalDescriptions',
|
|
395
399
|
:'sitelinks' => :'sitelinks',
|
|
@@ -500,8 +504,9 @@ module Zernio
|
|
|
500
504
|
:'placement_assets' => :'CreateStandaloneAdRequestPlacementAssets',
|
|
501
505
|
:'audience_id' => :'String',
|
|
502
506
|
:'campaign_type' => :'String',
|
|
503
|
-
:'keywords' => :'Array<
|
|
504
|
-
:'negative_keywords' => :'Array<
|
|
507
|
+
:'keywords' => :'Array<KeywordEntry>',
|
|
508
|
+
:'negative_keywords' => :'Array<KeywordEntry>',
|
|
509
|
+
:'campaign_negative_keywords' => :'Array<KeywordEntry>',
|
|
505
510
|
:'additional_headlines' => :'Array<String>',
|
|
506
511
|
:'additional_descriptions' => :'Array<String>',
|
|
507
512
|
:'sitelinks' => :'Array<CreateStandaloneAdRequestSitelinksInner>',
|
|
@@ -913,6 +918,12 @@ module Zernio
|
|
|
913
918
|
end
|
|
914
919
|
end
|
|
915
920
|
|
|
921
|
+
if attributes.key?(:'campaign_negative_keywords')
|
|
922
|
+
if (value = attributes[:'campaign_negative_keywords']).is_a?(Array)
|
|
923
|
+
self.campaign_negative_keywords = value
|
|
924
|
+
end
|
|
925
|
+
end
|
|
926
|
+
|
|
916
927
|
if attributes.key?(:'additional_headlines')
|
|
917
928
|
if (value = attributes[:'additional_headlines']).is_a?(Array)
|
|
918
929
|
self.additional_headlines = value
|
|
@@ -1125,6 +1136,14 @@ module Zernio
|
|
|
1125
1136
|
invalid_properties.push('invalid value for "keywords", number of items must be less than or equal to 1000.')
|
|
1126
1137
|
end
|
|
1127
1138
|
|
|
1139
|
+
if !@negative_keywords.nil? && @negative_keywords.length > 1000
|
|
1140
|
+
invalid_properties.push('invalid value for "negative_keywords", number of items must be less than or equal to 1000.')
|
|
1141
|
+
end
|
|
1142
|
+
|
|
1143
|
+
if !@campaign_negative_keywords.nil? && @campaign_negative_keywords.length > 1000
|
|
1144
|
+
invalid_properties.push('invalid value for "campaign_negative_keywords", number of items must be less than or equal to 1000.')
|
|
1145
|
+
end
|
|
1146
|
+
|
|
1128
1147
|
if !@sitelinks.nil? && @sitelinks.length > 20
|
|
1129
1148
|
invalid_properties.push('invalid value for "sitelinks", number of items must be less than or equal to 20.')
|
|
1130
1149
|
end
|
|
@@ -1225,6 +1244,8 @@ module Zernio
|
|
|
1225
1244
|
campaign_type_validator = EnumAttributeValidator.new('String', ["display", "search"])
|
|
1226
1245
|
return false unless campaign_type_validator.valid?(@campaign_type)
|
|
1227
1246
|
return false if !@keywords.nil? && @keywords.length > 1000
|
|
1247
|
+
return false if !@negative_keywords.nil? && @negative_keywords.length > 1000
|
|
1248
|
+
return false if !@campaign_negative_keywords.nil? && @campaign_negative_keywords.length > 1000
|
|
1228
1249
|
return false if !@sitelinks.nil? && @sitelinks.length > 20
|
|
1229
1250
|
return false if !@sitelinks.nil? && @sitelinks.length < 2
|
|
1230
1251
|
return false if !@callouts.nil? && @callouts.length > 20
|
|
@@ -1635,6 +1656,34 @@ module Zernio
|
|
|
1635
1656
|
@keywords = keywords
|
|
1636
1657
|
end
|
|
1637
1658
|
|
|
1659
|
+
# Custom attribute writer method with validation
|
|
1660
|
+
# @param [Object] negative_keywords Value to be assigned
|
|
1661
|
+
def negative_keywords=(negative_keywords)
|
|
1662
|
+
if negative_keywords.nil?
|
|
1663
|
+
fail ArgumentError, 'negative_keywords cannot be nil'
|
|
1664
|
+
end
|
|
1665
|
+
|
|
1666
|
+
if negative_keywords.length > 1000
|
|
1667
|
+
fail ArgumentError, 'invalid value for "negative_keywords", number of items must be less than or equal to 1000.'
|
|
1668
|
+
end
|
|
1669
|
+
|
|
1670
|
+
@negative_keywords = negative_keywords
|
|
1671
|
+
end
|
|
1672
|
+
|
|
1673
|
+
# Custom attribute writer method with validation
|
|
1674
|
+
# @param [Object] campaign_negative_keywords Value to be assigned
|
|
1675
|
+
def campaign_negative_keywords=(campaign_negative_keywords)
|
|
1676
|
+
if campaign_negative_keywords.nil?
|
|
1677
|
+
fail ArgumentError, 'campaign_negative_keywords cannot be nil'
|
|
1678
|
+
end
|
|
1679
|
+
|
|
1680
|
+
if campaign_negative_keywords.length > 1000
|
|
1681
|
+
fail ArgumentError, 'invalid value for "campaign_negative_keywords", number of items must be less than or equal to 1000.'
|
|
1682
|
+
end
|
|
1683
|
+
|
|
1684
|
+
@campaign_negative_keywords = campaign_negative_keywords
|
|
1685
|
+
end
|
|
1686
|
+
|
|
1638
1687
|
# Custom attribute writer method with validation
|
|
1639
1688
|
# @param [Object] sitelinks Value to be assigned
|
|
1640
1689
|
def sitelinks=(sitelinks)
|
|
@@ -1861,6 +1910,7 @@ module Zernio
|
|
|
1861
1910
|
campaign_type == o.campaign_type &&
|
|
1862
1911
|
keywords == o.keywords &&
|
|
1863
1912
|
negative_keywords == o.negative_keywords &&
|
|
1913
|
+
campaign_negative_keywords == o.campaign_negative_keywords &&
|
|
1864
1914
|
additional_headlines == o.additional_headlines &&
|
|
1865
1915
|
additional_descriptions == o.additional_descriptions &&
|
|
1866
1916
|
sitelinks == o.sitelinks &&
|
|
@@ -1892,7 +1942,7 @@ module Zernio
|
|
|
1892
1942
|
# Calculates hash code according to all attributes.
|
|
1893
1943
|
# @return [Integer] Hash code
|
|
1894
1944
|
def hash
|
|
1895
|
-
[account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, bodies, headlines, descriptions, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, work_positions, work_employers, work_industries, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, promoted_object].hash
|
|
1945
|
+
[account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, bodies, headlines, descriptions, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, work_positions, work_employers, work_industries, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, negative_keywords, campaign_negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, promoted_object].hash
|
|
1896
1946
|
end
|
|
1897
1947
|
|
|
1898
1948
|
# Builds the object from hash
|