lib/phrase/models/member_update_parameters.rb in phrase-2.0.0 vs lib/phrase/models/member_update_parameters.rb in phrase-2.1.0
- old
+ new
@@ -1,10 +1,13 @@
require 'date'
module Phrase
class MemberUpdateParameters
- # Member role, can be any of of Manager, Developer, Translator
+ # Update strategy, can be any of set, add, remove. If provided, it will set, add or remove given spaces, projects and locale ids from users access list.
+ attr_accessor :strategy
+
+ # Member role, can be any of of Admin, ProjectManager, Developer, Designer, Translator
attr_accessor :role
# List of project ids the user has access to.
attr_accessor :project_ids
@@ -21,10 +24,11 @@
attr_accessor :permissions
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+ :'strategy' => :'strategy',
:'role' => :'role',
:'project_ids' => :'project_ids',
:'locale_ids' => :'locale_ids',
:'default_locale_codes' => :'default_locale_codes',
:'space_ids' => :'space_ids',
@@ -33,10 +37,11 @@
end
# Attribute type mapping.
def self.openapi_types
{
+ :'strategy' => :'String',
:'role' => :'String',
:'project_ids' => :'String',
:'locale_ids' => :'String',
:'default_locale_codes' => :'Array<String>',
:'space_ids' => :'Array<String>',
@@ -63,10 +68,14 @@
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::MemberUpdateParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
+ if attributes.key?(:'strategy')
+ self.strategy = attributes[:'strategy']
+ end
+
if attributes.key?(:'role')
self.role = attributes[:'role']
end
if attributes.key?(:'project_ids')
@@ -112,10 +121,11 @@
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
+ strategy == o.strategy &&
role == o.role &&
project_ids == o.project_ids &&
locale_ids == o.locale_ids &&
default_locale_codes == o.default_locale_codes &&
space_ids == o.space_ids &&
@@ -129,10 +139,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [role, project_ids, locale_ids, default_locale_codes, space_ids, permissions].hash
+ [strategy, role, project_ids, locale_ids, default_locale_codes, space_ids, permissions].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself