late-sdk 0.0.710 → 0.0.712

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/AdDailyMetrics.md +10 -10
  4. data/docs/AdMetrics.md +10 -10
  5. data/docs/GetCampaignAnalytics200ResponseAnalyticsDailyInner.md +10 -10
  6. data/docs/GetInstagramAudio200Response.md +18 -0
  7. data/docs/InstagramApi.md +148 -0
  8. data/docs/InstagramAudioAsset.md +38 -0
  9. data/docs/InstagramPlatformData.md +3 -1
  10. data/docs/InstagramPlatformDataAudioConfiguration.md +22 -0
  11. data/docs/SearchInstagramAudio200Response.md +18 -0
  12. data/lib/zernio-sdk/api/instagram_api.rb +160 -0
  13. data/lib/zernio-sdk/models/ad_daily_metrics.rb +10 -10
  14. data/lib/zernio-sdk/models/ad_metrics.rb +10 -10
  15. data/lib/zernio-sdk/models/get_campaign_analytics200_response_analytics_daily_inner.rb +10 -10
  16. data/lib/zernio-sdk/models/get_instagram_audio200_response.rb +147 -0
  17. data/lib/zernio-sdk/models/instagram_audio_asset.rb +293 -0
  18. data/lib/zernio-sdk/models/instagram_platform_data.rb +11 -2
  19. data/lib/zernio-sdk/models/instagram_platform_data_audio_configuration.rb +242 -0
  20. data/lib/zernio-sdk/models/search_instagram_audio200_response.rb +149 -0
  21. data/lib/zernio-sdk/version.rb +1 -1
  22. data/lib/zernio-sdk.rb +4 -0
  23. data/openapi.yaml +141 -11
  24. data/spec/api/instagram_api_spec.rb +27 -0
  25. data/spec/models/get_instagram_audio200_response_spec.rb +36 -0
  26. data/spec/models/instagram_audio_asset_spec.rb +100 -0
  27. data/spec/models/instagram_platform_data_audio_configuration_spec.rb +48 -0
  28. data/spec/models/instagram_platform_data_spec.rb +6 -0
  29. data/spec/models/search_instagram_audio200_response_spec.rb +36 -0
  30. data/zernio-sdk-0.0.712.gem +0 -0
  31. metadata +19 -3
  32. data/zernio-sdk-0.0.710.gem +0 -0
@@ -54,34 +54,34 @@ module Zernio
54
54
  # Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
55
55
  attr_accessor :roas
56
56
 
57
- # Meta video ads only (0 for non-video ads and other platforms), like all video* fields below. Number of times the video started playing (Meta `video_play_actions`), summed over the date range and across children at ad-set/campaign level.
57
+ # Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`.
58
58
  attr_accessor :video_play_actions
59
59
 
60
- # Views of at least 30 seconds (or to the end, for shorter videos). Meta `video_30_sec_watched_actions`.
60
+ # Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only).
61
61
  attr_accessor :video30_sec_watched_actions
62
62
 
63
- # ThruPlays (watched to completion, or at least 15 seconds). Meta `video_thruplay_watched_actions`.
63
+ # ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only).
64
64
  attr_accessor :video_thruplay_watched_actions
65
65
 
66
- # Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Meta `video_p25_watched_actions`.
66
+ # Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Sources: Meta `video_p25_watched_actions`, TikTok `video_views_p25`.
67
67
  attr_accessor :video_p25_watched_actions
68
68
 
69
- # Views reaching 50% of the video's length. Meta `video_p50_watched_actions`.
69
+ # Views reaching 50% of the video's length. Sources: Meta `video_p50_watched_actions`, TikTok `video_views_p50`.
70
70
  attr_accessor :video_p50_watched_actions
71
71
 
72
- # Views reaching 75% of the video's length. Meta `video_p75_watched_actions`.
72
+ # Views reaching 75% of the video's length. Sources: Meta `video_p75_watched_actions`, TikTok `video_views_p75`.
73
73
  attr_accessor :video_p75_watched_actions
74
74
 
75
- # Views reaching 95% of the video's length. Meta `video_p95_watched_actions`.
75
+ # Views reaching 95% of the video's length. Sources: Meta `video_p95_watched_actions` (Meta only).
76
76
  attr_accessor :video_p95_watched_actions
77
77
 
78
- # Views reaching 100% of the video's length. Meta `video_p100_watched_actions`.
78
+ # Views reaching 100% of the video's length. Sources: Meta `video_p100_watched_actions`, TikTok `video_views_p100`.
79
79
  attr_accessor :video_p100_watched_actions
80
80
 
81
- # Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages.
81
+ # Average seconds watched per play. Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. Sources: Meta `video_avg_time_watched_actions`, TikTok `average_video_play`.
82
82
  attr_accessor :video_avg_time_watched_actions
83
83
 
84
- # Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays.
84
+ # Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays (ThruPlay is Meta-only).
85
85
  attr_accessor :cost_per_thruplay
86
86
 
87
87
  attr_accessor :funnel
@@ -53,34 +53,34 @@ module Zernio
53
53
  # Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
54
54
  attr_accessor :roas
55
55
 
56
- # Meta video ads only (0 for non-video ads and other platforms), like all video* fields below. Number of times the video started playing (Meta `video_play_actions`), summed over the date range and across children at ad-set/campaign level.
56
+ # Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`.
57
57
  attr_accessor :video_play_actions
58
58
 
59
- # Views of at least 30 seconds (or to the end, for shorter videos). Meta `video_30_sec_watched_actions`.
59
+ # Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only).
60
60
  attr_accessor :video30_sec_watched_actions
61
61
 
62
- # ThruPlays (watched to completion, or at least 15 seconds). Meta `video_thruplay_watched_actions`.
62
+ # ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only).
63
63
  attr_accessor :video_thruplay_watched_actions
64
64
 
65
- # Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Meta `video_p25_watched_actions`.
65
+ # Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Sources: Meta `video_p25_watched_actions`, TikTok `video_views_p25`.
66
66
  attr_accessor :video_p25_watched_actions
67
67
 
68
- # Views reaching 50% of the video's length. Meta `video_p50_watched_actions`.
68
+ # Views reaching 50% of the video's length. Sources: Meta `video_p50_watched_actions`, TikTok `video_views_p50`.
69
69
  attr_accessor :video_p50_watched_actions
70
70
 
71
- # Views reaching 75% of the video's length. Meta `video_p75_watched_actions`.
71
+ # Views reaching 75% of the video's length. Sources: Meta `video_p75_watched_actions`, TikTok `video_views_p75`.
72
72
  attr_accessor :video_p75_watched_actions
73
73
 
74
- # Views reaching 95% of the video's length. Meta `video_p95_watched_actions`.
74
+ # Views reaching 95% of the video's length. Sources: Meta `video_p95_watched_actions` (Meta only).
75
75
  attr_accessor :video_p95_watched_actions
76
76
 
77
- # Views reaching 100% of the video's length. Meta `video_p100_watched_actions`.
77
+ # Views reaching 100% of the video's length. Sources: Meta `video_p100_watched_actions`, TikTok `video_views_p100`.
78
78
  attr_accessor :video_p100_watched_actions
79
79
 
80
- # Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages.
80
+ # Average seconds watched per play. Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. Sources: Meta `video_avg_time_watched_actions`, TikTok `average_video_play`.
81
81
  attr_accessor :video_avg_time_watched_actions
82
82
 
83
- # Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays.
83
+ # Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays (ThruPlay is Meta-only).
84
84
  attr_accessor :cost_per_thruplay
85
85
 
86
86
  attr_accessor :funnel
@@ -53,34 +53,34 @@ module Zernio
53
53
  # Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
54
54
  attr_accessor :roas
55
55
 
56
- # Meta video ads only (0 for non-video ads and other platforms), like all video* fields below. Number of times the video started playing (Meta `video_play_actions`), summed over the date range and across children at ad-set/campaign level.
56
+ # Number of times the video started playing, summed over the date range and across children at ad-set/campaign level. 0 for non-video ads. Sources: Meta `video_play_actions`, TikTok `video_play_actions`.
57
57
  attr_accessor :video_play_actions
58
58
 
59
- # Views of at least 30 seconds (or to the end, for shorter videos). Meta `video_30_sec_watched_actions`.
59
+ # Views of at least 30 seconds (or to the end, for shorter videos). Sources: Meta `video_30_sec_watched_actions` (Meta only).
60
60
  attr_accessor :video30_sec_watched_actions
61
61
 
62
- # ThruPlays (watched to completion, or at least 15 seconds). Meta `video_thruplay_watched_actions`.
62
+ # ThruPlays (watched to completion, or at least 15 seconds). Sources: Meta `video_thruplay_watched_actions` (Meta only).
63
63
  attr_accessor :video_thruplay_watched_actions
64
64
 
65
- # Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Meta `video_p25_watched_actions`.
65
+ # Views reaching 25% of the video's length. With the other percentile fields, powers hook/hold/drop-off analysis (e.g. hook rate = videoP25WatchedActions / videoPlayActions). Sources: Meta `video_p25_watched_actions`, TikTok `video_views_p25`.
66
66
  attr_accessor :video_p25_watched_actions
67
67
 
68
- # Views reaching 50% of the video's length. Meta `video_p50_watched_actions`.
68
+ # Views reaching 50% of the video's length. Sources: Meta `video_p50_watched_actions`, TikTok `video_views_p50`.
69
69
  attr_accessor :video_p50_watched_actions
70
70
 
71
- # Views reaching 75% of the video's length. Meta `video_p75_watched_actions`.
71
+ # Views reaching 75% of the video's length. Sources: Meta `video_p75_watched_actions`, TikTok `video_views_p75`.
72
72
  attr_accessor :video_p75_watched_actions
73
73
 
74
- # Views reaching 95% of the video's length. Meta `video_p95_watched_actions`.
74
+ # Views reaching 95% of the video's length. Sources: Meta `video_p95_watched_actions` (Meta only).
75
75
  attr_accessor :video_p95_watched_actions
76
76
 
77
- # Views reaching 100% of the video's length. Meta `video_p100_watched_actions`.
77
+ # Views reaching 100% of the video's length. Sources: Meta `video_p100_watched_actions`, TikTok `video_views_p100`.
78
78
  attr_accessor :video_p100_watched_actions
79
79
 
80
- # Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages.
80
+ # Average seconds watched per play. Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. Sources: Meta `video_avg_time_watched_actions`, TikTok `average_video_play`.
81
81
  attr_accessor :video_avg_time_watched_actions
82
82
 
83
- # Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays.
83
+ # Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays (ThruPlay is Meta-only).
84
84
  attr_accessor :cost_per_thruplay
85
85
 
86
86
  attr_accessor :funnel
@@ -0,0 +1,147 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GetInstagramAudio200Response < ApiModelBase
18
+ attr_accessor :audio
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'audio' => :'audio'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'audio' => :'InstagramAudioAsset'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetInstagramAudio200Response` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetInstagramAudio200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'audio')
67
+ self.audio = attributes[:'audio']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ audio == o.audio
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [audio].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end
@@ -0,0 +1,293 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ # One asset from the Instagram audio catalog. Licensed music carries artist/artwork fields; original sounds carry creator fields instead, so most fields are nullable.
18
+ class InstagramAudioAsset < ApiModelBase
19
+ # Audio asset ID. Pass it as platformSpecificData.audioConfiguration.audioId when creating a Reel.
20
+ attr_accessor :audio_id
21
+
22
+ # Track or sound title.
23
+ attr_accessor :title
24
+
25
+ # Catalog type of the asset.
26
+ attr_accessor :audio_type
27
+
28
+ # Asset duration in milliseconds.
29
+ attr_accessor :duration_in_ms
30
+
31
+ # Artist name (licensed music only).
32
+ attr_accessor :display_artist
33
+
34
+ # Cover artwork thumbnail (licensed music only).
35
+ attr_accessor :cover_artwork_thumbnail_url
36
+
37
+ # Temporary preview URL. Meta expires it after roughly 1.5 days; re-fetch the asset to refresh it.
38
+ attr_accessor :download_url
39
+
40
+ # Creator username (original sounds only).
41
+ attr_accessor :ig_username
42
+
43
+ # Creator profile picture (original sounds only).
44
+ attr_accessor :profile_picture_url
45
+
46
+ # Whether the asset is eligible for ads use.
47
+ attr_accessor :is_ads_eligible
48
+
49
+ # Instagram web link to preview the audio.
50
+ attr_accessor :on_platform_audio_preview_link
51
+
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ :'audio_id' => :'audioId',
78
+ :'title' => :'title',
79
+ :'audio_type' => :'audioType',
80
+ :'duration_in_ms' => :'durationInMs',
81
+ :'display_artist' => :'displayArtist',
82
+ :'cover_artwork_thumbnail_url' => :'coverArtworkThumbnailUrl',
83
+ :'download_url' => :'downloadUrl',
84
+ :'ig_username' => :'igUsername',
85
+ :'profile_picture_url' => :'profilePictureUrl',
86
+ :'is_ads_eligible' => :'isAdsEligible',
87
+ :'on_platform_audio_preview_link' => :'onPlatformAudioPreviewLink'
88
+ }
89
+ end
90
+
91
+ # Returns attribute mapping this model knows about
92
+ def self.acceptable_attribute_map
93
+ attribute_map
94
+ end
95
+
96
+ # Returns all the JSON keys this model knows about
97
+ def self.acceptable_attributes
98
+ acceptable_attribute_map.values
99
+ end
100
+
101
+ # Attribute type mapping.
102
+ def self.openapi_types
103
+ {
104
+ :'audio_id' => :'String',
105
+ :'title' => :'String',
106
+ :'audio_type' => :'String',
107
+ :'duration_in_ms' => :'Integer',
108
+ :'display_artist' => :'String',
109
+ :'cover_artwork_thumbnail_url' => :'String',
110
+ :'download_url' => :'String',
111
+ :'ig_username' => :'String',
112
+ :'profile_picture_url' => :'String',
113
+ :'is_ads_eligible' => :'Boolean',
114
+ :'on_platform_audio_preview_link' => :'String'
115
+ }
116
+ end
117
+
118
+ # List of attributes with nullable: true
119
+ def self.openapi_nullable
120
+ Set.new([
121
+ :'title',
122
+ :'audio_type',
123
+ :'duration_in_ms',
124
+ :'display_artist',
125
+ :'cover_artwork_thumbnail_url',
126
+ :'download_url',
127
+ :'ig_username',
128
+ :'profile_picture_url',
129
+ :'is_ads_eligible',
130
+ :'on_platform_audio_preview_link'
131
+ ])
132
+ end
133
+
134
+ # Initializes the object
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ def initialize(attributes = {})
137
+ if (!attributes.is_a?(Hash))
138
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::InstagramAudioAsset` initialize method"
139
+ end
140
+
141
+ # check to see if the attribute exists and convert string to symbol for hash key
142
+ acceptable_attribute_map = self.class.acceptable_attribute_map
143
+ attributes = attributes.each_with_object({}) { |(k, v), h|
144
+ if (!acceptable_attribute_map.key?(k.to_sym))
145
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::InstagramAudioAsset`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
146
+ end
147
+ h[k.to_sym] = v
148
+ }
149
+
150
+ if attributes.key?(:'audio_id')
151
+ self.audio_id = attributes[:'audio_id']
152
+ end
153
+
154
+ if attributes.key?(:'title')
155
+ self.title = attributes[:'title']
156
+ end
157
+
158
+ if attributes.key?(:'audio_type')
159
+ self.audio_type = attributes[:'audio_type']
160
+ end
161
+
162
+ if attributes.key?(:'duration_in_ms')
163
+ self.duration_in_ms = attributes[:'duration_in_ms']
164
+ end
165
+
166
+ if attributes.key?(:'display_artist')
167
+ self.display_artist = attributes[:'display_artist']
168
+ end
169
+
170
+ if attributes.key?(:'cover_artwork_thumbnail_url')
171
+ self.cover_artwork_thumbnail_url = attributes[:'cover_artwork_thumbnail_url']
172
+ end
173
+
174
+ if attributes.key?(:'download_url')
175
+ self.download_url = attributes[:'download_url']
176
+ end
177
+
178
+ if attributes.key?(:'ig_username')
179
+ self.ig_username = attributes[:'ig_username']
180
+ end
181
+
182
+ if attributes.key?(:'profile_picture_url')
183
+ self.profile_picture_url = attributes[:'profile_picture_url']
184
+ end
185
+
186
+ if attributes.key?(:'is_ads_eligible')
187
+ self.is_ads_eligible = attributes[:'is_ads_eligible']
188
+ end
189
+
190
+ if attributes.key?(:'on_platform_audio_preview_link')
191
+ self.on_platform_audio_preview_link = attributes[:'on_platform_audio_preview_link']
192
+ end
193
+ end
194
+
195
+ # Show invalid properties with the reasons. Usually used together with valid?
196
+ # @return Array for valid properties with the reasons
197
+ def list_invalid_properties
198
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
199
+ invalid_properties = Array.new
200
+ invalid_properties
201
+ end
202
+
203
+ # Check to see if the all the properties in the model are valid
204
+ # @return true if the model is valid
205
+ def valid?
206
+ warn '[DEPRECATED] the `valid?` method is obsolete'
207
+ audio_type_validator = EnumAttributeValidator.new('String', ["music", "original_sound"])
208
+ return false unless audio_type_validator.valid?(@audio_type)
209
+ true
210
+ end
211
+
212
+ # Custom attribute writer method checking allowed values (enum).
213
+ # @param [Object] audio_type Object to be assigned
214
+ def audio_type=(audio_type)
215
+ validator = EnumAttributeValidator.new('String', ["music", "original_sound"])
216
+ unless validator.valid?(audio_type)
217
+ fail ArgumentError, "invalid value for \"audio_type\", must be one of #{validator.allowable_values}."
218
+ end
219
+ @audio_type = audio_type
220
+ end
221
+
222
+ # Checks equality by comparing each attribute.
223
+ # @param [Object] Object to be compared
224
+ def ==(o)
225
+ return true if self.equal?(o)
226
+ self.class == o.class &&
227
+ audio_id == o.audio_id &&
228
+ title == o.title &&
229
+ audio_type == o.audio_type &&
230
+ duration_in_ms == o.duration_in_ms &&
231
+ display_artist == o.display_artist &&
232
+ cover_artwork_thumbnail_url == o.cover_artwork_thumbnail_url &&
233
+ download_url == o.download_url &&
234
+ ig_username == o.ig_username &&
235
+ profile_picture_url == o.profile_picture_url &&
236
+ is_ads_eligible == o.is_ads_eligible &&
237
+ on_platform_audio_preview_link == o.on_platform_audio_preview_link
238
+ end
239
+
240
+ # @see the `==` method
241
+ # @param [Object] Object to be compared
242
+ def eql?(o)
243
+ self == o
244
+ end
245
+
246
+ # Calculates hash code according to all attributes.
247
+ # @return [Integer] Hash code
248
+ def hash
249
+ [audio_id, title, audio_type, duration_in_ms, display_artist, cover_artwork_thumbnail_url, download_url, ig_username, profile_picture_url, is_ads_eligible, on_platform_audio_preview_link].hash
250
+ end
251
+
252
+ # Builds the object from hash
253
+ # @param [Hash] attributes Model attributes in the form of hash
254
+ # @return [Object] Returns the model itself
255
+ def self.build_from_hash(attributes)
256
+ return nil unless attributes.is_a?(Hash)
257
+ attributes = attributes.transform_keys(&:to_sym)
258
+ transformed_hash = {}
259
+ openapi_types.each_pair do |key, type|
260
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
261
+ transformed_hash["#{key}"] = nil
262
+ elsif type =~ /\AArray<(.*)>/i
263
+ # check to ensure the input is an array given that the attribute
264
+ # is documented as an array but the input is not
265
+ if attributes[attribute_map[key]].is_a?(Array)
266
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
267
+ end
268
+ elsif !attributes[attribute_map[key]].nil?
269
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
270
+ end
271
+ end
272
+ new(transformed_hash)
273
+ end
274
+
275
+ # Returns the object in the form of hash
276
+ # @return [Hash] Returns the object in the form of hash
277
+ def to_hash
278
+ hash = {}
279
+ self.class.attribute_map.each_pair do |attr, param|
280
+ value = self.send(attr)
281
+ if value.nil?
282
+ is_nullable = self.class.openapi_nullable.include?(attr)
283
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
284
+ end
285
+
286
+ hash[param] = _to_hash(value)
287
+ end
288
+ hash
289
+ end
290
+
291
+ end
292
+
293
+ end
@@ -33,9 +33,11 @@ module Zernio
33
33
  # Tag Instagram users by username. The tag shape depends on the media: photos require x/y coordinates, Reels and videos take username only (coordinates are ignored), stories accept optional coordinates. For carousels, use mediaIndex to target specific slides (defaults to 0); video slides take username-only tags. Photo tags without valid coordinates are skipped.
34
34
  attr_accessor :user_tags
35
35
 
36
- # Custom name for original audio in Reels. Replaces the default \"Original Audio\" label. Can only be set once.
36
+ # Custom name for original audio in Reels. Replaces the default \"Original Audio\" label. Can only be set once. Unrelated to audioConfiguration, which attaches a catalog track.
37
37
  attr_accessor :audio_name
38
38
 
39
+ attr_accessor :audio_configuration
40
+
39
41
  # Millisecond offset from video start for the Reel cover frame. Ignored when instagramThumbnail or reelCover is provided. Defaults to 0.
40
42
  attr_accessor :thumb_offset
41
43
 
@@ -80,6 +82,7 @@ module Zernio
80
82
  :'trial_params' => :'trialParams',
81
83
  :'user_tags' => :'userTags',
82
84
  :'audio_name' => :'audioName',
85
+ :'audio_configuration' => :'audioConfiguration',
83
86
  :'thumb_offset' => :'thumbOffset',
84
87
  :'instagram_thumbnail' => :'instagramThumbnail',
85
88
  :'reel_cover' => :'reelCover',
@@ -107,6 +110,7 @@ module Zernio
107
110
  :'trial_params' => :'InstagramPlatformDataTrialParams',
108
111
  :'user_tags' => :'Array<InstagramPlatformDataUserTagsInner>',
109
112
  :'audio_name' => :'String',
113
+ :'audio_configuration' => :'InstagramPlatformDataAudioConfiguration',
110
114
  :'thumb_offset' => :'Integer',
111
115
  :'instagram_thumbnail' => :'String',
112
116
  :'reel_cover' => :'String',
@@ -170,6 +174,10 @@ module Zernio
170
174
  self.audio_name = attributes[:'audio_name']
171
175
  end
172
176
 
177
+ if attributes.key?(:'audio_configuration')
178
+ self.audio_configuration = attributes[:'audio_configuration']
179
+ end
180
+
173
181
  if attributes.key?(:'thumb_offset')
174
182
  self.thumb_offset = attributes[:'thumb_offset']
175
183
  end
@@ -247,6 +255,7 @@ module Zernio
247
255
  trial_params == o.trial_params &&
248
256
  user_tags == o.user_tags &&
249
257
  audio_name == o.audio_name &&
258
+ audio_configuration == o.audio_configuration &&
250
259
  thumb_offset == o.thumb_offset &&
251
260
  instagram_thumbnail == o.instagram_thumbnail &&
252
261
  reel_cover == o.reel_cover &&
@@ -262,7 +271,7 @@ module Zernio
262
271
  # Calculates hash code according to all attributes.
263
272
  # @return [Integer] Hash code
264
273
  def hash
265
- [content_type, share_to_feed, collaborators, first_comment, trial_params, user_tags, audio_name, thumb_offset, instagram_thumbnail, reel_cover, is_ai_generated].hash
274
+ [content_type, share_to_feed, collaborators, first_comment, trial_params, user_tags, audio_name, audio_configuration, thumb_offset, instagram_thumbnail, reel_cover, is_ai_generated].hash
266
275
  end
267
276
 
268
277
  # Builds the object from hash