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,178 @@
|
|
|
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 UpdateAdNegativeKeywordList200Response < ApiModelBase
|
|
18
|
+
attr_accessor :updated
|
|
19
|
+
|
|
20
|
+
# Resolved Google Ads customer id.
|
|
21
|
+
attr_accessor :customer_id
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'updated' => :'updated',
|
|
27
|
+
:'customer_id' => :'customerId'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'updated' => :'Boolean',
|
|
45
|
+
:'customer_id' => :'String'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateAdNegativeKeywordList200Response` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateAdNegativeKeywordList200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'updated')
|
|
72
|
+
self.updated = attributes[:'updated']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'customer_id')
|
|
76
|
+
self.customer_id = attributes[:'customer_id']
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properties with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
pattern = Regexp.new(/^\d+$/)
|
|
86
|
+
if !@customer_id.nil? && @customer_id !~ pattern
|
|
87
|
+
invalid_properties.push("invalid value for \"customer_id\", must conform to the pattern #{pattern}.")
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
invalid_properties
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Check to see if the all the properties in the model are valid
|
|
94
|
+
# @return true if the model is valid
|
|
95
|
+
def valid?
|
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
97
|
+
return false if !@customer_id.nil? && @customer_id !~ Regexp.new(/^\d+$/)
|
|
98
|
+
true
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Custom attribute writer method with validation
|
|
102
|
+
# @param [Object] customer_id Value to be assigned
|
|
103
|
+
def customer_id=(customer_id)
|
|
104
|
+
if customer_id.nil?
|
|
105
|
+
fail ArgumentError, 'customer_id cannot be nil'
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
pattern = Regexp.new(/^\d+$/)
|
|
109
|
+
if customer_id !~ pattern
|
|
110
|
+
fail ArgumentError, "invalid value for \"customer_id\", must conform to the pattern #{pattern}."
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
@customer_id = customer_id
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Checks equality by comparing each attribute.
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def ==(o)
|
|
119
|
+
return true if self.equal?(o)
|
|
120
|
+
self.class == o.class &&
|
|
121
|
+
updated == o.updated &&
|
|
122
|
+
customer_id == o.customer_id
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# @see the `==` method
|
|
126
|
+
# @param [Object] Object to be compared
|
|
127
|
+
def eql?(o)
|
|
128
|
+
self == o
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Calculates hash code according to all attributes.
|
|
132
|
+
# @return [Integer] Hash code
|
|
133
|
+
def hash
|
|
134
|
+
[updated, customer_id].hash
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Builds the object from hash
|
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
139
|
+
# @return [Object] Returns the model itself
|
|
140
|
+
def self.build_from_hash(attributes)
|
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
|
142
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
143
|
+
transformed_hash = {}
|
|
144
|
+
openapi_types.each_pair do |key, type|
|
|
145
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
146
|
+
transformed_hash["#{key}"] = nil
|
|
147
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
148
|
+
# check to ensure the input is an array given that the attribute
|
|
149
|
+
# is documented as an array but the input is not
|
|
150
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
151
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
152
|
+
end
|
|
153
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
154
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
new(transformed_hash)
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Returns the object in the form of hash
|
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
|
162
|
+
def to_hash
|
|
163
|
+
hash = {}
|
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
165
|
+
value = self.send(attr)
|
|
166
|
+
if value.nil?
|
|
167
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
168
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
hash[param] = _to_hash(value)
|
|
172
|
+
end
|
|
173
|
+
hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
end
|
|
@@ -0,0 +1,296 @@
|
|
|
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 UpdateAdNegativeKeywordListRequest < 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
|
+
# Nonempty list name, trimmed before use.
|
|
28
|
+
attr_accessor :name
|
|
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
|
+
:'name' => :'name'
|
|
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
|
+
:'name' => :'String'
|
|
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::UpdateAdNegativeKeywordListRequest` 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::UpdateAdNegativeKeywordListRequest`. 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?(:'name')
|
|
119
|
+
self.name = attributes[:'name']
|
|
120
|
+
else
|
|
121
|
+
self.name = nil
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
126
|
+
# @return Array for valid properties with the reasons
|
|
127
|
+
def list_invalid_properties
|
|
128
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
129
|
+
invalid_properties = Array.new
|
|
130
|
+
if @account_id.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
135
|
+
if @account_id !~ pattern
|
|
136
|
+
invalid_properties.push("invalid value for \"account_id\", must conform to the pattern #{pattern}.")
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
pattern = Regexp.new(/^\d+$/)
|
|
140
|
+
if !@customer_id.nil? && @customer_id !~ pattern
|
|
141
|
+
invalid_properties.push("invalid value for \"customer_id\", must conform to the pattern #{pattern}.")
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if @name.nil?
|
|
145
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if @name.to_s.length > 255
|
|
149
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if @name.to_s.length < 1
|
|
153
|
+
invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
invalid_properties
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Check to see if the all the properties in the model are valid
|
|
160
|
+
# @return true if the model is valid
|
|
161
|
+
def valid?
|
|
162
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
163
|
+
return false if @account_id.nil?
|
|
164
|
+
return false if @account_id !~ Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
165
|
+
return false if !@customer_id.nil? && @customer_id !~ Regexp.new(/^\d+$/)
|
|
166
|
+
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
167
|
+
return false unless platform_validator.valid?(@platform)
|
|
168
|
+
return false if @name.nil?
|
|
169
|
+
return false if @name.to_s.length > 255
|
|
170
|
+
return false if @name.to_s.length < 1
|
|
171
|
+
true
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Custom attribute writer method with validation
|
|
175
|
+
# @param [Object] account_id Value to be assigned
|
|
176
|
+
def account_id=(account_id)
|
|
177
|
+
if account_id.nil?
|
|
178
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
182
|
+
if account_id !~ pattern
|
|
183
|
+
fail ArgumentError, "invalid value for \"account_id\", must conform to the pattern #{pattern}."
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
@account_id = account_id
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Custom attribute writer method with validation
|
|
190
|
+
# @param [Object] customer_id Value to be assigned
|
|
191
|
+
def customer_id=(customer_id)
|
|
192
|
+
if customer_id.nil?
|
|
193
|
+
fail ArgumentError, 'customer_id cannot be nil'
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
pattern = Regexp.new(/^\d+$/)
|
|
197
|
+
if customer_id !~ pattern
|
|
198
|
+
fail ArgumentError, "invalid value for \"customer_id\", must conform to the pattern #{pattern}."
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
@customer_id = customer_id
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
205
|
+
# @param [Object] platform Object to be assigned
|
|
206
|
+
def platform=(platform)
|
|
207
|
+
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
208
|
+
unless validator.valid?(platform)
|
|
209
|
+
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
210
|
+
end
|
|
211
|
+
@platform = platform
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Custom attribute writer method with validation
|
|
215
|
+
# @param [Object] name Value to be assigned
|
|
216
|
+
def name=(name)
|
|
217
|
+
if name.nil?
|
|
218
|
+
fail ArgumentError, 'name cannot be nil'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if name.to_s.length > 255
|
|
222
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if name.to_s.length < 1
|
|
226
|
+
fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
@name = name
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Checks equality by comparing each attribute.
|
|
233
|
+
# @param [Object] Object to be compared
|
|
234
|
+
def ==(o)
|
|
235
|
+
return true if self.equal?(o)
|
|
236
|
+
self.class == o.class &&
|
|
237
|
+
account_id == o.account_id &&
|
|
238
|
+
customer_id == o.customer_id &&
|
|
239
|
+
platform == o.platform &&
|
|
240
|
+
name == o.name
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# @see the `==` method
|
|
244
|
+
# @param [Object] Object to be compared
|
|
245
|
+
def eql?(o)
|
|
246
|
+
self == o
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Calculates hash code according to all attributes.
|
|
250
|
+
# @return [Integer] Hash code
|
|
251
|
+
def hash
|
|
252
|
+
[account_id, customer_id, platform, name].hash
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Builds the object from hash
|
|
256
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
257
|
+
# @return [Object] Returns the model itself
|
|
258
|
+
def self.build_from_hash(attributes)
|
|
259
|
+
return nil unless attributes.is_a?(Hash)
|
|
260
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
261
|
+
transformed_hash = {}
|
|
262
|
+
openapi_types.each_pair do |key, type|
|
|
263
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
264
|
+
transformed_hash["#{key}"] = nil
|
|
265
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
266
|
+
# check to ensure the input is an array given that the attribute
|
|
267
|
+
# is documented as an array but the input is not
|
|
268
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
269
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
270
|
+
end
|
|
271
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
272
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
new(transformed_hash)
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Returns the object in the form of hash
|
|
279
|
+
# @return [Hash] Returns the object in the form of hash
|
|
280
|
+
def to_hash
|
|
281
|
+
hash = {}
|
|
282
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
283
|
+
value = self.send(attr)
|
|
284
|
+
if value.nil?
|
|
285
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
286
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
hash[param] = _to_hash(value)
|
|
290
|
+
end
|
|
291
|
+
hash
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -27,10 +27,10 @@ require 'zernio-sdk/models/activate_workflow200_response_workflow'
|
|
|
27
27
|
require 'zernio-sdk/models/ad'
|
|
28
28
|
require 'zernio-sdk/models/ad_analytics_response'
|
|
29
29
|
require 'zernio-sdk/models/ad_analytics_response_ad'
|
|
30
|
+
require 'zernio-sdk/models/ad_analytics_response_analytics'
|
|
30
31
|
require 'zernio-sdk/models/ad_budget'
|
|
31
32
|
require 'zernio-sdk/models/ad_campaign'
|
|
32
33
|
require 'zernio-sdk/models/ad_campaign_budget'
|
|
33
|
-
require 'zernio-sdk/models/ad_campaign_campaign_budget'
|
|
34
34
|
require 'zernio-sdk/models/ad_creative'
|
|
35
35
|
require 'zernio-sdk/models/ad_daily_metrics'
|
|
36
36
|
require 'zernio-sdk/models/ad_engagement_counts'
|
|
@@ -38,6 +38,8 @@ require 'zernio-sdk/models/ad_funnel_counts'
|
|
|
38
38
|
require 'zernio-sdk/models/ad_keyword'
|
|
39
39
|
require 'zernio-sdk/models/ad_keyword_metrics'
|
|
40
40
|
require 'zernio-sdk/models/ad_metrics'
|
|
41
|
+
require 'zernio-sdk/models/ad_negative_keyword_list'
|
|
42
|
+
require 'zernio-sdk/models/ad_negative_keyword_list_keyword'
|
|
41
43
|
require 'zernio-sdk/models/ad_promoted_object'
|
|
42
44
|
require 'zernio-sdk/models/ad_review_status'
|
|
43
45
|
require 'zernio-sdk/models/ad_schedule'
|
|
@@ -189,6 +191,8 @@ require 'zernio-sdk/models/call_record_transcript_inner'
|
|
|
189
191
|
require 'zernio-sdk/models/campaign_analytics_response'
|
|
190
192
|
require 'zernio-sdk/models/campaign_analytics_response_analytics'
|
|
191
193
|
require 'zernio-sdk/models/campaign_analytics_response_analytics_daily_inner'
|
|
194
|
+
require 'zernio-sdk/models/campaign_analytics_response_analytics_impression_share_cache'
|
|
195
|
+
require 'zernio-sdk/models/campaign_analytics_response_analytics_summary'
|
|
192
196
|
require 'zernio-sdk/models/campaign_analytics_response_campaign'
|
|
193
197
|
require 'zernio-sdk/models/campaign_bidding'
|
|
194
198
|
require 'zernio-sdk/models/campaign_bidding_bid_spec'
|
|
@@ -259,6 +263,8 @@ require 'zernio-sdk/models/create_ad_insights_report202_response'
|
|
|
259
263
|
require 'zernio-sdk/models/create_ad_insights_report_request'
|
|
260
264
|
require 'zernio-sdk/models/create_ad_insights_report_request_filtering_inner'
|
|
261
265
|
require 'zernio-sdk/models/create_ad_insights_report_request_time_increment'
|
|
266
|
+
require 'zernio-sdk/models/create_ad_negative_keyword_list201_response'
|
|
267
|
+
require 'zernio-sdk/models/create_ad_negative_keyword_list_request'
|
|
262
268
|
require 'zernio-sdk/models/create_ad_set201_response'
|
|
263
269
|
require 'zernio-sdk/models/create_ad_set_request'
|
|
264
270
|
require 'zernio-sdk/models/create_api_key201_response'
|
|
@@ -447,6 +453,7 @@ require 'zernio-sdk/models/delete_account_group200_response'
|
|
|
447
453
|
require 'zernio-sdk/models/delete_ad_campaign200_response'
|
|
448
454
|
require 'zernio-sdk/models/delete_ad_campaign_request'
|
|
449
455
|
require 'zernio-sdk/models/delete_ad_creative200_response'
|
|
456
|
+
require 'zernio-sdk/models/delete_ad_negative_keyword_list200_response'
|
|
450
457
|
require 'zernio-sdk/models/delete_ad_set200_response'
|
|
451
458
|
require 'zernio-sdk/models/delete_ad_video200_response'
|
|
452
459
|
require 'zernio-sdk/models/delete_discord_scheduled_event200_response'
|
|
@@ -576,6 +583,8 @@ require 'zernio-sdk/models/get_ad_insights_report200_response'
|
|
|
576
583
|
require 'zernio-sdk/models/get_ad_insights_report200_response_paging'
|
|
577
584
|
require 'zernio-sdk/models/get_ad_media200_response'
|
|
578
585
|
require 'zernio-sdk/models/get_ad_media200_response_media_inner'
|
|
586
|
+
require 'zernio-sdk/models/get_ad_negative_keyword_list200_response'
|
|
587
|
+
require 'zernio-sdk/models/get_ad_negative_keyword_list200_response_list'
|
|
579
588
|
require 'zernio-sdk/models/get_ad_previews200_response'
|
|
580
589
|
require 'zernio-sdk/models/get_ad_set_details200_response'
|
|
581
590
|
require 'zernio-sdk/models/get_ad_tracking_tags200_response'
|
|
@@ -995,6 +1004,7 @@ require 'zernio-sdk/models/list_ad_creatives200_response'
|
|
|
995
1004
|
require 'zernio-sdk/models/list_ad_images200_response'
|
|
996
1005
|
require 'zernio-sdk/models/list_ad_keywords200_response'
|
|
997
1006
|
require 'zernio-sdk/models/list_ad_labels200_response'
|
|
1007
|
+
require 'zernio-sdk/models/list_ad_negative_keyword_lists200_response'
|
|
998
1008
|
require 'zernio-sdk/models/list_ad_sets200_response'
|
|
999
1009
|
require 'zernio-sdk/models/list_ad_sets200_response_ad_sets_inner'
|
|
1000
1010
|
require 'zernio-sdk/models/list_ad_studies200_response'
|
|
@@ -1292,6 +1302,9 @@ require 'zernio-sdk/models/remove_whats_app_group_participants_request'
|
|
|
1292
1302
|
require 'zernio-sdk/models/replace_ad_audience_companies200_response'
|
|
1293
1303
|
require 'zernio-sdk/models/replace_ad_audience_companies_request'
|
|
1294
1304
|
require 'zernio-sdk/models/replace_ad_audience_companies_request_companies_inner'
|
|
1305
|
+
require 'zernio-sdk/models/replace_ad_negative_keyword_list_keywords200_response'
|
|
1306
|
+
require 'zernio-sdk/models/replace_ad_negative_keyword_list_keywords_request'
|
|
1307
|
+
require 'zernio-sdk/models/replace_campaign_negative_keyword_lists_request'
|
|
1295
1308
|
require 'zernio-sdk/models/replace_campaign_negative_keywords200_response'
|
|
1296
1309
|
require 'zernio-sdk/models/replace_campaign_negative_keywords_request'
|
|
1297
1310
|
require 'zernio-sdk/models/reply_to_google_business_review200_response'
|
|
@@ -1569,6 +1582,8 @@ require 'zernio-sdk/models/update_ad_creative200_response'
|
|
|
1569
1582
|
require 'zernio-sdk/models/update_ad_creative_request'
|
|
1570
1583
|
require 'zernio-sdk/models/update_ad_keyword200_response'
|
|
1571
1584
|
require 'zernio-sdk/models/update_ad_keyword_request'
|
|
1585
|
+
require 'zernio-sdk/models/update_ad_negative_keyword_list200_response'
|
|
1586
|
+
require 'zernio-sdk/models/update_ad_negative_keyword_list_request'
|
|
1572
1587
|
require 'zernio-sdk/models/update_ad_request'
|
|
1573
1588
|
require 'zernio-sdk/models/update_ad_request_budget'
|
|
1574
1589
|
require 'zernio-sdk/models/update_ad_request_creative'
|