lib/phrase/models/invitation_create_parameters.rb in phrase-1.0.10 vs lib/phrase/models/invitation_create_parameters.rb in phrase-1.0.11

- old
+ new

@@ -12,20 +12,28 @@ attr_accessor :project_ids # List of locale ids the invited user has access to. attr_accessor :locale_ids + # List of spaces the user is assigned to. + attr_accessor :space_ids + + # List of default locales for the user. + attr_accessor :default_locale_codes + # Additional permissions depending on invitation role. Available permissions are <code>create_upload</code> and <code>review_translations</code> attr_accessor :permissions # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'email' => :'email', :'role' => :'role', :'project_ids' => :'project_ids', :'locale_ids' => :'locale_ids', + :'space_ids' => :'space_ids', + :'default_locale_codes' => :'default_locale_codes', :'permissions' => :'permissions' } end # Attribute type mapping. @@ -33,10 +41,12 @@ { :'email' => :'String', :'role' => :'String', :'project_ids' => :'String', :'locale_ids' => :'String', + :'space_ids' => :'Array<String>', + :'default_locale_codes' => :'Array<String>', :'permissions' => :'Hash<String, String>' } end # List of attributes with nullable: true @@ -74,10 +84,22 @@ if attributes.key?(:'locale_ids') self.locale_ids = attributes[:'locale_ids'] end + if attributes.key?(:'space_ids') + if (value = attributes[:'space_ids']).is_a?(Array) + self.space_ids = value + end + end + + if attributes.key?(:'default_locale_codes') + if (value = attributes[:'default_locale_codes']).is_a?(Array) + self.default_locale_codes = value + end + end + if attributes.key?(:'permissions') if (value = attributes[:'permissions']).is_a?(Hash) self.permissions = value end end @@ -103,10 +125,12 @@ self.class == o.class && email == o.email && role == o.role && project_ids == o.project_ids && locale_ids == o.locale_ids && + space_ids == o.space_ids && + default_locale_codes == o.default_locale_codes && permissions == o.permissions end # @see the `==` method # @param [Object] Object to be compared @@ -115,10 +139,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [email, role, project_ids, locale_ids, permissions].hash + [email, role, project_ids, locale_ids, space_ids, default_locale_codes, permissions].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself