late-sdk 0.0.913 → 0.0.915

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.
@@ -177,14 +177,14 @@ module Zernio
177
177
  end
178
178
 
179
179
  # Get post comments
180
- # Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id. Responses are cached for up to 10 minutes, so a page may lag new comments by that window. Do not poll this endpoint for real-time updates: subscribe to the `comment.received` webhook, which delivers new comments as they arrive. Your own writes (creating, replying to, or deleting a comment) refresh the cache immediately.
180
+ # Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id. Responses are cached for up to 10 minutes, so a page may lag new comments by that window. Do not poll this endpoint for real-time updates: subscribe to the `comment.received` webhook, which delivers new comments as they arrive. Your own writes (creating, replying to, or deleting a comment) refresh the cache immediately. TikTok is served for accounts connected through the TikTok for Business app: `postId` is the TikTok video id, each top-level comment carries up to three inline replies, and `commentId` pages the full reply list of one comment. Developer-app TikTok accounts return 400 with code `PLATFORM_LIMITATION`.
181
181
  # @param post_id [String] Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID. On Facebook and Instagram, a comment ID is also accepted here and returns that comment's replies.
182
182
  # @param account_id [String]
183
183
  # @param [Hash] opts the optional parameters
184
184
  # @option opts [String] :subreddit (Reddit only) Subreddit name
185
185
  # @option opts [Integer] :limit Maximum number of comments to return (default to 25)
186
186
  # @option opts [String] :cursor Pagination cursor, returned by a previous call as `pagination.cursor`. This is the platform's own opaque paging value passed through verbatim: never construct, decode or validate it client-side.
187
- # @option opts [String] :comment_id (Reddit only) Get replies to a specific comment
187
+ # @option opts [String] :comment_id (Reddit and TikTok only) Get replies to a specific comment
188
188
  # @return [GetInboxPostComments200Response]
189
189
  def get_inbox_post_comments(post_id, account_id, opts = {})
190
190
  data, _status_code, _headers = get_inbox_post_comments_with_http_info(post_id, account_id, opts)
@@ -192,14 +192,14 @@ module Zernio
192
192
  end
193
193
 
194
194
  # Get post comments
195
- # Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id. Responses are cached for up to 10 minutes, so a page may lag new comments by that window. Do not poll this endpoint for real-time updates: subscribe to the `comment.received` webhook, which delivers new comments as they arrive. Your own writes (creating, replying to, or deleting a comment) refresh the cache immediately.
195
+ # Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id. Responses are cached for up to 10 minutes, so a page may lag new comments by that window. Do not poll this endpoint for real-time updates: subscribe to the `comment.received` webhook, which delivers new comments as they arrive. Your own writes (creating, replying to, or deleting a comment) refresh the cache immediately. TikTok is served for accounts connected through the TikTok for Business app: `postId` is the TikTok video id, each top-level comment carries up to three inline replies, and `commentId` pages the full reply list of one comment. Developer-app TikTok accounts return 400 with code `PLATFORM_LIMITATION`.
196
196
  # @param post_id [String] Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID. On Facebook and Instagram, a comment ID is also accepted here and returns that comment's replies.
197
197
  # @param account_id [String]
198
198
  # @param [Hash] opts the optional parameters
199
199
  # @option opts [String] :subreddit (Reddit only) Subreddit name
200
200
  # @option opts [Integer] :limit Maximum number of comments to return (default to 25)
201
201
  # @option opts [String] :cursor Pagination cursor, returned by a previous call as `pagination.cursor`. This is the platform's own opaque paging value passed through verbatim: never construct, decode or validate it client-side.
202
- # @option opts [String] :comment_id (Reddit only) Get replies to a specific comment
202
+ # @option opts [String] :comment_id (Reddit and TikTok only) Get replies to a specific comment
203
203
  # @return [Array<(GetInboxPostComments200Response, Integer, Hash)>] GetInboxPostComments200Response data, response status code and response headers
204
204
  def get_inbox_post_comments_with_http_info(post_id, account_id, opts = {})
205
205
  if @api_client.config.debugging
@@ -267,7 +267,7 @@ module Zernio
267
267
  end
268
268
 
269
269
  # Hide comment
270
- # Hide a comment on a post. Supported by Facebook, Instagram, Threads, and X. Hidden comments are only visible to the commenter and page admin. For X, the reply must belong to a conversation started by the authenticated user.
270
+ # Hide a comment on a post. Supported by Facebook, Instagram, Threads, X, and TikTok (accounts connected through the TikTok for Business app). Hidden comments are only visible to the commenter and page admin. For X, the reply must belong to a conversation started by the authenticated user.
271
271
  # @param post_id [String]
272
272
  # @param comment_id [String]
273
273
  # @param hide_inbox_comment_request [HideInboxCommentRequest]
@@ -279,7 +279,7 @@ module Zernio
279
279
  end
280
280
 
281
281
  # Hide comment
282
- # Hide a comment on a post. Supported by Facebook, Instagram, Threads, and X. Hidden comments are only visible to the commenter and page admin. For X, the reply must belong to a conversation started by the authenticated user.
282
+ # Hide a comment on a post. Supported by Facebook, Instagram, Threads, X, and TikTok (accounts connected through the TikTok for Business app). Hidden comments are only visible to the commenter and page admin. For X, the reply must belong to a conversation started by the authenticated user.
283
283
  # @param post_id [String]
284
284
  # @param comment_id [String]
285
285
  # @param hide_inbox_comment_request [HideInboxCommentRequest]
@@ -608,6 +608,86 @@ module Zernio
608
608
  return data, status_code, headers
609
609
  end
610
610
 
611
+ # Pin comment
612
+ # Pin a top-level comment to the top of a post's comment section. TikTok accounts connected through the TikTok for Business app only; every other platform returns 400.
613
+ # @param post_id [String]
614
+ # @param comment_id [String]
615
+ # @param pin_inbox_comment_request [PinInboxCommentRequest]
616
+ # @param [Hash] opts the optional parameters
617
+ # @return [PinInboxComment200Response]
618
+ def pin_inbox_comment(post_id, comment_id, pin_inbox_comment_request, opts = {})
619
+ data, _status_code, _headers = pin_inbox_comment_with_http_info(post_id, comment_id, pin_inbox_comment_request, opts)
620
+ data
621
+ end
622
+
623
+ # Pin comment
624
+ # Pin a top-level comment to the top of a post&#39;s comment section. TikTok accounts connected through the TikTok for Business app only; every other platform returns 400.
625
+ # @param post_id [String]
626
+ # @param comment_id [String]
627
+ # @param pin_inbox_comment_request [PinInboxCommentRequest]
628
+ # @param [Hash] opts the optional parameters
629
+ # @return [Array<(PinInboxComment200Response, Integer, Hash)>] PinInboxComment200Response data, response status code and response headers
630
+ def pin_inbox_comment_with_http_info(post_id, comment_id, pin_inbox_comment_request, opts = {})
631
+ if @api_client.config.debugging
632
+ @api_client.config.logger.debug 'Calling API: CommentsApi.pin_inbox_comment ...'
633
+ end
634
+ # verify the required parameter 'post_id' is set
635
+ if @api_client.config.client_side_validation && post_id.nil?
636
+ fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.pin_inbox_comment"
637
+ end
638
+ # verify the required parameter 'comment_id' is set
639
+ if @api_client.config.client_side_validation && comment_id.nil?
640
+ fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.pin_inbox_comment"
641
+ end
642
+ # verify the required parameter 'pin_inbox_comment_request' is set
643
+ if @api_client.config.client_side_validation && pin_inbox_comment_request.nil?
644
+ fail ArgumentError, "Missing the required parameter 'pin_inbox_comment_request' when calling CommentsApi.pin_inbox_comment"
645
+ end
646
+ # resource path
647
+ local_var_path = '/v1/inbox/comments/{postId}/{commentId}/pin'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)).sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s))
648
+
649
+ # query parameters
650
+ query_params = opts[:query_params] || {}
651
+
652
+ # header parameters
653
+ header_params = opts[:header_params] || {}
654
+ # HTTP header 'Accept' (if needed)
655
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
656
+ # HTTP header 'Content-Type'
657
+ content_type = @api_client.select_header_content_type(['application/json'])
658
+ if !content_type.nil?
659
+ header_params['Content-Type'] = content_type
660
+ end
661
+
662
+ # form parameters
663
+ form_params = opts[:form_params] || {}
664
+
665
+ # http body (model)
666
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(pin_inbox_comment_request)
667
+
668
+ # return_type
669
+ return_type = opts[:debug_return_type] || 'PinInboxComment200Response'
670
+
671
+ # auth_names
672
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
673
+
674
+ new_options = opts.merge(
675
+ :operation => :"CommentsApi.pin_inbox_comment",
676
+ :header_params => header_params,
677
+ :query_params => query_params,
678
+ :form_params => form_params,
679
+ :body => post_body,
680
+ :auth_names => auth_names,
681
+ :return_type => return_type
682
+ )
683
+
684
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
685
+ if @api_client.config.debugging
686
+ @api_client.config.logger.debug "API called: CommentsApi#pin_inbox_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
687
+ end
688
+ return data, status_code, headers
689
+ end
690
+
611
691
  # Reply to comment
612
692
  # Post a reply to a post or specific comment. Requires accountId in request body. **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of posting the comment a second time; same key + different body returns 422; a key still in flight returns 409. Keys are retained for 24 hours and are scoped to the credential and to this exact path, so reusing a key against a different postId returns 422 rather than replaying the other post's response. Only successful (2xx) responses are stored for replay. If the request throws or returns a non-2xx status the key is released, so the header protects the \"request succeeded but the response was lost\" case. After an ambiguous failure (a 5xx or a network timeout) list the post's comments before retrying with the same key, and treat an empty result as inconclusive rather than as proof nothing was posted.
613
693
  # @param post_id [String] Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
@@ -850,7 +930,7 @@ module Zernio
850
930
  end
851
931
 
852
932
  # Unhide comment
853
- # Unhide a previously hidden comment. Supported by Facebook, Instagram, Threads, and X.
933
+ # Unhide a previously hidden comment. Supported by Facebook, Instagram, Threads, X, and TikTok (accounts connected through the TikTok for Business app).
854
934
  # @param post_id [String]
855
935
  # @param comment_id [String]
856
936
  # @param account_id [String]
@@ -862,7 +942,7 @@ module Zernio
862
942
  end
863
943
 
864
944
  # Unhide comment
865
- # Unhide a previously hidden comment. Supported by Facebook, Instagram, Threads, and X.
945
+ # Unhide a previously hidden comment. Supported by Facebook, Instagram, Threads, X, and TikTok (accounts connected through the TikTok for Business app).
866
946
  # @param post_id [String]
867
947
  # @param comment_id [String]
868
948
  # @param account_id [String]
@@ -1076,5 +1156,81 @@ module Zernio
1076
1156
  end
1077
1157
  return data, status_code, headers
1078
1158
  end
1159
+
1160
+ # Unpin comment
1161
+ # Unpin a previously pinned comment. TikTok accounts connected through the TikTok for Business app only.
1162
+ # @param post_id [String]
1163
+ # @param comment_id [String]
1164
+ # @param account_id [String]
1165
+ # @param [Hash] opts the optional parameters
1166
+ # @return [PinInboxComment200Response]
1167
+ def unpin_inbox_comment(post_id, comment_id, account_id, opts = {})
1168
+ data, _status_code, _headers = unpin_inbox_comment_with_http_info(post_id, comment_id, account_id, opts)
1169
+ data
1170
+ end
1171
+
1172
+ # Unpin comment
1173
+ # Unpin a previously pinned comment. TikTok accounts connected through the TikTok for Business app only.
1174
+ # @param post_id [String]
1175
+ # @param comment_id [String]
1176
+ # @param account_id [String]
1177
+ # @param [Hash] opts the optional parameters
1178
+ # @return [Array<(PinInboxComment200Response, Integer, Hash)>] PinInboxComment200Response data, response status code and response headers
1179
+ def unpin_inbox_comment_with_http_info(post_id, comment_id, account_id, opts = {})
1180
+ if @api_client.config.debugging
1181
+ @api_client.config.logger.debug 'Calling API: CommentsApi.unpin_inbox_comment ...'
1182
+ end
1183
+ # verify the required parameter 'post_id' is set
1184
+ if @api_client.config.client_side_validation && post_id.nil?
1185
+ fail ArgumentError, "Missing the required parameter 'post_id' when calling CommentsApi.unpin_inbox_comment"
1186
+ end
1187
+ # verify the required parameter 'comment_id' is set
1188
+ if @api_client.config.client_side_validation && comment_id.nil?
1189
+ fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentsApi.unpin_inbox_comment"
1190
+ end
1191
+ # verify the required parameter 'account_id' is set
1192
+ if @api_client.config.client_side_validation && account_id.nil?
1193
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling CommentsApi.unpin_inbox_comment"
1194
+ end
1195
+ # resource path
1196
+ local_var_path = '/v1/inbox/comments/{postId}/{commentId}/pin'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)).sub('{' + 'commentId' + '}', CGI.escape(comment_id.to_s))
1197
+
1198
+ # query parameters
1199
+ query_params = opts[:query_params] || {}
1200
+ query_params[:'accountId'] = account_id
1201
+
1202
+ # header parameters
1203
+ header_params = opts[:header_params] || {}
1204
+ # HTTP header 'Accept' (if needed)
1205
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1206
+
1207
+ # form parameters
1208
+ form_params = opts[:form_params] || {}
1209
+
1210
+ # http body (model)
1211
+ post_body = opts[:debug_body]
1212
+
1213
+ # return_type
1214
+ return_type = opts[:debug_return_type] || 'PinInboxComment200Response'
1215
+
1216
+ # auth_names
1217
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1218
+
1219
+ new_options = opts.merge(
1220
+ :operation => :"CommentsApi.unpin_inbox_comment",
1221
+ :header_params => header_params,
1222
+ :query_params => query_params,
1223
+ :form_params => form_params,
1224
+ :body => post_body,
1225
+ :auth_names => auth_names,
1226
+ :return_type => return_type
1227
+ )
1228
+
1229
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1230
+ if @api_client.config.debugging
1231
+ @api_client.config.logger.debug "API called: CommentsApi#unpin_inbox_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1232
+ end
1233
+ return data, status_code, headers
1234
+ end
1079
1235
  end
1080
1236
  end
@@ -31,7 +31,7 @@ module Zernio
31
31
 
32
32
  attr_accessor :promoted_object
33
33
 
34
- # Meta only. SKAdNetwork app promotion requires AUCTION.
34
+ # Meta only. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. SKAdNetwork app promotion requires AUCTION.
35
35
  attr_accessor :buying_type
36
36
 
37
37
  # Meta only. Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED.
@@ -190,6 +190,8 @@ module Zernio
190
190
 
191
191
  if attributes.key?(:'buying_type')
192
192
  self.buying_type = attributes[:'buying_type']
193
+ else
194
+ self.buying_type = 'AUCTION'
193
195
  end
194
196
 
195
197
  if attributes.key?(:'validate_only')
@@ -41,7 +41,7 @@ module Zernio
41
41
  # Meta only. Explicit ad-set `billing_event`. Defaults to `IMPRESSIONS`. Forwarded verbatim to Meta, which validates compatibility with the optimization goal.
42
42
  attr_accessor :billing_event
43
43
 
44
- # Meta only. RESERVED = Reach & Frequency: requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative).
44
+ # Meta only. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. Reusing existingCampaignId does not change the campaign. RESERVED = Reach & Frequency: requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative).
45
45
  attr_accessor :buying_type
46
46
 
47
47
  # Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id, so pass that one). Requires buyingType RESERVED.
@@ -633,6 +633,8 @@ module Zernio
633
633
 
634
634
  if attributes.key?(:'buying_type')
635
635
  self.buying_type = attributes[:'buying_type']
636
+ else
637
+ self.buying_type = 'AUCTION'
636
638
  end
637
639
 
638
640
  if attributes.key?(:'rf_prediction_id')
@@ -0,0 +1,174 @@
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 PinInboxComment200Response < ApiModelBase
18
+ attr_accessor :status
19
+
20
+ attr_accessor :comment_id
21
+
22
+ attr_accessor :pinned
23
+
24
+ attr_accessor :platform
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'status' => :'status',
30
+ :'comment_id' => :'commentId',
31
+ :'pinned' => :'pinned',
32
+ :'platform' => :'platform'
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
+ :'status' => :'String',
50
+ :'comment_id' => :'String',
51
+ :'pinned' => :'Boolean',
52
+ :'platform' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::PinInboxComment200Response` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::PinInboxComment200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'status')
79
+ self.status = attributes[:'status']
80
+ end
81
+
82
+ if attributes.key?(:'comment_id')
83
+ self.comment_id = attributes[:'comment_id']
84
+ end
85
+
86
+ if attributes.key?(:'pinned')
87
+ self.pinned = attributes[:'pinned']
88
+ end
89
+
90
+ if attributes.key?(:'platform')
91
+ self.platform = attributes[:'platform']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ status == o.status &&
116
+ comment_id == o.comment_id &&
117
+ pinned == o.pinned &&
118
+ platform == o.platform
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [status, comment_id, pinned, platform].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ end
@@ -0,0 +1,165 @@
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 PinInboxCommentRequest < ApiModelBase
18
+ # The social account ID
19
+ attr_accessor :account_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'account_id' => :'accountId'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'account_id' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::PinInboxCommentRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::PinInboxCommentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'account_id')
68
+ self.account_id = attributes[:'account_id']
69
+ else
70
+ self.account_id = nil
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @account_id.nil?
80
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @account_id.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] account_id Value to be assigned
96
+ def account_id=(account_id)
97
+ if account_id.nil?
98
+ fail ArgumentError, 'account_id cannot be nil'
99
+ end
100
+
101
+ @account_id = account_id
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ account_id == o.account_id
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [account_id].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -21,7 +21,7 @@ module Zernio
21
21
  # Posts inserted or updated in Zernio
22
22
  attr_accessor :posts_synced
23
23
 
24
- # True when no live fetch ran: the post was already stored, or the account was synced within the debounce window
24
+ # True when the account was synced within the debounce window and no live fetch ran.
25
25
  attr_accessor :skipped
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -19,7 +19,7 @@ module Zernio
19
19
  # When true, sends the post to the TikTok Creator Inbox as a draft instead of publishing immediately. The creator receives an inbox notification to complete posting via TikTok's editing flow. Maps to TikTok API post_mode: \"MEDIA_UPLOAD\" (photos) or the dedicated inbox endpoint (videos). When false or omitted, publishes directly via post_mode: \"DIRECT_POST\". Note: publish_type is not a supported field. Use this field instead.
20
20
  attr_accessor :draft
21
21
 
22
- # One of the values returned by the TikTok creator info API for the account
22
+ # One of the values returned by the TikTok creator info API for the account. Accounts connected through the TikTok for Business app publish videos as public only: a non-public value on a video post is rejected at creation unless draft is true (photo posts keep every level).
23
23
  attr_accessor :privacy_level
24
24
 
25
25
  # Allow comments on the post
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # Webhook payload for comment received events (Instagram, Facebook, X, YouTube, LinkedIn, Bluesky, Reddit)
17
+ # Webhook payload for comment received events (Instagram, Facebook, X, YouTube, LinkedIn, Bluesky, Reddit, TikTok). TikTok events carry only the author id: the comment.update webhook has no username, picture or owner flag.
18
18
  class WebhookPayloadComment < ApiModelBase
19
19
  # Stable webhook event ID
20
20
  attr_accessor :id
@@ -239,7 +239,7 @@ module Zernio
239
239
  return false if @id.nil?
240
240
  return false if @platform_post_id.nil?
241
241
  return false if @platform.nil?
242
- platform_validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "twitter", "youtube", "linkedin", "bluesky", "reddit"])
242
+ platform_validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "twitter", "youtube", "linkedin", "bluesky", "reddit", "tiktok"])
243
243
  return false unless platform_validator.valid?(@platform)
244
244
  return false if @text.nil?
245
245
  return false if @author.nil?
@@ -271,7 +271,7 @@ module Zernio
271
271
  # Custom attribute writer method checking allowed values (enum).
272
272
  # @param [Object] platform Object to be assigned
273
273
  def platform=(platform)
274
- validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "twitter", "youtube", "linkedin", "bluesky", "reddit"])
274
+ validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "twitter", "youtube", "linkedin", "bluesky", "reddit", "tiktok"])
275
275
  unless validator.valid?(platform)
276
276
  fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
277
277
  end