late-sdk 0.0.950 → 0.0.951
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 +4 -4
- data/README.md +11 -0
- data/docs/AdCampaignsApi.md +154 -0
- data/docs/AdKeyword.md +3 -1
- data/docs/AdKeywordQuality.md +24 -0
- data/docs/AdScheduleWindow.md +32 -0
- data/docs/GetCampaignAdSchedule200Response.md +28 -0
- data/docs/GetCampaignAdSchedule200ResponsePerformance.md +22 -0
- data/docs/GetCampaignAdSchedule200ResponsePerformanceByDayOfWeekInner.md +26 -0
- data/docs/GetCampaignAdSchedule200ResponsePerformanceByHourInner.md +26 -0
- data/docs/UpdateCampaignAdSchedule200Response.md +22 -0
- data/docs/UpdateCampaignAdScheduleRequest.md +18 -0
- data/docs/UpdateCampaignAdScheduleRequestScheduleInner.md +28 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +164 -0
- data/lib/zernio-sdk/models/ad_keyword.rb +11 -2
- data/lib/zernio-sdk/models/ad_keyword_quality.rb +241 -0
- data/lib/zernio-sdk/models/ad_schedule_window.rb +329 -0
- data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response.rb +197 -0
- data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response_performance.rb +174 -0
- data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_day_of_week_inner.rb +218 -0
- data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_hour_inner.rb +212 -0
- data/lib/zernio-sdk/models/update_campaign_ad_schedule200_response.rb +167 -0
- data/lib/zernio-sdk/models/update_campaign_ad_schedule_request.rb +176 -0
- data/lib/zernio-sdk/models/update_campaign_ad_schedule_request_schedule_inner.rb +362 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +9 -0
- data/openapi.yaml +200 -1
- data/spec/api/ad_campaigns_api_spec.rb +30 -0
- data/spec/models/ad_keyword_quality_spec.rb +66 -0
- data/spec/models/ad_keyword_spec.rb +6 -0
- data/spec/models/ad_schedule_window_spec.rb +90 -0
- data/spec/models/get_campaign_ad_schedule200_response_performance_by_day_of_week_inner_spec.rb +64 -0
- data/spec/models/get_campaign_ad_schedule200_response_performance_by_hour_inner_spec.rb +60 -0
- data/spec/models/get_campaign_ad_schedule200_response_performance_spec.rb +48 -0
- data/spec/models/get_campaign_ad_schedule200_response_spec.rb +66 -0
- data/spec/models/update_campaign_ad_schedule200_response_spec.rb +48 -0
- data/spec/models/update_campaign_ad_schedule_request_schedule_inner_spec.rb +78 -0
- data/spec/models/update_campaign_ad_schedule_request_spec.rb +36 -0
- data/zernio-sdk-0.0.951.gem +0 -0
- metadata +38 -2
- data/zernio-sdk-0.0.950.gem +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
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 UpdateCampaignAdScheduleRequest < ApiModelBase
|
|
18
|
+
# The complete set of windows. Required, so clearing the schedule is always deliberate rather than an omission.
|
|
19
|
+
attr_accessor :schedule
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'schedule' => :'schedule'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'schedule' => :'Array<UpdateCampaignAdScheduleRequestScheduleInner>'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateCampaignAdScheduleRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateCampaignAdScheduleRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'schedule')
|
|
68
|
+
if (value = attributes[:'schedule']).is_a?(Array)
|
|
69
|
+
self.schedule = value
|
|
70
|
+
end
|
|
71
|
+
else
|
|
72
|
+
self.schedule = nil
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
if @schedule.nil?
|
|
82
|
+
invalid_properties.push('invalid value for "schedule", schedule cannot be nil.')
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if @schedule.length > 42
|
|
86
|
+
invalid_properties.push('invalid value for "schedule", number of items must be less than or equal to 42.')
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
invalid_properties
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Check to see if the all the properties in the model are valid
|
|
93
|
+
# @return true if the model is valid
|
|
94
|
+
def valid?
|
|
95
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
96
|
+
return false if @schedule.nil?
|
|
97
|
+
return false if @schedule.length > 42
|
|
98
|
+
true
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Custom attribute writer method with validation
|
|
102
|
+
# @param [Object] schedule Value to be assigned
|
|
103
|
+
def schedule=(schedule)
|
|
104
|
+
if schedule.nil?
|
|
105
|
+
fail ArgumentError, 'schedule cannot be nil'
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if schedule.length > 42
|
|
109
|
+
fail ArgumentError, 'invalid value for "schedule", number of items must be less than or equal to 42.'
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
@schedule = schedule
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def ==(o)
|
|
118
|
+
return true if self.equal?(o)
|
|
119
|
+
self.class == o.class &&
|
|
120
|
+
schedule == o.schedule
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
def hash
|
|
132
|
+
[schedule].hash
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Builds the object from hash
|
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
+
# @return [Object] Returns the model itself
|
|
138
|
+
def self.build_from_hash(attributes)
|
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
|
140
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
141
|
+
transformed_hash = {}
|
|
142
|
+
openapi_types.each_pair do |key, type|
|
|
143
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = nil
|
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
146
|
+
# check to ensure the input is an array given that the attribute
|
|
147
|
+
# is documented as an array but the input is not
|
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
149
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
150
|
+
end
|
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
new(transformed_hash)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Returns the object in the form of hash
|
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
|
160
|
+
def to_hash
|
|
161
|
+
hash = {}
|
|
162
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
163
|
+
value = self.send(attr)
|
|
164
|
+
if value.nil?
|
|
165
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
166
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
hash[param] = _to_hash(value)
|
|
170
|
+
end
|
|
171
|
+
hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
@@ -0,0 +1,362 @@
|
|
|
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 UpdateCampaignAdScheduleRequestScheduleInner < ApiModelBase
|
|
18
|
+
attr_accessor :day_of_week
|
|
19
|
+
|
|
20
|
+
attr_accessor :start_hour
|
|
21
|
+
|
|
22
|
+
# Quarter-hours only.
|
|
23
|
+
attr_accessor :start_minute
|
|
24
|
+
|
|
25
|
+
# 24 means midnight at the end of the day.
|
|
26
|
+
attr_accessor :end_hour
|
|
27
|
+
|
|
28
|
+
# Quarter-hours only. Must be 0 when endHour is 24.
|
|
29
|
+
attr_accessor :end_minute
|
|
30
|
+
|
|
31
|
+
# Bid adjustment for this window. Null runs it at the campaign bid.
|
|
32
|
+
attr_accessor :bid_modifier
|
|
33
|
+
|
|
34
|
+
class EnumAttributeValidator
|
|
35
|
+
attr_reader :datatype
|
|
36
|
+
attr_reader :allowable_values
|
|
37
|
+
|
|
38
|
+
def initialize(datatype, allowable_values)
|
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
|
40
|
+
case datatype.to_s
|
|
41
|
+
when /Integer/i
|
|
42
|
+
value.to_i
|
|
43
|
+
when /Float/i
|
|
44
|
+
value.to_f
|
|
45
|
+
else
|
|
46
|
+
value
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def valid?(value)
|
|
52
|
+
!value || allowable_values.include?(value)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
|
+
def self.attribute_map
|
|
58
|
+
{
|
|
59
|
+
:'day_of_week' => :'dayOfWeek',
|
|
60
|
+
:'start_hour' => :'startHour',
|
|
61
|
+
:'start_minute' => :'startMinute',
|
|
62
|
+
:'end_hour' => :'endHour',
|
|
63
|
+
:'end_minute' => :'endMinute',
|
|
64
|
+
:'bid_modifier' => :'bidModifier'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns attribute mapping this model knows about
|
|
69
|
+
def self.acceptable_attribute_map
|
|
70
|
+
attribute_map
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns all the JSON keys this model knows about
|
|
74
|
+
def self.acceptable_attributes
|
|
75
|
+
acceptable_attribute_map.values
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Attribute type mapping.
|
|
79
|
+
def self.openapi_types
|
|
80
|
+
{
|
|
81
|
+
:'day_of_week' => :'String',
|
|
82
|
+
:'start_hour' => :'Integer',
|
|
83
|
+
:'start_minute' => :'Integer',
|
|
84
|
+
:'end_hour' => :'Integer',
|
|
85
|
+
:'end_minute' => :'Integer',
|
|
86
|
+
:'bid_modifier' => :'Float'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# List of attributes with nullable: true
|
|
91
|
+
def self.openapi_nullable
|
|
92
|
+
Set.new([
|
|
93
|
+
:'bid_modifier'
|
|
94
|
+
])
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Initializes the object
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
def initialize(attributes = {})
|
|
100
|
+
if (!attributes.is_a?(Hash))
|
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateCampaignAdScheduleRequestScheduleInner` initialize method"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateCampaignAdScheduleRequestScheduleInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
109
|
+
end
|
|
110
|
+
h[k.to_sym] = v
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'day_of_week')
|
|
114
|
+
self.day_of_week = attributes[:'day_of_week']
|
|
115
|
+
else
|
|
116
|
+
self.day_of_week = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'start_hour')
|
|
120
|
+
self.start_hour = attributes[:'start_hour']
|
|
121
|
+
else
|
|
122
|
+
self.start_hour = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'start_minute')
|
|
126
|
+
self.start_minute = attributes[:'start_minute']
|
|
127
|
+
else
|
|
128
|
+
self.start_minute = START_MINUTE::N0
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'end_hour')
|
|
132
|
+
self.end_hour = attributes[:'end_hour']
|
|
133
|
+
else
|
|
134
|
+
self.end_hour = nil
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'end_minute')
|
|
138
|
+
self.end_minute = attributes[:'end_minute']
|
|
139
|
+
else
|
|
140
|
+
self.end_minute = END_MINUTE::N0
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'bid_modifier')
|
|
144
|
+
self.bid_modifier = attributes[:'bid_modifier']
|
|
145
|
+
else
|
|
146
|
+
self.bid_modifier = null
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
151
|
+
# @return Array for valid properties with the reasons
|
|
152
|
+
def list_invalid_properties
|
|
153
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
154
|
+
invalid_properties = Array.new
|
|
155
|
+
if @day_of_week.nil?
|
|
156
|
+
invalid_properties.push('invalid value for "day_of_week", day_of_week cannot be nil.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if @start_hour.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "start_hour", start_hour cannot be nil.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if @start_hour > 23
|
|
164
|
+
invalid_properties.push('invalid value for "start_hour", must be smaller than or equal to 23.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if @start_hour < 0
|
|
168
|
+
invalid_properties.push('invalid value for "start_hour", must be greater than or equal to 0.')
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if @end_hour.nil?
|
|
172
|
+
invalid_properties.push('invalid value for "end_hour", end_hour cannot be nil.')
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if @end_hour > 24
|
|
176
|
+
invalid_properties.push('invalid value for "end_hour", must be smaller than or equal to 24.')
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if @end_hour < 0
|
|
180
|
+
invalid_properties.push('invalid value for "end_hour", must be greater than or equal to 0.')
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if !@bid_modifier.nil? && @bid_modifier > 10
|
|
184
|
+
invalid_properties.push('invalid value for "bid_modifier", must be smaller than or equal to 10.')
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if !@bid_modifier.nil? && @bid_modifier < 0.1
|
|
188
|
+
invalid_properties.push('invalid value for "bid_modifier", must be greater than or equal to 0.1.')
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
invalid_properties
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Check to see if the all the properties in the model are valid
|
|
195
|
+
# @return true if the model is valid
|
|
196
|
+
def valid?
|
|
197
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
198
|
+
return false if @day_of_week.nil?
|
|
199
|
+
day_of_week_validator = EnumAttributeValidator.new('String', ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"])
|
|
200
|
+
return false unless day_of_week_validator.valid?(@day_of_week)
|
|
201
|
+
return false if @start_hour.nil?
|
|
202
|
+
return false if @start_hour > 23
|
|
203
|
+
return false if @start_hour < 0
|
|
204
|
+
start_minute_validator = EnumAttributeValidator.new('Integer', [0, 15, 30, 45])
|
|
205
|
+
return false unless start_minute_validator.valid?(@start_minute)
|
|
206
|
+
return false if @end_hour.nil?
|
|
207
|
+
return false if @end_hour > 24
|
|
208
|
+
return false if @end_hour < 0
|
|
209
|
+
end_minute_validator = EnumAttributeValidator.new('Integer', [0, 15, 30, 45])
|
|
210
|
+
return false unless end_minute_validator.valid?(@end_minute)
|
|
211
|
+
return false if !@bid_modifier.nil? && @bid_modifier > 10
|
|
212
|
+
return false if !@bid_modifier.nil? && @bid_modifier < 0.1
|
|
213
|
+
true
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
217
|
+
# @param [Object] day_of_week Object to be assigned
|
|
218
|
+
def day_of_week=(day_of_week)
|
|
219
|
+
validator = EnumAttributeValidator.new('String', ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"])
|
|
220
|
+
unless validator.valid?(day_of_week)
|
|
221
|
+
fail ArgumentError, "invalid value for \"day_of_week\", must be one of #{validator.allowable_values}."
|
|
222
|
+
end
|
|
223
|
+
@day_of_week = day_of_week
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Custom attribute writer method with validation
|
|
227
|
+
# @param [Object] start_hour Value to be assigned
|
|
228
|
+
def start_hour=(start_hour)
|
|
229
|
+
if start_hour.nil?
|
|
230
|
+
fail ArgumentError, 'start_hour cannot be nil'
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if start_hour > 23
|
|
234
|
+
fail ArgumentError, 'invalid value for "start_hour", must be smaller than or equal to 23.'
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if start_hour < 0
|
|
238
|
+
fail ArgumentError, 'invalid value for "start_hour", must be greater than or equal to 0.'
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
@start_hour = start_hour
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
245
|
+
# @param [Object] start_minute Object to be assigned
|
|
246
|
+
def start_minute=(start_minute)
|
|
247
|
+
validator = EnumAttributeValidator.new('Integer', [0, 15, 30, 45])
|
|
248
|
+
unless validator.valid?(start_minute)
|
|
249
|
+
fail ArgumentError, "invalid value for \"start_minute\", must be one of #{validator.allowable_values}."
|
|
250
|
+
end
|
|
251
|
+
@start_minute = start_minute
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Custom attribute writer method with validation
|
|
255
|
+
# @param [Object] end_hour Value to be assigned
|
|
256
|
+
def end_hour=(end_hour)
|
|
257
|
+
if end_hour.nil?
|
|
258
|
+
fail ArgumentError, 'end_hour cannot be nil'
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
if end_hour > 24
|
|
262
|
+
fail ArgumentError, 'invalid value for "end_hour", must be smaller than or equal to 24.'
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
if end_hour < 0
|
|
266
|
+
fail ArgumentError, 'invalid value for "end_hour", must be greater than or equal to 0.'
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
@end_hour = end_hour
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
273
|
+
# @param [Object] end_minute Object to be assigned
|
|
274
|
+
def end_minute=(end_minute)
|
|
275
|
+
validator = EnumAttributeValidator.new('Integer', [0, 15, 30, 45])
|
|
276
|
+
unless validator.valid?(end_minute)
|
|
277
|
+
fail ArgumentError, "invalid value for \"end_minute\", must be one of #{validator.allowable_values}."
|
|
278
|
+
end
|
|
279
|
+
@end_minute = end_minute
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Custom attribute writer method with validation
|
|
283
|
+
# @param [Object] bid_modifier Value to be assigned
|
|
284
|
+
def bid_modifier=(bid_modifier)
|
|
285
|
+
if !bid_modifier.nil? && bid_modifier > 10
|
|
286
|
+
fail ArgumentError, 'invalid value for "bid_modifier", must be smaller than or equal to 10.'
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
if !bid_modifier.nil? && bid_modifier < 0.1
|
|
290
|
+
fail ArgumentError, 'invalid value for "bid_modifier", must be greater than or equal to 0.1.'
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
@bid_modifier = bid_modifier
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Checks equality by comparing each attribute.
|
|
297
|
+
# @param [Object] Object to be compared
|
|
298
|
+
def ==(o)
|
|
299
|
+
return true if self.equal?(o)
|
|
300
|
+
self.class == o.class &&
|
|
301
|
+
day_of_week == o.day_of_week &&
|
|
302
|
+
start_hour == o.start_hour &&
|
|
303
|
+
start_minute == o.start_minute &&
|
|
304
|
+
end_hour == o.end_hour &&
|
|
305
|
+
end_minute == o.end_minute &&
|
|
306
|
+
bid_modifier == o.bid_modifier
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# @see the `==` method
|
|
310
|
+
# @param [Object] Object to be compared
|
|
311
|
+
def eql?(o)
|
|
312
|
+
self == o
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Calculates hash code according to all attributes.
|
|
316
|
+
# @return [Integer] Hash code
|
|
317
|
+
def hash
|
|
318
|
+
[day_of_week, start_hour, start_minute, end_hour, end_minute, bid_modifier].hash
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# Builds the object from hash
|
|
322
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
323
|
+
# @return [Object] Returns the model itself
|
|
324
|
+
def self.build_from_hash(attributes)
|
|
325
|
+
return nil unless attributes.is_a?(Hash)
|
|
326
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
327
|
+
transformed_hash = {}
|
|
328
|
+
openapi_types.each_pair do |key, type|
|
|
329
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
330
|
+
transformed_hash["#{key}"] = nil
|
|
331
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
332
|
+
# check to ensure the input is an array given that the attribute
|
|
333
|
+
# is documented as an array but the input is not
|
|
334
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
335
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
336
|
+
end
|
|
337
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
338
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
new(transformed_hash)
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Returns the object in the form of hash
|
|
345
|
+
# @return [Hash] Returns the object in the form of hash
|
|
346
|
+
def to_hash
|
|
347
|
+
hash = {}
|
|
348
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
349
|
+
value = self.send(attr)
|
|
350
|
+
if value.nil?
|
|
351
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
352
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
hash[param] = _to_hash(value)
|
|
356
|
+
end
|
|
357
|
+
hash
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -37,12 +37,14 @@ require 'zernio-sdk/models/ad_engagement_counts'
|
|
|
37
37
|
require 'zernio-sdk/models/ad_funnel_counts'
|
|
38
38
|
require 'zernio-sdk/models/ad_keyword'
|
|
39
39
|
require 'zernio-sdk/models/ad_keyword_metrics'
|
|
40
|
+
require 'zernio-sdk/models/ad_keyword_quality'
|
|
40
41
|
require 'zernio-sdk/models/ad_metrics'
|
|
41
42
|
require 'zernio-sdk/models/ad_negative_keyword_list'
|
|
42
43
|
require 'zernio-sdk/models/ad_negative_keyword_list_keyword'
|
|
43
44
|
require 'zernio-sdk/models/ad_promoted_object'
|
|
44
45
|
require 'zernio-sdk/models/ad_review_status'
|
|
45
46
|
require 'zernio-sdk/models/ad_schedule'
|
|
47
|
+
require 'zernio-sdk/models/ad_schedule_window'
|
|
46
48
|
require 'zernio-sdk/models/ad_status'
|
|
47
49
|
require 'zernio-sdk/models/ad_tracking'
|
|
48
50
|
require 'zernio-sdk/models/ad_tree_ad_set'
|
|
@@ -638,6 +640,10 @@ require 'zernio-sdk/models/get_call200_response'
|
|
|
638
640
|
require 'zernio-sdk/models/get_calls_usage200_response'
|
|
639
641
|
require 'zernio-sdk/models/get_calls_usage200_response_groups_inner'
|
|
640
642
|
require 'zernio-sdk/models/get_calls_usage200_response_totals'
|
|
643
|
+
require 'zernio-sdk/models/get_campaign_ad_schedule200_response'
|
|
644
|
+
require 'zernio-sdk/models/get_campaign_ad_schedule200_response_performance'
|
|
645
|
+
require 'zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_day_of_week_inner'
|
|
646
|
+
require 'zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_hour_inner'
|
|
641
647
|
require 'zernio-sdk/models/get_campaign_analytics202_response'
|
|
642
648
|
require 'zernio-sdk/models/get_campaign_bidding200_response'
|
|
643
649
|
require 'zernio-sdk/models/get_campaign_targeting200_response'
|
|
@@ -1722,6 +1728,9 @@ require 'zernio-sdk/models/update_business_agent_settings_request'
|
|
|
1722
1728
|
require 'zernio-sdk/models/update_business_agent_settings_request_followup'
|
|
1723
1729
|
require 'zernio-sdk/models/update_business_agent_settings_request_handoff'
|
|
1724
1730
|
require 'zernio-sdk/models/update_business_agent_settings_request_rollout'
|
|
1731
|
+
require 'zernio-sdk/models/update_campaign_ad_schedule200_response'
|
|
1732
|
+
require 'zernio-sdk/models/update_campaign_ad_schedule_request'
|
|
1733
|
+
require 'zernio-sdk/models/update_campaign_ad_schedule_request_schedule_inner'
|
|
1725
1734
|
require 'zernio-sdk/models/update_campaign_assets200_response'
|
|
1726
1735
|
require 'zernio-sdk/models/update_campaign_assets_request'
|
|
1727
1736
|
require 'zernio-sdk/models/update_campaign_targeting200_response'
|