late-sdk 0.0.63 → 0.0.65

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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -0
  3. data/docs/AccountsApi.md +74 -0
  4. data/docs/GetTikTokCreatorInfo200Response.md +24 -0
  5. data/docs/GetTikTokCreatorInfo200ResponseCommercialContentTypesInner.md +22 -0
  6. data/docs/GetTikTokCreatorInfo200ResponseCreator.md +24 -0
  7. data/docs/GetTikTokCreatorInfo200ResponsePostingLimits.md +20 -0
  8. data/docs/GetTikTokCreatorInfo200ResponsePrivacyLevelsInner.md +20 -0
  9. data/docs/TikTokPlatformData.md +3 -1
  10. data/lib/late-sdk/api/accounts_api.rb +70 -0
  11. data/lib/late-sdk/models/get_tik_tok_creator_info200_response.rb +180 -0
  12. data/lib/late-sdk/models/get_tik_tok_creator_info200_response_commercial_content_types_inner.rb +167 -0
  13. data/lib/late-sdk/models/get_tik_tok_creator_info200_response_creator.rb +178 -0
  14. data/lib/late-sdk/models/get_tik_tok_creator_info200_response_posting_limits.rb +158 -0
  15. data/lib/late-sdk/models/get_tik_tok_creator_info200_response_privacy_levels_inner.rb +158 -0
  16. data/lib/late-sdk/models/tik_tok_platform_data.rb +12 -2
  17. data/lib/late-sdk/version.rb +1 -1
  18. data/lib/late-sdk.rb +5 -0
  19. data/openapi.yaml +113 -1
  20. data/spec/api/accounts_api_spec.rb +13 -0
  21. data/spec/models/get_tik_tok_creator_info200_response_commercial_content_types_inner_spec.rb +48 -0
  22. data/spec/models/get_tik_tok_creator_info200_response_creator_spec.rb +54 -0
  23. data/spec/models/get_tik_tok_creator_info200_response_posting_limits_spec.rb +42 -0
  24. data/spec/models/get_tik_tok_creator_info200_response_privacy_levels_inner_spec.rb +42 -0
  25. data/spec/models/get_tik_tok_creator_info200_response_spec.rb +54 -0
  26. data/spec/models/tik_tok_platform_data_spec.rb +6 -0
  27. data/zernio-sdk-0.0.65.gem +0 -0
  28. metadata +22 -2
  29. data/zernio-sdk-0.0.63.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddc1002d29098e88793f9d1c4cd44088f3b32f40847c102acbdcdec1f84c3671
4
- data.tar.gz: 1b119f0270286fa162b820b56baa83101d65ce573d1a5eb51b6bebf327c6b7cd
3
+ metadata.gz: f3ccb1cf175db4f35477278d6af1b293053caab697922e29f976385b4b6faa80
4
+ data.tar.gz: 8e73ef578d9585c4858db872ba7e0b40e39935d90ce4d496815acf7a9664776d
5
5
  SHA512:
6
- metadata.gz: e66c6e82f5d467e85810b4c8c344df4a7d85b04824c1ff5d6719989d626df6d87db3cfcce6c68bc8d2d2096141568d4ac689bc081d2e1c01907a16c5f623dab2
7
- data.tar.gz: 688dc5050f10e6a7653cd502172646d0293c83bdb830adf50db0b5f0fb1bb46f9bfa026a6d68c2aa9f451c1307e286c6471b4a6b0973ab0126d6fe24b882f043
6
+ metadata.gz: 246706857730a54adfa242999fd46fbd4e2549fad7a8d5b164681a8acdab932d0493f5d97286f43eab782412dc98bf16605ee503aa6798680bb099f6dcff8da0
7
+ data.tar.gz: aa1c8ccf7ac8769d10d7306e64d12cf5b5bc61c74a78235ce52bc336d4fc5f43a04b49adfa19e507f8f312ad12e93bd9f6aa994bdea1ac5609dd43997c430b99
data/README.md CHANGED
@@ -84,6 +84,7 @@ Class | Method | HTTP request | Description
84
84
  *Late::AccountsApi* | [**get_account_health**](docs/AccountsApi.md#get_account_health) | **GET** /v1/accounts/{accountId}/health | Check account health
85
85
  *Late::AccountsApi* | [**get_all_accounts_health**](docs/AccountsApi.md#get_all_accounts_health) | **GET** /v1/accounts/health | Check accounts health
86
86
  *Late::AccountsApi* | [**get_follower_stats**](docs/AccountsApi.md#get_follower_stats) | **GET** /v1/accounts/follower-stats | Get follower stats
87
+ *Late::AccountsApi* | [**get_tik_tok_creator_info**](docs/AccountsApi.md#get_tik_tok_creator_info) | **GET** /v1/accounts/{accountId}/tiktok/creator-info | Get TikTok creator info
87
88
  *Late::AccountsApi* | [**list_accounts**](docs/AccountsApi.md#list_accounts) | **GET** /v1/accounts | List accounts
88
89
  *Late::AccountsApi* | [**update_account**](docs/AccountsApi.md#update_account) | **PUT** /v1/accounts/{accountId} | Update account
89
90
  *Late::AnalyticsApi* | [**get_analytics**](docs/AnalyticsApi.md#get_analytics) | **GET** /v1/analytics | Get post analytics
@@ -467,6 +468,11 @@ Class | Method | HTTP request | Description
467
468
  - [Late::GetTelegramCommands200Response](docs/GetTelegramCommands200Response.md)
468
469
  - [Late::GetTelegramCommands200ResponseDataInner](docs/GetTelegramCommands200ResponseDataInner.md)
469
470
  - [Late::GetTelegramConnectStatus200Response](docs/GetTelegramConnectStatus200Response.md)
471
+ - [Late::GetTikTokCreatorInfo200Response](docs/GetTikTokCreatorInfo200Response.md)
472
+ - [Late::GetTikTokCreatorInfo200ResponseCommercialContentTypesInner](docs/GetTikTokCreatorInfo200ResponseCommercialContentTypesInner.md)
473
+ - [Late::GetTikTokCreatorInfo200ResponseCreator](docs/GetTikTokCreatorInfo200ResponseCreator.md)
474
+ - [Late::GetTikTokCreatorInfo200ResponsePostingLimits](docs/GetTikTokCreatorInfo200ResponsePostingLimits.md)
475
+ - [Late::GetTikTokCreatorInfo200ResponsePrivacyLevelsInner](docs/GetTikTokCreatorInfo200ResponsePrivacyLevelsInner.md)
470
476
  - [Late::GetUser200Response](docs/GetUser200Response.md)
471
477
  - [Late::GetUser200ResponseUser](docs/GetUser200ResponseUser.md)
472
478
  - [Late::GetWebhookLogs200Response](docs/GetWebhookLogs200Response.md)
data/docs/AccountsApi.md CHANGED
@@ -8,6 +8,7 @@ All URIs are relative to *https://zernio.com/api*
8
8
  | [**get_account_health**](AccountsApi.md#get_account_health) | **GET** /v1/accounts/{accountId}/health | Check account health |
9
9
  | [**get_all_accounts_health**](AccountsApi.md#get_all_accounts_health) | **GET** /v1/accounts/health | Check accounts health |
10
10
  | [**get_follower_stats**](AccountsApi.md#get_follower_stats) | **GET** /v1/accounts/follower-stats | Get follower stats |
11
+ | [**get_tik_tok_creator_info**](AccountsApi.md#get_tik_tok_creator_info) | **GET** /v1/accounts/{accountId}/tiktok/creator-info | Get TikTok creator info |
11
12
  | [**list_accounts**](AccountsApi.md#list_accounts) | **GET** /v1/accounts | List accounts |
12
13
  | [**update_account**](AccountsApi.md#update_account) | **PUT** /v1/accounts/{accountId} | Update account |
13
14
 
@@ -304,6 +305,79 @@ end
304
305
  - **Accept**: application/json
305
306
 
306
307
 
308
+ ## get_tik_tok_creator_info
309
+
310
+ > <GetTikTokCreatorInfo200Response> get_tik_tok_creator_info(account_id, opts)
311
+
312
+ Get TikTok creator info
313
+
314
+ Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account. Only works with TikTok accounts.
315
+
316
+ ### Examples
317
+
318
+ ```ruby
319
+ require 'time'
320
+ require 'late-sdk'
321
+ # setup authorization
322
+ Late.configure do |config|
323
+ # Configure Bearer authorization (JWT): bearerAuth
324
+ config.access_token = 'YOUR_BEARER_TOKEN'
325
+ end
326
+
327
+ api_instance = Late::AccountsApi.new
328
+ account_id = 'account_id_example' # String | The TikTok account ID
329
+ opts = {
330
+ media_type: 'video' # String | The media type to get creator info for (affects available interaction settings)
331
+ }
332
+
333
+ begin
334
+ # Get TikTok creator info
335
+ result = api_instance.get_tik_tok_creator_info(account_id, opts)
336
+ p result
337
+ rescue Late::ApiError => e
338
+ puts "Error when calling AccountsApi->get_tik_tok_creator_info: #{e}"
339
+ end
340
+ ```
341
+
342
+ #### Using the get_tik_tok_creator_info_with_http_info variant
343
+
344
+ This returns an Array which contains the response data, status code and headers.
345
+
346
+ > <Array(<GetTikTokCreatorInfo200Response>, Integer, Hash)> get_tik_tok_creator_info_with_http_info(account_id, opts)
347
+
348
+ ```ruby
349
+ begin
350
+ # Get TikTok creator info
351
+ data, status_code, headers = api_instance.get_tik_tok_creator_info_with_http_info(account_id, opts)
352
+ p status_code # => 2xx
353
+ p headers # => { ... }
354
+ p data # => <GetTikTokCreatorInfo200Response>
355
+ rescue Late::ApiError => e
356
+ puts "Error when calling AccountsApi->get_tik_tok_creator_info_with_http_info: #{e}"
357
+ end
358
+ ```
359
+
360
+ ### Parameters
361
+
362
+ | Name | Type | Description | Notes |
363
+ | ---- | ---- | ----------- | ----- |
364
+ | **account_id** | **String** | The TikTok account ID | |
365
+ | **media_type** | **String** | The media type to get creator info for (affects available interaction settings) | [optional][default to &#39;video&#39;] |
366
+
367
+ ### Return type
368
+
369
+ [**GetTikTokCreatorInfo200Response**](GetTikTokCreatorInfo200Response.md)
370
+
371
+ ### Authorization
372
+
373
+ [bearerAuth](../README.md#bearerAuth)
374
+
375
+ ### HTTP request headers
376
+
377
+ - **Content-Type**: Not defined
378
+ - **Accept**: application/json
379
+
380
+
307
381
  ## list_accounts
308
382
 
309
383
  > <ListAccounts200Response> list_accounts(opts)
@@ -0,0 +1,24 @@
1
+ # Late::GetTikTokCreatorInfo200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **creator** | [**GetTikTokCreatorInfo200ResponseCreator**](GetTikTokCreatorInfo200ResponseCreator.md) | | [optional] |
8
+ | **privacy_levels** | [**Array&lt;GetTikTokCreatorInfo200ResponsePrivacyLevelsInner&gt;**](GetTikTokCreatorInfo200ResponsePrivacyLevelsInner.md) | Available privacy level options for this creator | [optional] |
9
+ | **posting_limits** | [**GetTikTokCreatorInfo200ResponsePostingLimits**](GetTikTokCreatorInfo200ResponsePostingLimits.md) | | [optional] |
10
+ | **commercial_content_types** | [**Array&lt;GetTikTokCreatorInfo200ResponseCommercialContentTypesInner&gt;**](GetTikTokCreatorInfo200ResponseCommercialContentTypesInner.md) | Available commercial content disclosure options | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'late-sdk'
16
+
17
+ instance = Late::GetTikTokCreatorInfo200Response.new(
18
+ creator: null,
19
+ privacy_levels: null,
20
+ posting_limits: null,
21
+ commercial_content_types: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # Late::GetTikTokCreatorInfo200ResponseCommercialContentTypesInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **value** | **String** | | [optional] |
8
+ | **label** | **String** | | [optional] |
9
+ | **requires** | **Array&lt;String&gt;** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'late-sdk'
15
+
16
+ instance = Late::GetTikTokCreatorInfo200ResponseCommercialContentTypesInner.new(
17
+ value: null,
18
+ label: null,
19
+ requires: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # Late::GetTikTokCreatorInfo200ResponseCreator
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **nickname** | **String** | Creator display name | [optional] |
8
+ | **avatar_url** | **String** | Creator avatar URL | [optional] |
9
+ | **is_verified** | **Boolean** | Whether the creator is verified | [optional] |
10
+ | **can_post_more** | **Boolean** | Whether the creator can publish more posts right now | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'late-sdk'
16
+
17
+ instance = Late::GetTikTokCreatorInfo200ResponseCreator.new(
18
+ nickname: null,
19
+ avatar_url: null,
20
+ is_verified: null,
21
+ can_post_more: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,20 @@
1
+ # Late::GetTikTokCreatorInfo200ResponsePostingLimits
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **max_video_duration_sec** | **Integer** | Maximum video duration in seconds | [optional] |
8
+ | **interaction_settings** | **Object** | Available interaction toggles (comment, duet, stitch) and their defaults | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::GetTikTokCreatorInfo200ResponsePostingLimits.new(
16
+ max_video_duration_sec: null,
17
+ interaction_settings: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Late::GetTikTokCreatorInfo200ResponsePrivacyLevelsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **value** | **String** | Privacy level value to use when creating posts (e.g. PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY) | [optional] |
8
+ | **label** | **String** | Human-readable label | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::GetTikTokCreatorInfo200ResponsePrivacyLevelsInner.new(
16
+ value: null,
17
+ label: null
18
+ )
19
+ ```
20
+
@@ -15,7 +15,8 @@
15
15
  | **content_preview_confirmed** | **Boolean** | User has confirmed they previewed the content | [optional] |
16
16
  | **express_consent_given** | **Boolean** | User has given express consent for posting | [optional] |
17
17
  | **media_type** | **String** | Optional override. Defaults based on provided media items. | [optional] |
18
- | **video_cover_timestamp_ms** | **Integer** | Optional for video posts. Timestamp in milliseconds to select which frame to use as thumbnail (defaults to 1000ms/1 second). | [optional] |
18
+ | **video_cover_timestamp_ms** | **Integer** | Optional for video posts. Timestamp in milliseconds to select which frame to use as thumbnail (defaults to 1000ms/1 second). Ignored when videoCoverImageUrl is provided. | [optional] |
19
+ | **video_cover_image_url** | **String** | Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). The image is stitched as a single frame at the start of the video and used as the cover. Overrides videoCoverTimestampMs when provided. | [optional] |
19
20
  | **photo_cover_index** | **Integer** | Optional for photo carousels. Index of image to use as cover, 0-based (defaults to 0/first image). | [optional] |
20
21
  | **auto_add_music** | **Boolean** | When true, TikTok may add recommended music (photos only) | [optional] |
21
22
  | **video_made_with_ai** | **Boolean** | Set true to disclose AI-generated content | [optional] |
@@ -39,6 +40,7 @@ instance = Late::TikTokPlatformData.new(
39
40
  express_consent_given: null,
40
41
  media_type: null,
41
42
  video_cover_timestamp_ms: null,
43
+ video_cover_image_url: null,
42
44
  photo_cover_index: null,
43
45
  auto_add_music: null,
44
46
  video_made_with_ai: null,
@@ -295,6 +295,76 @@ module Late
295
295
  return data, status_code, headers
296
296
  end
297
297
 
298
+ # Get TikTok creator info
299
+ # Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account. Only works with TikTok accounts.
300
+ # @param account_id [String] The TikTok account ID
301
+ # @param [Hash] opts the optional parameters
302
+ # @option opts [String] :media_type The media type to get creator info for (affects available interaction settings) (default to 'video')
303
+ # @return [GetTikTokCreatorInfo200Response]
304
+ def get_tik_tok_creator_info(account_id, opts = {})
305
+ data, _status_code, _headers = get_tik_tok_creator_info_with_http_info(account_id, opts)
306
+ data
307
+ end
308
+
309
+ # Get TikTok creator info
310
+ # Returns TikTok creator details, available privacy levels, posting limits, and commercial content options for a specific TikTok account. Only works with TikTok accounts.
311
+ # @param account_id [String] The TikTok account ID
312
+ # @param [Hash] opts the optional parameters
313
+ # @option opts [String] :media_type The media type to get creator info for (affects available interaction settings) (default to 'video')
314
+ # @return [Array<(GetTikTokCreatorInfo200Response, Integer, Hash)>] GetTikTokCreatorInfo200Response data, response status code and response headers
315
+ def get_tik_tok_creator_info_with_http_info(account_id, opts = {})
316
+ if @api_client.config.debugging
317
+ @api_client.config.logger.debug 'Calling API: AccountsApi.get_tik_tok_creator_info ...'
318
+ end
319
+ # verify the required parameter 'account_id' is set
320
+ if @api_client.config.client_side_validation && account_id.nil?
321
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_tik_tok_creator_info"
322
+ end
323
+ allowable_values = ["video", "photo"]
324
+ if @api_client.config.client_side_validation && opts[:'media_type'] && !allowable_values.include?(opts[:'media_type'])
325
+ fail ArgumentError, "invalid value for \"media_type\", must be one of #{allowable_values}"
326
+ end
327
+ # resource path
328
+ local_var_path = '/v1/accounts/{accountId}/tiktok/creator-info'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
329
+
330
+ # query parameters
331
+ query_params = opts[:query_params] || {}
332
+ query_params[:'mediaType'] = opts[:'media_type'] if !opts[:'media_type'].nil?
333
+
334
+ # header parameters
335
+ header_params = opts[:header_params] || {}
336
+ # HTTP header 'Accept' (if needed)
337
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
338
+
339
+ # form parameters
340
+ form_params = opts[:form_params] || {}
341
+
342
+ # http body (model)
343
+ post_body = opts[:debug_body]
344
+
345
+ # return_type
346
+ return_type = opts[:debug_return_type] || 'GetTikTokCreatorInfo200Response'
347
+
348
+ # auth_names
349
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
350
+
351
+ new_options = opts.merge(
352
+ :operation => :"AccountsApi.get_tik_tok_creator_info",
353
+ :header_params => header_params,
354
+ :query_params => query_params,
355
+ :form_params => form_params,
356
+ :body => post_body,
357
+ :auth_names => auth_names,
358
+ :return_type => return_type
359
+ )
360
+
361
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
362
+ if @api_client.config.debugging
363
+ @api_client.config.logger.debug "API called: AccountsApi#get_tik_tok_creator_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
364
+ end
365
+ return data, status_code, headers
366
+ end
367
+
298
368
  # List accounts
299
369
  # Returns connected social accounts. Only includes accounts within the plan limit by default. Follower data requires analytics add-on.
300
370
  # @param [Hash] opts the optional parameters
@@ -0,0 +1,180 @@
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.1
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 Late
17
+ class GetTikTokCreatorInfo200Response < ApiModelBase
18
+ attr_accessor :creator
19
+
20
+ # Available privacy level options for this creator
21
+ attr_accessor :privacy_levels
22
+
23
+ attr_accessor :posting_limits
24
+
25
+ # Available commercial content disclosure options
26
+ attr_accessor :commercial_content_types
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'creator' => :'creator',
32
+ :'privacy_levels' => :'privacyLevels',
33
+ :'posting_limits' => :'postingLimits',
34
+ :'commercial_content_types' => :'commercialContentTypes'
35
+ }
36
+ end
37
+
38
+ # Returns attribute mapping this model knows about
39
+ def self.acceptable_attribute_map
40
+ attribute_map
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ acceptable_attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'creator' => :'GetTikTokCreatorInfo200ResponseCreator',
52
+ :'privacy_levels' => :'Array<GetTikTokCreatorInfo200ResponsePrivacyLevelsInner>',
53
+ :'posting_limits' => :'GetTikTokCreatorInfo200ResponsePostingLimits',
54
+ :'commercial_content_types' => :'Array<GetTikTokCreatorInfo200ResponseCommercialContentTypesInner>'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetTikTokCreatorInfo200Response` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetTikTokCreatorInfo200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'creator')
81
+ self.creator = attributes[:'creator']
82
+ end
83
+
84
+ if attributes.key?(:'privacy_levels')
85
+ if (value = attributes[:'privacy_levels']).is_a?(Array)
86
+ self.privacy_levels = value
87
+ end
88
+ end
89
+
90
+ if attributes.key?(:'posting_limits')
91
+ self.posting_limits = attributes[:'posting_limits']
92
+ end
93
+
94
+ if attributes.key?(:'commercial_content_types')
95
+ if (value = attributes[:'commercial_content_types']).is_a?(Array)
96
+ self.commercial_content_types = value
97
+ end
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ true
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
+ creator == o.creator &&
122
+ privacy_levels == o.privacy_levels &&
123
+ posting_limits == o.posting_limits &&
124
+ commercial_content_types == o.commercial_content_types
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [creator, privacy_levels, posting_limits, commercial_content_types].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ attributes = attributes.transform_keys(&:to_sym)
145
+ transformed_hash = {}
146
+ openapi_types.each_pair do |key, type|
147
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = nil
149
+ elsif type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[attribute_map[key]].is_a?(Array)
153
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
154
+ end
155
+ elsif !attributes[attribute_map[key]].nil?
156
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
157
+ end
158
+ end
159
+ new(transformed_hash)
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ if value.nil?
169
+ is_nullable = self.class.openapi_nullable.include?(attr)
170
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
171
+ end
172
+
173
+ hash[param] = _to_hash(value)
174
+ end
175
+ hash
176
+ end
177
+
178
+ end
179
+
180
+ end
@@ -0,0 +1,167 @@
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.1
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 Late
17
+ class GetTikTokCreatorInfo200ResponseCommercialContentTypesInner < ApiModelBase
18
+ attr_accessor :value
19
+
20
+ attr_accessor :label
21
+
22
+ attr_accessor :requires
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'value' => :'value',
28
+ :'label' => :'label',
29
+ :'requires' => :'requires'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'value' => :'String',
47
+ :'label' => :'String',
48
+ :'requires' => :'Array<String>'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetTikTokCreatorInfo200ResponseCommercialContentTypesInner` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetTikTokCreatorInfo200ResponseCommercialContentTypesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'value')
75
+ self.value = attributes[:'value']
76
+ end
77
+
78
+ if attributes.key?(:'label')
79
+ self.label = attributes[:'label']
80
+ end
81
+
82
+ if attributes.key?(:'requires')
83
+ if (value = attributes[:'requires']).is_a?(Array)
84
+ self.requires = value
85
+ end
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
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
+ value == o.value &&
110
+ label == o.label &&
111
+ requires == o.requires
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [value, label, requires].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ self.class.attribute_map.each_pair do |attr, param|
154
+ value = self.send(attr)
155
+ if value.nil?
156
+ is_nullable = self.class.openapi_nullable.include?(attr)
157
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
+ end
159
+
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ end
166
+
167
+ end