late-sdk 0.0.672 → 0.0.674
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 +2 -1
- data/docs/ApiKey.md +3 -1
- data/docs/ConnectedAppsApi.md +2 -2
- data/docs/CreateApiKeyRequest.md +3 -1
- data/docs/InlineObject2.md +5 -11
- data/docs/InlineObject3.md +28 -0
- data/docs/{InlineObject2Details.md → InlineObject3Details.md} +2 -2
- data/docs/InvitesApi.md +1 -1
- data/docs/PlatformTarget.md +2 -0
- data/docs/WebhooksApi.md +3 -3
- data/lib/zernio-sdk/api/connected_apps_api.rb +4 -4
- data/lib/zernio-sdk/api/invites_api.rb +2 -2
- data/lib/zernio-sdk/api/webhooks_api.rb +6 -6
- data/lib/zernio-sdk/models/api_key.rb +16 -4
- data/lib/zernio-sdk/models/create_api_key_request.rb +16 -4
- data/lib/zernio-sdk/models/inline_object2.rb +18 -80
- data/lib/zernio-sdk/models/inline_object3.rb +274 -0
- data/lib/zernio-sdk/models/{inline_object2_details.rb → inline_object3_details.rb} +3 -3
- data/lib/zernio-sdk/models/platform_target.rb +12 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +2 -1
- data/openapi.yaml +650 -27
- data/spec/api/connected_apps_api_spec.rb +2 -2
- data/spec/api/invites_api_spec.rb +1 -1
- data/spec/api/webhooks_api_spec.rb +3 -3
- data/spec/models/api_key_spec.rb +10 -0
- data/spec/models/create_api_key_request_spec.rb +10 -0
- data/spec/models/inline_object2_spec.rb +4 -22
- data/spec/models/{inline_object2_details_spec.rb → inline_object3_details_spec.rb} +6 -6
- data/spec/models/inline_object3_spec.rb +74 -0
- data/spec/models/platform_target_spec.rb +6 -0
- data/zernio-sdk-0.0.674.gem +0 -0
- metadata +10 -6
- data/zernio-sdk-0.0.672.gem +0 -0
|
@@ -0,0 +1,274 @@
|
|
|
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 InlineObject3 < ApiModelBase
|
|
18
|
+
# Human-readable error message suitable for end-user display.
|
|
19
|
+
attr_accessor :error
|
|
20
|
+
|
|
21
|
+
# Machine-readable error code. Stable across versions.
|
|
22
|
+
attr_accessor :code
|
|
23
|
+
|
|
24
|
+
# Discriminator for which gate fired.
|
|
25
|
+
attr_accessor :reason
|
|
26
|
+
|
|
27
|
+
# Link to the relevant documentation page.
|
|
28
|
+
attr_accessor :documentation_url
|
|
29
|
+
|
|
30
|
+
# Deep-link to send the end-user to. For `free_tier_exceeded` and `twitter_passthrough` this is the Zernio billing tab. For `enterprise_required` this is the Zernio enterprise contact page.
|
|
31
|
+
attr_accessor :dashboard_url
|
|
32
|
+
|
|
33
|
+
attr_accessor :details
|
|
34
|
+
|
|
35
|
+
class EnumAttributeValidator
|
|
36
|
+
attr_reader :datatype
|
|
37
|
+
attr_reader :allowable_values
|
|
38
|
+
|
|
39
|
+
def initialize(datatype, allowable_values)
|
|
40
|
+
@allowable_values = allowable_values.map do |value|
|
|
41
|
+
case datatype.to_s
|
|
42
|
+
when /Integer/i
|
|
43
|
+
value.to_i
|
|
44
|
+
when /Float/i
|
|
45
|
+
value.to_f
|
|
46
|
+
else
|
|
47
|
+
value
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def valid?(value)
|
|
53
|
+
!value || allowable_values.include?(value)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
|
+
def self.attribute_map
|
|
59
|
+
{
|
|
60
|
+
:'error' => :'error',
|
|
61
|
+
:'code' => :'code',
|
|
62
|
+
:'reason' => :'reason',
|
|
63
|
+
:'documentation_url' => :'documentation_url',
|
|
64
|
+
:'dashboard_url' => :'dashboard_url',
|
|
65
|
+
:'details' => :'details'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns attribute mapping this model knows about
|
|
70
|
+
def self.acceptable_attribute_map
|
|
71
|
+
attribute_map
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Returns all the JSON keys this model knows about
|
|
75
|
+
def self.acceptable_attributes
|
|
76
|
+
acceptable_attribute_map.values
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Attribute type mapping.
|
|
80
|
+
def self.openapi_types
|
|
81
|
+
{
|
|
82
|
+
:'error' => :'String',
|
|
83
|
+
:'code' => :'String',
|
|
84
|
+
:'reason' => :'String',
|
|
85
|
+
:'documentation_url' => :'String',
|
|
86
|
+
:'dashboard_url' => :'String',
|
|
87
|
+
:'details' => :'InlineObject3Details'
|
|
88
|
+
}
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# List of attributes with nullable: true
|
|
92
|
+
def self.openapi_nullable
|
|
93
|
+
Set.new([
|
|
94
|
+
])
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Initializes the object
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
def initialize(attributes = {})
|
|
100
|
+
if (!attributes.is_a?(Hash))
|
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::InlineObject3` initialize method"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::InlineObject3`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
109
|
+
end
|
|
110
|
+
h[k.to_sym] = v
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'error')
|
|
114
|
+
self.error = attributes[:'error']
|
|
115
|
+
else
|
|
116
|
+
self.error = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'code')
|
|
120
|
+
self.code = attributes[:'code']
|
|
121
|
+
else
|
|
122
|
+
self.code = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'reason')
|
|
126
|
+
self.reason = attributes[:'reason']
|
|
127
|
+
else
|
|
128
|
+
self.reason = nil
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'documentation_url')
|
|
132
|
+
self.documentation_url = attributes[:'documentation_url']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'dashboard_url')
|
|
136
|
+
self.dashboard_url = attributes[:'dashboard_url']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'details')
|
|
140
|
+
self.details = attributes[:'details']
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
145
|
+
# @return Array for valid properties with the reasons
|
|
146
|
+
def list_invalid_properties
|
|
147
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
148
|
+
invalid_properties = Array.new
|
|
149
|
+
if @error.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "error", error cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if @code.nil?
|
|
154
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if @reason.nil?
|
|
158
|
+
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
invalid_properties
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Check to see if the all the properties in the model are valid
|
|
165
|
+
# @return true if the model is valid
|
|
166
|
+
def valid?
|
|
167
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
168
|
+
return false if @error.nil?
|
|
169
|
+
return false if @code.nil?
|
|
170
|
+
code_validator = EnumAttributeValidator.new('String', ["PAYMENT_REQUIRED"])
|
|
171
|
+
return false unless code_validator.valid?(@code)
|
|
172
|
+
return false if @reason.nil?
|
|
173
|
+
reason_validator = EnumAttributeValidator.new('String', ["free_tier_exceeded", "twitter_passthrough", "enterprise_required"])
|
|
174
|
+
return false unless reason_validator.valid?(@reason)
|
|
175
|
+
true
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Custom attribute writer method with validation
|
|
179
|
+
# @param [Object] error Value to be assigned
|
|
180
|
+
def error=(error)
|
|
181
|
+
if error.nil?
|
|
182
|
+
fail ArgumentError, 'error cannot be nil'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@error = error
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
189
|
+
# @param [Object] code Object to be assigned
|
|
190
|
+
def code=(code)
|
|
191
|
+
validator = EnumAttributeValidator.new('String', ["PAYMENT_REQUIRED"])
|
|
192
|
+
unless validator.valid?(code)
|
|
193
|
+
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
194
|
+
end
|
|
195
|
+
@code = code
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
199
|
+
# @param [Object] reason Object to be assigned
|
|
200
|
+
def reason=(reason)
|
|
201
|
+
validator = EnumAttributeValidator.new('String', ["free_tier_exceeded", "twitter_passthrough", "enterprise_required"])
|
|
202
|
+
unless validator.valid?(reason)
|
|
203
|
+
fail ArgumentError, "invalid value for \"reason\", must be one of #{validator.allowable_values}."
|
|
204
|
+
end
|
|
205
|
+
@reason = reason
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Checks equality by comparing each attribute.
|
|
209
|
+
# @param [Object] Object to be compared
|
|
210
|
+
def ==(o)
|
|
211
|
+
return true if self.equal?(o)
|
|
212
|
+
self.class == o.class &&
|
|
213
|
+
error == o.error &&
|
|
214
|
+
code == o.code &&
|
|
215
|
+
reason == o.reason &&
|
|
216
|
+
documentation_url == o.documentation_url &&
|
|
217
|
+
dashboard_url == o.dashboard_url &&
|
|
218
|
+
details == o.details
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# @see the `==` method
|
|
222
|
+
# @param [Object] Object to be compared
|
|
223
|
+
def eql?(o)
|
|
224
|
+
self == o
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Calculates hash code according to all attributes.
|
|
228
|
+
# @return [Integer] Hash code
|
|
229
|
+
def hash
|
|
230
|
+
[error, code, reason, documentation_url, dashboard_url, details].hash
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Builds the object from hash
|
|
234
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
235
|
+
# @return [Object] Returns the model itself
|
|
236
|
+
def self.build_from_hash(attributes)
|
|
237
|
+
return nil unless attributes.is_a?(Hash)
|
|
238
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
239
|
+
transformed_hash = {}
|
|
240
|
+
openapi_types.each_pair do |key, type|
|
|
241
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
242
|
+
transformed_hash["#{key}"] = nil
|
|
243
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
244
|
+
# check to ensure the input is an array given that the attribute
|
|
245
|
+
# is documented as an array but the input is not
|
|
246
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
247
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
248
|
+
end
|
|
249
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
250
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
new(transformed_hash)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Returns the object in the form of hash
|
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
|
258
|
+
def to_hash
|
|
259
|
+
hash = {}
|
|
260
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
261
|
+
value = self.send(attr)
|
|
262
|
+
if value.nil?
|
|
263
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
264
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
hash[param] = _to_hash(value)
|
|
268
|
+
end
|
|
269
|
+
hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
end
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
|
|
18
|
-
class
|
|
18
|
+
class InlineObject3Details < ApiModelBase
|
|
19
19
|
# How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
|
|
20
20
|
attr_accessor :free_tier_account_limit
|
|
21
21
|
|
|
@@ -68,14 +68,14 @@ module Zernio
|
|
|
68
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
69
|
def initialize(attributes = {})
|
|
70
70
|
if (!attributes.is_a?(Hash))
|
|
71
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::InlineObject3Details` initialize method"
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
75
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
76
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
77
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::InlineObject3Details`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
79
|
end
|
|
80
80
|
h[k.to_sym] = v
|
|
81
81
|
}
|
|
@@ -42,6 +42,9 @@ module Zernio
|
|
|
42
42
|
# Timestamp when the post was published to this platform
|
|
43
43
|
attr_accessor :published_at
|
|
44
44
|
|
|
45
|
+
# Set when a post that was successfully published later disappears from the platform (deleted on-platform or taken down by the platform). status stays \"published\" (it reflects the publish outcome); poll this field to detect post-publish removals. Absent while the post is live, and cleared if the post reappears. Detection runs with the analytics sync, so expect up to a few hours of lag.
|
|
46
|
+
attr_accessor :removed_from_platform_at
|
|
47
|
+
|
|
45
48
|
# Present and true only when this Instagram reel was launched as a Trial through Zernio (created with platformSpecificData.trialParams). Use it to segment trial reels in analytics. Note: Instagram's Graph API exposes no readable trial field, so this reflects creation-time intent only. It indicates the reel STARTED as a trial, not whether or when it graduated.
|
|
46
49
|
attr_accessor :is_trial_reel
|
|
47
50
|
|
|
@@ -92,6 +95,7 @@ module Zernio
|
|
|
92
95
|
:'platform_post_id' => :'platformPostId',
|
|
93
96
|
:'platform_post_url' => :'platformPostUrl',
|
|
94
97
|
:'published_at' => :'publishedAt',
|
|
98
|
+
:'removed_from_platform_at' => :'removedFromPlatformAt',
|
|
95
99
|
:'is_trial_reel' => :'isTrialReel',
|
|
96
100
|
:'trial_graduation_strategy' => :'trialGraduationStrategy',
|
|
97
101
|
:'error_message' => :'errorMessage',
|
|
@@ -123,6 +127,7 @@ module Zernio
|
|
|
123
127
|
:'platform_post_id' => :'String',
|
|
124
128
|
:'platform_post_url' => :'String',
|
|
125
129
|
:'published_at' => :'Time',
|
|
130
|
+
:'removed_from_platform_at' => :'Time',
|
|
126
131
|
:'is_trial_reel' => :'Boolean',
|
|
127
132
|
:'trial_graduation_strategy' => :'String',
|
|
128
133
|
:'error_message' => :'String',
|
|
@@ -134,6 +139,7 @@ module Zernio
|
|
|
134
139
|
# List of attributes with nullable: true
|
|
135
140
|
def self.openapi_nullable
|
|
136
141
|
Set.new([
|
|
142
|
+
:'removed_from_platform_at',
|
|
137
143
|
])
|
|
138
144
|
end
|
|
139
145
|
|
|
@@ -195,6 +201,10 @@ module Zernio
|
|
|
195
201
|
self.published_at = attributes[:'published_at']
|
|
196
202
|
end
|
|
197
203
|
|
|
204
|
+
if attributes.key?(:'removed_from_platform_at')
|
|
205
|
+
self.removed_from_platform_at = attributes[:'removed_from_platform_at']
|
|
206
|
+
end
|
|
207
|
+
|
|
198
208
|
if attributes.key?(:'is_trial_reel')
|
|
199
209
|
self.is_trial_reel = attributes[:'is_trial_reel']
|
|
200
210
|
end
|
|
@@ -282,6 +292,7 @@ module Zernio
|
|
|
282
292
|
platform_post_id == o.platform_post_id &&
|
|
283
293
|
platform_post_url == o.platform_post_url &&
|
|
284
294
|
published_at == o.published_at &&
|
|
295
|
+
removed_from_platform_at == o.removed_from_platform_at &&
|
|
285
296
|
is_trial_reel == o.is_trial_reel &&
|
|
286
297
|
trial_graduation_strategy == o.trial_graduation_strategy &&
|
|
287
298
|
error_message == o.error_message &&
|
|
@@ -298,7 +309,7 @@ module Zernio
|
|
|
298
309
|
# Calculates hash code according to all attributes.
|
|
299
310
|
# @return [Integer] Hash code
|
|
300
311
|
def hash
|
|
301
|
-
[platform, account_id, custom_content, custom_media, scheduled_for, platform_specific_data, status, platform_post_id, platform_post_url, published_at, is_trial_reel, trial_graduation_strategy, error_message, error_category, error_source].hash
|
|
312
|
+
[platform, account_id, custom_content, custom_media, scheduled_for, platform_specific_data, status, platform_post_id, platform_post_url, published_at, removed_from_platform_at, is_trial_reel, trial_graduation_strategy, error_message, error_category, error_source].hash
|
|
302
313
|
end
|
|
303
314
|
|
|
304
315
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -768,7 +768,8 @@ require 'zernio-sdk/models/initiate_whats_app_call_request'
|
|
|
768
768
|
require 'zernio-sdk/models/inline_object'
|
|
769
769
|
require 'zernio-sdk/models/inline_object1'
|
|
770
770
|
require 'zernio-sdk/models/inline_object2'
|
|
771
|
-
require 'zernio-sdk/models/
|
|
771
|
+
require 'zernio-sdk/models/inline_object3'
|
|
772
|
+
require 'zernio-sdk/models/inline_object3_details'
|
|
772
773
|
require 'zernio-sdk/models/instagram_account_insights_response'
|
|
773
774
|
require 'zernio-sdk/models/instagram_account_insights_response_date_range'
|
|
774
775
|
require 'zernio-sdk/models/instagram_account_insights_response_metrics_value'
|