algolia 3.0.0.beta.9 → 3.0.0.beta.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +4 -2
- data/lib/algolia/api/ingestion_client.rb +912 -359
- data/lib/algolia/api/search_client.rb +17 -17
- data/lib/algolia/error.rb +10 -0
- data/lib/algolia/logger_helper.rb +11 -2
- data/lib/algolia/models/ingestion/action.rb +45 -0
- data/lib/algolia/models/ingestion/batch_request.rb +247 -0
- data/lib/algolia/models/ingestion/batch_write_params.rb +216 -0
- data/lib/algolia/models/ingestion/list_tasks_response_v1.rb +227 -0
- data/lib/algolia/models/ingestion/source_shopify.rb +10 -77
- data/lib/algolia/models/ingestion/source_update_shopify.rb +10 -76
- data/lib/algolia/models/ingestion/task.rb +30 -9
- data/lib/algolia/models/ingestion/task_create.rb +11 -12
- data/lib/algolia/models/ingestion/task_create_v1.rb +328 -0
- data/lib/algolia/models/ingestion/task_update.rb +8 -7
- data/lib/algolia/models/ingestion/task_update_v1.rb +269 -0
- data/lib/algolia/models/ingestion/task_v1.rb +373 -0
- data/lib/algolia/models/recommend/get_recommendations_response.rb +2 -0
- data/lib/algolia/models/recommend/trending_items.rb +0 -4
- data/lib/algolia/models/recommend/trending_items_query.rb +0 -4
- data/lib/algolia/models/search/settings_response.rb +1028 -0
- data/lib/algolia/models/search/with_primary.rb +212 -0
- data/lib/algolia/transport/transport.rb +9 -3
- data/lib/algolia/version.rb +1 -1
- metadata +11 -2
@@ -0,0 +1,227 @@
|
|
1
|
+
# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
2
|
+
|
3
|
+
require "date"
|
4
|
+
require "time"
|
5
|
+
|
6
|
+
module Algolia
|
7
|
+
module Ingestion
|
8
|
+
# Configured tasks and pagination information.
|
9
|
+
class ListTasksResponseV1
|
10
|
+
attr_accessor :tasks
|
11
|
+
|
12
|
+
attr_accessor :pagination
|
13
|
+
|
14
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
15
|
+
def self.attribute_map
|
16
|
+
{
|
17
|
+
:tasks => :tasks,
|
18
|
+
:pagination => :pagination
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# Returns all the JSON keys this model knows about
|
23
|
+
def self.acceptable_attributes
|
24
|
+
attribute_map.values
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.types_mapping
|
29
|
+
{
|
30
|
+
:tasks => :"Array<TaskV1>",
|
31
|
+
:pagination => :"Pagination"
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# List of attributes with nullable: true
|
36
|
+
def self.openapi_nullable
|
37
|
+
Set.new(
|
38
|
+
[]
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
def initialize(attributes = {})
|
45
|
+
if (!attributes.is_a?(Hash))
|
46
|
+
raise(
|
47
|
+
ArgumentError,
|
48
|
+
"The input argument (attributes) must be a hash in `Algolia::ListTasksResponseV1` initialize method"
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
raise(
|
56
|
+
ArgumentError,
|
57
|
+
"`#{k}` is not a valid attribute in `Algolia::ListTasksResponseV1`. Please check the name to make sure it's valid. List of attributes: " +
|
58
|
+
self.class.attribute_map.keys.inspect
|
59
|
+
)
|
60
|
+
end
|
61
|
+
|
62
|
+
h[k.to_sym] = v
|
63
|
+
}
|
64
|
+
|
65
|
+
if attributes.key?(:tasks)
|
66
|
+
if (value = attributes[:tasks]).is_a?(Array)
|
67
|
+
self.tasks = value
|
68
|
+
end
|
69
|
+
else
|
70
|
+
self.tasks = nil
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:pagination)
|
74
|
+
self.pagination = attributes[:pagination]
|
75
|
+
else
|
76
|
+
self.pagination = nil
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Checks equality by comparing each attribute.
|
81
|
+
# @param [Object] Object to be compared
|
82
|
+
def ==(other)
|
83
|
+
return true if self.equal?(other)
|
84
|
+
self.class == other.class &&
|
85
|
+
tasks == other.tasks &&
|
86
|
+
pagination == other.pagination
|
87
|
+
end
|
88
|
+
|
89
|
+
# @see the `==` method
|
90
|
+
# @param [Object] Object to be compared
|
91
|
+
def eql?(other)
|
92
|
+
self == other
|
93
|
+
end
|
94
|
+
|
95
|
+
# Calculates hash code according to all attributes.
|
96
|
+
# @return [Integer] Hash code
|
97
|
+
def hash
|
98
|
+
[tasks, pagination].hash
|
99
|
+
end
|
100
|
+
|
101
|
+
# Builds the object from hash
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
# @return [Object] Returns the model itself
|
104
|
+
def self.build_from_hash(attributes)
|
105
|
+
return nil unless attributes.is_a?(Hash)
|
106
|
+
attributes = attributes.transform_keys(&:to_sym)
|
107
|
+
transformed_hash = {}
|
108
|
+
types_mapping.each_pair do |key, type|
|
109
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
110
|
+
transformed_hash[key.to_sym] = nil
|
111
|
+
elsif type =~ /\AArray<(.*)>/i
|
112
|
+
# check to ensure the input is an array given that the attribute
|
113
|
+
# is documented as an array but the input is not
|
114
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
115
|
+
transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
|
116
|
+
_deserialize(::Regexp.last_match(1), v)
|
117
|
+
}
|
118
|
+
end
|
119
|
+
elsif !attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
new(transformed_hash)
|
125
|
+
end
|
126
|
+
|
127
|
+
# Deserializes the data based on type
|
128
|
+
# @param string type Data type
|
129
|
+
# @param string value Value to be deserialized
|
130
|
+
# @return [Object] Deserialized data
|
131
|
+
def self._deserialize(type, value)
|
132
|
+
case type.to_sym
|
133
|
+
when :Time
|
134
|
+
Time.parse(value)
|
135
|
+
when :Date
|
136
|
+
Date.parse(value)
|
137
|
+
when :String
|
138
|
+
value.to_s
|
139
|
+
when :Integer
|
140
|
+
value.to_i
|
141
|
+
when :Float
|
142
|
+
value.to_f
|
143
|
+
when :Boolean
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
145
|
+
true
|
146
|
+
else
|
147
|
+
false
|
148
|
+
end
|
149
|
+
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
# model
|
165
|
+
else
|
166
|
+
# models (e.g. Pet) or oneOf
|
167
|
+
klass = Algolia::Ingestion.const_get(type)
|
168
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
|
169
|
+
.build_from_hash(value)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the string representation of the object
|
174
|
+
# @return [String] String presentation of the object
|
175
|
+
def to_s
|
176
|
+
to_hash.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_body
|
182
|
+
to_hash
|
183
|
+
end
|
184
|
+
|
185
|
+
def to_json(*_args)
|
186
|
+
to_hash.to_json
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the object in the form of hash
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_hash
|
192
|
+
hash = {}
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
194
|
+
value = send(attr)
|
195
|
+
if value.nil?
|
196
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
197
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
198
|
+
end
|
199
|
+
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map { |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to?(:to_hash)
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
227
|
+
end
|
@@ -6,26 +6,8 @@ require "time"
|
|
6
6
|
module Algolia
|
7
7
|
module Ingestion
|
8
8
|
class SourceShopify
|
9
|
-
#
|
10
|
-
attr_accessor :
|
11
|
-
|
12
|
-
# Whether to increase the number of indexed collections per product. If true, Algolia indexes 200 collections per product. If false, 100 collections per product are indexed.
|
13
|
-
attr_accessor :increase_product_collection_limit
|
14
|
-
|
15
|
-
# Whether to set the default price ratio to 1 if no sale price is present. The price ratio is determined by the ratio: `sale_price` / `regular_price`. If no sale price is present, the price ratio would be 0. If `defaultPriceRatioAsOne` is true, the price ratio is indexed as 1 instead.
|
16
|
-
attr_accessor :default_price_ratio_as_one
|
17
|
-
|
18
|
-
# Whether to exclude out-of-stock variants when determining the `max_variant_price` and `min_variant_price` attributes.
|
19
|
-
attr_accessor :exclude_oos_variants_for_price_at_trs
|
20
|
-
|
21
|
-
# Whether to include an inventory with every variant for every product record.
|
22
|
-
attr_accessor :include_variants_inventory
|
23
|
-
|
24
|
-
# Whether to include collection IDs and handles in the product records.
|
25
|
-
attr_accessor :has_collection_search_page
|
26
|
-
|
27
|
-
# Whether to convert tags on products to named tags. To learn more, see [Named tags](https://www.algolia.com/doc/integration/shopify/sending-and-managing-data/named-tags).
|
28
|
-
attr_accessor :product_named_tags
|
9
|
+
# Feature flags for the Shopify source.
|
10
|
+
attr_accessor :feature_flags
|
29
11
|
|
30
12
|
# URL of the Shopify store.
|
31
13
|
attr_accessor :shop_url
|
@@ -33,13 +15,7 @@ module Algolia
|
|
33
15
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
16
|
def self.attribute_map
|
35
17
|
{
|
36
|
-
:
|
37
|
-
:increase_product_collection_limit => :increaseProductCollectionLimit,
|
38
|
-
:default_price_ratio_as_one => :defaultPriceRatioAsOne,
|
39
|
-
:exclude_oos_variants_for_price_at_trs => :excludeOOSVariantsForPriceAtTRS,
|
40
|
-
:include_variants_inventory => :includeVariantsInventory,
|
41
|
-
:has_collection_search_page => :hasCollectionSearchPage,
|
42
|
-
:product_named_tags => :productNamedTags,
|
18
|
+
:feature_flags => :featureFlags,
|
43
19
|
:shop_url => :shopURL
|
44
20
|
}
|
45
21
|
end
|
@@ -52,13 +28,7 @@ module Algolia
|
|
52
28
|
# Attribute type mapping.
|
53
29
|
def self.types_mapping
|
54
30
|
{
|
55
|
-
:
|
56
|
-
:increase_product_collection_limit => :"Boolean",
|
57
|
-
:default_price_ratio_as_one => :"Boolean",
|
58
|
-
:exclude_oos_variants_for_price_at_trs => :"Boolean",
|
59
|
-
:include_variants_inventory => :"Boolean",
|
60
|
-
:has_collection_search_page => :"Boolean",
|
61
|
-
:product_named_tags => :"Boolean",
|
31
|
+
:feature_flags => :"Hash<String, Object>",
|
62
32
|
:shop_url => :"String"
|
63
33
|
}
|
64
34
|
end
|
@@ -101,32 +71,10 @@ module Algolia
|
|
101
71
|
h[k.to_sym] = v
|
102
72
|
}
|
103
73
|
|
104
|
-
if attributes.key?(:
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
if attributes.key?(:increase_product_collection_limit)
|
109
|
-
self.increase_product_collection_limit = attributes[:increase_product_collection_limit]
|
110
|
-
end
|
111
|
-
|
112
|
-
if attributes.key?(:default_price_ratio_as_one)
|
113
|
-
self.default_price_ratio_as_one = attributes[:default_price_ratio_as_one]
|
114
|
-
end
|
115
|
-
|
116
|
-
if attributes.key?(:exclude_oos_variants_for_price_at_trs)
|
117
|
-
self.exclude_oos_variants_for_price_at_trs = attributes[:exclude_oos_variants_for_price_at_trs]
|
118
|
-
end
|
119
|
-
|
120
|
-
if attributes.key?(:include_variants_inventory)
|
121
|
-
self.include_variants_inventory = attributes[:include_variants_inventory]
|
122
|
-
end
|
123
|
-
|
124
|
-
if attributes.key?(:has_collection_search_page)
|
125
|
-
self.has_collection_search_page = attributes[:has_collection_search_page]
|
126
|
-
end
|
127
|
-
|
128
|
-
if attributes.key?(:product_named_tags)
|
129
|
-
self.product_named_tags = attributes[:product_named_tags]
|
74
|
+
if attributes.key?(:feature_flags)
|
75
|
+
if (value = attributes[:feature_flags]).is_a?(Hash)
|
76
|
+
self.feature_flags = value
|
77
|
+
end
|
130
78
|
end
|
131
79
|
|
132
80
|
if attributes.key?(:shop_url)
|
@@ -141,13 +89,7 @@ module Algolia
|
|
141
89
|
def ==(other)
|
142
90
|
return true if self.equal?(other)
|
143
91
|
self.class == other.class &&
|
144
|
-
|
145
|
-
increase_product_collection_limit == other.increase_product_collection_limit &&
|
146
|
-
default_price_ratio_as_one == other.default_price_ratio_as_one &&
|
147
|
-
exclude_oos_variants_for_price_at_trs == other.exclude_oos_variants_for_price_at_trs &&
|
148
|
-
include_variants_inventory == other.include_variants_inventory &&
|
149
|
-
has_collection_search_page == other.has_collection_search_page &&
|
150
|
-
product_named_tags == other.product_named_tags &&
|
92
|
+
feature_flags == other.feature_flags &&
|
151
93
|
shop_url == other.shop_url
|
152
94
|
end
|
153
95
|
|
@@ -160,16 +102,7 @@ module Algolia
|
|
160
102
|
# Calculates hash code according to all attributes.
|
161
103
|
# @return [Integer] Hash code
|
162
104
|
def hash
|
163
|
-
[
|
164
|
-
collection_id_indexing,
|
165
|
-
increase_product_collection_limit,
|
166
|
-
default_price_ratio_as_one,
|
167
|
-
exclude_oos_variants_for_price_at_trs,
|
168
|
-
include_variants_inventory,
|
169
|
-
has_collection_search_page,
|
170
|
-
product_named_tags,
|
171
|
-
shop_url
|
172
|
-
].hash
|
105
|
+
[feature_flags, shop_url].hash
|
173
106
|
end
|
174
107
|
|
175
108
|
# Builds the object from hash
|
@@ -6,37 +6,13 @@ require "time"
|
|
6
6
|
module Algolia
|
7
7
|
module Ingestion
|
8
8
|
class SourceUpdateShopify
|
9
|
-
#
|
10
|
-
attr_accessor :
|
11
|
-
|
12
|
-
# Whether to increase the number of indexed collections per product. If true, Algolia indexes 200 collections per product. If false, 100 collections per product are indexed.
|
13
|
-
attr_accessor :increase_product_collection_limit
|
14
|
-
|
15
|
-
# Whether to set the default price ratio to 1 if no sale price is present. The price ratio is determined by the ratio: `sale_price` / `regular_price`. If no sale price is present, the price ratio would be 0. If `defaultPriceRatioAsOne` is true, the price ratio is indexed as 1 instead.
|
16
|
-
attr_accessor :default_price_ratio_as_one
|
17
|
-
|
18
|
-
# Whether to exclude out-of-stock variants when determining the `max_variant_price` and `min_variant_price` attributes.
|
19
|
-
attr_accessor :exclude_oos_variants_for_price_at_trs
|
20
|
-
|
21
|
-
# Whether to include an inventory with every variant for every product record.
|
22
|
-
attr_accessor :include_variants_inventory
|
23
|
-
|
24
|
-
# Whether to include collection IDs and handles in the product records.
|
25
|
-
attr_accessor :has_collection_search_page
|
26
|
-
|
27
|
-
# Whether to convert tags on products to named tags. To learn more, see [Named tags](https://www.algolia.com/doc/integration/shopify/sending-and-managing-data/named-tags).
|
28
|
-
attr_accessor :product_named_tags
|
9
|
+
# Feature flags for the Shopify source.
|
10
|
+
attr_accessor :feature_flags
|
29
11
|
|
30
12
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
13
|
def self.attribute_map
|
32
14
|
{
|
33
|
-
:
|
34
|
-
:increase_product_collection_limit => :increaseProductCollectionLimit,
|
35
|
-
:default_price_ratio_as_one => :defaultPriceRatioAsOne,
|
36
|
-
:exclude_oos_variants_for_price_at_trs => :excludeOOSVariantsForPriceAtTRS,
|
37
|
-
:include_variants_inventory => :includeVariantsInventory,
|
38
|
-
:has_collection_search_page => :hasCollectionSearchPage,
|
39
|
-
:product_named_tags => :productNamedTags
|
15
|
+
:feature_flags => :featureFlags
|
40
16
|
}
|
41
17
|
end
|
42
18
|
|
@@ -48,13 +24,7 @@ module Algolia
|
|
48
24
|
# Attribute type mapping.
|
49
25
|
def self.types_mapping
|
50
26
|
{
|
51
|
-
:
|
52
|
-
:increase_product_collection_limit => :"Boolean",
|
53
|
-
:default_price_ratio_as_one => :"Boolean",
|
54
|
-
:exclude_oos_variants_for_price_at_trs => :"Boolean",
|
55
|
-
:include_variants_inventory => :"Boolean",
|
56
|
-
:has_collection_search_page => :"Boolean",
|
57
|
-
:product_named_tags => :"Boolean"
|
27
|
+
:feature_flags => :"Hash<String, Object>"
|
58
28
|
}
|
59
29
|
end
|
60
30
|
|
@@ -88,32 +58,10 @@ module Algolia
|
|
88
58
|
h[k.to_sym] = v
|
89
59
|
}
|
90
60
|
|
91
|
-
if attributes.key?(:
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
if attributes.key?(:increase_product_collection_limit)
|
96
|
-
self.increase_product_collection_limit = attributes[:increase_product_collection_limit]
|
97
|
-
end
|
98
|
-
|
99
|
-
if attributes.key?(:default_price_ratio_as_one)
|
100
|
-
self.default_price_ratio_as_one = attributes[:default_price_ratio_as_one]
|
101
|
-
end
|
102
|
-
|
103
|
-
if attributes.key?(:exclude_oos_variants_for_price_at_trs)
|
104
|
-
self.exclude_oos_variants_for_price_at_trs = attributes[:exclude_oos_variants_for_price_at_trs]
|
105
|
-
end
|
106
|
-
|
107
|
-
if attributes.key?(:include_variants_inventory)
|
108
|
-
self.include_variants_inventory = attributes[:include_variants_inventory]
|
109
|
-
end
|
110
|
-
|
111
|
-
if attributes.key?(:has_collection_search_page)
|
112
|
-
self.has_collection_search_page = attributes[:has_collection_search_page]
|
113
|
-
end
|
114
|
-
|
115
|
-
if attributes.key?(:product_named_tags)
|
116
|
-
self.product_named_tags = attributes[:product_named_tags]
|
61
|
+
if attributes.key?(:feature_flags)
|
62
|
+
if (value = attributes[:feature_flags]).is_a?(Hash)
|
63
|
+
self.feature_flags = value
|
64
|
+
end
|
117
65
|
end
|
118
66
|
end
|
119
67
|
|
@@ -122,13 +70,7 @@ module Algolia
|
|
122
70
|
def ==(other)
|
123
71
|
return true if self.equal?(other)
|
124
72
|
self.class == other.class &&
|
125
|
-
|
126
|
-
increase_product_collection_limit == other.increase_product_collection_limit &&
|
127
|
-
default_price_ratio_as_one == other.default_price_ratio_as_one &&
|
128
|
-
exclude_oos_variants_for_price_at_trs == other.exclude_oos_variants_for_price_at_trs &&
|
129
|
-
include_variants_inventory == other.include_variants_inventory &&
|
130
|
-
has_collection_search_page == other.has_collection_search_page &&
|
131
|
-
product_named_tags == other.product_named_tags
|
73
|
+
feature_flags == other.feature_flags
|
132
74
|
end
|
133
75
|
|
134
76
|
# @see the `==` method
|
@@ -140,15 +82,7 @@ module Algolia
|
|
140
82
|
# Calculates hash code according to all attributes.
|
141
83
|
# @return [Integer] Hash code
|
142
84
|
def hash
|
143
|
-
[
|
144
|
-
collection_id_indexing,
|
145
|
-
increase_product_collection_limit,
|
146
|
-
default_price_ratio_as_one,
|
147
|
-
exclude_oos_variants_for_price_at_trs,
|
148
|
-
include_variants_inventory,
|
149
|
-
has_collection_search_page,
|
150
|
-
product_named_tags
|
151
|
-
].hash
|
85
|
+
[feature_flags].hash
|
152
86
|
end
|
153
87
|
|
154
88
|
# Builds the object from hash
|
@@ -15,7 +15,14 @@ module Algolia
|
|
15
15
|
# Universally unique identifier (UUID) of a destination resource.
|
16
16
|
attr_accessor :destination_id
|
17
17
|
|
18
|
-
|
18
|
+
# Cron expression for the task's schedule.
|
19
|
+
attr_accessor :cron
|
20
|
+
|
21
|
+
# The last time the scheduled task ran in RFC 3339 format.
|
22
|
+
attr_accessor :last_run
|
23
|
+
|
24
|
+
# The next scheduled run of the task in RFC 3339 format.
|
25
|
+
attr_accessor :next_run
|
19
26
|
|
20
27
|
attr_accessor :input
|
21
28
|
|
@@ -64,7 +71,9 @@ module Algolia
|
|
64
71
|
:task_id => :taskID,
|
65
72
|
:source_id => :sourceID,
|
66
73
|
:destination_id => :destinationID,
|
67
|
-
:
|
74
|
+
:cron => :cron,
|
75
|
+
:last_run => :lastRun,
|
76
|
+
:next_run => :nextRun,
|
68
77
|
:input => :input,
|
69
78
|
:enabled => :enabled,
|
70
79
|
:failure_threshold => :failureThreshold,
|
@@ -86,7 +95,9 @@ module Algolia
|
|
86
95
|
:task_id => :"String",
|
87
96
|
:source_id => :"String",
|
88
97
|
:destination_id => :"String",
|
89
|
-
:
|
98
|
+
:cron => :"String",
|
99
|
+
:last_run => :"String",
|
100
|
+
:next_run => :"String",
|
90
101
|
:input => :"TaskInput",
|
91
102
|
:enabled => :"Boolean",
|
92
103
|
:failure_threshold => :"Integer",
|
@@ -142,10 +153,16 @@ module Algolia
|
|
142
153
|
self.destination_id = nil
|
143
154
|
end
|
144
155
|
|
145
|
-
if attributes.key?(:
|
146
|
-
self.
|
147
|
-
|
148
|
-
|
156
|
+
if attributes.key?(:cron)
|
157
|
+
self.cron = attributes[:cron]
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:last_run)
|
161
|
+
self.last_run = attributes[:last_run]
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.key?(:next_run)
|
165
|
+
self.next_run = attributes[:next_run]
|
149
166
|
end
|
150
167
|
|
151
168
|
if attributes.key?(:input)
|
@@ -209,7 +226,9 @@ module Algolia
|
|
209
226
|
task_id == other.task_id &&
|
210
227
|
source_id == other.source_id &&
|
211
228
|
destination_id == other.destination_id &&
|
212
|
-
|
229
|
+
cron == other.cron &&
|
230
|
+
last_run == other.last_run &&
|
231
|
+
next_run == other.next_run &&
|
213
232
|
input == other.input &&
|
214
233
|
enabled == other.enabled &&
|
215
234
|
failure_threshold == other.failure_threshold &&
|
@@ -232,7 +251,9 @@ module Algolia
|
|
232
251
|
task_id,
|
233
252
|
source_id,
|
234
253
|
destination_id,
|
235
|
-
|
254
|
+
cron,
|
255
|
+
last_run,
|
256
|
+
next_run,
|
236
257
|
input,
|
237
258
|
enabled,
|
238
259
|
failure_threshold,
|
@@ -13,10 +13,11 @@ module Algolia
|
|
13
13
|
# Universally unique identifier (UUID) of a destination resource.
|
14
14
|
attr_accessor :destination_id
|
15
15
|
|
16
|
-
attr_accessor :trigger
|
17
|
-
|
18
16
|
attr_accessor :action
|
19
17
|
|
18
|
+
# Cron expression for the task's schedule.
|
19
|
+
attr_accessor :cron
|
20
|
+
|
20
21
|
# Whether the task is enabled.
|
21
22
|
attr_accessor :enabled
|
22
23
|
|
@@ -55,8 +56,8 @@ module Algolia
|
|
55
56
|
{
|
56
57
|
:source_id => :sourceID,
|
57
58
|
:destination_id => :destinationID,
|
58
|
-
:trigger => :trigger,
|
59
59
|
:action => :action,
|
60
|
+
:cron => :cron,
|
60
61
|
:enabled => :enabled,
|
61
62
|
:failure_threshold => :failureThreshold,
|
62
63
|
:input => :input,
|
@@ -74,8 +75,8 @@ module Algolia
|
|
74
75
|
{
|
75
76
|
:source_id => :"String",
|
76
77
|
:destination_id => :"String",
|
77
|
-
:trigger => :"TaskCreateTrigger",
|
78
78
|
:action => :"ActionType",
|
79
|
+
:cron => :"String",
|
79
80
|
:enabled => :"Boolean",
|
80
81
|
:failure_threshold => :"Integer",
|
81
82
|
:input => :"TaskInput",
|
@@ -125,18 +126,16 @@ module Algolia
|
|
125
126
|
self.destination_id = nil
|
126
127
|
end
|
127
128
|
|
128
|
-
if attributes.key?(:trigger)
|
129
|
-
self.trigger = attributes[:trigger]
|
130
|
-
else
|
131
|
-
self.trigger = nil
|
132
|
-
end
|
133
|
-
|
134
129
|
if attributes.key?(:action)
|
135
130
|
self.action = attributes[:action]
|
136
131
|
else
|
137
132
|
self.action = nil
|
138
133
|
end
|
139
134
|
|
135
|
+
if attributes.key?(:cron)
|
136
|
+
self.cron = attributes[:cron]
|
137
|
+
end
|
138
|
+
|
140
139
|
if attributes.key?(:enabled)
|
141
140
|
self.enabled = attributes[:enabled]
|
142
141
|
end
|
@@ -179,8 +178,8 @@ module Algolia
|
|
179
178
|
self.class == other.class &&
|
180
179
|
source_id == other.source_id &&
|
181
180
|
destination_id == other.destination_id &&
|
182
|
-
trigger == other.trigger &&
|
183
181
|
action == other.action &&
|
182
|
+
cron == other.cron &&
|
184
183
|
enabled == other.enabled &&
|
185
184
|
failure_threshold == other.failure_threshold &&
|
186
185
|
input == other.input &&
|
@@ -196,7 +195,7 @@ module Algolia
|
|
196
195
|
# Calculates hash code according to all attributes.
|
197
196
|
# @return [Integer] Hash code
|
198
197
|
def hash
|
199
|
-
[source_id, destination_id,
|
198
|
+
[source_id, destination_id, action, cron, enabled, failure_threshold, input, cursor].hash
|
200
199
|
end
|
201
200
|
|
202
201
|
# Builds the object from hash
|