phrase 4.28.0 → 4.30.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 (272) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +7 -4
  4. data/docs/Account.md +8 -8
  5. data/docs/AccountDetails.md +10 -10
  6. data/docs/AccountSearchResult.md +8 -8
  7. data/docs/AffectedCount.md +2 -2
  8. data/docs/AffectedResources.md +2 -2
  9. data/docs/Authorization.md +9 -9
  10. data/docs/AuthorizationCreateParameters.md +4 -4
  11. data/docs/AuthorizationUpdateParameters.md +4 -4
  12. data/docs/AuthorizationWithToken.md +10 -10
  13. data/docs/Automation.md +17 -17
  14. data/docs/AutomationEvent.md +10 -10
  15. data/docs/AutomationEventProject.md +3 -3
  16. data/docs/AutomationsCreateParameters.md +10 -10
  17. data/docs/AutomationsCreateParameters1.md +10 -10
  18. data/docs/BlacklistedKey.md +5 -5
  19. data/docs/BlacklistedKeyCreateParameters.md +2 -2
  20. data/docs/BlacklistedKeyUpdateParameters.md +2 -2
  21. data/docs/Branch.md +12 -12
  22. data/docs/BranchComparison.md +5 -5
  23. data/docs/BranchComparisonChange.md +3 -3
  24. data/docs/BranchComparisonDiff.md +4 -4
  25. data/docs/BranchComparisonDiffConflictsValue.md +3 -3
  26. data/docs/BranchCreateComparisonParameters.md +2 -2
  27. data/docs/BranchCreateParameters.md +3 -3
  28. data/docs/BranchMergeParameters.md +2 -2
  29. data/docs/BranchName.md +2 -2
  30. data/docs/BranchSyncParameters.md +2 -2
  31. data/docs/BranchUpdateParameters.md +2 -2
  32. data/docs/CheckIssue.md +10 -10
  33. data/docs/Comment.md +9 -9
  34. data/docs/CommentCreateParameters.md +4 -4
  35. data/docs/CommentCreateParameters1.md +3 -3
  36. data/docs/CommentMarkReadParameters.md +2 -2
  37. data/docs/CommentReaction.md +7 -7
  38. data/docs/CommentUpdateParameters.md +3 -3
  39. data/docs/CurrentUser.md +9 -9
  40. data/docs/CustomMetadataDataType.md +1 -1
  41. data/docs/CustomMetadataPropertiesCreateParameters.md +6 -6
  42. data/docs/CustomMetadataPropertiesUpdateParameters.md +5 -5
  43. data/docs/CustomMetadataProperty.md +10 -10
  44. data/docs/Distribution.md +9 -9
  45. data/docs/DistributionCreateParameters.md +6 -6
  46. data/docs/DistributionDetails.md +11 -11
  47. data/docs/DistributionUpdateParameters.md +6 -6
  48. data/docs/Document.md +5 -5
  49. data/docs/DocumentDelete422Response.md +3 -3
  50. data/docs/DocumentDelete422ResponseErrorsInner.md +4 -4
  51. data/docs/Error.md +2 -2
  52. data/docs/ErrorError.md +3 -3
  53. data/docs/FigmaAttachment.md +5 -5
  54. data/docs/FigmaAttachmentCreateParameters.md +3 -3
  55. data/docs/FigmaAttachmentUpdateParameters.md +3 -3
  56. data/docs/Format.md +7 -7
  57. data/docs/Glossary.md +7 -7
  58. data/docs/GlossaryCreateParameters.md +4 -4
  59. data/docs/GlossaryTerm.md +10 -10
  60. data/docs/GlossaryTermCreateParameters.md +3 -3
  61. data/docs/GlossaryTermGlossary.md +3 -3
  62. data/docs/GlossaryTermTranslation.md +6 -6
  63. data/docs/GlossaryTermTranslationCreateParameters.md +3 -3
  64. data/docs/GlossaryTermTranslationUpdateParameters.md +3 -3
  65. data/docs/GlossaryTermUpdateParameters.md +3 -3
  66. data/docs/GlossaryUpdateParameters.md +4 -4
  67. data/docs/Icu.md +2 -2
  68. data/docs/IcuSkeletonError.md +2 -2
  69. data/docs/IcuSkeletonParameters.md +5 -5
  70. data/docs/Invitation.md +16 -16
  71. data/docs/InvitationCreateParameters.md +9 -9
  72. data/docs/InvitationUpdateParameters.md +8 -8
  73. data/docs/InvitationUpdateSettingsParameters.md +3 -3
  74. data/docs/Job.md +14 -14
  75. data/docs/JobAnnotation.md +5 -5
  76. data/docs/JobAnnotationShort.md +3 -3
  77. data/docs/JobAnnotationUpdateParameters.md +3 -3
  78. data/docs/JobComment.md +8 -8
  79. data/docs/JobCommentCreateParameters.md +3 -3
  80. data/docs/JobCommentUpdateParameters.md +3 -3
  81. data/docs/JobCompleteParameters.md +2 -2
  82. data/docs/JobCreateParameters.md +11 -11
  83. data/docs/JobDetails.md +22 -22
  84. data/docs/JobKeysCreateParameters.md +3 -3
  85. data/docs/JobKeysDeleteParameters.md +3 -3
  86. data/docs/JobLocale.md +10 -10
  87. data/docs/JobLocaleCompleteParameters.md +2 -2
  88. data/docs/JobLocaleCompleteReviewParameters.md +2 -2
  89. data/docs/JobLocaleReopenParameters.md +2 -2
  90. data/docs/JobLocaleUpdateParameters.md +7 -7
  91. data/docs/JobLocalesCreateParameters.md +7 -7
  92. data/docs/JobPreview.md +4 -4
  93. data/docs/JobReopenParameters.md +2 -2
  94. data/docs/JobStartParameters.md +2 -2
  95. data/docs/JobTemplate.md +9 -9
  96. data/docs/JobTemplateCreateParameters.md +7 -5
  97. data/docs/JobTemplateDetails.md +12 -12
  98. data/docs/JobTemplateLocaleUpdateParameters.md +7 -7
  99. data/docs/JobTemplateLocales.md +6 -6
  100. data/docs/JobTemplateLocalesCreateParameters.md +7 -7
  101. data/docs/JobTemplatePreview.md +3 -3
  102. data/docs/JobTemplateUpdateParameters.md +7 -5
  103. data/docs/JobUpdateParameters.md +7 -7
  104. data/docs/KeyCreateParameters.md +21 -21
  105. data/docs/KeyFormatAnnotationsList200ResponseInner.md +3 -3
  106. data/docs/KeyLink.md +8 -8
  107. data/docs/KeyLinksBatchDestroyParameters.md +4 -4
  108. data/docs/KeyLinksCreateParameters.md +2 -2
  109. data/docs/KeyPreview.md +5 -5
  110. data/docs/KeyUpdateParameters.md +19 -19
  111. data/docs/KeysExcludeParameters.md +5 -5
  112. data/docs/KeysIncludeParameters.md +5 -5
  113. data/docs/KeysSearchParameters.md +6 -6
  114. data/docs/KeysTagParameters.md +5 -5
  115. data/docs/KeysUntagParameters.md +5 -5
  116. data/docs/Locale.md +17 -17
  117. data/docs/LocaleCreateParameters.md +16 -16
  118. data/docs/LocaleDetails.md +18 -18
  119. data/docs/LocaleDownload.md +8 -8
  120. data/docs/LocaleDownloadCreateParameters.md +14 -14
  121. data/docs/LocaleDownloadParams.md +8 -8
  122. data/docs/LocaleDownloadResult.md +2 -2
  123. data/docs/LocalePreview.md +4 -4
  124. data/docs/LocalePreview1.md +3 -3
  125. data/docs/LocaleReport.md +15 -15
  126. data/docs/LocaleStatistics.md +8 -8
  127. data/docs/LocaleTeamPreview.md +4 -4
  128. data/docs/LocaleUpdateParameters.md +14 -14
  129. data/docs/LocaleUserPreview.md +5 -5
  130. data/docs/MachineTranslationLocaleProviderMapping.md +4 -4
  131. data/docs/MachineTranslationLocaleProviderMappingsCreateParameters.md +4 -4
  132. data/docs/MachineTranslationSettings.md +3 -3
  133. data/docs/MachineTranslationSettingsUpdateParameters.md +2 -2
  134. data/docs/Member.md +12 -12
  135. data/docs/MemberProjectDetail.md +11 -11
  136. data/docs/MemberProjectDetailProjectRolesInner.md +3 -3
  137. data/docs/MemberSpacesInner.md +6 -6
  138. data/docs/MemberUpdateParameters.md +8 -8
  139. data/docs/MemberUpdateSettingsParameters.md +3 -3
  140. data/docs/MembersApi.md +70 -0
  141. data/docs/Notification.md +14 -14
  142. data/docs/NotificationGroup.md +5 -5
  143. data/docs/NotificationGroupDetail.md +7 -7
  144. data/docs/OrderConfirmParameters.md +2 -2
  145. data/docs/OrderCreateParameters.md +16 -16
  146. data/docs/OrganizationJobTemplate.md +8 -8
  147. data/docs/OrganizationJobTemplateCreateParameters.md +6 -4
  148. data/docs/OrganizationJobTemplateDetails.md +11 -11
  149. data/docs/OrganizationJobTemplateLocaleUpdateParameters.md +7 -7
  150. data/docs/OrganizationJobTemplateLocalesCreateParameters.md +7 -7
  151. data/docs/OrganizationJobTemplateUpdateParameters.md +6 -4
  152. data/docs/PreTranslation.md +8 -8
  153. data/docs/PreTranslationCreateParameters.md +3 -3
  154. data/docs/Project.md +12 -12
  155. data/docs/ProjectCreateParameters.md +16 -16
  156. data/docs/ProjectDetails.md +18 -18
  157. data/docs/ProjectLocales.md +8 -8
  158. data/docs/ProjectMember.md +27 -0
  159. data/docs/ProjectReport.md +9 -9
  160. data/docs/ProjectShort.md +6 -6
  161. data/docs/ProjectUpdateParameters.md +14 -14
  162. data/docs/QualityPerformanceScoreList200Response.md +4 -4
  163. data/docs/QualityPerformanceScoreList200ResponseAnyOf.md +3 -3
  164. data/docs/QualityPerformanceScoreList200ResponseAnyOfData.md +2 -2
  165. data/docs/QualityPerformanceScoreList200ResponseAnyOfDataTranslationsInner.md +4 -4
  166. data/docs/QualityPerformanceScoreList200ResponseAnyOfErrorsInner.md +4 -4
  167. data/docs/QualityPerformanceScoreListRequest.md +2 -2
  168. data/docs/Release.md +14 -14
  169. data/docs/ReleaseCreateParameters.md +8 -8
  170. data/docs/ReleaseCreateParameters1.md +8 -8
  171. data/docs/ReleasePreview.md +13 -13
  172. data/docs/ReleaseTrigger.md +12 -12
  173. data/docs/ReleaseUpdateParameters.md +6 -6
  174. data/docs/ReleaseUpdateParameters1.md +8 -8
  175. data/docs/RepoSync.md +12 -12
  176. data/docs/RepoSyncCreateParameters.md +10 -10
  177. data/docs/RepoSyncEvent.md +8 -8
  178. data/docs/RepoSyncExportParameters.md +3 -3
  179. data/docs/RepoSyncImportParameters.md +3 -3
  180. data/docs/RepoSyncsApi.md +5 -1
  181. data/docs/ReportsApi.md +4 -4
  182. data/docs/Screenshot.md +8 -8
  183. data/docs/ScreenshotMarker.md +7 -7
  184. data/docs/ScreenshotMarkerCreateParameters.md +4 -4
  185. data/docs/ScreenshotMarkerPresentation.md +5 -5
  186. data/docs/ScreenshotMarkerUpdateParameters.md +4 -4
  187. data/docs/ScreenshotUpdateParameters.md +5 -5
  188. data/docs/SearchInAccountParameters.md +4 -4
  189. data/docs/Space.md +7 -7
  190. data/docs/Space1.md +6 -6
  191. data/docs/SpaceCreateParameters.md +2 -2
  192. data/docs/SpaceUpdateParameters.md +2 -2
  193. data/docs/SpacesProjectsCreateParameters.md +2 -2
  194. data/docs/Styleguide.md +5 -5
  195. data/docs/StyleguideCreateParameters.md +14 -14
  196. data/docs/StyleguideDetails.md +18 -18
  197. data/docs/StyleguidePreview.md +3 -3
  198. data/docs/StyleguideUpdateParameters.md +14 -14
  199. data/docs/Subscription.md +3 -3
  200. data/docs/SupportedLanguagesApi.md +62 -0
  201. data/docs/Tag.md +6 -6
  202. data/docs/TagCreateParameters.md +3 -3
  203. data/docs/TagWithStats.md +7 -7
  204. data/docs/TagWithStats1Statistics.md +5 -5
  205. data/docs/TagWithStats1Statistics1.md +3 -3
  206. data/docs/Team.md +8 -8
  207. data/docs/TeamCreateParameters.md +2 -2
  208. data/docs/TeamDetail.md +8 -8
  209. data/docs/TeamShort.md +5 -5
  210. data/docs/TeamUpdateParameters.md +2 -2
  211. data/docs/TeamsProjectsCreateParameters.md +2 -2
  212. data/docs/TeamsSpacesCreateParameters.md +2 -2
  213. data/docs/TeamsUsersCreateParameters.md +2 -2
  214. data/docs/Translation.md +13 -13
  215. data/docs/TranslationCreateParameters.md +9 -9
  216. data/docs/TranslationDetails.md +15 -15
  217. data/docs/TranslationExcludeParameters.md +2 -2
  218. data/docs/TranslationIncludeParameters.md +2 -2
  219. data/docs/TranslationKey.md +11 -11
  220. data/docs/TranslationKeyDetails.md +21 -21
  221. data/docs/TranslationOrder.md +19 -19
  222. data/docs/TranslationParent.md +3 -3
  223. data/docs/TranslationReviewParameters.md +2 -2
  224. data/docs/TranslationUnreviewParameters.md +2 -2
  225. data/docs/TranslationUnverifyParameters.md +2 -2
  226. data/docs/TranslationUpdateParameters.md +7 -7
  227. data/docs/TranslationVerifyParameters.md +2 -2
  228. data/docs/TranslationVersion.md +9 -9
  229. data/docs/TranslationVersionWithUser.md +10 -10
  230. data/docs/TranslationsExcludeParameters.md +5 -5
  231. data/docs/TranslationsIncludeParameters.md +5 -5
  232. data/docs/TranslationsReviewParameters.md +3 -3
  233. data/docs/TranslationsSearchParameters.md +5 -5
  234. data/docs/TranslationsUnreviewParameters.md +3 -3
  235. data/docs/TranslationsUnverifyParameters.md +5 -5
  236. data/docs/TranslationsVerifyParameters.md +4 -4
  237. data/docs/Upload.md +13 -13
  238. data/docs/UploadBatch.md +9 -9
  239. data/docs/UploadBatchesCreateParameters.md +3 -3
  240. data/docs/UploadSummary.md +11 -11
  241. data/docs/UploadsApi.md +2 -2
  242. data/docs/User.md +7 -7
  243. data/docs/UserPreview.md +5 -5
  244. data/docs/Variable.md +5 -5
  245. data/docs/VariableCreateParameters.md +3 -3
  246. data/docs/VariableUpdateParameters.md +3 -3
  247. data/docs/Webhook.md +9 -9
  248. data/docs/WebhookCreateParameters.md +7 -7
  249. data/docs/WebhookDelivery.md +8 -8
  250. data/docs/WebhookUpdateParameters.md +7 -7
  251. data/lib/phrase/api/members_api.rb +78 -0
  252. data/lib/phrase/api/repo_syncs_api.rb +6 -0
  253. data/lib/phrase/api/reports_api.rb +4 -4
  254. data/lib/phrase/api/supported_languages_api.rb +67 -0
  255. data/lib/phrase/models/job_template_create_parameters.rb +14 -4
  256. data/lib/phrase/models/job_template_update_parameters.rb +14 -4
  257. data/lib/phrase/models/locale_create_parameters.rb +2 -2
  258. data/lib/phrase/models/organization_job_template_create_parameters.rb +14 -4
  259. data/lib/phrase/models/organization_job_template_update_parameters.rb +14 -4
  260. data/lib/phrase/models/project_member.rb +241 -0
  261. data/lib/phrase/version.rb +1 -1
  262. data/lib/phrase.rb +2 -0
  263. data/spec/api/members_api_spec.rb +17 -0
  264. data/spec/api/repo_syncs_api_spec.rb +2 -0
  265. data/spec/api/reports_api_spec.rb +2 -2
  266. data/spec/api/supported_languages_api_spec.rb +34 -0
  267. data/spec/models/job_template_create_parameters_spec.rb +6 -0
  268. data/spec/models/job_template_update_parameters_spec.rb +6 -0
  269. data/spec/models/organization_job_template_create_parameters_spec.rb +6 -0
  270. data/spec/models/organization_job_template_update_parameters_spec.rb +6 -0
  271. data/spec/models/project_member_spec.rb +59 -0
  272. metadata +270 -262
@@ -0,0 +1,241 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class ProjectMember
5
+ attr_accessor :id
6
+
7
+ attr_accessor :username
8
+
9
+ attr_accessor :name
10
+
11
+ attr_accessor :position
12
+
13
+ attr_accessor :created_at
14
+
15
+ attr_accessor :updated_at
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ :'id' => :'id',
21
+ :'username' => :'username',
22
+ :'name' => :'name',
23
+ :'position' => :'position',
24
+ :'created_at' => :'created_at',
25
+ :'updated_at' => :'updated_at'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'id' => :'String',
33
+ :'username' => :'String',
34
+ :'name' => :'String',
35
+ :'position' => :'String',
36
+ :'created_at' => :'DateTime',
37
+ :'updated_at' => :'DateTime'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.openapi_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::ProjectMember` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::ProjectMember`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'id')
63
+ self.id = attributes[:'id']
64
+ end
65
+
66
+ if attributes.key?(:'username')
67
+ self.username = attributes[:'username']
68
+ end
69
+
70
+ if attributes.key?(:'name')
71
+ self.name = attributes[:'name']
72
+ end
73
+
74
+ if attributes.key?(:'position')
75
+ self.position = attributes[:'position']
76
+ end
77
+
78
+ if attributes.key?(:'created_at')
79
+ self.created_at = attributes[:'created_at']
80
+ end
81
+
82
+ if attributes.key?(:'updated_at')
83
+ self.updated_at = attributes[:'updated_at']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ id == o.id &&
106
+ username == o.username &&
107
+ name == o.name &&
108
+ position == o.position &&
109
+ created_at == o.created_at &&
110
+ updated_at == o.updated_at
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [id, username, name, position, created_at, updated_at].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ new.build_from_hash(attributes)
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ self.class.openapi_types.each_pair do |key, type|
138
+ if type =~ /\AArray<(.*)>/i
139
+ # check to ensure the input is an array given that the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
142
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
143
+ end
144
+ elsif !attributes[self.class.attribute_map[key]].nil?
145
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
147
+ end
148
+
149
+ self
150
+ end
151
+
152
+ # Deserializes the data based on type
153
+ # @param string type Data type
154
+ # @param string value Value to be deserialized
155
+ # @return [Object] Deserialized data
156
+ def _deserialize(type, value)
157
+ case type.to_sym
158
+ when :DateTime
159
+ DateTime.parse(value)
160
+ when :Date
161
+ Date.parse(value)
162
+ when :Time
163
+ Time.parse(value)
164
+ when :String
165
+ value.to_s
166
+ when :Integer
167
+ value.to_i
168
+ when :Float
169
+ value.to_f
170
+ when :Boolean
171
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
172
+ true
173
+ else
174
+ false
175
+ end
176
+ when :Object
177
+ # generic object (usually a Hash), return directly
178
+ value
179
+ when /\AArray<(?<inner_type>.+)>\z/
180
+ inner_type = Regexp.last_match[:inner_type]
181
+ value.map { |v| _deserialize(inner_type, v) }
182
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
183
+ k_type = Regexp.last_match[:k_type]
184
+ v_type = Regexp.last_match[:v_type]
185
+ {}.tap do |hash|
186
+ value.each do |k, v|
187
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
188
+ end
189
+ end
190
+ else # model
191
+ Phrase.const_get(type).build_from_hash(value)
192
+ end
193
+ end
194
+
195
+ # Returns the string representation of the object
196
+ # @return [String] String presentation of the object
197
+ def to_s
198
+ to_hash.to_s
199
+ end
200
+
201
+ # to_body is an alias to to_hash (backward compatibility)
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_body
204
+ to_hash
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ if value.nil?
214
+ is_nullable = self.class.openapi_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
218
+ hash[param] = _to_hash(value)
219
+ end
220
+ hash
221
+ end
222
+
223
+ # Outputs non-array value in the form of hash
224
+ # For object, use to_hash. Otherwise, just return the value
225
+ # @param [Object] value Any valid value
226
+ # @return [Hash] Returns the value in the form of hash
227
+ def _to_hash(value)
228
+ if value.is_a?(Array)
229
+ value.compact.map { |v| _to_hash(v) }
230
+ elsif value.is_a?(Hash)
231
+ {}.tap do |hash|
232
+ value.each { |k, v| hash[k] = _to_hash(v) }
233
+ end
234
+ elsif value.respond_to? :to_hash
235
+ value.to_hash
236
+ else
237
+ value
238
+ end
239
+ end
240
+ end
241
+ end
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '4.28.0'
2
+ VERSION = '4.30.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -161,6 +161,7 @@ require 'phrase/models/project'
161
161
  require 'phrase/models/project_create_parameters'
162
162
  require 'phrase/models/project_details'
163
163
  require 'phrase/models/project_locales'
164
+ require 'phrase/models/project_member'
164
165
  require 'phrase/models/project_report'
165
166
  require 'phrase/models/project_short'
166
167
  require 'phrase/models/project_update_parameters'
@@ -303,6 +304,7 @@ require 'phrase/api/screenshots_api'
303
304
  require 'phrase/api/search_api'
304
305
  require 'phrase/api/spaces_api'
305
306
  require 'phrase/api/style_guides_api'
307
+ require 'phrase/api/supported_languages_api'
306
308
  require 'phrase/api/tags_api'
307
309
  require 'phrase/api/teams_api'
308
310
  require 'phrase/api/translations_api'
@@ -78,6 +78,23 @@ describe 'MembersApi' do
78
78
  end
79
79
  end
80
80
 
81
+ # unit tests for members_by_project
82
+ # List project members
83
+ # Get all members active in the project. Access token scope must include &#x60;read&#x60;.
84
+ # @param project_id Project ID
85
+ # @param [Hash] opts the optional parameters
86
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
87
+ # @option opts [String] :q Specify a query to search for members by name or email (including wildcards).
88
+ # @option opts [String] :job_id Filter members to those assigned to the job identified by this id.
89
+ # @option opts [Integer] :page Page number
90
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
91
+ # @return [Array<ProjectMember>]
92
+ describe 'members_by_project test' do
93
+ it 'should work' do
94
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
95
+ end
96
+ end
97
+
81
98
  # unit tests for members_list
82
99
  # List members
83
100
  # Get all users active in the account. It also lists resources like projects and locales the member has access to. In case nothing is shown the default access from the role is used. Access token scope must include &#x60;team.manage&#x60;.
@@ -98,6 +98,8 @@ describe 'RepoSyncsApi' do
98
98
  # @param account_id Account ID
99
99
  # @param [Hash] opts the optional parameters
100
100
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
101
+ # @option opts [Integer] :page Page number
102
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
101
103
  # @return [Array<RepoSync>]
102
104
  describe 'repo_sync_list test' do
103
105
  it 'should work' do
@@ -21,8 +21,8 @@ describe 'ReportsApi' do
21
21
  end
22
22
 
23
23
  # unit tests for report_locales_list
24
- # List Locale Reports
25
- # List all locale reports for the given project
24
+ # List Locale Reports (word count, character count, translation statistics)
25
+ # List all locale reports for the given project. Each report includes translation statistics per locale, including word count and character count fields (&#x60;source_word_count&#x60;, &#x60;word_count&#x60;, &#x60;word_count_unverified&#x60;, &#x60;word_count_missing&#x60;) as well as translation completion statistics (&#x60;keys_count&#x60;, &#x60;completed_translations_count&#x60;, &#x60;untranslated_keys_count&#x60;, &#x60;unverified_translations_count&#x60;, &#x60;reviewed_translations_count&#x60;, and their percentages). Use the &#x60;tag&#x60; parameter to scope the report to a specific job (e.g. its job tag) to get job-scoped word count statistics.
26
26
  # @param project_id Project ID
27
27
  # @param [Hash] opts the optional parameters
28
28
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
@@ -0,0 +1,34 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::SupportedLanguagesApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'SupportedLanguagesApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::SupportedLanguagesApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of SupportedLanguagesApi' do
18
+ it 'should create an instance of SupportedLanguagesApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::SupportedLanguagesApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for languages_list
24
+ # List supported languages
25
+ # Returns all languages/locale codes that Phrase Strings recognizes, mapped to their human-readable display name. This endpoint does not require authentication.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [Hash<String, String>]
28
+ describe 'languages_list test' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end
@@ -50,4 +50,10 @@ describe 'JobTemplateCreateParameters' do
50
50
  end
51
51
  end
52
52
 
53
+ describe 'test attribute "owner_id"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
53
59
  end
@@ -50,4 +50,10 @@ describe 'JobTemplateUpdateParameters' do
50
50
  end
51
51
  end
52
52
 
53
+ describe 'test attribute "owner_id"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
53
59
  end
@@ -38,4 +38,10 @@ describe 'OrganizationJobTemplateCreateParameters' do
38
38
  end
39
39
  end
40
40
 
41
+ describe 'test attribute "owner_id"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
41
47
  end
@@ -38,4 +38,10 @@ describe 'OrganizationJobTemplateUpdateParameters' do
38
38
  end
39
39
  end
40
40
 
41
+ describe 'test attribute "owner_id"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
41
47
  end
@@ -0,0 +1,59 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::ProjectMember
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'ProjectMember' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::ProjectMember.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of ProjectMember' do
19
+ it 'should create an instance of ProjectMember' do
20
+ expect(@instance).to be_instance_of(Phrase::ProjectMember)
21
+ end
22
+ end
23
+ describe 'test attribute "id"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "username"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "name"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "position"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "created_at"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "updated_at"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ end