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

- old
+ new

@@ -9,29 +9,39 @@ 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. attr_accessor :permissions # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'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. def self.openapi_types { :'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 @@ -65,10 +75,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 @@ -93,10 +115,12 @@ return true if self.equal?(o) self.class == o.class && 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 @@ -105,10 +129,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [role, project_ids, locale_ids, permissions].hash + [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