late-sdk 0.0.909 → 0.0.910

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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -19
  3. data/docs/AdAccountsApi.md +88 -12
  4. data/docs/AdCampaignsApi.md +20 -20
  5. data/docs/AdCreativesApi.md +222 -0
  6. data/docs/AdInsightsApi.md +16 -16
  7. data/docs/AdTargetingApi.md +4 -4
  8. data/docs/ConversionsApi.md +8 -8
  9. data/docs/ListPartnershipAdContent200Response.md +18 -0
  10. data/docs/ListPartnershipAdContent200ResponseMediaInner.md +30 -0
  11. data/docs/ListPartnershipAdPermissions200Response.md +18 -0
  12. data/docs/ListPartnershipAdPermissions200ResponsePermissionsInner.md +22 -0
  13. data/docs/ListTikTokAdPixels200Response.md +20 -0
  14. data/docs/ListTikTokAdPixels200ResponsePixelsInner.md +26 -0
  15. data/docs/ListTikTokAdPixels200ResponsePixelsInnerEventDetailsInner.md +22 -0
  16. data/docs/ReachAndFrequencyApi.md +16 -16
  17. data/docs/SetPartnershipAdPermission200Response.md +18 -0
  18. data/docs/SetPartnershipAdPermissionRequest.md +22 -0
  19. data/lib/zernio-sdk/api/ad_accounts_api.rb +81 -6
  20. data/lib/zernio-sdk/api/ad_campaigns_api.rb +10 -10
  21. data/lib/zernio-sdk/api/ad_creatives_api.rb +218 -0
  22. data/lib/zernio-sdk/api/ad_insights_api.rb +8 -8
  23. data/lib/zernio-sdk/api/ad_targeting_api.rb +2 -2
  24. data/lib/zernio-sdk/api/conversions_api.rb +4 -4
  25. data/lib/zernio-sdk/api/reach_and_frequency_api.rb +8 -8
  26. data/lib/zernio-sdk/models/list_partnership_ad_content200_response.rb +149 -0
  27. data/lib/zernio-sdk/models/list_partnership_ad_content200_response_media_inner.rb +205 -0
  28. data/lib/zernio-sdk/models/list_partnership_ad_permissions200_response.rb +149 -0
  29. data/lib/zernio-sdk/models/list_partnership_ad_permissions200_response_permissions_inner.rb +165 -0
  30. data/lib/zernio-sdk/models/list_tik_tok_ad_pixels200_response.rb +158 -0
  31. data/lib/zernio-sdk/models/list_tik_tok_ad_pixels200_response_pixels_inner.rb +187 -0
  32. data/lib/zernio-sdk/models/list_tik_tok_ad_pixels200_response_pixels_inner_event_details_inner.rb +166 -0
  33. data/lib/zernio-sdk/models/set_partnership_ad_permission200_response.rb +147 -0
  34. data/lib/zernio-sdk/models/set_partnership_ad_permission_request.rb +219 -0
  35. data/lib/zernio-sdk/version.rb +1 -1
  36. data/lib/zernio-sdk.rb +9 -0
  37. data/openapi.yaml +632 -154
  38. data/spec/api/ad_accounts_api_spec.rb +17 -3
  39. data/spec/api/ad_campaigns_api_spec.rb +5 -5
  40. data/spec/api/ad_creatives_api_spec.rb +40 -0
  41. data/spec/api/ad_insights_api_spec.rb +4 -4
  42. data/spec/api/ad_targeting_api_spec.rb +1 -1
  43. data/spec/api/conversions_api_spec.rb +2 -2
  44. data/spec/api/reach_and_frequency_api_spec.rb +4 -4
  45. data/spec/models/list_partnership_ad_content200_response_media_inner_spec.rb +72 -0
  46. data/spec/models/list_partnership_ad_content200_response_spec.rb +36 -0
  47. data/spec/models/list_partnership_ad_permissions200_response_permissions_inner_spec.rb +48 -0
  48. data/spec/models/list_partnership_ad_permissions200_response_spec.rb +36 -0
  49. data/spec/models/list_tik_tok_ad_pixels200_response_pixels_inner_event_details_inner_spec.rb +48 -0
  50. data/spec/models/list_tik_tok_ad_pixels200_response_pixels_inner_spec.rb +60 -0
  51. data/spec/models/list_tik_tok_ad_pixels200_response_spec.rb +42 -0
  52. data/spec/models/set_partnership_ad_permission200_response_spec.rb +36 -0
  53. data/spec/models/set_partnership_ad_permission_request_spec.rb +48 -0
  54. data/zernio-sdk-0.0.910.gem +0 -0
  55. metadata +38 -2
  56. data/zernio-sdk-0.0.909.gem +0 -0
@@ -19,7 +19,7 @@ module Zernio
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Submit an async insights report run
22
+ # Submit async insights report
23
23
  # Submits an asynchronous Meta insights report. Same query surface as GET /v1/ads/insights, but in the JSON body; Meta processes the report server-side, which is the right choice for long ranges or large accounts where the sync query is slow or rate-limited. Returns a `reportRunId` to poll via GET /v1/ads/insights/reports/{reportRunId}.
24
24
  # @param create_ad_insights_report_request [CreateAdInsightsReportRequest]
25
25
  # @param [Hash] opts the optional parameters
@@ -29,7 +29,7 @@ module Zernio
29
29
  data
30
30
  end
31
31
 
32
- # Submit an async insights report run
32
+ # Submit async insights report
33
33
  # Submits an asynchronous Meta insights report. Same query surface as GET /v1/ads/insights, but in the JSON body; Meta processes the report server-side, which is the right choice for long ranges or large accounts where the sync query is slow or rate-limited. Returns a `reportRunId` to poll via GET /v1/ads/insights/reports/{reportRunId}.
34
34
  # @param create_ad_insights_report_request [CreateAdInsightsReportRequest]
35
35
  # @param [Hash] opts the optional parameters
@@ -87,7 +87,7 @@ module Zernio
87
87
  return data, status_code, headers
88
88
  end
89
89
 
90
- # Historical keyword metrics (Google Keyword Planner)
90
+ # Get historical keyword metrics
91
91
  # Google Ads only. Runs Keyword Planner's generateKeywordHistoricalMetrics for up to 1,000 exact keywords: historical search volume, competition and top-of-page bid ranges, plus averageCpcMicros when includeAverageCpc is set. Rows come back verbatim; counters are int64s encoded as strings, bid/CPC values are micros of the account currency.
92
92
  # @param generate_keyword_historical_metrics_request [GenerateKeywordHistoricalMetricsRequest]
93
93
  # @param [Hash] opts the optional parameters
@@ -97,7 +97,7 @@ module Zernio
97
97
  data
98
98
  end
99
99
 
100
- # Historical keyword metrics (Google Keyword Planner)
100
+ # Get historical keyword metrics
101
101
  # Google Ads only. Runs Keyword Planner's generateKeywordHistoricalMetrics for up to 1,000 exact keywords: historical search volume, competition and top-of-page bid ranges, plus averageCpcMicros when includeAverageCpc is set. Rows come back verbatim; counters are int64s encoded as strings, bid/CPC values are micros of the account currency.
102
102
  # @param generate_keyword_historical_metrics_request [GenerateKeywordHistoricalMetricsRequest]
103
103
  # @param [Hash] opts the optional parameters
@@ -155,7 +155,7 @@ module Zernio
155
155
  return data, status_code, headers
156
156
  end
157
157
 
158
- # Generate keyword ideas (Google Keyword Planner)
158
+ # Generate keyword ideas
159
159
  # Google Ads only. Runs Keyword Planner's generateKeywordIdeas from seed keywords, a seed URL, or both, returning idea rows verbatim (avgMonthlySearches, competition, competitionIndex, top-of-page bid micros, monthlySearchVolumes). Counters are int64s encoded as strings; bid values are micros of the account currency. Omitting `countries` targets worldwide.
160
160
  # @param generate_keyword_ideas_request [GenerateKeywordIdeasRequest]
161
161
  # @param [Hash] opts the optional parameters
@@ -165,7 +165,7 @@ module Zernio
165
165
  data
166
166
  end
167
167
 
168
- # Generate keyword ideas (Google Keyword Planner)
168
+ # Generate keyword ideas
169
169
  # Google Ads only. Runs Keyword Planner's generateKeywordIdeas from seed keywords, a seed URL, or both, returning idea rows verbatim (avgMonthlySearches, competition, competitionIndex, top-of-page bid micros, monthlySearchVolumes). Counters are int64s encoded as strings; bid values are micros of the account currency. Omitting `countries` targets worldwide.
170
170
  # @param generate_keyword_ideas_request [GenerateKeywordIdeasRequest]
171
171
  # @param [Hash] opts the optional parameters
@@ -536,7 +536,7 @@ module Zernio
536
536
  return data, status_code, headers
537
537
  end
538
538
 
539
- # Conversations of a Local Services lead
539
+ # List lead conversations
540
540
  # Conversation entries of one Local Services lead: phone calls (duration, recording URL) and messages (text, attachment URLs), oldest first. Read live from `local_services_lead_conversation`, always scoped to a single lead. Call-recording URLs require read access on the Google Ads account. Draws on the shared Google Ads operations budget.
541
541
  # @param lead_id [String] Numeric lead id from /v1/ads/local-services/leads.
542
542
  # @param account_id [String] Google ads SocialAccount id.
@@ -549,7 +549,7 @@ module Zernio
549
549
  data
550
550
  end
551
551
 
552
- # Conversations of a Local Services lead
552
+ # List lead conversations
553
553
  # Conversation entries of one Local Services lead: phone calls (duration, recording URL) and messages (text, attachment URLs), oldest first. Read live from `local_services_lead_conversation`, always scoped to a single lead. Call-recording URLs require read access on the Google Ads account. Draws on the shared Google Ads operations budget.
554
554
  # @param lead_id [String] Numeric lead id from /v1/ads/local-services/leads.
555
555
  # @param account_id [String] Google ads SocialAccount id.
@@ -155,7 +155,7 @@ module Zernio
155
155
  return data, status_code, headers
156
156
  end
157
157
 
158
- # Impressions, clicks and spend forecast
158
+ # Forecast ad delivery
159
159
  # LinkedIn-only. Forecasted impressions, clicks, spend and ~20 other metrics for a targeting spec over a time range. Wraps LinkedIn's `adSupplyForecasts` finder. Each returned series carries a `metricType` (IMPRESSION, CLICK, SPENDING, MAX_POTENTIAL_BUDGET, COST_PER_MILLION_IMPRESSIONS, ...) and a `granularity` (DAILY, SEVEN_DAY, THIRTY_DAY, CUSTOM). LinkedIn caps the daily spending forecast at 1.2x the daily budget and returns 0 once the total budget is exhausted. Non-LinkedIn accounts return `available: false`.
160
160
  # @param get_linked_in_supply_forecast_request [GetLinkedInSupplyForecastRequest]
161
161
  # @param [Hash] opts the optional parameters
@@ -165,7 +165,7 @@ module Zernio
165
165
  data
166
166
  end
167
167
 
168
- # Impressions, clicks and spend forecast
168
+ # Forecast ad delivery
169
169
  # LinkedIn-only. Forecasted impressions, clicks, spend and ~20 other metrics for a targeting spec over a time range. Wraps LinkedIn's `adSupplyForecasts` finder. Each returned series carries a `metricType` (IMPRESSION, CLICK, SPENDING, MAX_POTENTIAL_BUDGET, COST_PER_MILLION_IMPRESSIONS, ...) and a `granularity` (DAILY, SEVEN_DAY, THIRTY_DAY, CUSTOM). LinkedIn caps the daily spending forecast at 1.2x the daily budget and returns 0 once the total budget is exhausted. Non-LinkedIn accounts return `available: false`.
170
170
  # @param get_linked_in_supply_forecast_request [GetLinkedInSupplyForecastRequest]
171
171
  # @param [Hash] opts the optional parameters
@@ -167,7 +167,7 @@ module Zernio
167
167
  return data, status_code, headers
168
168
  end
169
169
 
170
- # Create a website conversion action
170
+ # Create website conversion action
171
171
  # Creates a `WEBPAGE` conversion action (category `DEFAULT`) and returns it with its tag snippets, read back after creation since Google never returns them on the create response itself. Invalidates the cached list `GET` on this resource would otherwise keep serving. Google-only; other platforms return `501`. Requires the Ads add-on.
172
172
  # @param create_conversion_action_request [CreateConversionActionRequest]
173
173
  # @param [Hash] opts the optional parameters
@@ -177,7 +177,7 @@ module Zernio
177
177
  data
178
178
  end
179
179
 
180
- # Create a website conversion action
180
+ # Create website conversion action
181
181
  # Creates a `WEBPAGE` conversion action (category `DEFAULT`) and returns it with its tag snippets, read back after creation since Google never returns them on the create response itself. Invalidates the cached list `GET` on this resource would otherwise keep serving. Google-only; other platforms return `501`. Requires the Ads add-on.
182
182
  # @param create_conversion_action_request [CreateConversionActionRequest]
183
183
  # @param [Hash] opts the optional parameters
@@ -631,7 +631,7 @@ module Zernio
631
631
  return data, status_code, headers
632
632
  end
633
633
 
634
- # List conversion actions and their tag snippets
634
+ # List conversion actions
635
635
  # Lists Google Ads conversion actions on the resolved customer, all types by default. Each action's `tagSnippets` (global site tag + event snippet) is included when Google has them for that action's type, e.g. `WEBPAGE`. Google-only; other platforms return `501`. Requires the Ads add-on. `customerId` is optional: when omitted, it is resolved from the connection's accessible Google Ads customers, and the call fails with `400` when more than one is accessible (pass `customerId` to disambiguate). The list itself is cached for the quota window (1 hour fresh, up to 7 days last-good; the cache key does not vary on `type`). The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.
636
636
  # @param account_id [String] SocialAccount _id (must be a googleads account).
637
637
  # @param [Hash] opts the optional parameters
@@ -643,7 +643,7 @@ module Zernio
643
643
  data
644
644
  end
645
645
 
646
- # List conversion actions and their tag snippets
646
+ # List conversion actions
647
647
  # Lists Google Ads conversion actions on the resolved customer, all types by default. Each action's `tagSnippets` (global site tag + event snippet) is included when Google has them for that action's type, e.g. `WEBPAGE`. Google-only; other platforms return `501`. Requires the Ads add-on. `customerId` is optional: when omitted, it is resolved from the connection's accessible Google Ads customers, and the call fails with `400` when more than one is accessible (pass `customerId` to disambiguate). The list itself is cached for the quota window (1 hour fresh, up to 7 days last-good; the cache key does not vary on `type`). The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.
648
648
  # @param account_id [String] SocialAccount _id (must be a googleads account).
649
649
  # @param [Hash] opts the optional parameters
@@ -19,7 +19,7 @@ module Zernio
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Cancel a Reach & Frequency reservation
22
+ # Cancel reach-frequency booking
23
23
  # Releases a RESERVATION's locked price and inventory. Unreserved predictions expire on their own.
24
24
  # @param prediction_id [String]
25
25
  # @param account_id [String]
@@ -31,7 +31,7 @@ module Zernio
31
31
  nil
32
32
  end
33
33
 
34
- # Cancel a Reach & Frequency reservation
34
+ # Cancel reach-frequency booking
35
35
  # Releases a RESERVATION's locked price and inventory. Unreserved predictions expire on their own.
36
36
  # @param prediction_id [String]
37
37
  # @param account_id [String]
@@ -96,7 +96,7 @@ module Zernio
96
96
  return data, status_code, headers
97
97
  end
98
98
 
99
- # Create a Reach & Frequency prediction
99
+ # Create reach-frequency prediction
100
100
  # Creates an R&F prediction. This is a QUOTE, nothing is bought and no ad entities are created. Provide a date range plus exactly one of `budgetAmount` (Meta predicts reach) or `reach` (Meta predicts the budget). The response carries the estimate and its allowed bounds (min/max budget and reach). Predictions expire on their own; to buy, reserve one via POST /v1/ads/rf-predictions/{predictionId}/reserve and pass the RESERVED id to POST /v1/ads/create with `buyingType: \"RESERVED\"`. Reservation campaigns reject automatic placements. Top-level `placements` wins; when it is omitted, `targeting.placements` is used; when neither is set, placements default to Facebook feed (+ Instagram stream when a linked IG professional account resolves). Instagram placements require that IG account.
101
101
  # @param create_rf_prediction_request [CreateRfPredictionRequest]
102
102
  # @param [Hash] opts the optional parameters
@@ -106,7 +106,7 @@ module Zernio
106
106
  data
107
107
  end
108
108
 
109
- # Create a Reach & Frequency prediction
109
+ # Create reach-frequency prediction
110
110
  # Creates an R&F prediction. This is a QUOTE, nothing is bought and no ad entities are created. Provide a date range plus exactly one of `budgetAmount` (Meta predicts reach) or `reach` (Meta predicts the budget). The response carries the estimate and its allowed bounds (min/max budget and reach). Predictions expire on their own; to buy, reserve one via POST /v1/ads/rf-predictions/{predictionId}/reserve and pass the RESERVED id to POST /v1/ads/create with `buyingType: \"RESERVED\"`. Reservation campaigns reject automatic placements. Top-level `placements` wins; when it is omitted, `targeting.placements` is used; when neither is set, placements default to Facebook feed (+ Instagram stream when a linked IG professional account resolves). Instagram placements require that IG account.
111
111
  # @param create_rf_prediction_request [CreateRfPredictionRequest]
112
112
  # @param [Hash] opts the optional parameters
@@ -164,7 +164,7 @@ module Zernio
164
164
  return data, status_code, headers
165
165
  end
166
166
 
167
- # Read a Reach & Frequency prediction
167
+ # Get reach-frequency prediction
168
168
  # @param prediction_id [String]
169
169
  # @param account_id [String]
170
170
  # @param ad_account_id [String]
@@ -175,7 +175,7 @@ module Zernio
175
175
  data
176
176
  end
177
177
 
178
- # Read a Reach & Frequency prediction
178
+ # Get reach-frequency prediction
179
179
  # @param prediction_id [String]
180
180
  # @param account_id [String]
181
181
  # @param ad_account_id [String]
@@ -239,7 +239,7 @@ module Zernio
239
239
  return data, status_code, headers
240
240
  end
241
241
 
242
- # Reserve a Reach & Frequency prediction
242
+ # Reserve reach-frequency inventory
243
243
  # Locks the quoted price + inventory until the returned `expiresAt` and mints a NEW prediction id. Pass that RESERVED id (not the original) as `rfPredictionId` on POST /v1/ads/create. Release an unused reservation via DELETE.
244
244
  # @param prediction_id [String]
245
245
  # @param reserve_rf_prediction_request [ReserveRfPredictionRequest]
@@ -250,7 +250,7 @@ module Zernio
250
250
  data
251
251
  end
252
252
 
253
- # Reserve a Reach & Frequency prediction
253
+ # Reserve reach-frequency inventory
254
254
  # Locks the quoted price + inventory until the returned `expiresAt` and mints a NEW prediction id. Pass that RESERVED id (not the original) as `rfPredictionId` on POST /v1/ads/create. Release an unused reservation via DELETE.
255
255
  # @param prediction_id [String]
256
256
  # @param reserve_rf_prediction_request [ReserveRfPredictionRequest]
@@ -0,0 +1,149 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class ListPartnershipAdContent200Response < ApiModelBase
18
+ attr_accessor :media
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'media' => :'media'
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
+ :'media' => :'Array<ListPartnershipAdContent200ResponseMediaInner>'
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::ListPartnershipAdContent200Response` 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::ListPartnershipAdContent200Response`. 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?(:'media')
67
+ if (value = attributes[:'media']).is_a?(Array)
68
+ self.media = value
69
+ end
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ media == o.media
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [media].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Returns the object in the form of hash
132
+ # @return [Hash] Returns the object in the form of hash
133
+ def to_hash
134
+ hash = {}
135
+ self.class.attribute_map.each_pair do |attr, param|
136
+ value = self.send(attr)
137
+ if value.nil?
138
+ is_nullable = self.class.openapi_nullable.include?(attr)
139
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
140
+ end
141
+
142
+ hash[param] = _to_hash(value)
143
+ end
144
+ hash
145
+ end
146
+
147
+ end
148
+
149
+ end
@@ -0,0 +1,205 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class ListPartnershipAdContent200ResponseMediaInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :permalink
21
+
22
+ attr_accessor :owner_id
23
+
24
+ attr_accessor :has_permission_for_partnership_ad
25
+
26
+ attr_accessor :is_creator_allowlisted
27
+
28
+ attr_accessor :eligibility_errors
29
+
30
+ attr_accessor :recommended_campaign_objectives
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'id' => :'id',
36
+ :'permalink' => :'permalink',
37
+ :'owner_id' => :'ownerId',
38
+ :'has_permission_for_partnership_ad' => :'hasPermissionForPartnershipAd',
39
+ :'is_creator_allowlisted' => :'isCreatorAllowlisted',
40
+ :'eligibility_errors' => :'eligibilityErrors',
41
+ :'recommended_campaign_objectives' => :'recommendedCampaignObjectives'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'id' => :'String',
59
+ :'permalink' => :'String',
60
+ :'owner_id' => :'String',
61
+ :'has_permission_for_partnership_ad' => :'Boolean',
62
+ :'is_creator_allowlisted' => :'Boolean',
63
+ :'eligibility_errors' => :'Array<String>',
64
+ :'recommended_campaign_objectives' => :'Array<String>'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListPartnershipAdContent200ResponseMediaInner` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListPartnershipAdContent200ResponseMediaInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'id')
91
+ self.id = attributes[:'id']
92
+ end
93
+
94
+ if attributes.key?(:'permalink')
95
+ self.permalink = attributes[:'permalink']
96
+ end
97
+
98
+ if attributes.key?(:'owner_id')
99
+ self.owner_id = attributes[:'owner_id']
100
+ end
101
+
102
+ if attributes.key?(:'has_permission_for_partnership_ad')
103
+ self.has_permission_for_partnership_ad = attributes[:'has_permission_for_partnership_ad']
104
+ end
105
+
106
+ if attributes.key?(:'is_creator_allowlisted')
107
+ self.is_creator_allowlisted = attributes[:'is_creator_allowlisted']
108
+ end
109
+
110
+ if attributes.key?(:'eligibility_errors')
111
+ if (value = attributes[:'eligibility_errors']).is_a?(Array)
112
+ self.eligibility_errors = value
113
+ end
114
+ end
115
+
116
+ if attributes.key?(:'recommended_campaign_objectives')
117
+ if (value = attributes[:'recommended_campaign_objectives']).is_a?(Array)
118
+ self.recommended_campaign_objectives = value
119
+ end
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
+ invalid_properties = Array.new
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ warn '[DEPRECATED] the `valid?` method is obsolete'
135
+ true
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ id == o.id &&
144
+ permalink == o.permalink &&
145
+ owner_id == o.owner_id &&
146
+ has_permission_for_partnership_ad == o.has_permission_for_partnership_ad &&
147
+ is_creator_allowlisted == o.is_creator_allowlisted &&
148
+ eligibility_errors == o.eligibility_errors &&
149
+ recommended_campaign_objectives == o.recommended_campaign_objectives
150
+ end
151
+
152
+ # @see the `==` method
153
+ # @param [Object] Object to be compared
154
+ def eql?(o)
155
+ self == o
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ def hash
161
+ [id, permalink, owner_id, has_permission_for_partnership_ad, is_creator_allowlisted, eligibility_errors, recommended_campaign_objectives].hash
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def self.build_from_hash(attributes)
168
+ return nil unless attributes.is_a?(Hash)
169
+ attributes = attributes.transform_keys(&:to_sym)
170
+ transformed_hash = {}
171
+ openapi_types.each_pair do |key, type|
172
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[attribute_map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
179
+ end
180
+ elsif !attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
182
+ end
183
+ end
184
+ new(transformed_hash)
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ end
204
+
205
+ end