zernio-sdk 0.0.821 → 0.0.823

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -0
  3. data/docs/AnalyticsApi.md +78 -0
  4. data/docs/AnalyticsDeltaEntry.md +34 -0
  5. data/docs/AnalyticsDeltaEntryMetrics.md +44 -0
  6. data/docs/AnalyticsDeltaResponse.md +22 -0
  7. data/docs/BoostPostRequest.md +3 -1
  8. data/docs/CreateCallAdRequest.md +3 -1
  9. data/docs/CreateMessagingAdRequest.md +3 -1
  10. data/docs/CreateStandaloneAdRequest.md +3 -1
  11. data/docs/CtwaAdRequestBody.md +4 -2
  12. data/docs/WebhookEventsApi.md +69 -0
  13. data/docs/WebhookPayloadAnalyticsSynced.md +26 -0
  14. data/docs/WebhookPayloadAnalyticsSyncedAccount.md +24 -0
  15. data/docs/WebhookPayloadAnalyticsSyncedSync.md +20 -0
  16. data/lib/zernio-sdk/api/analytics_api.rb +77 -0
  17. data/lib/zernio-sdk/api/webhook_events_api.rb +66 -0
  18. data/lib/zernio-sdk/models/analytics_delta_entry.rb +380 -0
  19. data/lib/zernio-sdk/models/analytics_delta_entry_metrics.rb +507 -0
  20. data/lib/zernio-sdk/models/analytics_delta_response.rb +221 -0
  21. data/lib/zernio-sdk/models/boost_post_request.rb +14 -2
  22. data/lib/zernio-sdk/models/create_call_ad_request.rb +14 -2
  23. data/lib/zernio-sdk/models/create_messaging_ad_request.rb +14 -2
  24. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +14 -2
  25. data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +17 -5
  26. data/lib/zernio-sdk/models/webhook_payload_analytics_synced.rb +295 -0
  27. data/lib/zernio-sdk/models/webhook_payload_analytics_synced_account.rb +244 -0
  28. data/lib/zernio-sdk/models/webhook_payload_analytics_synced_sync.rb +193 -0
  29. data/lib/zernio-sdk/version.rb +1 -1
  30. data/lib/zernio-sdk.rb +6 -0
  31. data/openapi.yaml +392 -10
  32. data/spec/api/analytics_api_spec.rb +15 -0
  33. data/spec/models/analytics_delta_entry_metrics_spec.rb +114 -0
  34. data/spec/models/analytics_delta_entry_spec.rb +84 -0
  35. data/spec/models/analytics_delta_response_spec.rb +48 -0
  36. data/spec/models/boost_post_request_spec.rb +6 -0
  37. data/spec/models/create_call_ad_request_spec.rb +6 -0
  38. data/spec/models/create_messaging_ad_request_spec.rb +6 -0
  39. data/spec/models/create_standalone_ad_request_spec.rb +6 -0
  40. data/spec/models/create_webhook_settings_request_spec.rb +1 -1
  41. data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
  42. data/spec/models/update_webhook_settings_request_spec.rb +1 -1
  43. data/spec/models/webhook_payload_analytics_synced_account_spec.rb +54 -0
  44. data/spec/models/webhook_payload_analytics_synced_spec.rb +64 -0
  45. data/spec/models/webhook_payload_analytics_synced_sync_spec.rb +42 -0
  46. data/spec/models/webhook_spec.rb +1 -1
  47. metadata +1773 -1749
@@ -0,0 +1,193 @@
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
+ # Summary of the analytics sync cycle that just completed.
18
+ class WebhookPayloadAnalyticsSyncedSync < ApiModelBase
19
+ # When the cycle COMPLETED. Not a join key for the delta feed: the rows a cycle produces carry a `syncedAt` stamped when the cycle STARTED, which is measured at around one second earlier at the median and up to a couple of minutes earlier in the tail. Correlate on `account.accountId`.
20
+ attr_accessor :synced_at
21
+
22
+ # Post records created or modified by this cycle. Not the number of delta feed rows the cycle produced, which the syncer does not report, so a cycle with a non-zero `postsUpdated` can still yield an empty delta page.
23
+ attr_accessor :posts_updated
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'synced_at' => :'syncedAt',
29
+ :'posts_updated' => :'postsUpdated'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'synced_at' => :'Time',
47
+ :'posts_updated' => :'Integer'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::WebhookPayloadAnalyticsSyncedSync` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::WebhookPayloadAnalyticsSyncedSync`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'synced_at')
74
+ self.synced_at = attributes[:'synced_at']
75
+ else
76
+ self.synced_at = nil
77
+ end
78
+
79
+ if attributes.key?(:'posts_updated')
80
+ self.posts_updated = attributes[:'posts_updated']
81
+ else
82
+ self.posts_updated = nil
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
90
+ invalid_properties = Array.new
91
+ if @synced_at.nil?
92
+ invalid_properties.push('invalid value for "synced_at", synced_at cannot be nil.')
93
+ end
94
+
95
+ if @posts_updated.nil?
96
+ invalid_properties.push('invalid value for "posts_updated", posts_updated cannot be nil.')
97
+ end
98
+
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ warn '[DEPRECATED] the `valid?` method is obsolete'
106
+ return false if @synced_at.nil?
107
+ return false if @posts_updated.nil?
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param [Object] synced_at Value to be assigned
113
+ def synced_at=(synced_at)
114
+ if synced_at.nil?
115
+ fail ArgumentError, 'synced_at cannot be nil'
116
+ end
117
+
118
+ @synced_at = synced_at
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] posts_updated Value to be assigned
123
+ def posts_updated=(posts_updated)
124
+ if posts_updated.nil?
125
+ fail ArgumentError, 'posts_updated cannot be nil'
126
+ end
127
+
128
+ @posts_updated = posts_updated
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ synced_at == o.synced_at &&
137
+ posts_updated == o.posts_updated
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [synced_at, posts_updated].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ end
192
+
193
+ end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.821'
14
+ VERSION = '0.0.823'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -72,6 +72,9 @@ require 'zernio-sdk/models/adjust_conversions_request_adjustments_inner_user'
72
72
  require 'zernio-sdk/models/ads_list_response'
73
73
  require 'zernio-sdk/models/ads_timeline_response'
74
74
  require 'zernio-sdk/models/ads_timeline_response_rows_inner'
75
+ require 'zernio-sdk/models/analytics_delta_entry'
76
+ require 'zernio-sdk/models/analytics_delta_entry_metrics'
77
+ require 'zernio-sdk/models/analytics_delta_response'
75
78
  require 'zernio-sdk/models/analytics_list_response'
76
79
  require 'zernio-sdk/models/analytics_list_response_posts_inner'
77
80
  require 'zernio-sdk/models/analytics_list_response_posts_inner_media_items_inner'
@@ -1643,6 +1646,9 @@ require 'zernio-sdk/models/webhook_payload_ad_status_changed_account'
1643
1646
  require 'zernio-sdk/models/webhook_payload_ad_status_changed_ad_object'
1644
1647
  require 'zernio-sdk/models/webhook_payload_ad_status_changed_error'
1645
1648
  require 'zernio-sdk/models/webhook_payload_ad_status_changed_status'
1649
+ require 'zernio-sdk/models/webhook_payload_analytics_synced'
1650
+ require 'zernio-sdk/models/webhook_payload_analytics_synced_account'
1651
+ require 'zernio-sdk/models/webhook_payload_analytics_synced_sync'
1646
1652
  require 'zernio-sdk/models/webhook_payload_call_ended'
1647
1653
  require 'zernio-sdk/models/webhook_payload_call_ended_call'
1648
1654
  require 'zernio-sdk/models/webhook_payload_call_ended_call_billing'