late-sdk 0.0.945 → 0.0.947

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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -0
  3. data/docs/AccountsApi.md +74 -0
  4. data/docs/GetCommentAutomation200ResponseLogsInner.md +4 -0
  5. data/docs/GetCommentAutomation200ResponseLogsInnerPlatformError.md +20 -0
  6. data/docs/ListTikTokCommercialMusic200Response.md +18 -0
  7. data/docs/ListTikTokCommercialMusic200ResponseTracksInner.md +34 -0
  8. data/docs/ListTikTokCommercialMusic200ResponseTracksInnerClip.md +20 -0
  9. data/docs/TikTokPlatformData.md +5 -1
  10. data/docs/TikTokPlatformDataMusicSoundInfo.md +24 -0
  11. data/lib/zernio-sdk/api/accounts_api.rb +74 -0
  12. data/lib/zernio-sdk/models/get_comment_automation200_response_logs_inner.rb +20 -1
  13. data/lib/zernio-sdk/models/get_comment_automation200_response_logs_inner_platform_error.rb +157 -0
  14. data/lib/zernio-sdk/models/list_tik_tok_commercial_music200_response.rb +149 -0
  15. data/lib/zernio-sdk/models/list_tik_tok_commercial_music200_response_tracks_inner.rb +224 -0
  16. data/lib/zernio-sdk/models/list_tik_tok_commercial_music200_response_tracks_inner_clip.rb +157 -0
  17. data/lib/zernio-sdk/models/tik_tok_platform_data.rb +49 -2
  18. data/lib/zernio-sdk/models/tik_tok_platform_data_music_sound_info.rb +264 -0
  19. data/lib/zernio-sdk/version.rb +1 -1
  20. data/lib/zernio-sdk.rb +5 -0
  21. data/openapi.yaml +88 -1
  22. data/spec/api/accounts_api_spec.rb +13 -0
  23. data/spec/models/get_comment_automation200_response_logs_inner_platform_error_spec.rb +42 -0
  24. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +12 -0
  25. data/spec/models/list_tik_tok_commercial_music200_response_spec.rb +36 -0
  26. data/spec/models/list_tik_tok_commercial_music200_response_tracks_inner_clip_spec.rb +42 -0
  27. data/spec/models/list_tik_tok_commercial_music200_response_tracks_inner_spec.rb +84 -0
  28. data/spec/models/tik_tok_platform_data_music_sound_info_spec.rb +54 -0
  29. data/spec/models/tik_tok_platform_data_spec.rb +12 -0
  30. data/zernio-sdk-0.0.947.gem +0 -0
  31. metadata +22 -2
  32. data/zernio-sdk-0.0.945.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06b139dee8527c1c6a113a3e72d0741b26edaafd6fad59e369ebcd10b173fa3d
4
- data.tar.gz: 0bff41a2d60b52fc069b21d4a12c9ee306160a59aa44743a37cdea357db7f418
3
+ metadata.gz: 6115d87ec33f16eb6960cedd455f604ecbb3d264dbbc85f592a7f76a61e0e857
4
+ data.tar.gz: b1d488ef20df3cbb8d84c760cb2185ec310cf7a2059afc44d4bfde83296d42a1
5
5
  SHA512:
6
- metadata.gz: 4491bf3530ed66f8bf2c72592c7d3995730cbad905c8494b5cdeb9c6428b61da8bd4a9848c60c0a9b22446261134e5d51996bd00942bae84d7396f0aef1ee337
7
- data.tar.gz: 9ab0279020ee5d6ab8f383f3499f97c51ebb4ef206753e280564ad64eabc00e23781e594a2f69c056b3d3e9a20da6bac3f7ccaa12b6cff103904164794c94adb
6
+ metadata.gz: 7e889e67901b14d657c0f1a263bb0bddaceb114fa0e0ac3dae4d2ba2234f9896dd326a528ac31e3c14785b4f9f4f3191c5087f6accd3f7f8d7b5e9a344580068
7
+ data.tar.gz: c31dbabe5c3dc196bda3d2be406221fd43792299a08c7837d30b8aed4fc0531145718743c629e13e8acc6eb7373e6d87a7b774d752f101cd5ea5c4a3a5453446
data/README.md CHANGED
@@ -102,6 +102,7 @@ Class | Method | HTTP request | Description
102
102
  *Zernio::AccountsApi* | [**get_slack_settings**](docs/AccountsApi.md#get_slack_settings) | **GET** /v1/accounts/{accountId}/slack-settings | Get Slack account settings
103
103
  *Zernio::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
104
104
  *Zernio::AccountsApi* | [**list_accounts**](docs/AccountsApi.md#list_accounts) | **GET** /v1/accounts | List accounts
105
+ *Zernio::AccountsApi* | [**list_tik_tok_commercial_music**](docs/AccountsApi.md#list_tik_tok_commercial_music) | **GET** /v1/accounts/{accountId}/tiktok/commercial-music | List trending commercial music
105
106
  *Zernio::AccountsApi* | [**move_account_to_profile**](docs/AccountsApi.md#move_account_to_profile) | **PATCH** /v1/accounts/{accountId} | Move account to another profile
106
107
  *Zernio::AccountsApi* | [**update_account**](docs/AccountsApi.md#update_account) | **PUT** /v1/accounts/{accountId} | Update account
107
108
  *Zernio::AccountsApi* | [**update_bluesky_settings**](docs/AccountsApi.md#update_bluesky_settings) | **PATCH** /v1/accounts/{accountId}/bluesky-settings | Update Bluesky account settings
@@ -1428,6 +1429,7 @@ Class | Method | HTTP request | Description
1428
1429
  - [Zernio::GetCommentAutomation200Response](docs/GetCommentAutomation200Response.md)
1429
1430
  - [Zernio::GetCommentAutomation200ResponseAutomation](docs/GetCommentAutomation200ResponseAutomation.md)
1430
1431
  - [Zernio::GetCommentAutomation200ResponseLogsInner](docs/GetCommentAutomation200ResponseLogsInner.md)
1432
+ - [Zernio::GetCommentAutomation200ResponseLogsInnerPlatformError](docs/GetCommentAutomation200ResponseLogsInnerPlatformError.md)
1431
1433
  - [Zernio::GetConnectUrl200Response](docs/GetConnectUrl200Response.md)
1432
1434
  - [Zernio::GetContact200Response](docs/GetContact200Response.md)
1433
1435
  - [Zernio::GetContact200ResponseChannelsInner](docs/GetContact200ResponseChannelsInner.md)
@@ -1998,6 +2000,9 @@ Class | Method | HTTP request | Description
1998
2000
  - [Zernio::ListTikTokAdPixels200Response](docs/ListTikTokAdPixels200Response.md)
1999
2001
  - [Zernio::ListTikTokAdPixels200ResponsePixelsInner](docs/ListTikTokAdPixels200ResponsePixelsInner.md)
2000
2002
  - [Zernio::ListTikTokAdPixels200ResponsePixelsInnerEventDetailsInner](docs/ListTikTokAdPixels200ResponsePixelsInnerEventDetailsInner.md)
2003
+ - [Zernio::ListTikTokCommercialMusic200Response](docs/ListTikTokCommercialMusic200Response.md)
2004
+ - [Zernio::ListTikTokCommercialMusic200ResponseTracksInner](docs/ListTikTokCommercialMusic200ResponseTracksInner.md)
2005
+ - [Zernio::ListTikTokCommercialMusic200ResponseTracksInnerClip](docs/ListTikTokCommercialMusic200ResponseTracksInnerClip.md)
2001
2006
  - [Zernio::ListTrackingTagSharedAccounts200Response](docs/ListTrackingTagSharedAccounts200Response.md)
2002
2007
  - [Zernio::ListTrackingTags200Response](docs/ListTrackingTags200Response.md)
2003
2008
  - [Zernio::ListUsers200Response](docs/ListUsers200Response.md)
@@ -2409,6 +2414,7 @@ Class | Method | HTTP request | Description
2409
2414
  - [Zernio::TikTokDryRunVerdict](docs/TikTokDryRunVerdict.md)
2410
2415
  - [Zernio::TikTokDryRunVerdictTiktokInner](docs/TikTokDryRunVerdictTiktokInner.md)
2411
2416
  - [Zernio::TikTokPlatformData](docs/TikTokPlatformData.md)
2417
+ - [Zernio::TikTokPlatformDataMusicSoundInfo](docs/TikTokPlatformDataMusicSoundInfo.md)
2412
2418
  - [Zernio::TrackingTag](docs/TrackingTag.md)
2413
2419
  - [Zernio::TransferVoiceCall200Response](docs/TransferVoiceCall200Response.md)
2414
2420
  - [Zernio::TransferVoiceCallRequest](docs/TransferVoiceCallRequest.md)
data/docs/AccountsApi.md CHANGED
@@ -14,6 +14,7 @@ All URIs are relative to *https://zernio.com/api*
14
14
  | [**get_slack_settings**](AccountsApi.md#get_slack_settings) | **GET** /v1/accounts/{accountId}/slack-settings | Get Slack account settings |
15
15
  | [**get_tik_tok_creator_info**](AccountsApi.md#get_tik_tok_creator_info) | **GET** /v1/accounts/{accountId}/tiktok/creator-info | Get TikTok creator info |
16
16
  | [**list_accounts**](AccountsApi.md#list_accounts) | **GET** /v1/accounts | List accounts |
17
+ | [**list_tik_tok_commercial_music**](AccountsApi.md#list_tik_tok_commercial_music) | **GET** /v1/accounts/{accountId}/tiktok/commercial-music | List trending commercial music |
17
18
  | [**move_account_to_profile**](AccountsApi.md#move_account_to_profile) | **PATCH** /v1/accounts/{accountId} | Move account to another profile |
18
19
  | [**update_account**](AccountsApi.md#update_account) | **PUT** /v1/accounts/{accountId} | Update account |
19
20
  | [**update_bluesky_settings**](AccountsApi.md#update_bluesky_settings) | **PATCH** /v1/accounts/{accountId}/bluesky-settings | Update Bluesky account settings |
@@ -748,6 +749,79 @@ end
748
749
  - **Accept**: application/json
749
750
 
750
751
 
752
+ ## list_tik_tok_commercial_music
753
+
754
+ > <ListTikTokCommercialMusic200Response> list_tik_tok_commercial_music(account_id, opts)
755
+
756
+ List trending commercial music
757
+
758
+ Returns the 100 currently trending tracks of TikTok's Commercial Music Library for a TikTok account connected through the TikTok for Business app. Use a track id as tiktokSettings.musicSoundInfo.musicSoundId when creating a post. The list is not paged; countryCode selects the country chart.
759
+
760
+ ### Examples
761
+
762
+ ```ruby
763
+ require 'time'
764
+ require 'zernio-sdk'
765
+ # setup authorization
766
+ Zernio.configure do |config|
767
+ # Configure Bearer authorization (JWT): bearerAuth
768
+ config.access_token = 'YOUR_BEARER_TOKEN'
769
+ end
770
+
771
+ api_instance = Zernio::AccountsApi.new
772
+ account_id = 'account_id_example' # String | The TikTok account ID
773
+ opts = {
774
+ country_code: 'country_code_example' # String | Two-letter ISO 3166-1 country code of the chart to read (for example ES). Defaults to TikTok's global chart.
775
+ }
776
+
777
+ begin
778
+ # List trending commercial music
779
+ result = api_instance.list_tik_tok_commercial_music(account_id, opts)
780
+ p result
781
+ rescue Zernio::ApiError => e
782
+ puts "Error when calling AccountsApi->list_tik_tok_commercial_music: #{e}"
783
+ end
784
+ ```
785
+
786
+ #### Using the list_tik_tok_commercial_music_with_http_info variant
787
+
788
+ This returns an Array which contains the response data, status code and headers.
789
+
790
+ > <Array(<ListTikTokCommercialMusic200Response>, Integer, Hash)> list_tik_tok_commercial_music_with_http_info(account_id, opts)
791
+
792
+ ```ruby
793
+ begin
794
+ # List trending commercial music
795
+ data, status_code, headers = api_instance.list_tik_tok_commercial_music_with_http_info(account_id, opts)
796
+ p status_code # => 2xx
797
+ p headers # => { ... }
798
+ p data # => <ListTikTokCommercialMusic200Response>
799
+ rescue Zernio::ApiError => e
800
+ puts "Error when calling AccountsApi->list_tik_tok_commercial_music_with_http_info: #{e}"
801
+ end
802
+ ```
803
+
804
+ ### Parameters
805
+
806
+ | Name | Type | Description | Notes |
807
+ | ---- | ---- | ----------- | ----- |
808
+ | **account_id** | **String** | The TikTok account ID | |
809
+ | **country_code** | **String** | Two-letter ISO 3166-1 country code of the chart to read (for example ES). Defaults to TikTok&#39;s global chart. | [optional] |
810
+
811
+ ### Return type
812
+
813
+ [**ListTikTokCommercialMusic200Response**](ListTikTokCommercialMusic200Response.md)
814
+
815
+ ### Authorization
816
+
817
+ [bearerAuth](../README.md#bearerAuth)
818
+
819
+ ### HTTP request headers
820
+
821
+ - **Content-Type**: Not defined
822
+ - **Accept**: application/json
823
+
824
+
751
825
  ## move_account_to_profile
752
826
 
753
827
  > <MoveAccountToProfile200Response> move_account_to_profile(account_id, move_account_to_profile_request)
@@ -15,6 +15,8 @@
15
15
  | **commenter_is_follower** | **Boolean** | Follow relationship at decision time. Absent when Instagram would not tell us (the commenter never messaged the account). | [optional] |
16
16
  | **commenter_follower_count** | **Integer** | | [optional] |
17
17
  | **error** | **String** | DM error message if status is failed | [optional] |
18
+ | **platform_error** | [**GetCommentAutomation200ResponseLogsInnerPlatformError**](GetCommentAutomation200ResponseLogsInnerPlatformError.md) | | [optional] |
19
+ | **private_reply_consumed** | **Boolean** | True when the failed send spent the comment&#39;s single Instagram private reply (subcode 1545133 or 2534023), the same rule as &#x60;details.privateReplyConsumed&#x60; on the private-reply endpoint. Absent on direct DMs, on Facebook, and on rows written before this field existed. | [optional] |
18
20
  | **comment_reply_status** | **String** | Outcome of the optional public reply on the triggering comment. &#39;skipped&#39; if no commentReply was configured or if the DM failed (the public reply is not attempted in that case). | [optional] |
19
21
  | **comment_reply_error** | **String** | Public-reply error message if commentReplyStatus is failed | [optional] |
20
22
  | **next_due_at** | **Time** | When the next queued send fires. Present only while something is still pending. | [optional] |
@@ -37,6 +39,8 @@ instance = Zernio::GetCommentAutomation200ResponseLogsInner.new(
37
39
  commenter_is_follower: null,
38
40
  commenter_follower_count: null,
39
41
  error: null,
42
+ platform_error: null,
43
+ private_reply_consumed: null,
40
44
  comment_reply_status: null,
41
45
  comment_reply_error: null,
42
46
  next_due_at: null,
@@ -0,0 +1,20 @@
1
+ # Zernio::GetCommentAutomation200ResponseLogsInnerPlatformError
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **Integer** | | [optional] |
8
+ | **subcode** | **Integer** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::GetCommentAutomation200ResponseLogsInnerPlatformError.new(
16
+ code: null,
17
+ subcode: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # Zernio::ListTikTokCommercialMusic200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **tracks** | [**Array&lt;ListTikTokCommercialMusic200ResponseTracksInner&gt;**](ListTikTokCommercialMusic200ResponseTracksInner.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::ListTikTokCommercialMusic200Response.new(
15
+ tracks: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,34 @@
1
+ # Zernio::ListTikTokCommercialMusic200ResponseTracksInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The commercial_music_id to send as musicSoundId | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **artist** | **String** | | [optional] |
10
+ | **duration_sec** | **Integer** | | [optional] |
11
+ | **genres** | **Array&lt;String&gt;** | | [optional] |
12
+ | **preview_url** | **String** | Preview audio of the full track | [optional] |
13
+ | **thumbnail_url** | **String** | | [optional] |
14
+ | **rank** | **Integer** | Position in the trending chart, 1 first | [optional] |
15
+ | **clip** | [**ListTikTokCommercialMusic200ResponseTracksInnerClip**](ListTikTokCommercialMusic200ResponseTracksInnerClip.md) | | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'zernio-sdk'
21
+
22
+ instance = Zernio::ListTikTokCommercialMusic200ResponseTracksInner.new(
23
+ id: null,
24
+ name: null,
25
+ artist: null,
26
+ duration_sec: null,
27
+ genres: null,
28
+ preview_url: null,
29
+ thumbnail_url: null,
30
+ rank: null,
31
+ clip: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,20 @@
1
+ # Zernio::ListTikTokCommercialMusic200ResponseTracksInnerClip
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **duration_sec** | **Integer** | | [optional] |
8
+ | **preview_url** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::ListTikTokCommercialMusic200ResponseTracksInnerClip.new(
16
+ duration_sec: null,
17
+ preview_url: null
18
+ )
19
+ ```
20
+
@@ -18,7 +18,9 @@
18
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
19
  | **video_cover_image_url** | **String** | Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). Any downloadable URL works: we rehost it ourselves. The image is stitched as a single frame at the start of the video to serve as the cover. Accounts connected through the TikTok for Business app hand it to TikTok as the cover instead, with no stitching, falling back to videoCoverTimestampMs without it. Overrides videoCoverTimestampMs when provided. | [optional] |
20
20
  | **photo_cover_index** | **Integer** | Optional for photo carousels. Index of image to use as cover, 0-based (defaults to 0/first image). | [optional] |
21
- | **auto_add_music** | **Boolean** | When true, TikTok may add recommended music (photos only) | [optional] |
21
+ | **auto_add_music** | **Boolean** | When true, TikTok may add recommended music (photos only). With the brand-organic or branded-content toggle on, TikTok allows Commercial Music Library tracks only, so this attaches nothing there; use musicSoundInfo instead. | [optional] |
22
+ | **music_sound_info** | [**TikTokPlatformDataMusicSoundInfo**](TikTokPlatformDataMusicSoundInfo.md) | | [optional] |
23
+ | **video_original_sound_volume** | **Integer** | Volume of the video&#39;s own sound when a commercial track is attached (0 to 100). Requires musicSoundInfo. Video posts only. | [optional] |
22
24
  | **video_made_with_ai** | **Boolean** | Set true to disclose AI-generated content. Accounts connected through the TikTok for Business app carry the disclosure on video posts only: the business photo endpoint has no AI disclosure field, so true on a direct photo post is rejected at creation rather than published undisclosed. Send draft true to publish such a photo post and set the disclosure in the TikTok app. | [optional] |
23
25
  | **description** | **String** | Optional long-form caption for photo posts (max 4000 chars). Recommended when content exceeds 90 chars, as photo titles are auto-truncated. Falls back to the post content when omitted. | [optional] |
24
26
 
@@ -43,6 +45,8 @@ instance = Zernio::TikTokPlatformData.new(
43
45
  video_cover_image_url: null,
44
46
  photo_cover_index: null,
45
47
  auto_add_music: null,
48
+ music_sound_info: null,
49
+ video_original_sound_volume: null,
46
50
  video_made_with_ai: null,
47
51
  description: null
48
52
  )
@@ -0,0 +1,24 @@
1
+ # Zernio::TikTokPlatformDataMusicSoundInfo
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **music_sound_id** | **String** | The commercial_music_id of the track. | |
8
+ | **music_sound_volume** | **Integer** | Track volume. TikTok defaults an omitted volume to 0, which publishes the track silently, so we default to the app&#39;s 50. Video posts only. | [optional][default to 50] |
9
+ | **music_sound_start** | **Integer** | Start point of the track in milliseconds (default 0). Video posts only. | [optional] |
10
+ | **music_sound_end** | **Integer** | End point of the track in milliseconds (default: the video length). Must be greater than musicSoundStart. Video posts only. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::TikTokPlatformDataMusicSoundInfo.new(
18
+ music_sound_id: null,
19
+ music_sound_volume: null,
20
+ music_sound_start: null,
21
+ music_sound_end: null
22
+ )
23
+ ```
24
+
@@ -717,6 +717,80 @@ module Zernio
717
717
  return data, status_code, headers
718
718
  end
719
719
 
720
+ # List trending commercial music
721
+ # Returns the 100 currently trending tracks of TikTok's Commercial Music Library for a TikTok account connected through the TikTok for Business app. Use a track id as tiktokSettings.musicSoundInfo.musicSoundId when creating a post. The list is not paged; countryCode selects the country chart.
722
+ # @param account_id [String] The TikTok account ID
723
+ # @param [Hash] opts the optional parameters
724
+ # @option opts [String] :country_code Two-letter ISO 3166-1 country code of the chart to read (for example ES). Defaults to TikTok&#39;s global chart.
725
+ # @return [ListTikTokCommercialMusic200Response]
726
+ def list_tik_tok_commercial_music(account_id, opts = {})
727
+ data, _status_code, _headers = list_tik_tok_commercial_music_with_http_info(account_id, opts)
728
+ data
729
+ end
730
+
731
+ # List trending commercial music
732
+ # Returns the 100 currently trending tracks of TikTok&#39;s Commercial Music Library for a TikTok account connected through the TikTok for Business app. Use a track id as tiktokSettings.musicSoundInfo.musicSoundId when creating a post. The list is not paged; countryCode selects the country chart.
733
+ # @param account_id [String] The TikTok account ID
734
+ # @param [Hash] opts the optional parameters
735
+ # @option opts [String] :country_code Two-letter ISO 3166-1 country code of the chart to read (for example ES). Defaults to TikTok&#39;s global chart.
736
+ # @return [Array<(ListTikTokCommercialMusic200Response, Integer, Hash)>] ListTikTokCommercialMusic200Response data, response status code and response headers
737
+ def list_tik_tok_commercial_music_with_http_info(account_id, opts = {})
738
+ if @api_client.config.debugging
739
+ @api_client.config.logger.debug 'Calling API: AccountsApi.list_tik_tok_commercial_music ...'
740
+ end
741
+ # verify the required parameter 'account_id' is set
742
+ if @api_client.config.client_side_validation && account_id.nil?
743
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.list_tik_tok_commercial_music"
744
+ end
745
+ if @api_client.config.client_side_validation && !opts[:'country_code'].nil? && opts[:'country_code'].to_s.length > 2
746
+ fail ArgumentError, 'invalid value for "opts[:"country_code"]" when calling AccountsApi.list_tik_tok_commercial_music, the character length must be smaller than or equal to 2.'
747
+ end
748
+
749
+ if @api_client.config.client_side_validation && !opts[:'country_code'].nil? && opts[:'country_code'].to_s.length < 2
750
+ fail ArgumentError, 'invalid value for "opts[:"country_code"]" when calling AccountsApi.list_tik_tok_commercial_music, the character length must be greater than or equal to 2.'
751
+ end
752
+
753
+ # resource path
754
+ local_var_path = '/v1/accounts/{accountId}/tiktok/commercial-music'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
755
+
756
+ # query parameters
757
+ query_params = opts[:query_params] || {}
758
+ query_params[:'countryCode'] = opts[:'country_code'] if !opts[:'country_code'].nil?
759
+
760
+ # header parameters
761
+ header_params = opts[:header_params] || {}
762
+ # HTTP header 'Accept' (if needed)
763
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
764
+
765
+ # form parameters
766
+ form_params = opts[:form_params] || {}
767
+
768
+ # http body (model)
769
+ post_body = opts[:debug_body]
770
+
771
+ # return_type
772
+ return_type = opts[:debug_return_type] || 'ListTikTokCommercialMusic200Response'
773
+
774
+ # auth_names
775
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
776
+
777
+ new_options = opts.merge(
778
+ :operation => :"AccountsApi.list_tik_tok_commercial_music",
779
+ :header_params => header_params,
780
+ :query_params => query_params,
781
+ :form_params => form_params,
782
+ :body => post_body,
783
+ :auth_names => auth_names,
784
+ :return_type => return_type
785
+ )
786
+
787
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
788
+ if @api_client.config.debugging
789
+ @api_client.config.logger.debug "API called: AccountsApi#list_tik_tok_commercial_music\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
790
+ end
791
+ return data, status_code, headers
792
+ end
793
+
720
794
  # Move account to another profile
721
795
  # Moves a connected account to a different profile owned by the same user. The target profile must belong to the same user as the account. For API keys restricted to specific profiles, BOTH the source account's current profile AND the target profile must be in the key's allowed set. Calls with a target profile outside the key's scope return 403.
722
796
  # @param account_id [String]
@@ -42,6 +42,11 @@ module Zernio
42
42
  # DM error message if status is failed
43
43
  attr_accessor :error
44
44
 
45
+ attr_accessor :platform_error
46
+
47
+ # True when the failed send spent the comment's single Instagram private reply (subcode 1545133 or 2534023), the same rule as `details.privateReplyConsumed` on the private-reply endpoint. Absent on direct DMs, on Facebook, and on rows written before this field existed.
48
+ attr_accessor :private_reply_consumed
49
+
45
50
  # Outcome of the optional public reply on the triggering comment. 'skipped' if no commentReply was configured or if the DM failed (the public reply is not attempted in that case).
46
51
  attr_accessor :comment_reply_status
47
52
 
@@ -89,6 +94,8 @@ module Zernio
89
94
  :'commenter_is_follower' => :'commenterIsFollower',
90
95
  :'commenter_follower_count' => :'commenterFollowerCount',
91
96
  :'error' => :'error',
97
+ :'platform_error' => :'platformError',
98
+ :'private_reply_consumed' => :'privateReplyConsumed',
92
99
  :'comment_reply_status' => :'commentReplyStatus',
93
100
  :'comment_reply_error' => :'commentReplyError',
94
101
  :'next_due_at' => :'nextDueAt',
@@ -120,6 +127,8 @@ module Zernio
120
127
  :'commenter_is_follower' => :'Boolean',
121
128
  :'commenter_follower_count' => :'Integer',
122
129
  :'error' => :'String',
130
+ :'platform_error' => :'GetCommentAutomation200ResponseLogsInnerPlatformError',
131
+ :'private_reply_consumed' => :'Boolean',
123
132
  :'comment_reply_status' => :'String',
124
133
  :'comment_reply_error' => :'String',
125
134
  :'next_due_at' => :'Time',
@@ -193,6 +202,14 @@ module Zernio
193
202
  self.error = attributes[:'error']
194
203
  end
195
204
 
205
+ if attributes.key?(:'platform_error')
206
+ self.platform_error = attributes[:'platform_error']
207
+ end
208
+
209
+ if attributes.key?(:'private_reply_consumed')
210
+ self.private_reply_consumed = attributes[:'private_reply_consumed']
211
+ end
212
+
196
213
  if attributes.key?(:'comment_reply_status')
197
214
  self.comment_reply_status = attributes[:'comment_reply_status']
198
215
  end
@@ -289,6 +306,8 @@ module Zernio
289
306
  commenter_is_follower == o.commenter_is_follower &&
290
307
  commenter_follower_count == o.commenter_follower_count &&
291
308
  error == o.error &&
309
+ platform_error == o.platform_error &&
310
+ private_reply_consumed == o.private_reply_consumed &&
292
311
  comment_reply_status == o.comment_reply_status &&
293
312
  comment_reply_error == o.comment_reply_error &&
294
313
  next_due_at == o.next_due_at &&
@@ -304,7 +323,7 @@ module Zernio
304
323
  # Calculates hash code according to all attributes.
305
324
  # @return [Integer] Hash code
306
325
  def hash
307
- [id, comment_id, commenter_id, commenter_name, comment_text, source, status, audience_outcome, commenter_is_follower, commenter_follower_count, error, comment_reply_status, comment_reply_error, next_due_at, created_at].hash
326
+ [id, comment_id, commenter_id, commenter_name, comment_text, source, status, audience_outcome, commenter_is_follower, commenter_follower_count, error, platform_error, private_reply_consumed, comment_reply_status, comment_reply_error, next_due_at, created_at].hash
308
327
  end
309
328
 
310
329
  # Builds the object from hash
@@ -0,0 +1,157 @@
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
+ # Platform error codes of the failed DM (Meta `code` and `error_subcode`), when the platform sent them. Absent on successful rows and on rows written before this field existed.
18
+ class GetCommentAutomation200ResponseLogsInnerPlatformError < ApiModelBase
19
+ attr_accessor :code
20
+
21
+ attr_accessor :subcode
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'code' => :'code',
27
+ :'subcode' => :'subcode'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'code' => :'Integer',
45
+ :'subcode' => :'Integer'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetCommentAutomation200ResponseLogsInnerPlatformError` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetCommentAutomation200ResponseLogsInnerPlatformError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'code')
72
+ self.code = attributes[:'code']
73
+ end
74
+
75
+ if attributes.key?(:'subcode')
76
+ self.subcode = attributes[:'subcode']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ warn '[DEPRECATED] the `valid?` method is obsolete'
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(o)
98
+ return true if self.equal?(o)
99
+ self.class == o.class &&
100
+ code == o.code &&
101
+ subcode == o.subcode
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [code, subcode].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ transformed_hash = {}
123
+ openapi_types.each_pair do |key, type|
124
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = nil
126
+ elsif type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[attribute_map[key]].is_a?(Array)
130
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
131
+ end
132
+ elsif !attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
134
+ end
135
+ end
136
+ new(transformed_hash)
137
+ end
138
+
139
+ # Returns the object in the form of hash
140
+ # @return [Hash] Returns the object in the form of hash
141
+ def to_hash
142
+ hash = {}
143
+ self.class.attribute_map.each_pair do |attr, param|
144
+ value = self.send(attr)
145
+ if value.nil?
146
+ is_nullable = self.class.openapi_nullable.include?(attr)
147
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
148
+ end
149
+
150
+ hash[param] = _to_hash(value)
151
+ end
152
+ hash
153
+ end
154
+
155
+ end
156
+
157
+ end