late-sdk 0.0.543 → 0.0.545
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 +53 -4
- data/docs/AdAudiencesApi.md +5 -5
- data/docs/AdCampaignsApi.md +142 -0
- data/docs/AdsApi.md +795 -37
- data/docs/CreateAdCampaign201Response.md +24 -0
- data/docs/CreateAdCampaignRequest.md +32 -0
- data/docs/CreateAdCreative201Response.md +20 -0
- data/docs/CreateAdCreativeRequest.md +40 -0
- data/docs/CreateAdCreativeRequestCarouselCardsInner.md +26 -0
- data/docs/CreateSmsSenderId200Response.md +22 -0
- data/docs/CreateSmsSenderIdRequest.md +18 -0
- data/docs/CreateStandaloneAd200Response.md +22 -0
- data/docs/CreateStandaloneAd200ResponseResultsInner.md +22 -0
- data/docs/CreateStandaloneAdRequest.md +4 -0
- data/docs/DeleteAdCreative200Response.md +20 -0
- data/docs/DeleteSmsSenderId200Response.md +18 -0
- data/docs/DiscordApi.md +153 -1
- data/docs/{ListDiscordGuildMembers200ResponseDataInner.md → DiscordGuildMember.md} +3 -3
- data/docs/{ListDiscordGuildMembers200ResponseDataInnerUser.md → DiscordGuildMemberUser.md} +2 -2
- data/docs/DuplicateAd200Response.md +22 -0
- data/docs/DuplicateAdRequest.md +28 -0
- data/docs/DuplicateAdSet200Response.md +22 -0
- data/docs/DuplicateAdSetRequest.md +36 -0
- data/docs/GetAdCreative200Response.md +18 -0
- data/docs/GetDiscordGuildMember200Response.md +18 -0
- data/docs/ListAdCreatives200Response.md +22 -0
- data/docs/ListAdImages200Response.md +22 -0
- data/docs/ListAdLabels200Response.md +22 -0
- data/docs/ListDiscordGuildMembers200Response.md +1 -1
- data/docs/ListHighDemandPeriods200Response.md +22 -0
- data/docs/ListMetaBusinesses200Response.md +20 -0
- data/docs/ListSmsSenderIds200Response.md +20 -0
- data/docs/ListSmsSenderIds200ResponseBudget.md +24 -0
- data/docs/ListSmsSenderIds200ResponseBudgetPendingRequest.md +22 -0
- data/docs/ListSmsSenderIds200ResponseSenderIdsInner.md +24 -0
- data/docs/RequestSmsSenderIdLimitIncrease200Response.md +20 -0
- data/docs/RequestSmsSenderIdLimitIncreaseRequest.md +20 -0
- data/docs/SMSApi.md +275 -0
- data/docs/SearchDiscordGuildMembers200Response.md +18 -0
- data/docs/UpdateAdCreative200Response.md +22 -0
- data/docs/UpdateAdCreativeRequest.md +20 -0
- data/docs/WhatsAppApi.md +72 -0
- data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +142 -0
- data/lib/zernio-sdk/api/ads_api.rb +829 -51
- data/lib/zernio-sdk/api/discord_api.rb +174 -2
- data/lib/zernio-sdk/api/sms_api.rb +254 -0
- data/lib/zernio-sdk/api/whats_app_api.rb +70 -0
- data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +210 -0
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +343 -0
- data/lib/zernio-sdk/models/create_ad_creative201_response.rb +157 -0
- data/lib/zernio-sdk/models/create_ad_creative_request.rb +424 -0
- data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +255 -0
- data/lib/zernio-sdk/models/create_sms_sender_id200_response.rb +166 -0
- data/lib/zernio-sdk/models/create_sms_sender_id_request.rb +183 -0
- data/lib/zernio-sdk/models/create_standalone_ad200_response.rb +201 -0
- data/lib/zernio-sdk/models/create_standalone_ad200_response_results_inner.rb +212 -0
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +23 -1
- data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +156 -0
- data/lib/zernio-sdk/models/delete_sms_sender_id200_response.rb +147 -0
- data/lib/zernio-sdk/models/{list_discord_guild_members200_response_data_inner.rb → discord_guild_member.rb} +5 -4
- data/lib/zernio-sdk/models/{list_discord_guild_members200_response_data_inner_user.rb → discord_guild_member_user.rb} +3 -3
- data/lib/zernio-sdk/models/duplicate_ad200_response.rb +200 -0
- data/lib/zernio-sdk/models/duplicate_ad_request.rb +243 -0
- data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +201 -0
- data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +302 -0
- data/lib/zernio-sdk/models/get_ad_creative200_response.rb +148 -0
- data/lib/zernio-sdk/models/get_discord_guild_member200_response.rb +147 -0
- data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_ad_images200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_ad_labels200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_discord_guild_members200_response.rb +1 -1
- data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +168 -0
- data/lib/zernio-sdk/models/list_meta_businesses200_response.rb +158 -0
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response.rb +158 -0
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget.rb +178 -0
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget_pending_request.rb +167 -0
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response_sender_ids_inner.rb +175 -0
- data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase200_response.rb +156 -0
- data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase_request.rb +210 -0
- data/lib/zernio-sdk/models/search_discord_guild_members200_response.rb +149 -0
- data/lib/zernio-sdk/models/update_ad_creative200_response.rb +165 -0
- data/lib/zernio-sdk/models/update_ad_creative_request.rb +200 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +33 -3
- data/openapi.yaml +741 -28
- data/spec/api/ad_audiences_api_spec.rb +2 -2
- data/spec/api/ad_campaigns_api_spec.rb +25 -0
- data/spec/api/ads_api_spec.rb +143 -1
- data/spec/api/discord_api_spec.rb +30 -1
- data/spec/api/sms_api_spec.rb +46 -0
- data/spec/api/whats_app_api_spec.rb +13 -0
- data/spec/models/create_ad_campaign201_response_spec.rb +58 -0
- data/spec/models/create_ad_campaign_request_spec.rb +94 -0
- data/spec/models/create_ad_creative201_response_spec.rb +42 -0
- data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +60 -0
- data/spec/models/create_ad_creative_request_spec.rb +106 -0
- data/spec/models/create_sms_sender_id200_response_spec.rb +48 -0
- data/spec/models/create_sms_sender_id_request_spec.rb +36 -0
- data/spec/models/create_standalone_ad200_response_results_inner_spec.rb +56 -0
- data/spec/models/create_standalone_ad200_response_spec.rb +52 -0
- data/spec/models/create_standalone_ad_request_spec.rb +16 -0
- data/spec/models/delete_ad_creative200_response_spec.rb +42 -0
- data/spec/models/delete_sms_sender_id200_response_spec.rb +36 -0
- data/spec/models/{list_discord_guild_members200_response_data_inner_spec.rb → discord_guild_member_spec.rb} +6 -6
- data/spec/models/{list_discord_guild_members200_response_data_inner_user_spec.rb → discord_guild_member_user_spec.rb} +6 -6
- data/spec/models/duplicate_ad200_response_spec.rb +52 -0
- data/spec/models/duplicate_ad_request_spec.rb +74 -0
- data/spec/models/duplicate_ad_set200_response_spec.rb +52 -0
- data/spec/models/duplicate_ad_set_request_spec.rb +102 -0
- data/spec/models/get_ad_creative200_response_spec.rb +36 -0
- data/spec/models/get_discord_guild_member200_response_spec.rb +36 -0
- data/spec/models/list_ad_creatives200_response_spec.rb +48 -0
- data/spec/models/list_ad_images200_response_spec.rb +48 -0
- data/spec/models/list_ad_labels200_response_spec.rb +48 -0
- data/spec/models/list_high_demand_periods200_response_spec.rb +48 -0
- data/spec/models/list_meta_businesses200_response_spec.rb +42 -0
- data/spec/models/list_sms_sender_ids200_response_budget_pending_request_spec.rb +48 -0
- data/spec/models/list_sms_sender_ids200_response_budget_spec.rb +54 -0
- data/spec/models/list_sms_sender_ids200_response_sender_ids_inner_spec.rb +54 -0
- data/spec/models/list_sms_sender_ids200_response_spec.rb +42 -0
- data/spec/models/request_sms_sender_id_limit_increase200_response_spec.rb +42 -0
- data/spec/models/request_sms_sender_id_limit_increase_request_spec.rb +42 -0
- data/spec/models/search_discord_guild_members200_response_spec.rb +36 -0
- data/spec/models/update_ad_creative200_response_spec.rb +48 -0
- data/spec/models/update_ad_creative_request_spec.rb +42 -0
- data/zernio-sdk-0.0.545.gem +0 -0
- metadata +134 -14
- data/docs/InboxApi.md +0 -79
- data/lib/zernio-sdk/api/inbox_api.rb +0 -92
- data/spec/api/inbox_api_spec.rb +0 -48
- data/zernio-sdk-0.0.543.gem +0 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
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 CreateStandaloneAd200ResponseResultsInner < ApiModelBase
|
|
18
|
+
attr_accessor :node
|
|
19
|
+
|
|
20
|
+
attr_accessor :status
|
|
21
|
+
|
|
22
|
+
# Why the node could not be validated (only on skipped).
|
|
23
|
+
attr_accessor :reason
|
|
24
|
+
|
|
25
|
+
class EnumAttributeValidator
|
|
26
|
+
attr_reader :datatype
|
|
27
|
+
attr_reader :allowable_values
|
|
28
|
+
|
|
29
|
+
def initialize(datatype, allowable_values)
|
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
|
31
|
+
case datatype.to_s
|
|
32
|
+
when /Integer/i
|
|
33
|
+
value.to_i
|
|
34
|
+
when /Float/i
|
|
35
|
+
value.to_f
|
|
36
|
+
else
|
|
37
|
+
value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def valid?(value)
|
|
43
|
+
!value || allowable_values.include?(value)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'node' => :'node',
|
|
51
|
+
:'status' => :'status',
|
|
52
|
+
:'reason' => :'reason'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns attribute mapping this model knows about
|
|
57
|
+
def self.acceptable_attribute_map
|
|
58
|
+
attribute_map
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns all the JSON keys this model knows about
|
|
62
|
+
def self.acceptable_attributes
|
|
63
|
+
acceptable_attribute_map.values
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Attribute type mapping.
|
|
67
|
+
def self.openapi_types
|
|
68
|
+
{
|
|
69
|
+
:'node' => :'String',
|
|
70
|
+
:'status' => :'String',
|
|
71
|
+
:'reason' => :'String'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
])
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateStandaloneAd200ResponseResultsInner` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
90
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
91
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateStandaloneAd200ResponseResultsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
93
|
+
end
|
|
94
|
+
h[k.to_sym] = v
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'node')
|
|
98
|
+
self.node = attributes[:'node']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'status')
|
|
102
|
+
self.status = attributes[:'status']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'reason')
|
|
106
|
+
self.reason = attributes[:'reason']
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
111
|
+
# @return Array for valid properties with the reasons
|
|
112
|
+
def list_invalid_properties
|
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
114
|
+
invalid_properties = Array.new
|
|
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
|
+
node_validator = EnumAttributeValidator.new('String', ["campaign", "adSet", "creative", "ad"])
|
|
123
|
+
return false unless node_validator.valid?(@node)
|
|
124
|
+
status_validator = EnumAttributeValidator.new('String', ["validated", "skipped"])
|
|
125
|
+
return false unless status_validator.valid?(@status)
|
|
126
|
+
true
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
130
|
+
# @param [Object] node Object to be assigned
|
|
131
|
+
def node=(node)
|
|
132
|
+
validator = EnumAttributeValidator.new('String', ["campaign", "adSet", "creative", "ad"])
|
|
133
|
+
unless validator.valid?(node)
|
|
134
|
+
fail ArgumentError, "invalid value for \"node\", must be one of #{validator.allowable_values}."
|
|
135
|
+
end
|
|
136
|
+
@node = node
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
140
|
+
# @param [Object] status Object to be assigned
|
|
141
|
+
def status=(status)
|
|
142
|
+
validator = EnumAttributeValidator.new('String', ["validated", "skipped"])
|
|
143
|
+
unless validator.valid?(status)
|
|
144
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
145
|
+
end
|
|
146
|
+
@status = status
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Checks equality by comparing each attribute.
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def ==(o)
|
|
152
|
+
return true if self.equal?(o)
|
|
153
|
+
self.class == o.class &&
|
|
154
|
+
node == o.node &&
|
|
155
|
+
status == o.status &&
|
|
156
|
+
reason == o.reason
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# @see the `==` method
|
|
160
|
+
# @param [Object] Object to be compared
|
|
161
|
+
def eql?(o)
|
|
162
|
+
self == o
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Calculates hash code according to all attributes.
|
|
166
|
+
# @return [Integer] Hash code
|
|
167
|
+
def hash
|
|
168
|
+
[node, status, reason].hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Builds the object from hash
|
|
172
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
173
|
+
# @return [Object] Returns the model itself
|
|
174
|
+
def self.build_from_hash(attributes)
|
|
175
|
+
return nil unless attributes.is_a?(Hash)
|
|
176
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
177
|
+
transformed_hash = {}
|
|
178
|
+
openapi_types.each_pair do |key, type|
|
|
179
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
180
|
+
transformed_hash["#{key}"] = nil
|
|
181
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
182
|
+
# check to ensure the input is an array given that the attribute
|
|
183
|
+
# is documented as an array but the input is not
|
|
184
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
185
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
186
|
+
end
|
|
187
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
new(transformed_hash)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
end
|
|
@@ -47,6 +47,12 @@ module Zernio
|
|
|
47
47
|
# Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id — pass that one). Requires buyingType RESERVED.
|
|
48
48
|
attr_accessor :rf_prediction_id
|
|
49
49
|
|
|
50
|
+
# Meta only. Advantage+ creative enhancements: a partial map of Meta creative feature keys (snake_case, e.g. enhance_cta, image_brightness_and_contrast, text_optimizations) to enroll status, forwarded as degrees_of_freedom_spec.creative_features_spec. Meta validates the keys; unspecified features default to OPT_OUT. The legacy standard_enhancements bundle is deprecated by Meta and rejected.
|
|
51
|
+
attr_accessor :creative_features
|
|
52
|
+
|
|
53
|
+
# Meta only, single standalone shape only (no creatives[], adSetId, or RESERVED). Dry-run: each node runs Meta's execution_options validate_only and NOTHING is created or persisted. Children need real parents, so a fresh tree validates the campaign + creative (the ad set needs its campaign to exist — pass existingCampaignId to validate it too; the ad itself is never validatable pre-create). A Meta validation failure returns the 400 verbatim; success returns 200 with per-node results instead of an ad.
|
|
54
|
+
attr_accessor :validate_only
|
|
55
|
+
|
|
50
56
|
# Required on legacy + multi-creative shapes. Inherited on attach.
|
|
51
57
|
attr_accessor :budget_amount
|
|
52
58
|
|
|
@@ -259,6 +265,8 @@ module Zernio
|
|
|
259
265
|
:'billing_event' => :'billingEvent',
|
|
260
266
|
:'buying_type' => :'buyingType',
|
|
261
267
|
:'rf_prediction_id' => :'rfPredictionId',
|
|
268
|
+
:'creative_features' => :'creativeFeatures',
|
|
269
|
+
:'validate_only' => :'validateOnly',
|
|
262
270
|
:'budget_amount' => :'budgetAmount',
|
|
263
271
|
:'budget_type' => :'budgetType',
|
|
264
272
|
:'status' => :'status',
|
|
@@ -349,6 +357,8 @@ module Zernio
|
|
|
349
357
|
:'billing_event' => :'String',
|
|
350
358
|
:'buying_type' => :'String',
|
|
351
359
|
:'rf_prediction_id' => :'String',
|
|
360
|
+
:'creative_features' => :'Hash<String, String>',
|
|
361
|
+
:'validate_only' => :'Boolean',
|
|
352
362
|
:'budget_amount' => :'Float',
|
|
353
363
|
:'budget_type' => :'String',
|
|
354
364
|
:'status' => :'String',
|
|
@@ -490,6 +500,16 @@ module Zernio
|
|
|
490
500
|
self.rf_prediction_id = attributes[:'rf_prediction_id']
|
|
491
501
|
end
|
|
492
502
|
|
|
503
|
+
if attributes.key?(:'creative_features')
|
|
504
|
+
if (value = attributes[:'creative_features']).is_a?(Hash)
|
|
505
|
+
self.creative_features = value
|
|
506
|
+
end
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
if attributes.key?(:'validate_only')
|
|
510
|
+
self.validate_only = attributes[:'validate_only']
|
|
511
|
+
end
|
|
512
|
+
|
|
493
513
|
if attributes.key?(:'budget_amount')
|
|
494
514
|
self.budget_amount = attributes[:'budget_amount']
|
|
495
515
|
end
|
|
@@ -1280,6 +1300,8 @@ module Zernio
|
|
|
1280
1300
|
billing_event == o.billing_event &&
|
|
1281
1301
|
buying_type == o.buying_type &&
|
|
1282
1302
|
rf_prediction_id == o.rf_prediction_id &&
|
|
1303
|
+
creative_features == o.creative_features &&
|
|
1304
|
+
validate_only == o.validate_only &&
|
|
1283
1305
|
budget_amount == o.budget_amount &&
|
|
1284
1306
|
budget_type == o.budget_type &&
|
|
1285
1307
|
status == o.status &&
|
|
@@ -1353,7 +1375,7 @@ module Zernio
|
|
|
1353
1375
|
# Calculates hash code according to all attributes.
|
|
1354
1376
|
# @return [Integer] Hash code
|
|
1355
1377
|
def hash
|
|
1356
|
-
[account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, budget_amount, budget_type, status, budget_level, currency, headline, long_headline, body, description, 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, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, placement_assets, audience_id, campaign_type, keywords, additional_headlines, additional_descriptions, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, promoted_object].hash
|
|
1378
|
+
[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, validate_only, budget_amount, budget_type, status, budget_level, currency, headline, long_headline, body, description, 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, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, placement_assets, audience_id, campaign_type, keywords, additional_headlines, additional_descriptions, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, promoted_object].hash
|
|
1357
1379
|
end
|
|
1358
1380
|
|
|
1359
1381
|
# Builds the object from hash
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
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 DeleteAdCreative200Response < ApiModelBase
|
|
18
|
+
attr_accessor :creative_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'creative_id' => :'creativeId',
|
|
26
|
+
:'message' => :'message'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'creative_id' => :'String',
|
|
44
|
+
:'message' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DeleteAdCreative200Response` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DeleteAdCreative200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'creative_id')
|
|
71
|
+
self.creative_id = attributes[:'creative_id']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'message')
|
|
75
|
+
self.message = attributes[:'message']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
creative_id == o.creative_id &&
|
|
100
|
+
message == o.message
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[creative_id, message].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
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 DeleteSmsSenderId200Response < ApiModelBase
|
|
18
|
+
attr_accessor :deleted
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'deleted' => :'deleted'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'deleted' => :'Boolean'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DeleteSmsSenderId200Response` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DeleteSmsSenderId200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'deleted')
|
|
67
|
+
self.deleted = attributes[:'deleted']
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
72
|
+
# @return Array for valid properties with the reasons
|
|
73
|
+
def list_invalid_properties
|
|
74
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
75
|
+
invalid_properties = Array.new
|
|
76
|
+
invalid_properties
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
def valid?
|
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
+
true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checks equality by comparing each attribute.
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def ==(o)
|
|
89
|
+
return true if self.equal?(o)
|
|
90
|
+
self.class == o.class &&
|
|
91
|
+
deleted == o.deleted
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# @see the `==` method
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def eql?(o)
|
|
97
|
+
self == o
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Calculates hash code according to all attributes.
|
|
101
|
+
# @return [Integer] Hash code
|
|
102
|
+
def hash
|
|
103
|
+
[deleted].hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Builds the object from hash
|
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
+
# @return [Object] Returns the model itself
|
|
109
|
+
def self.build_from_hash(attributes)
|
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
112
|
+
transformed_hash = {}
|
|
113
|
+
openapi_types.each_pair do |key, type|
|
|
114
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
115
|
+
transformed_hash["#{key}"] = nil
|
|
116
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
117
|
+
# check to ensure the input is an array given that the attribute
|
|
118
|
+
# is documented as an array but the input is not
|
|
119
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
120
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
121
|
+
end
|
|
122
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
123
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
new(transformed_hash)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Returns the object in the form of hash
|
|
130
|
+
# @return [Hash] Returns the object in the form of hash
|
|
131
|
+
def to_hash
|
|
132
|
+
hash = {}
|
|
133
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
134
|
+
value = self.send(attr)
|
|
135
|
+
if value.nil?
|
|
136
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
137
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
hash[param] = _to_hash(value)
|
|
141
|
+
end
|
|
142
|
+
hash
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|
|
@@ -14,7 +14,8 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
|
|
17
|
+
# A Discord guild member, returned verbatim from Discord's API.
|
|
18
|
+
class DiscordGuildMember < ApiModelBase
|
|
18
19
|
attr_accessor :user
|
|
19
20
|
|
|
20
21
|
# Guild-specific nickname
|
|
@@ -52,7 +53,7 @@ module Zernio
|
|
|
52
53
|
# Attribute type mapping.
|
|
53
54
|
def self.openapi_types
|
|
54
55
|
{
|
|
55
|
-
:'user' => :'
|
|
56
|
+
:'user' => :'DiscordGuildMemberUser',
|
|
56
57
|
:'nick' => :'String',
|
|
57
58
|
:'roles' => :'Array<String>',
|
|
58
59
|
:'joined_at' => :'Time',
|
|
@@ -72,14 +73,14 @@ module Zernio
|
|
|
72
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
74
|
def initialize(attributes = {})
|
|
74
75
|
if (!attributes.is_a?(Hash))
|
|
75
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DiscordGuildMember` initialize method"
|
|
76
77
|
end
|
|
77
78
|
|
|
78
79
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
80
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
80
81
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
82
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DiscordGuildMember`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
83
84
|
end
|
|
84
85
|
h[k.to_sym] = v
|
|
85
86
|
}
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
class
|
|
17
|
+
class DiscordGuildMemberUser < ApiModelBase
|
|
18
18
|
# User snowflake
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
@@ -71,14 +71,14 @@ module Zernio
|
|
|
71
71
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
72
|
def initialize(attributes = {})
|
|
73
73
|
if (!attributes.is_a?(Hash))
|
|
74
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DiscordGuildMemberUser` initialize method"
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
78
78
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
79
79
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
80
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
81
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DiscordGuildMemberUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
82
82
|
end
|
|
83
83
|
h[k.to_sym] = v
|
|
84
84
|
}
|