phrase 2.5.0 → 2.5.1

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 (97) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -10
  3. data/docs/AccountsApi.md +2 -8
  4. data/docs/AuthorizationsApi.md +5 -20
  5. data/docs/BitbucketSyncApi.md +3 -12
  6. data/docs/BlacklistedKeysApi.md +5 -20
  7. data/docs/BranchesApi.md +7 -28
  8. data/docs/CommentsApi.md +8 -32
  9. data/docs/DistributionsApi.md +5 -20
  10. data/docs/DocumentsApi.md +2 -8
  11. data/docs/FormatsApi.md +1 -4
  12. data/docs/GitHubSyncApi.md +2 -8
  13. data/docs/GitLabSyncApi.md +7 -28
  14. data/docs/GlossariesApi.md +5 -20
  15. data/docs/GlossaryTermTranslationsApi.md +3 -12
  16. data/docs/GlossaryTermsApi.md +5 -20
  17. data/docs/ICUApi.md +1 -4
  18. data/docs/Invitation.md +2 -0
  19. data/docs/InvitationsApi.md +7 -28
  20. data/docs/JobLocalesApi.md +8 -32
  21. data/docs/JobTemplateLocalesApi.md +5 -20
  22. data/docs/JobTemplatesApi.md +5 -20
  23. data/docs/JobsApi.md +11 -44
  24. data/docs/KeysApi.md +11 -44
  25. data/docs/LocalesApi.md +7 -28
  26. data/docs/MembersApi.md +5 -20
  27. data/docs/NotificationGroupsApi.md +3 -12
  28. data/docs/NotificationsApi.md +3 -12
  29. data/docs/OrdersApi.md +5 -20
  30. data/docs/ProjectLocales.md +2 -0
  31. data/docs/ProjectMemberSpecific.md +27 -0
  32. data/docs/ProjectsApi.md +5 -20
  33. data/docs/ReleasesApi.md +6 -24
  34. data/docs/ScreenshotMarkersApi.md +5 -20
  35. data/docs/ScreenshotsApi.md +5 -20
  36. data/docs/SearchApi.md +1 -4
  37. data/docs/SpacesApi.md +8 -32
  38. data/docs/StyleGuidesApi.md +5 -20
  39. data/docs/TagsApi.md +4 -16
  40. data/docs/TeamsApi.md +11 -44
  41. data/docs/TranslationsApi.md +17 -68
  42. data/docs/UploadsApi.md +3 -12
  43. data/docs/UsersApi.md +1 -4
  44. data/docs/VariablesApi.md +5 -20
  45. data/docs/VersionsHistoryApi.md +2 -8
  46. data/docs/WebhooksApi.md +6 -24
  47. data/lib/phrase/api/accounts_api.rb +2 -2
  48. data/lib/phrase/api/authorizations_api.rb +5 -5
  49. data/lib/phrase/api/bitbucket_sync_api.rb +3 -3
  50. data/lib/phrase/api/blacklisted_keys_api.rb +5 -5
  51. data/lib/phrase/api/branches_api.rb +7 -7
  52. data/lib/phrase/api/comments_api.rb +8 -8
  53. data/lib/phrase/api/distributions_api.rb +5 -5
  54. data/lib/phrase/api/documents_api.rb +2 -2
  55. data/lib/phrase/api/formats_api.rb +1 -1
  56. data/lib/phrase/api/git_hub_sync_api.rb +2 -2
  57. data/lib/phrase/api/git_lab_sync_api.rb +7 -7
  58. data/lib/phrase/api/glossaries_api.rb +5 -5
  59. data/lib/phrase/api/glossary_term_translations_api.rb +3 -3
  60. data/lib/phrase/api/glossary_terms_api.rb +5 -5
  61. data/lib/phrase/api/icu_api.rb +1 -1
  62. data/lib/phrase/api/invitations_api.rb +7 -7
  63. data/lib/phrase/api/job_locales_api.rb +8 -8
  64. data/lib/phrase/api/job_template_locales_api.rb +5 -5
  65. data/lib/phrase/api/job_templates_api.rb +5 -5
  66. data/lib/phrase/api/jobs_api.rb +11 -11
  67. data/lib/phrase/api/keys_api.rb +11 -11
  68. data/lib/phrase/api/locales_api.rb +7 -7
  69. data/lib/phrase/api/members_api.rb +5 -5
  70. data/lib/phrase/api/notification_groups_api.rb +3 -3
  71. data/lib/phrase/api/notifications_api.rb +3 -3
  72. data/lib/phrase/api/orders_api.rb +5 -5
  73. data/lib/phrase/api/projects_api.rb +5 -5
  74. data/lib/phrase/api/releases_api.rb +6 -6
  75. data/lib/phrase/api/screenshot_markers_api.rb +5 -5
  76. data/lib/phrase/api/screenshots_api.rb +5 -5
  77. data/lib/phrase/api/search_api.rb +1 -1
  78. data/lib/phrase/api/spaces_api.rb +8 -8
  79. data/lib/phrase/api/style_guides_api.rb +5 -5
  80. data/lib/phrase/api/tags_api.rb +4 -4
  81. data/lib/phrase/api/teams_api.rb +11 -11
  82. data/lib/phrase/api/translations_api.rb +17 -17
  83. data/lib/phrase/api/uploads_api.rb +3 -3
  84. data/lib/phrase/api/users_api.rb +1 -1
  85. data/lib/phrase/api/variables_api.rb +5 -5
  86. data/lib/phrase/api/versions_history_api.rb +2 -2
  87. data/lib/phrase/api/webhooks_api.rb +6 -6
  88. data/lib/phrase/configuration.rb +0 -8
  89. data/lib/phrase/models/invitation.rb +12 -1
  90. data/lib/phrase/models/project_locales.rb +11 -2
  91. data/lib/phrase/models/project_member_specific.rb +239 -0
  92. data/lib/phrase/version.rb +1 -1
  93. data/lib/phrase.rb +1 -0
  94. data/spec/models/invitation_spec.rb +6 -0
  95. data/spec/models/project_locales_spec.rb +6 -0
  96. data/spec/models/project_member_specific_spec.rb +59 -0
  97. metadata +6 -2
@@ -101,7 +101,7 @@ module Phrase
101
101
  return_type = opts[:return_type] || 'Upload'
102
102
 
103
103
  # auth_names
104
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
104
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
105
105
 
106
106
  new_options = opts.merge(
107
107
  :header_params => header_params,
@@ -176,7 +176,7 @@ module Phrase
176
176
  return_type = opts[:return_type] || 'Upload'
177
177
 
178
178
  # auth_names
179
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
179
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
180
180
 
181
181
  new_options = opts.merge(
182
182
  :header_params => header_params,
@@ -251,7 +251,7 @@ module Phrase
251
251
  return_type = opts[:return_type] || 'Array<Upload>'
252
252
 
253
253
  # auth_names
254
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
254
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
255
255
 
256
256
  new_options = opts.merge(
257
257
  :header_params => header_params,
@@ -48,7 +48,7 @@ module Phrase
48
48
  return_type = opts[:return_type] || 'CurrentUser'
49
49
 
50
50
  # auth_names
51
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
51
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
52
52
 
53
53
  new_options = opts.merge(
54
54
  :header_params => header_params,
@@ -62,7 +62,7 @@ module Phrase
62
62
  return_type = opts[:return_type] || 'Variable'
63
63
 
64
64
  # auth_names
65
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
65
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
66
66
 
67
67
  new_options = opts.merge(
68
68
  :header_params => header_params,
@@ -132,7 +132,7 @@ module Phrase
132
132
  return_type = opts[:return_type]
133
133
 
134
134
  # auth_names
135
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
135
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
136
136
 
137
137
  new_options = opts.merge(
138
138
  :header_params => header_params,
@@ -204,7 +204,7 @@ module Phrase
204
204
  return_type = opts[:return_type] || 'Variable'
205
205
 
206
206
  # auth_names
207
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
207
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
208
208
 
209
209
  new_options = opts.merge(
210
210
  :header_params => header_params,
@@ -284,7 +284,7 @@ module Phrase
284
284
  return_type = opts[:return_type] || 'Variable'
285
285
 
286
286
  # auth_names
287
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
287
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
288
288
 
289
289
  new_options = opts.merge(
290
290
  :header_params => header_params,
@@ -356,7 +356,7 @@ module Phrase
356
356
  return_type = opts[:return_type] || 'Array<Variable>'
357
357
 
358
358
  # auth_names
359
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
359
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
360
360
 
361
361
  new_options = opts.merge(
362
362
  :header_params => header_params,
@@ -69,7 +69,7 @@ module Phrase
69
69
  return_type = opts[:return_type] || 'TranslationVersionWithUser'
70
70
 
71
71
  # auth_names
72
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
72
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
73
73
 
74
74
  new_options = opts.merge(
75
75
  :header_params => header_params,
@@ -150,7 +150,7 @@ module Phrase
150
150
  return_type = opts[:return_type] || 'Array<TranslationVersion>'
151
151
 
152
152
  # auth_names
153
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
153
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
154
154
 
155
155
  new_options = opts.merge(
156
156
  :header_params => header_params,
@@ -62,7 +62,7 @@ module Phrase
62
62
  return_type = opts[:return_type] || 'Webhook'
63
63
 
64
64
  # auth_names
65
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
65
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
66
66
 
67
67
  new_options = opts.merge(
68
68
  :header_params => header_params,
@@ -132,7 +132,7 @@ module Phrase
132
132
  return_type = opts[:return_type]
133
133
 
134
134
  # auth_names
135
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
135
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
136
136
 
137
137
  new_options = opts.merge(
138
138
  :header_params => header_params,
@@ -204,7 +204,7 @@ module Phrase
204
204
  return_type = opts[:return_type] || 'Webhook'
205
205
 
206
206
  # auth_names
207
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
207
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
208
208
 
209
209
  new_options = opts.merge(
210
210
  :header_params => header_params,
@@ -274,7 +274,7 @@ module Phrase
274
274
  return_type = opts[:return_type]
275
275
 
276
276
  # auth_names
277
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
277
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
278
278
 
279
279
  new_options = opts.merge(
280
280
  :header_params => header_params,
@@ -354,7 +354,7 @@ module Phrase
354
354
  return_type = opts[:return_type] || 'Webhook'
355
355
 
356
356
  # auth_names
357
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
357
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
358
358
 
359
359
  new_options = opts.merge(
360
360
  :header_params => header_params,
@@ -426,7 +426,7 @@ module Phrase
426
426
  return_type = opts[:return_type] || 'Array<Webhook>'
427
427
 
428
428
  # auth_names
429
- auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
429
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
430
430
 
431
431
  new_options = opts.merge(
432
432
  :header_params => header_params,
@@ -195,14 +195,6 @@ module Phrase
195
195
  key: 'Authorization',
196
196
  value: api_key_with_prefix('Authorization')
197
197
  },
198
- 'bearerAuth' =>
199
- {
200
- type: 'bearer',
201
- in: 'header',
202
- format: 'JWT',
203
- key: 'Authorization',
204
- value: "Bearer #{access_token}"
205
- },
206
198
  }
207
199
  end
208
200
 
@@ -28,6 +28,8 @@ module Phrase
28
28
 
29
29
  attr_accessor :spaces
30
30
 
31
+ attr_accessor :teams
32
+
31
33
  attr_accessor :project_role
32
34
 
33
35
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -46,6 +48,7 @@ module Phrase
46
48
  :'updated_at' => :'updated_at',
47
49
  :'accepted_at' => :'accepted_at',
48
50
  :'spaces' => :'spaces',
51
+ :'teams' => :'teams',
49
52
  :'project_role' => :'project_role'
50
53
  }
51
54
  end
@@ -66,6 +69,7 @@ module Phrase
66
69
  :'updated_at' => :'DateTime',
67
70
  :'accepted_at' => :'DateTime',
68
71
  :'spaces' => :'Array<MemberSpaces>',
72
+ :'teams' => :'Array<Items>',
69
73
  :'project_role' => :'Array<MemberProjectDetailProjectRoles>'
70
74
  }
71
75
  end
@@ -153,6 +157,12 @@ module Phrase
153
157
  end
154
158
  end
155
159
 
160
+ if attributes.key?(:'teams')
161
+ if (value = attributes[:'teams']).is_a?(Array)
162
+ self.teams = value
163
+ end
164
+ end
165
+
156
166
  if attributes.key?(:'project_role')
157
167
  if (value = attributes[:'project_role']).is_a?(Array)
158
168
  self.project_role = value
@@ -191,6 +201,7 @@ module Phrase
191
201
  updated_at == o.updated_at &&
192
202
  accepted_at == o.accepted_at &&
193
203
  spaces == o.spaces &&
204
+ teams == o.teams &&
194
205
  project_role == o.project_role
195
206
  end
196
207
 
@@ -203,7 +214,7 @@ module Phrase
203
214
  # Calculates hash code according to all attributes.
204
215
  # @return [Integer] Hash code
205
216
  def hash
206
- [id, email, role, state, projects, locales, default_locale_codes, permissions, locale_ids, created_at, updated_at, accepted_at, spaces, project_role].hash
217
+ [id, email, role, state, projects, locales, default_locale_codes, permissions, locale_ids, created_at, updated_at, accepted_at, spaces, teams, project_role].hash
207
218
  end
208
219
 
209
220
  # Builds the object from hash
@@ -6,6 +6,8 @@ module Phrase
6
6
 
7
7
  attr_accessor :name
8
8
 
9
+ attr_accessor :project_role
10
+
9
11
  attr_accessor :main_format
10
12
 
11
13
  attr_accessor :created_at
@@ -19,6 +21,7 @@ module Phrase
19
21
  {
20
22
  :'id' => :'id',
21
23
  :'name' => :'name',
24
+ :'project_role' => :'project_role',
22
25
  :'main_format' => :'main_format',
23
26
  :'created_at' => :'created_at',
24
27
  :'updated_at' => :'updated_at',
@@ -31,6 +34,7 @@ module Phrase
31
34
  {
32
35
  :'id' => :'String',
33
36
  :'name' => :'String',
37
+ :'project_role' => :'String',
34
38
  :'main_format' => :'String',
35
39
  :'created_at' => :'DateTime',
36
40
  :'updated_at' => :'DateTime',
@@ -48,7 +52,7 @@ module Phrase
48
52
  def self.openapi_all_of
49
53
  [
50
54
  :'ProjectLocales1',
51
- :'ProjectShort'
55
+ :'ProjectMemberSpecific'
52
56
  ]
53
57
  end
54
58
 
@@ -75,6 +79,10 @@ module Phrase
75
79
  self.name = attributes[:'name']
76
80
  end
77
81
 
82
+ if attributes.key?(:'project_role')
83
+ self.project_role = attributes[:'project_role']
84
+ end
85
+
78
86
  if attributes.key?(:'main_format')
79
87
  self.main_format = attributes[:'main_format']
80
88
  end
@@ -114,6 +122,7 @@ module Phrase
114
122
  self.class == o.class &&
115
123
  id == o.id &&
116
124
  name == o.name &&
125
+ project_role == o.project_role &&
117
126
  main_format == o.main_format &&
118
127
  created_at == o.created_at &&
119
128
  updated_at == o.updated_at &&
@@ -129,7 +138,7 @@ module Phrase
129
138
  # Calculates hash code according to all attributes.
130
139
  # @return [Integer] Hash code
131
140
  def hash
132
- [id, name, main_format, created_at, updated_at, locales].hash
141
+ [id, name, project_role, main_format, created_at, updated_at, locales].hash
133
142
  end
134
143
 
135
144
  # Builds the object from hash
@@ -0,0 +1,239 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class ProjectMemberSpecific
5
+ attr_accessor :id
6
+
7
+ attr_accessor :name
8
+
9
+ attr_accessor :project_role
10
+
11
+ attr_accessor :main_format
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
+ :'name' => :'name',
22
+ :'project_role' => :'project_role',
23
+ :'main_format' => :'main_format',
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
+ :'name' => :'String',
34
+ :'project_role' => :'String',
35
+ :'main_format' => :'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::ProjectMemberSpecific` 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::ProjectMemberSpecific`. 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?(:'name')
67
+ self.name = attributes[:'name']
68
+ end
69
+
70
+ if attributes.key?(:'project_role')
71
+ self.project_role = attributes[:'project_role']
72
+ end
73
+
74
+ if attributes.key?(:'main_format')
75
+ self.main_format = attributes[:'main_format']
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
+ name == o.name &&
107
+ project_role == o.project_role &&
108
+ main_format == o.main_format &&
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, name, project_role, main_format, 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 :String
163
+ value.to_s
164
+ when :Integer
165
+ value.to_i
166
+ when :Float
167
+ value.to_f
168
+ when :Boolean
169
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
+ true
171
+ else
172
+ false
173
+ end
174
+ when :Object
175
+ # generic object (usually a Hash), return directly
176
+ value
177
+ when /\AArray<(?<inner_type>.+)>\z/
178
+ inner_type = Regexp.last_match[:inner_type]
179
+ value.map { |v| _deserialize(inner_type, v) }
180
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
181
+ k_type = Regexp.last_match[:k_type]
182
+ v_type = Regexp.last_match[:v_type]
183
+ {}.tap do |hash|
184
+ value.each do |k, v|
185
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
+ end
187
+ end
188
+ else # model
189
+ Phrase.const_get(type).build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ # Returns the string representation of the object
194
+ # @return [String] String presentation of the object
195
+ def to_s
196
+ to_hash.to_s
197
+ end
198
+
199
+ # to_body is an alias to to_hash (backward compatibility)
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_body
202
+ to_hash
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+ end
239
+ end
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '2.5.0'
2
+ VERSION = '2.5.1'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -123,6 +123,7 @@ require 'phrase/models/project_details'
123
123
  require 'phrase/models/project_details1'
124
124
  require 'phrase/models/project_locales'
125
125
  require 'phrase/models/project_locales1'
126
+ require 'phrase/models/project_member_specific'
126
127
  require 'phrase/models/project_short'
127
128
  require 'phrase/models/project_update_parameters'
128
129
  require 'phrase/models/release'
@@ -98,6 +98,12 @@ describe 'Invitation' do
98
98
  end
99
99
  end
100
100
 
101
+ describe 'test attribute "teams"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
101
107
  describe 'test attribute "project_role"' do
102
108
  it 'should work' do
103
109
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -32,6 +32,12 @@ describe 'ProjectLocales' do
32
32
  end
33
33
  end
34
34
 
35
+ describe 'test attribute "project_role"' 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
+
35
41
  describe 'test attribute "main_format"' do
36
42
  it 'should work' do
37
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,59 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::ProjectMemberSpecific
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'ProjectMemberSpecific' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::ProjectMemberSpecific.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of ProjectMemberSpecific' do
19
+ it 'should create an instance of ProjectMemberSpecific' do
20
+ expect(@instance).to be_instance_of(Phrase::ProjectMemberSpecific)
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 "name"' 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 "project_role"' 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 "main_format"' 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
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phrase
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phrase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-13 00:00:00.000000000 Z
11
+ date: 2022-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -236,6 +236,7 @@ files:
236
236
  - docs/ProjectDetails1.md
237
237
  - docs/ProjectLocales.md
238
238
  - docs/ProjectLocales1.md
239
+ - docs/ProjectMemberSpecific.md
239
240
  - docs/ProjectShort.md
240
241
  - docs/ProjectUpdateParameters.md
241
242
  - docs/ProjectsApi.md
@@ -485,6 +486,7 @@ files:
485
486
  - lib/phrase/models/project_details1.rb
486
487
  - lib/phrase/models/project_locales.rb
487
488
  - lib/phrase/models/project_locales1.rb
489
+ - lib/phrase/models/project_member_specific.rb
488
490
  - lib/phrase/models/project_short.rb
489
491
  - lib/phrase/models/project_update_parameters.rb
490
492
  - lib/phrase/models/release.rb
@@ -718,6 +720,7 @@ files:
718
720
  - spec/models/project_details_spec.rb
719
721
  - spec/models/project_locales1_spec.rb
720
722
  - spec/models/project_locales_spec.rb
723
+ - spec/models/project_member_specific_spec.rb
721
724
  - spec/models/project_short_spec.rb
722
725
  - spec/models/project_spec.rb
723
726
  - spec/models/project_update_parameters_spec.rb
@@ -946,6 +949,7 @@ test_files:
946
949
  - spec/models/project_create_parameters_spec.rb
947
950
  - spec/models/distribution_update_parameters_spec.rb
948
951
  - spec/models/project_locales1_spec.rb
952
+ - spec/models/project_member_specific_spec.rb
949
953
  - spec/models/translation_details1_spec.rb
950
954
  - spec/models/member_update_parameters_spec.rb
951
955
  - spec/models/keys_include_parameters_spec.rb