phrase 1.0.13 → 2.2.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.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +48 -9
  3. data/docs/Account.md +3 -1
  4. data/docs/AccountDetails.md +5 -1
  5. data/docs/AccountDetails1.md +3 -1
  6. data/docs/AccountSearchResult.md +29 -0
  7. data/docs/Branch.md +5 -1
  8. data/docs/Comment.md +3 -1
  9. data/docs/CurrentUser.md +31 -0
  10. data/docs/JobCreateParameters.md +2 -0
  11. data/docs/JobDetails.md +2 -0
  12. data/docs/JobDetails1.md +2 -0
  13. data/docs/JobLocale.md +5 -1
  14. data/docs/JobTemplate.md +29 -0
  15. data/docs/JobTemplateCreateParameters.md +21 -0
  16. data/docs/JobTemplateLocale.md +23 -0
  17. data/docs/JobTemplateLocaleUpdateParameters.md +23 -0
  18. data/docs/JobTemplateLocalesApi.md +347 -0
  19. data/docs/JobTemplateLocalesCreateParameters.md +23 -0
  20. data/docs/JobTemplatePreview.md +19 -0
  21. data/docs/JobTemplateUpdateParameters.md +21 -0
  22. data/docs/JobTemplateUserPreview.md +23 -0
  23. data/docs/JobTemplatesApi.md +337 -0
  24. data/docs/KeysApi.md +137 -9
  25. data/docs/KeysExcludeParameters.md +23 -0
  26. data/docs/KeysIncludeParameters.md +23 -0
  27. data/docs/KeysSearchParameters.md +1 -1
  28. data/docs/KeysTagParameters.md +1 -1
  29. data/docs/KeysUntagParameters.md +1 -1
  30. data/docs/LocalePreview1.md +23 -0
  31. data/docs/LocalesApi.md +73 -6
  32. data/docs/MemberSpaces.md +2 -2
  33. data/docs/MemberUpdateParameters.md +4 -2
  34. data/docs/Notification.md +41 -0
  35. data/docs/NotificationGroup.md +23 -0
  36. data/docs/NotificationGroupDetail.md +27 -0
  37. data/docs/NotificationGroupsApi.md +194 -0
  38. data/docs/NotificationsApi.md +194 -0
  39. data/docs/OrderCreateParameters.md +2 -0
  40. data/docs/Project.md +2 -0
  41. data/docs/ProjectCreateParameters.md +35 -1
  42. data/docs/ProjectDetails.md +2 -0
  43. data/docs/ProjectsApi.md +7 -1
  44. data/docs/ScreenshotCreateParameters.md +3 -1
  45. data/docs/ScreenshotMarkerCreateParameters.md +3 -1
  46. data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
  47. data/docs/ScreenshotMarkersApi.md +9 -3
  48. data/docs/ScreenshotUpdateParameters.md +3 -1
  49. data/docs/ScreenshotsApi.md +8 -2
  50. data/docs/SearchApi.md +72 -0
  51. data/docs/SearchInAccountParameters.md +23 -0
  52. data/docs/Space1.md +25 -0
  53. data/docs/Subscription.md +19 -0
  54. data/docs/TranslationOrder.md +2 -0
  55. data/docs/TranslationsApi.md +25 -25
  56. data/docs/User.md +0 -2
  57. data/docs/UsersApi.md +2 -2
  58. data/lib/phrase.rb +24 -0
  59. data/lib/phrase/api/job_template_locales_api.rb +417 -0
  60. data/lib/phrase/api/job_templates_api.rb +387 -0
  61. data/lib/phrase/api/keys_api.rb +158 -10
  62. data/lib/phrase/api/locales_api.rb +76 -5
  63. data/lib/phrase/api/notification_groups_api.rb +202 -0
  64. data/lib/phrase/api/notifications_api.rb +202 -0
  65. data/lib/phrase/api/projects_api.rb +9 -0
  66. data/lib/phrase/api/screenshot_markers_api.rb +9 -0
  67. data/lib/phrase/api/screenshots_api.rb +9 -0
  68. data/lib/phrase/api/search_api.rb +84 -0
  69. data/lib/phrase/api/translations_api.rb +35 -35
  70. data/lib/phrase/api/users_api.rb +3 -3
  71. data/lib/phrase/models/account.rb +13 -4
  72. data/lib/phrase/models/account_details.rb +22 -4
  73. data/lib/phrase/models/account_details1.rb +10 -1
  74. data/lib/phrase/models/account_search_result.rb +250 -0
  75. data/lib/phrase/models/branch.rb +19 -1
  76. data/lib/phrase/models/comment.rb +15 -4
  77. data/lib/phrase/models/current_user.rb +257 -0
  78. data/lib/phrase/models/job_create_parameters.rb +11 -1
  79. data/lib/phrase/models/job_details.rb +10 -1
  80. data/lib/phrase/models/job_details1.rb +10 -1
  81. data/lib/phrase/models/job_locale.rb +22 -4
  82. data/lib/phrase/models/job_template.rb +248 -0
  83. data/lib/phrase/models/job_template_create_parameters.rb +220 -0
  84. data/lib/phrase/models/job_template_locale.rb +223 -0
  85. data/lib/phrase/models/job_template_locale_update_parameters.rb +234 -0
  86. data/lib/phrase/models/job_template_locales_create_parameters.rb +234 -0
  87. data/lib/phrase/models/job_template_preview.rb +203 -0
  88. data/lib/phrase/models/job_template_update_parameters.rb +220 -0
  89. data/lib/phrase/models/job_template_user_preview.rb +221 -0
  90. data/lib/phrase/models/keys_exclude_parameters.rb +225 -0
  91. data/lib/phrase/models/keys_include_parameters.rb +225 -0
  92. data/lib/phrase/models/keys_search_parameters.rb +1 -1
  93. data/lib/phrase/models/keys_tag_parameters.rb +1 -1
  94. data/lib/phrase/models/keys_untag_parameters.rb +1 -1
  95. data/lib/phrase/models/locale_preview1.rb +221 -0
  96. data/lib/phrase/models/member_spaces.rb +2 -2
  97. data/lib/phrase/models/member_update_parameters.rb +12 -2
  98. data/lib/phrase/models/notification.rb +302 -0
  99. data/lib/phrase/models/notification_group.rb +221 -0
  100. data/lib/phrase/models/notification_group_detail.rb +239 -0
  101. data/lib/phrase/models/order_create_parameters.rb +11 -1
  102. data/lib/phrase/models/project.rb +10 -1
  103. data/lib/phrase/models/project_create_parameters.rb +174 -4
  104. data/lib/phrase/models/project_details.rb +10 -1
  105. data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
  106. data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
  107. data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
  108. data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
  109. data/lib/phrase/models/search_in_account_parameters.rb +225 -0
  110. data/lib/phrase/models/space1.rb +230 -0
  111. data/lib/phrase/models/subscription.rb +203 -0
  112. data/lib/phrase/models/translation_order.rb +10 -1
  113. data/lib/phrase/models/user.rb +1 -10
  114. data/lib/phrase/version.rb +1 -1
  115. data/spec/api/job_template_locales_api_spec.rb +103 -0
  116. data/spec/api/job_templates_api_spec.rb +98 -0
  117. data/spec/api/keys_api_spec.rb +32 -4
  118. data/spec/api/locales_api_spec.rb +17 -2
  119. data/spec/api/notification_groups_api_spec.rb +62 -0
  120. data/spec/api/notifications_api_spec.rb +62 -0
  121. data/spec/api/projects_api_spec.rb +3 -0
  122. data/spec/api/screenshot_markers_api_spec.rb +3 -0
  123. data/spec/api/screenshots_api_spec.rb +3 -0
  124. data/spec/api/search_api_spec.rb +37 -0
  125. data/spec/api/translations_api_spec.rb +10 -10
  126. data/spec/api/users_api_spec.rb +1 -1
  127. data/spec/models/account_details1_spec.rb +6 -0
  128. data/spec/models/account_details_spec.rb +12 -0
  129. data/spec/models/account_search_result_spec.rb +65 -0
  130. data/spec/models/account_spec.rb +6 -0
  131. data/spec/models/branch_spec.rb +12 -0
  132. data/spec/models/comment_spec.rb +6 -0
  133. data/spec/models/current_user_spec.rb +71 -0
  134. data/spec/models/job_create_parameters_spec.rb +6 -0
  135. data/spec/models/job_details1_spec.rb +6 -0
  136. data/spec/models/job_details_spec.rb +6 -0
  137. data/spec/models/job_locale_spec.rb +12 -0
  138. data/spec/models/job_template_create_parameters_spec.rb +41 -0
  139. data/spec/models/job_template_locale_spec.rb +47 -0
  140. data/spec/models/job_template_locale_update_parameters_spec.rb +47 -0
  141. data/spec/models/job_template_locales_create_parameters_spec.rb +47 -0
  142. data/spec/models/job_template_preview_spec.rb +35 -0
  143. data/spec/models/job_template_spec.rb +65 -0
  144. data/spec/models/job_template_update_parameters_spec.rb +41 -0
  145. data/spec/models/job_template_user_preview_spec.rb +47 -0
  146. data/spec/models/keys_exclude_parameters_spec.rb +47 -0
  147. data/spec/models/keys_include_parameters_spec.rb +47 -0
  148. data/spec/models/locale_preview1_spec.rb +47 -0
  149. data/spec/models/member_update_parameters_spec.rb +6 -0
  150. data/spec/models/notification_group_detail_spec.rb +59 -0
  151. data/spec/models/notification_group_spec.rb +47 -0
  152. data/spec/models/notification_spec.rb +101 -0
  153. data/spec/models/order_create_parameters_spec.rb +6 -0
  154. data/spec/models/project_create_parameters_spec.rb +102 -0
  155. data/spec/models/project_details_spec.rb +6 -0
  156. data/spec/models/project_spec.rb +6 -0
  157. data/spec/models/screenshot_create_parameters_spec.rb +6 -0
  158. data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
  159. data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
  160. data/spec/models/screenshot_update_parameters_spec.rb +6 -0
  161. data/spec/models/search_in_account_parameters_spec.rb +47 -0
  162. data/spec/models/space1_spec.rb +53 -0
  163. data/spec/models/subscription_spec.rb +35 -0
  164. data/spec/models/translation_order_spec.rb +6 -0
  165. data/spec/models/user_spec.rb +0 -6
  166. metadata +263 -167
@@ -2,6 +2,10 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class Branch
5
+ attr_accessor :base_project_id
6
+
7
+ attr_accessor :branch_project_id
8
+
5
9
  attr_accessor :name
6
10
 
7
11
  attr_accessor :created_at
@@ -19,6 +23,8 @@ module Phrase
19
23
  # Attribute mapping from ruby-style variable name to JSON key.
20
24
  def self.attribute_map
21
25
  {
26
+ :'base_project_id' => :'base_project_id',
27
+ :'branch_project_id' => :'branch_project_id',
22
28
  :'name' => :'name',
23
29
  :'created_at' => :'created_at',
24
30
  :'updated_at' => :'updated_at',
@@ -32,6 +38,8 @@ module Phrase
32
38
  # Attribute type mapping.
33
39
  def self.openapi_types
34
40
  {
41
+ :'base_project_id' => :'String',
42
+ :'branch_project_id' => :'String',
35
43
  :'name' => :'String',
36
44
  :'created_at' => :'DateTime',
37
45
  :'updated_at' => :'DateTime',
@@ -63,6 +71,14 @@ module Phrase
63
71
  h[k.to_sym] = v
64
72
  }
65
73
 
74
+ if attributes.key?(:'base_project_id')
75
+ self.base_project_id = attributes[:'base_project_id']
76
+ end
77
+
78
+ if attributes.key?(:'branch_project_id')
79
+ self.branch_project_id = attributes[:'branch_project_id']
80
+ end
81
+
66
82
  if attributes.key?(:'name')
67
83
  self.name = attributes[:'name']
68
84
  end
@@ -110,6 +126,8 @@ module Phrase
110
126
  def ==(o)
111
127
  return true if self.equal?(o)
112
128
  self.class == o.class &&
129
+ base_project_id == o.base_project_id &&
130
+ branch_project_id == o.branch_project_id &&
113
131
  name == o.name &&
114
132
  created_at == o.created_at &&
115
133
  updated_at == o.updated_at &&
@@ -128,7 +146,7 @@ module Phrase
128
146
  # Calculates hash code according to all attributes.
129
147
  # @return [Integer] Hash code
130
148
  def hash
131
- [name, created_at, updated_at, merged_at, merged_by, created_by, state].hash
149
+ [base_project_id, branch_project_id, name, created_at, updated_at, merged_at, merged_by, created_by, state].hash
132
150
  end
133
151
 
134
152
  # Builds the object from hash
@@ -12,6 +12,8 @@ module Phrase
12
12
 
13
13
  attr_accessor :updated_at
14
14
 
15
+ attr_accessor :mentioned_users
16
+
15
17
  # Attribute mapping from ruby-style variable name to JSON key.
16
18
  def self.attribute_map
17
19
  {
@@ -19,7 +21,8 @@ module Phrase
19
21
  :'message' => :'message',
20
22
  :'user' => :'user',
21
23
  :'created_at' => :'created_at',
22
- :'updated_at' => :'updated_at'
24
+ :'updated_at' => :'updated_at',
25
+ :'mentioned_users' => :'mentioned_users'
23
26
  }
24
27
  end
25
28
 
@@ -30,7 +33,8 @@ module Phrase
30
33
  :'message' => :'String',
31
34
  :'user' => :'UserPreview',
32
35
  :'created_at' => :'DateTime',
33
- :'updated_at' => :'DateTime'
36
+ :'updated_at' => :'DateTime',
37
+ :'mentioned_users' => :'Array<UserPreview>'
34
38
  }
35
39
  end
36
40
 
@@ -74,6 +78,12 @@ module Phrase
74
78
  if attributes.key?(:'updated_at')
75
79
  self.updated_at = attributes[:'updated_at']
76
80
  end
81
+
82
+ if attributes.key?(:'mentioned_users')
83
+ if (value = attributes[:'mentioned_users']).is_a?(Array)
84
+ self.mentioned_users = value
85
+ end
86
+ end
77
87
  end
78
88
 
79
89
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -98,7 +108,8 @@ module Phrase
98
108
  message == o.message &&
99
109
  user == o.user &&
100
110
  created_at == o.created_at &&
101
- updated_at == o.updated_at
111
+ updated_at == o.updated_at &&
112
+ mentioned_users == o.mentioned_users
102
113
  end
103
114
 
104
115
  # @see the `==` method
@@ -110,7 +121,7 @@ module Phrase
110
121
  # Calculates hash code according to all attributes.
111
122
  # @return [Integer] Hash code
112
123
  def hash
113
- [id, message, user, created_at, updated_at].hash
124
+ [id, message, user, created_at, updated_at, mentioned_users].hash
114
125
  end
115
126
 
116
127
  # Builds the object from hash
@@ -0,0 +1,257 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class CurrentUser
5
+ attr_accessor :id
6
+
7
+ attr_accessor :username
8
+
9
+ attr_accessor :name
10
+
11
+ attr_accessor :email
12
+
13
+ attr_accessor :position
14
+
15
+ attr_accessor :language
16
+
17
+ attr_accessor :created_at
18
+
19
+ attr_accessor :updated_at
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'id' => :'id',
25
+ :'username' => :'username',
26
+ :'name' => :'name',
27
+ :'email' => :'email',
28
+ :'position' => :'position',
29
+ :'language' => :'language',
30
+ :'created_at' => :'created_at',
31
+ :'updated_at' => :'updated_at'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'id' => :'String',
39
+ :'username' => :'String',
40
+ :'name' => :'String',
41
+ :'email' => :'String',
42
+ :'position' => :'String',
43
+ :'language' => :'String',
44
+ :'created_at' => :'DateTime',
45
+ :'updated_at' => :'DateTime'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::CurrentUser` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::CurrentUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'id')
71
+ self.id = attributes[:'id']
72
+ end
73
+
74
+ if attributes.key?(:'username')
75
+ self.username = attributes[:'username']
76
+ end
77
+
78
+ if attributes.key?(:'name')
79
+ self.name = attributes[:'name']
80
+ end
81
+
82
+ if attributes.key?(:'email')
83
+ self.email = attributes[:'email']
84
+ end
85
+
86
+ if attributes.key?(:'position')
87
+ self.position = attributes[:'position']
88
+ end
89
+
90
+ if attributes.key?(:'language')
91
+ self.language = attributes[:'language']
92
+ end
93
+
94
+ if attributes.key?(:'created_at')
95
+ self.created_at = attributes[:'created_at']
96
+ end
97
+
98
+ if attributes.key?(:'updated_at')
99
+ self.updated_at = attributes[:'updated_at']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ invalid_properties = Array.new
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ true
114
+ end
115
+
116
+ # Checks equality by comparing each attribute.
117
+ # @param [Object] Object to be compared
118
+ def ==(o)
119
+ return true if self.equal?(o)
120
+ self.class == o.class &&
121
+ id == o.id &&
122
+ username == o.username &&
123
+ name == o.name &&
124
+ email == o.email &&
125
+ position == o.position &&
126
+ language == o.language &&
127
+ created_at == o.created_at &&
128
+ updated_at == o.updated_at
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ def hash
140
+ [id, username, name, email, position, language, created_at, updated_at].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ new.build_from_hash(attributes)
148
+ end
149
+
150
+ # Builds the object from hash
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ # @return [Object] Returns the model itself
153
+ def build_from_hash(attributes)
154
+ return nil unless attributes.is_a?(Hash)
155
+ self.class.openapi_types.each_pair do |key, type|
156
+ if type =~ /\AArray<(.*)>/i
157
+ # check to ensure the input is an array given that the attribute
158
+ # is documented as an array but the input is not
159
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
160
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
161
+ end
162
+ elsif !attributes[self.class.attribute_map[key]].nil?
163
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
164
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
165
+ end
166
+
167
+ self
168
+ end
169
+
170
+ # Deserializes the data based on type
171
+ # @param string type Data type
172
+ # @param string value Value to be deserialized
173
+ # @return [Object] Deserialized data
174
+ def _deserialize(type, value)
175
+ case type.to_sym
176
+ when :DateTime
177
+ DateTime.parse(value)
178
+ when :Date
179
+ Date.parse(value)
180
+ when :String
181
+ value.to_s
182
+ when :Integer
183
+ value.to_i
184
+ when :Float
185
+ value.to_f
186
+ when :Boolean
187
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
188
+ true
189
+ else
190
+ false
191
+ end
192
+ when :Object
193
+ # generic object (usually a Hash), return directly
194
+ value
195
+ when /\AArray<(?<inner_type>.+)>\z/
196
+ inner_type = Regexp.last_match[:inner_type]
197
+ value.map { |v| _deserialize(inner_type, v) }
198
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
199
+ k_type = Regexp.last_match[:k_type]
200
+ v_type = Regexp.last_match[:v_type]
201
+ {}.tap do |hash|
202
+ value.each do |k, v|
203
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
204
+ end
205
+ end
206
+ else # model
207
+ Phrase.const_get(type).build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+ end
257
+ end
@@ -8,6 +8,9 @@ module Phrase
8
8
  # Job name
9
9
  attr_accessor :name
10
10
 
11
+ # The API id of the source language
12
+ attr_accessor :source_locale_id
13
+
11
14
  # Briefing for the translators
12
15
  attr_accessor :briefing
13
16
 
@@ -28,6 +31,7 @@ module Phrase
28
31
  {
29
32
  :'branch' => :'branch',
30
33
  :'name' => :'name',
34
+ :'source_locale_id' => :'source_locale_id',
31
35
  :'briefing' => :'briefing',
32
36
  :'due_date' => :'due_date',
33
37
  :'ticket_url' => :'ticket_url',
@@ -41,6 +45,7 @@ module Phrase
41
45
  {
42
46
  :'branch' => :'String',
43
47
  :'name' => :'String',
48
+ :'source_locale_id' => :'String',
44
49
  :'briefing' => :'String',
45
50
  :'due_date' => :'DateTime',
46
51
  :'ticket_url' => :'String',
@@ -78,6 +83,10 @@ module Phrase
78
83
  self.name = attributes[:'name']
79
84
  end
80
85
 
86
+ if attributes.key?(:'source_locale_id')
87
+ self.source_locale_id = attributes[:'source_locale_id']
88
+ end
89
+
81
90
  if attributes.key?(:'briefing')
82
91
  self.briefing = attributes[:'briefing']
83
92
  end
@@ -123,6 +132,7 @@ module Phrase
123
132
  self.class == o.class &&
124
133
  branch == o.branch &&
125
134
  name == o.name &&
135
+ source_locale_id == o.source_locale_id &&
126
136
  briefing == o.briefing &&
127
137
  due_date == o.due_date &&
128
138
  ticket_url == o.ticket_url &&
@@ -139,7 +149,7 @@ module Phrase
139
149
  # Calculates hash code according to all attributes.
140
150
  # @return [Integer] Hash code
141
151
  def hash
142
- [branch, name, briefing, due_date, ticket_url, tags, translation_key_ids].hash
152
+ [branch, name, source_locale_id, briefing, due_date, ticket_url, tags, translation_key_ids].hash
143
153
  end
144
154
 
145
155
  # Builds the object from hash
@@ -26,6 +26,8 @@ module Phrase
26
26
 
27
27
  attr_accessor :job_tag_name
28
28
 
29
+ attr_accessor :source_locale
30
+
29
31
  attr_accessor :locales
30
32
 
31
33
  attr_accessor :keys
@@ -45,6 +47,7 @@ module Phrase
45
47
  :'updated_at' => :'updated_at',
46
48
  :'owner' => :'owner',
47
49
  :'job_tag_name' => :'job_tag_name',
50
+ :'source_locale' => :'source_locale',
48
51
  :'locales' => :'locales',
49
52
  :'keys' => :'keys'
50
53
  }
@@ -65,6 +68,7 @@ module Phrase
65
68
  :'updated_at' => :'DateTime',
66
69
  :'owner' => :'UserPreview',
67
70
  :'job_tag_name' => :'String',
71
+ :'source_locale' => :'LocalePreview',
68
72
  :'locales' => :'Array<LocalePreview>',
69
73
  :'keys' => :'Array<KeyPreview>'
70
74
  }
@@ -147,6 +151,10 @@ module Phrase
147
151
  self.job_tag_name = attributes[:'job_tag_name']
148
152
  end
149
153
 
154
+ if attributes.key?(:'source_locale')
155
+ self.source_locale = attributes[:'source_locale']
156
+ end
157
+
150
158
  if attributes.key?(:'locales')
151
159
  if (value = attributes[:'locales']).is_a?(Array)
152
160
  self.locales = value
@@ -190,6 +198,7 @@ module Phrase
190
198
  updated_at == o.updated_at &&
191
199
  owner == o.owner &&
192
200
  job_tag_name == o.job_tag_name &&
201
+ source_locale == o.source_locale &&
193
202
  locales == o.locales &&
194
203
  keys == o.keys
195
204
  end
@@ -203,7 +212,7 @@ module Phrase
203
212
  # Calculates hash code according to all attributes.
204
213
  # @return [Integer] Hash code
205
214
  def hash
206
- [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, locales, keys].hash
215
+ [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, source_locale, locales, keys].hash
207
216
  end
208
217
 
209
218
  # Builds the object from hash