phrase 2.20.0 → 2.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +16 -5
- data/docs/CustomMetadataApi.md +353 -0
- data/docs/CustomMetadataDataType.md +16 -0
- data/docs/CustomMetadataProperty.md +33 -0
- data/docs/CustomMetadataPropertyCreate422Response.md +19 -0
- data/docs/{InvitationCreate422ResponseErrorsInner.md → CustomMetadataPropertyCreate422ResponseErrorsInner.md} +2 -2
- data/docs/KeyCreateParameters.md +4 -2
- data/docs/KeyUpdateParameters.md +4 -2
- data/docs/KeysApi.md +2 -2
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/LocaleReport.md +43 -0
- data/docs/LocalesApi.md +3 -1
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectReport.md +31 -0
- data/docs/ProjectUpdateParameters.md +1 -1
- data/docs/ReportsApi.md +144 -0
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/TranslationKeyDetails.md +3 -1
- data/docs/Upload.md +2 -0
- data/lib/phrase/api/custom_metadata_api.rb +409 -0
- data/lib/phrase/api/keys_api.rb +2 -2
- data/lib/phrase/api/locales_api.rb +3 -0
- data/lib/phrase/api/reports_api.rb +160 -0
- data/lib/phrase/models/custom_metadata_data_type.rb +30 -0
- data/lib/phrase/models/custom_metadata_property.rb +294 -0
- data/lib/phrase/models/{invitation_create422_response.rb → custom_metadata_property_create422_response.rb} +4 -4
- data/lib/phrase/models/{invitation_create422_response_errors_inner.rb → custom_metadata_property_create422_response_errors_inner.rb} +3 -3
- data/lib/phrase/models/key_create_parameters.rb +14 -4
- data/lib/phrase/models/key_update_parameters.rb +14 -4
- data/lib/phrase/models/keys_search_parameters.rb +1 -1
- data/lib/phrase/models/locale_report.rb +313 -0
- data/lib/phrase/models/project_report.rb +259 -0
- data/lib/phrase/models/translation_key_details.rb +15 -4
- data/lib/phrase/models/upload.rb +11 -1
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +8 -2
- data/spec/api/custom_metadata_api_spec.rb +106 -0
- data/spec/api/keys_api_spec.rb +1 -1
- data/spec/api/reports_api_spec.rb +55 -0
- data/spec/models/custom_metadata_data_type_spec.rb +23 -0
- data/spec/models/{invitation_create422_response_errors_inner_spec.rb → custom_metadata_property_create422_response_errors_inner_spec.rb} +6 -6
- data/spec/models/{invitation_create422_response_spec.rb → custom_metadata_property_create422_response_spec.rb} +6 -6
- data/spec/models/custom_metadata_property_spec.rb +77 -0
- data/spec/models/key_create_parameters_spec.rb +6 -0
- data/spec/models/key_update_parameters_spec.rb +6 -0
- data/spec/models/locale_report_spec.rb +107 -0
- data/spec/models/project_report_spec.rb +71 -0
- data/spec/models/translation_key_details_spec.rb +6 -0
- data/spec/models/upload_spec.rb +6 -0
- metadata +236 -212
- data/docs/InvitationCreate422Response.md +0 -19
@@ -0,0 +1,294 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class CustomMetadataProperty
|
5
|
+
attr_accessor :id
|
6
|
+
|
7
|
+
attr_accessor :name
|
8
|
+
|
9
|
+
attr_accessor :description
|
10
|
+
|
11
|
+
attr_accessor :data_type
|
12
|
+
|
13
|
+
attr_accessor :user
|
14
|
+
|
15
|
+
attr_accessor :projects
|
16
|
+
|
17
|
+
attr_accessor :value_options
|
18
|
+
|
19
|
+
attr_accessor :created_at
|
20
|
+
|
21
|
+
attr_accessor :updated_at
|
22
|
+
|
23
|
+
class EnumAttributeValidator
|
24
|
+
attr_reader :datatype
|
25
|
+
attr_reader :allowable_values
|
26
|
+
|
27
|
+
def initialize(datatype, allowable_values)
|
28
|
+
@allowable_values = allowable_values.map do |value|
|
29
|
+
case datatype.to_s
|
30
|
+
when /Integer/i
|
31
|
+
value.to_i
|
32
|
+
when /Float/i
|
33
|
+
value.to_f
|
34
|
+
else
|
35
|
+
value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def valid?(value)
|
41
|
+
!value || allowable_values.include?(value)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
:'id' => :'id',
|
49
|
+
:'name' => :'name',
|
50
|
+
:'description' => :'description',
|
51
|
+
:'data_type' => :'data_type',
|
52
|
+
:'user' => :'user',
|
53
|
+
:'projects' => :'projects',
|
54
|
+
:'value_options' => :'value_options',
|
55
|
+
:'created_at' => :'created_at',
|
56
|
+
:'updated_at' => :'updated_at'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Attribute type mapping.
|
61
|
+
def self.openapi_types
|
62
|
+
{
|
63
|
+
:'id' => :'String',
|
64
|
+
:'name' => :'String',
|
65
|
+
:'description' => :'String',
|
66
|
+
:'data_type' => :'CustomMetadataDataType',
|
67
|
+
:'user' => :'UserPreview',
|
68
|
+
:'projects' => :'Array<ProjectShort>',
|
69
|
+
:'value_options' => :'Array<String>',
|
70
|
+
:'created_at' => :'DateTime',
|
71
|
+
:'updated_at' => :'DateTime'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# List of attributes with nullable: true
|
76
|
+
def self.openapi_nullable
|
77
|
+
Set.new([
|
78
|
+
])
|
79
|
+
end
|
80
|
+
|
81
|
+
# Initializes the object
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
def initialize(attributes = {})
|
84
|
+
if (!attributes.is_a?(Hash))
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::CustomMetadataProperty` initialize method"
|
86
|
+
end
|
87
|
+
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::CustomMetadataProperty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
92
|
+
end
|
93
|
+
h[k.to_sym] = v
|
94
|
+
}
|
95
|
+
|
96
|
+
if attributes.key?(:'id')
|
97
|
+
self.id = attributes[:'id']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.key?(:'name')
|
101
|
+
self.name = attributes[:'name']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'description')
|
105
|
+
self.description = attributes[:'description']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'data_type')
|
109
|
+
self.data_type = attributes[:'data_type']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'user')
|
113
|
+
self.user = attributes[:'user']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'projects')
|
117
|
+
if (value = attributes[:'projects']).is_a?(Array)
|
118
|
+
self.projects = value
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'value_options')
|
123
|
+
if (value = attributes[:'value_options']).is_a?(Array)
|
124
|
+
self.value_options = value
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'created_at')
|
129
|
+
self.created_at = attributes[:'created_at']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'updated_at')
|
133
|
+
self.updated_at = attributes[:'updated_at']
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
138
|
+
# @return Array for valid properties with the reasons
|
139
|
+
def list_invalid_properties
|
140
|
+
invalid_properties = Array.new
|
141
|
+
invalid_properties
|
142
|
+
end
|
143
|
+
|
144
|
+
# Check to see if the all the properties in the model are valid
|
145
|
+
# @return true if the model is valid
|
146
|
+
def valid?
|
147
|
+
true
|
148
|
+
end
|
149
|
+
|
150
|
+
# Checks equality by comparing each attribute.
|
151
|
+
# @param [Object] Object to be compared
|
152
|
+
def ==(o)
|
153
|
+
return true if self.equal?(o)
|
154
|
+
self.class == o.class &&
|
155
|
+
id == o.id &&
|
156
|
+
name == o.name &&
|
157
|
+
description == o.description &&
|
158
|
+
data_type == o.data_type &&
|
159
|
+
user == o.user &&
|
160
|
+
projects == o.projects &&
|
161
|
+
value_options == o.value_options &&
|
162
|
+
created_at == o.created_at &&
|
163
|
+
updated_at == o.updated_at
|
164
|
+
end
|
165
|
+
|
166
|
+
# @see the `==` method
|
167
|
+
# @param [Object] Object to be compared
|
168
|
+
def eql?(o)
|
169
|
+
self == o
|
170
|
+
end
|
171
|
+
|
172
|
+
# Calculates hash code according to all attributes.
|
173
|
+
# @return [Integer] Hash code
|
174
|
+
def hash
|
175
|
+
[id, name, description, data_type, user, projects, value_options, created_at, updated_at].hash
|
176
|
+
end
|
177
|
+
|
178
|
+
# Builds the object from hash
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
180
|
+
# @return [Object] Returns the model itself
|
181
|
+
def self.build_from_hash(attributes)
|
182
|
+
new.build_from_hash(attributes)
|
183
|
+
end
|
184
|
+
|
185
|
+
# Builds the object from hash
|
186
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
187
|
+
# @return [Object] Returns the model itself
|
188
|
+
def build_from_hash(attributes)
|
189
|
+
return nil unless attributes.is_a?(Hash)
|
190
|
+
self.class.openapi_types.each_pair do |key, type|
|
191
|
+
if type =~ /\AArray<(.*)>/i
|
192
|
+
# check to ensure the input is an array given that the attribute
|
193
|
+
# is documented as an array but the input is not
|
194
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
195
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
196
|
+
end
|
197
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
198
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
199
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
200
|
+
end
|
201
|
+
|
202
|
+
self
|
203
|
+
end
|
204
|
+
|
205
|
+
# Deserializes the data based on type
|
206
|
+
# @param string type Data type
|
207
|
+
# @param string value Value to be deserialized
|
208
|
+
# @return [Object] Deserialized data
|
209
|
+
def _deserialize(type, value)
|
210
|
+
case type.to_sym
|
211
|
+
when :DateTime
|
212
|
+
DateTime.parse(value)
|
213
|
+
when :Date
|
214
|
+
Date.parse(value)
|
215
|
+
when :Time
|
216
|
+
Time.parse(value)
|
217
|
+
when :String
|
218
|
+
value.to_s
|
219
|
+
when :Integer
|
220
|
+
value.to_i
|
221
|
+
when :Float
|
222
|
+
value.to_f
|
223
|
+
when :Boolean
|
224
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
225
|
+
true
|
226
|
+
else
|
227
|
+
false
|
228
|
+
end
|
229
|
+
when :Object
|
230
|
+
# generic object (usually a Hash), return directly
|
231
|
+
value
|
232
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
233
|
+
inner_type = Regexp.last_match[:inner_type]
|
234
|
+
value.map { |v| _deserialize(inner_type, v) }
|
235
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
236
|
+
k_type = Regexp.last_match[:k_type]
|
237
|
+
v_type = Regexp.last_match[:v_type]
|
238
|
+
{}.tap do |hash|
|
239
|
+
value.each do |k, v|
|
240
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
241
|
+
end
|
242
|
+
end
|
243
|
+
else # model
|
244
|
+
Phrase.const_get(type).build_from_hash(value)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
# Returns the string representation of the object
|
249
|
+
# @return [String] String presentation of the object
|
250
|
+
def to_s
|
251
|
+
to_hash.to_s
|
252
|
+
end
|
253
|
+
|
254
|
+
# to_body is an alias to to_hash (backward compatibility)
|
255
|
+
# @return [Hash] Returns the object in the form of hash
|
256
|
+
def to_body
|
257
|
+
to_hash
|
258
|
+
end
|
259
|
+
|
260
|
+
# Returns the object in the form of hash
|
261
|
+
# @return [Hash] Returns the object in the form of hash
|
262
|
+
def to_hash
|
263
|
+
hash = {}
|
264
|
+
self.class.attribute_map.each_pair do |attr, param|
|
265
|
+
value = self.send(attr)
|
266
|
+
if value.nil?
|
267
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
268
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
269
|
+
end
|
270
|
+
|
271
|
+
hash[param] = _to_hash(value)
|
272
|
+
end
|
273
|
+
hash
|
274
|
+
end
|
275
|
+
|
276
|
+
# Outputs non-array value in the form of hash
|
277
|
+
# For object, use to_hash. Otherwise, just return the value
|
278
|
+
# @param [Object] value Any valid value
|
279
|
+
# @return [Hash] Returns the value in the form of hash
|
280
|
+
def _to_hash(value)
|
281
|
+
if value.is_a?(Array)
|
282
|
+
value.compact.map { |v| _to_hash(v) }
|
283
|
+
elsif value.is_a?(Hash)
|
284
|
+
{}.tap do |hash|
|
285
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
286
|
+
end
|
287
|
+
elsif value.respond_to? :to_hash
|
288
|
+
value.to_hash
|
289
|
+
else
|
290
|
+
value
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
294
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
module Phrase
|
4
|
-
class
|
4
|
+
class CustomMetadataPropertyCreate422Response
|
5
5
|
attr_accessor :message
|
6
6
|
|
7
7
|
attr_accessor :errors
|
@@ -18,7 +18,7 @@ module Phrase
|
|
18
18
|
def self.openapi_types
|
19
19
|
{
|
20
20
|
:'message' => :'String',
|
21
|
-
:'errors' => :'Array<
|
21
|
+
:'errors' => :'Array<CustomMetadataPropertyCreate422ResponseErrorsInner>'
|
22
22
|
}
|
23
23
|
end
|
24
24
|
|
@@ -32,13 +32,13 @@ module Phrase
|
|
32
32
|
# @param [Hash] attributes Model attributes in the form of hash
|
33
33
|
def initialize(attributes = {})
|
34
34
|
if (!attributes.is_a?(Hash))
|
35
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::
|
35
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::CustomMetadataPropertyCreate422Response` initialize method"
|
36
36
|
end
|
37
37
|
|
38
38
|
# check to see if the attribute exists and convert string to symbol for hash key
|
39
39
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
40
40
|
if (!self.class.attribute_map.key?(k.to_sym))
|
41
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::
|
41
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::CustomMetadataPropertyCreate422Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
42
42
|
end
|
43
43
|
h[k.to_sym] = v
|
44
44
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
module Phrase
|
4
|
-
class
|
4
|
+
class CustomMetadataPropertyCreate422ResponseErrorsInner
|
5
5
|
attr_accessor :resource
|
6
6
|
|
7
7
|
attr_accessor :field
|
@@ -36,13 +36,13 @@ module Phrase
|
|
36
36
|
# @param [Hash] attributes Model attributes in the form of hash
|
37
37
|
def initialize(attributes = {})
|
38
38
|
if (!attributes.is_a?(Hash))
|
39
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::
|
39
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::CustomMetadataPropertyCreate422ResponseErrorsInner` initialize method"
|
40
40
|
end
|
41
41
|
|
42
42
|
# check to see if the attribute exists and convert string to symbol for hash key
|
43
43
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
44
44
|
if (!self.class.attribute_map.key?(k.to_sym))
|
45
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::
|
45
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::CustomMetadataPropertyCreate422ResponseErrorsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
46
46
|
end
|
47
47
|
h[k.to_sym] = v
|
48
48
|
}
|
@@ -50,6 +50,9 @@ module Phrase
|
|
50
50
|
# NSStringLocalizedFormatKey attribute. Used in .stringsdict format.
|
51
51
|
attr_accessor :localized_format_key
|
52
52
|
|
53
|
+
# Custom metadata property name and value pairs to be associated with key.
|
54
|
+
attr_accessor :custom_metadata
|
55
|
+
|
53
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
57
|
def self.attribute_map
|
55
58
|
{
|
@@ -68,7 +71,8 @@ module Phrase
|
|
68
71
|
:'xml_space_preserve' => :'xml_space_preserve',
|
69
72
|
:'original_file' => :'original_file',
|
70
73
|
:'localized_format_string' => :'localized_format_string',
|
71
|
-
:'localized_format_key' => :'localized_format_key'
|
74
|
+
:'localized_format_key' => :'localized_format_key',
|
75
|
+
:'custom_metadata' => :'custom_metadata'
|
72
76
|
}
|
73
77
|
end
|
74
78
|
|
@@ -90,7 +94,8 @@ module Phrase
|
|
90
94
|
:'xml_space_preserve' => :'Boolean',
|
91
95
|
:'original_file' => :'String',
|
92
96
|
:'localized_format_string' => :'String',
|
93
|
-
:'localized_format_key' => :'String'
|
97
|
+
:'localized_format_key' => :'String',
|
98
|
+
:'custom_metadata' => :'Object'
|
94
99
|
}
|
95
100
|
end
|
96
101
|
|
@@ -178,6 +183,10 @@ module Phrase
|
|
178
183
|
if attributes.key?(:'localized_format_key')
|
179
184
|
self.localized_format_key = attributes[:'localized_format_key']
|
180
185
|
end
|
186
|
+
|
187
|
+
if attributes.key?(:'custom_metadata')
|
188
|
+
self.custom_metadata = attributes[:'custom_metadata']
|
189
|
+
end
|
181
190
|
end
|
182
191
|
|
183
192
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -213,7 +222,8 @@ module Phrase
|
|
213
222
|
xml_space_preserve == o.xml_space_preserve &&
|
214
223
|
original_file == o.original_file &&
|
215
224
|
localized_format_string == o.localized_format_string &&
|
216
|
-
localized_format_key == o.localized_format_key
|
225
|
+
localized_format_key == o.localized_format_key &&
|
226
|
+
custom_metadata == o.custom_metadata
|
217
227
|
end
|
218
228
|
|
219
229
|
# @see the `==` method
|
@@ -225,7 +235,7 @@ module Phrase
|
|
225
235
|
# Calculates hash code according to all attributes.
|
226
236
|
# @return [Integer] Hash code
|
227
237
|
def hash
|
228
|
-
[branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, xml_space_preserve, original_file, localized_format_string, localized_format_key].hash
|
238
|
+
[branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
|
229
239
|
end
|
230
240
|
|
231
241
|
# Builds the object from hash
|
@@ -47,6 +47,9 @@ module Phrase
|
|
47
47
|
# NSStringLocalizedFormatKey attribute. Used in .stringsdict format.
|
48
48
|
attr_accessor :localized_format_key
|
49
49
|
|
50
|
+
# Updates/Creates custom metadata property name and value pairs to be associated with key. If you want to delete a custom metadata property, you can set its value to null. If you want to update a custom metadata property, you can set its value to the new value.
|
51
|
+
attr_accessor :custom_metadata
|
52
|
+
|
50
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
54
|
def self.attribute_map
|
52
55
|
{
|
@@ -64,7 +67,8 @@ module Phrase
|
|
64
67
|
:'xml_space_preserve' => :'xml_space_preserve',
|
65
68
|
:'original_file' => :'original_file',
|
66
69
|
:'localized_format_string' => :'localized_format_string',
|
67
|
-
:'localized_format_key' => :'localized_format_key'
|
70
|
+
:'localized_format_key' => :'localized_format_key',
|
71
|
+
:'custom_metadata' => :'custom_metadata'
|
68
72
|
}
|
69
73
|
end
|
70
74
|
|
@@ -85,7 +89,8 @@ module Phrase
|
|
85
89
|
:'xml_space_preserve' => :'Boolean',
|
86
90
|
:'original_file' => :'String',
|
87
91
|
:'localized_format_string' => :'String',
|
88
|
-
:'localized_format_key' => :'String'
|
92
|
+
:'localized_format_key' => :'String',
|
93
|
+
:'custom_metadata' => :'Object'
|
89
94
|
}
|
90
95
|
end
|
91
96
|
|
@@ -169,6 +174,10 @@ module Phrase
|
|
169
174
|
if attributes.key?(:'localized_format_key')
|
170
175
|
self.localized_format_key = attributes[:'localized_format_key']
|
171
176
|
end
|
177
|
+
|
178
|
+
if attributes.key?(:'custom_metadata')
|
179
|
+
self.custom_metadata = attributes[:'custom_metadata']
|
180
|
+
end
|
172
181
|
end
|
173
182
|
|
174
183
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -203,7 +212,8 @@ module Phrase
|
|
203
212
|
xml_space_preserve == o.xml_space_preserve &&
|
204
213
|
original_file == o.original_file &&
|
205
214
|
localized_format_string == o.localized_format_string &&
|
206
|
-
localized_format_key == o.localized_format_key
|
215
|
+
localized_format_key == o.localized_format_key &&
|
216
|
+
custom_metadata == o.custom_metadata
|
207
217
|
end
|
208
218
|
|
209
219
|
# @see the `==` method
|
@@ -215,7 +225,7 @@ module Phrase
|
|
215
225
|
# Calculates hash code according to all attributes.
|
216
226
|
# @return [Integer] Hash code
|
217
227
|
def hash
|
218
|
-
[branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, xml_space_preserve, original_file, localized_format_string, localized_format_key].hash
|
228
|
+
[branch, name, description, plural, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
|
219
229
|
end
|
220
230
|
|
221
231
|
# Builds the object from hash
|
@@ -11,7 +11,7 @@ module Phrase
|
|
11
11
|
# Order direction. Can be one of: asc, desc.
|
12
12
|
attr_accessor :order
|
13
13
|
|
14
|
-
# Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name
|
14
|
+
# Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>. Please note: If <code>tags</code> are added to filter the search, the search will be limited to a maximum of 65,536 tagged keys.
|
15
15
|
attr_accessor :q
|
16
16
|
|
17
17
|
# Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|