late-sdk 0.0.715 → 0.0.716

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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -10
  3. data/docs/AdAnalyticsResponse.md +22 -0
  4. data/docs/{GetAdAnalytics200ResponseAd.md → AdAnalyticsResponseAd.md} +2 -4
  5. data/docs/AdCampaignsApi.md +12 -12
  6. data/docs/AdInsightsApi.md +8 -8
  7. data/docs/AdTreeResponse.md +22 -0
  8. data/docs/AdsListResponse.md +22 -0
  9. data/docs/AdsTimelineResponse.md +20 -0
  10. data/docs/{GetAdsTimeline200ResponseRowsInner.md → AdsTimelineResponseRowsInner.md} +2 -2
  11. data/docs/CampaignAnalyticsResponse.md +22 -0
  12. data/docs/{GetCampaignAnalytics200ResponseAnalytics.md → CampaignAnalyticsResponseAnalytics.md} +3 -3
  13. data/docs/{GetCampaignAnalytics200ResponseAnalyticsDailyInner.md → CampaignAnalyticsResponseAnalyticsDailyInner.md} +2 -2
  14. data/docs/{GetCampaignAnalytics200ResponseCampaign.md → CampaignAnalyticsResponseCampaign.md} +2 -2
  15. data/docs/GetAdAnalytics202Response.md +22 -0
  16. data/docs/GetAdTree202Response.md +22 -0
  17. data/docs/GetAdsTimeline202Response.md +20 -0
  18. data/docs/GetCampaignAnalytics202Response.md +22 -0
  19. data/docs/ListAds202Response.md +22 -0
  20. data/lib/zernio-sdk/api/ad_campaigns_api.rb +9 -9
  21. data/lib/zernio-sdk/api/ad_insights_api.rb +6 -6
  22. data/lib/zernio-sdk/models/{get_ad_analytics200_response.rb → ad_analytics_response.rb} +15 -15
  23. data/lib/zernio-sdk/models/{get_ad_analytics200_response_ad.rb → ad_analytics_response_ad.rb} +4 -47
  24. data/lib/zernio-sdk/models/{get_ad_tree200_response.rb → ad_tree_response.rb} +17 -17
  25. data/lib/zernio-sdk/models/{list_ads200_response.rb → ads_list_response.rb} +17 -17
  26. data/lib/zernio-sdk/models/{get_ads_timeline200_response.rb → ads_timeline_response.rb} +17 -17
  27. data/lib/zernio-sdk/models/{get_ads_timeline200_response_rows_inner.rb → ads_timeline_response_rows_inner.rb} +3 -3
  28. data/lib/zernio-sdk/models/{get_campaign_analytics200_response.rb → campaign_analytics_response.rb} +15 -15
  29. data/lib/zernio-sdk/models/{get_campaign_analytics200_response_analytics.rb → campaign_analytics_response_analytics.rb} +4 -4
  30. data/lib/zernio-sdk/models/{get_campaign_analytics200_response_analytics_daily_inner.rb → campaign_analytics_response_analytics_daily_inner.rb} +3 -3
  31. data/lib/zernio-sdk/models/{get_campaign_analytics200_response_campaign.rb → campaign_analytics_response_campaign.rb} +3 -3
  32. data/lib/zernio-sdk/models/get_ad_analytics202_response.rb +213 -0
  33. data/lib/zernio-sdk/models/get_ad_tree202_response.rb +215 -0
  34. data/lib/zernio-sdk/models/get_ads_timeline202_response.rb +206 -0
  35. data/lib/zernio-sdk/models/get_campaign_analytics202_response.rb +213 -0
  36. data/lib/zernio-sdk/models/list_ads202_response.rb +215 -0
  37. data/lib/zernio-sdk/version.rb +1 -1
  38. data/lib/zernio-sdk.rb +15 -10
  39. data/openapi.yaml +190 -122
  40. data/spec/api/ad_campaigns_api_spec.rb +3 -3
  41. data/spec/api/ad_insights_api_spec.rb +2 -2
  42. data/spec/models/{get_campaign_analytics200_response_campaign_spec.rb → ad_analytics_response_ad_spec.rb} +6 -6
  43. data/spec/models/{get_ad_analytics200_response_spec.rb → ad_analytics_response_spec.rb} +8 -8
  44. data/spec/models/{get_ad_tree200_response_spec.rb → ad_tree_response_spec.rb} +8 -8
  45. data/spec/models/{list_ads200_response_spec.rb → ads_list_response_spec.rb} +8 -8
  46. data/spec/models/{get_ads_timeline200_response_rows_inner_spec.rb → ads_timeline_response_rows_inner_spec.rb} +6 -6
  47. data/spec/models/{get_ads_timeline200_response_spec.rb → ads_timeline_response_spec.rb} +8 -8
  48. data/spec/models/{get_campaign_analytics200_response_analytics_daily_inner_spec.rb → campaign_analytics_response_analytics_daily_inner_spec.rb} +6 -6
  49. data/spec/models/{get_campaign_analytics200_response_analytics_spec.rb → campaign_analytics_response_analytics_spec.rb} +6 -6
  50. data/spec/models/{get_ad_analytics200_response_ad_spec.rb → campaign_analytics_response_campaign_spec.rb} +6 -16
  51. data/spec/models/{get_campaign_analytics200_response_spec.rb → campaign_analytics_response_spec.rb} +8 -8
  52. data/spec/models/get_ad_analytics202_response_spec.rb +52 -0
  53. data/spec/models/get_ad_tree202_response_spec.rb +52 -0
  54. data/spec/models/get_ads_timeline202_response_spec.rb +46 -0
  55. data/spec/models/get_campaign_analytics202_response_spec.rb +52 -0
  56. data/spec/models/list_ads202_response_spec.rb +52 -0
  57. data/zernio-sdk-0.0.716.gem +0 -0
  58. metadata +62 -42
  59. data/docs/GetAdAnalytics200Response.md +0 -22
  60. data/docs/GetAdTree200Response.md +0 -22
  61. data/docs/GetAdsTimeline200Response.md +0 -20
  62. data/docs/GetCampaignAnalytics200Response.md +0 -22
  63. data/docs/ListAds200Response.md +0 -22
  64. data/zernio-sdk-0.0.715.gem +0 -0
@@ -835,7 +835,7 @@ module Zernio
835
835
  # @option opts [String] :sort Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end. (default to 'newest')
836
836
  # @option opts [Integer] :time_increment Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except `reach` on Meta and TikTok: the range total is the platform's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
837
837
  # @option opts [String] :daily_level Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset. (default to 'campaign')
838
- # @return [GetAdTree200Response]
838
+ # @return [AdTreeResponse]
839
839
  def get_ad_tree(opts = {})
840
840
  data, _status_code, _headers = get_ad_tree_with_http_info(opts)
841
841
  data
@@ -859,7 +859,7 @@ module Zernio
859
859
  # @option opts [String] :sort Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end. (default to 'newest')
860
860
  # @option opts [Integer] :time_increment Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except `reach` on Meta and TikTok: the range total is the platform's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
861
861
  # @option opts [String] :daily_level Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset. (default to 'campaign')
862
- # @return [Array<(GetAdTree200Response, Integer, Hash)>] GetAdTree200Response data, response status code and response headers
862
+ # @return [Array<(AdTreeResponse, Integer, Hash)>] AdTreeResponse data, response status code and response headers
863
863
  def get_ad_tree_with_http_info(opts = {})
864
864
  if @api_client.config.debugging
865
865
  @api_client.config.logger.debug 'Calling API: AdCampaignsApi.get_ad_tree ...'
@@ -929,7 +929,7 @@ module Zernio
929
929
  post_body = opts[:debug_body]
930
930
 
931
931
  # return_type
932
- return_type = opts[:debug_return_type] || 'GetAdTree200Response'
932
+ return_type = opts[:debug_return_type] || 'AdTreeResponse'
933
933
 
934
934
  # auth_names
935
935
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
@@ -959,7 +959,7 @@ module Zernio
959
959
  # @option opts [Date] :from_date Inclusive start of metrics range (YYYY-MM-DD). Defaults to 90 days ago.
960
960
  # @option opts [Date] :to_date Inclusive end of metrics range (YYYY-MM-DD). Defaults to today. Max 730-day range.
961
961
  # @option opts [String] :platform Restrict to one platform.
962
- # @return [GetAdsTimeline200Response]
962
+ # @return [AdsTimelineResponse]
963
963
  def get_ads_timeline(account_id, opts = {})
964
964
  data, _status_code, _headers = get_ads_timeline_with_http_info(account_id, opts)
965
965
  data
@@ -973,7 +973,7 @@ module Zernio
973
973
  # @option opts [Date] :from_date Inclusive start of metrics range (YYYY-MM-DD). Defaults to 90 days ago.
974
974
  # @option opts [Date] :to_date Inclusive end of metrics range (YYYY-MM-DD). Defaults to today. Max 730-day range.
975
975
  # @option opts [String] :platform Restrict to one platform.
976
- # @return [Array<(GetAdsTimeline200Response, Integer, Hash)>] GetAdsTimeline200Response data, response status code and response headers
976
+ # @return [Array<(AdsTimelineResponse, Integer, Hash)>] AdsTimelineResponse data, response status code and response headers
977
977
  def get_ads_timeline_with_http_info(account_id, opts = {})
978
978
  if @api_client.config.debugging
979
979
  @api_client.config.logger.debug 'Calling API: AdCampaignsApi.get_ads_timeline ...'
@@ -1009,7 +1009,7 @@ module Zernio
1009
1009
  post_body = opts[:debug_body]
1010
1010
 
1011
1011
  # return_type
1012
- return_type = opts[:debug_return_type] || 'GetAdsTimeline200Response'
1012
+ return_type = opts[:debug_return_type] || 'AdsTimelineResponse'
1013
1013
 
1014
1014
  # auth_names
1015
1015
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
@@ -1276,7 +1276,7 @@ module Zernio
1276
1276
  # @option opts [String] :effective_instagram_media_id Instagram media ID of the boosted post (Meta &#x60;effective_instagram_media_id&#x60;). Use to map a Business-Manager-visible IG post back to the Zernio ad.
1277
1277
  # @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
1278
1278
  # @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
1279
- # @return [ListAds200Response]
1279
+ # @return [AdsListResponse]
1280
1280
  def list_ads(opts = {})
1281
1281
  data, _status_code, _headers = list_ads_with_http_info(opts)
1282
1282
  data
@@ -1300,7 +1300,7 @@ module Zernio
1300
1300
  # @option opts [String] :effective_instagram_media_id Instagram media ID of the boosted post (Meta &#x60;effective_instagram_media_id&#x60;). Use to map a Business-Manager-visible IG post back to the Zernio ad.
1301
1301
  # @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
1302
1302
  # @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
1303
- # @return [Array<(ListAds200Response, Integer, Hash)>] ListAds200Response data, response status code and response headers
1303
+ # @return [Array<(AdsListResponse, Integer, Hash)>] AdsListResponse data, response status code and response headers
1304
1304
  def list_ads_with_http_info(opts = {})
1305
1305
  if @api_client.config.debugging
1306
1306
  @api_client.config.logger.debug 'Calling API: AdCampaignsApi.list_ads ...'
@@ -1358,7 +1358,7 @@ module Zernio
1358
1358
  post_body = opts[:debug_body]
1359
1359
 
1360
1360
  # return_type
1361
- return_type = opts[:debug_return_type] || 'ListAds200Response'
1361
+ return_type = opts[:debug_return_type] || 'AdsListResponse'
1362
1362
 
1363
1363
  # auth_names
1364
1364
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
@@ -230,7 +230,7 @@ module Zernio
230
230
  # @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
231
231
  # @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
232
232
  # @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region. **TikTok**: gender, age, country_code, platform, ac, language. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot &#x60;value&#x60; plus a resolved &#x60;name&#x60;. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
233
- # @return [GetAdAnalytics200Response]
233
+ # @return [AdAnalyticsResponse]
234
234
  def get_ad_analytics(ad_id, opts = {})
235
235
  data, _status_code, _headers = get_ad_analytics_with_http_info(ad_id, opts)
236
236
  data
@@ -243,7 +243,7 @@ module Zernio
243
243
  # @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
244
244
  # @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
245
245
  # @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region. **TikTok**: gender, age, country_code, platform, ac, language. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot &#x60;value&#x60; plus a resolved &#x60;name&#x60;. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
246
- # @return [Array<(GetAdAnalytics200Response, Integer, Hash)>] GetAdAnalytics200Response data, response status code and response headers
246
+ # @return [Array<(AdAnalyticsResponse, Integer, Hash)>] AdAnalyticsResponse data, response status code and response headers
247
247
  def get_ad_analytics_with_http_info(ad_id, opts = {})
248
248
  if @api_client.config.debugging
249
249
  @api_client.config.logger.debug 'Calling API: AdInsightsApi.get_ad_analytics ...'
@@ -273,7 +273,7 @@ module Zernio
273
273
  post_body = opts[:debug_body]
274
274
 
275
275
  # return_type
276
- return_type = opts[:debug_return_type] || 'GetAdAnalytics200Response'
276
+ return_type = opts[:debug_return_type] || 'AdAnalyticsResponse'
277
277
 
278
278
  # auth_names
279
279
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
@@ -469,7 +469,7 @@ module Zernio
469
469
  # @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
470
470
  # @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
471
471
  # @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region, platform_position, impression_device, video_asset, image_asset, body_asset, title_asset. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot &#x60;value&#x60; plus a resolved &#x60;name&#x60;. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
472
- # @return [GetCampaignAnalytics200Response]
472
+ # @return [CampaignAnalyticsResponse]
473
473
  def get_campaign_analytics(campaign_id, opts = {})
474
474
  data, _status_code, _headers = get_campaign_analytics_with_http_info(campaign_id, opts)
475
475
  data
@@ -483,7 +483,7 @@ module Zernio
483
483
  # @option opts [Date] :from_date Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
484
484
  # @option opts [Date] :to_date End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
485
485
  # @option opts [String] :breakdowns Comma-separated breakdown dimensions. **Meta**: age, gender, country, publisher_platform, device_platform, region, platform_position, impression_device, video_asset, image_asset, body_asset, title_asset. **LinkedIn** (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot &#x60;value&#x60; plus a resolved &#x60;name&#x60;. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.
486
- # @return [Array<(GetCampaignAnalytics200Response, Integer, Hash)>] GetCampaignAnalytics200Response data, response status code and response headers
486
+ # @return [Array<(CampaignAnalyticsResponse, Integer, Hash)>] CampaignAnalyticsResponse data, response status code and response headers
487
487
  def get_campaign_analytics_with_http_info(campaign_id, opts = {})
488
488
  if @api_client.config.debugging
489
489
  @api_client.config.logger.debug 'Calling API: AdInsightsApi.get_campaign_analytics ...'
@@ -514,7 +514,7 @@ module Zernio
514
514
  post_body = opts[:debug_body]
515
515
 
516
516
  # return_type
517
- return_type = opts[:debug_return_type] || 'GetCampaignAnalytics200Response'
517
+ return_type = opts[:debug_return_type] || 'CampaignAnalyticsResponse'
518
518
 
519
519
  # auth_names
520
520
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
@@ -14,19 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- class GetAdAnalytics200Response < ApiModelBase
18
- attr_accessor :ad
19
-
20
- # Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested.
17
+ class AdAnalyticsResponse < ApiModelBase
18
+ # Present and true while historical data is being backfilled.
21
19
  attr_accessor :backfill_pending
22
20
 
21
+ attr_accessor :ad
22
+
23
23
  attr_accessor :analytics
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
26
26
  def self.attribute_map
27
27
  {
28
- :'ad' => :'ad',
29
28
  :'backfill_pending' => :'backfillPending',
29
+ :'ad' => :'ad',
30
30
  :'analytics' => :'analytics'
31
31
  }
32
32
  end
@@ -44,9 +44,9 @@ module Zernio
44
44
  # Attribute type mapping.
45
45
  def self.openapi_types
46
46
  {
47
- :'ad' => :'GetAdAnalytics200ResponseAd',
48
47
  :'backfill_pending' => :'Boolean',
49
- :'analytics' => :'GetCampaignAnalytics200ResponseAnalytics'
48
+ :'ad' => :'AdAnalyticsResponseAd',
49
+ :'analytics' => :'CampaignAnalyticsResponseAnalytics'
50
50
  }
51
51
  end
52
52
 
@@ -60,26 +60,26 @@ module Zernio
60
60
  # @param [Hash] attributes Model attributes in the form of hash
61
61
  def initialize(attributes = {})
62
62
  if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdAnalytics200Response` initialize method"
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdAnalyticsResponse` initialize method"
64
64
  end
65
65
 
66
66
  # check to see if the attribute exists and convert string to symbol for hash key
67
67
  acceptable_attribute_map = self.class.acceptable_attribute_map
68
68
  attributes = attributes.each_with_object({}) { |(k, v), h|
69
69
  if (!acceptable_attribute_map.key?(k.to_sym))
70
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdAnalytics200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdAnalyticsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
71
  end
72
72
  h[k.to_sym] = v
73
73
  }
74
74
 
75
- if attributes.key?(:'ad')
76
- self.ad = attributes[:'ad']
77
- end
78
-
79
75
  if attributes.key?(:'backfill_pending')
80
76
  self.backfill_pending = attributes[:'backfill_pending']
81
77
  end
82
78
 
79
+ if attributes.key?(:'ad')
80
+ self.ad = attributes[:'ad']
81
+ end
82
+
83
83
  if attributes.key?(:'analytics')
84
84
  self.analytics = attributes[:'analytics']
85
85
  end
@@ -105,8 +105,8 @@ module Zernio
105
105
  def ==(o)
106
106
  return true if self.equal?(o)
107
107
  self.class == o.class &&
108
- ad == o.ad &&
109
108
  backfill_pending == o.backfill_pending &&
109
+ ad == o.ad &&
110
110
  analytics == o.analytics
111
111
  end
112
112
 
@@ -119,7 +119,7 @@ module Zernio
119
119
  # Calculates hash code according to all attributes.
120
120
  # @return [Integer] Hash code
121
121
  def hash
122
- [ad, backfill_pending, analytics].hash
122
+ [backfill_pending, ad, analytics].hash
123
123
  end
124
124
 
125
125
  # Builds the object from hash
@@ -14,49 +14,24 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- class GetAdAnalytics200ResponseAd < ApiModelBase
17
+ class AdAnalyticsResponseAd < ApiModelBase
18
18
  attr_accessor :id
19
19
 
20
20
  attr_accessor :name
21
21
 
22
22
  attr_accessor :platform
23
23
 
24
- attr_accessor :trigger
25
-
26
24
  attr_accessor :status
27
25
 
28
26
  # ISO 4217 code of the ad account that owns this ad (e.g. USD, THB, INR). All money values in `summary` and `daily` are in this currency. Null only on legacy ads synced before currency was persisted.
29
27
  attr_accessor :currency
30
28
 
31
- class EnumAttributeValidator
32
- attr_reader :datatype
33
- attr_reader :allowable_values
34
-
35
- def initialize(datatype, allowable_values)
36
- @allowable_values = allowable_values.map do |value|
37
- case datatype.to_s
38
- when /Integer/i
39
- value.to_i
40
- when /Float/i
41
- value.to_f
42
- else
43
- value
44
- end
45
- end
46
- end
47
-
48
- def valid?(value)
49
- !value || allowable_values.include?(value)
50
- end
51
- end
52
-
53
29
  # Attribute mapping from ruby-style variable name to JSON key.
54
30
  def self.attribute_map
55
31
  {
56
32
  :'id' => :'id',
57
33
  :'name' => :'name',
58
34
  :'platform' => :'platform',
59
- :'trigger' => :'trigger',
60
35
  :'status' => :'status',
61
36
  :'currency' => :'currency'
62
37
  }
@@ -78,7 +53,6 @@ module Zernio
78
53
  :'id' => :'String',
79
54
  :'name' => :'String',
80
55
  :'platform' => :'String',
81
- :'trigger' => :'String',
82
56
  :'status' => :'String',
83
57
  :'currency' => :'String'
84
58
  }
@@ -95,14 +69,14 @@ module Zernio
95
69
  # @param [Hash] attributes Model attributes in the form of hash
96
70
  def initialize(attributes = {})
97
71
  if (!attributes.is_a?(Hash))
98
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdAnalytics200ResponseAd` initialize method"
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdAnalyticsResponseAd` initialize method"
99
73
  end
100
74
 
101
75
  # check to see if the attribute exists and convert string to symbol for hash key
102
76
  acceptable_attribute_map = self.class.acceptable_attribute_map
103
77
  attributes = attributes.each_with_object({}) { |(k, v), h|
104
78
  if (!acceptable_attribute_map.key?(k.to_sym))
105
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdAnalytics200ResponseAd`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdAnalyticsResponseAd`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
106
80
  end
107
81
  h[k.to_sym] = v
108
82
  }
@@ -119,10 +93,6 @@ module Zernio
119
93
  self.platform = attributes[:'platform']
120
94
  end
121
95
 
122
- if attributes.key?(:'trigger')
123
- self.trigger = attributes[:'trigger']
124
- end
125
-
126
96
  if attributes.key?(:'status')
127
97
  self.status = attributes[:'status']
128
98
  end
@@ -144,21 +114,9 @@ module Zernio
144
114
  # @return true if the model is valid
145
115
  def valid?
146
116
  warn '[DEPRECATED] the `valid?` method is obsolete'
147
- trigger_validator = EnumAttributeValidator.new('String', ["comment", "story_reply"])
148
- return false unless trigger_validator.valid?(@trigger)
149
117
  true
150
118
  end
151
119
 
152
- # Custom attribute writer method checking allowed values (enum).
153
- # @param [Object] trigger Object to be assigned
154
- def trigger=(trigger)
155
- validator = EnumAttributeValidator.new('String', ["comment", "story_reply"])
156
- unless validator.valid?(trigger)
157
- fail ArgumentError, "invalid value for \"trigger\", must be one of #{validator.allowable_values}."
158
- end
159
- @trigger = trigger
160
- end
161
-
162
120
  # Checks equality by comparing each attribute.
163
121
  # @param [Object] Object to be compared
164
122
  def ==(o)
@@ -167,7 +125,6 @@ module Zernio
167
125
  id == o.id &&
168
126
  name == o.name &&
169
127
  platform == o.platform &&
170
- trigger == o.trigger &&
171
128
  status == o.status &&
172
129
  currency == o.currency
173
130
  end
@@ -181,7 +138,7 @@ module Zernio
181
138
  # Calculates hash code according to all attributes.
182
139
  # @return [Integer] Hash code
183
140
  def hash
184
- [id, name, platform, trigger, status, currency].hash
141
+ [id, name, platform, status, currency].hash
185
142
  end
186
143
 
187
144
  # Builds the object from hash
@@ -14,20 +14,20 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- class GetAdTree200Response < ApiModelBase
17
+ class AdTreeResponse < ApiModelBase
18
18
  attr_accessor :campaigns
19
19
 
20
- # Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested.
21
- attr_accessor :backfill_pending
22
-
23
20
  attr_accessor :pagination
24
21
 
22
+ # Present and true while historical data is being backfilled.
23
+ attr_accessor :backfill_pending
24
+
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
26
26
  def self.attribute_map
27
27
  {
28
28
  :'campaigns' => :'campaigns',
29
- :'backfill_pending' => :'backfillPending',
30
- :'pagination' => :'pagination'
29
+ :'pagination' => :'pagination',
30
+ :'backfill_pending' => :'backfillPending'
31
31
  }
32
32
  end
33
33
 
@@ -45,8 +45,8 @@ module Zernio
45
45
  def self.openapi_types
46
46
  {
47
47
  :'campaigns' => :'Array<AdTreeCampaign>',
48
- :'backfill_pending' => :'Boolean',
49
- :'pagination' => :'Pagination'
48
+ :'pagination' => :'Pagination',
49
+ :'backfill_pending' => :'Boolean'
50
50
  }
51
51
  end
52
52
 
@@ -60,14 +60,14 @@ module Zernio
60
60
  # @param [Hash] attributes Model attributes in the form of hash
61
61
  def initialize(attributes = {})
62
62
  if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdTree200Response` initialize method"
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdTreeResponse` initialize method"
64
64
  end
65
65
 
66
66
  # check to see if the attribute exists and convert string to symbol for hash key
67
67
  acceptable_attribute_map = self.class.acceptable_attribute_map
68
68
  attributes = attributes.each_with_object({}) { |(k, v), h|
69
69
  if (!acceptable_attribute_map.key?(k.to_sym))
70
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdTree200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdTreeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
71
  end
72
72
  h[k.to_sym] = v
73
73
  }
@@ -78,13 +78,13 @@ module Zernio
78
78
  end
79
79
  end
80
80
 
81
- if attributes.key?(:'backfill_pending')
82
- self.backfill_pending = attributes[:'backfill_pending']
83
- end
84
-
85
81
  if attributes.key?(:'pagination')
86
82
  self.pagination = attributes[:'pagination']
87
83
  end
84
+
85
+ if attributes.key?(:'backfill_pending')
86
+ self.backfill_pending = attributes[:'backfill_pending']
87
+ end
88
88
  end
89
89
 
90
90
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -108,8 +108,8 @@ module Zernio
108
108
  return true if self.equal?(o)
109
109
  self.class == o.class &&
110
110
  campaigns == o.campaigns &&
111
- backfill_pending == o.backfill_pending &&
112
- pagination == o.pagination
111
+ pagination == o.pagination &&
112
+ backfill_pending == o.backfill_pending
113
113
  end
114
114
 
115
115
  # @see the `==` method
@@ -121,7 +121,7 @@ module Zernio
121
121
  # Calculates hash code according to all attributes.
122
122
  # @return [Integer] Hash code
123
123
  def hash
124
- [campaigns, backfill_pending, pagination].hash
124
+ [campaigns, pagination, backfill_pending].hash
125
125
  end
126
126
 
127
127
  # Builds the object from hash
@@ -14,20 +14,20 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- class ListAds200Response < ApiModelBase
17
+ class AdsListResponse < ApiModelBase
18
18
  attr_accessor :ads
19
19
 
20
- # Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested.
21
- attr_accessor :backfill_pending
22
-
23
20
  attr_accessor :pagination
24
21
 
22
+ # Present and true while historical data is being backfilled.
23
+ attr_accessor :backfill_pending
24
+
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
26
26
  def self.attribute_map
27
27
  {
28
28
  :'ads' => :'ads',
29
- :'backfill_pending' => :'backfillPending',
30
- :'pagination' => :'pagination'
29
+ :'pagination' => :'pagination',
30
+ :'backfill_pending' => :'backfillPending'
31
31
  }
32
32
  end
33
33
 
@@ -45,8 +45,8 @@ module Zernio
45
45
  def self.openapi_types
46
46
  {
47
47
  :'ads' => :'Array<Ad>',
48
- :'backfill_pending' => :'Boolean',
49
- :'pagination' => :'Pagination'
48
+ :'pagination' => :'Pagination',
49
+ :'backfill_pending' => :'Boolean'
50
50
  }
51
51
  end
52
52
 
@@ -60,14 +60,14 @@ module Zernio
60
60
  # @param [Hash] attributes Model attributes in the form of hash
61
61
  def initialize(attributes = {})
62
62
  if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListAds200Response` initialize method"
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdsListResponse` initialize method"
64
64
  end
65
65
 
66
66
  # check to see if the attribute exists and convert string to symbol for hash key
67
67
  acceptable_attribute_map = self.class.acceptable_attribute_map
68
68
  attributes = attributes.each_with_object({}) { |(k, v), h|
69
69
  if (!acceptable_attribute_map.key?(k.to_sym))
70
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListAds200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdsListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
71
  end
72
72
  h[k.to_sym] = v
73
73
  }
@@ -78,13 +78,13 @@ module Zernio
78
78
  end
79
79
  end
80
80
 
81
- if attributes.key?(:'backfill_pending')
82
- self.backfill_pending = attributes[:'backfill_pending']
83
- end
84
-
85
81
  if attributes.key?(:'pagination')
86
82
  self.pagination = attributes[:'pagination']
87
83
  end
84
+
85
+ if attributes.key?(:'backfill_pending')
86
+ self.backfill_pending = attributes[:'backfill_pending']
87
+ end
88
88
  end
89
89
 
90
90
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -108,8 +108,8 @@ module Zernio
108
108
  return true if self.equal?(o)
109
109
  self.class == o.class &&
110
110
  ads == o.ads &&
111
- backfill_pending == o.backfill_pending &&
112
- pagination == o.pagination
111
+ pagination == o.pagination &&
112
+ backfill_pending == o.backfill_pending
113
113
  end
114
114
 
115
115
  # @see the `==` method
@@ -121,7 +121,7 @@ module Zernio
121
121
  # Calculates hash code according to all attributes.
122
122
  # @return [Integer] Hash code
123
123
  def hash
124
- [ads, backfill_pending, pagination].hash
124
+ [ads, pagination, backfill_pending].hash
125
125
  end
126
126
 
127
127
  # Builds the object from hash
@@ -14,17 +14,17 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- class GetAdsTimeline200Response < ApiModelBase
18
- attr_accessor :rows
19
-
20
- # Present and true only on `202` responses: part of the requested date range is still being backfilled from the platform in the background. Retry the same request shortly; it returns 200 once the range is fully ingested.
17
+ class AdsTimelineResponse < ApiModelBase
18
+ # Present and true while historical data is being backfilled.
21
19
  attr_accessor :backfill_pending
22
20
 
21
+ attr_accessor :rows
22
+
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
24
24
  def self.attribute_map
25
25
  {
26
- :'rows' => :'rows',
27
- :'backfill_pending' => :'backfillPending'
26
+ :'backfill_pending' => :'backfillPending',
27
+ :'rows' => :'rows'
28
28
  }
29
29
  end
30
30
 
@@ -41,8 +41,8 @@ module Zernio
41
41
  # Attribute type mapping.
42
42
  def self.openapi_types
43
43
  {
44
- :'rows' => :'Array<GetAdsTimeline200ResponseRowsInner>',
45
- :'backfill_pending' => :'Boolean'
44
+ :'backfill_pending' => :'Boolean',
45
+ :'rows' => :'Array<AdsTimelineResponseRowsInner>'
46
46
  }
47
47
  end
48
48
 
@@ -56,27 +56,27 @@ module Zernio
56
56
  # @param [Hash] attributes Model attributes in the form of hash
57
57
  def initialize(attributes = {})
58
58
  if (!attributes.is_a?(Hash))
59
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdsTimeline200Response` initialize method"
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdsTimelineResponse` initialize method"
60
60
  end
61
61
 
62
62
  # check to see if the attribute exists and convert string to symbol for hash key
63
63
  acceptable_attribute_map = self.class.acceptable_attribute_map
64
64
  attributes = attributes.each_with_object({}) { |(k, v), h|
65
65
  if (!acceptable_attribute_map.key?(k.to_sym))
66
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdsTimeline200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdsTimelineResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
67
  end
68
68
  h[k.to_sym] = v
69
69
  }
70
70
 
71
+ if attributes.key?(:'backfill_pending')
72
+ self.backfill_pending = attributes[:'backfill_pending']
73
+ end
74
+
71
75
  if attributes.key?(:'rows')
72
76
  if (value = attributes[:'rows']).is_a?(Array)
73
77
  self.rows = value
74
78
  end
75
79
  end
76
-
77
- if attributes.key?(:'backfill_pending')
78
- self.backfill_pending = attributes[:'backfill_pending']
79
- end
80
80
  end
81
81
 
82
82
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -99,8 +99,8 @@ module Zernio
99
99
  def ==(o)
100
100
  return true if self.equal?(o)
101
101
  self.class == o.class &&
102
- rows == o.rows &&
103
- backfill_pending == o.backfill_pending
102
+ backfill_pending == o.backfill_pending &&
103
+ rows == o.rows
104
104
  end
105
105
 
106
106
  # @see the `==` method
@@ -112,7 +112,7 @@ module Zernio
112
112
  # Calculates hash code according to all attributes.
113
113
  # @return [Integer] Hash code
114
114
  def hash
115
- [rows, backfill_pending].hash
115
+ [backfill_pending, rows].hash
116
116
  end
117
117
 
118
118
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- class GetAdsTimeline200ResponseRowsInner < ApiModelBase
17
+ class AdsTimelineResponseRowsInner < ApiModelBase
18
18
  attr_accessor :date
19
19
 
20
20
  # Native currency units (matches /ads/tree convention).
@@ -117,14 +117,14 @@ module Zernio
117
117
  # @param [Hash] attributes Model attributes in the form of hash
118
118
  def initialize(attributes = {})
119
119
  if (!attributes.is_a?(Hash))
120
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdsTimeline200ResponseRowsInner` initialize method"
120
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdsTimelineResponseRowsInner` initialize method"
121
121
  end
122
122
 
123
123
  # check to see if the attribute exists and convert string to symbol for hash key
124
124
  acceptable_attribute_map = self.class.acceptable_attribute_map
125
125
  attributes = attributes.each_with_object({}) { |(k, v), h|
126
126
  if (!acceptable_attribute_map.key?(k.to_sym))
127
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdsTimeline200ResponseRowsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
127
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdsTimelineResponseRowsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
128
128
  end
129
129
  h[k.to_sym] = v
130
130
  }