lib/contentful/management/user.rb in contentful-management-2.12.1 vs lib/contentful/management/user.rb in contentful-management-2.13.0

- old
+ new

@@ -17,10 +17,16 @@ property :confirmed, :boolean property :signInCount, :integer # @private def self.build_endpoint(endpoint_options) - endpoint = 'users' + endpoint = if endpoint_options[:space_id] + "spaces/#{endpoint_options[:space_id]}/users" + elsif endpoint_options[:organization_id] + "organizations/#{endpoint_options[:organization_id]}/users" + else + 'users' + end endpoint = "#{endpoint}/#{endpoint_options[:resource_id]}" if endpoint_options[:resource_id] endpoint end end end