hermoso 0.1.4

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 (142) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +53 -0
  4. data/lib/hermoso/api/account_api.rb +156 -0
  5. data/lib/hermoso/api/analytics_api.rb +400 -0
  6. data/lib/hermoso/api/brands_api.rb +82 -0
  7. data/lib/hermoso/api/campaign_profit_api.rb +103 -0
  8. data/lib/hermoso/api/campaign_results_api.rb +289 -0
  9. data/lib/hermoso/api/channels_api.rb +82 -0
  10. data/lib/hermoso/api/clones_api.rb +93 -0
  11. data/lib/hermoso/api/connect_links_api.rb +228 -0
  12. data/lib/hermoso/api/connect_redirects_api.rb +153 -0
  13. data/lib/hermoso/api/connections_api.rb +151 -0
  14. data/lib/hermoso/api/credits_api.rb +85 -0
  15. data/lib/hermoso/api/edits_api.rb +102 -0
  16. data/lib/hermoso/api/events_api.rb +932 -0
  17. data/lib/hermoso/api/generations_api.rb +173 -0
  18. data/lib/hermoso/api/jobs_api.rb +226 -0
  19. data/lib/hermoso/api/library_api.rb +88 -0
  20. data/lib/hermoso/api/media_api.rb +158 -0
  21. data/lib/hermoso/api/models_api.rb +88 -0
  22. data/lib/hermoso/api/posts_api.rb +377 -0
  23. data/lib/hermoso/api/recasts_api.rb +102 -0
  24. data/lib/hermoso/api/signup_api.rb +164 -0
  25. data/lib/hermoso/api/tag_api.rb +570 -0
  26. data/lib/hermoso/api/tools_api.rb +252 -0
  27. data/lib/hermoso/api_client.rb +441 -0
  28. data/lib/hermoso/api_error.rb +58 -0
  29. data/lib/hermoso/api_model_base.rb +92 -0
  30. data/lib/hermoso/configuration.rb +400 -0
  31. data/lib/hermoso/helpers.rb +116 -0
  32. data/lib/hermoso/models/asset.rb +241 -0
  33. data/lib/hermoso/models/asset_list.rb +203 -0
  34. data/lib/hermoso/models/best_time.rb +250 -0
  35. data/lib/hermoso/models/best_time_slots_inner.rb +205 -0
  36. data/lib/hermoso/models/brand.rb +273 -0
  37. data/lib/hermoso/models/brand_list.rb +203 -0
  38. data/lib/hermoso/models/campaign_profit.rb +261 -0
  39. data/lib/hermoso/models/campaign_results.rb +250 -0
  40. data/lib/hermoso/models/campaign_results_upload.rb +171 -0
  41. data/lib/hermoso/models/campaign_results_upload_rows_inner.rb +259 -0
  42. data/lib/hermoso/models/channel.rb +326 -0
  43. data/lib/hermoso/models/channel_carousel.rb +188 -0
  44. data/lib/hermoso/models/channel_list.rb +203 -0
  45. data/lib/hermoso/models/clone_quote.rb +243 -0
  46. data/lib/hermoso/models/clone_quote_request.rb +227 -0
  47. data/lib/hermoso/models/clone_quote_step.rb +201 -0
  48. data/lib/hermoso/models/connect_link.rb +321 -0
  49. data/lib/hermoso/models/connect_link_account.rb +178 -0
  50. data/lib/hermoso/models/connect_link_create.rb +236 -0
  51. data/lib/hermoso/models/connect_link_error.rb +169 -0
  52. data/lib/hermoso/models/connect_redirects.rb +203 -0
  53. data/lib/hermoso/models/connect_redirects_set.rb +180 -0
  54. data/lib/hermoso/models/connection.rb +250 -0
  55. data/lib/hermoso/models/connection_accounts_inner.rb +178 -0
  56. data/lib/hermoso/models/connection_deleted.rb +228 -0
  57. data/lib/hermoso/models/connection_list.rb +203 -0
  58. data/lib/hermoso/models/contact_email.rb +189 -0
  59. data/lib/hermoso/models/contact_email_resend.rb +161 -0
  60. data/lib/hermoso/models/content_decay.rb +223 -0
  61. data/lib/hermoso/models/content_decay_buckets_inner.rb +187 -0
  62. data/lib/hermoso/models/conversion_destination_create.rb +317 -0
  63. data/lib/hermoso/models/conversion_destination_list.rb +223 -0
  64. data/lib/hermoso/models/conversion_destination_result.rb +221 -0
  65. data/lib/hermoso/models/conversion_event_list.rb +230 -0
  66. data/lib/hermoso/models/conversion_event_update.rb +195 -0
  67. data/lib/hermoso/models/conversion_events_send.rb +236 -0
  68. data/lib/hermoso/models/conversion_events_send_events_inner.rb +314 -0
  69. data/lib/hermoso/models/conversion_insights.rb +265 -0
  70. data/lib/hermoso/models/conversion_send_result.rb +257 -0
  71. data/lib/hermoso/models/conversion_send_result_destinations_inner.rb +286 -0
  72. data/lib/hermoso/models/credits.rb +240 -0
  73. data/lib/hermoso/models/credits_limits.rb +234 -0
  74. data/lib/hermoso/models/credits_limits_brands_inner.rb +218 -0
  75. data/lib/hermoso/models/credits_limits_brands_inner_members_inner.rb +196 -0
  76. data/lib/hermoso/models/deleted.rb +210 -0
  77. data/lib/hermoso/models/edit.rb +278 -0
  78. data/lib/hermoso/models/edit_create.rb +317 -0
  79. data/lib/hermoso/models/edit_preview.rb +199 -0
  80. data/lib/hermoso/models/edit_quote.rb +231 -0
  81. data/lib/hermoso/models/error.rb +198 -0
  82. data/lib/hermoso/models/error_error.rb +335 -0
  83. data/lib/hermoso/models/error_error_unknown_arguments_inner.rb +171 -0
  84. data/lib/hermoso/models/follower_history.rb +239 -0
  85. data/lib/hermoso/models/follower_history_accounts_inner.rb +207 -0
  86. data/lib/hermoso/models/follower_history_accounts_inner_points_inner.rb +178 -0
  87. data/lib/hermoso/models/follower_history_date_range.rb +169 -0
  88. data/lib/hermoso/models/generation_create.rb +435 -0
  89. data/lib/hermoso/models/generation_quote.rb +263 -0
  90. data/lib/hermoso/models/hermoso_tag.rb +230 -0
  91. data/lib/hermoso/models/hermoso_tag_audience_action.rb +325 -0
  92. data/lib/hermoso/models/hermoso_tag_audiences.rb +241 -0
  93. data/lib/hermoso/models/hermoso_tag_events.rb +223 -0
  94. data/lib/hermoso/models/hermoso_tag_events_send.rb +179 -0
  95. data/lib/hermoso/models/hermoso_tag_events_sent.rb +221 -0
  96. data/lib/hermoso/models/hermoso_tag_install.rb +246 -0
  97. data/lib/hermoso/models/hermoso_tag_install_result.rb +255 -0
  98. data/lib/hermoso/models/hermoso_tag_report.rb +261 -0
  99. data/lib/hermoso/models/hermoso_tag_tag.rb +211 -0
  100. data/lib/hermoso/models/hermoso_tag_update.rb +356 -0
  101. data/lib/hermoso/models/inbox_stats.rb +315 -0
  102. data/lib/hermoso/models/job.rb +359 -0
  103. data/lib/hermoso/models/job_cancel.rb +221 -0
  104. data/lib/hermoso/models/job_list.rb +232 -0
  105. data/lib/hermoso/models/media.rb +230 -0
  106. data/lib/hermoso/models/model.rb +327 -0
  107. data/lib/hermoso/models/model_list.rb +203 -0
  108. data/lib/hermoso/models/post.rb +382 -0
  109. data/lib/hermoso/models/post_create.rb +318 -0
  110. data/lib/hermoso/models/post_create_media_inner.rb +104 -0
  111. data/lib/hermoso/models/post_create_media_inner_one_of.rb +201 -0
  112. data/lib/hermoso/models/post_list.rb +221 -0
  113. data/lib/hermoso/models/post_media_inner.rb +169 -0
  114. data/lib/hermoso/models/post_results_inner.rb +205 -0
  115. data/lib/hermoso/models/post_results_inner_first_comment.rb +188 -0
  116. data/lib/hermoso/models/posting_frequency.rb +241 -0
  117. data/lib/hermoso/models/posting_frequency_frequency_inner.rb +205 -0
  118. data/lib/hermoso/models/profit_settings.rb +230 -0
  119. data/lib/hermoso/models/recast.rb +308 -0
  120. data/lib/hermoso/models/recast_create.rb +274 -0
  121. data/lib/hermoso/models/recast_person.rb +182 -0
  122. data/lib/hermoso/models/recast_quote.rb +232 -0
  123. data/lib/hermoso/models/recast_step.rb +201 -0
  124. data/lib/hermoso/models/recast_subject.rb +170 -0
  125. data/lib/hermoso/models/recast_voice.rb +178 -0
  126. data/lib/hermoso/models/recast_window.rb +179 -0
  127. data/lib/hermoso/models/signup.rb +329 -0
  128. data/lib/hermoso/models/signup_claim.rb +178 -0
  129. data/lib/hermoso/models/signup_create.rb +247 -0
  130. data/lib/hermoso/models/tool.rb +360 -0
  131. data/lib/hermoso/models/tool_invoke.rb +169 -0
  132. data/lib/hermoso/models/tool_job.rb +262 -0
  133. data/lib/hermoso/models/tool_list.rb +273 -0
  134. data/lib/hermoso/models/tool_list_areas_inner.rb +219 -0
  135. data/lib/hermoso/models/tool_list_search.rb +181 -0
  136. data/lib/hermoso/models/tool_result.rb +245 -0
  137. data/lib/hermoso/models/tool_result_images_inner.rb +170 -0
  138. data/lib/hermoso/models/warning.rb +244 -0
  139. data/lib/hermoso/spec.rb +8 -0
  140. data/lib/hermoso/version.rb +15 -0
  141. data/lib/hermoso.rb +174 -0
  142. metadata +237 -0
@@ -0,0 +1,236 @@
1
+ =begin
2
+ #Hermoso API
3
+
4
+ #The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
5
+
6
+ The version of the OpenAPI document: 2026-08-26
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.27.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hermoso
17
+ class ConversionEventsSend < ApiModelBase
18
+ attr_accessor :events
19
+
20
+ # Saved destination ids or destination objects, instead of the saved list.
21
+ attr_accessor :destinations
22
+
23
+ attr_accessor :validate_only
24
+
25
+ attr_accessor :test_code
26
+
27
+ attr_accessor :forward
28
+
29
+ attr_accessor :carry_click_ids
30
+
31
+ attr_accessor :source
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'events' => :'events',
37
+ :'destinations' => :'destinations',
38
+ :'validate_only' => :'validate_only',
39
+ :'test_code' => :'test_code',
40
+ :'forward' => :'forward',
41
+ :'carry_click_ids' => :'carry_click_ids',
42
+ :'source' => :'source'
43
+ }
44
+ end
45
+
46
+ # Returns attribute mapping this model knows about
47
+ def self.acceptable_attribute_map
48
+ attribute_map
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ acceptable_attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'events' => :'Array<ConversionEventsSendEventsInner>',
60
+ :'destinations' => :'Array<Object>',
61
+ :'validate_only' => :'Boolean',
62
+ :'test_code' => :'String',
63
+ :'forward' => :'Boolean',
64
+ :'carry_click_ids' => :'Boolean',
65
+ :'source' => :'String'
66
+ }
67
+ end
68
+
69
+ # List of attributes with nullable: true
70
+ def self.openapi_nullable
71
+ Set.new([
72
+ ])
73
+ end
74
+
75
+ # Returns attribute type mapping
76
+ def self.acceptable_openapi_types
77
+ openapi_types
78
+ end
79
+
80
+ # Returns the nullable attributes
81
+ def self.acceptable_openapi_nullable
82
+ openapi_nullable
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::ConversionEventsSend` initialize method"
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ acceptable_attribute_map = self.class.acceptable_attribute_map
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!acceptable_attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::ConversionEventsSend`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
97
+ end
98
+ h[k.to_sym] = v
99
+ }
100
+
101
+ if attributes.key?(:'events')
102
+ if (value = attributes[:'events']).is_a?(Array)
103
+ self.events = value
104
+ end
105
+ else
106
+ self.events = nil
107
+ end
108
+
109
+ if attributes.key?(:'destinations')
110
+ if (value = attributes[:'destinations']).is_a?(Array)
111
+ self.destinations = value
112
+ end
113
+ end
114
+
115
+ if attributes.key?(:'validate_only')
116
+ self.validate_only = attributes[:'validate_only']
117
+ end
118
+
119
+ if attributes.key?(:'test_code')
120
+ self.test_code = attributes[:'test_code']
121
+ end
122
+
123
+ if attributes.key?(:'forward')
124
+ self.forward = attributes[:'forward']
125
+ end
126
+
127
+ if attributes.key?(:'carry_click_ids')
128
+ self.carry_click_ids = attributes[:'carry_click_ids']
129
+ end
130
+
131
+ if attributes.key?(:'source')
132
+ self.source = attributes[:'source']
133
+ end
134
+ end
135
+
136
+ # Show invalid properties with the reasons. Usually used together with valid?
137
+ # @return Array for valid properties with the reasons
138
+ def list_invalid_properties
139
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
140
+ invalid_properties = Array.new
141
+ if @events.nil?
142
+ invalid_properties.push('invalid value for "events", events cannot be nil.')
143
+ end
144
+
145
+ invalid_properties
146
+ end
147
+
148
+ # Check to see if the all the properties in the model are valid
149
+ # @return true if the model is valid
150
+ def valid?
151
+ warn '[DEPRECATED] the `valid?` method is obsolete'
152
+ return false if @events.nil?
153
+ true
154
+ end
155
+
156
+ # Custom attribute writer method with validation
157
+ # @param [Object] events Value to be assigned
158
+ def events=(events)
159
+ if events.nil?
160
+ fail ArgumentError, 'events cannot be nil'
161
+ end
162
+
163
+ @events = events
164
+ end
165
+
166
+ # Checks equality by comparing each attribute.
167
+ # @param [Object] Object to be compared
168
+ def ==(o)
169
+ return true if self.equal?(o)
170
+ self.class == o.class &&
171
+ events == o.events &&
172
+ destinations == o.destinations &&
173
+ validate_only == o.validate_only &&
174
+ test_code == o.test_code &&
175
+ forward == o.forward &&
176
+ carry_click_ids == o.carry_click_ids &&
177
+ source == o.source
178
+ end
179
+
180
+ # @see the `==` method
181
+ # @param [Object] Object to be compared
182
+ def eql?(o)
183
+ self == o
184
+ end
185
+
186
+ # Calculates hash code according to all attributes.
187
+ # @return [Integer] Hash code
188
+ def hash
189
+ [events, destinations, validate_only, test_code, forward, carry_click_ids, source].hash
190
+ end
191
+
192
+ # Builds the object from hash
193
+ # @param [Hash] attributes Model attributes in the form of hash
194
+ # @return [Object] Returns the model itself
195
+ def self.build_from_hash(attributes)
196
+ return nil unless attributes.is_a?(Hash)
197
+ attributes = attributes.transform_keys(&:to_sym)
198
+ # include attributes inherited from allOf parents (the nearest declaration wins)
199
+ map = acceptable_attribute_map
200
+ transformed_hash = {}
201
+ acceptable_openapi_types.each_pair do |key, type|
202
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
203
+ transformed_hash["#{key}"] = nil
204
+ elsif type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[map[key]].is_a?(Array)
208
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
209
+ end
210
+ elsif !attributes[map[key]].nil?
211
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
212
+ end
213
+ end
214
+ new(transformed_hash)
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ # include attributes inherited from allOf parents (the nearest declaration wins)
222
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ end
235
+
236
+ end
@@ -0,0 +1,314 @@
1
+ =begin
2
+ #Hermoso API
3
+
4
+ #The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
5
+
6
+ The version of the OpenAPI document: 2026-08-26
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.27.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hermoso
17
+ class ConversionEventsSendEventsInner < ApiModelBase
18
+ # Purchase, Lead, QualifiedLead, CompleteRegistration, AddToCart, InitiateCheckout, Subscribe, StartTrial, ViewContent, PageView … or your own.
19
+ attr_accessor :event_name
20
+
21
+ # The one dedup key every platform receives.
22
+ attr_accessor :event_id
23
+
24
+ # Unix seconds; default now.
25
+ attr_accessor :event_time
26
+
27
+ attr_accessor :value
28
+
29
+ attr_accessor :currency
30
+
31
+ attr_accessor :action_source
32
+
33
+ attr_accessor :source_url
34
+
35
+ attr_accessor :referrer
36
+
37
+ # email, phone, first_name, last_name, external_id, ip_address, user_agent, country, city, state, zip, dob, gender, lead_id, visitor_id, click_ids {gclid, fbc, fbp, ttclid, li_fat_id, epik, rdt_cid, twclid, msclkid, sccid, oppref …}. Plain values: hashed per platform on our server.
38
+ attr_accessor :user
39
+
40
+ attr_accessor :items
41
+
42
+ attr_accessor :campaign
43
+
44
+ attr_accessor :consent
45
+
46
+ attr_accessor :limited_data_use
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'event_name' => :'event_name',
52
+ :'event_id' => :'event_id',
53
+ :'event_time' => :'event_time',
54
+ :'value' => :'value',
55
+ :'currency' => :'currency',
56
+ :'action_source' => :'action_source',
57
+ :'source_url' => :'source_url',
58
+ :'referrer' => :'referrer',
59
+ :'user' => :'user',
60
+ :'items' => :'items',
61
+ :'campaign' => :'campaign',
62
+ :'consent' => :'consent',
63
+ :'limited_data_use' => :'limited_data_use'
64
+ }
65
+ end
66
+
67
+ # Returns attribute mapping this model knows about
68
+ def self.acceptable_attribute_map
69
+ attribute_map
70
+ end
71
+
72
+ # Returns all the JSON keys this model knows about
73
+ def self.acceptable_attributes
74
+ acceptable_attribute_map.values
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ def self.openapi_types
79
+ {
80
+ :'event_name' => :'String',
81
+ :'event_id' => :'String',
82
+ :'event_time' => :'Integer',
83
+ :'value' => :'Float',
84
+ :'currency' => :'String',
85
+ :'action_source' => :'String',
86
+ :'source_url' => :'String',
87
+ :'referrer' => :'String',
88
+ :'user' => :'Hash<String, Object>',
89
+ :'items' => :'Array<Hash<String, Object>>',
90
+ :'campaign' => :'Hash<String, Object>',
91
+ :'consent' => :'Hash<String, Object>',
92
+ :'limited_data_use' => :'Boolean'
93
+ }
94
+ end
95
+
96
+ # List of attributes with nullable: true
97
+ def self.openapi_nullable
98
+ Set.new([
99
+ ])
100
+ end
101
+
102
+ # Returns attribute type mapping
103
+ def self.acceptable_openapi_types
104
+ openapi_types
105
+ end
106
+
107
+ # Returns the nullable attributes
108
+ def self.acceptable_openapi_nullable
109
+ openapi_nullable
110
+ end
111
+
112
+ # Initializes the object
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ def initialize(attributes = {})
115
+ if (!attributes.is_a?(Hash))
116
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::ConversionEventsSendEventsInner` initialize method"
117
+ end
118
+
119
+ # check to see if the attribute exists and convert string to symbol for hash key
120
+ acceptable_attribute_map = self.class.acceptable_attribute_map
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!acceptable_attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::ConversionEventsSendEventsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'event_name')
129
+ self.event_name = attributes[:'event_name']
130
+ else
131
+ self.event_name = nil
132
+ end
133
+
134
+ if attributes.key?(:'event_id')
135
+ self.event_id = attributes[:'event_id']
136
+ else
137
+ self.event_id = nil
138
+ end
139
+
140
+ if attributes.key?(:'event_time')
141
+ self.event_time = attributes[:'event_time']
142
+ end
143
+
144
+ if attributes.key?(:'value')
145
+ self.value = attributes[:'value']
146
+ end
147
+
148
+ if attributes.key?(:'currency')
149
+ self.currency = attributes[:'currency']
150
+ end
151
+
152
+ if attributes.key?(:'action_source')
153
+ self.action_source = attributes[:'action_source']
154
+ end
155
+
156
+ if attributes.key?(:'source_url')
157
+ self.source_url = attributes[:'source_url']
158
+ end
159
+
160
+ if attributes.key?(:'referrer')
161
+ self.referrer = attributes[:'referrer']
162
+ end
163
+
164
+ if attributes.key?(:'user')
165
+ if (value = attributes[:'user']).is_a?(Hash)
166
+ self.user = value
167
+ end
168
+ end
169
+
170
+ if attributes.key?(:'items')
171
+ if (value = attributes[:'items']).is_a?(Array)
172
+ self.items = value
173
+ end
174
+ end
175
+
176
+ if attributes.key?(:'campaign')
177
+ if (value = attributes[:'campaign']).is_a?(Hash)
178
+ self.campaign = value
179
+ end
180
+ end
181
+
182
+ if attributes.key?(:'consent')
183
+ if (value = attributes[:'consent']).is_a?(Hash)
184
+ self.consent = value
185
+ end
186
+ end
187
+
188
+ if attributes.key?(:'limited_data_use')
189
+ self.limited_data_use = attributes[:'limited_data_use']
190
+ end
191
+ end
192
+
193
+ # Show invalid properties with the reasons. Usually used together with valid?
194
+ # @return Array for valid properties with the reasons
195
+ def list_invalid_properties
196
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
197
+ invalid_properties = Array.new
198
+ if @event_name.nil?
199
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
200
+ end
201
+
202
+ if @event_id.nil?
203
+ invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
204
+ end
205
+
206
+ invalid_properties
207
+ end
208
+
209
+ # Check to see if the all the properties in the model are valid
210
+ # @return true if the model is valid
211
+ def valid?
212
+ warn '[DEPRECATED] the `valid?` method is obsolete'
213
+ return false if @event_name.nil?
214
+ return false if @event_id.nil?
215
+ true
216
+ end
217
+
218
+ # Custom attribute writer method with validation
219
+ # @param [Object] event_name Value to be assigned
220
+ def event_name=(event_name)
221
+ if event_name.nil?
222
+ fail ArgumentError, 'event_name cannot be nil'
223
+ end
224
+
225
+ @event_name = event_name
226
+ end
227
+
228
+ # Custom attribute writer method with validation
229
+ # @param [Object] event_id Value to be assigned
230
+ def event_id=(event_id)
231
+ if event_id.nil?
232
+ fail ArgumentError, 'event_id cannot be nil'
233
+ end
234
+
235
+ @event_id = event_id
236
+ end
237
+
238
+ # Checks equality by comparing each attribute.
239
+ # @param [Object] Object to be compared
240
+ def ==(o)
241
+ return true if self.equal?(o)
242
+ self.class == o.class &&
243
+ event_name == o.event_name &&
244
+ event_id == o.event_id &&
245
+ event_time == o.event_time &&
246
+ value == o.value &&
247
+ currency == o.currency &&
248
+ action_source == o.action_source &&
249
+ source_url == o.source_url &&
250
+ referrer == o.referrer &&
251
+ user == o.user &&
252
+ items == o.items &&
253
+ campaign == o.campaign &&
254
+ consent == o.consent &&
255
+ limited_data_use == o.limited_data_use
256
+ end
257
+
258
+ # @see the `==` method
259
+ # @param [Object] Object to be compared
260
+ def eql?(o)
261
+ self == o
262
+ end
263
+
264
+ # Calculates hash code according to all attributes.
265
+ # @return [Integer] Hash code
266
+ def hash
267
+ [event_name, event_id, event_time, value, currency, action_source, source_url, referrer, user, items, campaign, consent, limited_data_use].hash
268
+ end
269
+
270
+ # Builds the object from hash
271
+ # @param [Hash] attributes Model attributes in the form of hash
272
+ # @return [Object] Returns the model itself
273
+ def self.build_from_hash(attributes)
274
+ return nil unless attributes.is_a?(Hash)
275
+ attributes = attributes.transform_keys(&:to_sym)
276
+ # include attributes inherited from allOf parents (the nearest declaration wins)
277
+ map = acceptable_attribute_map
278
+ transformed_hash = {}
279
+ acceptable_openapi_types.each_pair do |key, type|
280
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
281
+ transformed_hash["#{key}"] = nil
282
+ elsif type =~ /\AArray<(.*)>/i
283
+ # check to ensure the input is an array given that the attribute
284
+ # is documented as an array but the input is not
285
+ if attributes[map[key]].is_a?(Array)
286
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
287
+ end
288
+ elsif !attributes[map[key]].nil?
289
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
290
+ end
291
+ end
292
+ new(transformed_hash)
293
+ end
294
+
295
+ # Returns the object in the form of hash
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_hash
298
+ hash = {}
299
+ # include attributes inherited from allOf parents (the nearest declaration wins)
300
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
301
+ value = self.send(attr)
302
+ if value.nil?
303
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
304
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
305
+ end
306
+
307
+ hash[param] = _to_hash(value)
308
+ end
309
+ hash
310
+ end
311
+
312
+ end
313
+
314
+ end