zernio-sdk 0.0.1697 → 0.0.1698

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.
@@ -0,0 +1,232 @@
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). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
5
+
6
+ The version of the OpenAPI document: 1.763.0
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 ConversionAuditAnswerTopFixesInner < ApiModelBase
18
+ # The action to take.
19
+ attr_accessor :title
20
+
21
+ # Why it matters on this site.
22
+ attr_accessor :why
23
+
24
+ # Points the score gains when this fix alone lands, or null when the scan can't tell.
25
+ attr_accessor :points
26
+
27
+ # True when what's at stake is data sent without consent rather than lost signal.
28
+ attr_accessor :compliance
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'title' => :'title',
34
+ :'why' => :'why',
35
+ :'points' => :'points',
36
+ :'compliance' => :'compliance'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'title' => :'String',
54
+ :'why' => :'String',
55
+ :'points' => :'Integer',
56
+ :'compliance' => :'Boolean'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ :'points',
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ConversionAuditAnswerTopFixesInner` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ConversionAuditAnswerTopFixesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'title')
84
+ self.title = attributes[:'title']
85
+ else
86
+ self.title = nil
87
+ end
88
+
89
+ if attributes.key?(:'why')
90
+ self.why = attributes[:'why']
91
+ else
92
+ self.why = nil
93
+ end
94
+
95
+ if attributes.key?(:'points')
96
+ self.points = attributes[:'points']
97
+ else
98
+ self.points = nil
99
+ end
100
+
101
+ if attributes.key?(:'compliance')
102
+ self.compliance = attributes[:'compliance']
103
+ else
104
+ self.compliance = nil
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
+ invalid_properties = Array.new
113
+ if @title.nil?
114
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
115
+ end
116
+
117
+ if @why.nil?
118
+ invalid_properties.push('invalid value for "why", why cannot be nil.')
119
+ end
120
+
121
+ if @compliance.nil?
122
+ invalid_properties.push('invalid value for "compliance", compliance cannot be nil.')
123
+ end
124
+
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ warn '[DEPRECATED] the `valid?` method is obsolete'
132
+ return false if @title.nil?
133
+ return false if @why.nil?
134
+ return false if @compliance.nil?
135
+ true
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] title Value to be assigned
140
+ def title=(title)
141
+ if title.nil?
142
+ fail ArgumentError, 'title cannot be nil'
143
+ end
144
+
145
+ @title = title
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] why Value to be assigned
150
+ def why=(why)
151
+ if why.nil?
152
+ fail ArgumentError, 'why cannot be nil'
153
+ end
154
+
155
+ @why = why
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] compliance Value to be assigned
160
+ def compliance=(compliance)
161
+ if compliance.nil?
162
+ fail ArgumentError, 'compliance cannot be nil'
163
+ end
164
+
165
+ @compliance = compliance
166
+ end
167
+
168
+ # Checks equality by comparing each attribute.
169
+ # @param [Object] Object to be compared
170
+ def ==(o)
171
+ return true if self.equal?(o)
172
+ self.class == o.class &&
173
+ title == o.title &&
174
+ why == o.why &&
175
+ points == o.points &&
176
+ compliance == o.compliance
177
+ end
178
+
179
+ # @see the `==` method
180
+ # @param [Object] Object to be compared
181
+ def eql?(o)
182
+ self == o
183
+ end
184
+
185
+ # Calculates hash code according to all attributes.
186
+ # @return [Integer] Hash code
187
+ def hash
188
+ [title, why, points, compliance].hash
189
+ end
190
+
191
+ # Builds the object from hash
192
+ # @param [Hash] attributes Model attributes in the form of hash
193
+ # @return [Object] Returns the model itself
194
+ def self.build_from_hash(attributes)
195
+ return nil unless attributes.is_a?(Hash)
196
+ attributes = attributes.transform_keys(&:to_sym)
197
+ transformed_hash = {}
198
+ openapi_types.each_pair do |key, type|
199
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
200
+ transformed_hash["#{key}"] = nil
201
+ elsif type =~ /\AArray<(.*)>/i
202
+ # check to ensure the input is an array given that the attribute
203
+ # is documented as an array but the input is not
204
+ if attributes[attribute_map[key]].is_a?(Array)
205
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
206
+ end
207
+ elsif !attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
209
+ end
210
+ end
211
+ new(transformed_hash)
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ end
231
+
232
+ end
@@ -30,6 +30,9 @@ module Zernio
30
30
  # The only server path seen is the Zernio site tag relay; `serverSideVerified` says whether its delivery to this platform is proven.
31
31
  attr_accessor :relayed_by
32
32
 
33
+ # On a scan that read the page source only: the pixel comes from the Zernio site tag's settings, which load it after consent, not from the page. Its ids are not reported.
34
+ attr_accessor :loaded_by
35
+
33
36
  # The Zernio site tag on the page belongs to an account whose destination for this platform accepted the site's events in the last 7 days.
34
37
  attr_accessor :server_side_verified
35
38
 
@@ -87,6 +90,7 @@ module Zernio
87
90
  :'browser_pixel' => :'browserPixel',
88
91
  :'server_side' => :'serverSide',
89
92
  :'relayed_by' => :'relayedBy',
93
+ :'loaded_by' => :'loadedBy',
90
94
  :'server_side_verified' => :'serverSideVerified',
91
95
  :'server_tool' => :'serverTool',
92
96
  :'status' => :'status',
@@ -117,6 +121,7 @@ module Zernio
117
121
  :'browser_pixel' => :'Boolean',
118
122
  :'server_side' => :'Boolean',
119
123
  :'relayed_by' => :'String',
124
+ :'loaded_by' => :'String',
120
125
  :'server_side_verified' => :'Boolean',
121
126
  :'server_tool' => :'String',
122
127
  :'status' => :'String',
@@ -179,6 +184,10 @@ module Zernio
179
184
  self.relayed_by = attributes[:'relayed_by']
180
185
  end
181
186
 
187
+ if attributes.key?(:'loaded_by')
188
+ self.loaded_by = attributes[:'loaded_by']
189
+ end
190
+
182
191
  if attributes.key?(:'server_side_verified')
183
192
  self.server_side_verified = attributes[:'server_side_verified']
184
193
  end
@@ -274,6 +283,8 @@ module Zernio
274
283
  return false if @server_side.nil?
275
284
  relayed_by_validator = EnumAttributeValidator.new('String', ["zernio-tag"])
276
285
  return false unless relayed_by_validator.valid?(@relayed_by)
286
+ loaded_by_validator = EnumAttributeValidator.new('String', ["zernio-tag"])
287
+ return false unless loaded_by_validator.valid?(@loaded_by)
277
288
  return false if @status.nil?
278
289
  status_validator = EnumAttributeValidator.new('String', ["good", "warn", "missing", "not-firing", "configured"])
279
290
  return false unless status_validator.valid?(@status)
@@ -334,6 +345,16 @@ module Zernio
334
345
  @relayed_by = relayed_by
335
346
  end
336
347
 
348
+ # Custom attribute writer method checking allowed values (enum).
349
+ # @param [Object] loaded_by Object to be assigned
350
+ def loaded_by=(loaded_by)
351
+ validator = EnumAttributeValidator.new('String', ["zernio-tag"])
352
+ unless validator.valid?(loaded_by)
353
+ fail ArgumentError, "invalid value for \"loaded_by\", must be one of #{validator.allowable_values}."
354
+ end
355
+ @loaded_by = loaded_by
356
+ end
357
+
337
358
  # Custom attribute writer method checking allowed values (enum).
338
359
  # @param [Object] status Object to be assigned
339
360
  def status=(status)
@@ -384,6 +405,7 @@ module Zernio
384
405
  browser_pixel == o.browser_pixel &&
385
406
  server_side == o.server_side &&
386
407
  relayed_by == o.relayed_by &&
408
+ loaded_by == o.loaded_by &&
387
409
  server_side_verified == o.server_side_verified &&
388
410
  server_tool == o.server_tool &&
389
411
  status == o.status &&
@@ -404,7 +426,7 @@ module Zernio
404
426
  # Calculates hash code according to all attributes.
405
427
  # @return [Integer] Hash code
406
428
  def hash
407
- [key, name, browser_pixel, server_side, relayed_by, server_side_verified, server_tool, status, estimated_loss_browser_only, note, ids, events, fix_steps, fired].hash
429
+ [key, name, browser_pixel, server_side, relayed_by, loaded_by, server_side_verified, server_tool, status, estimated_loss_browser_only, note, ids, events, fix_steps, fired].hash
408
430
  end
409
431
 
410
432
  # Builds the object from hash
@@ -21,6 +21,9 @@ module Zernio
21
21
 
22
22
  attr_accessor :note
23
23
 
24
+ # The server-side path that collects on the site's own domain, when the scan saw one.
25
+ attr_accessor :first_party_collection
26
+
24
27
  class EnumAttributeValidator
25
28
  attr_reader :datatype
26
29
  attr_reader :allowable_values
@@ -48,7 +51,8 @@ module Zernio
48
51
  {
49
52
  :'status' => :'status',
50
53
  :'signals' => :'signals',
51
- :'note' => :'note'
54
+ :'note' => :'note',
55
+ :'first_party_collection' => :'firstPartyCollection'
52
56
  }
53
57
  end
54
58
 
@@ -67,7 +71,8 @@ module Zernio
67
71
  {
68
72
  :'status' => :'String',
69
73
  :'signals' => :'Array<ConversionAuditReportServerSideSignalsInner>',
70
- :'note' => :'String'
74
+ :'note' => :'String',
75
+ :'first_party_collection' => :'String'
71
76
  }
72
77
  end
73
78
 
@@ -112,6 +117,10 @@ module Zernio
112
117
  else
113
118
  self.note = nil
114
119
  end
120
+
121
+ if attributes.key?(:'first_party_collection')
122
+ self.first_party_collection = attributes[:'first_party_collection']
123
+ end
115
124
  end
116
125
 
117
126
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -183,7 +192,8 @@ module Zernio
183
192
  self.class == o.class &&
184
193
  status == o.status &&
185
194
  signals == o.signals &&
186
- note == o.note
195
+ note == o.note &&
196
+ first_party_collection == o.first_party_collection
187
197
  end
188
198
 
189
199
  # @see the `==` method
@@ -195,7 +205,7 @@ module Zernio
195
205
  # Calculates hash code according to all attributes.
196
206
  # @return [Integer] Hash code
197
207
  def hash
198
- [status, signals, note].hash
208
+ [status, signals, note, first_party_collection].hash
199
209
  end
200
210
 
201
211
  # Builds the object from hash
@@ -17,6 +17,12 @@ module Zernio
17
17
  class GetLatestConversionAudit200Response < ApiModelBase
18
18
  attr_accessor :report
19
19
 
20
+ # Each ad network with its final setup and leak, computed exactly as the public report page shows them, best setup first.
21
+ attr_accessor :networks
22
+
23
+ # The few fixes that matter most, in the order the public report page lists them.
24
+ attr_accessor :top_fixes
25
+
20
26
  # A prompt to paste into a coding agent. It lists the report's findings, then connecting Zernio, sending conversions server-side and verifying them.
21
27
  attr_accessor :fix_prompt
22
28
 
@@ -29,6 +35,8 @@ module Zernio
29
35
  def self.attribute_map
30
36
  {
31
37
  :'report' => :'report',
38
+ :'networks' => :'networks',
39
+ :'top_fixes' => :'topFixes',
32
40
  :'fix_prompt' => :'fixPrompt',
33
41
  :'public_report' => :'publicReport',
34
42
  :'host' => :'host'
@@ -49,6 +57,8 @@ module Zernio
49
57
  def self.openapi_types
50
58
  {
51
59
  :'report' => :'ConversionAuditReport',
60
+ :'networks' => :'Array<ConversionAuditAnswerNetworksInner>',
61
+ :'top_fixes' => :'Array<ConversionAuditAnswerTopFixesInner>',
52
62
  :'fix_prompt' => :'String',
53
63
  :'public_report' => :'ConversionAuditAnswerPublicReport',
54
64
  :'host' => :'String'
@@ -91,6 +101,22 @@ module Zernio
91
101
  self.report = nil
92
102
  end
93
103
 
104
+ if attributes.key?(:'networks')
105
+ if (value = attributes[:'networks']).is_a?(Array)
106
+ self.networks = value
107
+ end
108
+ else
109
+ self.networks = nil
110
+ end
111
+
112
+ if attributes.key?(:'top_fixes')
113
+ if (value = attributes[:'top_fixes']).is_a?(Array)
114
+ self.top_fixes = value
115
+ end
116
+ else
117
+ self.top_fixes = nil
118
+ end
119
+
94
120
  if attributes.key?(:'fix_prompt')
95
121
  self.fix_prompt = attributes[:'fix_prompt']
96
122
  else
@@ -119,6 +145,18 @@ module Zernio
119
145
  invalid_properties.push('invalid value for "report", report cannot be nil.')
120
146
  end
121
147
 
148
+ if @networks.nil?
149
+ invalid_properties.push('invalid value for "networks", networks cannot be nil.')
150
+ end
151
+
152
+ if @top_fixes.nil?
153
+ invalid_properties.push('invalid value for "top_fixes", top_fixes cannot be nil.')
154
+ end
155
+
156
+ if @top_fixes.length > 3
157
+ invalid_properties.push('invalid value for "top_fixes", number of items must be less than or equal to 3.')
158
+ end
159
+
122
160
  if @fix_prompt.nil?
123
161
  invalid_properties.push('invalid value for "fix_prompt", fix_prompt cannot be nil.')
124
162
  end
@@ -135,6 +173,9 @@ module Zernio
135
173
  def valid?
136
174
  warn '[DEPRECATED] the `valid?` method is obsolete'
137
175
  return false if @report.nil?
176
+ return false if @networks.nil?
177
+ return false if @top_fixes.nil?
178
+ return false if @top_fixes.length > 3
138
179
  return false if @fix_prompt.nil?
139
180
  return false if @host.nil?
140
181
  true
@@ -150,6 +191,30 @@ module Zernio
150
191
  @report = report
151
192
  end
152
193
 
194
+ # Custom attribute writer method with validation
195
+ # @param [Object] networks Value to be assigned
196
+ def networks=(networks)
197
+ if networks.nil?
198
+ fail ArgumentError, 'networks cannot be nil'
199
+ end
200
+
201
+ @networks = networks
202
+ end
203
+
204
+ # Custom attribute writer method with validation
205
+ # @param [Object] top_fixes Value to be assigned
206
+ def top_fixes=(top_fixes)
207
+ if top_fixes.nil?
208
+ fail ArgumentError, 'top_fixes cannot be nil'
209
+ end
210
+
211
+ if top_fixes.length > 3
212
+ fail ArgumentError, 'invalid value for "top_fixes", number of items must be less than or equal to 3.'
213
+ end
214
+
215
+ @top_fixes = top_fixes
216
+ end
217
+
153
218
  # Custom attribute writer method with validation
154
219
  # @param [Object] fix_prompt Value to be assigned
155
220
  def fix_prompt=(fix_prompt)
@@ -176,6 +241,8 @@ module Zernio
176
241
  return true if self.equal?(o)
177
242
  self.class == o.class &&
178
243
  report == o.report &&
244
+ networks == o.networks &&
245
+ top_fixes == o.top_fixes &&
179
246
  fix_prompt == o.fix_prompt &&
180
247
  public_report == o.public_report &&
181
248
  host == o.host
@@ -190,7 +257,7 @@ module Zernio
190
257
  # Calculates hash code according to all attributes.
191
258
  # @return [Integer] Hash code
192
259
  def hash
193
- [report, fix_prompt, public_report, host].hash
260
+ [report, networks, top_fixes, fix_prompt, public_report, host].hash
194
261
  end
195
262
 
196
263
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.1697'
14
+ VERSION = '0.0.1698'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -734,7 +734,9 @@ require 'zernio-sdk/models/conversation_ad_attribution'
734
734
  require 'zernio-sdk/models/conversion_action'
735
735
  require 'zernio-sdk/models/conversion_action_tag_snippets_inner'
736
736
  require 'zernio-sdk/models/conversion_audit_answer'
737
+ require 'zernio-sdk/models/conversion_audit_answer_networks_inner'
737
738
  require 'zernio-sdk/models/conversion_audit_answer_public_report'
739
+ require 'zernio-sdk/models/conversion_audit_answer_top_fixes_inner'
738
740
  require 'zernio-sdk/models/conversion_audit_monitor'
739
741
  require 'zernio-sdk/models/conversion_audit_monitor_answer'
740
742
  require 'zernio-sdk/models/conversion_audit_monitor_score_history_inner'