trustcomponent 0.0.1.beta.0
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.
- checksums.yaml +7 -0
- data/LICENSE.md +21 -0
- data/README.md +78 -0
- data/lib/trustcomponent/captcha.rb +24 -0
- data/lib/trustcomponent/client.rb +44 -0
- data/lib/trustcomponent/errors.rb +58 -0
- data/lib/trustcomponent/http_middleware.rb +83 -0
- data/lib/trustcomponent.rb +15 -0
- data/lib/trustcomponent_generated/api/analytics_server_events_api.rb +90 -0
- data/lib/trustcomponent_generated/api/analytics_websites_api.rb +527 -0
- data/lib/trustcomponent_generated/api/captcha_verifications_api.rb +88 -0
- data/lib/trustcomponent_generated/api/monitoring_heartbeats_api.rb +89 -0
- data/lib/trustcomponent_generated/api/platform_events_api.rb +106 -0
- data/lib/trustcomponent_generated/api/tax_validation_schedules_api.rb +147 -0
- data/lib/trustcomponent_generated/api/tax_validation_validation_results_api.rb +83 -0
- data/lib/trustcomponent_generated/api/tax_validation_validations_api.rb +156 -0
- data/lib/trustcomponent_generated/api_client.rb +441 -0
- data/lib/trustcomponent_generated/api_error.rb +58 -0
- data/lib/trustcomponent_generated/api_model_base.rb +88 -0
- data/lib/trustcomponent_generated/configuration.rb +400 -0
- data/lib/trustcomponent_generated/models/analytics_event_category_enum.rb +52 -0
- data/lib/trustcomponent_generated/models/analytics_realtime.rb +251 -0
- data/lib/trustcomponent_generated/models/analytics_realtime_page.rb +193 -0
- data/lib/trustcomponent_generated/models/analytics_realtime_point.rb +193 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_create_params.rb +295 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_commerce_create_params.rb +366 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_commerce_product_create_params.rb +298 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_create_params.rb +508 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_error_create_params.rb +269 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_refund_create_params.rb +211 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_result.rb +194 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_result_drop_reason_enum.rb +52 -0
- data/lib/trustcomponent_generated/models/analytics_server_event_batch_result_dropped.rb +213 -0
- data/lib/trustcomponent_generated/models/analytics_stats_breakdown.rb +351 -0
- data/lib/trustcomponent_generated/models/analytics_stats_breakdown_row.rb +201 -0
- data/lib/trustcomponent_generated/models/analytics_stats_breakdown_row_page.rb +226 -0
- data/lib/trustcomponent_generated/models/analytics_stats_conversions.rb +249 -0
- data/lib/trustcomponent_generated/models/analytics_stats_conversions_goal.rb +260 -0
- data/lib/trustcomponent_generated/models/analytics_stats_conversions_goal_revenue.rb +193 -0
- data/lib/trustcomponent_generated/models/analytics_stats_dimension_enum.rb +69 -0
- data/lib/trustcomponent_generated/models/analytics_stats_filter_match_mode_enum.rb +40 -0
- data/lib/trustcomponent_generated/models/analytics_stats_filter_operator_enum.rb +45 -0
- data/lib/trustcomponent_generated/models/analytics_stats_granularity_enum.rb +40 -0
- data/lib/trustcomponent_generated/models/analytics_stats_overview.rb +282 -0
- data/lib/trustcomponent_generated/models/analytics_stats_timeseries.rb +270 -0
- data/lib/trustcomponent_generated/models/analytics_stats_timeseries_point.rb +192 -0
- data/lib/trustcomponent_generated/models/analytics_stats_totals.rb +307 -0
- data/lib/trustcomponent_generated/models/analytics_website.rb +249 -0
- data/lib/trustcomponent_generated/models/analytics_websites_page.rb +249 -0
- data/lib/trustcomponent_generated/models/captcha_verification_result.rb +350 -0
- data/lib/trustcomponent_generated/models/platform_event.rb +439 -0
- data/lib/trustcomponent_generated/models/platform_event_actor.rb +218 -0
- data/lib/trustcomponent_generated/models/platform_event_actor_automation.rb +214 -0
- data/lib/trustcomponent_generated/models/platform_event_actor_automation_kind_enum.rb +41 -0
- data/lib/trustcomponent_generated/models/platform_event_actor_type_enum.rb +43 -0
- data/lib/trustcomponent_generated/models/platform_event_change.rb +263 -0
- data/lib/trustcomponent_generated/models/platform_event_change_operation_enum.rb +43 -0
- data/lib/trustcomponent_generated/models/platform_event_origin.rb +263 -0
- data/lib/trustcomponent_generated/models/platform_event_ref.rb +204 -0
- data/lib/trustcomponent_generated/models/platform_event_source_enum.rb +44 -0
- data/lib/trustcomponent_generated/models/platform_events_page.rb +314 -0
- data/lib/trustcomponent_generated/models/tax_validation_match_status_enum.rb +44 -0
- data/lib/trustcomponent_generated/models/tax_validation_provider_enum.rb +46 -0
- data/lib/trustcomponent_generated/models/tax_validation_provider_status_enum.rb +51 -0
- data/lib/trustcomponent_generated/models/tax_validation_schedule.rb +423 -0
- data/lib/trustcomponent_generated/models/tax_validation_schedule_create_params.rb +321 -0
- data/lib/trustcomponent_generated/models/tax_validation_tax_address.rb +188 -0
- data/lib/trustcomponent_generated/models/tax_validation_tax_identifier_scheme_enum.rb +49 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation.rb +372 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_address_match.rb +290 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_batch_create_params.rb +176 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_create_params.rb +292 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_frequency_enum.rb +41 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_input.rb +322 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_match.rb +238 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_mode_enum.rb +40 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_outcome_enum.rb +44 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_request_status_enum.rb +44 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_response_data.rb +177 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_result.rb +459 -0
- data/lib/trustcomponent_generated/models/tax_validation_validation_schedule_attach_params.rb +225 -0
- data/lib/trustcomponent_generated/models/tax_validation_verification_method_enum.rb +40 -0
- data/lib/trustcomponent_generated/modules.rb +51 -0
- data/lib/trustcomponent_generated/version.rb +15 -0
- data/lib/trustcomponent_generated.rb +110 -0
- metadata +190 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TrustComponent API
|
|
3
|
+
|
|
4
|
+
#The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.1-beta.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrustComponent::Generated
|
|
17
|
+
# Key figures of one hour or one day
|
|
18
|
+
class AnalyticsStatsTimeseriesPoint < ApiModelBase
|
|
19
|
+
# Start of the hour or day
|
|
20
|
+
attr_accessor :bucket_at
|
|
21
|
+
|
|
22
|
+
attr_accessor :totals
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'bucket_at' => :'bucketAt',
|
|
28
|
+
:'totals' => :'totals'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'bucket_at' => :'String',
|
|
46
|
+
:'totals' => :'AnalyticsStatsTotals'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrustComponent::Generated::AnalyticsStatsTimeseriesPoint` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrustComponent::Generated::AnalyticsStatsTimeseriesPoint`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'bucket_at')
|
|
73
|
+
self.bucket_at = attributes[:'bucket_at']
|
|
74
|
+
else
|
|
75
|
+
self.bucket_at = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'totals')
|
|
79
|
+
self.totals = attributes[:'totals']
|
|
80
|
+
else
|
|
81
|
+
self.totals = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @bucket_at.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "bucket_at", bucket_at cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @totals.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "totals", totals cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @bucket_at.nil?
|
|
106
|
+
return false if @totals.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] bucket_at Value to be assigned
|
|
112
|
+
def bucket_at=(bucket_at)
|
|
113
|
+
if bucket_at.nil?
|
|
114
|
+
fail ArgumentError, 'bucket_at cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@bucket_at = bucket_at
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] totals Value to be assigned
|
|
122
|
+
def totals=(totals)
|
|
123
|
+
if totals.nil?
|
|
124
|
+
fail ArgumentError, 'totals cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@totals = totals
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
bucket_at == o.bucket_at &&
|
|
136
|
+
totals == o.totals
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[bucket_at, totals].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TrustComponent API
|
|
3
|
+
|
|
4
|
+
#The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.1-beta.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrustComponent::Generated
|
|
17
|
+
# Key figures of a range, a bucket or a row
|
|
18
|
+
class AnalyticsStatsTotals < ApiModelBase
|
|
19
|
+
# Pageviews
|
|
20
|
+
attr_accessor :pageviews
|
|
21
|
+
|
|
22
|
+
# Sessions with at least one browser event; a session ends after 30 minutes without activity. Rows of the page and event dimensions (HOSTNAME, PATH, PATH_PATTERN, PAGE_TITLE, EVENT_NAME) count events, not sessions, and carry 0 here, as do bounces and engaged time; on PATH rows the entrances are the sessions that started on the page
|
|
23
|
+
attr_accessor :sessions
|
|
24
|
+
|
|
25
|
+
# Distinct visitors, recognised by visitor id where the visitor agreed and by session otherwise; estimated from the hourly aggregates (within about 1 %) when the range reaches beyond the time stored sessions are kept
|
|
26
|
+
attr_accessor :visitors
|
|
27
|
+
|
|
28
|
+
# All events, pageviews included
|
|
29
|
+
attr_accessor :events
|
|
30
|
+
|
|
31
|
+
# Sessions with a single pageview and no interaction
|
|
32
|
+
attr_accessor :bounces
|
|
33
|
+
|
|
34
|
+
# Bounces per session in percent; null without sessions
|
|
35
|
+
attr_accessor :bounce_rate_percent
|
|
36
|
+
|
|
37
|
+
# Time the pages were visible and in use, summed over all sessions
|
|
38
|
+
attr_accessor :engaged_seconds
|
|
39
|
+
|
|
40
|
+
# Engaged time per session; null without sessions
|
|
41
|
+
attr_accessor :average_engaged_seconds
|
|
42
|
+
|
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
|
+
def self.attribute_map
|
|
45
|
+
{
|
|
46
|
+
:'pageviews' => :'pageviews',
|
|
47
|
+
:'sessions' => :'sessions',
|
|
48
|
+
:'visitors' => :'visitors',
|
|
49
|
+
:'events' => :'events',
|
|
50
|
+
:'bounces' => :'bounces',
|
|
51
|
+
:'bounce_rate_percent' => :'bounceRatePercent',
|
|
52
|
+
:'engaged_seconds' => :'engagedSeconds',
|
|
53
|
+
:'average_engaged_seconds' => :'averageEngagedSeconds'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns attribute mapping this model knows about
|
|
58
|
+
def self.acceptable_attribute_map
|
|
59
|
+
attribute_map
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns all the JSON keys this model knows about
|
|
63
|
+
def self.acceptable_attributes
|
|
64
|
+
acceptable_attribute_map.values
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Attribute type mapping.
|
|
68
|
+
def self.openapi_types
|
|
69
|
+
{
|
|
70
|
+
:'pageviews' => :'Integer',
|
|
71
|
+
:'sessions' => :'Integer',
|
|
72
|
+
:'visitors' => :'Integer',
|
|
73
|
+
:'events' => :'Integer',
|
|
74
|
+
:'bounces' => :'Integer',
|
|
75
|
+
:'bounce_rate_percent' => :'Float',
|
|
76
|
+
:'engaged_seconds' => :'Float',
|
|
77
|
+
:'average_engaged_seconds' => :'Float'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# List of attributes with nullable: true
|
|
82
|
+
def self.openapi_nullable
|
|
83
|
+
Set.new([
|
|
84
|
+
:'visitors',
|
|
85
|
+
:'bounce_rate_percent',
|
|
86
|
+
:'average_engaged_seconds'
|
|
87
|
+
])
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Initializes the object
|
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
92
|
+
def initialize(attributes = {})
|
|
93
|
+
if (!attributes.is_a?(Hash))
|
|
94
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrustComponent::Generated::AnalyticsStatsTotals` initialize method"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
98
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
99
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
100
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
101
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrustComponent::Generated::AnalyticsStatsTotals`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
102
|
+
end
|
|
103
|
+
h[k.to_sym] = v
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'pageviews')
|
|
107
|
+
self.pageviews = attributes[:'pageviews']
|
|
108
|
+
else
|
|
109
|
+
self.pageviews = nil
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'sessions')
|
|
113
|
+
self.sessions = attributes[:'sessions']
|
|
114
|
+
else
|
|
115
|
+
self.sessions = nil
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'visitors')
|
|
119
|
+
self.visitors = attributes[:'visitors']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'events')
|
|
123
|
+
self.events = attributes[:'events']
|
|
124
|
+
else
|
|
125
|
+
self.events = nil
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'bounces')
|
|
129
|
+
self.bounces = attributes[:'bounces']
|
|
130
|
+
else
|
|
131
|
+
self.bounces = nil
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'bounce_rate_percent')
|
|
135
|
+
self.bounce_rate_percent = attributes[:'bounce_rate_percent']
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'engaged_seconds')
|
|
139
|
+
self.engaged_seconds = attributes[:'engaged_seconds']
|
|
140
|
+
else
|
|
141
|
+
self.engaged_seconds = nil
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'average_engaged_seconds')
|
|
145
|
+
self.average_engaged_seconds = attributes[:'average_engaged_seconds']
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
150
|
+
# @return Array for valid properties with the reasons
|
|
151
|
+
def list_invalid_properties
|
|
152
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
153
|
+
invalid_properties = Array.new
|
|
154
|
+
if @pageviews.nil?
|
|
155
|
+
invalid_properties.push('invalid value for "pageviews", pageviews cannot be nil.')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if @sessions.nil?
|
|
159
|
+
invalid_properties.push('invalid value for "sessions", sessions cannot be nil.')
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if @events.nil?
|
|
163
|
+
invalid_properties.push('invalid value for "events", events cannot be nil.')
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if @bounces.nil?
|
|
167
|
+
invalid_properties.push('invalid value for "bounces", bounces cannot be nil.')
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if @engaged_seconds.nil?
|
|
171
|
+
invalid_properties.push('invalid value for "engaged_seconds", engaged_seconds cannot be nil.')
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
invalid_properties
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Check to see if the all the properties in the model are valid
|
|
178
|
+
# @return true if the model is valid
|
|
179
|
+
def valid?
|
|
180
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
181
|
+
return false if @pageviews.nil?
|
|
182
|
+
return false if @sessions.nil?
|
|
183
|
+
return false if @events.nil?
|
|
184
|
+
return false if @bounces.nil?
|
|
185
|
+
return false if @engaged_seconds.nil?
|
|
186
|
+
true
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Custom attribute writer method with validation
|
|
190
|
+
# @param [Object] pageviews Value to be assigned
|
|
191
|
+
def pageviews=(pageviews)
|
|
192
|
+
if pageviews.nil?
|
|
193
|
+
fail ArgumentError, 'pageviews cannot be nil'
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
@pageviews = pageviews
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Custom attribute writer method with validation
|
|
200
|
+
# @param [Object] sessions Value to be assigned
|
|
201
|
+
def sessions=(sessions)
|
|
202
|
+
if sessions.nil?
|
|
203
|
+
fail ArgumentError, 'sessions cannot be nil'
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
@sessions = sessions
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Custom attribute writer method with validation
|
|
210
|
+
# @param [Object] events Value to be assigned
|
|
211
|
+
def events=(events)
|
|
212
|
+
if events.nil?
|
|
213
|
+
fail ArgumentError, 'events cannot be nil'
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
@events = events
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Custom attribute writer method with validation
|
|
220
|
+
# @param [Object] bounces Value to be assigned
|
|
221
|
+
def bounces=(bounces)
|
|
222
|
+
if bounces.nil?
|
|
223
|
+
fail ArgumentError, 'bounces cannot be nil'
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
@bounces = bounces
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Custom attribute writer method with validation
|
|
230
|
+
# @param [Object] engaged_seconds Value to be assigned
|
|
231
|
+
def engaged_seconds=(engaged_seconds)
|
|
232
|
+
if engaged_seconds.nil?
|
|
233
|
+
fail ArgumentError, 'engaged_seconds cannot be nil'
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
@engaged_seconds = engaged_seconds
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Checks equality by comparing each attribute.
|
|
240
|
+
# @param [Object] Object to be compared
|
|
241
|
+
def ==(o)
|
|
242
|
+
return true if self.equal?(o)
|
|
243
|
+
self.class == o.class &&
|
|
244
|
+
pageviews == o.pageviews &&
|
|
245
|
+
sessions == o.sessions &&
|
|
246
|
+
visitors == o.visitors &&
|
|
247
|
+
events == o.events &&
|
|
248
|
+
bounces == o.bounces &&
|
|
249
|
+
bounce_rate_percent == o.bounce_rate_percent &&
|
|
250
|
+
engaged_seconds == o.engaged_seconds &&
|
|
251
|
+
average_engaged_seconds == o.average_engaged_seconds
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# @see the `==` method
|
|
255
|
+
# @param [Object] Object to be compared
|
|
256
|
+
def eql?(o)
|
|
257
|
+
self == o
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Calculates hash code according to all attributes.
|
|
261
|
+
# @return [Integer] Hash code
|
|
262
|
+
def hash
|
|
263
|
+
[pageviews, sessions, visitors, events, bounces, bounce_rate_percent, engaged_seconds, average_engaged_seconds].hash
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Builds the object from hash
|
|
267
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
268
|
+
# @return [Object] Returns the model itself
|
|
269
|
+
def self.build_from_hash(attributes)
|
|
270
|
+
return nil unless attributes.is_a?(Hash)
|
|
271
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
272
|
+
transformed_hash = {}
|
|
273
|
+
openapi_types.each_pair do |key, type|
|
|
274
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
275
|
+
transformed_hash["#{key}"] = nil
|
|
276
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
277
|
+
# check to ensure the input is an array given that the attribute
|
|
278
|
+
# is documented as an array but the input is not
|
|
279
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
280
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
281
|
+
end
|
|
282
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
283
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
new(transformed_hash)
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# Returns the object in the form of hash
|
|
290
|
+
# @return [Hash] Returns the object in the form of hash
|
|
291
|
+
def to_hash
|
|
292
|
+
hash = {}
|
|
293
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
294
|
+
value = self.send(attr)
|
|
295
|
+
if value.nil?
|
|
296
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
297
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
hash[param] = _to_hash(value)
|
|
301
|
+
end
|
|
302
|
+
hash
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
end
|